|
@@ -59,7 +59,10 @@ public class ProjectReceiveManage { |
|
|
.last(BizConst.LIMIT_1)); |
|
|
.last(BizConst.LIMIT_1)); |
|
|
ProjectBaseInfo saveBase = BeanUtil.copyProperties(baseInfo,ProjectBaseInfo.class); |
|
|
ProjectBaseInfo saveBase = BeanUtil.copyProperties(baseInfo,ProjectBaseInfo.class); |
|
|
if(Objects.isNull(oldBaseInfo)){ |
|
|
if(Objects.isNull(oldBaseInfo)){ |
|
|
|
|
|
saveBase.setOp(BizConst.OP_INSERT); |
|
|
saveBase.setTongTime(LocalDateTime.now()); |
|
|
saveBase.setTongTime(LocalDateTime.now()); |
|
|
|
|
|
}else { |
|
|
|
|
|
saveBase.setOp(BizConst.OP_UPDATE); |
|
|
} |
|
|
} |
|
|
saveBase.setBizTime(LocalDateTime.now()); |
|
|
saveBase.setBizTime(LocalDateTime.now()); |
|
|
baseInfoService.saveOrUpdate(saveBase); |
|
|
baseInfoService.saveOrUpdate(saveBase); |
|
@@ -74,12 +77,14 @@ public class ProjectReceiveManage { |
|
|
ProjectApply saveApply = BeanUtil.copyProperties(apply,ProjectApply.class); |
|
|
ProjectApply saveApply = BeanUtil.copyProperties(apply,ProjectApply.class); |
|
|
saveApply.setBaseProjId(baseProjId); |
|
|
saveApply.setBaseProjId(baseProjId); |
|
|
if(Objects.isNull(oldApply)){ |
|
|
if(Objects.isNull(oldApply)){ |
|
|
|
|
|
saveApply.setOp(BizConst.OP_INSERT); |
|
|
saveApply.setTongTime(LocalDateTime.now()); |
|
|
saveApply.setTongTime(LocalDateTime.now()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
saveApply.setOp(BizConst.OP_UPDATE); |
|
|
} |
|
|
} |
|
|
saveApply.setBizTime(LocalDateTime.now()); |
|
|
saveApply.setBizTime(LocalDateTime.now()); |
|
|
applyService.saveOrUpdate(saveApply); |
|
|
applyService.saveOrUpdate(saveApply); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3.保存 审批信息 |
|
|
// 3.保存 审批信息 |
|
|
ProjectApprove approve = dto.getApprove(); |
|
|
ProjectApprove approve = dto.getApprove(); |
|
|
|
|
|
|
|
@@ -90,7 +95,10 @@ public class ProjectReceiveManage { |
|
|
ProjectApprove saveApprove = BeanUtil.copyProperties(approve,ProjectApprove.class); |
|
|
ProjectApprove saveApprove = BeanUtil.copyProperties(approve,ProjectApprove.class); |
|
|
saveApprove.setBaseProjId(baseProjId); |
|
|
saveApprove.setBaseProjId(baseProjId); |
|
|
if(Objects.isNull(oldApprove)){ |
|
|
if(Objects.isNull(oldApprove)){ |
|
|
|
|
|
saveApprove.setOp(BizConst.OP_INSERT); |
|
|
saveApprove.setTongTime(LocalDateTime.now()); |
|
|
saveApprove.setTongTime(LocalDateTime.now()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
saveApprove.setOp(BizConst.OP_UPDATE); |
|
|
} |
|
|
} |
|
|
saveApprove.setBizTime(LocalDateTime.now()); |
|
|
saveApprove.setBizTime(LocalDateTime.now()); |
|
|
approveService.saveOrUpdate(saveApprove); |
|
|
approveService.saveOrUpdate(saveApprove); |
|
@@ -106,7 +114,10 @@ public class ProjectReceiveManage { |
|
|
ProjectCimplement saveCimplement = BeanUtil.copyProperties(cimplement,ProjectCimplement.class); |
|
|
ProjectCimplement saveCimplement = BeanUtil.copyProperties(cimplement,ProjectCimplement.class); |
|
|
saveCimplement.setBaseProjId(baseProjId); |
|
|
saveCimplement.setBaseProjId(baseProjId); |
|
|
if(Objects.isNull(oldCimplement)){ |
|
|
if(Objects.isNull(oldCimplement)){ |
|
|
|
|
|
saveCimplement.setOp(BizConst.OP_INSERT); |
|
|
saveCimplement.setTongTime(LocalDateTime.now()); |
|
|
saveCimplement.setTongTime(LocalDateTime.now()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
saveCimplement.setOp(BizConst.OP_UPDATE); |
|
|
} |
|
|
} |
|
|
saveCimplement.setBizTime(LocalDateTime.now()); |
|
|
saveCimplement.setBizTime(LocalDateTime.now()); |
|
|
cimplementService.saveOrUpdate(saveCimplement); |
|
|
cimplementService.saveOrUpdate(saveCimplement); |
|
@@ -122,7 +133,10 @@ public class ProjectReceiveManage { |
|
|
ProjectMimplement saveMimplement = BeanUtil.copyProperties(mimplement,ProjectMimplement.class); |
|
|
ProjectMimplement saveMimplement = BeanUtil.copyProperties(mimplement,ProjectMimplement.class); |
|
|
saveMimplement.setBaseProjId(baseProjId); |
|
|
saveMimplement.setBaseProjId(baseProjId); |
|
|
if(Objects.isNull(oldMimplement)){ |
|
|
if(Objects.isNull(oldMimplement)){ |
|
|
|
|
|
saveMimplement.setOp(BizConst.OP_INSERT); |
|
|
saveMimplement.setTongTime(LocalDateTime.now()); |
|
|
saveMimplement.setTongTime(LocalDateTime.now()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
saveMimplement.setOp(BizConst.OP_UPDATE); |
|
|
} |
|
|
} |
|
|
saveMimplement.setBizTime(LocalDateTime.now()); |
|
|
saveMimplement.setBizTime(LocalDateTime.now()); |
|
|
mimplementService.saveOrUpdate(saveMimplement); |
|
|
mimplementService.saveOrUpdate(saveMimplement); |
|
@@ -131,14 +145,23 @@ 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)); |
|
|
|
|
|
|
|
|
// 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){ |
|
|
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.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); |
|
|
procureService.save(saveProcure); |
|
|
procureService.save(saveProcure); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -163,6 +186,7 @@ public class ProjectReceiveManage { |
|
|
saveBaseinfo.setTongTime(LocalDateTime.now()); |
|
|
saveBaseinfo.setTongTime(LocalDateTime.now()); |
|
|
} |
|
|
} |
|
|
saveBaseinfo.setBizTime(LocalDateTime.now()); |
|
|
saveBaseinfo.setBizTime(LocalDateTime.now()); |
|
|
|
|
|
saveBaseinfo.setOp(BizConst.OP_UPDATE); |
|
|
baseInfoService.saveOrUpdate(saveBaseinfo); |
|
|
baseInfoService.saveOrUpdate(saveBaseinfo); |
|
|
|
|
|
|
|
|
return BizConst.OP_SUCCESS; |
|
|
return BizConst.OP_SUCCESS; |
|
|