Commit 322d4a0163c47122a588a9881f7b5283981f0a3c

Authored by 颜惠青
1 parent f6df60d2

三海道路字典配置

urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/api/constant/BpmCommonConstant.java
@@ -181,6 +181,7 @@ public class BpmCommonConstant { @@ -181,6 +181,7 @@ public class BpmCommonConstant {
181 public static final String AI_DISPATCHER = "AI_dispatcher"; 181 public static final String AI_DISPATCHER = "AI_dispatcher";
182 /*养护级别-字典key*/ 182 /*养护级别-字典key*/
183 public static final String CONSERVE_LEVEL = "conserve_level"; 183 public static final String CONSERVE_LEVEL = "conserve_level";
  184 + public static final String SANHAI_COMPANY = "sanhai_compamys";
184 //--------------------------------------------------------------------------------- 185 //---------------------------------------------------------------------------------
185 186
186 /** 187 /**
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
@@ -57,5 +57,7 @@ public interface ErrorCodeConstants { @@ -57,5 +57,7 @@ public interface ErrorCodeConstants {
57 ErrorCode APP_AI_USER_ROLE_ERROR = new ErrorCode(1-900-004-004, "该登录人不是 AI工单派发人员,无法发起流程!"); 57 ErrorCode APP_AI_USER_ROLE_ERROR = new ErrorCode(1-900-004-004, "该登录人不是 AI工单派发人员,无法发起流程!");
58 58
59 ErrorCode APP_WORK_AI_ROLE_ILLEGLE = new ErrorCode(1-900-004-005, "该登录人即是 大区经理 角色,又是 AI工单派发人员,无法发起流程!"); 59 ErrorCode APP_WORK_AI_ROLE_ILLEGLE = new ErrorCode(1-900-004-005, "该登录人即是 大区经理 角色,又是 AI工单派发人员,无法发起流程!");
  60 +
  61 + ErrorCode SANHAI_COMPANY_NOT_EXISTS = new ErrorCode(1-900-004-006, "三海道路归属部门的id,字典项不存在!");
60 } 62 }
61 63
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmInspectorServiceImpl.java
@@ -297,8 +297,19 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{ @@ -297,8 +297,19 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{
297 297
298 @Override 298 @Override
299 public boolean isSanhai(Long companyId) { 299 public boolean isSanhai(Long companyId) {
  300 + List<DictDataRespDTO> dictData = dictDataCommonApi.getDictDataList(SANHAI_COMPANY);
  301 + if(null == dictData || dictData.size()==0){
  302 + throw exception(SANHAI_COMPANY_NOT_EXISTS);
  303 + }
300 List<Long> sanHaiRoadId = new ArrayList<>(); 304 List<Long> sanHaiRoadId = new ArrayList<>();
301 - sanHaiRoadId.add(115L); // TODO 目前写死 305 + for(DictDataRespDTO dto:dictData){
  306 + try {
  307 + sanHaiRoadId.add(Long.parseLong(dto.getValue()));
  308 + }catch (Exception e){
  309 + throw exception(SANHAI_COMPANY_NOT_EXISTS);
  310 + }
  311 + }
  312 + //sanHaiRoadId.add(115L); // 目前写死 ,上面改为从字典值获取258
302 //是否三海路段 313 //是否三海路段
303 boolean isSanhai = sanHaiRoadId.contains(companyId); 314 boolean isSanhai = sanHaiRoadId.contains(companyId);
304 return isSanhai; 315 return isSanhai;