新增评分状态

This commit is contained in:
mythxb 2024-04-08 13:52:13 +08:00
parent cf511da4f5
commit 47677c0416
6 changed files with 83 additions and 2 deletions

View File

@ -78,9 +78,20 @@ public class StandardInfo {
@ApiModelProperty("意见建议") @ApiModelProperty("意见建议")
private String opinion; private String opinion;
@ApiModelProperty("评分状态 1、已评分 2、未评分")
private Integer socreState;
@ApiModelProperty("附件") @ApiModelProperty("附件")
private List<ExScoreFile> scoreFiles; private List<ExScoreFile> scoreFiles;
public Integer getSocreState() {
return socreState;
}
public void setSocreState(Integer socreState) {
this.socreState = socreState;
}
public List<ExScoreFile> getScoreFiles() { public List<ExScoreFile> getScoreFiles() {
return scoreFiles; return scoreFiles;
} }

View File

@ -0,0 +1,29 @@
package com.rzyc.enums;
/**
* 评分状态 1已评分 2未评分
* @version v1.0
* @author dong
* @date 2024/4/8 9:07
*/
public enum ScoreState {
//已评分
SCOREED(1),
//未评分
NOT_SCORE(2);
private Integer state;
ScoreState(Integer state) {
this.state = state;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
}

View File

@ -50,6 +50,10 @@ public class ExScore implements Serializable {
@TableField("user_id") @TableField("user_id")
private String userId; private String userId;
@ApiModelProperty(value = "评分状态 1、已评分 2、未评分")
@TableField("socre_state")
private Integer socreState;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@TableField("create_time") @TableField("create_time")
private Date createTime; private Date createTime;
@ -66,6 +70,14 @@ public class ExScore implements Serializable {
@TableField("modify_by") @TableField("modify_by")
private String modifyBy; private String modifyBy;
public Integer getSocreState() {
return socreState;
}
public void setSocreState(Integer socreState) {
this.socreState = socreState;
}
public String getSocreId() { public String getSocreId() {
return socreId; return socreId;
} }

View File

@ -11,6 +11,7 @@
<result column="socre_num" property="socreNum" /> <result column="socre_num" property="socreNum" />
<result column="opinion" property="opinion" /> <result column="opinion" property="opinion" />
<result column="user_id" property="userId" /> <result column="user_id" property="userId" />
<result column="socre_state" property="socreState" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="create_by" property="createBy" /> <result column="create_by" property="createBy" />
<result column="modify_time" property="modifyTime" /> <result column="modify_time" property="modifyTime" />
@ -19,7 +20,8 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
socre_id, examine_id, standard_id, perform_id, socre_num, opinion, user_id, create_time, create_by, modify_time, modify_by socre_id, examine_id, standard_id, perform_id, socre_num,
opinion, user_id, socre_state,create_time, create_by, modify_time, modify_by
</sql> </sql>
<!--部门评分信息--> <!--部门评分信息-->

View File

@ -90,6 +90,7 @@
<result column="socre_id" property="socreId" /> <result column="socre_id" property="socreId" />
<result column="socre_num" property="socreNum" /> <result column="socre_num" property="socreNum" />
<result column="opinion" property="opinion" /> <result column="opinion" property="opinion" />
<result column="socre_state" property="socreState" />
<collection property="scoreFiles" ofType="com.rzyc.model.ex.ExScoreFile" column="socre_id"> <collection property="scoreFiles" ofType="com.rzyc.model.ex.ExScoreFile" column="socre_id">
<result column="file_id" property="fileId" /> <result column="file_id" property="fileId" />
<result column="file_name" property="fileName" /> <result column="file_name" property="fileName" />
@ -101,7 +102,7 @@
<!--标准评分信息--> <!--标准评分信息-->
<select id="standardScoreList" resultMap="UnitStandardResultMap"> <select id="standardScoreList" resultMap="UnitStandardResultMap">
SELECT SELECT
es.*,sc.`socre_id`,sc.`socre_num`,sc.`opinion`, es.*,sc.`socre_id`,sc.`socre_num`,sc.`opinion`,sc.socre_state,
sf.`file_id`,sf.`file_name`,sf.`file_path`,sf.`remarks` sf.`file_id`,sf.`file_name`,sf.`file_path`,sf.`remarks`
FROM ex_standard es FROM ex_standard es
LEFT JOIN `ex_score` sc ON es.`standard_id` = sc.`standard_id` LEFT JOIN `ex_score` sc ON es.`standard_id` = sc.`standard_id`

View File

@ -11,6 +11,7 @@ import com.rzyc.bean.ex.vo.StandardInfo;
import com.rzyc.enums.DelState; import com.rzyc.enums.DelState;
import com.rzyc.enums.ExItemType; import com.rzyc.enums.ExItemType;
import com.rzyc.enums.ExamineState; import com.rzyc.enums.ExamineState;
import com.rzyc.enums.ScoreState;
import com.rzyc.model.ex.*; import com.rzyc.model.ex.*;
import com.rzyc.model.user.ListPerform; import com.rzyc.model.user.ListPerform;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -534,6 +535,12 @@ public class ExamineController extends BaseController{
private void handleStandardInfo(List<StandardInfo> standards,Map<String,String> examineItemMap)throws Exception{ private void handleStandardInfo(List<StandardInfo> standards,Map<String,String> examineItemMap)throws Exception{
if(null != standards && standards.size() > 0){ if(null != standards && standards.size() > 0){
for (StandardInfo standard : standards){ for (StandardInfo standard : standards){
if(null == standard.getSocreState()){
standard.setSocreState(ScoreState.NOT_SCORE.getState());
}
String[] strs = standard.getItemPath().split(","); String[] strs = standard.getItemPath().split(",");
if(null != strs && 3 == strs.length ){ if(null != strs && 3 == strs.length ){
//考核指标 //考核指标
@ -570,6 +577,15 @@ public class ExamineController extends BaseController{
Integer examineState = listPerform.getExamineState(); Integer examineState = listPerform.getExamineState();
//评分标准 //评分标准
List<StandardInfo> standards = exStandardMapper.standardScoreList(ExItemType.BONUS_POINT.getType(),examineState,unitStandardDto.getExamineId(),unitId); List<StandardInfo> standards = exStandardMapper.standardScoreList(ExItemType.BONUS_POINT.getType(),examineState,unitStandardDto.getExamineId(),unitId);
if(null != standards && standards.size() > 0){
for (StandardInfo standardInfo : standards){
if(null == standardInfo.getSocreState()){
standardInfo.setSocreState(ScoreState.NOT_SCORE.getState());
}
}
}
result.setData(standards); result.setData(standards);
} }
@ -597,6 +613,13 @@ public class ExamineController extends BaseController{
Integer examineState = listPerform.getExamineState(); Integer examineState = listPerform.getExamineState();
//评分标准 //评分标准
List<StandardInfo> standards = exStandardMapper.standardScoreList(ExItemType.PERSONALITY.getType(),examineState,unitStandardDto.getExamineId(),unitId); List<StandardInfo> standards = exStandardMapper.standardScoreList(ExItemType.PERSONALITY.getType(),examineState,unitStandardDto.getExamineId(),unitId);
if(null != standards && standards.size() > 0){
for (StandardInfo standardInfo : standards){
if(null == standardInfo.getSocreState()){
standardInfo.setSocreState(ScoreState.NOT_SCORE.getState());
}
}
}
result.setData(standards); result.setData(standards);
} }
return result; return result;
@ -653,6 +676,7 @@ public class ExamineController extends BaseController{
exScore.setPerformId(unitId); exScore.setPerformId(unitId);
exScore.setStandardId(exStandard.getStandardId()); exScore.setStandardId(exStandard.getStandardId());
exScore.setSocreNum(SCORE_NUM); exScore.setSocreNum(SCORE_NUM);
exScore.setSocreState(ScoreState.NOT_SCORE.getState());
exScore.setCreateTime(new Date()); exScore.setCreateTime(new Date());
exScore.setModifyTime(new Date()); exScore.setModifyTime(new Date());
exScore.setCreateBy(userId); exScore.setCreateBy(userId);
@ -704,6 +728,7 @@ public class ExamineController extends BaseController{
exScore.setStandardId(standard.getStandardId()); exScore.setStandardId(standard.getStandardId());
exScore.setOpinion(itemRatingDto.getOpinion()); exScore.setOpinion(itemRatingDto.getOpinion());
exScore.setSocreNum(itemRatingDto.getScore()); exScore.setSocreNum(itemRatingDto.getScore());
exScore.setSocreState(ScoreState.SCOREED.getState());
exScore.setCreateTime(new Date()); exScore.setCreateTime(new Date());
exScore.setModifyTime(new Date()); exScore.setModifyTime(new Date());
exScore.setCreateBy(itemRatingDto.getUserId()); exScore.setCreateBy(itemRatingDto.getUserId());
@ -714,6 +739,7 @@ public class ExamineController extends BaseController{
score.setSocreId(exScore.getSocreId()); score.setSocreId(exScore.getSocreId());
score.setSocreNum(itemRatingDto.getScore()); score.setSocreNum(itemRatingDto.getScore());
score.setOpinion(itemRatingDto.getOpinion()); score.setOpinion(itemRatingDto.getOpinion());
score.setSocreState(ScoreState.SCOREED.getState());
score.setModifyTime(new Date()); score.setModifyTime(new Date());
score.setModifyBy(itemRatingDto.getUserId()); score.setModifyBy(itemRatingDto.getUserId());
exScoreMapper.updateById(score); exScoreMapper.updateById(score);