Przeglądaj źródła

临时计划审核添加附件上传

hexiao 2 lat temu
rodzic
commit
1d42c4c568

+ 2 - 2
purchase-system/src/main/java/com/ozs/plan/mapper/ProvisionalPlanMapper.java

@@ -17,9 +17,9 @@ public interface ProvisionalPlanMapper extends BaseMapper<ProvisionalPlan> {
 
     List<ProvisionalPlan> selectProjectName(String projectName);
 
-    int commitProvisionalPlan(Long planPracticalId);
+    int commitProvisionalPlan(@Param("planPracticalId") Long planPracticalId);
 
-    ProvisionalPlan seletById(Long planPracticalId);
+    ProvisionalPlan seletById(@Param("planPracticalId") Long planPracticalId);
 
     List<ProvisionalPlan> selectProvisionalPlan(ProvisionalPlanVo provisionalPlanVo);
 

+ 1 - 15
purchase-system/src/main/java/com/ozs/plan/service/impl/ProvisionalPlanServiceImpl.java

@@ -444,20 +444,6 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
             planYearsMapper.insertPlanYears(ofYears);
             byId.setPlanYearId(ofYears.getPlanYearId());
         }
-        // 添加审核附件
-        if (!ObjectUtils.isEmpty(provisionalPlanVo.getSysFileRefs())) {
-            provisionalPlanVo.getSysFileRefs().stream().forEach(fr -> {
-                SysFileRef sysFileRef = new SysFileRef();
-                sysFileRef.setFileId(fr.getFileId());
-                sysFileRef.setType(SysFileRefEnum.PLAN_TEMPORARY.getType());
-                sysFileRef.setRedId(byId.getPlanPracticalId());
-                sysFileRef.setCreated(provisionalPlanVo.getUpdated());
-                sysFileRef.setUpdated(sysFileRef.getCreated());
-                sysFileRef.setCreateTime(new Date());
-                sysFileRef.setUpdateTime(sysFileRef.getCreateTime());
-                sysFileRefMapper.insert(sysFileRef);
-            });
-        }
         PmDemand demand = new PmDemand();
         BeanUtils.copyProperties(byId, demand);
         demand.setPlanId(Long.valueOf(byId.getPlanPracticalId()));
@@ -485,7 +471,7 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
                 sysFileRefMapper.insert(ref);
             }
         }
-        byId.setProjectStatus(ProjectStatus.PLANTOEXAMINE.getCode());
+        provisionalPlanVo.setProjectStatus(ProjectStatus.PLANTOEXAMINE.getCode());
         //上传审核文件并赋予计划审核通过
         return review(provisionalPlanVo);
     }