|
@@ -314,7 +314,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
|
|
|
|
|
// 如果申领教材列表为空,应该使用基础数据维护的
|
|
// 如果申领教材列表为空,应该使用基础数据维护的
|
|
|
boolean isCourseFlag = false;
|
|
boolean isCourseFlag = false;
|
|
|
- if(CollectionUtils.isEmpty(mergedDistinctList)){
|
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(mergedDistinctList)) {
|
|
|
isCourseFlag = true;
|
|
isCourseFlag = true;
|
|
|
mergedDistinctList = courselList;
|
|
mergedDistinctList = courselList;
|
|
|
}
|
|
}
|
|
@@ -355,7 +355,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
|
|
|
|
|
categoryTotalPrice = BigDecimal.ZERO;
|
|
categoryTotalPrice = BigDecimal.ZERO;
|
|
|
for (HeadTeaLookClassBookCategoryDetailVo vo : value) {
|
|
for (HeadTeaLookClassBookCategoryDetailVo vo : value) {
|
|
|
- if(!isCourseFlag){
|
|
|
|
|
|
|
+ if (!isCourseFlag) {
|
|
|
textbookStudentClaim = byTextbookId.get(vo.getTextbookId());
|
|
textbookStudentClaim = byTextbookId.get(vo.getTextbookId());
|
|
|
if (ObjectUtils.isNotEmpty(textbookStudentClaim)) {
|
|
if (ObjectUtils.isNotEmpty(textbookStudentClaim)) {
|
|
|
vo.setTextbookStudentClaimId(textbookStudentClaim.getId());
|
|
vo.setTextbookStudentClaimId(textbookStudentClaim.getId());
|
|
@@ -443,7 +443,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
|
|
.eq(WorkflowFormRelation::getCurrentState, HistoricProcessInstance.STATE_COMPLETED)
|
|
|
.eq(WfTextbookClaim::getClassId, baseStudentSchoolRoll.getClassId())
|
|
.eq(WfTextbookClaim::getClassId, baseStudentSchoolRoll.getClassId())
|
|
|
.eq(WfTextbookClaim::getClaimType, ClaimTypeEnum.ClaimClass.getCode())
|
|
.eq(WfTextbookClaim::getClaimType, ClaimTypeEnum.ClaimClass.getCode())
|
|
|
- ;
|
|
|
|
|
|
|
+ ;
|
|
|
List<StudentSemesterTextbookVo> classList = wfTextbookClaimMapper.selectJoinList(StudentSemesterTextbookVo.class, classMPJLambdaWrapper);
|
|
List<StudentSemesterTextbookVo> classList = wfTextbookClaimMapper.selectJoinList(StudentSemesterTextbookVo.class, classMPJLambdaWrapper);
|
|
|
// 根据学期 ID 分组,再根据教材 ID 映射
|
|
// 根据学期 ID 分组,再根据教材 ID 映射
|
|
|
Map<Long, Map<Long, StudentSemesterTextbookVo>> classMap = classList.stream()
|
|
Map<Long, Map<Long, StudentSemesterTextbookVo>> classMap = classList.stream()
|
|
@@ -497,7 +497,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
TextbookStudentSemesterVo result;
|
|
TextbookStudentSemesterVo result;
|
|
|
List<Long> mergedKeyList;
|
|
List<Long> mergedKeyList;
|
|
|
int status = 2;
|
|
int status = 2;
|
|
|
- for(StudentSemesterTextbookVo vo : mergedDistinctList){
|
|
|
|
|
|
|
+ for (StudentSemesterTextbookVo vo : mergedDistinctList) {
|
|
|
result = new TextbookStudentSemesterVo();
|
|
result = new TextbookStudentSemesterVo();
|
|
|
Long semester = vo.getBaseSemesterId();
|
|
Long semester = vo.getBaseSemesterId();
|
|
|
result.setBaseSemesterId(semester);
|
|
result.setBaseSemesterId(semester);
|
|
@@ -516,8 +516,8 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.distinct() // 去重
|
|
.distinct() // 去重
|
|
|
.collect(Collectors.toList()); // 转换为 List
|
|
.collect(Collectors.toList()); // 转换为 List
|
|
|
|
|
|
|
|
- for(Long textbookId : mergedKeyList){
|
|
|
|
|
- if(ObjectUtils.isEmpty(studentClaimSemesterMap) || ObjectUtils.isEmpty(studentClaimSemesterMap.get(textbookId))){
|
|
|
|
|
|
|
+ for (Long textbookId : mergedKeyList) {
|
|
|
|
|
+ if (ObjectUtils.isEmpty(studentClaimSemesterMap) || ObjectUtils.isEmpty(studentClaimSemesterMap.get(textbookId))) {
|
|
|
status = 1;
|
|
status = 1;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
@@ -830,8 +830,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
|
.selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
.selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
|
.innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
.innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
|
- .innerJoin(TextbookIssueRecord.class, TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
|
|
- .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, WfTextbookClaimItem::getWfTextbookClaimId)
|
|
|
|
|
|
|
+ .innerJoin(TextbookIssueRecord.class,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataId, WfTextbookClaim::getId)
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
|
|
+ )
|
|
|
|
|
+ .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, TextbookIssueRecord::getTextbookWarehouseRecordId)
|
|
|
.eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
.eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
.eq(WfTextbookClaim::getClassId, dto.getClassId())
|
|
.eq(WfTextbookClaim::getClassId, dto.getClassId())
|
|
|
;
|
|
;
|
|
@@ -850,7 +854,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
for (Long textbookId : dto.getTextbookIds()) {
|
|
for (Long textbookId : dto.getTextbookIds()) {
|
|
|
for (Long userId : dto.getUserIds()) {
|
|
for (Long userId : dto.getUserIds()) {
|
|
|
BigDecimal price = BigDecimal.ZERO;
|
|
BigDecimal price = BigDecimal.ZERO;
|
|
|
- if(MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(textbookId))){
|
|
|
|
|
|
|
+ if (MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(textbookId))) {
|
|
|
price = textBookPriceMap.get(textbookId);
|
|
price = textBookPriceMap.get(textbookId);
|
|
|
}
|
|
}
|
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + userId + textbookId);
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + userId + textbookId);
|
|
@@ -862,10 +866,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
@@ -879,10 +883,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
insertTextbookStudentClaim.setPrice(price);
|
|
insertTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
insertTextbookStudentClaim.setClaimSource(2);
|
|
insertTextbookStudentClaim.setClaimSource(2);
|
|
@@ -943,7 +947,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.collect(Collectors.toMap(t -> "" + t.getBaseSemesterId() + t.getClassId() + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
.collect(Collectors.toMap(t -> "" + t.getBaseSemesterId() + t.getClassId() + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
|
|
Map<Long, TextbookStudentClaim> byClaimSource = textbookStudentClaimList.stream()
|
|
Map<Long, TextbookStudentClaim> byClaimSource = textbookStudentClaimList.stream()
|
|
|
- .collect(Collectors.toMap(TextbookStudentClaim::getId , t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
|
+ .collect(Collectors.toMap(TextbookStudentClaim::getId, t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
|
|
// 根据学期,班级获取申领教材信息
|
|
// 根据学期,班级获取申领教材信息
|
|
|
MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
@@ -951,8 +955,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
|
.selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
.selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
|
.innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
.innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
|
- .innerJoin(TextbookIssueRecord.class, TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
|
|
- .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, WfTextbookClaimItem::getWfTextbookClaimId)
|
|
|
|
|
|
|
+ .innerJoin(TextbookIssueRecord.class,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataId, WfTextbookClaim::getId)
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
|
|
+ )
|
|
|
|
|
+ .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, TextbookIssueRecord::getTextbookWarehouseRecordId)
|
|
|
.in(WfTextbookClaim::getBaseSemesterId, baseSemesterIds)
|
|
.in(WfTextbookClaim::getBaseSemesterId, baseSemesterIds)
|
|
|
.in(WfTextbookClaim::getClassId, classIds)
|
|
.in(WfTextbookClaim::getClassId, classIds)
|
|
|
;
|
|
;
|
|
@@ -971,13 +979,13 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
|
for (TeacherConfirmDto dto : dtos) {
|
|
for (TeacherConfirmDto dto : dtos) {
|
|
|
BigDecimal price = BigDecimal.ZERO;
|
|
BigDecimal price = BigDecimal.ZERO;
|
|
|
- if(MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(dto.getTextbookId()))){
|
|
|
|
|
|
|
+ if (MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(dto.getTextbookId()))) {
|
|
|
price = textBookPriceMap.get(dto.getTextbookId());
|
|
price = textBookPriceMap.get(dto.getTextbookId());
|
|
|
}
|
|
}
|
|
|
if (ObjectUtils.isNotEmpty(dto.getTextbookStudentClaimId())
|
|
if (ObjectUtils.isNotEmpty(dto.getTextbookStudentClaimId())
|
|
|
&& dto.getTextbookStudentClaimId() != 0) {
|
|
&& dto.getTextbookStudentClaimId() != 0) {
|
|
|
oldTextbookStudentClaim = byClaimSource.get(dto.getTextbookStudentClaimId());
|
|
oldTextbookStudentClaim = byClaimSource.get(dto.getTextbookStudentClaimId());
|
|
|
- if(ObjectUtils.isNotEmpty(oldTextbookStudentClaim)
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(oldTextbookStudentClaim)
|
|
|
&& (ObjectUtils.isEmpty(oldTextbookStudentClaim.getClaimSource()) || oldTextbookStudentClaim.getClaimSource() != 1)) {
|
|
&& (ObjectUtils.isEmpty(oldTextbookStudentClaim.getClaimSource()) || oldTextbookStudentClaim.getClaimSource() != 1)) {
|
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
updateTextbookStudentClaim.setId(dto.getTextbookStudentClaimId());
|
|
updateTextbookStudentClaim.setId(dto.getTextbookStudentClaimId());
|
|
@@ -1003,10 +1011,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
@@ -1020,10 +1028,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
insertTextbookStudentClaim.setPrice(price);
|
|
insertTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
insertTextbookStudentClaim.setClaimSource(2);
|
|
insertTextbookStudentClaim.setClaimSource(2);
|
|
@@ -1085,7 +1093,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.collect(Collectors.toMap(t -> "" + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
.collect(Collectors.toMap(t -> "" + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
|
|
Map<Long, TextbookStudentClaim> byClaimSource = textbookStudentClaimList.stream()
|
|
Map<Long, TextbookStudentClaim> byClaimSource = textbookStudentClaimList.stream()
|
|
|
- .collect(Collectors.toMap(TextbookStudentClaim::getId , t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
|
+ .collect(Collectors.toMap(TextbookStudentClaim::getId, t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
|
|
// 根据学期,班级获取申领教材信息
|
|
// 根据学期,班级获取申领教材信息
|
|
|
MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
@@ -1093,8 +1101,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
|
.selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
.selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
|
.innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
.innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
|
- .innerJoin(TextbookIssueRecord.class, TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
|
|
- .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, WfTextbookClaimItem::getWfTextbookClaimId)
|
|
|
|
|
|
|
+ .innerJoin(TextbookIssueRecord.class,
|
|
|
|
|
+ wrapper -> wrapper
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataId, WfTextbookClaim::getId)
|
|
|
|
|
+ .eq(TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
|
|
+ )
|
|
|
|
|
+ .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, TextbookIssueRecord::getTextbookWarehouseRecordId)
|
|
|
.eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
.eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
.eq(WfTextbookClaim::getClassId, baseStudentSchoolRoll.getClassId())
|
|
.eq(WfTextbookClaim::getClassId, baseStudentSchoolRoll.getClassId())
|
|
|
;
|
|
;
|
|
@@ -1112,24 +1124,24 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
|
for (StudentConfirmDetailDto studentConfirmDetailDto : dto.getStudentConfirmDetail()) {
|
|
for (StudentConfirmDetailDto studentConfirmDetailDto : dto.getStudentConfirmDetail()) {
|
|
|
BigDecimal price = BigDecimal.ZERO;
|
|
BigDecimal price = BigDecimal.ZERO;
|
|
|
- if(MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(studentConfirmDetailDto.getTextbookId()))){
|
|
|
|
|
|
|
+ if (MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(studentConfirmDetailDto.getTextbookId()))) {
|
|
|
price = textBookPriceMap.get(studentConfirmDetailDto.getTextbookId());
|
|
price = textBookPriceMap.get(studentConfirmDetailDto.getTextbookId());
|
|
|
}
|
|
}
|
|
|
if (ObjectUtils.isNotEmpty(studentConfirmDetailDto.getTextbookStudentClaimId())
|
|
if (ObjectUtils.isNotEmpty(studentConfirmDetailDto.getTextbookStudentClaimId())
|
|
|
&& studentConfirmDetailDto.getTextbookStudentClaimId() != 0
|
|
&& studentConfirmDetailDto.getTextbookStudentClaimId() != 0
|
|
|
) {
|
|
) {
|
|
|
oldTextbookStudentClaim = byClaimSource.get(studentConfirmDetailDto.getTextbookStudentClaimId());
|
|
oldTextbookStudentClaim = byClaimSource.get(studentConfirmDetailDto.getTextbookStudentClaimId());
|
|
|
- if(ObjectUtils.isNotEmpty(oldTextbookStudentClaim)
|
|
|
|
|
- && (ObjectUtils.isEmpty(oldTextbookStudentClaim.getClaimSource()) || oldTextbookStudentClaim.getClaimSource() != 1)){
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(oldTextbookStudentClaim)
|
|
|
|
|
+ && (ObjectUtils.isEmpty(oldTextbookStudentClaim.getClaimSource()) || oldTextbookStudentClaim.getClaimSource() != 1)) {
|
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
updateTextbookStudentClaim.setId(studentConfirmDetailDto.getTextbookStudentClaimId());
|
|
updateTextbookStudentClaim.setId(studentConfirmDetailDto.getTextbookStudentClaimId());
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
@@ -1137,16 +1149,16 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + baseStudentSchoolRoll.getUserId() + studentConfirmDetailDto.getTextbookId());
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + baseStudentSchoolRoll.getUserId() + studentConfirmDetailDto.getTextbookId());
|
|
|
- if (ObjectUtils.isNotEmpty(oldTextbookStudentClaim) && (ObjectUtils.isEmpty(oldTextbookStudentClaim.getClaimSource()) || oldTextbookStudentClaim.getClaimSource() != 1)) {
|
|
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(oldTextbookStudentClaim) && (ObjectUtils.isEmpty(oldTextbookStudentClaim.getClaimSource()) || oldTextbookStudentClaim.getClaimSource() != 1)) {
|
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
updateTextbookStudentClaim.setId(oldTextbookStudentClaim.getId());
|
|
updateTextbookStudentClaim.setId(oldTextbookStudentClaim.getId());
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
updateTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
updateTextbookStudentClaim.setClaimSource(2);
|
|
@@ -1160,10 +1172,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
|
- if(dto.getIsClaim() == 0){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 0) {
|
|
|
insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
}
|
|
|
- if(dto.getIsClaim() == 1){
|
|
|
|
|
|
|
+ if (dto.getIsClaim() == 1) {
|
|
|
insertTextbookStudentClaim.setPrice(price);
|
|
insertTextbookStudentClaim.setPrice(price);
|
|
|
}
|
|
}
|
|
|
insertTextbookStudentClaim.setClaimSource(2);
|
|
insertTextbookStudentClaim.setClaimSource(2);
|