Commit 67494093 authored by tangwei's avatar tangwei

修改巡检隐患,

parent ad5f260d
......@@ -73,6 +73,10 @@ public class LatentDangerController extends AbstractBaseController {
String companyId = getCompanyId(reginParams);
String departmentName = getDepartmentName(reginParams);
RoleBo role = reginParams.getRole();
//由于统计隐患需要获取隐患所在公司,按当前登录人所在单位
latentDangerParam.setBizOrgcode(reginParams.getPersonIdentity().getBizOrgCode());
return iLatentDangerService.saveNormal(latentDangerParam, user.getUserId(),
user.getRealName(), deptId, departmentName, companyId, loginOrgCode, role);
} catch (Exception e) {
......
package com.yeejoin.amos.patrol.business.entity.mybatis.extend;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import java.util.Date;
......@@ -146,4 +147,9 @@ public class LatentDangerBo {
private String structureName;
private String instanceKey;
//详情
private String bizInfo;
}
......@@ -62,4 +62,7 @@ public class LatentDangerNormalParam {
* 业务类型(不同业务创建的隐患以此区分)
*/
private String bizType;
//所属单位
private String bizOrgcode;
}
......@@ -21,10 +21,7 @@ import com.yeejoin.amos.patrol.business.dao.mapper.LatentDangerPatrolMapper;
import com.yeejoin.amos.patrol.business.dao.mapper.RiskFactorCmMapper;
import com.yeejoin.amos.patrol.business.dao.mapper.RiskFactorMapper;
import com.yeejoin.amos.patrol.business.dao.mapper.RiskSourceMapper;
import com.yeejoin.amos.patrol.business.dao.repository.ICheckDao;
import com.yeejoin.amos.patrol.business.dao.repository.ICheckShotDao;
import com.yeejoin.amos.patrol.business.dao.repository.IInputItemDao;
import com.yeejoin.amos.patrol.business.dao.repository.IPointClassifyDao;
import com.yeejoin.amos.patrol.business.dao.repository.*;
import com.yeejoin.amos.patrol.business.dto.DangerExecuteSubmitDto;
import com.yeejoin.amos.patrol.business.dto.InputCheckDto;
import com.yeejoin.amos.patrol.business.entity.mybatis.DangerResultBo;
......@@ -73,10 +70,7 @@ import com.yeejoin.amos.patrol.core.async.AsyncTask;
import com.yeejoin.amos.patrol.core.common.request.LatentDangerResultPushSpcRequest;
import com.yeejoin.amos.patrol.core.common.response.DangerListResponse;
import com.yeejoin.amos.patrol.core.util.StringUtil;
import com.yeejoin.amos.patrol.dao.entity.Check;
import com.yeejoin.amos.patrol.dao.entity.CheckShot;
import com.yeejoin.amos.patrol.dao.entity.InputItem;
import com.yeejoin.amos.patrol.dao.entity.PointClassify;
import com.yeejoin.amos.patrol.dao.entity.*;
import com.yeejoin.amos.patrol.exception.YeeException;
import com.yeejoin.amos.patrol.feign.RemoteSecurityService;
import com.yeejoin.amos.patrol.mqtt.WebMqttComponent;
......@@ -174,6 +168,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Autowired
EquipFeign equipFeign;
@Autowired
private IPointDao iPointDao;
@Autowired
JcsFeignClient jcsFeignClient;
......@@ -248,6 +244,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
flowJson.put("photoUrls", latentDangerParam.getPhotoUrls());
LatentDangerFlowRecordBo record = saveFlowRecord(instance.getString("id"), "提交隐患", userId, departmentId, flowJson, dangerId, role, LatentDangerExcuteTypeEnum.填写隐患完成.getName(),latentDangerParam.getRemark());
latentDangerBo.setCurrentFlowRecordId(record.getId());
//详情
JSONObject js= new JSONObject();
js.put("bizOrgCode",latentDangerParam.getBizOrgcode());
latentDangerBo.setBizInfo(js.toJSONString());
latentDangerMapper.update(latentDangerBo);
sendMessage(latentDangerBo, LatentDangerExcuteTypeEnum.填写隐患完成, null,
"隐患排查与治理", this.getNextExecuteUsers(latentDangerBo.getInstanceId()), userRealName, departmentName);
......@@ -370,6 +372,15 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
latentDangerBo.setCurrentFlowRecordId(inputRecord.getId());
latentDangerBo.setInstanceId(instance.getString("id"));
//隐患巡检点归属部门
JSONObject js= new JSONObject();
//查询点
Point point=iPointDao.getOne(inputCheckDto.getPointId());
js.put("bizOrgCode",point.getBizOrgCode());
latentDangerBo.setBizInfo(js.toJSONString());
latentDangerMapper.update(latentDangerBo);
//修改管控措施的状态为失效
LatentDangerPatrolBo patrolBo = latentDangerPatrolMapper.getByDangerId(latentDangerBo.getId());
......
......@@ -87,6 +87,13 @@
<if test="structureName != null">
structure_name,
</if>
<if test="bizInfo != null">
biz_info,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="businessKey != null">
......@@ -168,6 +175,9 @@
<if test="structureName != null">
#{structureName},
</if>
<if test="bizInfo != null">
#{bizInfo},
</if>
</trim>
</insert>
......@@ -253,6 +263,9 @@
<if test="problemDescription != null">
problem_description = #{problemDescription},
</if>
<if test="bizInfo != null">
biz_info = #{bizInfo},
</if>
</set>
where id = #{id}
</update>
......
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