|
@@ -3,6 +3,7 @@ package com.ningdatech.syndataapi.open.manage; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
import com.ningdatech.basic.function.VUtils; |
|
|
|
|
|
import com.ningdatech.basic.util.StrPool; |
|
|
import com.ningdatech.syndataapi.common.constant.BizConst; |
|
|
import com.ningdatech.syndataapi.common.constant.BizConst; |
|
|
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectBaseInfoDTO; |
|
|
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectBaseInfoDTO; |
|
|
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectSaveDTO; |
|
|
import com.ningdatech.syndataapi.scheduler.model.dto.ProjectSaveDTO; |
|
@@ -175,8 +176,6 @@ public class ProjectReceiveManage { |
|
|
// 6.保存 采购信息 |
|
|
// 6.保存 采购信息 |
|
|
List<ProjectProcure> procures = dto.getProcures(); |
|
|
List<ProjectProcure> procures = dto.getProcures(); |
|
|
if(Objects.nonNull(procures)){ |
|
|
if(Objects.nonNull(procures)){ |
|
|
// procureService.remove(Wrappers.lambdaQuery(ProjectProcure.class) |
|
|
|
|
|
// .eq(ProjectProcure::getBaseProjId,baseProjId)); |
|
|
|
|
|
List<ProjectProcure> olds = procureService.list(Wrappers.lambdaQuery(ProjectProcure.class) |
|
|
List<ProjectProcure> olds = procureService.list(Wrappers.lambdaQuery(ProjectProcure.class) |
|
|
.eq(ProjectProcure::getBaseProjId, baseProjId)); |
|
|
.eq(ProjectProcure::getBaseProjId, baseProjId)); |
|
|
for(ProjectProcure old : olds){ |
|
|
for(ProjectProcure old : olds){ |
|
@@ -184,15 +183,18 @@ public class ProjectReceiveManage { |
|
|
old.setOp(BizConst.OP_DELETE); |
|
|
old.setOp(BizConst.OP_DELETE); |
|
|
procureService.updateById(old); |
|
|
procureService.updateById(old); |
|
|
} |
|
|
} |
|
|
|
|
|
Integer index = 1; |
|
|
for(ProjectProcure procure : procures){ |
|
|
for(ProjectProcure procure : procures){ |
|
|
//添加标记 |
|
|
//添加标记 |
|
|
ProjectProcure saveProcure = BeanUtil.copyProperties(procure,ProjectProcure.class); |
|
|
ProjectProcure saveProcure = BeanUtil.copyProperties(procure,ProjectProcure.class); |
|
|
saveProcure.setBaseProjId(baseProjId); |
|
|
saveProcure.setBaseProjId(baseProjId); |
|
|
|
|
|
saveProcure.setBaseBidCode(baseProjId + StrPool.DASH + String.format(StrPool.FORMAT_DATE_SINGLE_DIGITS,index)); |
|
|
saveProcure.setTongID(null); |
|
|
saveProcure.setTongID(null); |
|
|
saveProcure.setTongTime(LocalDateTime.now()); |
|
|
saveProcure.setTongTime(LocalDateTime.now()); |
|
|
saveProcure.setBizTime(LocalDateTime.now()); |
|
|
saveProcure.setBizTime(LocalDateTime.now()); |
|
|
saveProcure.setOp(BizConst.OP_INSERT); |
|
|
saveProcure.setOp(BizConst.OP_INSERT); |
|
|
procureService.save(saveProcure); |
|
|
procureService.save(saveProcure); |
|
|
|
|
|
index ++; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|