Browse Source

整改总合计调整

zhuang 11 months ago
parent
commit
b27cecd8e8

+ 4 - 2
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxProjectManageDao.java

@@ -42,8 +42,10 @@ public interface ZhcxProjectManageDao extends BaseMapper<ZhcxProjectManageDo> {
             "<if test='machineno !=null'>" +
             "AND x.MACHINENO=#{machineno}" +
             "</if>" +
-            "AND x.DEPTID is not null and " +
-            "x.STATUS is not null and x.IFOUTSIDEBASE in ('inside', 'outside')" +
+            " and x.STATUS is not null " +
+            "<if test='ifoutsidebase !=null'>" +
+            "AND x.DEPTID is not null and x.IFOUTSIDEBASE in ('inside', 'outside')" +
+            "</if>" +
             "</script>")
     List<ZhcxProjectRectifyMachineVo> getListData(Map<String, Object> map);
 }

+ 3 - 1
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxProjectManageServiceImpl.java

@@ -235,7 +235,7 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
             return Integer.compare(num1, num2);
         });
         rectifyReportDto.setNoList(machineNoList);
-
+        map.put("ifoutsidebase", true);
         list = this.getListData(map);
         // 根据一级部门分组
         Map<String, List<ZhcxProjectRectifyMachineVo>> groupFirstDeptList = list.stream()
@@ -343,6 +343,8 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
         RectifyDto AllRectifyDto = new RectifyDto();
         AllRectifyDto.setDeptid(null);
         AllRectifyDto.setDeptname("总合计");
+        map.remove("ifoutsidebase");
+        list = this.getListData(map);
         AllRectifyDto.setData(createRectifyMachineDtoList(list,null));
         rectifyDtoList.add(AllRectifyDto);
         rectifyDtoList.forEach(ev -> {