From f6f038ba68b51318fe558b94dee8b6ff96574f65 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 19 二月 2025 10:48:32 +0800
Subject: [PATCH] 中标单位
---
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
index 5cd0fe2..dba1856 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -105,7 +105,6 @@
ProjectInfo entity = ProjectInfoForm.getEntityByForm(form, null);
Long userId = SecurityUtils.getUserId();
Long deptId = SecurityUtils.getDeptId();
- List<ProjectInfoWinUnitForm> projectInfoWinUnitForm = form.getWinUnitList();
entity.setProjectOwnerUnit(deptId);
entity.setCreateBy(userId);
entity.setUpdateBy(userId);
@@ -124,7 +123,8 @@
fileService.saveBatch(fileList);
//娣诲姞椤圭洰涓爣鍗曚綅
- saveUnit(projectInfoWinUnitForm);
+ saveUnit(entity.getId(),form.getWinUnitList());
+
return Result.ok("娣诲姞鎴愬姛").data(entity.getId());
}
@@ -177,15 +177,16 @@
unitWrapper.eq("project_info_id",form.getId());
projectInfoWinUnitService.remove(unitWrapper);
//娣诲姞椤圭洰涓爣鍗曚綅
- saveUnit(projectInfoWinUnitForm);
+ saveUnit(entity.getId(),projectInfoWinUnitForm);
return Result.ok("淇敼鎴愬姛");
}
- private void saveUnit(List<ProjectInfoWinUnitForm> projectInfoWinUnitForm) {
+ private void saveUnit(Long id,List<ProjectInfoWinUnitForm> projectInfoWinUnitForm) {
List<ProjectInfoWinUnit> projectInfoWinUnits = new ArrayList<>();
for (ProjectInfoWinUnitForm winUnitForm : projectInfoWinUnitForm) {
ProjectInfoWinUnit projectInfoWinUnit = ProjectInfoWinUnitForm.getEntityByForm(winUnitForm, null);
+ projectInfoWinUnit.setProjectInfoId(id);
projectInfoWinUnits.add(projectInfoWinUnit);
}
if (!CollectionUtils.isEmpty(projectInfoWinUnits)) {
@@ -327,6 +328,8 @@
List<File> files = fileMapper.selectList(fileQueryWrapper);
vo.setFileList(files);
+
+ //涓爣鍗曚綅
List<ProjectInfoWinUnitVO> unitVOS = new ArrayList<>();
List<ProjectInfoWinUnit> unitList = projectInfoWinUnitService.list(new QueryWrapper<ProjectInfoWinUnit>().eq("project_info_id", id));
for (ProjectInfoWinUnit projectInfoWinUnit : unitList) {
--
Gitblit v1.8.0