|
@@ -327,30 +327,31 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
}
|
|
|
return noticeNumberVO;
|
|
|
}
|
|
|
- private NoticeNumberVO addPrepationNums(NoticeNumberVO noticeNumberVO,PreparationDTO preparationDTO){
|
|
|
+ private void addPrepationNums(NoticeNumberVO noticeNumberVO,PreparationDTO preparationDTO){
|
|
|
List<PreparationVO> preparationVOS = preparationMapper.getCountByUserId(preparationDTO);
|
|
|
- for (PreparationVO vo:preparationVOS){
|
|
|
- if (vo.getStatus()==1){
|
|
|
- //待修
|
|
|
+ for (PreparationVO vo : preparationVOS){
|
|
|
+ if (vo.getStatus() == 1){
|
|
|
+ // 待修
|
|
|
noticeNumberVO.setNotDealNum(vo.getCounts()==null?initNum:vo.getCounts());
|
|
|
- }else if (vo.getStatus()==2){
|
|
|
- //维修中
|
|
|
+ }else if (vo.getStatus() == 2){
|
|
|
+ // 维修中
|
|
|
noticeNumberVO.setYesDealNum(vo.getCounts()==null?initNum:vo.getCounts());
|
|
|
}
|
|
|
- else if (vo.getStatus()==3){
|
|
|
- //待验收
|
|
|
- noticeNumberVO.setNotAcceptancedNum(vo.getCounts()==null?initNum:vo.getCounts());
|
|
|
+ else if (vo.getStatus() == 3){
|
|
|
+ // 已完成
|
|
|
+ noticeNumberVO.setFinishNum(vo.getCounts() == null ? initNum : vo.getCounts());
|
|
|
+ //noticeNumberVO.setNotAcceptancedNum(vo.getCounts()==null?initNum:vo.getCounts());
|
|
|
}
|
|
|
- else if (vo.getStatus()==4){
|
|
|
+ /*else if (vo.getStatus()==4){
|
|
|
//驳回
|
|
|
noticeNumberVO.setReturnNum(vo.getCounts()==null?initNum:vo.getCounts());
|
|
|
}
|
|
|
else if (vo.getStatus()==5){
|
|
|
//已完成
|
|
|
noticeNumberVO.setFinishNum(vo.getCounts()==null?initNum:vo.getCounts());
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
- return null;
|
|
|
+ noticeNumberVO.setReturnNum(noticeNumberVO.getNotDealNum().add(noticeNumberVO.getYesDealNum()).add(noticeNumberVO.getFinishNum()));
|
|
|
}
|
|
|
@Override
|
|
|
public NoticeNumberVO getNoticeNumberVO() {
|
|
@@ -366,7 +367,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
StringBuffer sb=new StringBuffer();
|
|
|
CheckJobDTO checkJobDTO=new CheckJobDTO();
|
|
|
checkJobDTO.setType(2);
|
|
|
- //先统计待接单(NOT_ALLOCATED(1))数量,所有人都能看到
|
|
|
+ // 先统计待接单(NOT_ALLOCATED(1))数量,所有人都能看到
|
|
|
repairApplicationFormDTO.setStatus(RepairApplicationFormStatusEnum.NOT_ALLOCATED.getValue());
|
|
|
repairApplicationFormVOS= mapper.getRepairCount(repairApplicationFormDTO);
|
|
|
repairApplicationFormDTO=new RepairApplicationFormDTO();
|
|
@@ -375,7 +376,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
noticeNumberVO.setWaitForReceiveNum(vo.getRepairCount());
|
|
|
}
|
|
|
}
|
|
|
- if(userInfo.getSuperAdmin()==1){//超级管理员
|
|
|
+ if(userInfo.getSuperAdmin()==1){ //超级管理员
|
|
|
noticeNumberVO.setRoleFlag(0);
|
|
|
repairApplicationFormVOS= mapper.getRepairCount(null);
|
|
|
checkJobVOS=checkJobMapper.getCheckJobCount1(checkJobDTO);
|
|
@@ -480,7 +481,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
noticeNumberVO.setRoleFlag(4);
|
|
|
noticeNumberVO=addStoreNums(noticeNumberVO,inStoreFormDTO,outStoreFormDTO,storeCheckJobDTO);
|
|
|
}
|
|
|
- else if (sb.toString().contains(SysRoleCodeEnum.PREPARATION_MANAGER.name())){
|
|
|
+ /*else if (sb.toString().contains(SysRoleCodeEnum.PREPARATION_MANAGER.name())){
|
|
|
//筹建主管-- dispatchUserId
|
|
|
noticeNumberVO.setRoleFlag(8);
|
|
|
PreparationDTO preparationDTO = new PreparationDTO();
|
|
@@ -493,20 +494,13 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
PreparationDTO preparationDTO = new PreparationDTO();
|
|
|
preparationDTO.setRepairUserId(userInfo.getUserId());
|
|
|
addPrepationNums(noticeNumberVO,preparationDTO);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
-
|
|
|
- //待办
|
|
|
- //待签收
|
|
|
-// MyPage<ActApplyInfo> myPage = (MyPage<ActApplyInfo>)(activitiController.showTaskListClaim(1,10).getData());
|
|
|
-// noticeNumberVO.setWaitForSignInNum(new BigDecimal(myPage.getTotal()));
|
|
|
-// //待审批
|
|
|
-// MyPage<ActApplyInfo> myPage1=(MyPage<ActApplyInfo>)(activitiController.showTaskList(1,10).getData());
|
|
|
-// noticeNumberVO.setWaitForExamineNum(new BigDecimal(myPage1.getTotal()));
|
|
|
-// //通知
|
|
|
-//// BigDecimal num=workplaceBacklogMapper.getWorkplaceBacklogCount("1");
|
|
|
- BigDecimal num=workplaceBacklogMapper.getWorkplaceBacklogCount(userInfo.getUserId());
|
|
|
- Long t2=System.currentTimeMillis();
|
|
|
+ // 筹建统计数据,不区分角色
|
|
|
+ PreparationDTO preparationDTO = new PreparationDTO();
|
|
|
+ addPrepationNums(noticeNumberVO,preparationDTO);
|
|
|
+ // 通知
|
|
|
+ BigDecimal num = workplaceBacklogMapper.getWorkplaceBacklogCount(userInfo.getUserId());
|
|
|
noticeNumberVO.setUnreadNum(num);
|
|
|
return noticeNumberVO;
|
|
|
}
|