Commit a3c17844 authored by tianbo's avatar tianbo

隐患列表修改

parent ee44a087
package com.yeejoin.amos.latentdanger.common.enums;
/**
* 隐患执行状态
*
* @author DELL
*/
public enum LatentDangerProcessStateEnum {
/**
* 未审核
*/
未审核("未审核", "0"),
/**
* 待审核
*/
待审核("待审核", "1"),
/**
* 待整改
*/
待整改("待整改", "2"),
/**
* 待复核
*/
待复核("待复核", "3"),
/**
* 治理完毕
*/
治理完毕("治理完毕", "4");
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private String code;
LatentDangerProcessStateEnum(String name, String code) {
this.name = name;
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public static String getEnumName(String code) {
String name = "";
for(LatentDangerProcessStateEnum type: LatentDangerProcessStateEnum.values()) {
if (type.getCode()==code) {
name = type.getName();
break;
}
}
return name;
}
public static LatentDangerProcessStateEnum getByCode(String code) {
for (LatentDangerProcessStateEnum l : LatentDangerProcessStateEnum.values()) {
if (code.equals(l.getCode())) {
return l;
}
}
return null;
}
}
......@@ -35,51 +35,51 @@ public interface LatentDangerState {
/**
* 提交隐患
*/
提交隐患("提交隐患", "dangerSubmit", null, null, "未审核"),
提交隐患("提交隐患", "dangerSubmit", null, null, "0"),
/**
* 现场确认
*/
现场确认("现场确认", "onSiteConfirm", "leaderConfirm","onSiteConfirm", "审核中"),
现场确认("现场确认", "onSiteConfirm", "leaderConfirm","onSiteConfirm", "1"),
/**
* 检查组长确认
*/
检查组长确认("检查组长确认", "leaderConfirm", "secondConfirm","onSiteConfirm", "审核中"),
检查组长确认("检查组长确认", "leaderConfirm", "secondConfirm","onSiteConfirm", "1"),
/**
* 隐患二次审核确认
*/
隐患二次审核确认("隐患二次审核确认", "secondConfirm", "taskDispatch","onSiteConfirm", "审核中"),
隐患二次审核确认("隐患二次审核确认", "secondConfirm", "taskDispatch","onSiteConfirm", "1"),
/**
* 整改任务分配
*/
整改任务分配("整改任务分配", "taskDispatch", "governFileSubmit","", "整改中"),
整改任务分配("整改任务分配", "taskDispatch", "governFileSubmit","", "2"),
/**
* 提交整改资料
*/
提交整改资料("提交整改资料", "governFileSubmit", "governChargerConfirm","", "整改中"),
提交整改资料("提交整改资料", "governFileSubmit", "governChargerConfirm","", "2"),
/**
* 整改检查组长确认
*/
整改检查组长确认("整改检查组长确认", "governLeaderConfirm", "governChargerConfirm","governFileSubmit", "整改中"),
整改检查组长确认("整改检查组长确认", "governLeaderConfirm", "governChargerConfirm","governFileSubmit", "3"),
/**
* 整改检查负责人确认
*/
整改检查负责人确认("整改检查负责人确认", "governChargerConfirm", "governLeadershipConfirm","governFileSubmit", "整改中"),
整改检查负责人确认("整改检查负责人确认", "governChargerConfirm", "governLeadershipConfirm","governFileSubmit", "3"),
/**
* 整改检查分管领导确认(根据计划类型不同,分管领导确认完流程不同)
*/
整改检查分管领导确认("整改检查分管领导确认", "governLeadershipConfirm", "governLeaderReviewConfirm","governFileSubmit", "整改中"),
整改检查分管领导确认("整改检查分管领导确认", "governLeadershipConfirm", "governLeaderReviewConfirm","governFileSubmit", "3"),
/**
* 整改检查组长复查确认
*/
整改检查组长复查确认("整改检查组长复查确认", "governLeaderReviewConfirm", "governSecondReviewConfirm","governFileSubmit", "整改中"),
整改检查组长复查确认("整改检查组长复查确认", "governLeaderReviewConfirm", "governSecondReviewConfirm","governFileSubmit", "3"),
/**
* 整改二次审核确认
*/
整改二次审核确认("整改二次审核确认", "governSecondReviewConfirm", "endOfGovernance","governFileSubmit", "整改中"),
整改二次审核确认("整改二次审核确认", "governSecondReviewConfirm", "endOfGovernance","governFileSubmit", "3"),
/**
* 整改完毕
*/
整改完毕("整改完毕", "endOfGovernance", "","", "整改完毕");
整改完毕("整改完毕", "endOfGovernance", "","", "4");
/**
* 名称,描述
......
......@@ -171,6 +171,9 @@ public class LatentDanger extends BasicEntity {
*/
private String bizType;
@TableField(exist = false)
private String bizTypeName;
/**
* 经度
*/
......@@ -205,4 +208,16 @@ public class LatentDanger extends BasicEntity {
*/
@TableField(exist = false)
private JSONObject flowJson;
/**
* 阶段状态
*/
@TableField(exist = false)
private String processState;
/**
* 阶段状态名称
*/
@TableField(exist = false)
private String processStateName;
}
......@@ -16,16 +16,6 @@ public class Constants {
public static final String DANGER_BIZ_TYPE_KEY= "danger_biz_type_key";
/**
* 降序排列
*/
public static final String DESC = "desc";
/**
* 升序排列
*/
public static final String ASC = "asc";
/**
* 构造方法
*/
private Constants() {
......
package com.yeejoin.amos.latentdanger.business.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo;
import com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerNoticeBo;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerListParam;
......@@ -70,4 +72,12 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
void updateCheckInputDangerState(@Param("id") Long id, @Param("code") int code);
LatentDangerBo getByBusinessKey(@Param("businessKey") String businessKey);
/**
* 根据参数分页查询
*
* @param paramMap
* @return
*/
IPage<LatentDanger> selectPageByParam(Page page, @Param("paramMap") Map<String, Object> paramMap);
}
spring.application.name=JCS
spring.application.name=JCS-tb
server.servlet.context-path=/jcs
server.port=11100
spring.profiles.active=dev
......@@ -83,4 +83,6 @@ control.fegin.name=JCS-API-CONTROL
failure.work.flow.processDefinitionKey=malfunction_repair
#设置文件上传的大小限制
spring.servlet.multipart.maxFileSize=3MB
spring.servlet.multipart.maxRequestSize=3MB
\ No newline at end of file
spring.servlet.multipart.maxRequestSize=3MB
supervision.feign.name=AMOS-SUPERVISION-API
\ No newline at end of file
......@@ -946,4 +946,54 @@
WHERE
pld.business_key = #{businessKey}
</select>
<select id="selectPageByParam" resultType="com.yeejoin.amos.latentdanger.dao.entity.LatentDanger">
select * from cb_latent_danger a
<where>
deleted = 0
<foreach collection="paramMap" index="key" item="value">
<if test="key == 'bizType' and value != null and value != ''">
and a.biz_type = #{value}
</if>
<if test="key == 'dangerIds' and value != null">
and a.id IN
<foreach collection="value" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="key == 'dangerState' and value != null">
and a.danger_state IN
<foreach collection="value" item="state" open="(" separator="," close=")">
#{state}
</foreach>
</if>
<if test="key == 'dangerLevel' and value != null and value != ''">
and a.danger_level = #{value}
</if>
<if test="key == 'startTime' and value != null and value != ''">
and a.create_date <![CDATA[ >= ]]> #{value}
</if>
<if test="key == 'endTime' and value != null and value != ''">
and a.create_date <![CDATA[ <= ]]> #{value}
</if>
<if test="key == 'name' and value != null and value != ''">
and a.danger_name like concat('%', #{value}, '%')
</if>
<if test="key == 'structureId' and value != null">
and a.structure_id in
<foreach collection="value" item="structureId" open="(" separator="," close=")">
#{structureId}
</foreach>
</if>
<if test="key == 'planId' and value != null and value != ''">
and a.biz_info->'$.planId' = #{value}
</if>
<if test="key == 'companyId' and value != null and value != ''">
and a.biz_info->'$.pointId' = #{value}
</if>
</foreach>
</where>
<if test="paramMap.order != null and paramMap.order == '1'">
order by a.create_date desc
</if>
</select>
</mapper>
\ No newline at end of file
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