Commit d7ed22a4 authored by xixinzhao's avatar xixinzhao

消防系统列表增加分类条件

parent b34dcfc4
......@@ -117,4 +117,8 @@ public class EquipmentManageVo implements Serializable {
private Integer equipCount;
private Long instanceId;
private String bizOrgCode;
private String bizOrgName;
}
......@@ -52,10 +52,11 @@ public class EquipmentManageController extends AbstractBaseController{
@RequestParam(value = "construction",required = false) String construction,
@RequestParam(value = "maintenance",required = false) String maintenance,
@RequestParam(value = "maintenance",required = false) String bizOrgCode,
@RequestParam(value = "maintenance",required = false) String formGroupId,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int pageSize
) {
return equipmentManageService.queryEquipmenInfoAndCount(equipmentName,equipmentCode,construction,maintenance,bizOrgCode,current,pageSize);
return equipmentManageService.queryEquipmenInfoAndCount(equipmentName,equipmentCode,construction,maintenance,bizOrgCode,formGroupId,current,pageSize);
}
@GetMapping(value = "/getUtils")
......
......@@ -328,10 +328,11 @@ public class FireFightingSystemController extends AbstractBaseController {
@RequestParam(value = "construction", required = false) String construction,
@RequestParam(value = "maintenance", required = false) String maintenance,
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
@RequestParam(value = "formGroupId", required = false) String formGroupId,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int pageSize
) {
return fireFightingSystemService.queryEquipmenInfoAndCount(equipmentName, equipmentCode, construction, maintenance, bizOrgCode, current, pageSize);
return fireFightingSystemService.queryEquipmenInfoAndCount(equipmentName, equipmentCode, construction, maintenance, bizOrgCode, formGroupId, current, pageSize);
}
/**
......
......@@ -26,7 +26,7 @@ public interface EquipmentManageService extends IService<EquipmentManageEntity>
* @param pageSize
* @return
*/
Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, int spage, int pageSize);
Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId , int spage, int pageSize);
/**
* 获取下拉菜单数据
......
......@@ -33,7 +33,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @param pageSize
* @return
*/
Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, int current, int pageSize);
Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId, int current, int pageSize);
FireFightingSystemEntity getOneById(Long id);
/**
......
......@@ -62,7 +62,8 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
private String fireSystemId;
@Override
public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, int current, int pageSize) {
public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance,
String bizOrgCode, String formGroupId, int current, int pageSize) {
HttpServletRequest request = null;
Map map = new HashMap<String, Object>();
map.put("equimentName", equimentName);
......@@ -72,6 +73,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
map.put("spage", current);
map.put("pageSize", pageSize);
map.put("bizOrgCode", bizOrgCode);
map.put("formGroupId", formGroupId);
List<EquipmentManageVo> dataList = equipmentManageMapper.queryEquipmenInfo(map);
Long count = equipmentManageMapper.queryEquipmenCount(map);
map.clear();
......
......@@ -153,8 +153,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
@Override
public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, int current, int pageSize) {
Map<String, Object> map = equipmentManageService.queryEquipmenInfoAndCount(equimentName, equimentCode, construction, maintenance, bizOrgCode, current, pageSize);
public Map<String, Object> queryEquipmenInfoAndCount(String equimentName, String equimentCode, String construction, String maintenance, String bizOrgCode, String formGroupId, int current, int pageSize) {
Map<String, Object> map = equipmentManageService.queryEquipmenInfoAndCount(equimentName, equimentCode, construction, maintenance, bizOrgCode, formGroupId, current, pageSize);
List<EquipmentManageVo> dataList = (List<EquipmentManageVo>) map.get("dataList");
StringBuilder stb = new StringBuilder();
dataList.forEach(y -> {
......
......@@ -18,6 +18,8 @@
construction_unit as constructionUnitCode,
maintenance_unit as maintenanceUnitCode,
maintenance_frequency as maintenanceFrequency,
biz_org_code as bizOrgCode,
biz_org_name as bizOrgName,
scene_id as sceneId,
(select count(1) from `wl_equipment_specific` es where find_in_set(sys.id,es.system_id) and es.single = true ) equipCount
from
......@@ -35,9 +37,12 @@
<if test="maintenance != 'all' ">
AND MAINTENANCE_UNIT = #{maintenance}
</if>
<if test="bizOrgCode != 'null' and bizOrgCode != ''">
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like CONCAT(#{bizOrgCode},'%')
</if>
<if test="formGroupId != null and formGroupId != '' and formGroupId != '-1'">
AND form_group_id = #{formGroupId}
</if>
order by id DESC
LIMIT #{spage},#{pageSize}
</select>
......@@ -59,9 +64,12 @@
<if test="maintenance != 'all' ">
AND maintenance_unit = #{maintenance}
</if>
<if test="bizOrgCode != 'null' and bizOrgCode != ''">
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like CONCAT(#{bizOrgCode},'%')
</if>
<if test="formGroupId != null and formGroupId != '' and formGroupId != '-1'">
AND form_group_id = #{formGroupId}
</if>
</select>
<select id="getUtils" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo">
select
......
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