Commit d71b080b authored by tangwei's avatar tangwei

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents d867eb0b a8832769
...@@ -806,6 +806,9 @@ LEFT JOIN ( ...@@ -806,6 +806,9 @@ LEFT JOIN (
#{bizOrgType} #{bizOrgType}
</foreach> </foreach>
</if> </if>
<if test="bizOrgCode != null and bizOrgCode != ''">
and usr.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
order by usr.rec_date order by usr.rec_date
</select> </select>
......
...@@ -533,27 +533,27 @@ public class EquipmentDetailController extends AbstractBaseController { ...@@ -533,27 +533,27 @@ public class EquipmentDetailController extends AbstractBaseController {
// List<EquipmentDetailDownloadTemplateVO> equipmentDetailDownloads = new ArrayList<>(); // List<EquipmentDetailDownloadTemplateVO> equipmentDetailDownloads = new ArrayList<>();
// ExcelUtils.exportExcel(equipmentDetailDownloads, "设备信息", "设备信息", EquipmentDetailDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response); // ExcelUtils.exportExcel(equipmentDetailDownloads, "设备信息", "设备信息", EquipmentDetailDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response);
try { // try {
// 判读机场服务是否在线 // // 判读机场服务是否在线
ExcelEnums excelEnums; // ExcelEnums excelEnums;
ResponseModel<String[]> result = jcsFeign.getEquipmentInfo(getAppKey(), getProduct(), getToken(), null, "getEquipCompany"); // ResponseModel<String[]> result = jcsFeign.getEquipmentInfo(getAppKey(), getProduct(), getToken(), null, "getEquipCompany");
if (200 == result.getStatus()) { // if (200 == result.getStatus()) {
excelEnums = ExcelEnums.getByKey(ExcelEnums.XFZB.getType()); // excelEnums = ExcelEnums.getByKey(ExcelEnums.XFZB.getType());
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType()); // ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
String url = excelDto.getClassUrl(); // String url = excelDto.getClassUrl();
Class<?> clz = Class.forName(url); // Class<?> clz = Class.forName(url);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, clz, getToken(), // ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, clz, getToken(),
getAppKey(), getProduct(), true); // getAppKey(), getProduct(), true);
} // }
//
} catch (Exception e) { // } catch (Exception e) {
ExcelEnums excelEnums = ExcelEnums.getByKey(ExcelEnums.XFZBSINGLE.getType()); ExcelEnums excelEnums = ExcelEnums.getByKey(ExcelEnums.XFZBSINGLE.getType());
ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType()); ExcelDto excelDto = new ExcelDto(excelEnums.getFileName(), excelEnums.getSheetName(), excelEnums.getClassUrl(), excelEnums.getType());
String url = excelDto.getClassUrl(); String url = excelDto.getClassUrl();
Class<?> clz = Class.forName(url); Class<?> clz = Class.forName(url);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, clz, getToken(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, clz, getToken(),
getAppKey(), getProduct(), true); getAppKey(), getProduct(), true);
} // }
} }
/** /**
......
package com.yeejoin.equipmanage.dto; package com.yeejoin.equipmanage.dto;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.equipmanage.utils.ExplicitConstraint;
import com.yeejoin.equipmanage.utils.RoleNameExplicitConstraint;
/** /**
* @author litw * @author litw
...@@ -48,4 +50,14 @@ public class EquipmentDetailExcelSingleTemplateDto { ...@@ -48,4 +50,14 @@ public class EquipmentDetailExcelSingleTemplateDto {
//@Excel(name = "消防系统编码", width = 30, orderNum = "10") //@Excel(name = "消防系统编码", width = 30, orderNum = "10")
private String fightingSysCodes; private String fightingSysCodes;
@ExplicitConstraint(indexNum = 10, sourceClass = RoleNameExplicitConstraint.class,method="getEquipFireTeam") //动态下拉内容
@ExcelProperty(value = "所属队伍", index = 10)
//@Excel(name = "所属队伍",width = 30,orderNum = "11")
private String fireTeam;
//动态下拉内容
@ExplicitConstraint(indexNum = 11, sourceClass = RoleNameExplicitConstraint.class,method="getEquipCompany") //动态下拉内容
@ExcelProperty(value = "所属单位", index = 11)
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private String companyName;
} }
...@@ -1152,13 +1152,19 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1152,13 +1152,19 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备 // 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备
Map<String, Long> comMap = companyList.stream().collect(Collectors.toMap(BuildingTreeVo::getBizOrgCode, BuildingTreeVo::getId)); Map<String, Long> comMap = companyList.stream().collect(Collectors.toMap(BuildingTreeVo::getBizOrgCode, BuildingTreeVo::getId));
buildingTreeVos.forEach(b -> { //增加了一层对树的过滤,过滤掉指定公司外的其他建筑。
List<BuildingTreeVo> collect = buildingTreeVos.stream().filter(build ->companyList.stream().map(m -> {
String bizOrgCode = m.getBizOrgCode();
return bizOrgCode;
}).collect(Collectors.toList()).contains(build.getBizOrgCode())).collect(Collectors.toList());
collect.forEach(b -> {
b.setParentId("0".equals(b.getParentId()) ? String.valueOf(comMap.get(b.getBizOrgCode())) : b.getParentId()); b.setParentId("0".equals(b.getParentId()) ? String.valueOf(comMap.get(b.getBizOrgCode())) : b.getParentId());
b.setDetailPaneApi(address); b.setDetailPaneApi(address);
b.setApiUrl(apiUrl); b.setApiUrl(apiUrl);
}); });
// 4.组装树 // 4.组装树
companyList.addAll(buildingTreeVos); companyList.addAll(collect);
return companyList; return companyList;
} }
......
...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.dto.IotSystemAlarmRo; import com.yeejoin.amos.boot.module.jcs.api.dto.IotSystemAlarmRo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel; import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.equipmanage.common.dto.UserDto; import com.yeejoin.equipmanage.common.dto.UserDto;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecific; import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm; import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm;
...@@ -16,8 +17,11 @@ import com.yeejoin.equipmanage.common.enums.AlarmCleanTypeEnum; ...@@ -16,8 +17,11 @@ import com.yeejoin.equipmanage.common.enums.AlarmCleanTypeEnum;
import com.yeejoin.equipmanage.common.enums.AlarmStatusEnum; import com.yeejoin.equipmanage.common.enums.AlarmStatusEnum;
import com.yeejoin.equipmanage.common.enums.AlarmTypeEnum; import com.yeejoin.equipmanage.common.enums.AlarmTypeEnum;
import com.yeejoin.equipmanage.common.enums.TopicEnum; import com.yeejoin.equipmanage.common.enums.TopicEnum;
import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil; import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.Token;
import com.yeejoin.equipmanage.fegin.JcsFeign; import com.yeejoin.equipmanage.fegin.JcsFeign;
import com.yeejoin.equipmanage.fegin.SystemctlFeign;
import com.yeejoin.equipmanage.mapper.ConfirmAlarmMapper; import com.yeejoin.equipmanage.mapper.ConfirmAlarmMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper; import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper; import com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper;
...@@ -85,6 +89,12 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -85,6 +89,12 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Value("${window.vedioFormat}") @Value("${window.vedioFormat}")
String vedioFormat; String vedioFormat;
@Value("${isSendApp}")
private Boolean isSendApp;
@Autowired
private SystemctlFeign systemctlFeign;
@Autowired @Autowired
private RuleConfirmAlarmService ruleConfirmAlamService; private RuleConfirmAlarmService ruleConfirmAlamService;
...@@ -96,6 +106,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -96,6 +106,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Override @Override
public Map<String, Object> getDetailsById(Long alarmId, Long equipId, String type, String area) { public Map<String, Object> getDetailsById(Long alarmId, Long equipId, String type, String area) {
final String videoType = "video"; final String videoType = "video";
...@@ -177,10 +188,15 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -177,10 +188,15 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
} }
} }
if (isBatch == 1 && CollectionUtils.isNotEmpty(list)) { if (isBatch == 1 && CollectionUtils.isNotEmpty(list)) {
list.stream().forEach(x -> webMqttHandler.publish(TopicEnum.EQYQR.getTopic(), JSON.parseObject(JSON.toJSONString(x), HashMap.class))); list.stream().forEach(x ->{
webMqttHandler.publish(TopicEnum.EQYQR.getTopic(), JSON.parseObject(JSON.toJSONString(x), HashMap.class));
x.setAlarmReason(ent.getAlarmReason());
// syncConfirmAlarmMsgToSystemctl(x);
});
} else { } else {
// mqttSendGateway.sendToMqtt(TopicEnum.EQYQR.getTopic(), JSON.toJSONString(ent)); // mqttSendGateway.sendToMqtt(TopicEnum.EQYQR.getTopic(), JSON.toJSONString(ent));
webMqttHandler.publish(TopicEnum.EQYQR.getTopic(), JSON.parseObject(JSON.toJSONString(ent), HashMap.class)); webMqttHandler.publish(TopicEnum.EQYQR.getTopic(), JSON.parseObject(JSON.toJSONString(ent), HashMap.class));
// syncConfirmAlarmMsgToSystemctl(ent);
} }
// syncDataService.syncCreatedSendAlarmReport(ent); // syncDataService.syncCreatedSendAlarmReport(ent);
} }
...@@ -200,6 +216,39 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ ...@@ -200,6 +216,39 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
} }
} }
public void syncConfirmAlarmMsgToSystemctl(EquipmentSpecificAlarmLog equipmentSpecificAlarmLog) {
try {
MessageModel model = new MessageModel();
String alarmReason = ValidationUtil.isEmpty(equipmentSpecificAlarmLog.getAlarmReason()) ? "" : equipmentSpecificAlarmLog.getAlarmReason();
if (alarmReason.contains(":")) {
String[] split = alarmReason.split(":");
alarmReason = split[1];
}
model.setTitle(equipmentSpecificAlarmLog.getEquipmentSpecificIndexName());
String body = String.format("警情类型:%s;报警设备:%s;报警位置:%s;报警原因:%s;报警时间:%s",
equipmentSpecificAlarmLog.getEquipmentSpecificIndexName(), equipmentSpecificAlarmLog.getEquipmentSpecificName(),
equipmentSpecificAlarmLog.getLocation(), alarmReason,
DateUtils.date2LongStr(equipmentSpecificAlarmLog.getCreateDate()));
model.setBody(body);
model.setMsgType("iotMonitor");
if (isSendApp){
model.setIsSendApp(true);
model.setTerminal("APP/WEB");
} else {
model.setIsSendApp(false);
model.setTerminal("WEB");
}
model.setIsSendWeb(true);
model.setCategory(1);
model.setRelationId(String.valueOf(equipmentSpecificAlarmLog.getId()));
Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
log.debug(String.format("调用平台消息服务成功:%s", JSON.toJSONString(model)));
} catch (Exception e) {
log.error("告警消息同步平台失败:syncSystemctlMsg,===>>>" + e.getMessage());
}
}
@Override @Override
public Integer getFireAlarm() { public Integer getFireAlarm() {
return confirmAlarmMapper.getFireAlarm(); return confirmAlarmMapper.getFireAlarm();
......
...@@ -983,12 +983,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -983,12 +983,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override @Override
public Object getEquipmentTypeAndCount(String bizOrgCode) { public Object getEquipmentTypeAndCount(String bizOrgCode) {
if (redisUtils.hasKey(equipTypeAndCount + bizOrgCode)) { // if (redisUtils.hasKey(equipTypeAndCount + bizOrgCode)) {
return JSONArray.parseArray( // return JSONArray.parseArray(
JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class); // JSONArray.toJSONString(redisUtils.get(equipTypeAndCount + bizOrgCode)), EquipmentCategory.class);
} else { // } else {
return refreshEquipmentTypeAndCount(bizOrgCode); return refreshEquipmentTypeAndCount(bizOrgCode);
} // }
} }
@Override @Override
...@@ -999,6 +999,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -999,6 +999,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
} }
List<EquipmentCategory> equipmentTypeList = responseList.stream() List<EquipmentCategory> equipmentTypeList = responseList.stream()
.filter(i -> !i.getCode().startsWith("2") && "2".equals(i.getIndustryCode())) .filter(i -> !i.getCode().startsWith("2") && "2".equals(i.getIndustryCode()))
.filter(m->!m.getCode().startsWith("9306") && "2".equals(m.getIndustryCode()))
.collect(Collectors.toList()); .collect(Collectors.toList());
List<EquipmentCategory> list = typeListTree(equipmentTypeList, bizOrgCode, SourceTypeEnum.EQUIPMENT); List<EquipmentCategory> list = typeListTree(equipmentTypeList, bizOrgCode, SourceTypeEnum.EQUIPMENT);
redisUtils.set(equipTypeAndCount + bizOrgCode, list, 86400); redisUtils.set(equipTypeAndCount + bizOrgCode, list, 86400);
......
...@@ -907,13 +907,14 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -907,13 +907,14 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentSpecificAlarmLog.setEquipmentSpecificCode(equipmentSpecificAlarm.getCode()); equipmentSpecificAlarmLog.setEquipmentSpecificCode(equipmentSpecificAlarm.getCode());
equipmentSpecificAlarmLog.setBuildId(equipmentSpecificAlarm.getBuildId()); equipmentSpecificAlarmLog.setBuildId(equipmentSpecificAlarm.getBuildId());
equipmentSpecificAlarmLog.setStatus(equipmentSpecificAlarm.getStatus()); equipmentSpecificAlarmLog.setStatus(equipmentSpecificAlarm.getStatus());
equipmentSpecificAlarmLogService.save(equipmentSpecificAlarmLog); boolean bool = equipmentSpecificAlarmLogService.save(equipmentSpecificAlarmLog);
// 同步告警消息给平台 // 同步告警消息给平台
if (amosSwitch) { if (amosSwitch && bool) {
EquipmentSpecificAlarmLog alarmLog = equipmentSpecificAlarmLogService.getById(equipmentSpecificAlarmLog.getId());
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
syncSystemctlMsg(equipmentSpecificAlarmLog); syncSystemctlMsg(alarmLog);
} }
}).start(); }).start();
} }
......
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d ) d
<where> <where>
<if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">and <if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">
d.warehouseStructureName like d.warehouseStructureName like
concat(concat("%",#{param.warehouseStructureName}),"%") concat(concat("%",#{param.warehouseStructureName}),"%")
</if> </if>
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
left join wl_equipment_specific wles ON wlesa.equipment_specific_id = wles.id left join wl_equipment_specific wles ON wlesa.equipment_specific_id = wles.id
) d ) d
<where> <where>
<if test="warehouseStructureName != null and warehouseStructureName != ''">and d.warehouseStructureName like <if test="warehouseStructureName != null and warehouseStructureName != ''"> d.warehouseStructureName like
concat(concat("%",#{warehouseStructureName}),"%") concat(concat("%",#{warehouseStructureName}),"%")
</if> </if>
<if test="equipCode != null and equipCode != ''">AND d.fireEquipmentCode like <if test="equipCode != null and equipCode != ''">AND d.fireEquipmentCode like
...@@ -348,8 +348,8 @@ ...@@ -348,8 +348,8 @@
wl_equipment_specific_alarm_log wlesal wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id) d LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id) d
WHERE <where>
<if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">and <if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">
d.warehouseStructureName like d.warehouseStructureName like
concat(concat("%",#{param.warehouseStructureName}),"%") concat(concat("%",#{param.warehouseStructureName}),"%")
</if> </if>
...@@ -389,6 +389,8 @@ ...@@ -389,6 +389,8 @@
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND <if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND
d.cleanStatus = '未消除' d.cleanStatus = '未消除'
</if> </if>
</where>
ORDER BY d.createDate DESC ORDER BY d.createDate DESC
</select> </select>
<select id="getAlarmList" resultType="java.util.HashMap"> <select id="getAlarmList" resultType="java.util.HashMap">
...@@ -459,7 +461,7 @@ ...@@ -459,7 +461,7 @@
) d ) d
<where> <where>
<if test="warehouseStructureName != null and warehouseStructureName != ''"> <if test="warehouseStructureName != null and warehouseStructureName != ''">
and d.warehouseStructureName like d.warehouseStructureName like
concat(concat("%",#{warehouseStructureName}),"%") concat(concat("%",#{warehouseStructureName}),"%")
</if> </if>
<if test="equipCode != null and equipCode != ''">AND d.fireEquipmentCode like <if test="equipCode != null and equipCode != ''">AND d.fireEquipmentCode like
...@@ -515,9 +517,8 @@ ...@@ -515,9 +517,8 @@
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d ) d
WHERE 1=1 WHERE
AND d.fireEquipmentName IS NOT NULL d.id = #{id}
AND d.id = #{id}
AND d.type = #{alarmType} AND d.type = #{alarmType}
ORDER BY d.createDate DESC ORDER BY d.createDate DESC
</select> </select>
...@@ -554,9 +555,7 @@ ...@@ -554,9 +555,7 @@
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d ) d
WHERE WHERE
1 = 1 d.equipmentSpecificId = #{id}
AND d.fireEquipmentName IS NOT NULL
AND d.equipmentSpecificId = #{id}
AND d.type = #{alarmType} AND d.type = #{alarmType}
</select> </select>
<select id="getEquipmentAlarmCount" resultType="int"> <select id="getEquipmentAlarmCount" resultType="int">
...@@ -577,9 +576,7 @@ ...@@ -577,9 +576,7 @@
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment we ON wled.equipment_id = we.id LEFT JOIN wl_equipment we ON wled.equipment_id = we.id
) d ) d
WHERE WHERE d.equipmentSpecificId = #{id}
d.fireEquipmentName <![CDATA[<>]]> ''
AND d.equipmentSpecificId = #{id}
AND d.type = #{alarmType} AND d.type = #{alarmType}
</select> </select>
<select id="findByTypeAndDate" resultMap="resultMapDto"> <select id="findByTypeAndDate" resultMap="resultMapDto">
...@@ -659,7 +656,6 @@ ...@@ -659,7 +656,6 @@
</where> </where>
) d ) d
<where> <where>
d.fireEquipmentName IS NOT NULL
<choose> <choose>
<when test="dto.type != null and dto.type != ''"> <when test="dto.type != null and dto.type != ''">
AND d.type = #{dto.type} AND d.type = #{dto.type}
...@@ -797,7 +793,6 @@ ...@@ -797,7 +793,6 @@
</where> </where>
) d ) d
<where> <where>
d.fireEquipmentName IS NOT NULL
<choose> <choose>
<when test="dto.type != null and dto.type != ''"> <when test="dto.type != null and dto.type != ''">
AND d.type = #{dto.type} AND d.type = #{dto.type}
...@@ -958,7 +953,6 @@ ...@@ -958,7 +953,6 @@
</where> </where>
) d ) d
<where> <where>
d.fireEquipmentName IS NOT NULL
<choose> <choose>
<when test="dto.type != null and dto.type != ''"> <when test="dto.type != null and dto.type != ''">
AND d.type = #{dto.type} AND d.type = #{dto.type}
...@@ -1011,7 +1005,7 @@ ...@@ -1011,7 +1005,7 @@
)m )m
<where> <where>
<if test="dto.status != null and dto.status != ''"> <if test="dto.status != null and dto.status != ''">
AND `status`= #{dto.status} `status`= #{dto.status}
</if> </if>
<if test="dto.warehouseStructureName != null and dto.warehouseStructureName != ''"> <if test="dto.warehouseStructureName != null and dto.warehouseStructureName != ''">
AND warehouseStructureName LIKE CONCAT('%', #{dto.warehouseStructureName}, '%' ) AND warehouseStructureName LIKE CONCAT('%', #{dto.warehouseStructureName}, '%' )
......
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