Commit 0938c468 authored by KeYong's avatar KeYong

修改bug

parent cac12356
......@@ -51,5 +51,5 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
List<Map<String, Object>> getWaterTypeByBizOrgCode(String bizOrgCode);
Page<WaterResourceDto> pageByDefect(Page<WaterResourceDto> page, @Param("nameOrCode") String nameOrCode, @Param("bizOrgCode") String bizOrgCode);
Page<WaterResourceDto> pageByDefect(Page<WaterResourceDto> page, @Param("nameOrCode") String nameOrCode, @Param("bizOrgCode") String bizOrgCode, @Param("systemName") String systemName);
}
......@@ -182,7 +182,14 @@
<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="nameOrCode != null and nameOrCode != ''">
AND (
name like concat('%', #{nameOrCode}, '%') or equip_code like concat('%', #{nameOrCode}, '%')
)
</if>
<if test="systemName != null and systemName != ''">
AND belong_fighting_system like concat('%', #{systemName}, '%')
</if>
<if test="bizOrgCode != null and bizOrgCode != ''">and biz_org_code like concat( #{bizOrgCode}, '%')</if>
order by cb_water_resource.rec_date desc
</select>
......
......@@ -487,7 +487,8 @@ public class WaterResourceController extends BaseController {
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) {
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
@RequestParam(value = "systemName", required = false) String systemName) {
ReginParams reginParams = getSelectedOrgInfo();
if (StringUtils.isEmpty(bizOrgCode)) {
if (ObjectUtils.isEmpty(reginParams) || ObjectUtils.isEmpty(reginParams.getPersonIdentity()) || StringUtils.isEmpty(reginParams.getPersonIdentity().getBizOrgCode())) {
......@@ -498,7 +499,7 @@ public class WaterResourceController extends BaseController {
Page<WaterResourceDto> page = new Page<>();
page.setCurrent(pageNum);
page.setSize(pageSize);
Page<WaterResourceDto> waterResourceDtoPage = waterResourceServiceImpl.pageByDefect(page, nameOrCode, bizOrgCode);
Page<WaterResourceDto> waterResourceDtoPage = waterResourceServiceImpl.pageByDefect(page, nameOrCode, bizOrgCode, systemName);
return ResponseHelper.buildResponse(waterResourceDtoPage);
}
......
......@@ -97,8 +97,9 @@ 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);
String bizOrgCode,
String systemName) {
return this.waterResourceMapper.pageByDefect(page, nameOrCode, bizOrgCode, systemName);
}
/**
......
......@@ -273,4 +273,13 @@
REPLACE INTO `wl_form_group`(`id`, `group_name`, `group_code`, `group_type`, `allow_operation`, `creator_id`, `create_date`) VALUES (132828674827, '消防水池装置', '92010700', 'equip', 'edit,delete', 2581805, '2022-10-09 03:36:44');
</sql>
</changeSet>
<changeSet author="keyong" id="202210131888">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_equipment"/>
</preConditions>
<comment>添加基础字段</comment>
<sql>
REPLACE INTO `wl_equipment`(`id`, `name`, `code`, `category_id`, `country`, `maintenance_cycle`, `check_cycle`, `remark`, `management_style`, `reviser_id`, `date_updated`, `creater_id`, `unit_id`, `made_in`, `manufacturer`, `img`, `video`, `mark_specification`, `supplier_id`, `pref_quota`, `create_date`, `company_name`, `department_orgcode`, `department_name`, `inspection_spec`, `maintenance_spec`, `area`, `is_iot`, `clean_type`, `expiry_date`) VALUES (1578945741864742914, '消防水箱', '93060600HQK44', 1547790305762250754, NULL, NULL, NULL, NULL, NULL, NULL, '2022-10-09 11:10:28', NULL, 55, NULL, NULL, 'upload/state_grid/studio_normalapp_3056965/D0D194CE38EA9F604B401F1BFCC31975.jpg', NULL, NULL, NULL, NULL, '2022-10-09 11:09:35', NULL, NULL, NULL, NULL, NULL, NULL, '1', '0', NULL);
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -13,7 +13,7 @@
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 = maintenance_unit) as maintenanceUnit,
(select name from wl_equipment_category where id = system_type) as systemType,
wec.name as systemType,
sys.system_type as systemTypeCode,
sys.construction_unit as constructionUnitCode,
sys.maintenance_unit as maintenanceUnitCode,
......@@ -29,6 +29,7 @@
from
f_fire_fighting_system as sys
left join wl_warehouse_structure wws on wws.id = sys.contro_box_build
LEFT JOIN wl_equipment_category wec ON wec.id = sys.system_type
where 1=1
<if test="equimentName != null and equimentName !='' and equimentCode !='null' ">
AND sys.NAME like CONCAT('%',#{equimentName},'%')
......@@ -37,7 +38,7 @@
AND sys.CODE like CONCAT('%',#{equimentCode},'%')
</if>
<if test="nameOrCode != null and nameOrCode != ''">
AND (sys.CODE like CONCAT('%',#{nameOrCode},'%') or sys.NAME like CONCAT('%',#{equimentName},'%'))
AND (sys.CODE like CONCAT('%',#{nameOrCode},'%') or sys.NAME like CONCAT('%',#{nameOrCode},'%') OR wec.`name` like CONCAT('%',#{nameOrCode},'%'))
</if>
<if test="construction != 'all' ">
AND sys.CONSTRUCTION_UNIT = #{construction}
......
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