|
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.google.common.collect.Maps; |
|
|
import com.google.common.collect.Maps; |
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
|
|
import com.ningdatech.basic.util.StrPool; |
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
import com.ningdatech.pmapi.gov.contants.BizProjectContant; |
|
|
import com.ningdatech.pmapi.gov.contants.BizProjectContant; |
|
|
import com.ningdatech.pmapi.gov.convert.ProjectConvert; |
|
|
import com.ningdatech.pmapi.gov.convert.ProjectConvert; |
|
@@ -31,6 +32,7 @@ import org.springframework.http.HttpHeaders; |
|
|
import org.springframework.http.MediaType; |
|
|
import org.springframework.http.MediaType; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.web.client.RestTemplate; |
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
@@ -214,6 +216,7 @@ public class GovProjectCollectionManage { |
|
|
* @param saveDTO |
|
|
* @param saveDTO |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Transactional |
|
|
public String save(GovBizProjectSaveDTO saveDTO) { |
|
|
public String save(GovBizProjectSaveDTO saveDTO) { |
|
|
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo(); |
|
|
GovBizProjectBaseinfoDTO base = saveDTO.getBaseinfo(); |
|
|
String baseProjId = base.getBaseProjId(); |
|
|
String baseProjId = base.getBaseProjId(); |
|
@@ -297,6 +300,7 @@ public class GovProjectCollectionManage { |
|
|
if(Objects.nonNull(cimplement)){ |
|
|
if(Objects.nonNull(cimplement)){ |
|
|
cimplement.setBaseProjId(baseProjId); |
|
|
cimplement.setBaseProjId(baseProjId); |
|
|
cimplement.setBaseProjName(baseProjName); |
|
|
cimplement.setBaseProjName(baseProjName); |
|
|
|
|
|
cimplement.setBaseBidCode(baseProjId + "-1"); |
|
|
GovBizProjectCimplement oldCimplement = cimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectCimplement.class) |
|
|
GovBizProjectCimplement oldCimplement = cimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectCimplement.class) |
|
|
.eq(GovBizProjectCimplement::getBaseProjId, baseProjId) |
|
|
.eq(GovBizProjectCimplement::getBaseProjId, baseProjId) |
|
|
.last(BizConst.LIMIT_1)); |
|
|
.last(BizConst.LIMIT_1)); |
|
@@ -319,12 +323,14 @@ public class GovProjectCollectionManage { |
|
|
if(Objects.nonNull(mimplement)){ |
|
|
if(Objects.nonNull(mimplement)){ |
|
|
mimplement.setBaseProjId(baseProjId); |
|
|
mimplement.setBaseProjId(baseProjId); |
|
|
mimplement.setBaseProjName(baseProjName); |
|
|
mimplement.setBaseProjName(baseProjName); |
|
|
|
|
|
mimplement.setBaseBidCode(baseProjId + "-2"); |
|
|
GovBizProjectMimplement oldMimplement = mimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectMimplement.class) |
|
|
GovBizProjectMimplement oldMimplement = mimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectMimplement.class) |
|
|
.eq(GovBizProjectMimplement::getBaseProjId, baseProjId) |
|
|
.eq(GovBizProjectMimplement::getBaseProjId, baseProjId) |
|
|
.last(BizConst.LIMIT_1)); |
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
|
|
|
|
|
GovBizProjectMimplement saveMimplement = BeanUtil.copyProperties(mimplement,GovBizProjectMimplement.class); |
|
|
GovBizProjectMimplement saveMimplement = BeanUtil.copyProperties(mimplement,GovBizProjectMimplement.class); |
|
|
saveMimplement.setBaseProjId(baseProjId); |
|
|
saveMimplement.setBaseProjId(baseProjId); |
|
|
|
|
|
|
|
|
if(Objects.nonNull(oldMimplement)){ |
|
|
if(Objects.nonNull(oldMimplement)){ |
|
|
saveMimplement.setId(oldMimplement.getId()); |
|
|
saveMimplement.setId(oldMimplement.getId()); |
|
|
}else{ |
|
|
}else{ |
|
@@ -338,9 +344,11 @@ public class GovProjectCollectionManage { |
|
|
|
|
|
|
|
|
// 6.保存 采购信息 |
|
|
// 6.保存 采购信息 |
|
|
List<GovBizProjectProcureDTO> procures = saveDTO.getProcures(); |
|
|
List<GovBizProjectProcureDTO> procures = saveDTO.getProcures(); |
|
|
|
|
|
Integer index = 1; |
|
|
for(GovBizProjectProcureDTO procure : procures){ |
|
|
for(GovBizProjectProcureDTO procure : procures){ |
|
|
procure.setBaseProjId(baseProjId); |
|
|
procure.setBaseProjId(baseProjId); |
|
|
procure.setBaseProjName(baseProjName); |
|
|
procure.setBaseProjName(baseProjName); |
|
|
|
|
|
procure.setBaseBidCode(baseProjId + StrPool.DASH + index); |
|
|
|
|
|
|
|
|
GovBizProjectProcure saveProcure = BeanUtil.copyProperties(procure,GovBizProjectProcure.class); |
|
|
GovBizProjectProcure saveProcure = BeanUtil.copyProperties(procure,GovBizProjectProcure.class); |
|
|
saveProcure.setBaseProjId(baseProjId); |
|
|
saveProcure.setBaseProjId(baseProjId); |
|
@@ -359,6 +367,7 @@ public class GovProjectCollectionManage { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
procureService.saveOrUpdate(saveProcure); |
|
|
procureService.saveOrUpdate(saveProcure); |
|
|
|
|
|
index++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|