|
@@ -234,7 +234,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
// 获取用户角色
|
|
// 获取用户角色
|
|
String roles = getRoleCodes();
|
|
String roles = getRoleCodes();
|
|
int roleFlag = 1; // 1 申请人 2 执行人 3 部门主管 4 部门负责人
|
|
int roleFlag = 1; // 1 申请人 2 执行人 3 部门主管 4 部门负责人
|
|
- if(userInfo.getSuperAdmin() != 1){
|
|
|
|
|
|
+ //if(userInfo.getSuperAdmin() != 1){
|
|
record.setDelUserId(userInfo.getUserId());
|
|
record.setDelUserId(userInfo.getUserId());
|
|
if(roles.contains(SysRoleCodeEnum.DEPT_LEADER.name())){
|
|
if(roles.contains(SysRoleCodeEnum.DEPT_LEADER.name())){
|
|
// 部门负责人(执行和申请)
|
|
// 部门负责人(执行和申请)
|
|
@@ -252,38 +252,40 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
// 申请人
|
|
// 申请人
|
|
record.setUserId(userInfo.getUserId());
|
|
record.setUserId(userInfo.getUserId());
|
|
}
|
|
}
|
|
- }
|
|
|
|
- //record.setTempUserId(userInfo.getUserId());
|
|
|
|
|
|
+ //}
|
|
if (record.getSearchType() != null && record.getStatus() == null) {
|
|
if (record.getSearchType() != null && record.getStatus() == null) {
|
|
List<Integer> statusList = new ArrayList<>();
|
|
List<Integer> statusList = new ArrayList<>();
|
|
if (record.getSearchType() == 1) { // 待派工单
|
|
if (record.getSearchType() == 1) { // 待派工单
|
|
statusList.add(PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue());
|
|
statusList.add(PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue());
|
|
record.setTempUserId(null);
|
|
record.setTempUserId(null);
|
|
record.setStatusList(statusList);
|
|
record.setStatusList(statusList);
|
|
- } else if (record.getSearchType() == 2) { // 待审核工单
|
|
|
|
|
|
+ } else if (record.getSearchType() == 2) { // 待办工单
|
|
switch (roleFlag){
|
|
switch (roleFlag){
|
|
case 1:
|
|
case 1:
|
|
- statusList.add(PreparationStatusEnum.FIRST_PROCESSING_VERIFYING.getValue());
|
|
|
|
|
|
+ statusList.add(PreparationStatusEnum.APPLY_MANAGER_VERIFY_BACK.getValue());
|
|
statusList.add(PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue());
|
|
statusList.add(PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue());
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
- statusList.add(PreparationStatusEnum.BLANK.getValue());
|
|
|
|
|
|
+ statusList.add(PreparationStatusEnum.SECOND_PROCESSING.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.PROCESSING.getValue());
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
statusList.add(PreparationStatusEnum.NOT_ALLOCATED.getValue());
|
|
statusList.add(PreparationStatusEnum.NOT_ALLOCATED.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.APPLY_LEADER_VERIFY_BACK.getValue());
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
statusList.add(PreparationStatusEnum.APPLY_MANAGER_VERIFY_SUCCESS.getValue());
|
|
statusList.add(PreparationStatusEnum.APPLY_MANAGER_VERIFY_SUCCESS.getValue());
|
|
statusList.add(PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue());
|
|
statusList.add(PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue());
|
|
|
|
+ statusList.add(PreparationStatusEnum.RECEIVE_VERIFY_BACK.getValue());
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
record.setStatusList(statusList);
|
|
record.setStatusList(statusList);
|
|
} else if (record.getSearchType() == 3) { // 我的工单
|
|
} else if (record.getSearchType() == 3) { // 我的工单
|
|
}
|
|
}
|
|
// 超级管理员可以看到各个状态下的所有数据 相关领导,可以在这里进行设置
|
|
// 超级管理员可以看到各个状态下的所有数据 相关领导,可以在这里进行设置
|
|
- if (userInfo.getSuperAdmin() == 1) {
|
|
|
|
|
|
+ /*if (userInfo.getSuperAdmin() == 1) {
|
|
record.setTempUserId(null);
|
|
record.setTempUserId(null);
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
}
|
|
}
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
return new MyPage(mapper.selectList(record));
|
|
return new MyPage(mapper.selectList(record));
|
|
@@ -457,6 +459,10 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
updPre.setRepairMinutes(DateUtils.getDurationHours(preparation.getRepairStartTime(), updPre.getRepairEndTime()));
|
|
updPre.setRepairMinutes(DateUtils.getDurationHours(preparation.getRepairStartTime(), updPre.getRepairEndTime()));
|
|
updPre.setStatus(PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue());
|
|
updPre.setStatus(PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue());
|
|
mapper.updateByPrimaryKeySelective(updPre);
|
|
mapper.updateByPrimaryKeySelective(updPre);
|
|
|
|
+ // 保存文件图片
|
|
|
|
+ if(model.getImageList() != null && model.getImageList().size() > 0){
|
|
|
|
+ sysFileService.saveFile(model.getId(), SysFileTypeEnum.PREPARATION_APPLICATION_IMGS.getValue(), model.getImageList());
|
|
|
|
+ }
|
|
// 添加状态记录
|
|
// 添加状态记录
|
|
addRecord(updPre,PreparationRecordTypeEnum.FLOW.getValue(), "");
|
|
addRecord(updPre,PreparationRecordTypeEnum.FLOW.getValue(), "");
|
|
// 给申请人发消息
|
|
// 给申请人发消息
|
|
@@ -888,7 +894,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
}
|
|
}
|
|
Preparation updPre = new Preparation();
|
|
Preparation updPre = new Preparation();
|
|
updPre.setId(model.getId());
|
|
updPre.setId(model.getId());
|
|
- updPre.setStatus(PreparationStatusEnum.FIRST_PROCESSING_VERIFYING.getValue());
|
|
|
|
|
|
+ updPre.setStatus(PreparationStatusEnum.SECOND_PROCESSING.getValue());
|
|
updPre.setFee(model.getFee());
|
|
updPre.setFee(model.getFee());
|
|
updPre.setFeeContent(model.getFeeContent());
|
|
updPre.setFeeContent(model.getFeeContent());
|
|
updPre.setRepairContent(model.getRepairContent());
|
|
updPre.setRepairContent(model.getRepairContent());
|
|
@@ -905,11 +911,11 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
// 添加审核记录
|
|
// 添加审核记录
|
|
addRecord(updPre,PreparationRecordTypeEnum.VERIFY.getValue(), "同意");
|
|
addRecord(updPre,PreparationRecordTypeEnum.VERIFY.getValue(), "同意");
|
|
// 给申请人发消息
|
|
// 给申请人发消息
|
|
- SysUserDTO sendDTO = new SysUserDTO();
|
|
|
|
|
|
+ /*SysUserDTO sendDTO = new SysUserDTO();
|
|
sendDTO.setUserId(preparation.getUserId());
|
|
sendDTO.setUserId(preparation.getUserId());
|
|
List<SysUserVO> sendUsers = sysUserMapper.getSysUserVO(sendDTO);
|
|
List<SysUserVO> sendUsers = sysUserMapper.getSysUserVO(sendDTO);
|
|
updPre.setNo(preparation.getNo());
|
|
updPre.setNo(preparation.getNo());
|
|
- sendMessageToApplyLeader(sendUsers, updPre);
|
|
|
|
|
|
+ sendMessageToApplyLeader(sendUsers, updPre);*/
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -922,7 +928,7 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
String roles = getRoleCodes();
|
|
String roles = getRoleCodes();
|
|
// 角色标识
|
|
// 角色标识
|
|
int roleFlag = 1; // 1 申请人 2 执行人 3 部门主管 4 部门负责人
|
|
int roleFlag = 1; // 1 申请人 2 执行人 3 部门主管 4 部门负责人
|
|
- if(userInfo.getSuperAdmin() != 1){
|
|
|
|
|
|
+ //if(userInfo.getSuperAdmin() != 1){
|
|
preparationDTO.setDelUserId(userInfo.getUserId());
|
|
preparationDTO.setDelUserId(userInfo.getUserId());
|
|
if(roles.contains(SysRoleCodeEnum.DEPT_LEADER.name())){
|
|
if(roles.contains(SysRoleCodeEnum.DEPT_LEADER.name())){
|
|
// 部门负责人(执行和申请)
|
|
// 部门负责人(执行和申请)
|
|
@@ -940,24 +946,27 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
// 申请人
|
|
// 申请人
|
|
preparationDTO.setUserId(userInfo.getUserId());
|
|
preparationDTO.setUserId(userInfo.getUserId());
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ //}
|
|
List<PreparationVO> preparationVOS = mapper.getCountByUserId(preparationDTO);
|
|
List<PreparationVO> preparationVOS = mapper.getCountByUserId(preparationDTO);
|
|
vo.setWaitVerifyNum(initNum);
|
|
vo.setWaitVerifyNum(initNum);
|
|
vo.setRefusedNum(initNum);
|
|
vo.setRefusedNum(initNum);
|
|
vo.setBackNum(initNum);
|
|
vo.setBackNum(initNum);
|
|
vo.setWorkingNum(initNum);
|
|
vo.setWorkingNum(initNum);
|
|
|
|
+ vo.setWaitHandleNum(initNum);
|
|
|
|
+ BigDecimal waitNum = initNum;
|
|
if(preparationVOS != null && preparationVOS.size() > 0){
|
|
if(preparationVOS != null && preparationVOS.size() > 0){
|
|
for(PreparationVO item : preparationVOS){
|
|
for(PreparationVO item : preparationVOS){
|
|
BigDecimal tempVal = item.getCounts() == null ? initNum : item.getCounts();
|
|
BigDecimal tempVal = item.getCounts() == null ? initNum : item.getCounts();
|
|
switch (roleFlag){
|
|
switch (roleFlag){
|
|
case 1: // 申请人
|
|
case 1: // 申请人
|
|
- if (item.getStatus() == PreparationStatusEnum.FIRST_PROCESSING_VERIFYING.getValue() ||
|
|
|
|
- item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue()){ // 待审核
|
|
|
|
|
|
+ if (item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING_VERIFYING.getValue()){ // 待审核
|
|
vo.setWaitVerifyNum(vo.getWaitVerifyNum().add(tempVal));
|
|
vo.setWaitVerifyNum(vo.getWaitVerifyNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}else if(item.getStatus() == PreparationStatusEnum.CLOSE.getValue()){ // 被拒工单
|
|
}else if(item.getStatus() == PreparationStatusEnum.CLOSE.getValue()){ // 被拒工单
|
|
vo.setRefusedNum(vo.getRefusedNum().add(tempVal));
|
|
vo.setRefusedNum(vo.getRefusedNum().add(tempVal));
|
|
}else if(item.getStatus() == PreparationStatusEnum.APPLY_MANAGER_VERIFY_BACK.getValue()){ // 回退
|
|
}else if(item.getStatus() == PreparationStatusEnum.APPLY_MANAGER_VERIFY_BACK.getValue()){ // 回退
|
|
vo.setBackNum(vo.getBackNum().add(tempVal));
|
|
vo.setBackNum(vo.getBackNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue()){
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue()){
|
|
// 执行工单
|
|
// 执行工单
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
@@ -972,15 +981,18 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue() || item.getStatus() == PreparationStatusEnum.PROCESSING.getValue()){
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue() || item.getStatus() == PreparationStatusEnum.PROCESSING.getValue()){
|
|
// 执行工单
|
|
// 执行工单
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 3: // 部门主管
|
|
case 3: // 部门主管
|
|
if (item.getStatus() == PreparationStatusEnum.NOT_ALLOCATED.getValue()){ // 待审核
|
|
if (item.getStatus() == PreparationStatusEnum.NOT_ALLOCATED.getValue()){ // 待审核
|
|
vo.setWaitVerifyNum(vo.getWaitVerifyNum().add(tempVal));
|
|
vo.setWaitVerifyNum(vo.getWaitVerifyNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}else if(item.getStatus() == PreparationStatusEnum.CLOSE.getValue()){ // 被拒工单
|
|
}else if(item.getStatus() == PreparationStatusEnum.CLOSE.getValue()){ // 被拒工单
|
|
vo.setRefusedNum(vo.getRefusedNum().add(tempVal));
|
|
vo.setRefusedNum(vo.getRefusedNum().add(tempVal));
|
|
}else if(item.getStatus() == PreparationStatusEnum.APPLY_LEADER_VERIFY_BACK.getValue()){ // 回退工单
|
|
}else if(item.getStatus() == PreparationStatusEnum.APPLY_LEADER_VERIFY_BACK.getValue()){ // 回退工单
|
|
vo.setBackNum(vo.getBackNum().add(tempVal));
|
|
vo.setBackNum(vo.getBackNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue()){
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue()){
|
|
// 执行工单
|
|
// 执行工单
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
@@ -991,10 +1003,12 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
if (item.getStatus() == PreparationStatusEnum.APPLY_MANAGER_VERIFY_SUCCESS.getValue() ||
|
|
if (item.getStatus() == PreparationStatusEnum.APPLY_MANAGER_VERIFY_SUCCESS.getValue() ||
|
|
item.getStatus() == PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue()){ // 待审核
|
|
item.getStatus() == PreparationStatusEnum.APPLY_LEADER_VERIFY_SUCCESS.getValue()){ // 待审核
|
|
vo.setWaitVerifyNum(vo.getWaitVerifyNum().add(tempVal));
|
|
vo.setWaitVerifyNum(vo.getWaitVerifyNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}else if(item.getStatus() == PreparationStatusEnum.CLOSE.getValue()){ // 被拒工单
|
|
}else if(item.getStatus() == PreparationStatusEnum.CLOSE.getValue()){ // 被拒工单
|
|
vo.setRefusedNum(vo.getRefusedNum().add(tempVal));
|
|
vo.setRefusedNum(vo.getRefusedNum().add(tempVal));
|
|
}else if(item.getStatus() == PreparationStatusEnum.RECEIVE_VERIFY_BACK.getValue()){ // 待审核
|
|
}else if(item.getStatus() == PreparationStatusEnum.RECEIVE_VERIFY_BACK.getValue()){ // 待审核
|
|
vo.setBackNum(vo.getBackNum().add(tempVal));
|
|
vo.setBackNum(vo.getBackNum().add(tempVal));
|
|
|
|
+ waitNum = waitNum.add(tempVal);
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue()){
|
|
}else if(item.getStatus() == PreparationStatusEnum.SECOND_PROCESSING.getValue()){
|
|
// 执行工单
|
|
// 执行工单
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
vo.setWorkingNum(vo.getWorkingNum().add(tempVal));
|
|
@@ -1003,6 +1017,8 @@ public class PreparationServiceImpl extends BaseServiceImpl<PreparationMapper, P
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 待办工单
|
|
|
|
+ vo.setWaitHandleNum(waitNum);
|
|
return vo;
|
|
return vo;
|
|
}
|
|
}
|
|
|
|
|