Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
杜建超 2020-11-12 17:47:26 +08:00
commit dd03cb5bdb
5 changed files with 27 additions and 3 deletions

View File

@ -51,4 +51,6 @@ public interface EvaluationStartStaffMapper extends BaseMapper<EvaluationStartSt
List<Long> selectStaffIdsByStartAndStaffId(@Param("startId") Long id, @Param("list") List<StaffSimpleInfo> staffIds);
int deleteByStartId(@Param("startId") Long startId);
EvaluationStartStaff selectEvaluationStartById(@Param("evaluationId") Long evaluationId, @Param("startId") Long startId);
}

View File

@ -42,4 +42,6 @@ public interface EvaluationStartStaffService extends IService<EvaluationStartSta
int updateBatchToScore(Long startId,Long evaluationId);
List<Long> selectStaffIdsByStartAndStaffId(Long id, List<StaffSimpleInfo> staffIds);
EvaluationStartStaff selectEvaluationStartById(Long evaluationId, Long startId);
}

View File

@ -109,4 +109,9 @@ public class EvaluationStartStaffServiceImpl extends ServiceImpl<EvaluationStart
public List<Long> selectStaffIdsByStartAndStaffId(Long id, List<StaffSimpleInfo> staffIds){
return evaluationStartStaffMapper.selectStaffIdsByStartAndStaffId(id, staffIds);
}
@Override
public EvaluationStartStaff selectEvaluationStartById(Long evaluationId, Long startId) {
return evaluationStartStaffMapper.selectEvaluationStartById(evaluationId, startId);
}
}

View File

@ -135,6 +135,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
@Autowired
private FlowChangeService flowChangeService;
@Autowired
private EvaluationStartStaffService evaluationStartStaffService;
@Value("${dingtalk.appid}")
private String appid;
@ -843,6 +846,14 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
resultRecord.setFlowProcess(flowChart.getFlowProcess());
} else {
flowRecord.setStatus(FlowRecordStatusEnums.UN_TO_STATUS.getStatus());
if(new Integer(4).equals(flowChart.getFlowProcess())){
EvaluationStartStaff evaluationStartStaff = evaluationStartStaffService.selectEvaluationStartById(resultRecord.getEvaluationId(),resultRecord.getStartId());
if(evaluationStartStaff !=null && new Integer(1).equals(evaluationStartStaff.getScore())){
flowRecord.setStatus(FlowRecordStatusEnums.SKIP_STATUS.getStatus());
}else{
log.info("evaluationStartStaff is null evaluationId :" + resultRecord.getEvaluationId() + ", startId : " + resultRecord.getStartId());
}
}
}
flowRecord.setFlowStaffIdRole(staffRole);
flowRecord.setFlowIndex(flowApprovalRole.getStepIndex());
@ -954,7 +965,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
}
private R newSubmit(ApprovalDto approvalDto,Integer finishedStatus) {
ResultRecord resultRecord = resultRecordMapper.selectResultRecordById(approvalDto.getResultRecordId());
if(approvalDto.getLoginUserId() == null){
approvalDto.setLoginUserId(resultRecord.getCurrentApprovalStaffId());
@ -1016,8 +1026,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
flowRecordService.updateFlowRecordById(flowRecord);
}
FlowChart currentFlowChart = flowService.selectFlowChartByChartId(currentFlowRecord.getFlowId());
resultRecord.setFlowProcess(currentFlowChart.getFlowProcess());
resultRecord.setFlowProcess(currentFlowRecord.getFlowProcess());
log.info("resultRecordId = "+resultRecord.getId() + ",currentFlowRecordId" + currentFlowRecord.getId() + " , 当前 flowProcess : " + resultRecord.getFlowProcess());
resultRecord.setFlowStaffIdRole(nextFlowRecords.size() == 1 ? currentFlowRecord.getFlowStaffIdRole() : null);
resultRecord.setCurrentApprovalStaffId(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffId() : null);
resultRecord.setCurrentApprovalStaffName(nextFlowRecords.size() == 1 ? currentFlowRecord.getApprovalStaffName() : null);

View File

@ -178,6 +178,11 @@
group by staff_id
</select>
<select id="selectEvaluationStartById" resultType="com.lz.modules.flow.entity.EvaluationStartStaff">
select * from lz_evaluation_start_staff where start_id=#{startId} and evaluation_id=#{evaluationId} and is_delete = 0 limit 1
</select>
<update id="deleteByStartId">
UPDATE lz_evaluation_start_staff
SET is_delete = 1