Merge remote-tracking branch 'origin/master' into master
正在显示
6 个修改的文件
包含
26 行增加
和
13 行删除
... | @@ -514,6 +514,8 @@ public class EquipmentController { | ... | @@ -514,6 +514,8 @@ public class EquipmentController { |
514 | String energyLevel = equipmentDTO.getEquipmentInfo().getEnergyLevel();//能耗等级 | 514 | String energyLevel = equipmentDTO.getEquipmentInfo().getEnergyLevel();//能耗等级 |
515 | //Integer isSpecial = equipmentDTO.getEquipmentInfo().getIsSpecial(); | 515 | //Integer isSpecial = equipmentDTO.getEquipmentInfo().getIsSpecial(); |
516 | String isMeterage = equipmentDTO.getEquipmentInfo().getIsMeterage();//是否计量设备 | 516 | String isMeterage = equipmentDTO.getEquipmentInfo().getIsMeterage();//是否计量设备 |
517 | String orderFiled = equipmentDTO.getOrderFiled(); | ||
518 | boolean orderType = equipmentDTO.isOrderType(); | ||
517 | 519 | ||
518 | List<String> equipmentLevelList = null; | 520 | List<String> equipmentLevelList = null; |
519 | Base base = BaseFactory.JOIN().select(EquipmentAsset.class).select(EquipmentInfo.class).select(EquipmentBrand.class).select(EquipmentCategory.class) | 521 | Base base = BaseFactory.JOIN().select(EquipmentAsset.class).select(EquipmentInfo.class).select(EquipmentBrand.class).select(EquipmentCategory.class) |
... | @@ -540,8 +542,12 @@ public class EquipmentController { | ... | @@ -540,8 +542,12 @@ public class EquipmentController { |
540 | .like(StringUtils.isNotEmpty(equipmentCode), "equipment_code", equipmentCode) | 542 | .like(StringUtils.isNotEmpty(equipmentCode), "equipment_code", equipmentCode) |
541 | .eq(StringUtils.isNotEmpty(equipmentStatus), "equipment_status", equipmentStatus) | 543 | .eq(StringUtils.isNotEmpty(equipmentStatus), "equipment_status", equipmentStatus) |
542 | .like(StringUtils.isNotEmpty(installPosition), EquipmentInfo::getInstallPosition, installPosition) | 544 | .like(StringUtils.isNotEmpty(installPosition), EquipmentInfo::getInstallPosition, installPosition) |
543 | .eq(StringUtils.isNotEmpty(equipmentDTO.getEquipmentInfo().getId()), "equipment_info.id", equipmentDTO.getEquipmentInfo().getId()) | 545 | .eq(StringUtils.isNotEmpty(equipmentDTO.getEquipmentInfo().getId()), "equipment_info.id", equipmentDTO.getEquipmentInfo().getId()); |
544 | .orderBy(true,false,"equipment_info.create_time"); | 546 | if (StringUtils.isNotEmpty(orderFiled)) { |
547 | base.orderBy(true,orderType,"equipment_info." + orderFiled); | ||
548 | }else { | ||
549 | base.orderBy(true,false,"equipment_info.create_time"); | ||
550 | } | ||
545 | Page<Map<String, Object>> mapPage = (Page<Map<String, Object>>) base.queryForPage(new Page<>(equipmentDTO.getPageNo(), equipmentDTO.getPageSize())); | 551 | Page<Map<String, Object>> mapPage = (Page<Map<String, Object>>) base.queryForPage(new Page<>(equipmentDTO.getPageNo(), equipmentDTO.getPageSize())); |
546 | 552 | ||
547 | // 转义 | 553 | // 转义 | ... | ... |
... | @@ -19,8 +19,9 @@ public class EquipmentDTO { | ... | @@ -19,8 +19,9 @@ public class EquipmentDTO { |
19 | private EquipmentAsset equipmentAsset = new EquipmentAsset(); | 19 | private EquipmentAsset equipmentAsset = new EquipmentAsset(); |
20 | private EquipmentInfo equipmentInfo = new EquipmentInfo(); | 20 | private EquipmentInfo equipmentInfo = new EquipmentInfo(); |
21 | private List<EquipmentInfoExtParam> equipmentInfoExtParams = new ArrayList<EquipmentInfoExtParam>(); | 21 | private List<EquipmentInfoExtParam> equipmentInfoExtParams = new ArrayList<EquipmentInfoExtParam>(); |
22 | |||
23 | private Long pageNo = 1L; | 22 | private Long pageNo = 1L; |
24 | private Long pageSize = 10L; | 23 | private Long pageSize = 10L; |
24 | private String orderFiled;//排序字段 | ||
25 | private boolean orderType;//排序类型,true:升序,false:降序 | ||
25 | 26 | ||
26 | } | 27 | } | ... | ... |
... | @@ -158,7 +158,7 @@ public class InspectionAnalysisController { | ... | @@ -158,7 +158,7 @@ public class InspectionAnalysisController { |
158 | @GetMapping("/getInspectionTaskIndicators") | 158 | @GetMapping("/getInspectionTaskIndicators") |
159 | public Result<InspectionTaskIndicatorsVO> getInspectionTaskIndicators(String startDate,String endDate){ | 159 | public Result<InspectionTaskIndicatorsVO> getInspectionTaskIndicators(String startDate,String endDate){ |
160 | Result<InspectionTaskIndicatorsVO> result = new Result<>(); | 160 | Result<InspectionTaskIndicatorsVO> result = new Result<>(); |
161 | InspectionTaskIndicatorsVO inspectionTaskIndicatorsVO = inspectionAnalysisService.getInspectionTaskIndicators(startDate,endDate); | 161 | InspectionTaskIndicatorsVO inspectionTaskIndicatorsVO = inspectionAnalysisService.getInspectionTaskIndicatorsNew(startDate,endDate); |
162 | result.setSuccess(true); | 162 | result.setSuccess(true); |
163 | result.setResult(inspectionTaskIndicatorsVO); | 163 | result.setResult(inspectionTaskIndicatorsVO); |
164 | return result; | 164 | return result; |
... | @@ -188,7 +188,7 @@ public class InspectionAnalysisController { | ... | @@ -188,7 +188,7 @@ public class InspectionAnalysisController { |
188 | @GetMapping("/getInspectionTaskOverview") | 188 | @GetMapping("/getInspectionTaskOverview") |
189 | public Result<InspectionTaskOverviewVO> getInspectionTaskOverview(String startDate, String endDate){ | 189 | public Result<InspectionTaskOverviewVO> getInspectionTaskOverview(String startDate, String endDate){ |
190 | Result<InspectionTaskOverviewVO> result = new Result<>(); | 190 | Result<InspectionTaskOverviewVO> result = new Result<>(); |
191 | InspectionTaskOverviewVO inspectionTaskIndicatorVO = inspectionAnalysisService.getInspectionTaskOverview(startDate,endDate); | 191 | InspectionTaskOverviewVO inspectionTaskIndicatorVO = inspectionAnalysisService.getInspectionTaskOverviewNew(startDate,endDate); |
192 | result.setSuccess(true); | 192 | result.setSuccess(true); |
193 | result.setResult(inspectionTaskIndicatorVO); | 193 | result.setResult(inspectionTaskIndicatorVO); |
194 | return result; | 194 | return result; |
... | @@ -221,7 +221,7 @@ public class InspectionAnalysisController { | ... | @@ -221,7 +221,7 @@ public class InspectionAnalysisController { |
221 | @GetMapping("/getInspectionEquipIndicators") | 221 | @GetMapping("/getInspectionEquipIndicators") |
222 | public Result<InspectionEquipIndicatorsVO> getInspectionEquipIndicators(String startDate, String endDate){ | 222 | public Result<InspectionEquipIndicatorsVO> getInspectionEquipIndicators(String startDate, String endDate){ |
223 | Result<InspectionEquipIndicatorsVO> result = new Result<>(); | 223 | Result<InspectionEquipIndicatorsVO> result = new Result<>(); |
224 | InspectionEquipIndicatorsVO inspectionEquipIndicatorsVO = inspectionAnalysisService.getInspectionEquipIndicators(startDate,endDate); | 224 | InspectionEquipIndicatorsVO inspectionEquipIndicatorsVO = inspectionAnalysisService.getInspectionEquipIndicatorsNew(startDate,endDate); |
225 | result.setSuccess(true); | 225 | result.setSuccess(true); |
226 | result.setResult(inspectionEquipIndicatorsVO); | 226 | result.setResult(inspectionEquipIndicatorsVO); |
227 | return result; | 227 | return result; |
... | @@ -251,7 +251,7 @@ public class InspectionAnalysisController { | ... | @@ -251,7 +251,7 @@ public class InspectionAnalysisController { |
251 | @GetMapping("/getInspectionEquipOverview") | 251 | @GetMapping("/getInspectionEquipOverview") |
252 | public Result<InspectionEquipOverviewVO> getInspectionEquipOverview(String startDate, String endDate){ | 252 | public Result<InspectionEquipOverviewVO> getInspectionEquipOverview(String startDate, String endDate){ |
253 | Result<InspectionEquipOverviewVO> result = new Result<>(); | 253 | Result<InspectionEquipOverviewVO> result = new Result<>(); |
254 | InspectionEquipOverviewVO inspectionEquipOverviewVO = inspectionAnalysisService.getInspectionEquipOverview(startDate,endDate); | 254 | InspectionEquipOverviewVO inspectionEquipOverviewVO = inspectionAnalysisService.getInspectionEquipOverviewNew(startDate,endDate); |
255 | result.setSuccess(true); | 255 | result.setSuccess(true); |
256 | result.setResult(inspectionEquipOverviewVO); | 256 | result.setResult(inspectionEquipOverviewVO); |
257 | return result; | 257 | return result; | ... | ... |
... | @@ -26,9 +26,12 @@ public interface InspectionPointFillGroupMapper extends BaseMapper<InspectionPoi | ... | @@ -26,9 +26,12 @@ public interface InspectionPointFillGroupMapper extends BaseMapper<InspectionPoi |
26 | "\tleft join inspection_fill_choice ifc on ifi.id = ifc.inspection_fill_id ${ew.customSqlSegment}") | 26 | "\tleft join inspection_fill_choice ifc on ifi.id = ifc.inspection_fill_id ${ew.customSqlSegment}") |
27 | List<InspectionPointFillGroupAndFillVO> getList(@Param(Constants.WRAPPER) QueryWrapper<InspectionPointFillGroupAndFillVO> inspectionPointFillGroupAndFillVOQueryWrapper); | 27 | List<InspectionPointFillGroupAndFillVO> getList(@Param(Constants.WRAPPER) QueryWrapper<InspectionPointFillGroupAndFillVO> inspectionPointFillGroupAndFillVOQueryWrapper); |
28 | 28 | ||
29 | @Select("select 'sys_struct_dict' node_type,id,'' parent_id,struct_name title from sys_struct_dict ssd where ssd.depart_id = #{departId}\n" + | 29 | @Select("SELECT * FROM\t(\tSELECT 'sys_struct_dict' AS node_type,ssd.id,'' AS parent_id,ssd.struct_name AS title,ssd.sort_num,NULL AS equipment_name\n" + |
30 | "union all\n" + | 30 | "\tFROM sys_struct_dict ssd WHERE ssd.depart_id = #{departId}\n" + |
31 | "select 'equip_info' node_type,ei.id,ssd.id parent_id,ei.equipment_name title from equipment_info ei left join sys_struct_dict ssd on " + | 31 | "\tUNION ALL SELECT\n" + |
32 | " ei.structures = ssd.id where ssd.depart_id = #{departId}") | 32 | "\t\t'equip_info' AS node_type,ei.id,ssd.id AS parent_id,ei.equipment_name AS title,ssd.sort_num,ei.equipment_name -- 用于排序\n" + |
33 | "\tFROM equipment_info ei LEFT JOIN sys_struct_dict ssd ON ei.structures = ssd.id \n" + | ||
34 | "\tWHERE ssd.depart_id = #{departId}\n" + | ||
35 | "\t) AS combined_result ORDER BY node_type DESC,sort_num,equipment_name;") | ||
33 | List<InspectionStructEquipVO> getSysStructDictAndEquipInfo(@Param("departId") String departId); | 36 | List<InspectionStructEquipVO> getSysStructDictAndEquipInfo(@Param("departId") String departId); |
34 | } | 37 | } | ... | ... |
... | @@ -20,7 +20,7 @@ public interface IInspectionAnalysisService { | ... | @@ -20,7 +20,7 @@ public interface IInspectionAnalysisService { |
20 | * @return | 20 | * @return |
21 | */ | 21 | */ |
22 | InspectionTaskIndicatorsVO getInspectionTaskIndicators(String startDate, String endDate); | 22 | InspectionTaskIndicatorsVO getInspectionTaskIndicators(String startDate, String endDate); |
23 | 23 | InspectionTaskIndicatorsVO getInspectionTaskIndicatorsNew(String startDate, String endDate); | |
24 | /*** | 24 | /*** |
25 | * 巡检分析-巡检任务指标-详情 | 25 | * 巡检分析-巡检任务指标-详情 |
26 | * @param departIds | 26 | * @param departIds |
... | @@ -36,7 +36,7 @@ public interface IInspectionAnalysisService { | ... | @@ -36,7 +36,7 @@ public interface IInspectionAnalysisService { |
36 | * @return | 36 | * @return |
37 | */ | 37 | */ |
38 | InspectionEquipIndicatorsVO getInspectionEquipIndicators(String startDate, String endDate); | 38 | InspectionEquipIndicatorsVO getInspectionEquipIndicators(String startDate, String endDate); |
39 | 39 | InspectionEquipIndicatorsVO getInspectionEquipIndicatorsNew(String startDate, String endDate); | |
40 | /*** | 40 | /*** |
41 | * 巡检分析-巡检设备指标--详情 | 41 | * 巡检分析-巡检设备指标--详情 |
42 | * @param startDate | 42 | * @param startDate |
... | @@ -52,6 +52,7 @@ public interface IInspectionAnalysisService { | ... | @@ -52,6 +52,7 @@ public interface IInspectionAnalysisService { |
52 | * @return | 52 | * @return |
53 | */ | 53 | */ |
54 | InspectionTaskOverviewVO getInspectionTaskOverview(String startDate, String endDate); | 54 | InspectionTaskOverviewVO getInspectionTaskOverview(String startDate, String endDate); |
55 | InspectionTaskOverviewVO getInspectionTaskOverviewNew(String startDate, String endDate); | ||
55 | 56 | ||
56 | /*** | 57 | /*** |
57 | * 巡检分析-巡检任务概况 | 58 | * 巡检分析-巡检任务概况 |
... | @@ -69,6 +70,8 @@ public interface IInspectionAnalysisService { | ... | @@ -69,6 +70,8 @@ public interface IInspectionAnalysisService { |
69 | */ | 70 | */ |
70 | InspectionEquipOverviewVO getInspectionEquipOverview(String startDate, String endDate); | 71 | InspectionEquipOverviewVO getInspectionEquipOverview(String startDate, String endDate); |
71 | 72 | ||
73 | InspectionEquipOverviewVO getInspectionEquipOverviewNew(String startDate, String endDate); | ||
74 | |||
72 | /*** | 75 | /*** |
73 | * 巡检分析-巡检设备概况-详情 | 76 | * 巡检分析-巡检设备概况-详情 |
74 | * @param departIds | 77 | * @param departIds | ... | ... |
-
请 注册 或 登录 后发表评论