评分表增加isEdit

This commit is contained in:
wulin 2020-12-17 17:42:03 +08:00
parent a91eee765a
commit 3f11ba6c20
11 changed files with 69 additions and 12 deletions

View File

@ -467,6 +467,8 @@ public class ResultRecordController extends AbstractController {
//查询所有参与评分人以及所占比重
List<FlowChartDetailRecord> flowChartDetailRecords =
flowChartDetailRecordService.selectFlowChartDetailRecordsByFlowProcess(resultRecord.getEvaluationId(), ChartFlowType.SCORE.getCode());//获取参与评分的人
//List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdFlowProcess(resultRecord.getId(), ChartFlowType.SCORE.getCode());
List<StaffEntity> staffs = new ArrayList<>();
Boolean isAllScore = true;//false表示返回所有的评分true表示值返回评分了的人
Boolean isOrScore = false;//是否为或签
@ -476,7 +478,7 @@ public class ResultRecordController extends AbstractController {
if(record.getOptType().intValue() == -1){
//自己
StaffEntity staffEntity = new StaffEntity();
staffEntity.setId(resultRecord.getId());
staffEntity.setId(resultRecord.getStaffId());
staffEntity.setName(resultRecord.getStaffName());
staffs1.add(staffEntity);
}else if(record.getOptType().intValue() == 0){

View File

@ -39,4 +39,6 @@ public interface ResultScoreMapper extends BaseMapper<ResultScore> {
List<ResultScore> selectResultScoresByDetailIdAndOrderByStaffIds(@Param("id") Long id, @Param("list") List<ResultScoreDto> scoreDtos);
int deleteResultScoreByDetailId(Long id);
int setNoEditScoreByDetailId(Long detailId);
}

View File

@ -12,7 +12,7 @@ import java.util.Date;
* <p>
* </p>*业绩详情评分表
* @author quyixiao
* @since 2020-12-03
* @since 2020-12-17
*/
@Data
@ -49,6 +49,9 @@ public class ResultScore implements java.io.Serializable {
//根据权重计算除的实际得分
@ApiModelProperty(value = "根据权重计算除的实际得分", name = "score")
private BigDecimal score;
//0未评分1已评分
@ApiModelProperty(value = "0未评分1已评分", name = "isEdit")
private Integer isEdit;
/**
*
* @return
@ -199,6 +202,21 @@ public class ResultScore implements java.io.Serializable {
this.score = score;
}
/**
* 0未评分1已评分
* @return
*/
public Integer getIsEdit() {
return isEdit;
}
/**
* 0未评分1已评分
* @param isEdit
*/
public void setIsEdit(Integer isEdit) {
this.isEdit = isEdit;
}
@Override
public String toString() {
return "ResultScore{" +
@ -212,6 +230,7 @@ public class ResultScore implements java.io.Serializable {
",scoreComment=" + scoreComment +
",weight=" + weight +
",score=" + score +
",isEdit=" + isEdit +
"}";
}
}

View File

@ -50,6 +50,9 @@ public class ResultScoreDto {
//根据权重计算除的实际得分
@ApiModelProperty(value = "根据权重计算除的实际得分", name = "score")
private BigDecimal score;
@ApiModelProperty(value = "0未评分1已评分", name = "isEdit")
private Integer isEdit;
/**
*
* @return

View File

@ -38,4 +38,6 @@ public interface ResultScoreService extends IService<ResultScore> {
List<ResultScore> selectResultScoresByDetailIdAndOrderByStaffIds(Long id, List<ResultScoreDto> scoreDtos);
int deleteResultScoreByDetailId(Long id);
int setNoEditScoreByDetailId(Long detailId);
}

View File

@ -76,6 +76,11 @@ public class ResultScoreServiceImpl extends ServiceImpl<ResultScoreMapper, Resul
return resultScoreMapper.deleteResultScoreByDetailId(id);
}
@Override
public int setNoEditScoreByDetailId(Long detailId){
return resultScoreMapper.setNoEditScoreByDetailId(detailId);
}
}

View File

@ -128,7 +128,10 @@ public interface ResultRecordService extends IService<ResultRecord> {
R getResetData(RecordDetailDto recordDetailDto);
/**
* clearFlag == 0 全清 1 部分清 2只清楚评分标志
*
* */
R resetData(Long recordId, int clearFlag);
List<Long> selectStaffIdsByFlowProcess(List<Integer> flowProcess);

View File

@ -978,6 +978,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
}
}
}
resultRecordService.resetData(resultRecord.getId(),2);
return R.ok();
}
@ -1488,6 +1489,11 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
return R.ok().put("data",resetDataResps);
}
//删除指标信息
/**
* clearFlag == 0 全清 1 部分清包括评分标志 2只清楚评分标志
*
* */
@Override
public R resetData(Long recordId, int clearFlag) {
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordId);
@ -1505,12 +1511,18 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
//删除指标以外的所有数据评分评分说明结果
for(ResultDetail detail : resultDetails){
detail.setCheckResult(null);
detail.setAcquireScore(null);
detail.setSuperScore(null);
resultScoreService.deleteResultScoreByDetailId(detail.getId());
if(clearFlag == 1){
detail.setCheckResult(null);
detail.setAcquireScore(null);
detail.setSuperScore(null);
resultScoreService.deleteResultScoreByDetailId(detail.getId());
}else{
resultScoreService.setNoEditScoreByDetailId(detail.getId());
}
}
resultDetailService.updateBatchById(resultDetails);
return R.ok();
}
return R.error("无数据删除");

