From 987088e7ee6318fbdfdeeaaf41c79a5dc8ef05c2 Mon Sep 17 00:00:00 2001 From: swb <jpy123456> Date: Wed, 11 Sep 2024 13:32:17 +0800 Subject: [PATCH] fix:job尘负荷排名补充提交 --- screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java index 6dd4799..703639c 100644 --- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java +++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java @@ -23,6 +23,7 @@ import com.moral.api.pojo.ext.allocation.AllocationExt; import com.moral.api.pojo.ext.allocation.AllocationListExt; import com.moral.api.pojo.ext.allocation.AllocationPageExt; +import com.moral.api.pojo.ext.responsibility.ResponsibilityUnitExt; import com.moral.api.pojo.query.allocation.*; import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond; import com.moral.api.pojo.query.app.AppAllocationFileCond; @@ -210,9 +211,13 @@ public Map<String, Object> selectUnitView(Map<String, Object> map) { QueryWrapper<Allocation> wrapper = new QueryWrapper<>(); //������������������ + List<Integer> list = this.unitResult(); if (!ObjectUtils.isEmpty(map.get("unitId"))){ - wrapper.in("unit_id",map.get("unitId").toString()); + String unitId = map.get("unitId").toString(); +// unitId.split(","); + List<String> list1 = Arrays.asList(unitId.split(",")); + wrapper.in("unit_id",list1); }else { if (!ObjectUtils.isEmpty(list)){ Integer integer = list.get(0); @@ -372,7 +377,11 @@ //������������������ List<Integer> list = this.unitResult(); if (!ObjectUtils.isEmpty(map.get("unitId"))){ - wrapper.in("unit_id",map.get("unitId").toString()); + String unitId = map.get("unitId").toString(); +// unitId.split(","); + List<String> list1 = Arrays.asList(unitId.split(",")); + wrapper.in("unit_id",list1); +// wrapper.in("unit_id",map.get("unitId").toString()); }else { if (!ObjectUtils.isEmpty(list)){ Integer integer = list.get(0); @@ -391,7 +400,7 @@ String endTime=null; if (!ObjectUtils.isEmpty(map.get("startTime")) || !ObjectUtils.isEmpty(map.get("endTime"))){ startTime = map.get("startTime").toString(); - endTime = map.get("endTime").toString(); + endTime = DateUtils.getDateOfDay(map.get("endTime").toString(), 1, DateUtils.yyyy_MM_dd_EN); } if (Integer.parseInt(number1.toString())>0){ @@ -1013,16 +1022,19 @@ @Override public Integer unitAreaCode() { + // 1 ��������� 0������ 2 ������������ QxUser user = UserHelper.getCurrentUser(); List<Integer> userList = responsibilityUnitMapper.selectCodeList(SysDictTypeEnum.SYS_JBD.getValue(),user.getUserId()); if(CollectionUtils.isNotEmpty(userList)){ return 1; } if(Objects.nonNull(user.getUnitId())&&user.getUnitId()!=0) { - String code = responsibilityUnitMapper.selectAreaCode(user.getUnitId()); - if (code.length() > 6) { + List<ResponsibilityUnitExt> codeList = responsibilityUnitMapper.selectResponsibilityUnitList(user.getUnitId()); + if ( codeList.get(0).getAreaCode().length() > 6) { return 0; - } else { + } else if(codeList.get(0).getAreaCode().length() == 6 && codeList.get(0).getParentCode().equals("320900")) { + return 0; + }else { return 2; } } -- Gitblit v1.8.0