Commit b5ad4194 authored by zhangsen's avatar zhangsen

缺陷所需API

parent 43a88ec7
...@@ -50,4 +50,6 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> { ...@@ -50,4 +50,6 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
Long sequenceNbr, String equipId,String bizOrgCode, String equipCateGoryCode,List<String> ids); Long sequenceNbr, String equipId,String bizOrgCode, String equipCateGoryCode,List<String> ids);
List<Map<String, Object>> getWaterTypeByBizOrgCode(String bizOrgCode); List<Map<String, Object>> getWaterTypeByBizOrgCode(String bizOrgCode);
}
Page<WaterResourceDto> pageByDefect(Page<WaterResourceDto> page, @Param("nameOrCode") String nameOrCode, @Param("bizOrgCode") String bizOrgCode);
}
...@@ -180,4 +180,10 @@ ...@@ -180,4 +180,10 @@
</select> </select>
<select id="pageByDefect" resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto">
select * from cb_water_resource where is_delete = 1
<if test="nameOrCode != null and nameOrCode != ''">and (name like concat('%', #{nameOrCode}, '%') or equip_code like concat('%', #{nameOrCode}, '%'))</if>
<if test="bizOrgCode != null and bizOrgCode != ''">and biz_org_code like concat( #{bizOrgCode}, '%')</if>
order by cb_water_resource.rec_date desc
</select>
</mapper> </mapper>
...@@ -60,4 +60,10 @@ public class EquipTypeAmountPageDTO extends BaseDTO<EquipmentSpecific> { ...@@ -60,4 +60,10 @@ public class EquipTypeAmountPageDTO extends BaseDTO<EquipmentSpecific> {
@ApiModelProperty(value = "是否物联") @ApiModelProperty(value = "是否物联")
private String isIot; private String isIot;
@ApiModelProperty(value = "装备编码或名称")
private String nameOrCode;
@ApiModelProperty(value = "缺陷管理新增页面用,其余地方可忽略 1-是缺陷管理 0-不是")
private Integer isDefect;
} }
...@@ -53,4 +53,6 @@ public class EquipTypeImgAmountVO { ...@@ -53,4 +53,6 @@ public class EquipTypeImgAmountVO {
@ApiModelProperty(value = "单位部门org") @ApiModelProperty(value = "单位部门org")
private String bizOrgCode; private String bizOrgCode;
@ApiModelProperty(value = "所在建筑")
private String belongBuildName;
} }
...@@ -121,4 +121,6 @@ public class EquipmentManageVo implements Serializable { ...@@ -121,4 +121,6 @@ public class EquipmentManageVo implements Serializable {
private String bizOrgCode; private String bizOrgCode;
private String bizOrgName; private String bizOrgName;
private String fullName;
} }
...@@ -468,6 +468,31 @@ public class WaterResourceController extends BaseController { ...@@ -468,6 +468,31 @@ public class WaterResourceController extends BaseController {
} }
/** /**
* 列表分页查询缺陷模块用
*
* @param pageNum 当前页
* @param pageSize 每页大小
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageByDefect")
@ApiOperation(httpMethod = "GET", value = "列表分页查询缺陷模块用", notes = "列表分页查询缺陷模块用")
public ResponseModel<Page<WaterResourceDto>> pageByDefect(@RequestParam(value = "pageNum") int pageNum,
@RequestParam(value = "pageSize") int pageSize,
@RequestParam(value = "nameOrCode", required = false) String nameOrCode,
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode) {
ReginParams reginParams = getSelectedOrgInfo();
if (StringUtils.isEmpty(bizOrgCode)) {
bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
}
Page<WaterResourceDto> page = new Page<>();
page.setCurrent(pageNum);
page.setSize(pageSize);
Page<WaterResourceDto> waterResourceDtoPage = waterResourceServiceImpl.pageByDefect(page, nameOrCode, bizOrgCode);
return ResponseHelper.buildResponse(waterResourceDtoPage);
}
/**
* 列表全部数据查询 * 列表全部数据查询
* *
* @return 返回结果 * @return 返回结果
......
...@@ -93,6 +93,15 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -93,6 +93,15 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
} }
/** /**
* 分页查询
*/
public Page<WaterResourceDto> pageByDefect(Page<WaterResourceDto> page,
String nameOrCode,
String bizOrgCode) {
return this.waterResourceMapper.pageByDefect(page, nameOrCode, bizOrgCode);
}
/**
* 列表查询 示例 * 列表查询 示例
*/ */
public List<WaterResourceDto> queryForWaterResourceList(@Condition(Operator.eq) Boolean isDelete) { public List<WaterResourceDto> queryForWaterResourceList(@Condition(Operator.eq) Boolean isDelete) {
......
...@@ -111,6 +111,16 @@ public class BuildingController extends AbstractBaseController { ...@@ -111,6 +111,16 @@ public class BuildingController extends AbstractBaseController {
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode(); String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
return buildService.getBuildingTree(bizOrgCode); return buildService.getBuildingTree(bizOrgCode);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防建筑树带筛选")
@GetMapping(value = "/treeByName")
public List<BuildingTreeVo> treeByName(@RequestParam(required = false) String name) {
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
return buildService.treeByName(bizOrgCode, name);
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防建筑树列表信息") @ApiOperation("消防建筑树列表信息")
@GetMapping(value = "/getBuildingList") @GetMapping(value = "/getBuildingList")
......
...@@ -55,9 +55,10 @@ public class EquipmentManageController extends AbstractBaseController{ ...@@ -55,9 +55,10 @@ public class EquipmentManageController extends AbstractBaseController{
@RequestParam(value = "maintenance",required = false) String bizOrgCode, @RequestParam(value = "maintenance",required = false) String bizOrgCode,
@RequestParam(value = "maintenance",required = false) String formGroupId, @RequestParam(value = "maintenance",required = false) String formGroupId,
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int pageSize @RequestParam(value = "size") int pageSize,
@RequestParam(required = false) String nameOrCode
) { ) {
return equipmentManageService.queryEquipmenInfoAndCount(equipmentName,equipmentCode,construction,maintenance,bizOrgCode,formGroupId,current,pageSize); return equipmentManageService.queryEquipmenInfoAndCount(equipmentName,equipmentCode,construction,maintenance,bizOrgCode,formGroupId,current,pageSize,nameOrCode);
} }
@GetMapping(value = "/getUtils") @GetMapping(value = "/getUtils")
......
...@@ -49,7 +49,9 @@ import com.yeejoin.equipmanage.service.IManufacturerInfoService; ...@@ -49,7 +49,9 @@ import com.yeejoin.equipmanage.service.IManufacturerInfoService;
import com.yeejoin.equipmanage.service.IUploadFileService; import com.yeejoin.equipmanage.service.IUploadFileService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
...@@ -458,6 +460,12 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -458,6 +460,12 @@ public class FireFightingSystemController extends AbstractBaseController {
return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, equipTypeAmountPage.getEquipmentClassificationCode().substring(0, inhierarchy), equipTypeAmountPage); return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, equipTypeAmountPage.getEquipmentClassificationCode().substring(0, inhierarchy), equipTypeAmountPage);
} else { } else {
if (null != equipTypeAmountPage.getIsDefect() && 1 == equipTypeAmountPage.getIsDefect()) {
ReginParams reginParams = getSelectedOrgInfo();
if (StringUtils.isEmpty(equipTypeAmountPage.getBizOrgCode())) {
equipTypeAmountPage.setBizOrgCode(reginParams.getPersonIdentity().getBizOrgCode());
}
}
return fireFightingSystemService.getColaCategoryAmountEquList(0, null, equipTypeAmountPage); return fireFightingSystemService.getColaCategoryAmountEquList(0, null, equipTypeAmountPage);
} }
...@@ -505,12 +513,20 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -505,12 +513,20 @@ public class FireFightingSystemController extends AbstractBaseController {
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode, @RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
@RequestParam(value = "formGroupId", required = false) String formGroupId, @RequestParam(value = "formGroupId", required = false) String formGroupId,
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int pageSize @RequestParam(value = "size") int pageSize,
@RequestParam(value = "size", required = false) String nameOrCode,
@ApiParam(value = "缺陷管理新增页面用,其余地方可忽略 1-是缺陷管理 0-不是") @RequestParam(required = false) Integer isDefect
) { ) {
if (null != isDefect && 1 == isDefect) {
ReginParams reginParams = getSelectedOrgInfo();
if (StringUtils.isEmpty(bizOrgCode)) {
bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
}
}
if (current > 0){ if (current > 0){
current = (current - 1) * pageSize; current = (current - 1) * pageSize;
} }
return fireFightingSystemService.queryEquipmenInfoAndCount(equipmentName, equipmentCode, construction, maintenance, bizOrgCode, formGroupId, current, pageSize); return fireFightingSystemService.queryEquipmenInfoAndCount(equipmentName, equipmentCode, construction, maintenance, bizOrgCode, formGroupId, current, pageSize, nameOrCode);
} }
/** /**
......
...@@ -54,6 +54,13 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -54,6 +54,13 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
* @param parentId * @param parentId
* @return * @return
*/ */
List<Map<String,Object>> querySpecialChildrenListByName(String parentId, String bizOrgCode, String name);
/**
* 查询指定节点的子
* @param parentId
* @return
*/
List<Map<String,Object>> querySpecialChildrenListByBizOrgCode(@Param("parentId") String parentId, @Param("bizOrgCode") String bizOrgCode); List<Map<String,Object>> querySpecialChildrenListByBizOrgCode(@Param("parentId") String parentId, @Param("bizOrgCode") String bizOrgCode);
/** /**
......
...@@ -26,7 +26,7 @@ public interface EquipmentManageService extends IService<EquipmentManageEntity> ...@@ -26,7 +26,7 @@ public interface EquipmentManageService extends IService<EquipmentManageEntity>
* @param pageSize * @param pageSize
* @return * @return
*/ */
Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId , int spage, int pageSize); Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId , int spage, int pageSize, String nameOrCode);
/** /**
* 获取下拉菜单数据 * 获取下拉菜单数据
......
...@@ -339,4 +339,6 @@ public interface IBuilldService extends IService<Building> { ...@@ -339,4 +339,6 @@ public interface IBuilldService extends IService<Building> {
List<BuildingTreeVo> getBuildingTreeInOrgCode(String bizOrgCode); List<BuildingTreeVo> getBuildingTreeInOrgCode(String bizOrgCode);
List<OrgMenuDto> companyTreeByUserAndType(); List<OrgMenuDto> companyTreeByUserAndType();
List<BuildingTreeVo> treeByName(String bizOrgCode, String name);
} }
...@@ -40,7 +40,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -40,7 +40,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @param pageSize * @param pageSize
* @return * @return
*/ */
Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId, int current, int pageSize); Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId, int current, int pageSize, String nameOrCode);
FireFightingSystemEntity getOneById(Long id); FireFightingSystemEntity getOneById(Long id);
......
...@@ -164,4 +164,12 @@ public interface IFormInstanceService extends IService<FormInstance> { ...@@ -164,4 +164,12 @@ public interface IFormInstanceService extends IService<FormInstance> {
List<UnitAreaTreeVo> getValueByColumn(Long instanceId, String bizOrgcode); List<UnitAreaTreeVo> getValueByColumn(Long instanceId, String bizOrgcode);
List<Map<String, Long>> getBuildVideoCount(); List<Map<String, Long>> getBuildVideoCount();
/**
* 查询指定节点的下降
*
* @param parentId 父节点
* @return List<Map < String, Object>>
*/
List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name);
} }
...@@ -1541,4 +1541,26 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1541,4 +1541,26 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
a.setChildren(getCompanyBuildingChildrenTree(a.getId().toString(), all)); a.setChildren(getCompanyBuildingChildrenTree(a.getId().toString(), all));
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@Override
public List<BuildingTreeVo> treeByName(String bizOrgCode, String name) {
List<BuildingTreeVo> allListVo = getBuildingTreeVosByName(true, bizOrgCode, name);
return allListVo.stream().filter(s -> "-1".equals(s.getParentId())).map(s -> {
BuildingTreeVo t = new BuildingTreeVo();
Bean.copyExistPropertis(s, t);
t.setChildren(this.getChildren(t.getInstanceId(), allListVo));
t.setDetailPaneApi(address);
t.setApiUrl(apiUrl);
return t;
}).collect(Collectors.toList());
}
private List<BuildingTreeVo> getBuildingTreeVosByName(Boolean isContainRootNode, String bizOrgCode, String name) {
FormGroup formGroup = iFormGroupService.getByUniqueKey(GroupCodeEnum.ALL_BUILDING.getGroupCode());
List<Map<String, Object>> allList = iFormInstanceService.getSpecialChildrenListByName(null, bizOrgCode, name);
List<BuildingTreeVo> allListVo = buildBuildingData(formGroup, allList, isContainRootNode);
Map<Long, String> absolutePositionMap = getBuildingAbsolutePosition(allListVo);
allListVo.forEach(s -> s.setAbsolutePosition(absolutePositionMap.get(s.getId())));
return allListVo;
}
} }
...@@ -56,7 +56,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe ...@@ -56,7 +56,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
@Override @Override
public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance,
String bizOrgCode, String formGroupId, int current, int pageSize) { String bizOrgCode, String formGroupId, int current, int pageSize, String nameOrCode) {
HttpServletRequest request = null; HttpServletRequest request = null;
Map map = new HashMap<String, Object>(); Map map = new HashMap<String, Object>();
map.put("equimentName", equimentName); map.put("equimentName", equimentName);
...@@ -67,6 +67,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe ...@@ -67,6 +67,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
map.put("pageSize", pageSize); map.put("pageSize", pageSize);
map.put("bizOrgCode", bizOrgCode); map.put("bizOrgCode", bizOrgCode);
map.put("formGroupId", formGroupId); map.put("formGroupId", formGroupId);
map.put("nameOrCode", nameOrCode);
List<EquipmentManageVo> dataList = equipmentManageMapper.queryEquipmenInfo(map); List<EquipmentManageVo> dataList = equipmentManageMapper.queryEquipmenInfo(map);
Long count = equipmentManageMapper.queryEquipmenCount(map); Long count = equipmentManageMapper.queryEquipmenCount(map);
map.clear(); map.clear();
......
...@@ -163,9 +163,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -163,9 +163,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override @Override
public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction,
String maintenance, String bizOrgCode, String formGroupId, int current, int pageSize) { String maintenance, String bizOrgCode, String formGroupId, int current, int pageSize, String nameOrCode) {
Map<String, Object> map = equipmentManageService.queryEquipmenInfoAndCount(equimentName, equimentCode, Map<String, Object> map = equipmentManageService.queryEquipmenInfoAndCount(equimentName, equimentCode,
construction, maintenance, bizOrgCode, formGroupId, current, pageSize); construction, maintenance, bizOrgCode, formGroupId, current, pageSize, nameOrCode);
List<EquipmentManageVo> dataList = (List<EquipmentManageVo>) map.get("dataList"); List<EquipmentManageVo> dataList = (List<EquipmentManageVo>) map.get("dataList");
StringBuilder stb = new StringBuilder(); StringBuilder stb = new StringBuilder();
dataList.forEach(y -> { dataList.forEach(y -> {
......
...@@ -559,4 +559,9 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -559,4 +559,9 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
public List<Map<String, Long>> getBuildVideoCount() { public List<Map<String, Long>> getBuildVideoCount() {
return formInstanceMapper.getBuildVideoCount(); return formInstanceMapper.getBuildVideoCount();
} }
@Override
public List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name) {
return this.baseMapper.querySpecialChildrenListByName(parentId, bizOrgCode, name);
}
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentManageMapper"> <mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentManageMapper">
<select id="queryEquipmenInfo" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo"> <select id="queryEquipmenInfo" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo">
select select
id as id, sys.id as id,
name as name, name as name,
code as code, code as code,
form_group_id, form_group_id,
...@@ -24,9 +24,11 @@ ...@@ -24,9 +24,11 @@
design_org, design_org,
lead_designer, lead_designer,
design_org_telephone, design_org_telephone,
(select count(1) from `wl_equipment_specific` es where find_in_set(sys.id,es.system_id) and es.single = true ) equipCount (select count(1) from `wl_equipment_specific` es where find_in_set(sys.id,es.system_id) and es.single = true ) equipCount,
wws.full_name as fullName
from from
f_fire_fighting_system as sys f_fire_fighting_system as sys
left join wl_warehouse_structure wws on wws.id = sys.contro_box_build
where 1=1 where 1=1
<if test="equimentName != 'null' "> <if test="equimentName != 'null' ">
AND NAME like CONCAT('%',#{equimentName},'%') AND NAME like CONCAT('%',#{equimentName},'%')
...@@ -34,6 +36,9 @@ ...@@ -34,6 +36,9 @@
<if test="equimentCode != 'null' "> <if test="equimentCode != 'null' ">
AND CODE like CONCAT('%',#{equimentCode},'%') AND CODE like CONCAT('%',#{equimentCode},'%')
</if> </if>
<if test="nameOrCode != null and nameOrCode != ''">
AND (CODE like CONCAT('%',#{nameOrCode},'%') or NAME like CONCAT('%',#{equimentName},'%'))
</if>
<if test="construction != 'all' "> <if test="construction != 'all' ">
AND CONSTRUCTION_UNIT = #{construction} AND CONSTRUCTION_UNIT = #{construction}
</if> </if>
...@@ -64,6 +69,9 @@ ...@@ -64,6 +69,9 @@
<if test="construction != 'all' "> <if test="construction != 'all' ">
AND construction_unit = #{construction} AND construction_unit = #{construction}
</if> </if>
<if test="nameOrCode != null and nameOrCode != ''">
AND (CODE like CONCAT('%',#{nameOrCode},'%') or NAME like CONCAT('%',#{equimentName},'%'))
</if>
<if test="maintenance != 'all' "> <if test="maintenance != 'all' ">
AND maintenance_unit = #{maintenance} AND maintenance_unit = #{maintenance}
</if> </if>
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<result property="eqtype" column="eqtype"></result> <result property="eqtype" column="eqtype"></result>
<result property="bizOrgCode" column="bizOrgCode"></result> <result property="bizOrgCode" column="bizOrgCode"></result>
<result property="bizOrgName" column="bizOrgName"></result> <result property="bizOrgName" column="bizOrgName"></result>
<result property="belongBuildName" column="belongBuildName"></result>
</resultMap> </resultMap>
<select id="getEquiplistBySystemId" resultMap="EquiplistBySystemId"> <select id="getEquiplistBySystemId" resultMap="EquiplistBySystemId">
...@@ -1918,6 +1919,7 @@ ...@@ -1918,6 +1919,7 @@
wle.img, wle.img,
wled.NAME equipmentName, wled.NAME equipmentName,
concat_ws('-',wlws.full_name,wled.area) as full_name, concat_ws('-',wlws.full_name,wled.area) as full_name,
wlws.name as belongBuildName,
wlun.NAME unitName, wlun.NAME unitName,
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,wles.system_id)) (SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,wles.system_id))
as systemName, as systemName,
...@@ -1990,6 +1992,9 @@ ...@@ -1990,6 +1992,9 @@
<if test="equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''"> <if test="equipTypeAmountPage.equipmentName!=null and equipTypeAmountPage.equipmentName!=''">
AND wled.name LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%') AND wled.name LIKE CONCAT('%',#{equipTypeAmountPage.equipmentName},'%')
</if> </if>
<if test="equipTypeAmountPage.nameOrCode!=null and equipTypeAmountPage.nameOrCode!=''">
AND (wled.name LIKE CONCAT('%',#{equipTypeAmountPage.nameOrCode},'%') or wles.code LIKE CONCAT('%',#{equipTypeAmountPage.nameOrCode},'%'))
</if>
<if test="equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''"> <if test="equipTypeAmountPage.code!=null and equipTypeAmountPage.code!=''">
AND wles.code LIKE CONCAT('%',#{equipTypeAmountPage.code},'%') AND wles.code LIKE CONCAT('%',#{equipTypeAmountPage.code},'%')
</if> </if>
......
...@@ -125,6 +125,45 @@ ...@@ -125,6 +125,45 @@
</if> </if>
</where> </where>
</select> </select>
<select id="querySpecialChildrenListByName" resultType="hashmap">
SELECT
*
FROM
(
SELECT
a.instance_id as id,
a.instance_id AS instanceId,
a.group_code AS groupCode,
a.group_type AS groupType,
wlss.scene_id as sceneId,
MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS name,
MAX( CASE WHEN a.field_name = 'code' THEN a.field_value END ) AS code,
MAX( CASE WHEN a.field_name = 'isRisk' THEN a.field_value END ) AS isRisk,
MAX( CASE WHEN a.field_name = 'address' THEN a.field_value END ) AS address,
MAX( CASE WHEN a.field_name = 'bizOrgCode' THEN a.field_value END ) AS bizOrgCode,
MAX( CASE WHEN a.field_name = 'bizOrgName' THEN a.field_value END ) AS bizOrgName
FROM
`wl_form_instance` a
LEFT JOIN wl_source_scene wlss ON wlss.source_id = a.instance_id
GROUP BY
a.instance_id
) sa
<where>
<if test="parentId != null and parentId !=''">
and sa.parentId = #{parentId}
</if>
<if test="bizOrgCode != null and bizOrgCode !=''">
and sa.bizOrgCode like CONCAT(#{bizOrgCode},'%')
</if>
<if test="name != null and name !=''">
and sa.instanceName like CONCAT('%', #{name}, '%')
</if>
</where>
</select>
<select id="queryPage" resultType="hashmap"> <select id="queryPage" resultType="hashmap">
select * from (SELECT select * from (SELECT
a.instance_id AS instanceId, a.instance_id AS instanceId,
......
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