Browse Source

修改逻辑

master
郑贵龙 1 year ago
parent
commit
3c529f74d7
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/staff/StaffUpdateEAIService.java

+ 7
- 3
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/staff/StaffUpdateEAIService.java View File

@ -50,10 +50,14 @@ public class StaffUpdateEAIService extends AbsEAIService {
String option = request.getObject("option", String.class);
List<StaffEntity> staffList = request.getObject("wait_register_personnel", StaffUtil.LIST_ENTITY_STAFF);
//界面
if (OptionEnums.BASIC.getValue().equals(option)){
if (StringUtils.isEmpty(option)){
if (!CollectionUtils.isEmpty(staffList)){
//修改
staffRepository.updateStaffList(staffList, SecurityUtil.getUserProfile().getTenantSid());
//区分是否有id没有则新增
Map<Boolean, List<StaffEntity>> collect = staffList.stream().collect(Collectors.groupingBy(item -> StringUtils.isEmpty(item.getId())));
List<StaffEntity> insert = collect.get(true);
staffService.saveBatch(insert);
List<StaffEntity> update = collect.get(false);
staffRepository.updateStaffList(update, SecurityUtil.getUserProfile().getTenantSid());
}
}else if (OptionEnums.TASK.getValue().equals(option)){
if (!CollectionUtils.isEmpty(staffList)){


Loading…
Cancel
Save