|
|
@@ -29,10 +29,7 @@ import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
|
import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.teacher.mapper.XjrUserMapper;
|
|
|
import com.xjrsoft.module.textbook.dto.*;
|
|
|
-import com.xjrsoft.module.textbook.entity.Textbook;
|
|
|
-import com.xjrsoft.module.textbook.entity.TextbookStudentClaim;
|
|
|
-import com.xjrsoft.module.textbook.entity.WfTextbookClaim;
|
|
|
-import com.xjrsoft.module.textbook.entity.WfTextbookClaimItem;
|
|
|
+import com.xjrsoft.module.textbook.entity.*;
|
|
|
import com.xjrsoft.module.textbook.mapper.TextbookMapper;
|
|
|
import com.xjrsoft.module.textbook.mapper.TextbookStudentClaimMapper;
|
|
|
import com.xjrsoft.module.textbook.mapper.WfTextbookClaimItemMapper;
|
|
|
@@ -41,6 +38,8 @@ import com.xjrsoft.module.textbook.service.ITextbookStudentClaimService;
|
|
|
import com.xjrsoft.module.textbook.vo.*;
|
|
|
import com.xjrsoft.module.workflow.entity.WorkflowFormRelation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.camunda.bpm.engine.history.HistoricProcessInstance;
|
|
|
@@ -226,7 +225,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
MPJLambdaWrapper<BaseClassAdminCourse> courseMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
courseMPJLambdaWrapper
|
|
|
.disableSubLogicDel()
|
|
|
- .selectAs(WfTextbookClaimItem::getTextbookId, HeadTeaLookClassBookCategoryDetailVo::getTextbookId)
|
|
|
+ .selectAs(BaseClassCourse::getTextbookId, HeadTeaLookClassBookCategoryDetailVo::getTextbookId)
|
|
|
.selectAs(Textbook::getBookName, HeadTeaLookClassBookCategoryDetailVo::getBookName)
|
|
|
.selectAs(Textbook::getPrice, HeadTeaLookClassBookCategoryDetailVo::getPrice)
|
|
|
.selectAs(Textbook::getTextbookType, HeadTeaLookClassBookCategoryDetailVo::getTextbookType)
|
|
|
@@ -236,24 +235,19 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
wrapper -> wrapper
|
|
|
.selectAs(DictionaryDetail::getName, HeadTeaLookClassBookCategoryDetailVo::getTextbookTypeCn)
|
|
|
)
|
|
|
- .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, WfTextbookClaim::getClaimType,
|
|
|
- wrapper -> wrapper
|
|
|
- .selectAs(DictionaryDetail::getName, HeadTeaLookClassBookCategoryDetailVo::getClaimTypeCn)
|
|
|
- )
|
|
|
- .eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
- .eq(WfTextbookClaim::getClassId, result.getClassId())
|
|
|
+ .eq(BaseClassAdminCourse::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
+ .eq(BaseClassAdminCourse::getClassId, result.getClassId())
|
|
|
;
|
|
|
List<HeadTeaLookClassBookCategoryDetailVo> courselList = baseClassAdminCourseMapper.selectJoinList(HeadTeaLookClassBookCategoryDetailVo.class, courseMPJLambdaWrapper);
|
|
|
|
|
|
-
|
|
|
- // 学生查看自己的教材来源于两个方面,一个是班级申领教材,一个是个人申领的教材
|
|
|
+ // 学生查看自己待领取的教材来源于两个方面,一个是班级申领教材,一个是个人申领的教材
|
|
|
// 班级申领教材
|
|
|
MPJLambdaWrapper<WfTextbookClaimItem> classMPJLambdaWrapper = new MPJLambdaWrapper<>();
|
|
|
classMPJLambdaWrapper
|
|
|
.disableSubLogicDel()
|
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, HeadTeaLookClassBookCategoryDetailVo::getTextbookId)
|
|
|
.selectAs(Textbook::getBookName, HeadTeaLookClassBookCategoryDetailVo::getBookName)
|
|
|
- .selectAs(Textbook::getPrice, HeadTeaLookClassBookCategoryDetailVo::getPrice)
|
|
|
+// .selectAs(Textbook::getPrice, HeadTeaLookClassBookCategoryDetailVo::getPrice)
|
|
|
.selectAs(Textbook::getTextbookType, HeadTeaLookClassBookCategoryDetailVo::getTextbookType)
|
|
|
.selectAs(WfTextbookClaimItem::getCreateDate, HeadTeaLookClassBookCategoryDetailVo::getClaimTime)
|
|
|
.selectAs(WfTextbookClaim::getClaimType, HeadTeaLookClassBookCategoryDetailVo::getClaimType)
|
|
|
@@ -282,7 +276,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.disableSubLogicDel()
|
|
|
.selectAs(WfTextbookClaimItem::getTextbookId, HeadTeaLookClassBookCategoryDetailVo::getTextbookId)
|
|
|
.selectAs(Textbook::getBookName, HeadTeaLookClassBookCategoryDetailVo::getBookName)
|
|
|
- .selectAs(Textbook::getPrice, HeadTeaLookClassBookCategoryDetailVo::getPrice)
|
|
|
+// .selectAs(Textbook::getPrice, HeadTeaLookClassBookCategoryDetailVo::getPrice)
|
|
|
.selectAs(Textbook::getTextbookType, HeadTeaLookClassBookCategoryDetailVo::getTextbookType)
|
|
|
.selectAs(WfTextbookClaimItem::getCreateDate, HeadTeaLookClassBookCategoryDetailVo::getClaimTime)
|
|
|
.selectAs(WfTextbookClaim::getClaimType, HeadTeaLookClassBookCategoryDetailVo::getClaimType)
|
|
|
@@ -305,7 +299,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
;
|
|
|
List<HeadTeaLookClassBookCategoryDetailVo> personalList = wfTextbookClaimItemMapper.selectJoinList(HeadTeaLookClassBookCategoryDetailVo.class, personalMPJLambdaWrapper);
|
|
|
|
|
|
- // 合并两个列表,如果有个人领取记录,应该保留个人的,移除班级的
|
|
|
+ // 合并两个列表,如果有个人申领记录,应该保留个人的,移除班级的
|
|
|
List<HeadTeaLookClassBookCategoryDetailVo> mergedDistinctList = new ArrayList<>(Stream.concat(classList.stream(), personalList.stream())
|
|
|
.collect(Collectors.toMap(
|
|
|
// 使用唯一标识作为 key
|
|
|
@@ -316,6 +310,11 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
))
|
|
|
.values()); // 转换回 List
|
|
|
|
|
|
+ // 如果申领教材列表为空,应该使用基础数据维护的
|
|
|
+ if(CollectionUtils.isEmpty(mergedDistinctList)){
|
|
|
+ mergedDistinctList = courselList;
|
|
|
+ }
|
|
|
+
|
|
|
// 获取当前学生当前学期所有已经领取的数据
|
|
|
LambdaQueryWrapper<TextbookStudentClaim> textbookStudentClaimLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
textbookStudentClaimLambdaQueryWrapper
|
|
|
@@ -356,8 +355,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
if (ObjectUtils.isNotEmpty(textbookStudentClaim)) {
|
|
|
vo.setTextbookStudentClaimId(textbookStudentClaim.getId());
|
|
|
vo.setIsClaim(textbookStudentClaim.getIsClaim());
|
|
|
+ vo.setPrice(textbookStudentClaim.getPrice());
|
|
|
} else {
|
|
|
vo.setIsClaim(0);
|
|
|
+ vo.setPrice(BigDecimal.ZERO);
|
|
|
}
|
|
|
if (ObjectUtils.isEmpty(vo.getPrice())) {
|
|
|
vo.setPrice(BigDecimal.ZERO);
|
|
|
@@ -512,9 +513,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
.collect(Collectors.toList()); // 转换为 List
|
|
|
|
|
|
for(Long textbookId : mergedKeyList){
|
|
|
- StudentSemesterTextbookVo studentClaimVo = studentClaimSemesterMap.get(textbookId);
|
|
|
- // 当教材没有确认领取记录的时候当前学期状态应该是待领取
|
|
|
- if(ObjectUtils.isEmpty(studentClaimVo)){
|
|
|
+ if(ObjectUtils.isEmpty(studentClaimSemesterMap) || ObjectUtils.isEmpty(studentClaimSemesterMap.get(textbookId))){
|
|
|
status = 1;
|
|
|
break;
|
|
|
}
|
|
|
@@ -820,6 +819,22 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Map<String, TextbookStudentClaim> byUserIdAndTextbookId = textbookStudentClaimList.stream()
|
|
|
.collect(Collectors.toMap(t -> "" + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
+ // 处理确认领取教材的价格
|
|
|
+ // 根据学期,班级获取申领教材信息
|
|
|
+ MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
|
+ wfTextbookClaimLambdaQueryWrapper
|
|
|
+ .selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
|
+ .selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
|
+ .innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
|
+ .innerJoin(TextbookIssueRecord.class, TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
+ .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, WfTextbookClaimItem::getWfTextbookClaimId)
|
|
|
+ .eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
+ .eq(WfTextbookClaim::getClassId, dto.getClassId())
|
|
|
+ ;
|
|
|
+ List<ClassClaimTextbookIssuePrice> classClaimTextbookIssuePrices = wfTextbookClaimMapper.selectJoinList(ClassClaimTextbookIssuePrice.class, wfTextbookClaimLambdaQueryWrapper);
|
|
|
+
|
|
|
+ Map<Long, BigDecimal> textBookPriceMap = classClaimTextbookIssuePrices.stream()
|
|
|
+ .collect(Collectors.toMap(ClassClaimTextbookIssuePrice::getTextbookId, ClassClaimTextbookIssuePrice::getPrice, (p1, p2) -> p2));
|
|
|
|
|
|
List<TextbookStudentClaim> insertList = new ArrayList<>();
|
|
|
List<TextbookStudentClaim> updateList = new ArrayList<>();
|
|
|
@@ -830,6 +845,10 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
|
for (Long textbookId : dto.getTextbookIds()) {
|
|
|
for (Long userId : dto.getUserIds()) {
|
|
|
+ BigDecimal price = BigDecimal.ZERO;
|
|
|
+ if(MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(textbookId))){
|
|
|
+ price = textBookPriceMap.get(textbookId);
|
|
|
+ }
|
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + userId + textbookId);
|
|
|
if (ObjectUtils.isNotEmpty(oldTextbookStudentClaim)) {
|
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
@@ -837,6 +856,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ updateTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
updateList.add(updateTextbookStudentClaim);
|
|
|
} else {
|
|
|
insertTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
@@ -847,6 +872,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ insertTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
insertList.add(insertTextbookStudentClaim);
|
|
|
}
|
|
|
}
|
|
|
@@ -903,6 +934,22 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Map<String, TextbookStudentClaim> byUserIdAndTextbookId = textbookStudentClaimList.stream()
|
|
|
.collect(Collectors.toMap(t -> "" + t.getBaseSemesterId() + t.getClassId() + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
+ // 根据学期,班级获取申领教材信息
|
|
|
+ MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
|
+ wfTextbookClaimLambdaQueryWrapper
|
|
|
+ .selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
|
+ .selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
|
+ .innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
|
+ .innerJoin(TextbookIssueRecord.class, TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
+ .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, WfTextbookClaimItem::getWfTextbookClaimId)
|
|
|
+ .in(WfTextbookClaim::getBaseSemesterId, baseSemesterIds)
|
|
|
+ .in(WfTextbookClaim::getClassId, classIds)
|
|
|
+ ;
|
|
|
+
|
|
|
+ List<ClassClaimTextbookIssuePrice> classClaimTextbookIssuePrices = wfTextbookClaimMapper.selectJoinList(ClassClaimTextbookIssuePrice.class, wfTextbookClaimLambdaQueryWrapper);
|
|
|
+
|
|
|
+ Map<Long, BigDecimal> textBookPriceMap = classClaimTextbookIssuePrices.stream()
|
|
|
+ .collect(Collectors.toMap(ClassClaimTextbookIssuePrice::getTextbookId, ClassClaimTextbookIssuePrice::getPrice, (p1, p2) -> p2));
|
|
|
|
|
|
List<TextbookStudentClaim> insertList = new ArrayList<>();
|
|
|
List<TextbookStudentClaim> updateList = new ArrayList<>();
|
|
|
@@ -912,12 +959,22 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Date nowDate = new Date();
|
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
|
for (TeacherConfirmDto dto : dtos) {
|
|
|
+ BigDecimal price = BigDecimal.ZERO;
|
|
|
+ if(MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(dto.getTextbookId()))){
|
|
|
+ price = textBookPriceMap.get(dto.getTextbookId());
|
|
|
+ }
|
|
|
if (ObjectUtils.isNotEmpty(dto.getTextbookStudentClaimId()) && dto.getTextbookStudentClaimId() != 0) {
|
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
updateTextbookStudentClaim.setId(dto.getTextbookStudentClaimId());
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ updateTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
updateList.add(updateTextbookStudentClaim);
|
|
|
} else {
|
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + dto.getBaseSemesterId() + dto.getClassId() + dto.getStudentUserId() + dto.getTextbookId());
|
|
|
@@ -927,6 +984,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ updateTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
updateList.add(updateTextbookStudentClaim);
|
|
|
} else {
|
|
|
insertTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
@@ -937,6 +1000,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ insertTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
insertList.add(insertTextbookStudentClaim);
|
|
|
}
|
|
|
}
|
|
|
@@ -994,6 +1063,22 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Map<String, TextbookStudentClaim> byUserIdAndTextbookId = textbookStudentClaimList.stream()
|
|
|
.collect(Collectors.toMap(t -> "" + t.getStudentUserId() + t.getTextbookId(), t -> t, (t1, t2) -> t1));
|
|
|
|
|
|
+ // 根据学期,班级获取申领教材信息
|
|
|
+ MPJLambdaWrapper<WfTextbookClaim> wfTextbookClaimLambdaQueryWrapper = new MPJLambdaWrapper<>();
|
|
|
+ wfTextbookClaimLambdaQueryWrapper
|
|
|
+ .selectAs(WfTextbookClaimItem::getTextbookId, ClassClaimTextbookIssuePrice::getTextbookId)
|
|
|
+ .selectAs(TextbookWarehouseRecord::getSubtotal, ClassClaimTextbookIssuePrice::getPrice)
|
|
|
+ .innerJoin(WfTextbookClaimItem.class, WfTextbookClaimItem::getWfTextbookClaimId, WfTextbookClaim::getId)
|
|
|
+ .innerJoin(TextbookIssueRecord.class, TextbookIssueRecord::getDataItemId, WfTextbookClaimItem::getId)
|
|
|
+ .innerJoin(TextbookWarehouseRecord.class, TextbookWarehouseRecord::getId, WfTextbookClaimItem::getWfTextbookClaimId)
|
|
|
+ .eq(WfTextbookClaim::getBaseSemesterId, dto.getBaseSemesterId())
|
|
|
+ .eq(WfTextbookClaim::getClassId, baseStudentSchoolRoll.getClassId())
|
|
|
+ ;
|
|
|
+ List<ClassClaimTextbookIssuePrice> classClaimTextbookIssuePrices = wfTextbookClaimMapper.selectJoinList(ClassClaimTextbookIssuePrice.class, wfTextbookClaimLambdaQueryWrapper);
|
|
|
+
|
|
|
+ Map<Long, BigDecimal> textBookPriceMap = classClaimTextbookIssuePrices.stream()
|
|
|
+ .collect(Collectors.toMap(ClassClaimTextbookIssuePrice::getTextbookId, ClassClaimTextbookIssuePrice::getPrice, (p1, p2) -> p2));
|
|
|
+
|
|
|
List<TextbookStudentClaim> insertList = new ArrayList<>();
|
|
|
List<TextbookStudentClaim> updateList = new ArrayList<>();
|
|
|
TextbookStudentClaim oldTextbookStudentClaim;
|
|
|
@@ -1002,12 +1087,22 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
Date nowDate = new Date();
|
|
|
Long loginUserId = StpUtil.getLoginIdAsLong();
|
|
|
for (StudentConfirmDetailDto studentConfirmDetailDto : dto.getStudentConfirmDetail()) {
|
|
|
+ BigDecimal price = BigDecimal.ZERO;
|
|
|
+ if(MapUtils.isNotEmpty(textBookPriceMap) && ObjectUtils.isNotEmpty(textBookPriceMap.get(studentConfirmDetailDto.getTextbookId()))){
|
|
|
+ price = textBookPriceMap.get(studentConfirmDetailDto.getTextbookId());
|
|
|
+ }
|
|
|
if (ObjectUtils.isNotEmpty(studentConfirmDetailDto.getTextbookStudentClaimId()) && studentConfirmDetailDto.getTextbookStudentClaimId() != 0) {
|
|
|
updateTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
updateTextbookStudentClaim.setId(studentConfirmDetailDto.getTextbookStudentClaimId());
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ updateTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
updateList.add(updateTextbookStudentClaim);
|
|
|
} else {
|
|
|
oldTextbookStudentClaim = byUserIdAndTextbookId.get("" + baseStudentSchoolRoll.getUserId() + studentConfirmDetailDto.getTextbookId());
|
|
|
@@ -1017,6 +1112,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
updateTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
updateTextbookStudentClaim.setModifyDate(nowDate);
|
|
|
updateTextbookStudentClaim.setModifyUserId(loginUserId);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ updateTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ updateTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
updateList.add(updateTextbookStudentClaim);
|
|
|
} else {
|
|
|
insertTextbookStudentClaim = new TextbookStudentClaim();
|
|
|
@@ -1027,6 +1128,12 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
insertTextbookStudentClaim.setIsClaim(dto.getIsClaim());
|
|
|
insertTextbookStudentClaim.setCreateDate(nowDate);
|
|
|
insertTextbookStudentClaim.setCreateUserId(loginUserId);
|
|
|
+ if(dto.getIsClaim() == 0){
|
|
|
+ insertTextbookStudentClaim.setPrice(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(dto.getIsClaim() == 1){
|
|
|
+ insertTextbookStudentClaim.setPrice(price);
|
|
|
+ }
|
|
|
insertList.add(insertTextbookStudentClaim);
|
|
|
}
|
|
|
}
|
|
|
@@ -1044,7 +1151,7 @@ public class TextbookStudentClaimServiceImpl extends MPJBaseServiceImpl<Textbook
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return null;
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
@Override
|