优化测试
This commit is contained in:
parent
b0503b22cd
commit
f667a85842
@ -414,7 +414,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||||
List<ResultDetail> resultDetails = new ArrayList();
|
List<ResultDetail> resultDetails = new ArrayList();
|
||||||
List<ResultRecord> resultRecords = new ArrayList<>();
|
|
||||||
//下面初始化参与人员
|
//下面初始化参与人员
|
||||||
for (StaffSimpleInfo staffInfo:staffIds
|
for (StaffSimpleInfo staffInfo:staffIds
|
||||||
) {
|
) {
|
||||||
@ -446,16 +446,14 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
resultRecord.setCurrentApprovalStaffId(staffInfo.getId());
|
resultRecord.setCurrentApprovalStaffId(staffInfo.getId());
|
||||||
//设置当前审批员工姓名 current_approval_staff_name
|
//设置当前审批员工姓名 current_approval_staff_name
|
||||||
resultRecord.setCurrentApprovalStaffName(staffInfo.getName());
|
resultRecord.setCurrentApprovalStaffName(staffInfo.getName());
|
||||||
resultRecords.add(resultRecord);
|
|
||||||
}
|
|
||||||
resultRecordService.saveBatch(resultRecords);
|
|
||||||
for (ResultRecord resultRecord:
|
|
||||||
resultRecords) {
|
|
||||||
|
|
||||||
|
|
||||||
resultRecordService.insertResultRecord(resultRecord);
|
resultRecordService.insertResultRecord(resultRecord);
|
||||||
|
|
||||||
|
|
||||||
|
resultRecordService.initFlowRecord(resultRecord.getId());
|
||||||
|
|
||||||
//下面生成实际的考核流程
|
//下面生成实际的考核流程
|
||||||
//staffInfo.setRecordId(resultRecord.getId());
|
staffInfo.setRecordId(resultRecord.getId());
|
||||||
|
|
||||||
for (ResultModelDto modelDto:resultModelDtos
|
for (ResultModelDto modelDto:resultModelDtos
|
||||||
) {
|
) {
|
||||||
@ -601,7 +599,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
List<ResultDetail> resultDetails = new ArrayList<>();
|
List<ResultDetail> resultDetails = new ArrayList<>();
|
||||||
|
|
||||||
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
List<EvaluationStartStaff> evaluationStartStaffs = new ArrayList<>();
|
||||||
|
List<ResultRecord> resultRecords = new ArrayList<>();
|
||||||
//下面初始化参与人员
|
//下面初始化参与人员
|
||||||
for (StaffSimpleInfo staffInfo:staffIds
|
for (StaffSimpleInfo staffInfo:staffIds
|
||||||
) {
|
) {
|
||||||
@ -628,6 +626,9 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
resultRecord.setEvaluationId(evaluationGroup.getId());
|
resultRecord.setEvaluationId(evaluationGroup.getId());
|
||||||
resultRecord.setFlowProcess(0);//设置为目标制定
|
resultRecord.setFlowProcess(0);//设置为目标制定
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//下面初始化flow_staff_id_role字段,步骤为0的
|
//下面初始化flow_staff_id_role字段,步骤为0的
|
||||||
String roleJSON = "[";
|
String roleJSON = "[";
|
||||||
for (int i = 0; i < flowApprovalRoles.size() ;i++){
|
for (int i = 0; i < flowApprovalRoles.size() ;i++){
|
||||||
@ -707,8 +708,13 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
roleJSON += "]";
|
roleJSON += "]";
|
||||||
roleJSON = roleJSON.replace(",]", "]");
|
roleJSON = roleJSON.replace(",]", "]");
|
||||||
resultRecord.setFlowStaffIdRole(roleJSON);
|
resultRecord.setFlowStaffIdRole(roleJSON);
|
||||||
resultRecordService.insertResultRecord(resultRecord);
|
resultRecords.add(resultRecord);
|
||||||
staffInfo.setRecordId(resultRecord.getId());
|
}
|
||||||
|
resultRecordService.saveBatch(resultRecords);
|
||||||
|
for (ResultRecord resultRecord:
|
||||||
|
resultRecords) {
|
||||||
|
//resultRecordService.insertResultRecord(resultRecord);
|
||||||
|
//staffInfo.setRecordId(resultRecord.getId());
|
||||||
//下面生成实际的考核流程
|
//下面生成实际的考核流程
|
||||||
resultRecordService.initFlowRecord(resultRecord.getId());
|
resultRecordService.initFlowRecord(resultRecord.getId());
|
||||||
//下面生成ResultDetail对象
|
//下面生成ResultDetail对象
|
||||||
@ -723,7 +729,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
resultDetail.setType(modelDto.getType());
|
resultDetail.setType(modelDto.getType());
|
||||||
resultDetail.setKeyResult(libDto.getKeyResult());
|
resultDetail.setKeyResult(libDto.getKeyResult());
|
||||||
resultDetail.setCheckWeight(libDto.getWeight());
|
resultDetail.setCheckWeight(libDto.getWeight());
|
||||||
resultDetail.setStaffId(staffInfo.getId());
|
resultDetail.setStaffId(resultRecord.getStaffId());
|
||||||
resultDetail.setPriority(libDto.getOrderBy());
|
resultDetail.setPriority(libDto.getOrderBy());
|
||||||
resultDetail.setModelId(modelDto.getId());
|
resultDetail.setModelId(modelDto.getId());
|
||||||
resultDetails.add(resultDetail);
|
resultDetails.add(resultDetail);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user