|
|
|
|
@ -13,6 +13,7 @@ import com.biutag.supervision.pojo.dto.TaskManagementDto;
|
|
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
|
import com.biutag.supervision.pojo.param.TaskQueryParam; |
|
|
|
|
import com.biutag.supervision.pojo.vo.TaskVo; |
|
|
|
|
import com.biutag.supervision.pojo.vo.TemperancePoliceVo; |
|
|
|
|
import com.biutag.supervision.util.CommonUtil; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
@ -75,6 +76,18 @@ public class TaskManagementService {
|
|
|
|
|
} |
|
|
|
|
if("禁酒督察".equals(dto.getSpecialType())) { |
|
|
|
|
task.setTaskType("testing_alcohol"); |
|
|
|
|
if (CollectionUtil.isNotEmpty(dto.getUserList())) { |
|
|
|
|
Set<String> departIds = dto.getUserList().stream().map(SupTaskTestingAlcoholPeople::getDepartId).collect(Collectors.toSet()); |
|
|
|
|
List<SupDepart> departs = departService.listByIds(departIds); |
|
|
|
|
task.setSupDepartName(departs.stream().map(SupDepart::getShortName).collect(Collectors.joining("、"))); |
|
|
|
|
} |
|
|
|
|
if(CollectionUtil.isNotEmpty(dto.getUserList())){ |
|
|
|
|
Set<String> departList = dto.getUserList().stream().map(SupTaskTestingAlcoholPeople::getDepartName).collect(Collectors.toSet()); |
|
|
|
|
if(CollectionUtil.isNotEmpty(departList)){ |
|
|
|
|
task.setSupDepartName(departList.stream().collect(Collectors.joining("、"))); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if("重点人员管控".equals(dto.getSpecialType())){ |
|
|
|
|
task.setTaskType("risk_personal"); |
|
|
|
|
@ -135,7 +148,6 @@ public class TaskManagementService {
|
|
|
|
|
}); |
|
|
|
|
alcoholSamplingService.saveBatch(samplings); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dto.getPersons().forEach(item -> { |
|
|
|
|
item.setTaskId(task.getId()); |
|
|
|
|
}); |
|
|
|
|
|