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/domain/form/ProjectInfoForm.java         |   10 ++++++----
 business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java |   11 +++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java b/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
index dc76db7..a78db2f 100644
--- a/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
+++ b/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
@@ -78,11 +78,13 @@
     @ApiModelProperty("閲嶇偣鍒嗙被  (0鐪侀噸鐐归」鐩�,  1閬傚畞甯傞噸鐐归」鐩�,  2.灏勬椽甯傞噸鐐归」鐩�,  3.涓�鑸」鐩�)")
     private String importanceType;
 
-    @ApiModelProperty("骞村害鎶曡祫璁″垝")
-    private String year;
-
+//    @ApiModelProperty("骞村害鎶曡祫璁″垝")
+//    private String year;
+//
+//    @ApiModelProperty("骞村害鎶曡祫閲戦")
+//    private BigDecimal yearInvestAmount;
     @ApiModelProperty("骞村害鎶曡祫閲戦")
-    private BigDecimal yearInvestAmount;
+    private BigDecimal yearPlanList;
 
     @ApiModelProperty("绔嬮」鏃堕棿")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
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