c51112b3 sonin

设备查询 修改

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