风险模型管控
This commit is contained in:
parent
93a4169551
commit
c805c989d1
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.rzyc.bean.risk;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@ApiModel("企业敏感信息")
|
||||||
|
public class RksensttiveDto {
|
||||||
|
@ApiModelProperty("企业id")
|
||||||
|
@NotNull(message = "企业id不能为空")
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
@ApiModelProperty("风险诊断类别")
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
@ApiModelProperty("包含类型id和数量 [{typeId:\"\",num:10},{typeId:\"\",num:10}]")
|
||||||
|
private String rkSensitive;
|
||||||
|
|
||||||
|
public String getEnterpriseId() {
|
||||||
|
return enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseId(String enterpriseId) {
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRkSensitive() {
|
||||||
|
return rkSensitive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRkSensitive(String rkSensitive) {
|
||||||
|
this.rkSensitive = rkSensitive;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.model.RkCompanyDiagnosis;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RkCompanyDiagnosisMapper {
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String diagnosisId);
|
||||||
|
|
||||||
|
int insert(RkCompanyDiagnosis record);
|
||||||
|
|
||||||
|
int insertSelective(RkCompanyDiagnosis record);
|
||||||
|
|
||||||
|
|
||||||
|
RkCompanyDiagnosis selectByPrimaryKey(String diagnosisId);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(RkCompanyDiagnosis record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(RkCompanyDiagnosis record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企业id删除列表
|
||||||
|
* @param enterpriseId
|
||||||
|
*/
|
||||||
|
void deletByEnterpriseId(String enterpriseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企业id返回诊断列表
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RkCompanyDiagnosis selectByEnterpriseId(String enterpriseId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询诊断列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RkCompanyDiagnosis> selectQueryCompanyDiagnosis(RkCompanyDiagnosis rkCompanyDiagnosis);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询数据
|
||||||
|
* @param diagnosisId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RkCompanyDiagnosis selectByDiagnosisId(String diagnosisId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.model.RkEntSensitive;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RkEntSensitiveMapper {
|
||||||
|
|
||||||
|
int insert(RkEntSensitive record);
|
||||||
|
|
||||||
|
int insertSelective(RkEntSensitive record);
|
||||||
|
|
||||||
|
//修改企业敏感信息
|
||||||
|
void updateByRkEntSensitive(RkEntSensitive rkEntSensitive);
|
||||||
|
|
||||||
|
//删除企业敏感信息
|
||||||
|
void deleteByRkEntSensitive(String enterpriseId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.model.RkEnterpriseScore;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RkEnterpriseScoreMapper {
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String scoreId);
|
||||||
|
|
||||||
|
int insert(RkEnterpriseScore record);
|
||||||
|
|
||||||
|
int insertSelective(RkEnterpriseScore record);
|
||||||
|
|
||||||
|
|
||||||
|
RkEnterpriseScore selectByPrimaryKey(String scoreId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(RkEnterpriseScore record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(RkEnterpriseScore record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企业id删除企业得分信息
|
||||||
|
* @param enterpriseId
|
||||||
|
*/
|
||||||
|
void deleteByEnterpriseId(String enterpriseId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.model.RkScoreType;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RkScoreTypeMapper {
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String typeId);
|
||||||
|
|
||||||
|
int insert(RkScoreType record);
|
||||||
|
|
||||||
|
int insertSelective(RkScoreType record);
|
||||||
|
|
||||||
|
|
||||||
|
RkScoreType selectByPrimaryKey(String typeId);
|
||||||
|
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(RkScoreType record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(RkScoreType record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企业id返回企业风险得分
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RkScoreType> selectByScoreType(String enterpriseId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.model.RkSensitiveType;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RkSensitiveTypeMapper {
|
||||||
|
|
||||||
|
|
||||||
|
int insert(RkSensitiveType record);
|
||||||
|
|
||||||
|
int insertSelective(RkSensitiveType record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据企业id获取企业敏感信息s
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RkSensitiveType> selectExample(String enterpriseId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除敏感类型
|
||||||
|
* @param typeId
|
||||||
|
*/
|
||||||
|
void deleteRkSensitiveTypeById(String typeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改类型
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
void updatebyRkSensitiveType(RkSensitiveType record);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.rzyc.mapper;
|
package com.rzyc.mapper;
|
||||||
|
|
||||||
|
import com.rzyc.bean.risk.RkSourcesDto;
|
||||||
import com.rzyc.model.RkSources;
|
import com.rzyc.model.RkSources;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import io.swagger.models.auth.In;
|
import io.swagger.models.auth.In;
|
||||||
|
|
@ -37,4 +38,12 @@ public interface RkSourcesMapper extends BaseMapper<RkSources> {
|
||||||
Integer changeIndex(@Param("sourceId") String sourceId);
|
Integer changeIndex(@Param("sourceId") String sourceId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风险源信息分页查询
|
||||||
|
* @param RkSourcesDto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RkSources> selectPageRkSources(RkSourcesDto RkSourcesDto);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,260 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import com.common.utils.excel.ExcelColumn;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.rzyc.enums.FlowQueryStatus;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@ApiModel("风险评估列表")
|
||||||
|
public class RkCompanyDiagnosis implements Serializable {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("id 空表示添加,有表示修改")
|
||||||
|
private String diagnosisId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业id",required = true)
|
||||||
|
@NotNull(message = "企业id不能为空")
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最终得分
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("最终得分")
|
||||||
|
@ExcelColumn(value = "最终得分", col = 1)
|
||||||
|
private Integer score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断等级
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("诊断等级")
|
||||||
|
private Integer grade;
|
||||||
|
|
||||||
|
@ExcelColumn(value = "单位诊断等级", col = 2)
|
||||||
|
@ApiModelProperty("诊断等级名称")
|
||||||
|
private String gradeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("风险诊断类别")
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评估时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date assessTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private FlowQueryStatus status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String created;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人")
|
||||||
|
private String modified;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("查询条件")
|
||||||
|
private String codition;
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public String getGradeName() {
|
||||||
|
return gradeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGradeName(String gradeName) {
|
||||||
|
this.gradeName = gradeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodition() {
|
||||||
|
return codition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodition(String codition) {
|
||||||
|
this.codition = codition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiagnosisId() {
|
||||||
|
return diagnosisId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiagnosisId(String diagnosisId) {
|
||||||
|
this.diagnosisId = diagnosisId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterpriseId() {
|
||||||
|
return enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseId(String enterpriseId) {
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScore(Integer score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getGrade() {
|
||||||
|
return grade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrade(Integer grade) {
|
||||||
|
this.grade = grade;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getAssessTime() {
|
||||||
|
return assessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAssessTime(Date assessTime) {
|
||||||
|
this.assessTime = assessTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlowQueryStatus getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(FlowQueryStatus status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(String created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModified() {
|
||||||
|
return modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModified(String modified) {
|
||||||
|
this.modified = modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getModifyTime() {
|
||||||
|
return modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyTime(Date modifyTime) {
|
||||||
|
this.modifyTime = modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
RkCompanyDiagnosis other = (RkCompanyDiagnosis) that;
|
||||||
|
return (this.getDiagnosisId() == null ? other.getDiagnosisId() == null : this.getDiagnosisId().equals(other.getDiagnosisId()))
|
||||||
|
&& (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this.getEnterpriseId().equals(other.getEnterpriseId()))
|
||||||
|
&& (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
|
||||||
|
&& (this.getGrade() == null ? other.getGrade() == null : this.getGrade().equals(other.getGrade()))
|
||||||
|
&& (this.getAssessTime() == null ? other.getAssessTime() == null : this.getAssessTime().equals(other.getAssessTime()))
|
||||||
|
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||||
|
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||||
|
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||||
|
&& (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getDiagnosisId() == null) ? 0 : getDiagnosisId().hashCode());
|
||||||
|
result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
|
||||||
|
result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
|
||||||
|
result = prime * result + ((getGrade() == null) ? 0 : getGrade().hashCode());
|
||||||
|
result = prime * result + ((getAssessTime() == null) ? 0 : getAssessTime().hashCode());
|
||||||
|
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||||
|
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||||
|
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||||
|
result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", diagnosisId=").append(diagnosisId);
|
||||||
|
sb.append(", enterpriseId=").append(enterpriseId);
|
||||||
|
sb.append(", score=").append(score);
|
||||||
|
sb.append(", grade=").append(grade);
|
||||||
|
sb.append(", assessTime=").append(assessTime);
|
||||||
|
sb.append(", status=").append(status);
|
||||||
|
sb.append(", created=").append(created);
|
||||||
|
sb.append(", modified=").append(modified);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", modifyTime=").append(modifyTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
188
inventory-dao/src/main/java/com/rzyc/model/RkEntSensitive.java
Normal file
188
inventory-dao/src/main/java/com/rzyc/model/RkEntSensitive.java
Normal file
|
|
@ -0,0 +1,188 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@ApiModel("企业敏感信息")
|
||||||
|
public class RkEntSensitive implements Serializable {
|
||||||
|
/**
|
||||||
|
* 企业敏感信息id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("企业敏感信息id")
|
||||||
|
private String sensitiveId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业id",required = true)
|
||||||
|
@NotNull(message = "企业id不能为空")
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 敏感分类id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("敏感分类id")
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("企业数量")
|
||||||
|
private Integer entNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人")
|
||||||
|
private String modified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String created;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public String getSensitiveId() {
|
||||||
|
return sensitiveId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSensitiveId(String sensitiveId) {
|
||||||
|
this.sensitiveId = sensitiveId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterpriseId() {
|
||||||
|
return enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseId(String enterpriseId) {
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeId() {
|
||||||
|
return typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeId(String typeId) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getEntNum() {
|
||||||
|
return entNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntNum(Integer entNum) {
|
||||||
|
this.entNum = entNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModified() {
|
||||||
|
return modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModified(String modified) {
|
||||||
|
this.modified = modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(String created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getModifyTime() {
|
||||||
|
return modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyTime(Date modifyTime) {
|
||||||
|
this.modifyTime = modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
RkEntSensitive other = (RkEntSensitive) that;
|
||||||
|
return (this.getSensitiveId() == null ? other.getSensitiveId() == null : this.getSensitiveId().equals(other.getSensitiveId()))
|
||||||
|
&& (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this.getEnterpriseId().equals(other.getEnterpriseId()))
|
||||||
|
&& (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
|
||||||
|
&& (this.getEntNum() == null ? other.getEntNum() == null : this.getEntNum().equals(other.getEntNum()))
|
||||||
|
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||||
|
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||||
|
&& (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
|
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getSensitiveId() == null) ? 0 : getSensitiveId().hashCode());
|
||||||
|
result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
|
||||||
|
result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
|
||||||
|
result = prime * result + ((getEntNum() == null) ? 0 : getEntNum().hashCode());
|
||||||
|
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||||
|
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||||
|
result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
|
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", sensitiveId=").append(sensitiveId);
|
||||||
|
sb.append(", enterpriseId=").append(enterpriseId);
|
||||||
|
sb.append(", typeId=").append(typeId);
|
||||||
|
sb.append(", entNum=").append(entNum);
|
||||||
|
sb.append(", modified=").append(modified);
|
||||||
|
sb.append(", created=").append(created);
|
||||||
|
sb.append(", modifyTime=").append(modifyTime);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,214 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@ApiModel("企业风险评分得分信息")
|
||||||
|
public class RkEnterpriseScore implements Serializable {
|
||||||
|
/**
|
||||||
|
* 分数信息id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("id 空表示添加,有表示修改")
|
||||||
|
private String scoreId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业id",required = true)
|
||||||
|
@NotNull(message = "企业id不能为空")
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数类型id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "得分类型id",required = true)
|
||||||
|
@NotNull(message = "得分类型id不能为空")
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级分类id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("父级分类id")
|
||||||
|
private String parentId;
|
||||||
|
/**
|
||||||
|
* 得分
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("得分")
|
||||||
|
private Integer score;
|
||||||
|
|
||||||
|
@ApiModelProperty("分数类型 1表示加分,2表示减分")
|
||||||
|
private Integer scoreType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人")
|
||||||
|
private String modified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String created;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
public String getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(String parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getScoreType() {
|
||||||
|
return scoreType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScoreType(Integer scoreType) {
|
||||||
|
this.scoreType = scoreType;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public String getScoreId() {
|
||||||
|
return scoreId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScoreId(String scoreId) {
|
||||||
|
this.scoreId = scoreId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterpriseId() {
|
||||||
|
return enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseId(String enterpriseId) {
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeId() {
|
||||||
|
return typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeId(String typeId) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScore(Integer score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModified() {
|
||||||
|
return modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModified(String modified) {
|
||||||
|
this.modified = modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(String created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getModifyTime() {
|
||||||
|
return modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyTime(Date modifyTime) {
|
||||||
|
this.modifyTime = modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
RkEnterpriseScore other = (RkEnterpriseScore) that;
|
||||||
|
return (this.getScoreId() == null ? other.getScoreId() == null : this.getScoreId().equals(other.getScoreId()))
|
||||||
|
&& (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this.getEnterpriseId().equals(other.getEnterpriseId()))
|
||||||
|
&& (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
|
||||||
|
&& (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
|
||||||
|
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||||
|
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||||
|
&& (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
|
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getScoreId() == null) ? 0 : getScoreId().hashCode());
|
||||||
|
result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
|
||||||
|
result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
|
||||||
|
result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
|
||||||
|
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||||
|
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||||
|
result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
|
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", scoreId=").append(scoreId);
|
||||||
|
sb.append(", enterpriseId=").append(enterpriseId);
|
||||||
|
sb.append(", typeId=").append(typeId);
|
||||||
|
sb.append(", score=").append(score);
|
||||||
|
sb.append(", modified=").append(modified);
|
||||||
|
sb.append(", created=").append(created);
|
||||||
|
sb.append(", modifyTime=").append(modifyTime);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
258
inventory-dao/src/main/java/com/rzyc/model/RkScoreType.java
Normal file
258
inventory-dao/src/main/java/com/rzyc/model/RkScoreType.java
Normal file
|
|
@ -0,0 +1,258 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@ApiModel("企业风险评分类型")
|
||||||
|
public class RkScoreType implements Serializable {
|
||||||
|
/**
|
||||||
|
* 评分分类id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("id 空表示添加,有表示修改")
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "名称",required = true)
|
||||||
|
@NotNull(message = "分类名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级分类id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("父级分类id")
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sortId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1表示生成,2:重点风险源,3:较大风险源,4:重要场所\重要目标,5:人员密集场所
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("0:父节点不用计算1表示生成,2:重点风险源,3:较大风险源,4:重要场所\\重要目标,5:人员密集场所6:只能单选")
|
||||||
|
private Integer source;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人")
|
||||||
|
private String modified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String created;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得分
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("得分")
|
||||||
|
private Integer score;
|
||||||
|
|
||||||
|
@ApiModelProperty("分数类型 1表示加分,2表示减分")
|
||||||
|
private Integer scoreType;
|
||||||
|
|
||||||
|
@ApiModelProperty("总分")
|
||||||
|
private Integer fullMarks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子节点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("子节点")
|
||||||
|
private List<RkScoreType> children;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getScoreType() {
|
||||||
|
return scoreType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScoreType(Integer scoreType) {
|
||||||
|
this.scoreType = scoreType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFullMarks() {
|
||||||
|
return fullMarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFullMarks(Integer fullMarks) {
|
||||||
|
this.fullMarks = fullMarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScore(Integer score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RkScoreType> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<RkScoreType> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public String getTypeId() {
|
||||||
|
return typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeId(String typeId) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(String parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSortId() {
|
||||||
|
return sortId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSortId(Integer sortId) {
|
||||||
|
this.sortId = sortId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(Integer source) {
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModified() {
|
||||||
|
return modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModified(String modified) {
|
||||||
|
this.modified = modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(String created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getModifyTime() {
|
||||||
|
return modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyTime(Date modifyTime) {
|
||||||
|
this.modifyTime = modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
RkScoreType other = (RkScoreType) that;
|
||||||
|
return (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
|
||||||
|
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||||
|
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
|
||||||
|
&& (this.getSortId() == null ? other.getSortId() == null : this.getSortId().equals(other.getSortId()))
|
||||||
|
&& (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
|
||||||
|
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||||
|
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||||
|
&& (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
|
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
|
||||||
|
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||||
|
result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
|
||||||
|
result = prime * result + ((getSortId() == null) ? 0 : getSortId().hashCode());
|
||||||
|
result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
|
||||||
|
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||||
|
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||||
|
result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
|
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", typeId=").append(typeId);
|
||||||
|
sb.append(", name=").append(name);
|
||||||
|
sb.append(", parentId=").append(parentId);
|
||||||
|
sb.append(", sortId=").append(sortId);
|
||||||
|
sb.append(", source=").append(source);
|
||||||
|
sb.append(", modified=").append(modified);
|
||||||
|
sb.append(", created=").append(created);
|
||||||
|
sb.append(", modifyTime=").append(modifyTime);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
233
inventory-dao/src/main/java/com/rzyc/model/RkSensitiveType.java
Normal file
233
inventory-dao/src/main/java/com/rzyc/model/RkSensitiveType.java
Normal file
|
|
@ -0,0 +1,233 @@
|
||||||
|
package com.rzyc.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@ApiModel("企业敏感类型")
|
||||||
|
public class RkSensitiveType implements Serializable {
|
||||||
|
/**
|
||||||
|
* 敏感分类id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("敏感分类id 空新增 不空修改")
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类名
|
||||||
|
*/
|
||||||
|
@NotNull(message = "类型名称不能为空")
|
||||||
|
@ApiModelProperty(value = "类型名称",required = true)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级分类id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("父级分类id")
|
||||||
|
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sortId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人")
|
||||||
|
private String modified;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String created;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("企业数量")
|
||||||
|
private Integer entNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业敏感信息id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("企业敏感信息id")
|
||||||
|
private String sensitiveId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("子分类集合")
|
||||||
|
private List<RkSensitiveType> children;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getEntNum() {
|
||||||
|
return entNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntNum(Integer entNum) {
|
||||||
|
this.entNum = entNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeId() {
|
||||||
|
return typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeId(String typeId) {
|
||||||
|
this.typeId = typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentId(String parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSortId() {
|
||||||
|
return sortId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSortId(Integer sortId) {
|
||||||
|
this.sortId = sortId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModified() {
|
||||||
|
return modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModified(String modified) {
|
||||||
|
this.modified = modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(String created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getModifyTime() {
|
||||||
|
return modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyTime(Date modifyTime) {
|
||||||
|
this.modifyTime = modifyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RkSensitiveType> getChildren() {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildren(List<RkSensitiveType> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSensitiveId() {
|
||||||
|
return sensitiveId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSensitiveId(String sensitiveId) {
|
||||||
|
this.sensitiveId = sensitiveId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object that) {
|
||||||
|
if (this == that) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (that == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (getClass() != that.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
RkSensitiveType other = (RkSensitiveType) that;
|
||||||
|
return (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
|
||||||
|
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||||
|
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
|
||||||
|
&& (this.getSortId() == null ? other.getSortId() == null : this.getSortId().equals(other.getSortId()))
|
||||||
|
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||||
|
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||||
|
&& (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
|
||||||
|
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
|
||||||
|
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||||
|
result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
|
||||||
|
result = prime * result + ((getSortId() == null) ? 0 : getSortId().hashCode());
|
||||||
|
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||||
|
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||||
|
result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
|
||||||
|
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(getClass().getSimpleName());
|
||||||
|
sb.append(" [");
|
||||||
|
sb.append("Hash = ").append(hashCode());
|
||||||
|
sb.append(", typeId=").append(typeId);
|
||||||
|
sb.append(", name=").append(name);
|
||||||
|
sb.append(", parentId=").append(parentId);
|
||||||
|
sb.append(", sortId=").append(sortId);
|
||||||
|
sb.append(", modified=").append(modified);
|
||||||
|
sb.append(", created=").append(created);
|
||||||
|
sb.append(", modifyTime=").append(modifyTime);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,253 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.rzyc.mapper.RkCompanyDiagnosisMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.rzyc.model.RkCompanyDiagnosis">
|
||||||
|
<id column="diagnosis_id" jdbcType="VARCHAR" property="diagnosisId" />
|
||||||
|
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
|
||||||
|
<result column="score" jdbcType="INTEGER" property="score" />
|
||||||
|
<result column="grade" jdbcType="INTEGER" property="grade" />
|
||||||
|
<result column="assess_time" jdbcType="TIMESTAMP" property="assessTime" />
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
|
<result column="created" jdbcType="VARCHAR" property="created" />
|
||||||
|
<result column="modified" jdbcType="VARCHAR" property="modified" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
|
||||||
|
<result column="category" jdbcType="VARCHAR" property="category"/>
|
||||||
|
<result column="gradeName" jdbcType="VARCHAR" property="gradeName"/>
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
diagnosis_id, enterprise_id, score, grade, assess_time, status, created, modified,
|
||||||
|
create_time, modify_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from rk_company_diagnosis
|
||||||
|
where diagnosis_id = #{diagnosisId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from rk_company_diagnosis
|
||||||
|
where diagnosis_id = #{diagnosisId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.rzyc.model.RkCompanyDiagnosis">
|
||||||
|
insert into rk_company_diagnosis (diagnosis_id, enterprise_id, score,
|
||||||
|
grade, assess_time, status,
|
||||||
|
created, modified, create_time,
|
||||||
|
modify_time,category)
|
||||||
|
values (#{diagnosisId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER},
|
||||||
|
#{grade,jdbcType=INTEGER}, #{assessTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR},
|
||||||
|
#{created,jdbcType=VARCHAR}, #{modified,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP},#{category})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.rzyc.model.RkCompanyDiagnosis">
|
||||||
|
insert into rk_company_diagnosis
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="diagnosisId != null">
|
||||||
|
diagnosis_id,
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
enterprise_id,
|
||||||
|
</if>
|
||||||
|
<if test="score != null">
|
||||||
|
score,
|
||||||
|
</if>
|
||||||
|
<if test="grade != null">
|
||||||
|
grade,
|
||||||
|
</if>
|
||||||
|
<if test="assessTime != null">
|
||||||
|
assess_time,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status,
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created,
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="diagnosisId != null">
|
||||||
|
#{diagnosisId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
#{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="score != null">
|
||||||
|
#{score,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="grade != null">
|
||||||
|
#{grade,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="assessTime != null">
|
||||||
|
#{assessTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
#{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
#{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.RkCompanyDiagnosis">
|
||||||
|
update rk_company_diagnosis
|
||||||
|
<set>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="score != null">
|
||||||
|
score = #{score,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="grade != null">
|
||||||
|
grade = #{grade,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="assessTime != null">
|
||||||
|
assess_time = #{assessTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created = #{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified = #{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="category != null">
|
||||||
|
category = #{category}
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where diagnosis_id = #{diagnosisId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.RkCompanyDiagnosis">
|
||||||
|
update rk_company_diagnosis
|
||||||
|
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
score = #{score,jdbcType=INTEGER},
|
||||||
|
grade = #{grade,jdbcType=INTEGER},
|
||||||
|
assess_time = #{assessTime,jdbcType=TIMESTAMP},
|
||||||
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
created = #{created,jdbcType=VARCHAR},
|
||||||
|
modified = #{modified,jdbcType=VARCHAR},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
|
||||||
|
where diagnosis_id = #{diagnosisId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<!--根据企业id删除列表-->
|
||||||
|
<delete id="deletByEnterpriseId" parameterType="java.lang.String">
|
||||||
|
delete from rk_company_diagnosis
|
||||||
|
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!--根据企业id返回诊断列表-->
|
||||||
|
<select id="selectByEnterpriseId" parameterType="java.lang.String" resultMap="BaseResultMap" >
|
||||||
|
SELECT enterprise_id,score,grade,assess_time,`status` FROM rk_company_diagnosis WHERE enterprise_id = #{enterpriseId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByDiagnosisId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
SELECT enterprise_id,score,(case grade WHEN '1' THEN 'Ⅰ级' WHEN '2' THEN 'Ⅱ级' WHEN '3' THEN 'Ⅲ级' WHEN '4' THEN 'Ⅳ级' else '未评级' END )gradeName,
|
||||||
|
assess_time,`status`,grade
|
||||||
|
FROM rk_company_diagnosis WHERE diagnosis_id = #{diagnosisId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--条件查询-->
|
||||||
|
<select id="selectQueryCompanyDiagnosis" parameterType="com.rzyc.model.RkCompanyDiagnosis" resultMap="BaseResultMap">
|
||||||
|
SELECT diagnosis_id, enterprise_id,score,grade,assess_time,`status`,
|
||||||
|
(case grade WHEN '1' THEN 'Ⅰ级' WHEN '2' THEN 'Ⅱ级' WHEN '3' THEN 'Ⅲ级' WHEN '4' THEN 'Ⅳ级' else '未评级' END )gradeName
|
||||||
|
FROM rk_company_diagnosis WHERE enterprise_id = #{enterpriseId}
|
||||||
|
<if test="grade != null">
|
||||||
|
and grade = #{grade}
|
||||||
|
</if>
|
||||||
|
<if test="codition != null and codition != ''">
|
||||||
|
and (score like concat(concat("%",#{codition}),"%")
|
||||||
|
or status like concat(concat("%",#{codition}),"%")
|
||||||
|
)
|
||||||
|
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
154
inventory-dao/src/main/resources/mapper/RkEntSensitiveMapper.xml
Normal file
154
inventory-dao/src/main/resources/mapper/RkEntSensitiveMapper.xml
Normal file
|
|
@ -0,0 +1,154 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.rzyc.mapper.RkEntSensitiveMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.rzyc.model.RkEntSensitive">
|
||||||
|
<result column="sensitive_id" jdbcType="VARCHAR" property="sensitiveId" />
|
||||||
|
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
|
||||||
|
<result column="type_id" jdbcType="VARCHAR" property="typeId" />
|
||||||
|
<result column="ent_num" jdbcType="INTEGER" property="entNum" />
|
||||||
|
<result column="modified" jdbcType="VARCHAR" property="modified" />
|
||||||
|
<result column="created" jdbcType="VARCHAR" property="created" />
|
||||||
|
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
sensitive_id, enterprise_id, type_id, ent_num, modified, created, modify_time, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.rzyc.model.RkEntSensitive">
|
||||||
|
insert into rk_ent_sensitive (sensitive_id, enterprise_id, type_id,
|
||||||
|
ent_num, modified, created,
|
||||||
|
modify_time, create_time)
|
||||||
|
values (#{sensitiveId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{typeId,jdbcType=VARCHAR},
|
||||||
|
#{entNum,jdbcType=INTEGER}, #{modified,jdbcType=VARCHAR}, #{created,jdbcType=VARCHAR},
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.rzyc.model.RkEntSensitive">
|
||||||
|
insert into rk_ent_sensitive
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="sensitiveId != null">
|
||||||
|
sensitive_id,
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
enterprise_id,
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="entNum != null">
|
||||||
|
ent_num,
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified,
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created,
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="sensitiveId != null">
|
||||||
|
#{sensitiveId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
#{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="entNum != null">
|
||||||
|
#{entNum,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
#{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
#{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--//修改企业敏感信息-->
|
||||||
|
<update id="updateByRkEntSensitive" parameterType="com.rzyc.model.RkEntSensitive">
|
||||||
|
UPDATE rk_ent_sensitive
|
||||||
|
set enterprise_id = #{enterpriseId},type_id = #{typeId},ent_num = #{entNum},modified = #{modified},modify_time = #{modifyTime}
|
||||||
|
WHERE sensitive_id = #{sensitiveId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteByRkEntSensitive" parameterType="java.lang.String">
|
||||||
|
DELETE FROM rk_ent_sensitive WHERE enterprise_id = #{enterpriseId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,194 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.rzyc.mapper.RkEnterpriseScoreMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.rzyc.model.RkEnterpriseScore">
|
||||||
|
<id column="score_id" jdbcType="VARCHAR" property="scoreId" />
|
||||||
|
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
|
||||||
|
<result column="type_id" jdbcType="VARCHAR" property="typeId" />
|
||||||
|
<result column="score" jdbcType="INTEGER" property="score" />
|
||||||
|
<result column="modified" jdbcType="VARCHAR" property="modified" />
|
||||||
|
<result column="created" jdbcType="VARCHAR" property="created" />
|
||||||
|
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
score_id, enterprise_id, type_id, score, modified, created, modify_time, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from rk_enterprise_score
|
||||||
|
where score_id = #{scoreId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from rk_enterprise_score
|
||||||
|
where score_id = #{scoreId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.rzyc.model.RkEnterpriseScore">
|
||||||
|
insert into rk_enterprise_score (score_id, enterprise_id, type_id,
|
||||||
|
score, modified, created,
|
||||||
|
modify_time, create_time)
|
||||||
|
values (#{scoreId,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{typeId,jdbcType=VARCHAR},
|
||||||
|
#{score,jdbcType=INTEGER}, #{modified,jdbcType=VARCHAR}, #{created,jdbcType=VARCHAR},
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.rzyc.model.RkEnterpriseScore">
|
||||||
|
insert into rk_enterprise_score
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="scoreId != null">
|
||||||
|
score_id,
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
enterprise_id,
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="score != null">
|
||||||
|
score,
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified,
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created,
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="scoreId != null">
|
||||||
|
#{scoreId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
#{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="score != null">
|
||||||
|
#{score,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
#{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
#{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.RkEnterpriseScore">
|
||||||
|
update rk_enterprise_score
|
||||||
|
<set>
|
||||||
|
<if test="enterpriseId != null">
|
||||||
|
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id = #{typeId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="score != null">
|
||||||
|
score = #{score,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified = #{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created = #{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where score_id = #{scoreId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.RkEnterpriseScore">
|
||||||
|
update rk_enterprise_score
|
||||||
|
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
|
||||||
|
type_id = #{typeId,jdbcType=VARCHAR},
|
||||||
|
score = #{score,jdbcType=INTEGER},
|
||||||
|
modified = #{modified,jdbcType=VARCHAR},
|
||||||
|
created = #{created,jdbcType=VARCHAR},
|
||||||
|
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||||
|
where score_id = #{scoreId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<delete id="deleteByEnterpriseId" parameterType="java.lang.String">
|
||||||
|
delete from rk_enterprise_score
|
||||||
|
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
219
inventory-dao/src/main/resources/mapper/RkScoreTypeMapper.xml
Normal file
219
inventory-dao/src/main/resources/mapper/RkScoreTypeMapper.xml
Normal file
|
|
@ -0,0 +1,219 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.rzyc.mapper.RkScoreTypeMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.rzyc.model.RkScoreType">
|
||||||
|
<id column="type_id" jdbcType="VARCHAR" property="typeId" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||||
|
<result column="sort_id" jdbcType="INTEGER" property="sortId" />
|
||||||
|
<result column="source" jdbcType="INTEGER" property="source" />
|
||||||
|
<result column="modified" jdbcType="VARCHAR" property="modified" />
|
||||||
|
<result column="created" jdbcType="VARCHAR" property="created" />
|
||||||
|
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="score" jdbcType="INTEGER" property="score" />
|
||||||
|
<result column="full_marks" jdbcType="INTEGER" property="fullMarks"/>
|
||||||
|
<result column="score_type" jdbcType="INTEGER" property="scoreType" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
type_id, name, parent_id, sort_id, source, modified, created, modify_time, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from rk_score_type
|
||||||
|
where type_id = #{typeId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from rk_score_type
|
||||||
|
where type_id = #{typeId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.rzyc.model.RkScoreType">
|
||||||
|
insert into rk_score_type (type_id, name, parent_id,
|
||||||
|
sort_id, source, modified,
|
||||||
|
created, modify_time, create_time,full_marks,score_type
|
||||||
|
)
|
||||||
|
values (#{typeId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
|
||||||
|
#{sortId,jdbcType=INTEGER}, #{source,jdbcType=INTEGER}, #{modified,jdbcType=VARCHAR},
|
||||||
|
#{created,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},#{fullMarks},#{scoreType}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.rzyc.model.RkScoreType">
|
||||||
|
insert into rk_score_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
name,
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id,
|
||||||
|
</if>
|
||||||
|
<if test="sortId != null">
|
||||||
|
sort_id,
|
||||||
|
</if>
|
||||||
|
<if test="source != null">
|
||||||
|
source,
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified,
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created,
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
#{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sortId != null">
|
||||||
|
#{sortId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="source != null">
|
||||||
|
#{source,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
#{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
#{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.RkScoreType">
|
||||||
|
update rk_score_type
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
name = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sortId != null">
|
||||||
|
sort_id = #{sortId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="source != null">
|
||||||
|
source = #{source,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified = #{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created = #{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="fullMarks != null">
|
||||||
|
full_marks = #{fullMarks,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="scoreType != null ">
|
||||||
|
score_type = #{scoreType}
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where type_id = #{typeId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.RkScoreType">
|
||||||
|
update rk_score_type
|
||||||
|
set name = #{name,jdbcType=VARCHAR},
|
||||||
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
|
sort_id = #{sortId,jdbcType=INTEGER},
|
||||||
|
source = #{source,jdbcType=INTEGER},
|
||||||
|
modified = #{modified,jdbcType=VARCHAR},
|
||||||
|
created = #{created,jdbcType=VARCHAR},
|
||||||
|
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||||
|
where type_id = #{typeId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<!--根据企业id返回企业风险得分-->
|
||||||
|
<select id="selectByScoreType" parameterType="java.lang.String" resultMap="BaseResultMap" >
|
||||||
|
SELECT rt.type_id,rt.`name`,rt.parent_id,rt.sort_id,rt.source,es.score,rt.full_marks,rt.score_type FROM rk_score_type rt
|
||||||
|
LEFT JOIN rk_enterprise_score es on rt.type_id = es.type_id
|
||||||
|
AND es.enterprise_id = #{enterpriseId}
|
||||||
|
ORDER BY rt.sort_id ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,166 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.rzyc.mapper.RkSensitiveTypeMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.rzyc.model.RkSensitiveType">
|
||||||
|
<result column="type_id" jdbcType="VARCHAR" property="typeId" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||||
|
<result column="sort_id" jdbcType="INTEGER" property="sortId" />
|
||||||
|
<result column="modified" jdbcType="VARCHAR" property="modified" />
|
||||||
|
<result column="created" jdbcType="VARCHAR" property="created" />
|
||||||
|
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="ent_num" jdbcType="INTEGER" property="entNum" />
|
||||||
|
<result column="sensitive_id" jdbcType="VARCHAR" property="sensitiveId" />
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
type_id, name, parent_id, sort_id, modified, created, modify_time, create_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.rzyc.model.RkSensitiveType">
|
||||||
|
insert into rk_sensitive_type (type_id, name, parent_id,
|
||||||
|
sort_id, modified, created,
|
||||||
|
modify_time, create_time)
|
||||||
|
values (#{typeId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
|
||||||
|
#{sortId,jdbcType=INTEGER}, #{modified,jdbcType=VARCHAR}, #{created,jdbcType=VARCHAR},
|
||||||
|
#{modifyTime}, #{createTime})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.rzyc.model.RkSensitiveType">
|
||||||
|
insert into rk_sensitive_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
name,
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id,
|
||||||
|
</if>
|
||||||
|
<if test="sortId != null">
|
||||||
|
sort_id,
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
modified,
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
created,
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
modify_time,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null">
|
||||||
|
#{typeId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
#{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sortId != null">
|
||||||
|
#{sortId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="modified != null">
|
||||||
|
#{modified,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="created != null">
|
||||||
|
#{created,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime != null">
|
||||||
|
#{modifyTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--根据企业id获取企业敏感信息-->
|
||||||
|
<select id="selectExample" resultMap="BaseResultMap" >
|
||||||
|
SELECT rs.`ent_num` as ent_num,rs.sensitive_id as sensitive_id,rt.*
|
||||||
|
FROM `rk_sensitive_type` rt
|
||||||
|
LEFT JOIN `rk_ent_sensitive` rs ON rt.`type_id` = rs.`type_id`
|
||||||
|
AND rs.`enterprise_id` =#{enterpriseId}
|
||||||
|
ORDER BY rt.`sort_id` ASC
|
||||||
|
</select>
|
||||||
|
<!--修改类型-->
|
||||||
|
<update id="updatebyRkSensitiveType" parameterType="com.rzyc.model.RkSensitiveType" >
|
||||||
|
UPDATE rk_sensitive_type set `name` = #{name},modified=#{modified},modify_time=#{modifyTime} WHERE type_id = #{typeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--暂时不用-->
|
||||||
|
<!--<delete id="deleteRkSensitiveTypeById" parameterType="java.lang.String">
|
||||||
|
|
||||||
|
</delete>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -93,4 +93,40 @@
|
||||||
where source_id = #{sourceId}
|
where source_id = #{sourceId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!--风险源分页查询-->
|
||||||
|
<select id="selectPageRkSources" parameterType="com.rzyc.bean.risk.RkSourcesDto" resultMap="BaseResultMap">
|
||||||
|
SELECT rks.`name` as rk_source_id, rt.`name` as type_id, rs.palce,rs.possibility,rs.seriousness,rs.controlled,rs.source_id,
|
||||||
|
rs.enterprise_id,rs.status,rs.risk_grade,rs.infrastructure,rs.details,rs.engineering,rs.measures,rs.created,
|
||||||
|
(case rs.possibility WHEN '1' THEN '基本不可能' WHEN '2' THEN '较不可能' WHEN '3' THEN '可能' WHEN '4' THEN '较可能' WHEN '5' THEN '很可能' else '未知' END )possibilityName,
|
||||||
|
(case rs.seriousness WHEN '1' THEN '很小' WHEN '2' THEN '小' WHEN '3' THEN '一般' WHEN '4' THEN '大' WHEN '5' THEN '很大' else '未知' END )seriousnessName,
|
||||||
|
(case rs.risk_grade WHEN '1' THEN '低' WHEN '2' THEN '低' WHEN '3' THEN '一般' WHEN '4' THEN '较大' WHEN '5' THEN '重大' else '未知' END )riskgradeName
|
||||||
|
FROM rk_sources rs
|
||||||
|
LEFT JOIN rk_risk_type rt
|
||||||
|
on rs.type_id = rt.type_id
|
||||||
|
LEFT JOIN rk_risk_type rks
|
||||||
|
on rks.type_id = rs.rk_source_id
|
||||||
|
WHERE 1 = 1
|
||||||
|
and rs.enterprise_id = #{enterpriseId}
|
||||||
|
<if test="sourceId != null and sourceId != ''">
|
||||||
|
and rs.source_id = #{sourceId}
|
||||||
|
</if>
|
||||||
|
<if test="codition != null and codition != ''">
|
||||||
|
and (rs.palce like concat(concat("%",#{codition}),"%")
|
||||||
|
or rks.`name` like concat(concat("%",#{codition}),"%")
|
||||||
|
or rs.possibility like concat(concat("%",#{codition}),"%")
|
||||||
|
or rs.seriousness like concat(concat("%",#{codition}),"%"))
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="typeId != null and typeId != '' ">
|
||||||
|
and rs.type_id = #{typeId}
|
||||||
|
</if>
|
||||||
|
<if test="riskgrade != null">
|
||||||
|
and rs.risk_grade = #{riskgrade}
|
||||||
|
</if>
|
||||||
|
<if test="status != null ">
|
||||||
|
and rs.status = #{status}
|
||||||
|
</if>
|
||||||
|
ORDER BY rs.modify_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -552,6 +552,41 @@ public class BaseController {
|
||||||
protected InPostItemMapper inPostItemMapper;
|
protected InPostItemMapper inPostItemMapper;
|
||||||
|
|
||||||
|
|
||||||
|
//企业周边情况
|
||||||
|
@Autowired
|
||||||
|
protected RkSensitiveTypeMapper rkSensitiveTypeMapper;
|
||||||
|
|
||||||
|
//企业周边数据信息
|
||||||
|
@Autowired
|
||||||
|
protected RkEntSensitiveMapper rkEntSensitiveMapper;
|
||||||
|
|
||||||
|
//企业风险分级条款
|
||||||
|
@Autowired
|
||||||
|
protected RkScoreTypeMapper rkScoreTypeMapper;
|
||||||
|
|
||||||
|
//企业风险评估分数
|
||||||
|
@Autowired
|
||||||
|
protected RkEnterpriseScoreMapper rkEnterpriseScoreMapper;
|
||||||
|
|
||||||
|
//风险评估分数
|
||||||
|
@Autowired
|
||||||
|
protected RkCompanyDiagnosisMapper rkCompanyDiagnosisMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/*高敏感场所*/
|
||||||
|
protected String HIGH_SENSITIVE_PLACES = "502b1ff4-bd01-11eb-9d3c-00163e0c1c62";
|
||||||
|
/*重要目标*/
|
||||||
|
protected String KEY_OBJECTIVES = "502b2472-bd01-11eb-9d3c-00163e0c1c62";
|
||||||
|
/*人员密集区域*/
|
||||||
|
protected String DENSELY_POPULATED_PLACES = "c6d817c1-5eec-4c88-916c-4c2f20dec062";
|
||||||
|
|
||||||
|
|
||||||
|
//安全事故情况
|
||||||
|
protected String SAFETY_ACCIDENTS = "76752d5b-c787-413a-b228-63b5507eaa03";
|
||||||
|
//安全生产标准化达标情况
|
||||||
|
protected String STANDARDIZATION_OF_WORK_SAFETY = "2d32e694-5af5-4786-b540-c56a34196ff9";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新都文件地址处理
|
* 新都文件地址处理
|
||||||
* @param url
|
* @param url
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.rzyc.controller;
|
package com.rzyc.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.common.utils.RandomNumber;
|
||||||
import com.common.utils.StringUtils;
|
import com.common.utils.StringUtils;
|
||||||
import com.common.utils.TypeConversion;
|
import com.common.utils.TypeConversion;
|
||||||
import com.common.utils.model.*;
|
import com.common.utils.model.*;
|
||||||
|
|
@ -8,9 +11,9 @@ import com.github.pagehelper.PageHelper;
|
||||||
import com.rzyc.advice.LoginAuth;
|
import com.rzyc.advice.LoginAuth;
|
||||||
import com.rzyc.bean.risk.*;
|
import com.rzyc.bean.risk.*;
|
||||||
import com.rzyc.enums.DelState;
|
import com.rzyc.enums.DelState;
|
||||||
|
import com.rzyc.enums.FlowQueryStatus;
|
||||||
import com.rzyc.enums.ResourceRiskLevel;
|
import com.rzyc.enums.ResourceRiskLevel;
|
||||||
import com.rzyc.model.RkRiskType;
|
import com.rzyc.model.*;
|
||||||
import com.rzyc.model.RkSources;
|
|
||||||
import com.rzyc.model.ent.SysEnterprise;
|
import com.rzyc.model.ent.SysEnterprise;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
|
@ -21,10 +24,9 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.List;
|
import java.util.stream.Collectors;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author dong
|
* @author dong
|
||||||
|
|
@ -38,6 +40,370 @@ import java.util.Map;
|
||||||
@Validated
|
@Validated
|
||||||
public class RiskController extends BaseController {
|
public class RiskController extends BaseController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单位敏感信息类型
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取单位敏感信息类型", notes = "获取单位敏感信息类型")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "企业名称", required = false, dataType = "string"),
|
||||||
|
|
||||||
|
})
|
||||||
|
@GetMapping("/getRkSensitiveType/{enterpriseId}")
|
||||||
|
@ResponseBody
|
||||||
|
public MultiResult<RkSensitiveType> getRkSensitiveType(@PathVariable String enterpriseId)throws Exception{
|
||||||
|
MultiResult<RkSensitiveType> singleResult = new MultiResult<>();
|
||||||
|
List<RkSensitiveType> rkSensitiveTypes = rkSensitiveTypeMapper.selectExample(enterpriseId);
|
||||||
|
|
||||||
|
if (rkSensitiveTypes.size()>0){
|
||||||
|
singleResult.setMessage(Message.SUCCESS);
|
||||||
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||||||
|
JSONArray rkSensitiveTypeJson = handleResouceTree(rkSensitiveTypes);
|
||||||
|
List<RkSensitiveType> rkSensitiveTypeList = JSONArray.parseArray(JSONArray.toJSONString(rkSensitiveTypeJson), RkSensitiveType.class);
|
||||||
|
singleResult.setData(rkSensitiveTypeList);
|
||||||
|
}else{
|
||||||
|
singleResult.setMessage(Message.ERROR);
|
||||||
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能项树形结构
|
||||||
|
* @param resources
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private JSONArray handleResouceTree(List<RkSensitiveType> resources)throws Exception{
|
||||||
|
List<Map<String,Object>> data = new ArrayList<>();
|
||||||
|
for(RkSensitiveType resource : resources){
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(resource.getParentId())){
|
||||||
|
resource.setParentId("");
|
||||||
|
}
|
||||||
|
Map<String,Object> entUserMap = new HashMap<String,Object>();
|
||||||
|
entUserMap.put("typeId",resource.getTypeId());
|
||||||
|
entUserMap.put("parentId",resource.getParentId());
|
||||||
|
entUserMap.put("name",resource.getName());
|
||||||
|
entUserMap.put("sortId",resource.getSortId());
|
||||||
|
entUserMap.put("entNum",resource.getEntNum());
|
||||||
|
entUserMap.put("sensitiveId",resource.getSensitiveId());
|
||||||
|
data.add(entUserMap);
|
||||||
|
}
|
||||||
|
JSONArray result = TypeConversion.listToTree(JSONArray.parseArray(JSON.toJSONString(data)),"typeId","parentId","children");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改单位周围敏感目标数量
|
||||||
|
* @param rkEntSensitiveDto
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "修改单位周围敏感目标数量", notes = "修改单位周围敏感目标数量")
|
||||||
|
@PostMapping("/updateRkSensitive")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<String> updateRkSensitive(@Valid @RequestBody RksensttiveDto rkEntSensitiveDto)throws Exception{
|
||||||
|
SingleResult<String> singleResult = new SingleResult<>();
|
||||||
|
//操作人
|
||||||
|
String chinaName = getChinaName();
|
||||||
|
List<RkEntSensitive> rkEntSensitiveList = JSONArray.parseArray(rkEntSensitiveDto.getRkSensitive(), RkEntSensitive.class);
|
||||||
|
Date date = new Date();
|
||||||
|
if (rkEntSensitiveList.size()>0){
|
||||||
|
//先删除已有的信息
|
||||||
|
rkEntSensitiveMapper.deleteByRkEntSensitive(rkEntSensitiveDto.getEnterpriseId());
|
||||||
|
rkEntSensitiveList.stream().forEach(rkEntSensitive -> {
|
||||||
|
rkEntSensitive.setEnterpriseId(rkEntSensitiveDto.getEnterpriseId());
|
||||||
|
rkEntSensitive.setModified(chinaName);
|
||||||
|
rkEntSensitive.setModifyTime(date);
|
||||||
|
rkEntSensitive.setSensitiveId(RandomNumber.getUUid());
|
||||||
|
rkEntSensitive.setCreated(chinaName);
|
||||||
|
rkEntSensitive.setCreateTime(date);
|
||||||
|
rkEntSensitiveMapper.insert(rkEntSensitive);
|
||||||
|
});
|
||||||
|
|
||||||
|
singleResult.setMessage(Message.SUCCESS);
|
||||||
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||||||
|
}else{
|
||||||
|
singleResult.setCode(Code.NO_DATA.getCode());
|
||||||
|
singleResult.setMessage(Message.NO_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前企业风险评分类型与得分
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取当前企业风险评分类型与得分", notes = "获取当前企业风险评分类型与得分")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "企业Id", required = false, dataType = "string"),
|
||||||
|
|
||||||
|
})
|
||||||
|
@GetMapping("/getScoreType/{enterpriseId}")
|
||||||
|
@ResponseBody
|
||||||
|
public MultiResult<RkScoreType> getScoreType(@PathVariable String enterpriseId)throws Exception{
|
||||||
|
MultiResult<RkScoreType> multiResult = new MultiResult<>();
|
||||||
|
List<RkScoreType> rkScoreTypes = rkScoreTypeMapper.selectByScoreType(enterpriseId);
|
||||||
|
List<RkSensitiveType> rkSensitiveTypes = rkSensitiveTypeMapper.selectExample(enterpriseId);
|
||||||
|
RkSourcesDto rkSourcesDto = new RkSourcesDto();
|
||||||
|
rkSourcesDto.setEnterpriseId(enterpriseId);
|
||||||
|
List<RkSources> rkSources = rkSourcesMapper.selectPageRkSources(rkSourcesDto);
|
||||||
|
if (rkScoreTypes.size() == 0){
|
||||||
|
multiResult.setCode(Code.NO_DATA.getCode());
|
||||||
|
multiResult.setMessage(Message.NO_DATA);
|
||||||
|
return multiResult;
|
||||||
|
}
|
||||||
|
List<RkScoreType> rkScoreTypesTree = this.setScoreType(rkScoreTypes, rkSensitiveTypes, rkSources);
|
||||||
|
rkScoreTypes.stream().sorted(Comparator.comparing(RkScoreType::getSortId));
|
||||||
|
multiResult.setData(rkScoreTypesTree);
|
||||||
|
return multiResult;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改评分类型需要查询的分数并返回树形
|
||||||
|
* @param rkScoreTypes
|
||||||
|
* @param rkSensitiveTypes
|
||||||
|
* @param rkSources
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private List<RkScoreType> setScoreType(List<RkScoreType> rkScoreTypes,List<RkSensitiveType> rkSensitiveTypes, List<RkSources> rkSources)throws Exception{
|
||||||
|
List<RkSensitiveType> rkSensitiveTypeList = null;
|
||||||
|
|
||||||
|
if (rkSensitiveTypes.size() >0){
|
||||||
|
JSONArray rkSensitiveTypeJson = this.handleResouceTree(rkSensitiveTypes);
|
||||||
|
rkSensitiveTypeList = JSONArray.parseArray(JSONArray.toJSONString(rkSensitiveTypeJson), RkSensitiveType.class);
|
||||||
|
}
|
||||||
|
if (rkScoreTypes.size()>0){
|
||||||
|
List<RkSensitiveType> finalRkSensitiveTypeList = rkSensitiveTypeList;
|
||||||
|
rkScoreTypes.stream().forEach(rkScoreType -> {
|
||||||
|
//1.存在重大安全风险源的,每个扣10分;3个及以上的,扣40分;
|
||||||
|
if (rkScoreType.getSource()==2){
|
||||||
|
List<RkSources> collect = rkSources.stream().filter(rkSource -> {
|
||||||
|
return rkSource.getRiskGrade() > 3;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
if (collect.size() >= 3){
|
||||||
|
rkScoreType.setScore(40);
|
||||||
|
}else if (collect.size()>0 && collect.size() < 3){
|
||||||
|
rkScoreType.setScore(collect.size()*10);
|
||||||
|
}else{
|
||||||
|
rkScoreType.setScore(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//存在较大安全风险源的,每个扣5分;4个及以上的,扣20分。
|
||||||
|
if (rkScoreType.getSource() == 3){
|
||||||
|
List<RkSources> collect = rkSources.stream().filter(rkSource -> {
|
||||||
|
return rkSource.getRiskGrade() == 3;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
if (collect.size()>=4){
|
||||||
|
rkScoreType.setScore(20);
|
||||||
|
}else if (collect.size()>0 && collect.size() < 4){
|
||||||
|
rkScoreType.setScore(collect.size()*5);
|
||||||
|
}else{
|
||||||
|
rkScoreType.setScore(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//1.生产经营单位周边存在重要场所(如学校、医院、养老院等)、重要目标(如党政机关、军事管理区、文物保护单位,主要道路桥梁等),每处扣5分;
|
||||||
|
if (rkScoreType.getSource() == 4){
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(0);
|
||||||
|
if (finalRkSensitiveTypeList.size()>0){
|
||||||
|
finalRkSensitiveTypeList.forEach(rkSensitiveType -> {
|
||||||
|
if (rkSensitiveType.getTypeId().equals(HIGH_SENSITIVE_PLACES) || rkSensitiveType.getTypeId().equals(KEY_OBJECTIVES)){
|
||||||
|
rkSensitiveType.getChildren().forEach(child ->{
|
||||||
|
if (child.getEntNum() != null){
|
||||||
|
score.set(child.getEntNum() + score.get());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rkScoreType.setScore((score.get() *5)>20?20:(score.get() *5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//2.生产经营单位周边存在人员密集场所(如居民小区、大型城市综合体、商场市场、宾馆饭店、娱乐场所、体育场馆、交通枢纽等)的,每处扣3分。
|
||||||
|
if (rkScoreType.getSource() == 5){
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(0);
|
||||||
|
if (finalRkSensitiveTypeList.size()>0){
|
||||||
|
finalRkSensitiveTypeList.forEach(rkSensitiveType -> {
|
||||||
|
if (rkSensitiveType.getTypeId().equals(DENSELY_POPULATED_PLACES) ){
|
||||||
|
if ( rkSensitiveType.getChildren() != null && rkSensitiveType.getChildren().size()>0 ){
|
||||||
|
rkSensitiveType.getChildren().forEach(child ->{
|
||||||
|
if (child.getEntNum() != null){
|
||||||
|
score.set(child.getEntNum() + score.get());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rkScoreType.setScore((score.get() *3)>20?20:(score.get() *3));
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
JSONArray jsonArray = this.handleScoreTypeTree(rkScoreTypes);
|
||||||
|
List<RkScoreType> rkScoreTypeList = JSONArray.parseArray(JSONArray.toJSONString(jsonArray), RkScoreType.class);
|
||||||
|
//计算最终得分
|
||||||
|
rkScoreTypeList.forEach(types ->{
|
||||||
|
List<RkScoreType> children = types.getChildren();
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(types.getFullMarks());
|
||||||
|
children.forEach(chil ->{
|
||||||
|
chil.getChildren().forEach(type ->{
|
||||||
|
if(type.getScoreType() == 2){
|
||||||
|
if (type.getScore() != null && score.get() != null){
|
||||||
|
score.set(score.get() - type.getScore());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (type.getScore() != null && score.get() != null){
|
||||||
|
score.set(score.get() + type.getScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
types.setScore(score.get()<0?0:score.get());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return rkScoreTypeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分类型树结构
|
||||||
|
* @param scoreTypes
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private JSONArray handleScoreTypeTree(List<RkScoreType> scoreTypes)throws Exception{
|
||||||
|
List<Map<String,Object>> data = new ArrayList<>();
|
||||||
|
for(RkScoreType resource : scoreTypes){
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(resource.getParentId())){
|
||||||
|
resource.setParentId("");
|
||||||
|
}
|
||||||
|
Map<String,Object> entUserMap = new HashMap<String,Object>();
|
||||||
|
entUserMap.put("typeId",resource.getTypeId());
|
||||||
|
entUserMap.put("parentId",resource.getParentId());
|
||||||
|
entUserMap.put("name",resource.getName());
|
||||||
|
entUserMap.put("sortId",resource.getSortId().toString());
|
||||||
|
entUserMap.put("score",resource.getScore());
|
||||||
|
entUserMap.put("source",resource.getSource().toString());
|
||||||
|
if (resource.getFullMarks() != null){
|
||||||
|
entUserMap.put("fullMarks",resource.getFullMarks().toString());
|
||||||
|
}
|
||||||
|
if (resource.getScoreType() != null){
|
||||||
|
entUserMap.put("scoreType",resource.getScoreType());
|
||||||
|
}
|
||||||
|
data.add(entUserMap);
|
||||||
|
}
|
||||||
|
JSONArray result = TypeConversion.listToTree(JSONArray.parseArray(JSON.toJSONString(data)),"typeId","parentId","children");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改当前企业风险得分", notes = "修改当前企业风险得分")
|
||||||
|
@PostMapping("/UpdateRkEnterpriseScore")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult UpdateRkEnterpriseScore(@Valid @RequestBody RksensttiveDto rkEntSensitiveDto)throws Exception{
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
String chinaName = getChinaName();
|
||||||
|
Date date = new Date();
|
||||||
|
String enterpriseId = rkEntSensitiveDto.getEnterpriseId();
|
||||||
|
List<RkEnterpriseScore> rkEnterpriseScores = JSONArray.parseArray(rkEntSensitiveDto.getRkSensitive(), RkEnterpriseScore.class);
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(80);
|
||||||
|
AtomicReference<Integer> securityScore = new AtomicReference<>(20);
|
||||||
|
if (rkEnterpriseScores.size()>0){
|
||||||
|
//先删除所有
|
||||||
|
rkEnterpriseScoreMapper.deleteByEnterpriseId(enterpriseId);
|
||||||
|
//添加
|
||||||
|
rkEnterpriseScores.forEach(rkEnterpriseScore -> {
|
||||||
|
rkEnterpriseScore.setScoreId(RandomNumber.getUUid());
|
||||||
|
if (rkEnterpriseScore.getScore() != null){
|
||||||
|
if(rkEnterpriseScore.getParentId().equals(SAFETY_ACCIDENTS) || rkEnterpriseScore.getParentId().equals(STANDARDIZATION_OF_WORK_SAFETY) ){
|
||||||
|
if (rkEnterpriseScore.getScoreType() == 1){
|
||||||
|
securityScore.set(rkEnterpriseScore.getScore()+securityScore.get());
|
||||||
|
}else{
|
||||||
|
securityScore.set(securityScore.get() - rkEnterpriseScore.getScore());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (rkEnterpriseScore.getScoreType() == 1){
|
||||||
|
score.set(rkEnterpriseScore.getScore()+score.get());
|
||||||
|
}else{
|
||||||
|
score.set(score.get() - rkEnterpriseScore.getScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
rkEnterpriseScore.setEnterpriseId(enterpriseId);
|
||||||
|
rkEnterpriseScore.setCreated(chinaName);
|
||||||
|
rkEnterpriseScore.setModified(chinaName);
|
||||||
|
rkEnterpriseScore.setCreateTime(date);
|
||||||
|
rkEnterpriseScore.setModifyTime(date);
|
||||||
|
rkEnterpriseScoreMapper.insert(rkEnterpriseScore);
|
||||||
|
});
|
||||||
|
if (securityScore.get()>20){
|
||||||
|
securityScore.set(20);
|
||||||
|
}else if (securityScore.get() <0){
|
||||||
|
securityScore.set(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
score.set(score.get()+securityScore.get());
|
||||||
|
|
||||||
|
//保存诊断列表
|
||||||
|
this.updateOrAddDiagnosis(score.get(),enterpriseId,rkEntSensitiveDto.getCategory());
|
||||||
|
}
|
||||||
|
return singleResult;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改诊断列表
|
||||||
|
* @param score
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void updateOrAddDiagnosis(Integer score,String enterpriseId,String category)throws Exception{
|
||||||
|
String chinaName = getChinaName();
|
||||||
|
Date date = new Date();
|
||||||
|
rkCompanyDiagnosisMapper.deletByEnterpriseId(enterpriseId);
|
||||||
|
RkCompanyDiagnosis rkCompanyDiagnosis = new RkCompanyDiagnosis();
|
||||||
|
rkCompanyDiagnosis.setDiagnosisId(RandomNumber.getUUid());
|
||||||
|
rkCompanyDiagnosis.setModified(chinaName);
|
||||||
|
rkCompanyDiagnosis.setCreated(chinaName);
|
||||||
|
rkCompanyDiagnosis.setModifyTime(date);
|
||||||
|
rkCompanyDiagnosis.setCreateTime(date);
|
||||||
|
rkCompanyDiagnosis.setEnterpriseId(enterpriseId);
|
||||||
|
rkCompanyDiagnosis.setAssessTime(date);
|
||||||
|
rkCompanyDiagnosis.setScore(score);
|
||||||
|
rkCompanyDiagnosis.setCategory(category);
|
||||||
|
rkCompanyDiagnosis.setStatus(FlowQueryStatus.PENDING);
|
||||||
|
if (score < 60){
|
||||||
|
rkCompanyDiagnosis.setGrade(1);
|
||||||
|
}else if (score >59 && score < 75){
|
||||||
|
rkCompanyDiagnosis.setGrade(2);
|
||||||
|
}else if (score > 74 && score < 90){
|
||||||
|
rkCompanyDiagnosis.setGrade(3);
|
||||||
|
}else{
|
||||||
|
rkCompanyDiagnosis.setGrade(4);
|
||||||
|
}
|
||||||
|
rkCompanyDiagnosisMapper.insert(rkCompanyDiagnosis);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业重大危险源新增修改
|
* 企业重大危险源新增修改
|
||||||
|
|
|
||||||
|
|
@ -524,6 +524,26 @@ public class BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected ListchangeMapper listchangeMapper;
|
protected ListchangeMapper listchangeMapper;
|
||||||
|
|
||||||
|
//企业周边情况
|
||||||
|
@Autowired
|
||||||
|
protected RkSensitiveTypeMapper rkSensitiveTypeMapper;
|
||||||
|
|
||||||
|
//企业周边数据信息
|
||||||
|
@Autowired
|
||||||
|
protected RkEntSensitiveMapper rkEntSensitiveMapper;
|
||||||
|
|
||||||
|
//企业风险分级条款
|
||||||
|
@Autowired
|
||||||
|
protected RkScoreTypeMapper rkScoreTypeMapper;
|
||||||
|
|
||||||
|
//企业风险评估分数
|
||||||
|
@Autowired
|
||||||
|
protected RkEnterpriseScoreMapper rkEnterpriseScoreMapper;
|
||||||
|
|
||||||
|
//风险评估分数
|
||||||
|
@Autowired
|
||||||
|
protected RkCompanyDiagnosisMapper rkCompanyDiagnosisMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位不需要的字符串
|
* 岗位不需要的字符串
|
||||||
|
|
@ -633,6 +653,19 @@ public class BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*高敏感场所*/
|
||||||
|
protected String HIGH_SENSITIVE_PLACES = "502b1ff4-bd01-11eb-9d3c-00163e0c1c62";
|
||||||
|
/*重要目标*/
|
||||||
|
protected String KEY_OBJECTIVES = "502b2472-bd01-11eb-9d3c-00163e0c1c62";
|
||||||
|
/*人员密集区域*/
|
||||||
|
protected String DENSELY_POPULATED_PLACES = "c6d817c1-5eec-4c88-916c-4c2f20dec062";
|
||||||
|
|
||||||
|
|
||||||
|
//安全事故情况
|
||||||
|
protected String SAFETY_ACCIDENTS = "76752d5b-c787-413a-b228-63b5507eaa03";
|
||||||
|
//安全生产标准化达标情况
|
||||||
|
protected String STANDARDIZATION_OF_WORK_SAFETY = "2d32e694-5af5-4786-b540-c56a34196ff9";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新都文件地址处理
|
* 新都文件地址处理
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,19 @@
|
||||||
package com.rzyc.controller.ent;
|
package com.rzyc.controller.ent;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.common.utils.RandomNumber;
|
||||||
import com.common.utils.StringUtils;
|
import com.common.utils.StringUtils;
|
||||||
import com.common.utils.TypeConversion;
|
import com.common.utils.TypeConversion;
|
||||||
import com.common.utils.model.MultiResult;
|
import com.common.utils.model.*;
|
||||||
import com.common.utils.model.Pager;
|
|
||||||
import com.common.utils.model.SingleResult;
|
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.rzyc.bean.risk.SourcesAddDto;
|
import com.rzyc.bean.risk.*;
|
||||||
import com.rzyc.bean.risk.SourcesDelDto;
|
|
||||||
import com.rzyc.bean.risk.SourcesPageDto;
|
|
||||||
import com.rzyc.bean.risk.SourcesSignDto;
|
|
||||||
import com.rzyc.controller.BaseController;
|
import com.rzyc.controller.BaseController;
|
||||||
import com.rzyc.enums.DelState;
|
import com.rzyc.enums.DelState;
|
||||||
|
import com.rzyc.enums.FlowQueryStatus;
|
||||||
import com.rzyc.enums.ResourceRiskLevel;
|
import com.rzyc.enums.ResourceRiskLevel;
|
||||||
import com.rzyc.model.RkRiskType;
|
import com.rzyc.model.*;
|
||||||
import com.rzyc.model.RkSources;
|
|
||||||
import com.rzyc.model.ent.SysEnterprise;
|
import com.rzyc.model.ent.SysEnterprise;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
|
@ -26,10 +24,9 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.List;
|
import java.util.stream.Collectors;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author dong
|
* @author dong
|
||||||
|
|
@ -44,6 +41,372 @@ import java.util.Map;
|
||||||
public class RiskController extends BaseController {
|
public class RiskController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单位敏感信息类型
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取单位敏感信息类型", notes = "获取单位敏感信息类型")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "企业名称", required = false, dataType = "string"),
|
||||||
|
|
||||||
|
})
|
||||||
|
@GetMapping("/getRkSensitiveType/{enterpriseId}")
|
||||||
|
@ResponseBody
|
||||||
|
public MultiResult<RkSensitiveType> getRkSensitiveType(@PathVariable String enterpriseId)throws Exception{
|
||||||
|
MultiResult<RkSensitiveType> singleResult = new MultiResult<>();
|
||||||
|
List<RkSensitiveType> rkSensitiveTypes = rkSensitiveTypeMapper.selectExample(enterpriseId);
|
||||||
|
|
||||||
|
if (rkSensitiveTypes.size()>0){
|
||||||
|
singleResult.setMessage(Message.SUCCESS);
|
||||||
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||||||
|
JSONArray rkSensitiveTypeJson = handleResouceTree(rkSensitiveTypes);
|
||||||
|
List<RkSensitiveType> rkSensitiveTypeList = JSONArray.parseArray(JSONArray.toJSONString(rkSensitiveTypeJson), RkSensitiveType.class);
|
||||||
|
singleResult.setData(rkSensitiveTypeList);
|
||||||
|
}else{
|
||||||
|
singleResult.setMessage(Message.ERROR);
|
||||||
|
singleResult.setCode(Code.ERROR.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能项树形结构
|
||||||
|
* @param resources
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private JSONArray handleResouceTree(List<RkSensitiveType> resources)throws Exception{
|
||||||
|
List<Map<String,Object>> data = new ArrayList<>();
|
||||||
|
for(RkSensitiveType resource : resources){
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(resource.getParentId())){
|
||||||
|
resource.setParentId("");
|
||||||
|
}
|
||||||
|
Map<String,Object> entUserMap = new HashMap<String,Object>();
|
||||||
|
entUserMap.put("typeId",resource.getTypeId());
|
||||||
|
entUserMap.put("parentId",resource.getParentId());
|
||||||
|
entUserMap.put("name",resource.getName());
|
||||||
|
entUserMap.put("sortId",resource.getSortId());
|
||||||
|
entUserMap.put("entNum",resource.getEntNum());
|
||||||
|
entUserMap.put("sensitiveId",resource.getSensitiveId());
|
||||||
|
data.add(entUserMap);
|
||||||
|
}
|
||||||
|
JSONArray result = TypeConversion.listToTree(JSONArray.parseArray(JSON.toJSONString(data)),"typeId","parentId","children");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改单位周围敏感目标数量
|
||||||
|
* @param rkEntSensitiveDto
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "修改单位周围敏感目标数量", notes = "修改单位周围敏感目标数量")
|
||||||
|
@PostMapping("/updateRkSensitive")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<String> updateRkSensitive(@Valid @RequestBody RksensttiveDto rkEntSensitiveDto)throws Exception{
|
||||||
|
SingleResult<String> singleResult = new SingleResult<>();
|
||||||
|
//操作人
|
||||||
|
String chinaName = getChinaName();
|
||||||
|
List<RkEntSensitive> rkEntSensitiveList = JSONArray.parseArray(rkEntSensitiveDto.getRkSensitive(), RkEntSensitive.class);
|
||||||
|
Date date = new Date();
|
||||||
|
if (rkEntSensitiveList.size()>0){
|
||||||
|
//先删除已有的信息
|
||||||
|
rkEntSensitiveMapper.deleteByRkEntSensitive(rkEntSensitiveDto.getEnterpriseId());
|
||||||
|
rkEntSensitiveList.stream().forEach(rkEntSensitive -> {
|
||||||
|
rkEntSensitive.setEnterpriseId(rkEntSensitiveDto.getEnterpriseId());
|
||||||
|
rkEntSensitive.setModified(chinaName);
|
||||||
|
rkEntSensitive.setModifyTime(date);
|
||||||
|
rkEntSensitive.setSensitiveId(RandomNumber.getUUid());
|
||||||
|
rkEntSensitive.setCreated(chinaName);
|
||||||
|
rkEntSensitive.setCreateTime(date);
|
||||||
|
rkEntSensitiveMapper.insert(rkEntSensitive);
|
||||||
|
});
|
||||||
|
|
||||||
|
singleResult.setMessage(Message.SUCCESS);
|
||||||
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||||||
|
}else{
|
||||||
|
singleResult.setCode(Code.NO_DATA.getCode());
|
||||||
|
singleResult.setMessage(Message.NO_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
return singleResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前企业风险评分类型与得分
|
||||||
|
* @param enterpriseId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取当前企业风险评分类型与得分", notes = "获取当前企业风险评分类型与得分")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "企业Id", required = false, dataType = "string"),
|
||||||
|
|
||||||
|
})
|
||||||
|
@GetMapping("/getScoreType/{enterpriseId}")
|
||||||
|
@ResponseBody
|
||||||
|
public MultiResult<RkScoreType> getScoreType(@PathVariable String enterpriseId)throws Exception{
|
||||||
|
MultiResult<RkScoreType> multiResult = new MultiResult<>();
|
||||||
|
List<RkScoreType> rkScoreTypes = rkScoreTypeMapper.selectByScoreType(enterpriseId);
|
||||||
|
List<RkSensitiveType> rkSensitiveTypes = rkSensitiveTypeMapper.selectExample(enterpriseId);
|
||||||
|
RkSourcesDto rkSourcesDto = new RkSourcesDto();
|
||||||
|
rkSourcesDto.setEnterpriseId(enterpriseId);
|
||||||
|
List<RkSources> rkSources = rkSourcesMapper.selectPageRkSources(rkSourcesDto);
|
||||||
|
if (rkScoreTypes.size() == 0){
|
||||||
|
multiResult.setCode(Code.NO_DATA.getCode());
|
||||||
|
multiResult.setMessage(Message.NO_DATA);
|
||||||
|
return multiResult;
|
||||||
|
}
|
||||||
|
List<RkScoreType> rkScoreTypesTree = this.setScoreType(rkScoreTypes, rkSensitiveTypes, rkSources);
|
||||||
|
rkScoreTypes.stream().sorted(Comparator.comparing(RkScoreType::getSortId));
|
||||||
|
multiResult.setData(rkScoreTypesTree);
|
||||||
|
return multiResult;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改评分类型需要查询的分数并返回树形
|
||||||
|
* @param rkScoreTypes
|
||||||
|
* @param rkSensitiveTypes
|
||||||
|
* @param rkSources
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private List<RkScoreType> setScoreType(List<RkScoreType> rkScoreTypes,List<RkSensitiveType> rkSensitiveTypes, List<RkSources> rkSources)throws Exception{
|
||||||
|
List<RkSensitiveType> rkSensitiveTypeList = null;
|
||||||
|
|
||||||
|
if (rkSensitiveTypes.size() >0){
|
||||||
|
JSONArray rkSensitiveTypeJson = this.handleResouceTree(rkSensitiveTypes);
|
||||||
|
rkSensitiveTypeList = JSONArray.parseArray(JSONArray.toJSONString(rkSensitiveTypeJson), RkSensitiveType.class);
|
||||||
|
}
|
||||||
|
if (rkScoreTypes.size()>0){
|
||||||
|
List<RkSensitiveType> finalRkSensitiveTypeList = rkSensitiveTypeList;
|
||||||
|
rkScoreTypes.stream().forEach(rkScoreType -> {
|
||||||
|
//1.存在重大安全风险源的,每个扣10分;3个及以上的,扣40分;
|
||||||
|
if (rkScoreType.getSource()==2){
|
||||||
|
List<RkSources> collect = rkSources.stream().filter(rkSource -> {
|
||||||
|
return rkSource.getRiskGrade() > 3;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
if (collect.size() >= 3){
|
||||||
|
rkScoreType.setScore(40);
|
||||||
|
}else if (collect.size()>0 && collect.size() < 3){
|
||||||
|
rkScoreType.setScore(collect.size()*10);
|
||||||
|
}else{
|
||||||
|
rkScoreType.setScore(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//存在较大安全风险源的,每个扣5分;4个及以上的,扣20分。
|
||||||
|
if (rkScoreType.getSource() == 3){
|
||||||
|
List<RkSources> collect = rkSources.stream().filter(rkSource -> {
|
||||||
|
return rkSource.getRiskGrade() == 3;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
if (collect.size()>=4){
|
||||||
|
rkScoreType.setScore(20);
|
||||||
|
}else if (collect.size()>0 && collect.size() < 4){
|
||||||
|
rkScoreType.setScore(collect.size()*5);
|
||||||
|
}else{
|
||||||
|
rkScoreType.setScore(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//1.生产经营单位周边存在重要场所(如学校、医院、养老院等)、重要目标(如党政机关、军事管理区、文物保护单位,主要道路桥梁等),每处扣5分;
|
||||||
|
if (rkScoreType.getSource() == 4){
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(0);
|
||||||
|
if (finalRkSensitiveTypeList.size()>0){
|
||||||
|
finalRkSensitiveTypeList.forEach(rkSensitiveType -> {
|
||||||
|
if (rkSensitiveType.getTypeId().equals(HIGH_SENSITIVE_PLACES) || rkSensitiveType.getTypeId().equals(KEY_OBJECTIVES)){
|
||||||
|
rkSensitiveType.getChildren().forEach(child ->{
|
||||||
|
if (child.getEntNum() != null){
|
||||||
|
score.set(child.getEntNum() + score.get());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
rkScoreType.setScore((score.get() *5)>20?20:(score.get() *5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//2.生产经营单位周边存在人员密集场所(如居民小区、大型城市综合体、商场市场、宾馆饭店、娱乐场所、体育场馆、交通枢纽等)的,每处扣3分。
|
||||||
|
if (rkScoreType.getSource() == 5){
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(0);
|
||||||
|
if (finalRkSensitiveTypeList.size()>0){
|
||||||
|
finalRkSensitiveTypeList.forEach(rkSensitiveType -> {
|
||||||
|
if (rkSensitiveType.getTypeId().equals(DENSELY_POPULATED_PLACES) ){
|
||||||
|
if ( rkSensitiveType.getChildren() != null && rkSensitiveType.getChildren().size()>0 ){
|
||||||
|
rkSensitiveType.getChildren().forEach(child ->{
|
||||||
|
if (child.getEntNum() != null){
|
||||||
|
score.set(child.getEntNum() + score.get());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
rkScoreType.setScore((score.get() *3)>20?20:(score.get() *3));
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
JSONArray jsonArray = this.handleScoreTypeTree(rkScoreTypes);
|
||||||
|
List<RkScoreType> rkScoreTypeList = JSONArray.parseArray(JSONArray.toJSONString(jsonArray), RkScoreType.class);
|
||||||
|
//计算最终得分
|
||||||
|
rkScoreTypeList.forEach(types ->{
|
||||||
|
List<RkScoreType> children = types.getChildren();
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(types.getFullMarks());
|
||||||
|
children.forEach(chil ->{
|
||||||
|
chil.getChildren().forEach(type ->{
|
||||||
|
if(type.getScoreType() == 2){
|
||||||
|
if (type.getScore() != null && score.get() != null){
|
||||||
|
score.set(score.get() - type.getScore());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (type.getScore() != null && score.get() != null){
|
||||||
|
score.set(score.get() + type.getScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
types.setScore(score.get()<0?0:score.get());
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return rkScoreTypeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分类型树结构
|
||||||
|
* @param scoreTypes
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private JSONArray handleScoreTypeTree(List<RkScoreType> scoreTypes)throws Exception{
|
||||||
|
List<Map<String,Object>> data = new ArrayList<>();
|
||||||
|
for(RkScoreType resource : scoreTypes){
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(resource.getParentId())){
|
||||||
|
resource.setParentId("");
|
||||||
|
}
|
||||||
|
Map<String,Object> entUserMap = new HashMap<String,Object>();
|
||||||
|
entUserMap.put("typeId",resource.getTypeId());
|
||||||
|
entUserMap.put("parentId",resource.getParentId());
|
||||||
|
entUserMap.put("name",resource.getName());
|
||||||
|
entUserMap.put("sortId",resource.getSortId().toString());
|
||||||
|
entUserMap.put("score",resource.getScore());
|
||||||
|
entUserMap.put("source",resource.getSource().toString());
|
||||||
|
if (resource.getFullMarks() != null){
|
||||||
|
entUserMap.put("fullMarks",resource.getFullMarks().toString());
|
||||||
|
}
|
||||||
|
if (resource.getScoreType() != null){
|
||||||
|
entUserMap.put("scoreType",resource.getScoreType());
|
||||||
|
}
|
||||||
|
data.add(entUserMap);
|
||||||
|
}
|
||||||
|
JSONArray result = TypeConversion.listToTree(JSONArray.parseArray(JSON.toJSONString(data)),"typeId","parentId","children");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改当前企业风险得分", notes = "修改当前企业风险得分")
|
||||||
|
@PostMapping("/UpdateRkEnterpriseScore")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult UpdateRkEnterpriseScore(@Valid @RequestBody RksensttiveDto rkEntSensitiveDto)throws Exception{
|
||||||
|
SingleResult singleResult = new SingleResult();
|
||||||
|
String chinaName = getChinaName();
|
||||||
|
Date date = new Date();
|
||||||
|
String enterpriseId = rkEntSensitiveDto.getEnterpriseId();
|
||||||
|
List<RkEnterpriseScore> rkEnterpriseScores = JSONArray.parseArray(rkEntSensitiveDto.getRkSensitive(), RkEnterpriseScore.class);
|
||||||
|
AtomicReference<Integer> score = new AtomicReference<>(80);
|
||||||
|
AtomicReference<Integer> securityScore = new AtomicReference<>(20);
|
||||||
|
if (rkEnterpriseScores.size()>0){
|
||||||
|
//先删除所有
|
||||||
|
rkEnterpriseScoreMapper.deleteByEnterpriseId(enterpriseId);
|
||||||
|
//添加
|
||||||
|
rkEnterpriseScores.forEach(rkEnterpriseScore -> {
|
||||||
|
rkEnterpriseScore.setScoreId(RandomNumber.getUUid());
|
||||||
|
if (rkEnterpriseScore.getScore() != null){
|
||||||
|
if(rkEnterpriseScore.getParentId().equals(SAFETY_ACCIDENTS) || rkEnterpriseScore.getParentId().equals(STANDARDIZATION_OF_WORK_SAFETY) ){
|
||||||
|
if (rkEnterpriseScore.getScoreType() == 1){
|
||||||
|
securityScore.set(rkEnterpriseScore.getScore()+securityScore.get());
|
||||||
|
}else{
|
||||||
|
securityScore.set(securityScore.get() - rkEnterpriseScore.getScore());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (rkEnterpriseScore.getScoreType() == 1){
|
||||||
|
score.set(rkEnterpriseScore.getScore()+score.get());
|
||||||
|
}else{
|
||||||
|
score.set(score.get() - rkEnterpriseScore.getScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
rkEnterpriseScore.setEnterpriseId(enterpriseId);
|
||||||
|
rkEnterpriseScore.setCreated(chinaName);
|
||||||
|
rkEnterpriseScore.setModified(chinaName);
|
||||||
|
rkEnterpriseScore.setCreateTime(date);
|
||||||
|
rkEnterpriseScore.setModifyTime(date);
|
||||||
|
rkEnterpriseScoreMapper.insert(rkEnterpriseScore);
|
||||||
|
});
|
||||||
|
if (securityScore.get()>20){
|
||||||
|
securityScore.set(20);
|
||||||
|
}else if (securityScore.get() <0){
|
||||||
|
securityScore.set(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
score.set(score.get()+securityScore.get());
|
||||||
|
|
||||||
|
//保存诊断列表
|
||||||
|
this.updateOrAddDiagnosis(score.get(),enterpriseId,rkEntSensitiveDto.getCategory());
|
||||||
|
}
|
||||||
|
return singleResult;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改诊断列表
|
||||||
|
* @param score
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void updateOrAddDiagnosis(Integer score,String enterpriseId,String category)throws Exception{
|
||||||
|
String chinaName = getChinaName();
|
||||||
|
Date date = new Date();
|
||||||
|
rkCompanyDiagnosisMapper.deletByEnterpriseId(enterpriseId);
|
||||||
|
RkCompanyDiagnosis rkCompanyDiagnosis = new RkCompanyDiagnosis();
|
||||||
|
rkCompanyDiagnosis.setDiagnosisId(RandomNumber.getUUid());
|
||||||
|
rkCompanyDiagnosis.setModified(chinaName);
|
||||||
|
rkCompanyDiagnosis.setCreated(chinaName);
|
||||||
|
rkCompanyDiagnosis.setModifyTime(date);
|
||||||
|
rkCompanyDiagnosis.setCreateTime(date);
|
||||||
|
rkCompanyDiagnosis.setEnterpriseId(enterpriseId);
|
||||||
|
rkCompanyDiagnosis.setAssessTime(date);
|
||||||
|
rkCompanyDiagnosis.setScore(score);
|
||||||
|
rkCompanyDiagnosis.setCategory(category);
|
||||||
|
rkCompanyDiagnosis.setStatus(FlowQueryStatus.PENDING);
|
||||||
|
if (score < 60){
|
||||||
|
rkCompanyDiagnosis.setGrade(1);
|
||||||
|
}else if (score >59 && score < 75){
|
||||||
|
rkCompanyDiagnosis.setGrade(2);
|
||||||
|
}else if (score > 74 && score < 90){
|
||||||
|
rkCompanyDiagnosis.setGrade(3);
|
||||||
|
}else{
|
||||||
|
rkCompanyDiagnosis.setGrade(4);
|
||||||
|
}
|
||||||
|
rkCompanyDiagnosisMapper.insert(rkCompanyDiagnosis);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业重大危险源新增修改
|
* 企业重大危险源新增修改
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user