|
@@ -40,8 +40,6 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
@Transactional
|
|
|
public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageArchivesMapper, ProjectManageArchives> implements ProjectManageArchivesService {
|
|
|
- @Autowired
|
|
|
- private ProjectManageArchivesMapper projectManageArchivesMapper;
|
|
|
@Autowired
|
|
|
private ProjectManageArchivesAndBusinessService projectManageArchivesAndBusinessService;
|
|
|
@Autowired
|
|
@@ -122,10 +120,11 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
|
|
|
* @desc 设置里程碑数据
|
|
|
*/
|
|
|
private void setRespDTO(ProArchivesAddRespDTO respDTO, List<ProjectManageArchivesAndBusiness> businessList, Map<Integer, List<ProjectManageBusinessOther>> otherMap) {
|
|
|
- respDTO.setBsInfo(new BsInfo(getBsInfoData(businessList, 1)));
|
|
|
- respDTO.setIpInfo(new IpInfoRespDTO(getBsInfoData(businessList, 2), getPlanList(otherMap.get(2))));
|
|
|
- respDTO.setDeInfo(new DeInfoRespDTO(getBsInfoData(businessList, 3), getPlanList(otherMap.get(3))));
|
|
|
- respDTO.setSeInfo(new SeInfoRespDTO(getBsInfoData(businessList, 4), getPlanList(otherMap.get(4))));
|
|
|
+ respDTO.setBsInfo(new BsInfo(getBsInfoData(businessList, 1), getBsInfoData(businessList, 2),
|
|
|
+ getBsInfoData(businessList, 3), getBsInfoData(businessList, 4)));
|
|
|
+ respDTO.setIpInfo(new IpInfoRespDTO(getPlanList(otherMap.get(2))));
|
|
|
+ respDTO.setDeInfo(new DeInfoRespDTO(getPlanList(otherMap.get(3))));
|
|
|
+ respDTO.setSeInfo(new SeInfoRespDTO(getPlanList(otherMap.get(4))));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -228,12 +227,27 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
|
|
|
if(bsInfo == null){
|
|
|
throw new JeecgBootException("项目档案—商务的数据不能为空");
|
|
|
}
|
|
|
- List<ProArchivesAndBusinessAddReqDTO> mileList = bsInfo.getMileList();
|
|
|
- if(CollectionUtils.isEmpty(mileList)){
|
|
|
- throw new JeecgBootException("项目档案—商务的list数据不能为空");
|
|
|
+
|
|
|
+ List<ProArchivesAndBusinessAddReqDTO> coPlanList = bsInfo.getCoPlanList();
|
|
|
+ if(!CollectionUtils.isEmpty(coPlanList)){
|
|
|
+ saveMileData( coPlanList, reqDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProArchivesAndBusinessAddReqDTO> coSituationList = bsInfo.getCoSituationList();
|
|
|
+ if(!CollectionUtils.isEmpty(coSituationList)){
|
|
|
+ saveMileData(coSituationList, reqDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ProArchivesAndBusinessAddReqDTO> payPlanList = bsInfo.getPayPlanList();
|
|
|
+ if(!CollectionUtils.isEmpty(payPlanList)){
|
|
|
+ saveMileData(payPlanList, reqDTO);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ List<ProArchivesAndBusinessAddReqDTO> paySituationList = bsInfo.getPaySituationList();
|
|
|
+ if(!CollectionUtils.isEmpty(paySituationList)){
|
|
|
+ saveMileData(paySituationList, reqDTO);
|
|
|
}
|
|
|
-
|
|
|
- saveMileData( mileList, reqDTO, 1);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -244,12 +258,12 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
|
|
|
if(ipInfo == null){
|
|
|
throw new JeecgBootException("项目档案—实施的数据不能为空");
|
|
|
}
|
|
|
- List<ProArchivesAndBusinessAddReqDTO> mileList = ipInfo.getMileList();
|
|
|
- if(CollectionUtils.isEmpty(mileList)){
|
|
|
- throw new JeecgBootException("项目档案—实施的里程碑数据不能为空");
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- saveMileData(mileList, reqDTO, 2);
|
|
|
+
|
|
|
|
|
|
List<ProBusinessOtherAddReqDTO> planList = ipInfo.getPlanList();
|
|
|
if(CollectionUtils.isEmpty(planList)){
|
|
@@ -268,12 +282,12 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
|
|
|
if(deInfo == null){
|
|
|
throw new JeecgBootException("项目档案—开发的数据不能为空");
|
|
|
}
|
|
|
- List<ProArchivesAndBusinessAddReqDTO> mileList = deInfo.getMileList();
|
|
|
- if(CollectionUtils.isEmpty(mileList)){
|
|
|
- throw new JeecgBootException("项目档案—开发的里程碑数据不能为空");
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- saveMileData(mileList, reqDTO, 3);
|
|
|
+
|
|
|
|
|
|
List<ProBusinessOtherAddReqDTO> planList = deInfo.getPlanList();
|
|
|
if(CollectionUtils.isEmpty(planList)){
|
|
@@ -291,12 +305,12 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
|
|
|
if(seInfo == null){
|
|
|
throw new JeecgBootException("项目档案—服务的数据不能为空");
|
|
|
}
|
|
|
- List<ProArchivesAndBusinessAddReqDTO> mileList = seInfo.getMileList();
|
|
|
- if(CollectionUtils.isEmpty(mileList)){
|
|
|
- throw new JeecgBootException("项目档案—服务的里程碑数据不能为空");
|
|
|
- }
|
|
|
-
|
|
|
- saveMileData(mileList, reqDTO, 4);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
List<ProBusinessOtherAddReqDTO> planList = seInfo.getPlanList();
|
|
|
if(CollectionUtils.isEmpty(planList)){
|
|
@@ -308,10 +322,10 @@ public class ProjectManageArchivesServiceImpl extends ServiceImpl<ProjectManageA
|
|
|
|
|
|
* @desc 保存里程碑数据
|
|
|
*/
|
|
|
- private void saveMileData(List<ProArchivesAndBusinessAddReqDTO> mileList, ProArchivesAddReqDTO reqDTO, Integer planType) {
|
|
|
+ private void saveMileData(List<ProArchivesAndBusinessAddReqDTO> mileList, ProArchivesAddReqDTO reqDTO) {
|
|
|
List<ProjectManageArchivesAndBusiness> list = Lists.newArrayList();
|
|
|
for(ProArchivesAndBusinessAddReqDTO mile : mileList) {
|
|
|
- list.add(new ProjectManageArchivesAndBusiness(mile, reqDTO.getId(), planType, reqDTO.getPkOrg()));
|
|
|
+ list.add(new ProjectManageArchivesAndBusiness(mile, reqDTO.getId(), reqDTO.getPkOrg()));
|
|
|
}
|
|
|
projectManageArchivesAndBusinessService.saveBatch(list);
|
|
|
}
|