Commit d87545b6 authored by tianbo's avatar tianbo

bug修改

parent ab7c7636
...@@ -55,27 +55,27 @@ public interface LatentDangerState { ...@@ -55,27 +55,27 @@ public interface LatentDangerState {
/** /**
* 提交整改资料 * 提交整改资料
*/ */
提交整改资料("提交整改资料", "governFileSubmit", "governChargerConfirm","", "2"), 提交整改资料("提交整改资料", "governFileSubmit", "governChargerConfirm","", "3"),
/** /**
* 整改检查组长确认 * 整改检查组长确认
*/ */
整改检查组长确认("整改检查组长确认", "governLeaderConfirm", "governChargerConfirm","governFileSubmit", "3"), 整改检查组长确认("整改检查组长确认", "governLeaderConfirm", "governChargerConfirm","governFileSubmit", "4"),
/** /**
* 整改检查负责人确认 * 整改检查负责人确认
*/ */
整改检查负责人确认("整改检查负责人确认", "governChargerConfirm", "governLeadershipConfirm","governFileSubmit", "3"), 整改检查负责人确认("整改检查负责人确认", "governChargerConfirm", "governLeadershipConfirm","governFileSubmit", "4"),
/** /**
* 整改检查分管领导确认(根据计划类型不同,分管领导确认完流程不同) * 整改检查分管领导确认(根据计划类型不同,分管领导确认完流程不同)
*/ */
整改检查分管领导确认("整改检查分管领导确认", "governLeadershipConfirm", "governLeaderReviewConfirm","governFileSubmit", "3"), 整改检查分管领导确认("整改检查分管领导确认", "governLeadershipConfirm", "governLeaderReviewConfirm","governFileSubmit", "4"),
/** /**
* 整改检查组长复查确认 * 整改检查组长复查确认
*/ */
整改检查组长复查确认("整改检查组长复查确认", "governLeaderReviewConfirm", "governSecondReviewConfirm","governFileSubmit", "3"), 整改检查组长复查确认("整改检查组长复查确认", "governLeaderReviewConfirm", "governSecondReviewConfirm","governFileSubmit", "4"),
/** /**
* 整改二次审核确认 * 整改二次审核确认
*/ */
整改二次审核确认("整改二次审核确认", "governSecondReviewConfirm", "endOfGovernance","governFileSubmit", "3"), 整改二次审核确认("整改二次审核确认", "governSecondReviewConfirm", "endOfGovernance","governFileSubmit", "4"),
/** /**
* 整改完毕 * 整改完毕
*/ */
......
...@@ -29,7 +29,7 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> { ...@@ -29,7 +29,7 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
LatentDangerBo getByInstanceId(String instanceId); LatentDangerBo getByInstanceId(String instanceId);
List<LatentDangerBo> listOfOvertime(); List<LatentDangerBo> listOfOvertime(@Param("dangerStateList") List<String> dangerStateList);
Integer countNotFinishByFlowId(String flowId); Integer countNotFinishByFlowId(String flowId);
...@@ -79,5 +79,5 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> { ...@@ -79,5 +79,5 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
* @param paramMap * @param paramMap
* @return * @return
*/ */
IPage<LatentDanger> selectPageByParam(Page<LatentDanger> page, @Param("paramMap") Map<String, Object> paramMap); IPage<LatentDanger> selectPageByParam(@Param("page") Page<LatentDanger> page, @Param("paramMap") Map<String, Object> paramMap);
} }
...@@ -273,11 +273,11 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -273,11 +273,11 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
// LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDanger.getId()); // LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDanger.getId());
// sendMessage(latentDanger, LatentDangerExecuteTypeEnum.填写隐患完成, patrolBo, // sendMessage(latentDanger, LatentDangerExecuteTypeEnum.填写隐患完成, patrolBo,
// "巡检隐患排查与治理", this.getNextExecuteUsers(latentDanger.getInstanceId()), userRealName, departmentName); // "巡检隐患排查与治理", this.getNextExecuteUsers(latentDanger.getInstanceId()), userRealName, departmentName);
try { // try {
webMqttComponent.publish(dangerTopic, ""); // webMqttComponent.publish(dangerTopic, "");
} catch (Exception e) { // } catch (Exception e) {
logger.error("巡检隐患提交数字换流站页面推送失败-----------" + e.getMessage()); // logger.error("巡检隐患提交数字换流站页面推送失败-----------" + e.getMessage());
} // }
dangerList.add(latentDanger); dangerList.add(latentDanger);
} }
...@@ -981,7 +981,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -981,7 +981,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
dangerState = "taskDispatch,governFileSubmit,governLeaderConfirm,governChargerConfirm," + dangerState = "taskDispatch,governFileSubmit,governLeaderConfirm,governChargerConfirm," +
"governLeadershipConfirm,governLeaderReviewConfirm,governSecondReviewConfirm"; "governLeadershipConfirm,governLeaderReviewConfirm,governSecondReviewConfirm";
} }
List<LatentDangerBo> overtimeList = latentDangerMapper.listOfOvertime(); List<String> dangerStateList = Lists.newArrayList(dangerState.split(","));
List<LatentDangerBo> overtimeList = latentDangerMapper.listOfOvertime(dangerStateList);
LambdaQueryWrapper<LatentDanger> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<LatentDanger> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper // queryWrapper
List<LatentDanger> overtimeDangerList = this.baseMapper.selectList(queryWrapper); List<LatentDanger> overtimeDangerList = this.baseMapper.selectList(queryWrapper);
...@@ -1254,8 +1255,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -1254,8 +1255,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if (("supervised".equals(planType) && if (("supervised".equals(planType) &&
LatentDangerState.SupervisionDangerStateEnum.整改检查分管领导确认.getCode().equals(currentDangerState)) LatentDangerState.SupervisionDangerStateEnum.整改检查分管领导确认.getCode().equals(currentDangerState))
|| LatentDangerState.SupervisionDangerStateEnum.整改二次审核确认.getCode().equals(currentDangerState)) { || LatentDangerState.SupervisionDangerStateEnum.整改二次审核确认.getCode().equals(currentDangerState)) {
latentDanger.setDangerState(LatentDangerState.SupervisionDangerStateEnum.整改完毕.getCode()); nextState = LatentDangerState.SupervisionDangerStateEnum.整改完毕.getCode();
latentDanger.setDangerStateName(LatentDangerState.SupervisionDangerStateEnum.整改完毕.getName()); nextStateName = LatentDangerState.SupervisionDangerStateEnum.整改完毕.getName();
} }
executeResultMsg = currentStateEnum.getName() + ExecuteTypeEnum.通过.getName(); executeResultMsg = currentStateEnum.getName() + ExecuteTypeEnum.通过.getName();
} else { } else {
...@@ -1806,9 +1807,21 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -1806,9 +1807,21 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
if (!ValidationUtil.isEmpty(dangerIdList)) { if (!ValidationUtil.isEmpty(dangerIdList)) {
pageParam.put("dangerIds", dangerIdList); pageParam.put("dangerIds", dangerIdList);
} }
Page page = new Page();
if (pageParam.get("current") instanceof String && pageParam.get("size") instanceof String) {
int current = Integer.valueOf((String) pageParam.get("current"));
int size = Integer.valueOf((String) pageParam.get("current"));
page.setCurrent(current);
page.setSize(size);
} else {
page.setCurrent((Integer)(pageParam.get("current")));
page.setSize((Integer)(pageParam.get("size")));
}
if (ValidationUtil.isEmpty(pageParam.get("order"))) {
pageParam.put("order", "1");
}
IPage<LatentDanger> iPage = this.baseMapper.selectPageByParam(new Page(((Integer) pageParam.get("current")).longValue(), IPage<LatentDanger> iPage = this.baseMapper.selectPageByParam(page, (Map<String, Object>) pageParam);
((Integer) pageParam.get("size")).longValue()), (Map<String, Object>) pageParam);
Map<String, Object> buildingAbsolutePositionMap = new HashMap<>(); Map<String, Object> buildingAbsolutePositionMap = new HashMap<>();
if (!ValidationUtil.isEmpty(iPage.getRecords())) { if (!ValidationUtil.isEmpty(iPage.getRecords())) {
try { try {
......
...@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray; ...@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.MessageModel;
import com.yeejoin.amos.latentdanger.business.param.JPushTypeEnum; import com.yeejoin.amos.latentdanger.business.param.JPushTypeEnum;
import com.yeejoin.amos.latentdanger.business.param.PushMsgParam; import com.yeejoin.amos.latentdanger.business.param.PushMsgParam;
import com.yeejoin.amos.latentdanger.business.util.Toke; import com.yeejoin.amos.latentdanger.business.util.Toke;
...@@ -92,7 +94,10 @@ public class AsyncTask { ...@@ -92,7 +94,10 @@ public class AsyncTask {
if (pointName != null) { if (pointName != null) {
body += "关联检查点:" + pointName + TAB; body += "关联检查点:" + pointName + TAB;
} }
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), riskFactorId, null, ""); MessageModel messageModel = new MessageModel();
messageModel.setBody(body);
// Systemctl.messageClient.create(messageModel);
// saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), riskFactorId, null, "");
} }
private void saveAndSendMsg(String orgCode, String informerList, private void saveAndSendMsg(String orgCode, String informerList,
......
...@@ -8,6 +8,7 @@ eureka.instance.lease-expiration-duration-in-seconds=10 ...@@ -8,6 +8,7 @@ eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5 eureka.instance.lease-renewal-interval-in-seconds=5
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
ribbon.eureka.enabled = true ribbon.eureka.enabled = true
ribbon.ConnectTimeout = 5000 ribbon.ConnectTimeout = 5000
......
...@@ -6,4 +6,13 @@ ...@@ -6,4 +6,13 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"> http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet id="20211013-1" author="tb">
<preConditions>
<columnExists tableName="p_latent_danger" columnName="biz_info" />
</preConditions>
<comment>修改业务信息字段biz_info字段类型为text</comment>
<sql>
ALTER TABLE p_latent_danger MODIFY COLUMN biz_info text DEFAULT NULL COMMENT '业务信息'
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
...@@ -254,6 +254,22 @@ ...@@ -254,6 +254,22 @@
select * from p_latent_danger where deleted = 0 and instance_id = #{instanceId} and danger_state = 3 limit 1 select * from p_latent_danger where deleted = 0 and instance_id = #{instanceId} and danger_state = 3 limit 1
</select> </select>
<select id="listOfOvertime"
resultType="com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo">
select *
from p_latent_danger
where now() > reform_limit_date
and overtime_state = 0
and deleted = 0
<if test="dangerStateList != null and dangerStateList.size() > 0">
and danger_state in
<foreach collection="dangerStateList" item="dangerState" open="(" separator="," close=")">
#{dangerState}
</foreach>
</if>
</select>
<select id="listByMap" resultType="com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo"> <select id="listByMap" resultType="com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo">
select select
a.* a.*
...@@ -350,10 +366,6 @@ ...@@ -350,10 +366,6 @@
</where> </where>
</select> </select>
<select id="listOfOvertime" resultType="com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerBo">
select * from p_latent_danger where now()>reform_limit_date and overtime_state = 0 and deleted = 0 and danger_state in (2,3,4)
</select>
<select id="countNotFinishByFlowId" resultType="java.lang.Integer"> <select id="countNotFinishByFlowId" resultType="java.lang.Integer">
select select
count(1) count(1)
......
...@@ -207,7 +207,7 @@ ...@@ -207,7 +207,7 @@
<dependency> <dependency>
<groupId>com.yeejoin</groupId> <groupId>com.yeejoin</groupId>
<artifactId>amos-feign-systemctl</artifactId> <artifactId>amos-feign-systemctl</artifactId>
<version>1.6.3-SNAPSHOT</version> <version>1.6.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
......
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