Commit 83266d70 authored by zhangsen's avatar zhangsen

系统查询报错

parent c5f9e3ec
...@@ -514,7 +514,7 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -514,7 +514,7 @@ public class FireFightingSystemController extends AbstractBaseController {
@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, @RequestParam(value = "nameOrCode", required = false) String nameOrCode,
@ApiParam(value = "缺陷管理新增页面用,其余地方可忽略 1-是缺陷管理 0-不是") @RequestParam(required = false) Integer isDefect @ApiParam(value = "缺陷管理新增页面用,其余地方可忽略 1-是缺陷管理 0-不是") @RequestParam(required = false) Integer isDefect
) { ) {
if (null != isDefect && 1 == isDefect) { if (null != isDefect && 1 == isDefect) {
......
...@@ -4,54 +4,54 @@ ...@@ -4,54 +4,54 @@
<select id="queryEquipmenInfo" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo"> <select id="queryEquipmenInfo" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo">
select select
sys.id as id, sys.id as id,
name as name, sys.name as name,
code as code, sys.code as code,
form_group_id, sys.form_group_id,
instance_id, sys.instance_id,
date_format(install_date,'%Y-%m-%d') AS installDate, date_format(sys.install_date,'%Y-%m-%d') AS installDate,
date_format(first_maintenance_date,'%Y-%m-%d') AS firstMaintenanceDate, date_format(sys.first_maintenance_date,'%Y-%m-%d') AS firstMaintenanceDate,
charge_person_name as chargePerson, sys.charge_person_name as chargePerson,
(select name from wl_manufacturer_info where id = construction_unit) as constructionUnit, (select name from wl_manufacturer_info where id = construction_unit) as constructionUnit,
(select name from wl_manufacturer_info where id = maintenance_unit) as maintenanceUnit, (select name from wl_manufacturer_info where id = maintenance_unit) as maintenanceUnit,
(select name from wl_equipment_category where id = system_type) as systemType, (select name from wl_equipment_category where id = system_type) as systemType,
system_type as systemTypeCode, sys.system_type as systemTypeCode,
construction_unit as constructionUnitCode, sys.construction_unit as constructionUnitCode,
maintenance_unit as maintenanceUnitCode, sys.maintenance_unit as maintenanceUnitCode,
maintenance_frequency as maintenanceFrequency, sys.maintenance_frequency as maintenanceFrequency,
biz_org_code as bizOrgCode, sys.biz_org_code as bizOrgCode,
biz_org_name as bizOrgName, sys.biz_org_name as bizOrgName,
scene_id as sceneId, sys.scene_id as sceneId,
design_org, sys.design_org,
lead_designer, sys.lead_designer,
design_org_telephone, sys.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 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 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 equimentName !='' ">
AND NAME like CONCAT('%',#{equimentName},'%') AND sys.NAME like CONCAT('%',#{equimentName},'%')
</if> </if>
<if test="equimentCode != 'null' "> <if test="equimentCode != null and equimentCode !='' ">
AND CODE like CONCAT('%',#{equimentCode},'%') AND sys.CODE like CONCAT('%',#{equimentCode},'%')
</if> </if>
<if test="nameOrCode != null and nameOrCode != ''"> <if test="nameOrCode != null and nameOrCode != ''">
AND (CODE like CONCAT('%',#{nameOrCode},'%') or NAME like CONCAT('%',#{equimentName},'%')) AND (sys.CODE like CONCAT('%',#{nameOrCode},'%') or sys.NAME like CONCAT('%',#{equimentName},'%'))
</if> </if>
<if test="construction != 'all' "> <if test="construction != 'all' ">
AND CONSTRUCTION_UNIT = #{construction} AND sys.CONSTRUCTION_UNIT = #{construction}
</if> </if>
<if test="maintenance != 'all' "> <if test="maintenance != 'all' ">
AND MAINTENANCE_UNIT = #{maintenance} AND sys.MAINTENANCE_UNIT = #{maintenance}
</if> </if>
<if test="bizOrgCode != null and bizOrgCode != ''"> <if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like CONCAT(#{bizOrgCode},'%') AND sys.biz_org_code like CONCAT(#{bizOrgCode},'%')
</if> </if>
<if test="formGroupId != null and formGroupId != '' and formGroupId != '-1'"> <if test="formGroupId != null and formGroupId != '' and formGroupId != '-1'">
AND form_group_id = #{formGroupId} AND sys.form_group_id = #{formGroupId}
</if> </if>
order by id DESC order by sys.id DESC
LIMIT #{spage},#{pageSize} LIMIT #{spage},#{pageSize}
</select> </select>
<select id="queryEquipmenCount" resultType="long"> <select id="queryEquipmenCount" resultType="long">
......
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