Commit 3e986dc4 authored by tianbo's avatar tianbo

隐患流程调试

parent 8d8aae60
......@@ -35,51 +35,51 @@ public interface LatentDangerState {
/**
* 提交隐患
*/
提交隐患("提交隐患", "dangerSubmit", null, null),
提交隐患("提交隐患", "dangerSubmit", null, null, "未审核"),
/**
* 现场确认
*/
现场确认("现场确认", "onSiteConfirm", "leaderConfirm","onSiteConfirm"),
现场确认("现场确认", "onSiteConfirm", "leaderConfirm","onSiteConfirm", "审核中"),
/**
* 检查组长确认
*/
检查组长确认("检查组长确认", "leaderConfirm", "secondConfirm","onSiteConfirm"),
检查组长确认("检查组长确认", "leaderConfirm", "secondConfirm","onSiteConfirm", "审核中"),
/**
* 隐患二次审核确认
*/
隐患二次审核确认("隐患二次审核确认", "secondConfirm", "taskDispatch","onSiteConfirm"),
隐患二次审核确认("隐患二次审核确认", "secondConfirm", "taskDispatch","onSiteConfirm", "审核中"),
/**
* 整改任务分配
*/
整改任务分配("整改任务分配", "taskDispatch", "governFileSubmit",""),
整改任务分配("整改任务分配", "taskDispatch", "governFileSubmit","", "整改中"),
/**
* 提交整改资料
*/
提交整改资料("提交整改资料", "governFileSubmit", "governChargerConfirm",""),
提交整改资料("提交整改资料", "governFileSubmit", "governChargerConfirm","", "整改中"),
/**
* 整改检查组长确认
*/
整改检查组长确认("整改检查组长确认", "governLeaderConfirm", "governChargerConfirm","governFileSubmit"),
整改检查组长确认("整改检查组长确认", "governLeaderConfirm", "governChargerConfirm","governFileSubmit", "整改中"),
/**
* 整改检查负责人确认
*/
整改检查负责人确认("整改检查负责人确认", "governChargerConfirm", "governLeadershipConfirm","governFileSubmit"),
整改检查负责人确认("整改检查负责人确认", "governChargerConfirm", "governLeadershipConfirm","governFileSubmit", "整改中"),
/**
* 整改检查分管领导确认(根据计划类型不同,分管领导确认完流程不同)
*/
整改检查分管领导确认("整改检查分管领导确认", "governLeadershipConfirm", "governLeaderReviewConfirm","governFileSubmit"),
整改检查分管领导确认("整改检查分管领导确认", "governLeadershipConfirm", "governLeaderReviewConfirm","governFileSubmit", "整改中"),
/**
* 整改检查组长复查确认
*/
整改检查组长复查确认("整改检查组长复查确认", "governLeaderReviewConfirm", "governSecondReviewConfirm","governFileSubmit"),
整改检查组长复查确认("整改检查组长复查确认", "governLeaderReviewConfirm", "governSecondReviewConfirm","governFileSubmit", "整改中"),
/**
* 整改二次审核确认
*/
整改二次审核确认("整改二次审核确认", "governSecondReviewConfirm", "endOfGovernance","governFileSubmit"),
整改二次审核确认("整改二次审核确认", "governSecondReviewConfirm", "endOfGovernance","governFileSubmit", "整改中"),
/**
* 整改完毕
*/
整改完毕("整改完毕", "endOfGovernance", "","");
整改完毕("整改完毕", "endOfGovernance", "","", "整改完毕");
/**
* 名称,描述
......@@ -101,11 +101,17 @@ public interface LatentDangerState {
*/
private String rejectNext;
SupervisionDangerStateEnum(String name, String code, String next, String rejectNext) {
/**
* 流程状态
*/
private String processState;
SupervisionDangerStateEnum(String name, String code, String next, String rejectNext, String processState) {
this.name = name;
this.code = code;
this.next = next;
this.rejectNext = rejectNext;
this.processState = processState;
}
public String getName() {
......@@ -139,6 +145,14 @@ public interface LatentDangerState {
this.rejectNext = rejectNext;
}
public String getProcessState() {
return processState;
}
public void setProcessState(String processState) {
this.processState = processState;
}
public static SupervisionDangerStateEnum getEnumByCode(String code) {
for (SupervisionDangerStateEnum _enum : SupervisionDangerStateEnum.values()) {
if (code.equals(_enum.getCode())) {
......@@ -169,6 +183,16 @@ public interface LatentDangerState {
}
return enumList;
}
public static List<SupervisionDangerStateEnum> getEnumListByProcessState(String processState) {
List<SupervisionDangerStateEnum> enumList = Lists.newArrayList();
for(SupervisionDangerStateEnum type: SupervisionDangerStateEnum.values()) {
if (type.getProcessState().equals(processState)) {
enumList.add(type);
}
}
return enumList;
}
}
enum PatrolDangerLevelEnum implements LatentDangerState {
......
package com.yeejoin.amos.latentdanger.common.enums;
/**
* 拥有者枚举
* @author WJK
*
*/
public enum OwerEnum {
/**
* 我的
*/
MY("我的","0"),
ALL("全部","1" );
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private String code;
private OwerEnum(String name, String code){
this.name = name;
this.code = code;
}
public static OwerEnum getEnum(String code) {
OwerEnum jPushTypeEnum = null;
for(OwerEnum type: OwerEnum.values()) {
if (type.getCode().equals(code)) {
jPushTypeEnum = type;
break;
}
}
return jPushTypeEnum;
}
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;
}
}
......@@ -199,4 +199,10 @@ public class LatentDanger extends BasicEntity {
}
return false;
}
/**
* 提交信息
*/
@TableField(exist = false)
private JSONObject flowJson;
}
......@@ -16,6 +16,16 @@ 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() {
......
......@@ -7,10 +7,10 @@ import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.latentdanger.business.dto.DangerExecuteSubmitDto;
import com.yeejoin.amos.latentdanger.business.dto.ExecuteSubmitDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerExecuteParam;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerListParam;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerNormalParam;
import com.yeejoin.amos.latentdanger.business.param.PageParam;
import com.yeejoin.amos.latentdanger.business.service.intfc.ILatentDangerService;
import com.yeejoin.amos.latentdanger.business.util.CommonResponse;
......@@ -27,6 +27,7 @@ import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -35,7 +36,6 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -58,6 +58,9 @@ public class LatentDangerController extends BaseController {
@Autowired
private ILatentDangerService iLatentDangerService;
@Value("${danger.biz.type}")
private static final String bizType = "patrol";
@ApiOperation(value = "创建无码无计划隐患", notes = "创建无码无计划隐患")
@PostMapping(value = "/normal/save")
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -236,7 +239,7 @@ public class LatentDangerController extends BaseController {
@PostMapping(value = "/page/list")
@TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel listDanger(@ApiParam(value = "查询条件", required = true) @RequestBody PageParam pageParam) throws Exception {
IPage<LatentDanger> result = iLatentDangerService.listDanger(pageParam);
IPage<LatentDanger> result = iLatentDangerService.pageListDanger(pageParam);
return ResponseHelper.buildResponse(result);
}
......@@ -317,8 +320,12 @@ public class LatentDangerController extends BaseController {
String departmentName = getDepartmentName(reginParams);
String userRealName = user.getRealName();
String userId = user.getUserId();
return ResponseHelper.buildResponse(iLatentDangerService.dangerAudit(latentDangerDto, executeType, userId,
userRealName, deptId, departmentName, reginParams));
ExecuteSubmitDto executeSubmitDto = iLatentDangerService.dangerAudit(latentDangerDto, executeType, userId,
userRealName, deptId, departmentName, reginParams);
if (!executeSubmitDto.getIsOk()) {
throw new Exception(executeSubmitDto.getMsg());
}
return ResponseHelper.buildResponse(executeSubmitDto);
}
/**
......
......@@ -141,4 +141,8 @@ public class LatentDangerDto {
*/
private Boolean unReviewed;
/**
* 提交信息
*/
private JSONObject flowJson;
}
......@@ -79,7 +79,7 @@ public class LatentDangerExecuteParam {
/**
* 整改责任人
*/
private String reformUserId;
private String reformLeaderId;
}
......@@ -6,6 +6,7 @@ import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.latentdanger.business.dto.ExecuteSubmitDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerDto;
import com.yeejoin.amos.latentdanger.business.param.LatentDangerExecuteParam;
import com.yeejoin.amos.latentdanger.business.param.PageParam;
......@@ -99,7 +100,7 @@ public interface ILatentDangerService {
*/
JSONObject getReviewInfo(Long dangerId);
IPage<LatentDanger> listDanger(PageParam pageParam) throws Exception;
IPage<LatentDanger> pageListDanger(PageParam pageParam) throws Exception;
List<DangerListResponse> export(PageParam pageParam);
......@@ -136,8 +137,8 @@ public interface ILatentDangerService {
* @param executeType 执行类型(通过0、驳回1)
* @exception Exception
*/
Object dangerAudit(LatentDangerDto latentDangerDto, Integer executeType, String userId, String userName,
String deptId, String deptName, ReginParams reginParams) throws Exception;
ExecuteSubmitDto dangerAudit(LatentDangerDto latentDangerDto, Integer executeType, String userId, String userName,
String deptId, String deptName, ReginParams reginParams) throws Exception;
/**
* 防火监督-隐患审核分页查询
......
package com.yeejoin.amos.latentdanger.business.vo;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.latentdanger.business.entity.mybatis.extend.LatentDangerFlowRecordBo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.checkerframework.checker.units.qual.A;
import java.util.Date;
import java.util.List;
......@@ -13,44 +16,61 @@ import java.util.List;
@Data
public class LatentDangerDetailVo {
@ApiModelProperty(value = "隐患主键")
private Long id;
@ApiModelProperty(value = "隐患编号")
private String businessKey;
@ApiModelProperty(value = "隐患名称")
private String dangerName;
@ApiModelProperty(value = "业务id")
private Long bizId;
@ApiModelProperty(value = "隐患等级")
private String dangerLevel;
@ApiModelProperty(value = "隐患等级名称")
private String dangerLevelName;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "隐患地点")
private String dangerPosition;
@ApiModelProperty(value = "整改类型")
private String reformTypeName;
@ApiModelProperty(value = "整改限制时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reformLimitDate;
private String reformLimitDateStr;
@ApiModelProperty(value = "整改对象")
private JSONObject reformJson;
@ApiModelProperty(value = "当前流程节点记录id")
private Long currentFlowRecordId;
@ApiModelProperty(value = "隐患状态名称")
private String dangerState;
@ApiModelProperty(value = "隐患状态名称")
private String dangerStateName;
private String dangerType;
private String dangerTypeName;
@ApiModelProperty(value = "检查类型")
private String checkMode;
public String getCheckMode() {
return this.dangerType;
}
@ApiModelProperty(value = "检查类型名称")
private String checkModeName;
public String getCheckModeName() {
......@@ -59,16 +79,21 @@ public class LatentDangerDetailVo {
private Boolean currentUserCanExecute;
@ApiModelProperty(value = "隐患图片信息")
private List<String> photoUrl;
private LatentDangerDetailRiskVo riskInfo;
@ApiModelProperty(value = "复审信息")
private JSONObject reviewInfo;
@ApiModelProperty(value = "整改信息")
private JSONObject reformInfo;
@ApiModelProperty(value = "复查信息")
private JSONObject recheckInfo;
@ApiModelProperty(value = "流程信息")
private List<LatentDangerFlowRecordBo> records;
private Date delayLimitDate;
......@@ -81,5 +106,19 @@ public class LatentDangerDetailVo {
private String taskId;
@ApiModelProperty(value = "业务信息")
private JSONObject bizInfo;
@ApiModelProperty(value = "提交时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createDate;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "审核信息")
private JSONObject flowJson;
}
......@@ -11,6 +11,7 @@ import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
......@@ -29,6 +30,9 @@ public class EnumFillAop {
@Autowired
RedisUtils redisUtils;
@Value("${danger.biz.type}")
private String bizType;
@Pointcut("execution(public * com.yeejoin.amos.latentdanger.business.controller..*(..))")
public void fillEnum() {
......@@ -37,19 +41,6 @@ public class EnumFillAop {
@Before("fillEnum()")
public void doBefore(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
String bizType = request.getHeader("bizType");
if (bizType == null) {
bizType = request.getParameter("bizType");
}
if (!redisUtils.hasKey(Constants.DANGER_BIZ_TYPE_KEY)) {
redisUtils.set(Constants.DANGER_BIZ_TYPE_KEY, bizType);
}
if (bizType == null) {
bizType = redisUtils.get(Constants.DANGER_BIZ_TYPE_KEY).toString();
}
// 获取隐患等级枚举
if (ValidationUtil.isEmpty(LatentDangerLevelEnum.enumMap)) {
List<DictionarieValueModel> dicResult =
......
......@@ -182,7 +182,7 @@
from
cb_latent_danger_flow_record
where
deleted = 0
1 = 1
and
danger_id = #{dangerId}
</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