Commit 87fa4dca authored by wujiang's avatar wujiang

特种设备列表筛选

parent c4052756
...@@ -62,9 +62,12 @@ public class TzsJgBasicInfoDto extends BaseDto { ...@@ -62,9 +62,12 @@ public class TzsJgBasicInfoDto extends BaseDto {
@ApiModelProperty(value = "设备详细使用地址") @ApiModelProperty(value = "设备详细使用地址")
private String address; private String address;
@ApiModelProperty(value = "管辖分局组织机构代码")
private String orgBranchCode;
@ApiModelProperty(value = "监督管理信息") @ApiModelProperty(value = "监督管理信息")
private TzsJgSuperviseInfo superviseInfo; private TzsJgSuperviseInfo superviseInfo;
@ApiModelProperty(value = "设计信息") @ApiModelProperty(value = "设计信息")
private TzsJgDesignInfo designInfo; private TzsJgDesignInfo designInfo;
......
...@@ -5,27 +5,104 @@ ...@@ -5,27 +5,104 @@
<select id="page" <select id="page"
resultType="com.yeejoin.amos.boot.module.tzs.api.dto.TzsJgBasicInfoDto"> resultType="com.yeejoin.amos.boot.module.tzs.api.dto.TzsJgBasicInfoDto">
SELECT SELECT
supervise.sequence_code, supervise.sequence_code,
supervise.supervise_code, supervise.supervise_code,
supervise.org_branch_name, supervise.org_branch_name,
use1.use_unit_name, use1.use_unit_name,
maintenance.me_unit_name, maintenance.me_unit_name,
use1.estate_unit_name, use1.estate_unit_name,
registration.equ_code, registration.equ_code,
registration.equ_category, registration.equ_category,
registration.equ_define, registration.equ_define,
other.code96333, other.code96333,
registration.use_org_code, registration.use_org_code,
produce.factory_num, produce.factory_num,
CONCAT(use1.province,'/',use1.city,'/',use1.county )AS area, CONCAT(use1.province,'/',use1.city,'/',use1.county)AS area,
use1.address use1.address
FROM tzs_jg_supervise_info supervise FROM tzs_jg_supervise_info supervise
LEFT JOIN tzs_jg_use_info use1 ON use1.sequence_code = supervise.sequence_code LEFT JOIN
LEFT JOIN tzs_jg_maintenance_info maintenance ON maintenance.sequence_code = supervise.sequence_code tzs_jg_use_info use1 ON use1.sequence_code =
LEFT JOIN tzs_jg_registration_info registration ON registration.sequence_code = supervise.sequence_code supervise.sequence_code
LEFT JOIN tzs_jg_other_info other ON other.sequence_code = supervise.sequence_code LEFT JOIN tzs_jg_maintenance_info maintenance ON
LEFT JOIN tzs_jg_produce_info produce ON produce.sequence_code = supervise.sequence_code maintenance.sequence_code
= supervise.sequence_code
LEFT JOIN
tzs_jg_registration_info registration ON
registration.sequence_code =
supervise.sequence_code
LEFT JOIN tzs_jg_other_info other ON
other.sequence_code =
supervise.sequence_code
LEFT JOIN
tzs_jg_produce_info produce ON produce.sequence_code =
supervise.sequence_code
<where>
<if
test="tzsJgBasicInfoDto.orgBranchName!=null and tzsJgBasicInfoDto.orgBranchName!='' ">
AND supervise.org_branch_name LIKE
CONCAT('%',#{tzsJgBasicInfoDto.orgBranchName},'%')
</if>
<if
test="tzsJgBasicInfoDto.useUnitName!=null and tzsJgBasicInfoDto.useUnitName!='' ">
AND use1.use_unit_name LIKE
CONCAT('%',#{tzsJgBasicInfoDto.useUnitName},'%')
</if>
<if
test="tzsJgBasicInfoDto.meUnitName!=null and tzsJgBasicInfoDto.meUnitName!='' ">
AND maintenance.me_unit_name LIKE
CONCAT('%',#{tzsJgBasicInfoDto.meUnitName},'%')
</if>
<if
test="tzsJgBasicInfoDto.estateUnitName!=null and tzsJgBasicInfoDto.estateUnitName!='' ">
AND supervise.estate_unit_name LIKE
CONCAT('%',#{tzsJgBasicInfoDto.estateUnitName},'%')
</if>
<if
test="tzsJgBasicInfoDto.equCode!=null and tzsJgBasicInfoDto.equCode!='' ">
AND registration.equ_code LIKE
CONCAT('%',#{tzsJgBasicInfoDto.equCode},'%')
</if>
<if
test="tzsJgBasicInfoDto.equCategory!=null and tzsJgBasicInfoDto.equCategory!='' ">
AND registration.equ_category LIKE
CONCAT('%',#{tzsJgBasicInfoDto.equCategory},'%')
</if>
<if
test="tzsJgBasicInfoDto.equDefine!=null and tzsJgBasicInfoDto.equDefine!='' ">
AND supervise.equ_define LIKE
CONCAT('%',#{tzsJgBasicInfoDto.equDefine},'%')
</if>
<if
test="tzsJgBasicInfoDto.code96333!=null and tzsJgBasicInfoDto.code96333!='' ">
AND other.code96333 LIKE
CONCAT('%',#{tzsJgBasicInfoDto.code96333},'%')
</if>
<if
test="tzsJgBasicInfoDto.useOrgCode!=null and tzsJgBasicInfoDto.useOrgCode!='' ">
AND registration.use_org_code LIKE
CONCAT('%',#{tzsJgBasicInfoDto.useOrgCode},'%')
</if>
<if
test="tzsJgBasicInfoDto.factoryNum!=null and tzsJgBasicInfoDto.factoryNum!='' ">
AND produce.factory_num LIKE
CONCAT('%',#{tzsJgBasicInfoDto.factoryNum},'%')
</if>
<if
test="tzsJgBasicInfoDto.area!=null and tzsJgBasicInfoDto.area!='' ">
AND CONCAT(use1.province,'/',use1.city,'/',use1.county) LIKE
CONCAT('%',#{tzsJgBasicInfoDto.area},'%')
</if>
<if
test="tzsJgBasicInfoDto.address!=null and tzsJgBasicInfoDto.address!='' ">
AND use1.address LIKE
CONCAT('%',#{tzsJgBasicInfoDto.address},'%')
</if>
<if
test="tzsJgBasicInfoDto.orgBranchCode!=null and tzsJgBasicInfoDto.orgBranchCode!='' ">
AND supervise.org_branch_code LIKE
CONCAT('%',#{tzsJgBasicInfoDto.orgBranchCode},'%')
</if>
</where>
</select> </select>
</mapper> </mapper>
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