Browse Source

新增重新上传节点以及合同金额的删除

master
gjh 2 weeks ago
parent
commit
d9bd705d9e
  1. 6
      huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/HuzhouPlanController.java
  2. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/IHuzhouPlaninfoService.java
  3. 46
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouPlaninfoServiceImpl.java
  4. 3
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouPlaninfofileServiceImpl.java

6
huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/HuzhouPlanController.java

@ -210,4 +210,10 @@ public class HuzhouPlanController {
return Result.ok(result);
}
// 合同签订重新上传会删除原有的合同金额是否需要继续上传?
@DeleteMapping("/deleteContractMoney")
public Result<?> deleteContractMoney(String projectid) {
Boolean flag = planinfoService.deleteContractMoney(projectid);
return Result.OK(flag);
}
}

2
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/IHuzhouPlaninfoService.java

@ -118,4 +118,6 @@ public interface IHuzhouPlaninfoService extends IService<HuzhouPlaninfo> {
void setPlaninfoIsoffline( List<HuzhouPlaninfo> planinfoid);
List<TaskLevelDetailVo> queryTaskLevelDetail(String projectid, String taskLevel);
Boolean deleteContractMoney(String projectid);
}

46
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouPlaninfoServiceImpl.java

@ -374,7 +374,7 @@ public class HuzhouPlaninfoServiceImpl extends ServiceImpl<HuzhouPlaninfoMapper,
totalPercent = totalPercent.substring(0, totalPercent.indexOf("."));
resultList.get(0).setTotalPercent(totalPercent);
}
// 封装ismodify
// 封装ismodify 判断是否显示 上传资料
resultList.stream().forEach(item -> {
determineIsModify(projectId, item);
});
@ -495,11 +495,13 @@ public class HuzhouPlaninfoServiceImpl extends ServiceImpl<HuzhouPlaninfoMapper,
private void determineIsModify(String projectId, HuzhouPlaninfoOV item) {
item.getChildren().forEach(childItem -> {
// 判断子阶段是否需要填写实际合同金额,如果存在则支持重新上传
String taskLevel = childItem.getTaskLevel();
if (childItem.getTaskName().equals("合同签订")) {
LambdaQueryWrapper<HuzhouPlaninfo> qw = new LambdaQueryWrapper<>();
qw.eq(HuzhouPlaninfo::getProjectId, projectId)
.eq(HuzhouPlaninfo::getTaskName, "合同签订").eq(HuzhouPlaninfo::getIsfinish, "2");
.eq(HuzhouPlaninfo::getTaskName, "合同签订")
.eq(HuzhouPlaninfo::getIsfinish, "2");
if (planInfoMapper.selectCount(qw) > 0 && contractinfoService.getPlanContractinfoByprojectId(projectId).size() < 1) {
childItem.setIsmodify(true);
log.info("----开启补偿接口重新上传合同金额-----");
@ -507,16 +509,31 @@ public class HuzhouPlaninfoServiceImpl extends ServiceImpl<HuzhouPlaninfoMapper,
childItem.setIsmodify(false);
}
} else {
Boolean flag = contractinfoService.hasContractinfoByTaskName(projectId, childItem.getTaskName());
if (flag) {
childItem.setIsmodify(true);
} else {
childItem.setIsmodify(false);
}
// 判断子阶段是否需要填写实际合同金额,如果存在则支持重新上传
boolean isModify = contractinfoService.hasContractinfoByTaskName(projectId, childItem.getTaskName());
childItem.setIsmodify(isModify);
}
//gjh-上传资料显示逻辑
boolean isModify = isGreaterThanThreshold(taskLevel, "2.2");
childItem.setIsmodify(isModify);
});
}
/**
* 判断传入的 taskLevel 是否大于指定阈值 "2.3"
* 前提taskLevel 格式统一为 x.y每个层级只有一位数字 "2.4", "3.0"
*
* @param taskLevel 当前任务层级
* @param thresholdLevel 阈值任务层级
* @return 如果 taskLevel > thresholdLevel返回 true否则 false
*/
private boolean isGreaterThanThreshold(String taskLevel, String thresholdLevel) {
if (taskLevel == null || thresholdLevel == null) {
throw new IllegalArgumentException("taskLevel 和 thresholdLevel 不能为空");
}
return taskLevel.compareTo(thresholdLevel) > 0;
}
private void dealMainTaskLevelIsFinish(String projectId, List<String> taskLevelList, List<HuzhouPlaninfo> subPlanInfoList, List<HuzhouPlaninfo> mainPlanInfoList) {
for (String taskLevel : taskLevelList) {
// 检查该 taskLevel 下的所有子项目是否都已完成
@ -1622,4 +1639,15 @@ public class HuzhouPlaninfoServiceImpl extends ServiceImpl<HuzhouPlaninfoMapper,
}
return result;
}
@Override
public Boolean deleteContractMoney(String projectid) {
LambdaQueryWrapper<HuzhouContractinfo> deleteWrapper = new LambdaQueryWrapper<>();
deleteWrapper.eq(HuzhouContractinfo::getProjectId, projectid);
boolean success = contractinfoService.remove(deleteWrapper);
if(success){
log.info("删除原有合同金额成功!");
}
return success;
}
}

3
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouPlaninfofileServiceImpl.java

@ -710,7 +710,8 @@ public class HuzhouPlaninfofileServiceImpl extends ServiceImpl<HuzhouPlaninfofil
String userid = map.get("value");
strings.add(userid);
}
if ("可研报告初稿编制".equals(taskName)) {
if ("可研报告初稿编制".equals(taskName) || "集中核验".equals(taskName) || "招标文件编制".equals(taskName)
|| "招标结果确认".equals(taskName) ) {
//审批通过但是要开始下一阶段流程
HuzhouPlaninfo huzhouPlaninfo = new HuzhouPlaninfo();
huzhouPlaninfo.setId(planinfoid);

Loading…
Cancel
Save