|
@@ -103,6 +103,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
preparationNumVO.setTotalFee(totalFee);
|
|
preparationNumVO.setTotalFee(totalFee);
|
|
preparationNumVO.setPositionName(positionName);
|
|
preparationNumVO.setPositionName(positionName);
|
|
preparationNumVO.setDetailList(detailList);
|
|
preparationNumVO.setDetailList(detailList);
|
|
|
|
+ preparationNumVO.setPositionId(id);
|
|
exportPreparationNumVOS.add(preparationNumVO);
|
|
exportPreparationNumVOS.add(preparationNumVO);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -138,78 +139,18 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
dto.setCreatedTimeEnd(searchStartTime);
|
|
dto.setCreatedTimeEnd(searchStartTime);
|
|
dto.setCreatedTimeEnd(searchEndTime);
|
|
dto.setCreatedTimeEnd(searchEndTime);
|
|
List<PreparationVO> list = mapper.selectList(dto);
|
|
List<PreparationVO> list = mapper.selectList(dto);
|
|
- List<PreparationReportByStatusVO> result = new ArrayList<>();
|
|
|
|
- Integer draftNum = 0;
|
|
|
|
- Integer waiting_allocationNum = 0;
|
|
|
|
- Integer allocationedNum = 0;
|
|
|
|
- Integer complatedNum = 0;
|
|
|
|
- Integer revokedNum = 0;
|
|
|
|
- PreparationReportByStatusVO draft = new PreparationReportByStatusVO();
|
|
|
|
- PreparationReportByStatusVO waiting = new PreparationReportByStatusVO();
|
|
|
|
- PreparationReportByStatusVO allocationed = new PreparationReportByStatusVO();
|
|
|
|
- PreparationReportByStatusVO complated = new PreparationReportByStatusVO();
|
|
|
|
- PreparationReportByStatusVO revoked = new PreparationReportByStatusVO();
|
|
|
|
- List<PreparationVO> draftList = new ArrayList<>();
|
|
|
|
- List<PreparationVO> waitingList = new ArrayList<>();
|
|
|
|
- List<PreparationVO> allocationedList = new ArrayList<>();
|
|
|
|
- List<PreparationVO> complatedList = new ArrayList<>();
|
|
|
|
- List<PreparationVO> revokedList = new ArrayList<>();
|
|
|
|
- for (PreparationVO vo : list) {
|
|
|
|
- if (DictCache.getValueByCode("REPAIR_PREPARATION_STATUS", "draft").equals(vo.getStatus())) {
|
|
|
|
- draft.setStatusName("草稿");
|
|
|
|
- draftList.add(vo);
|
|
|
|
- draft.setStatus(0);
|
|
|
|
- draftNum++;
|
|
|
|
- } else if (DictCache.getValueByCode("REPAIR_PREPARATION_STATUS", "waiting_allocation").equals(vo.getStatus())) {
|
|
|
|
- waiting.setStatusName("待分配");
|
|
|
|
- waitingList.add(vo);
|
|
|
|
- waiting.setStatus(1);
|
|
|
|
- waiting_allocationNum++;
|
|
|
|
- } else if (DictCache.getValueByCode("REPAIR_PREPARATION_STATUS", "allocationed").equals(vo.getStatus())) {
|
|
|
|
- allocationed.setStatusName("已分配");
|
|
|
|
- allocationedList.add(vo);
|
|
|
|
- allocationed.setStatus(2);
|
|
|
|
- allocationedNum++;
|
|
|
|
- } else if (DictCache.getValueByCode("REPAIR_PREPARATION_STATUS", "complated").equals(vo.getStatus())) {
|
|
|
|
- complated.setStatusName("已完成");
|
|
|
|
- complatedList.add(vo);
|
|
|
|
- complated.setStatus(3);
|
|
|
|
- complatedNum++;
|
|
|
|
- } else if (DictCache.getValueByCode("REPAIR_PREPARATION_STATUS", "revoked").equals(vo.getStatus())) {
|
|
|
|
- revoked.setStatusName("已撤销");
|
|
|
|
- revokedList.add(vo);
|
|
|
|
- revoked.setStatus(4);
|
|
|
|
- revokedNum++;
|
|
|
|
- }
|
|
|
|
|
|
+ List<PreparationReportByStatusVO> preparationReportByStatusVOS = mapper.getPreparationReportByStatusVO(dto);
|
|
|
|
+ for (PreparationReportByStatusVO statusVO:preparationReportByStatusVOS){
|
|
|
|
+ List<PreparationVO> detailList = new ArrayList<>();
|
|
|
|
|
|
|
|
+ for (PreparationVO preparationVO:list){
|
|
|
|
+ if (preparationVO.getStatus().equals(statusVO.getStatus())){
|
|
|
|
+ detailList.add(preparationVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ statusVO.setDetailList(detailList);
|
|
}
|
|
}
|
|
- List<PreparationReportByStatusVO> list1 = new ArrayList<>();
|
|
|
|
- if (draftNum != 0) {
|
|
|
|
- draft.setNum(draftNum);
|
|
|
|
- draft.setDetailList(draftList);
|
|
|
|
- list1.add(draft);
|
|
|
|
- }
|
|
|
|
- if (waiting_allocationNum != 0) {
|
|
|
|
- waiting.setNum(waiting_allocationNum);
|
|
|
|
- waiting.setDetailList(waitingList);
|
|
|
|
- list1.add(waiting);
|
|
|
|
- }
|
|
|
|
- if (allocationedNum != 0) {
|
|
|
|
- allocationed.setNum(allocationedNum);
|
|
|
|
- allocationed.setDetailList(allocationedList);
|
|
|
|
- list1.add(allocationed);
|
|
|
|
- }
|
|
|
|
- if (complatedNum != 0) {
|
|
|
|
- complated.setNum(complatedNum);
|
|
|
|
- complated.setDetailList(complatedList);
|
|
|
|
- list1.add(complated);
|
|
|
|
- }
|
|
|
|
- if (revokedNum != 0) {
|
|
|
|
- revoked.setNum(revokedNum);
|
|
|
|
- revoked.setDetailList(revokedList);
|
|
|
|
- list1.add(revoked);
|
|
|
|
- }
|
|
|
|
- return list1;
|
|
|
|
|
|
+ return preparationReportByStatusVOS;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -242,6 +183,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
List<AllPreparationReportVO> result = new ArrayList<AllPreparationReportVO>();
|
|
List<AllPreparationReportVO> result = new ArrayList<AllPreparationReportVO>();
|
|
|
|
|
|
for (Map<String, LocalDateTime> map : monthStartAndEndList) {
|
|
for (Map<String, LocalDateTime> map : monthStartAndEndList) {
|
|
|
|
+ BigDecimal totalFee = new BigDecimal(0);
|
|
int i = 0;
|
|
int i = 0;
|
|
AllPreparationReportVO vo = new AllPreparationReportVO();
|
|
AllPreparationReportVO vo = new AllPreparationReportVO();
|
|
List<PreparationVO> detailList = new ArrayList<PreparationVO>();
|
|
List<PreparationVO> detailList = new ArrayList<PreparationVO>();
|
|
@@ -251,10 +193,14 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
if (preparationVO.getApplyTime().isAfter(map.get("searchStartTimeMonth")) && preparationVO.getApplyTime().isBefore(map.get("searchEndTimeMonth"))) {
|
|
if (preparationVO.getApplyTime().isAfter(map.get("searchStartTimeMonth")) && preparationVO.getApplyTime().isBefore(map.get("searchEndTimeMonth"))) {
|
|
i++;
|
|
i++;
|
|
// 维修专业
|
|
// 维修专业
|
|
-
|
|
|
|
|
|
+ if (preparationVO.getFee()==null){
|
|
|
|
+ preparationVO.setFee(new BigDecimal(0));
|
|
|
|
+ }
|
|
detailList.add(preparationVO);
|
|
detailList.add(preparationVO);
|
|
|
|
+ totalFee = totalFee.add(preparationVO.getFee()==null?new BigDecimal(0):preparationVO.getFee());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ vo.setTotalFee(totalFee);
|
|
vo.setNum(i);
|
|
vo.setNum(i);
|
|
vo.setDetailList(detailList);
|
|
vo.setDetailList(detailList);
|
|
result.add(vo);
|
|
result.add(vo);
|
|
@@ -499,9 +445,16 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
record.setTempUserId(userInfo.getUserId());
|
|
record.setTempUserId(userInfo.getUserId());
|
|
- /*if(record.getStatus() != null && record.getStatus() == -1){
|
|
|
|
|
|
+ if(record.getStatus() != null && record.getStatus() == 99){
|
|
|
|
+ List<Integer> statusList = ListUtils.newArrayList();
|
|
|
|
+ statusList.add(PreparationStatusEnum.NOT_ALLOCATED.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.APPLY_MANAGER_VERIFY_SUCCESS.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.FIRST_PROCESSING_VERIFYING.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue());
|
|
|
|
+ record.setStatusList(statusList);
|
|
record.setStatus(null);
|
|
record.setStatus(null);
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
return new MyPage(mapper.selectList(record));
|
|
return new MyPage(mapper.selectList(record));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -590,8 +543,10 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
// 修改进度状态
|
|
// 修改进度状态
|
|
mapper.updateByPrimaryKeySelective(updPre);
|
|
mapper.updateByPrimaryKeySelective(updPre);
|
|
// 发送消息
|
|
// 发送消息
|
|
- List<SysUserVO> userVOS = sysUserMapper.getSysUserVO(queryDTO);
|
|
|
|
- sendMessageToApplyLeader(userVOS, preparation);
|
|
|
|
|
|
+ if(!StringUtils.isEmpty(queryDTO.getUserId())){
|
|
|
|
+ List<SysUserVO> userVOS = sysUserMapper.getSysUserVO(queryDTO);
|
|
|
|
+ sendMessageToApplyLeader(userVOS, preparation);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|