|
|
@@ -347,14 +347,26 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void mateUserRecord(ProjectStaffRecordInput in) {
|
|
|
+ public AjaxResult mateUserRecord(ProjectStaffRecordInput in) {
|
|
|
in.setPageSize(999999);
|
|
|
List<ProjectStaffRecordOut> projectStaffRecordOuts = listRecord(in);
|
|
|
List<Long> collect = projectStaffRecordOuts.stream().map(ProjectStaffRecordOut::getId).collect(Collectors.toList());
|
|
|
+
|
|
|
if (!collect.isEmpty()){
|
|
|
- projectStaffRecordMapper.mateUserRecord(collect);
|
|
|
+ if (collect.size()< 50){
|
|
|
+ projectStaffRecordMapper.mateUserRecord(collect);
|
|
|
+ }else {
|
|
|
+ for (int i = 0; i < collect.size(); i+=50) {
|
|
|
+ List<Long> subList = collect.subList(i, i + 50);
|
|
|
+ projectStaffRecordMapper.mateUserRecord(subList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pushProjectAndAidDuration(projectStaffRecordOuts);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }else {
|
|
|
+ return AjaxResult.error("无需合并的数据");
|
|
|
}
|
|
|
- pushProjectAndAidDuration(projectStaffRecordOuts);
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -833,6 +845,7 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
BigDecimal added = projectDuration.add(BigDecimal.valueOf(e.getDuration()));
|
|
|
BigDecimal checkDuration = BigDecimal.valueOf(e.getCheckDuration());
|
|
|
map2.put("projectDuration", added);
|
|
|
+ map2.put("checkDuration", checkDuration);
|
|
|
map2.put("notDuration", checkDuration.subtract(added));
|
|
|
break;
|
|
|
}
|