Commit 2c0c73d8 authored by 李秀明's avatar 李秀明

Merge branch 'refs/heads/develop_dl' into develop_bugfix@dl

parents 20b4a519 e7552b13
...@@ -245,6 +245,19 @@ public class DataDictionaryController extends BaseController { ...@@ -245,6 +245,19 @@ public class DataDictionaryController extends BaseController {
} }
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/dataDictionaryIdFillMenuHasSort", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据字典类型查询字典,id为SequenceNbr", notes = "根据字典类型查询字典,id为SequenceNbr")
public ResponseModel<Object> getDictionaryWithTreeFillIdHasSort(@RequestParam String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
Collection<DataDictionary> list = iDataDictionaryService.list(queryWrapper);
List<Menu> menus = TreeParser.getSortTree(null, list, DataDictionary.class.getName(), "getSequenceNbr", 2, "getName",
"getParent", "getSortNum", null,"getCode");
return ResponseHelper.buildResponse(menus);
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/dataDictionary", method = RequestMethod.GET) @RequestMapping(value = "/dataDictionary", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据字典类型查询字典2", notes = "根据字典类型查询字典2") @ApiOperation(httpMethod = "GET", value = "根据字典类型查询字典2", notes = "根据字典类型查询字典2")
......
...@@ -17,13 +17,21 @@ public class Menu { ...@@ -17,13 +17,21 @@ public class Menu {
public Boolean isRoot; public Boolean isRoot;
public List<Menu> children; public List<Menu> children;
public String treeCode; public String treeCode;
public int num; public Integer sortNum;
public int num;
public int getNum() { public int getNum() {
return num; return num;
} }
public void setNum(int num) { public void setNum(int num) {
this.num = num; this.num = num;
} }
public Integer getSortNum() {
return sortNum;
}
public void setSortNum(Integer sortNum) {
this.sortNum = sortNum;
}
public Menu(Long id, String name, Long parentId2,int num) { public Menu(Long id, String name, Long parentId2,int num) {
super(); super();
this.id = id; this.id = id;
...@@ -31,6 +39,16 @@ public class Menu { ...@@ -31,6 +39,16 @@ public class Menu {
this.parentId = parentId2; this.parentId = parentId2;
this.num = num; this.num = num;
} }
public Menu(Long id, String name, Long parentId2,int num, Integer sortNum) {
super();
this.id = id;
this.name = name;
this.parentId = parentId2;
this.num = num;
this.sortNum = sortNum;
}
public Menu(Long id, String name, Long parentId2,int num,String treeCode) { public Menu(Long id, String name, Long parentId2,int num,String treeCode) {
super(); super();
this.id = id; this.id = id;
...@@ -39,6 +57,16 @@ public class Menu { ...@@ -39,6 +57,16 @@ public class Menu {
this.num = num; this.num = num;
this.treeCode = treeCode; this.treeCode = treeCode;
} }
public Menu(Long id, String name, Long parentId2,int num,String treeCode, Integer sortNum) {
super();
this.id = id;
this.name = name;
this.parentId = parentId2;
this.num = num;
this.treeCode = treeCode;
this.sortNum = sortNum;
}
public Menu(Long id, String name, Long parentId, List<Menu> children,int num) { public Menu(Long id, String name, Long parentId, List<Menu> children,int num) {
super(); super();
this.id = id; this.id = id;
...@@ -56,7 +84,6 @@ public class Menu { ...@@ -56,7 +84,6 @@ public class Menu {
this.children = children; this.children = children;
this.num = num; this.num = num;
} }
public Long getId() { public Long getId() {
return id; return id;
} }
......
...@@ -104,6 +104,75 @@ public class TreeParser { ...@@ -104,6 +104,75 @@ public class TreeParser {
return resultList; return resultList;
} }
@SuppressWarnings("unchecked")
public static List<Menu> getSortTree(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, String SORTMethodName, List<FirefightersTreeDto> list, String treeCode) throws Exception {
List<Menu> resultList = new ArrayList<>();
@SuppressWarnings("rawtypes")
Class clazz = Class.forName(packageURL);
Method IDMethodNameme = null;
switch (IDHierarchy) {
case 1:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
case 2:
IDMethodNameme = clazz.getSuperclass().getDeclaredMethod(IDMethodName);
break;
case 3:
IDMethodNameme = clazz.getSuperclass().getSuperclass().getDeclaredMethod(IDMethodName);
break;
default:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
}
Method NAMEMethodNameme = clazz.getDeclaredMethod(NAMEMethodName);
Method SORTMethodNamee = clazz.getDeclaredMethod(SORTMethodName);
Method PARENTIDMethodNameme = clazz.getDeclaredMethod(PARENTIDMethodName);
Method treeCodeName =null;
if(treeCode!=null){
treeCodeName = clazz.getDeclaredMethod(treeCode);
}
//获取顶层元素集合
Long parentId;
for (Object ob : entityList) {
Object entity = clazz.cast(ob);
parentId = PARENTIDMethodNameme.invoke(entity) != null ? Long.valueOf(String.valueOf(PARENTIDMethodNameme.invoke(entity))) : null;
if (parentId == null || parentId.equals(topId) ) {//陈浩2021-12-01修改 topId == parentId 的判断
String codeString = String.valueOf(IDMethodNameme.invoke(entity));
Integer num = 0;
if (list != null && list.size() > 0) {
for (FirefightersTreeDto map : list) {
if (null != map.getJobTitleCode() && map.getJobTitleCode().equals(codeString)) {
num = Integer.valueOf((String) map.getNum());
break;
}
}
;
}
Menu menu = null;
if(treeCodeName!=null){
String treeCodeNamedat = String.valueOf(treeCodeName.invoke(entity));
menu = new Menu(Long.valueOf(codeString), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, num,treeCodeNamedat, Integer.valueOf(String.valueOf(SORTMethodNamee.invoke(entity))));
}else{
menu = new Menu(Long.valueOf(codeString), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, num, Integer.valueOf(String.valueOf(SORTMethodNamee.invoke(entity))));
}
resultList.add(menu);
}
}
//获取每个顶层元素的子数据集合
for (Menu entity : resultList) {
entity.setChildren(getSub(entity.getId(), entityList, packageURL, IDMethodName, IDHierarchy, NAMEMethodName, PARENTIDMethodName, list,treeCode));
}
return resultList;
}
public static List<Menu> getTreeTeam(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, List<FirefightersTreeDto> list,String treeCode) throws Exception { public static List<Menu> getTreeTeam(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, List<FirefightersTreeDto> list,String treeCode) throws Exception {
List<Menu> resultList = new ArrayList<>(); List<Menu> resultList = new ArrayList<>();
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
......
...@@ -157,6 +157,21 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -157,6 +157,21 @@ public class FireFightingSystemController extends AbstractBaseController {
return fireFightingSystemService.getEquipCountPageBySystemId(systemId, pageNumber, pageSize, bizOrgCode); return fireFightingSystemService.getEquipCountPageBySystemId(systemId, pageNumber, pageSize, bizOrgCode);
} }
@RequestMapping(value = "/getEquipCountPage", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防器材查询设备数量列表")
public Page<EquipCountBySystemVO> getEquipCountPage(
@RequestParam(value = "systemId", required = false) Long systemId,
@RequestParam(value = "pageNumber", required = false) Integer pageNumber,
@RequestParam(value = "pageSize", required = false) Integer pageSize,
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode) {
if (org.apache.commons.lang3.StringUtils.isBlank(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && org.apache.commons.lang3.StringUtils.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
return fireFightingSystemService.getEquipCountPage(systemId, pageNumber, pageSize, bizOrgCode);
}
@RequestMapping(value = "/getFireEquipConfigInfo", method = RequestMethod.GET) @RequestMapping(value = "/getFireEquipConfigInfo", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("根据字典查询相关信息") @ApiOperation("根据字典查询相关信息")
......
...@@ -20,6 +20,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -20,6 +20,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -84,7 +85,7 @@ public class FireResourceSupervisionController extends BaseController { ...@@ -84,7 +85,7 @@ public class FireResourceSupervisionController extends BaseController {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtils.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null; bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtils.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
} }
List<Map<String, Object>> fireEquipStats = iFireResourceSupervisionService.getFireEquipStatistic(type, bizOrgCode); List<LinkedHashMap<String, Object>> fireEquipStats = iFireResourceSupervisionService.getFireEquipStatistic(type, bizOrgCode);
return ResponseHelper.buildResponse(fireEquipStats); return ResponseHelper.buildResponse(fireEquipStats);
} }
} }
...@@ -206,7 +206,7 @@ public interface JcsFeign { ...@@ -206,7 +206,7 @@ public interface JcsFeign {
@GetMapping(value = "/org-usr/getCompany") @GetMapping(value = "/org-usr/getCompany")
FeignClientResult getCompany( @RequestParam(value = "bizOrgCode") String bizOrgCode); FeignClientResult getCompany( @RequestParam(value = "bizOrgCode") String bizOrgCode);
@GetMapping(value = "/data-dictionary/dataDictionaryIdFillMenu") @GetMapping(value = "/data-dictionary/dataDictionaryIdFillMenuHasSort")
FeignClientResult<List<DataDictionary>> dataDictionaryIdFillMenu(@RequestParam(value = "type") String type); FeignClientResult<List<DataDictionary>> dataDictionaryIdFillMenu(@RequestParam(value = "type") String type);
@GetMapping(value = "/data-dictionary/getDictListByType") @GetMapping(value = "/data-dictionary/getDictListByType")
......
...@@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Param; ...@@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -55,6 +56,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -55,6 +56,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page<EquipCountBySystemVO> getEquipCountPageBySystemId(@Param("page") Page<Object> page, @Param("systemId") Long systemId, @Param("bizOrgCode") String bizOrgCode); Page<EquipCountBySystemVO> getEquipCountPageBySystemId(@Param("page") Page<Object> page, @Param("systemId") Long systemId, @Param("bizOrgCode") String bizOrgCode);
Page<EquipCountBySystemVO> getEquipCountPage(@Param("page") Page<Object> page, @Param("systemId") Long systemId, @Param("bizOrgCode") String bizOrgCode);
/** /**
* 保存 * 保存
* *
...@@ -782,7 +785,9 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -782,7 +785,9 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page<Map<String, Object>> getEquipmentRunLogBySysInfo(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("systemCode") String systemCode, Page<Map<String, Object>> getEquipmentRunLogBySysInfo(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("systemCode") String systemCode,
@Param("fireEquipmentName") String fireEquipmentName, @Param("startTime") String startTime, @Param("endTime") String endTime); @Param("fireEquipmentName") String fireEquipmentName, @Param("startTime") String startTime, @Param("endTime") String endTime);
List<Map<String, Object>> getFireEquipStatistic(@Param("collect") List<String> collect, @Param("bizOrgCode")String bizOrgCode); List<LinkedHashMap<String, Object>> getFireEquipStatistic(@Param("collect") List<String> collect, @Param("bizOrgCode")String bizOrgCode);
List<LinkedHashMap<String, Object>> getOtherFireEquipStatistic(@Param("collect") List<String> collect, @Param("bizOrgCode")String bizOrgCode);
List<EquipCountBySystemVO> getFireEquipConfigInfo(@Param("codes") List<String> codes, @Param("bizOrgCode")String bizOrgCode); List<EquipCountBySystemVO> getFireEquipConfigInfo(@Param("codes") List<String> codes, @Param("bizOrgCode")String bizOrgCode);
} }
......
...@@ -69,6 +69,14 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -69,6 +69,14 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Page<EquipCountBySystemVO> getEquipCountPageBySystemId(Long systemId, Integer pageNumber, Integer pageSize, String bizOrgCode); Page<EquipCountBySystemVO> getEquipCountPageBySystemId(Long systemId, Integer pageNumber, Integer pageSize, String bizOrgCode);
/** /**
* 消防器材查询设备数量列表
*
* @param systemId
* @return
*/
Page<EquipCountBySystemVO> getEquipCountPage(Long systemId, Integer pageNumber, Integer pageSize, String bizOrgCode);
/**
* 保存 * 保存
* *
* @param vo * @param vo
......
...@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service; ...@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service;
import com.yeejoin.equipmanage.common.entity.dto.FireResourceStatsDTO; import com.yeejoin.equipmanage.common.entity.dto.FireResourceStatsDTO;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -29,5 +30,5 @@ public interface IFireResourceSupervisionService { ...@@ -29,5 +30,5 @@ public interface IFireResourceSupervisionService {
FireResourceStatsDTO getFireEquipStats(String bizOrgCode); FireResourceStatsDTO getFireEquipStats(String bizOrgCode);
List<Map<String, Object>> getFireEquipStatistic(String type, String bizOrgCode); List<LinkedHashMap<String, Object>> getFireEquipStatistic(String type, String bizOrgCode);
} }
...@@ -216,6 +216,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -216,6 +216,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return this.baseMapper.getEquipCountPageBySystemId(new Page(pageNumber, pageSize), systemId, bizOrgCode); return this.baseMapper.getEquipCountPageBySystemId(new Page(pageNumber, pageSize), systemId, bizOrgCode);
} }
@Override
public Page<EquipCountBySystemVO> getEquipCountPage(Long systemId, Integer pageNumber, Integer pageSize, String bizOrgCode) {
return this.baseMapper.getEquipCountPage(new Page(pageNumber, pageSize), systemId, bizOrgCode);
}
@Override @Override
public List<EquiplistSpecificBySystemVO> public List<EquiplistSpecificBySystemVO>
......
...@@ -7,6 +7,7 @@ import com.yeejoin.equipmanage.common.utils.StringUtil; ...@@ -7,6 +7,7 @@ import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.fegin.JcsFeign; import com.yeejoin.equipmanage.fegin.JcsFeign;
import com.yeejoin.equipmanage.mapper.FireFightingSystemMapper; import com.yeejoin.equipmanage.mapper.FireFightingSystemMapper;
import com.yeejoin.equipmanage.service.IFireResourceSupervisionService; import com.yeejoin.equipmanage.service.IFireResourceSupervisionService;
import liquibase.pro.packaged.X;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -15,10 +16,7 @@ import org.springframework.util.StringUtils; ...@@ -15,10 +16,7 @@ import org.springframework.util.StringUtils;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@Slf4j @Slf4j
@Service @Service
...@@ -75,16 +73,35 @@ public class IFireResourceSupervisionServiceImpl implements IFireResourceSupervi ...@@ -75,16 +73,35 @@ public class IFireResourceSupervisionServiceImpl implements IFireResourceSupervi
} }
@Override @Override
public List<Map<String, Object>> getFireEquipStatistic(String type, String bizOrgCode) { public List<LinkedHashMap<String, Object>> getFireEquipStatistic(String type, String bizOrgCode) {
List<DataDictionary> dictionaryList = jcsFeignClient.dataDictionaryIdFillMenu(StringUtil.isNotEmpty(type) ? type : "ZYGL_XFQC").getResult(); List<DataDictionary> dictionaryList = jcsFeignClient.dataDictionaryIdFillMenu(StringUtil.isNotEmpty(type) ? type : "ZYGL_XFQC").getResult();
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
Map<Integer, String> sortMap = new TreeMap<>(new Comparator<Integer>(){
@Override
public int compare(Integer o1, Integer o2) {
return o1-o2; //按照key顺序排列,o2-o1是逆序, o1-o2是正序
}
});
if (!CollectionUtils.isEmpty(dictionaryList)) { if (!CollectionUtils.isEmpty(dictionaryList)) {
dictionaryList.forEach(x -> { dictionaryList.forEach(x -> {
list.add(x.getTreeCode()); list.add(x.getTreeCode());
sortMap.put(x.getSortNum(), x.getTreeCode());
}); });
} }
List<Map<String, Object>> resultMap = fireFightingSystemMapper.getFireEquipStatistic(list, bizOrgCode); List<LinkedHashMap<String, Object>> resultMap = fireFightingSystemMapper.getFireEquipStatistic(list, bizOrgCode);
return resultMap; List<LinkedHashMap<String, Object>> resp = new ArrayList<>();
if (!sortMap.isEmpty()) {
sortMap.entrySet().forEach(x -> {
resultMap.forEach(y -> {
if (x.getValue().equalsIgnoreCase(String.valueOf(y.get("code")))) {
resp.add(y);
}
});
});
}
List<LinkedHashMap<String, Object>> otherMapData = fireFightingSystemMapper.getOtherFireEquipStatistic(list, bizOrgCode);
resp.addAll(otherMapData);
return resp;
} }
private FireResourceStatsDTO buildFireResourceStatsDTO(Map<String, Object> resultMap) { private FireResourceStatsDTO buildFireResourceStatsDTO(Map<String, Object> resultMap) {
......
...@@ -142,6 +142,34 @@ ...@@ -142,6 +142,34 @@
</where> </where>
group by wle.code group by wle.code
</select> </select>
<select id="getEquipCountPage" resultMap="EquipCountBySystemId">
SELECT
wle.id equipment_id,
wle.code equipment_code,
wle.NAME equipment_name,
count(spe.id) num,
wle.`code` equip_code,
unit.name unit_name,
wle.shbz_img img,
cate.NAME AS equipmentCateGoryName
FROM
wl_equipment_specific AS spe
LEFT JOIN wl_equipment AS wle ON wle.`code` = spe.equipment_code
LEFT JOIN wl_equipment_category cate ON cate.id = wle.category_id
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
<where>
wle.id is not null
<if test="systemId != null and systemId != ''">
AND find_in_set(#{systemId},spe.system_id)
</if>
<if test="bizOrgCode != null and bizOrgCode != ''">
AND spe.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
group by wle.code
</select>
<insert id="save"> <insert id="save">
INSERT INTO INSERT INTO
f_fire_fighting_system f_fire_fighting_system
...@@ -7321,7 +7349,7 @@ ...@@ -7321,7 +7349,7 @@
ORDER BY d.create_date desc ORDER BY d.create_date desc
</select> </select>
<select id="getFireEquipStatistic" resultType="Map"> <select id="getFireEquipStatistic" resultType="java.util.LinkedHashMap">
SELECT SELECT
a.`name` AS `name`, a.`name` AS `name`,
wes.equipment_code AS `code`, wes.equipment_code AS `code`,
...@@ -7350,13 +7378,15 @@ ...@@ -7350,13 +7378,15 @@
) a ON a.`code` = wes.equipment_code ) a ON a.`code` = wes.equipment_code
LEFT JOIN wl_unit wu ON wu.id = a.unit_id LEFT JOIN wl_unit wu ON wu.id = a.unit_id
WHERE WHERE
a.`name` IS NOT NULL AND wes.system_id IS NOT NULL a.`name` IS NOT NULL
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
AND wes.biz_org_code like concat (#{bizOrgCode},'%') AND wes.biz_org_code like concat (#{bizOrgCode},'%')
</if> </if>
GROUP BY GROUP BY
wes.equipment_code wes.equipment_code
UNION ALL </select>
<select id="getOtherFireEquipStatistic" resultType="java.util.LinkedHashMap">
SELECT SELECT
'其他' AS `name`, '其他' AS `name`,
'' AS `code`, '' AS `code`,
...@@ -7385,10 +7415,10 @@ ...@@ -7385,10 +7415,10 @@
</where> </where>
) a ON a.`code` = wes.equipment_code ) a ON a.`code` = wes.equipment_code
WHERE WHERE
a.`name` IS NOT NULL AND wes.system_id IS NOT NULL a.`name` IS NOT NULL
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
AND wes.biz_org_code like concat (#{bizOrgCode},'%') AND wes.biz_org_code like concat (#{bizOrgCode},'%')
</if> </if>
</select> </select>
<select id="getFireEquipConfigInfo" resultMap="EquipCountBySystemId"> <select id="getFireEquipConfigInfo" resultMap="EquipCountBySystemId">
...@@ -7407,11 +7437,10 @@ ...@@ -7407,11 +7437,10 @@
LEFT JOIN wl_equipment_category cate ON cate.id = wle.category_id LEFT JOIN wl_equipment_category cate ON cate.id = wle.category_id
LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id LEFT JOIN wl_unit as unit ON wle.unit_id = unit.id
<where> <where>
spe.system_id IS NOT NULL AND wle.code in wle.code in
<foreach collection="codes" item="item" index="index" open="(" close=")" separator=","> <foreach collection="codes" item="item" index="index" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
AND spe.system_id IS NOT NULL
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
AND spe.biz_org_code like concat (#{bizOrgCode},'%') AND spe.biz_org_code like concat (#{bizOrgCode},'%')
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment