From 062b1245a57d4e8a1e04a62efbc7d872e36eb073 Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期二, 10 十二月 2024 18:11:37 +0800
Subject: [PATCH] bug
---
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 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 308304b..420ff76 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -4,6 +4,7 @@
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.excel.EasyExcel;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -23,6 +24,7 @@
import com.ycl.domain.entity.*;
import com.ycl.domain.excel.ProjectExcelTemplate;
import com.ycl.domain.form.DocumentInfoForm;
+import com.ycl.domain.form.PlanForm;
import com.ycl.domain.form.ProjectInfoForm;
import com.ycl.domain.query.ProjectExportQuery;
import com.ycl.domain.query.ProjectInfoQuery;
@@ -69,6 +71,7 @@
private final ProjectUnitRegistrationInfoMapper unitRegistrationInfoMapper;
private final FileService fileService;
private final FileMapper fileMapper;
+ private final PlanMapper planMapper;
/**
* 娣诲姞
@@ -85,6 +88,7 @@
entity.setCreateBy(userId);
entity.setUpdateBy(userId);
baseMapper.insert(entity);
+ addPlan(entity.getId()); //娣诲姞璁″垝琛�
//娣诲姞鏂囦欢
List<File> fileList = form.getFileList();
fileList.forEach(item -> {
@@ -93,6 +97,17 @@
});
fileService.saveBatch(fileList);
return Result.ok("娣诲姞鎴愬姛").data(entity.getId());
+ }
+
+ public void addPlan(Long projectInfoId) {
+ Plan plan = new Plan();
+ plan.setProjectInfoId(projectInfoId);
+ plan.setReportStatus(1);
+ plan.setMonthStatus(1);
+ plan.setSeasonStatus(1);
+ plan.setYearStatus(1);
+ plan.setDeleted(0);
+ planMapper.insert(plan);
}
/**
@@ -389,6 +404,9 @@
ProjectInfo projectInfo = baseMapper.selectById(recordId);
// 鍒ゆ柇褰撳墠鐢ㄦ埛id鏄惁鍦ㄤ富绠″垪琛ㄤ腑
String competentDepartment = projectInfo.getCompetentDepartment();
+ if (StringUtils.isEmpty(competentDepartment)){
+ return Result.ok().data(false);
+ }
List<String> list = Arrays.asList(competentDepartment.split(","));
// 鑾峰緱褰撳墠鐢ㄦ埛id
Long userId = SecurityUtils.getUserId();
--
Gitblit v1.8.0