Browse Source

bug修改

dev
李鹏飞 6 years ago
parent
commit
2dd09e76bb
  1. 11
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java
  2. 23
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

11
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java

@ -117,6 +117,17 @@ public class ItemServiceImpl extends BaseServiceImpl<ItemDao, ItemEntity> implem
if (null == user) {
throw new RuntimeException("获取用户信息失败");
}
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(user.getTypeKey())) {
if (params.get("streetId") != null && !"".equals(params.get("streetId"))) {
Result<SysDeptDTO> resultdept = adminFeignClient.getSysDeptInfo(Long.parseLong(params.get("streetId").toString()));
SysDeptDTO dept =resultdept.getData();
Object deptId = params.get("streetId");
if (OrganizationTypeConstant.ORG_TYPE_DISTRICT_DEPT.equals(dept.getTypeKey())) {
params.put("districtDeptId",deptId);
params.remove("streetId");
}
}
}
//部门ID列表
List<Long> deptIdList = new ArrayList<>();
// 判断是否为网格,不为网格只能查看本部门下的项目数据

23
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml

@ -402,21 +402,26 @@
#{deptId}
</foreach>
</if>
<if test="gridId != null and gridId != ''">
AND dept.DEPT_ID = #{gridId}
<if test="districtDeptId != null and districtDeptId != ''">
AND dept.DEPT_ID = #{districtDeptId}
</if>
<if test="streetId != null and streetId != ''">
AND dept.DEPT_ID = #{streetId}
</if>
<if test="communityId != null and communityId != ''">
AND dept.DEPT_ID = #{communityId}
</if>
) temp
)
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND DATE_FORMAT( item.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
</if>
<if test="gridId != null and gridId != ''">
AND (item.GRID_ID = #{gridId}
OR find_in_set(#{gridId},item.ALL_DEPT_IDS))
</if>
<if test="streetId != null and streetId != ''">
AND (find_in_set(#{streetId},item.PARENT_DEPT_IDS)
OR find_in_set(#{streetId},item.ALL_DEPT_IDS))
</if>
<if test="communityId != null and communityId != ''">
AND (find_in_set(#{communityId},item.PARENT_DEPT_IDS)
OR find_in_set(#{communityId},item.ALL_DEPT_IDS))
</if>
<if test="itemCode != null and itemCode != ''">
AND item.ITEM_CODE like concat('%', #{itemCode}, '%')
</if>

Loading…
Cancel
Save