c51112b3 sonin

设备查询 修改

1 个父辈 0ac65a92
...@@ -212,9 +212,9 @@ public class EquipmentController { ...@@ -212,9 +212,9 @@ public class EquipmentController {
212 if (equipmentStatisticDTO.getShowDepartId()) { 212 if (equipmentStatisticDTO.getShowDepartId()) {
213 List<Map<String, Object>> departIdMapList = WrapperFactory.joinWrapper() 213 List<Map<String, Object>> departIdMapList = WrapperFactory.joinWrapper()
214 .select("count(*) as total", "depart_id as departId") 214 .select("count(*) as total", "depart_id as departId")
215 .from(EquipmentAsset.class) 215 .from(EquipmentInfo.class)
216 .innerJoin(EquipmentInfo.class, EquipmentInfo.class.getDeclaredField("assetId"), EquipmentAsset.class.getDeclaredField("id")) 216 .leftJoin(EquipmentAsset.class, EquipmentInfo.class.getDeclaredField("assetId"), EquipmentAsset.class.getDeclaredField("id"))
217 .innerJoin(EquipmentExt.class, EquipmentExt.class.getDeclaredField("infoId"), EquipmentInfo.class.getDeclaredField("id")) 217 .leftJoin(EquipmentExt.class, EquipmentExt.class.getDeclaredField("infoId"), EquipmentInfo.class.getDeclaredField("id"))
218 .where() 218 .where()
219 .eq(StringUtils.isNotEmpty(equipmentStatisticDTO.getIsSpecial()), "is_special", equipmentStatisticDTO.getIsSpecial()) 219 .eq(StringUtils.isNotEmpty(equipmentStatisticDTO.getIsSpecial()), "is_special", equipmentStatisticDTO.getIsSpecial())
220 .in(true,"depart_id", Arrays.asList(departs.split(","))) 220 .in(true,"depart_id", Arrays.asList(departs.split(",")))
...@@ -359,6 +359,7 @@ public class EquipmentController { ...@@ -359,6 +359,7 @@ public class EquipmentController {
359 .groupBy("EquipmentInfo_equipmentStatus");//EquipmentInfo_isSpecial 359 .groupBy("EquipmentInfo_equipmentStatus");//EquipmentInfo_isSpecial
360 sql = sql.replace("EquipmentInfo.maintenance_cost as EquipmentInfo_maintenanceCost,", "") 360 sql = sql.replace("EquipmentInfo.maintenance_cost as EquipmentInfo_maintenanceCost,", "")
361 .replace("EquipmentInfo.gz_count as EquipmentInfo_gzCount,", ""); 361 .replace("EquipmentInfo.gz_count as EquipmentInfo_gzCount,", "");
362 sql = sql.replaceAll("inner join", "left join");
362 List<Map<String, Object>> countMapList = iCommonSqlService.queryWrapperForList(sql, queryWrapper); 363 List<Map<String, Object>> countMapList = iCommonSqlService.queryWrapperForList(sql, queryWrapper);
363 for (Map<String, Object> item : countMapList) { 364 for (Map<String, Object> item : countMapList) {
364 String key = "" + item.get("EquipmentInfo_equipmentStatus"); 365 String key = "" + item.get("EquipmentInfo_equipmentStatus");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!