Commit 1636d40b authored by tianbo's avatar tianbo

隐患提交

parent a200ce07
......@@ -71,7 +71,7 @@ public enum LatentDangerProcessStateEnum {
public static LatentDangerProcessStateEnum getByCode(String code) {
for (LatentDangerProcessStateEnum l : LatentDangerProcessStateEnum.values()) {
if (code.equals(l.getCode())) {
if (l.getCode().equals(code)) {
return l;
}
}
......
......@@ -4,16 +4,12 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.Where;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import java.util.Date;
/**
......@@ -94,6 +90,7 @@ public class LatentDanger extends BasicEntity {
/**
* 限制时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reformLimitDate;
private Integer overtimeState;
......@@ -127,11 +124,13 @@ public class LatentDanger extends BasicEntity {
/**
* 记录修改时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateDate;
/**
* 延期治理时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date delayLimitDate;
/**
......
......@@ -1805,27 +1805,28 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
IPage<LatentDanger> iPage = this.baseMapper.selectPageByParam(new Page(Long.valueOf(pageParam.getCurrent()),
Long.valueOf(pageParam.getSize())), (Map<String, Object>) pageParam);
Map<Long, String> buildingAbsolutePositionMap = new HashMap<>();
Map<String, Object> buildingAbsolutePositionMap = new HashMap<>();
if (!ValidationUtil.isEmpty(iPage.getRecords())) {
try {
LinkedHashMap<String, Object> buildingAbsolutePosition = (LinkedHashMap<String, Object>) equipFeign.getBuildingAbsolutePosition().getResult();
if (buildingAbsolutePosition == null || !"200".equals(buildingAbsolutePosition.get("status").toString())) {
buildingAbsolutePositionMap = equipFeign.getBuildingAbsolutePosition().getResult();
if (ValidationUtil.isEmpty(buildingAbsolutePositionMap)) {
throw new YeeException("获取建筑树出错");
}
buildingAbsolutePositionMap = (Map<Long, String>) buildingAbsolutePosition.get("result");
} catch (Exception e) {
}
Map<Long, String> finalBuildingAbsolutePositionMap = buildingAbsolutePositionMap;
Map<String, Object> finalBuildingAbsolutePositionMap = buildingAbsolutePositionMap;
iPage.getRecords().forEach(danger -> {
danger.setStructureName(finalBuildingAbsolutePositionMap.get(danger.getStructureId()));
if (!ValidationUtil.isEmpty(danger.getStructureId()) && !ValidationUtil.isEmpty(finalBuildingAbsolutePositionMap.get(danger.getStructureId().toString()))) {
danger.setStructureName(finalBuildingAbsolutePositionMap.get(danger.getStructureId().toString()).toString());
}
LatentDangerBizTypeEnum bizTypeEnum = LatentDangerBizTypeEnum.getByCode(danger.getBizType());
if (bizType.equals(danger.getBizType())) {
LatentDangerState.SupervisionDangerStateEnum dangerStateEnum = LatentDangerState.SupervisionDangerStateEnum.getEnumByCode(danger.getDangerState());
danger.setProcessState(dangerStateEnum.getProcessState());
LatentDangerProcessStateEnum processStateEnum = LatentDangerProcessStateEnum.getByCode(danger.getProcessState());
danger.setProcessStateName(processStateEnum.getName());
}
danger.setBizTypeName(bizTypeEnum.getName());
LatentDangerProcessStateEnum processStateEnum = LatentDangerProcessStateEnum.getByCode(danger.getProcessState());
danger.setProcessStateName(processStateEnum.getName());
});
}
......
......@@ -978,7 +978,7 @@
<if test="key == 'name' and value != null and value != ''">
and a.danger_name like concat('%', #{value}, '%')
</if>
<if test="key == 'structureId' and value != null">
<if test="key == 'structureIdList' and value != null">
and a.structure_id in
<foreach collection="value" item="structureId" open="(" separator="," close=")">
#{structureId}
......@@ -992,7 +992,7 @@
</if>
</foreach>
</where>
<if test="paramMap.order != null and paramMap.order == '1'">
<if test="paramMap.order != null and paramMap.order == 1">
order by a.create_date desc
</if>
</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