View File

@ -280,7 +280,7 @@
</update>
<select id="selectFlowRecordByRecordIdFlowProcess" resultType="com.lz.modules.flow.entity.FlowRecord">
select * from lz_flow_record where is_delete = 0 and record_id = #{id} and flow_process = #{flowProcess}
select * from lz_flow_record where is_delete = 0 and record_id = #{id} and flow_process = #{flowProcess} order by flow_index asc
</select>

View File

@ -14,12 +14,13 @@
<result column="score_comment" property="scoreComment"/>
<result column="weight" property="weight"/>
<result column="score" property="score"/>
<result column="is_edit" property="isEdit"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight, score AS score
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, acquire_score AS acquireScore, detail_id AS detailId, approval_id AS approvalId, score_comment AS scoreComment, weight AS weight, score AS score, is_edit AS isEdit
</sql>
@ -38,6 +39,7 @@
<if test="scoreComment != null">score_comment, </if>
<if test="weight != null">weight, </if>
<if test="score != null">score, </if>
<if test="isEdit != null">is_edit, </if>
is_delete,
gmt_create,
gmt_modified
@ -48,6 +50,7 @@
<if test="scoreComment != null">#{ scoreComment}, </if>
<if test="weight != null">#{ weight}, </if>
<if test="score != null">#{ score}, </if>
<if test="isEdit != null">#{ isEdit}, </if>
0,
now(),
now()
@ -66,7 +69,8 @@
<if test="approvalId != null">approval_id = #{approvalId},</if>
<if test="scoreComment != null">score_comment = #{scoreComment},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="score != null">score = #{score}</if>
<if test="score != null">score = #{score},</if>
<if test="isEdit != null">is_edit = #{isEdit}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -84,7 +88,8 @@
approval_id = #{approvalId},
score_comment = #{scoreComment},
weight = #{weight},
score = #{score}
score = #{score},
is_edit = #{isEdit}
,gmt_modified = now()
where id = #{id}
</update>
@ -110,5 +115,9 @@
update lz_result_score set is_delete = 1, gmt_modified = now() where detail_id=#{id} and is_delete = 0
</update>
<update id="setNoEditScoreByDetailId" parameterType="java.lang.Long">
update lz_result_score set is_edit = 0, gmt_modified = now() where detail_id=#{id} and is_delete = 0
</update>
</mapper>

View File

@ -85,7 +85,7 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_task_process_record"));
list.add(new TablesBean("lz_result_score"));
List<TablesBean> list2 = new ArrayList<TablesBean>();