|
|
@@ -59,7 +59,10 @@ public class ProjectReceiveManage { |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
ProjectBaseInfo saveBase = BeanUtil.copyProperties(baseInfo,ProjectBaseInfo.class); |
|
|
|
if(Objects.isNull(oldBaseInfo)){ |
|
|
|
saveBase.setOp(BizConst.OP_INSERT); |
|
|
|
saveBase.setTongTime(LocalDateTime.now()); |
|
|
|
}else { |
|
|
|
saveBase.setOp(BizConst.OP_UPDATE); |
|
|
|
} |
|
|
|
saveBase.setBizTime(LocalDateTime.now()); |
|
|
|
baseInfoService.saveOrUpdate(saveBase); |
|
|
@@ -74,12 +77,14 @@ public class ProjectReceiveManage { |
|
|
|
ProjectApply saveApply = BeanUtil.copyProperties(apply,ProjectApply.class); |
|
|
|
saveApply.setBaseProjId(baseProjId); |
|
|
|
if(Objects.isNull(oldApply)){ |
|
|
|
saveApply.setOp(BizConst.OP_INSERT); |
|
|
|
saveApply.setTongTime(LocalDateTime.now()); |
|
|
|
}else{ |
|
|
|
saveApply.setOp(BizConst.OP_UPDATE); |
|
|
|
} |
|
|
|
saveApply.setBizTime(LocalDateTime.now()); |
|
|
|
applyService.saveOrUpdate(saveApply); |
|
|
|
|
|
|
|
|
|
|
|
// 3.保存 审批信息 |
|
|
|
ProjectApprove approve = dto.getApprove(); |
|
|
|
|
|
|
@@ -90,7 +95,10 @@ public class ProjectReceiveManage { |
|
|
|
ProjectApprove saveApprove = BeanUtil.copyProperties(approve,ProjectApprove.class); |
|
|
|
saveApprove.setBaseProjId(baseProjId); |
|
|
|
if(Objects.isNull(oldApprove)){ |
|
|
|
saveApprove.setOp(BizConst.OP_INSERT); |
|
|
|
saveApprove.setTongTime(LocalDateTime.now()); |
|
|
|
}else{ |
|
|
|
saveApprove.setOp(BizConst.OP_UPDATE); |
|
|
|
} |
|
|
|
saveApprove.setBizTime(LocalDateTime.now()); |
|
|
|
approveService.saveOrUpdate(saveApprove); |
|
|
@@ -106,7 +114,10 @@ public class ProjectReceiveManage { |
|
|
|
ProjectCimplement saveCimplement = BeanUtil.copyProperties(cimplement,ProjectCimplement.class); |
|
|
|
saveCimplement.setBaseProjId(baseProjId); |
|
|
|
if(Objects.isNull(oldCimplement)){ |
|
|
|
saveCimplement.setOp(BizConst.OP_INSERT); |
|
|
|
saveCimplement.setTongTime(LocalDateTime.now()); |
|
|
|
}else{ |
|
|
|
saveCimplement.setOp(BizConst.OP_UPDATE); |
|
|
|
} |
|
|
|
saveCimplement.setBizTime(LocalDateTime.now()); |
|
|
|
cimplementService.saveOrUpdate(saveCimplement); |
|
|
@@ -122,7 +133,10 @@ public class ProjectReceiveManage { |
|
|
|
ProjectMimplement saveMimplement = BeanUtil.copyProperties(mimplement,ProjectMimplement.class); |
|
|
|
saveMimplement.setBaseProjId(baseProjId); |
|
|
|
if(Objects.isNull(oldMimplement)){ |
|
|
|
saveMimplement.setOp(BizConst.OP_INSERT); |
|
|
|
saveMimplement.setTongTime(LocalDateTime.now()); |
|
|
|
}else{ |
|
|
|
saveMimplement.setOp(BizConst.OP_UPDATE); |
|
|
|
} |
|
|
|
saveMimplement.setBizTime(LocalDateTime.now()); |
|
|
|
mimplementService.saveOrUpdate(saveMimplement); |
|
|
@@ -131,14 +145,23 @@ public class ProjectReceiveManage { |
|
|
|
// 6.保存 采购信息 |
|
|
|
List<ProjectProcure> procures = dto.getProcures(); |
|
|
|
if(Objects.nonNull(procures)){ |
|
|
|
procureService.remove(Wrappers.lambdaQuery(ProjectProcure.class) |
|
|
|
.eq(ProjectProcure::getBaseProjId,baseProjId)); |
|
|
|
// procureService.remove(Wrappers.lambdaQuery(ProjectProcure.class) |
|
|
|
// .eq(ProjectProcure::getBaseProjId,baseProjId)); |
|
|
|
List<ProjectProcure> olds = procureService.list(Wrappers.lambdaQuery(ProjectProcure.class) |
|
|
|
.eq(ProjectProcure::getBaseProjId, baseProjId)); |
|
|
|
for(ProjectProcure old : olds){ |
|
|
|
//删除标记 |
|
|
|
old.setOp(BizConst.OP_DELETE); |
|
|
|
procureService.save(old); |
|
|
|
} |
|
|
|
for(ProjectProcure procure : procures){ |
|
|
|
//添加标记 |
|
|
|
ProjectProcure saveProcure = BeanUtil.copyProperties(procure,ProjectProcure.class); |
|
|
|
saveProcure.setBaseProjId(baseProjId); |
|
|
|
saveProcure.setTongID(null); |
|
|
|
saveProcure.setTongTime(LocalDateTime.now()); |
|
|
|
saveProcure.setBizTime(LocalDateTime.now()); |
|
|
|
saveProcure.setOp(BizConst.OP_INSERT); |
|
|
|
procureService.save(saveProcure); |
|
|
|
} |
|
|
|
} |
|
|
@@ -163,6 +186,7 @@ public class ProjectReceiveManage { |
|
|
|
saveBaseinfo.setTongTime(LocalDateTime.now()); |
|
|
|
} |
|
|
|
saveBaseinfo.setBizTime(LocalDateTime.now()); |
|
|
|
saveBaseinfo.setOp(BizConst.OP_UPDATE); |
|
|
|
baseInfoService.saveOrUpdate(saveBaseinfo); |
|
|
|
|
|
|
|
return BizConst.OP_SUCCESS; |
|
|
|