|
@@ -12,6 +12,7 @@ import com.platform.common.constant.CommonConstants;
|
|
|
import com.platform.common.constant.RedisKeyConstants;
|
|
|
import com.platform.common.enums.DataFilterTypeEnum;
|
|
|
import com.platform.common.exception.BusinessException;
|
|
|
+import com.platform.common.exception.DeniedException;
|
|
|
import com.platform.common.model.UserInfo;
|
|
|
import com.platform.common.util.*;
|
|
|
import com.platform.dao.bean.MyVOPage;
|
|
@@ -146,7 +147,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
public MyVOPage<RepairApplicationFormVO> selectPageInfoVO(RepairApplicationFormDTO record, int pageNum, int pageSize) {
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
|
|
- if (record.getSearchType() != null) {
|
|
|
+ /*if (record.getSearchType() != null) {
|
|
|
// 获取报修人
|
|
|
if (record.getSearchType() == 1) {
|
|
|
if (record.getFilter() != null && DataFilterTypeEnum.SELF.getValue() == record.getFilter().intValue()) {
|
|
@@ -168,23 +169,38 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
record.setCheckUserId(userInfo.getUserId());
|
|
|
}
|
|
|
}
|
|
|
+ }*/
|
|
|
+
|
|
|
+ UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
|
+ record.setRepairUserId(userInfo.getUserId());
|
|
|
+ // 排除超级用户
|
|
|
+ String userNames = ConfigCache.getLabelByValueAllowNull(SysConfigEnum.REPAIR_SUPER_USERS.name());
|
|
|
+ if(StringUtils.isBlank(userNames)){
|
|
|
+ throw new DeniedException("请设置维修菜单的超级用户");
|
|
|
}
|
|
|
- if(record.getStatusSearchType() != null){
|
|
|
+ if(userNames.contains(userInfo.getUsername())){
|
|
|
+ record.setRepairUserId(null);
|
|
|
+ }
|
|
|
+ if(record.getSearchType() != null){
|
|
|
List<Integer> statusList = new ArrayList<>();
|
|
|
- if(record.getStatusSearchType() == 1){ // 待维修
|
|
|
+ if(record.getSearchType() == 1){ // 待分配
|
|
|
statusList.add(RepairApplicationFormStatusEnum.NOT_ALLOCATED.getValue());
|
|
|
+ record.setRepairUserId(null);
|
|
|
+ }
|
|
|
+ if(record.getSearchType() == 2){ // 待维修
|
|
|
statusList.add(RepairApplicationFormStatusEnum.PROCESSING.getValue());
|
|
|
}
|
|
|
- if(record.getStatusSearchType() == 2){ // 待审核
|
|
|
+ if(record.getSearchType() == 2){ // 待审核
|
|
|
statusList.add(RepairApplicationFormStatusEnum.WAIT_SUBMIT.getValue());
|
|
|
statusList.add(RepairApplicationFormStatusEnum.NOT_ACCEPTANCE.getValue());
|
|
|
}
|
|
|
- if(record.getStatusSearchType() == 3){ // 已完成
|
|
|
+ if(record.getSearchType() == 3){ // 已完成
|
|
|
statusList.add(RepairApplicationFormStatusEnum.FINISHED.getValue());
|
|
|
}
|
|
|
- if(record.getStatusSearchType() == 4){ // 已驳回
|
|
|
+ if(record.getSearchType() == 4){ // 已驳回
|
|
|
statusList.add(RepairApplicationFormStatusEnum.REBACK.getValue());
|
|
|
}
|
|
|
+ record.setStatusList(statusList);
|
|
|
}
|
|
|
return new MyVOPage<>(mapper.selectPageList(record));
|
|
|
}
|
|
@@ -437,6 +453,7 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
|
|
|
|
|
|
@Override
|
|
|
public void modModelByDTO(RepairApplicationFormDTO model) {
|
|
|
+ System.out.println("-----------委外--------------------"+JsonUtils.objectToJson(model));
|
|
|
if (StringUtils.isBlank(model.getSbId())) {
|
|
|
throw new BusinessException("请选择报修的设备");
|
|
|
}
|