|
|
@@ -413,57 +413,21 @@ public class WfTextbookClaimServiceImpl extends MPJBaseServiceImpl<WfTextbookCla
|
|
|
|
|
|
textbookIssueRecordMapper.insert(textbookIssueRecord);
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- WfTextbookClaim updateWfTextbookClaim = new WfTextbookClaim();
|
|
|
- updateWfTextbookClaim.setModifyUserId(StpUtil.getLoginIdAsLong());
|
|
|
- updateWfTextbookClaim.setModifyDate(new Date());
|
|
|
- updateWfTextbookClaim.setId(wfTextbookClaim.getId());
|
|
|
- if(claimTotalNum > issueTotalNum){
|
|
|
- updateWfTextbookClaim.setStatus(2);
|
|
|
- }
|
|
|
- if(claimTotalNum > issueTotalNum){
|
|
|
- updateWfTextbookClaim.setStatus(3);
|
|
|
- }
|
|
|
-
|
|
|
- //更新申领项中的已经发放数量
|
|
|
- wfTextbookClaimWfTextbookClaimMapper.updateById(updateWfTextbookClaim);
|
|
|
-
|
|
|
- // 当申领类型为学生的时候,为班级每个学生生成领取(确认信息)认领记录
|
|
|
-// if (ObjectUtil.isNotNull(wfTextbookClaim.getClaimType()) && wfTextbookClaim.getClaimType().equals(ClaimTypeEnum.ClaimStudent.getCode())) {
|
|
|
-// //查出班上的所有学生id
|
|
|
-// List<Long> userIdList = xjrUserMapper.getUserIdByClassId(wfTextbookClaim.getClassId());
|
|
|
-//
|
|
|
-// if (ObjectUtil.isNull(userIdList) && userIdList.size() == 0) {
|
|
|
-// throw new MyException("申领班级有误,请核实");
|
|
|
-// }
|
|
|
-// //验证当前领取教材是否已经生成领取记录
|
|
|
-// LambdaQueryWrapper<TextbookStudentClaim> queryWrapperRecord = new LambdaQueryWrapper<>();
|
|
|
-// queryWrapperRecord
|
|
|
-// .eq(TextbookStudentClaim::getTextbookId, wfTextbookClaimItem.getTextbookId())
|
|
|
-// .eq(TextbookStudentClaim::getClassId, wfTextbookClaim.getClassId());
|
|
|
-// Long count = textbookStudentClaimMapper.selectCount(queryWrapperRecord);
|
|
|
-// //为0的时候表示该班级该书没有生成领取记录
|
|
|
-// if(count <= 0){
|
|
|
-// for (Long userId : userIdList) {
|
|
|
-// textbookStudentClaimMapper.insert(new TextbookStudentClaim() {{
|
|
|
-// setCreateUserId(StpUtil.getLoginIdAsLong());
|
|
|
-// setCreateDate(new Date());
|
|
|
-// setStudentUserId(userId);
|
|
|
-// setBaseSemesterId(wfTextbookClaim.getBaseSemesterId());
|
|
|
-// setClassId(wfTextbookClaim.getClassId());
|
|
|
-// setTextbookId(wfTextbookClaimItem.getTextbookId());
|
|
|
-// }});
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+ WfTextbookClaim updateWfTextbookClaim = new WfTextbookClaim();
|
|
|
+ updateWfTextbookClaim.setModifyUserId(StpUtil.getLoginIdAsLong());
|
|
|
+ updateWfTextbookClaim.setModifyDate(new Date());
|
|
|
+ updateWfTextbookClaim.setId(wfTextbookClaim.getId());
|
|
|
+ if(claimTotalNum > issueTotalNum){
|
|
|
+ updateWfTextbookClaim.setStatus(2);
|
|
|
+ }
|
|
|
+ if(claimTotalNum > issueTotalNum){
|
|
|
+ updateWfTextbookClaim.setStatus(3);
|
|
|
}
|
|
|
- //更新申领的发放状态为已经发放
|
|
|
- wfTextbookClaimWfTextbookClaimItemMapper.updateById(new WfTextbookClaimItem() {{
|
|
|
- setModifyUserId(StpUtil.getLoginIdAsLong());
|
|
|
- setModifyDate(new Date());
|
|
|
- setId(wfTextbookClaimItem.getId());
|
|
|
- setIssueNumber(issueNumber + confirmNumber);
|
|
|
- }});
|
|
|
+
|
|
|
+ //更新申领项中的已经发放数量
|
|
|
+ wfTextbookClaimWfTextbookClaimMapper.updateById(updateWfTextbookClaim);
|
|
|
return true;
|
|
|
}
|
|
|
|