From 174dbacfa2e91eb74ad2c38beeb6e73199db9381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E9=A3=9E?= Date: Wed, 18 Dec 2019 10:14:12 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item/service/impl/ItemServiceImpl.java | 3 ++ .../main/resources/mapper/item/ItemDao.xml | 28 +++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java index da857a386..d27844bb7 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java @@ -611,6 +611,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem //修改通知部门Id(街道Id) ItemInformationEntity itemInfoStreetDto = new ItemInformationEntity(); BeanUtils.copyProperties(itemInfoDto,itemInfoStreetDto); + itemInfoStreetDto.setId(null); Result result =adminFeignClient.getCompleteDept(entity.getGridId()); CompleteDeptDTO comDeptDto = result.getData(); itemInfoStreetDto.setDeptId(comDeptDto.getStreetId().toString()); @@ -635,6 +636,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem // 通知部门Id(被吹哨部门) ItemInformationEntity itemInfoEachDto = new ItemInformationEntity(); BeanUtils.copyProperties(itemInfoDto,itemInfoEachDto); + itemInfoEachDto.setId(null); itemInfoEachDto.setDeptId(itemDto.getDeptId().toString()); itemInformationService.insert(itemInfoEachDto); } @@ -647,6 +649,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem // 通知部门Id(被吹哨部门) ItemInformationEntity itemInfoEachDto = new ItemInformationEntity(); BeanUtils.copyProperties(itemInfoDto,itemInfoEachDto); + itemInfoEachDto.setId(null); itemInfoEachDto.setDeptId(itemDeptId.toString()); itemInformationService.insert(itemInfoEachDto); } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml index a3af458c4..d3bab7632 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml @@ -402,26 +402,24 @@ #{deptId} + + AND dept.DEPT_ID = #{gridId} + + + AND dept.DEPT_ID = #{streetId} + + + AND dept.DEPT_ID = #{communityId} + + ) temp ) AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} - - AND (item.GRID_ID = #{gridId} - OR find_in_set(#{gridId},item.ALL_DEPT_IDS)) - - - AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS) - OR find_in_set(#{streetId},item.ALL_DEPT_IDS)) - - - AND (find_in_set(#{communityId},item.PARENT_DEPT_IDS) - OR find_in_set(#{communityId},item.ALL_DEPT_IDS)) - - - AND item.ITEM_CODE like concat('%', #{itemCode}, '%') - + + AND item.ITEM_CODE like concat('%', #{itemCode}, '%') + ORDER BY item.CREATED_TIME DESC