| | |
| | | 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; |
| | |
| | | private final ProjectUnitRegistrationInfoMapper unitRegistrationInfoMapper; |
| | | private final FileService fileService; |
| | | private final FileMapper fileMapper; |
| | | private final PlanMapper planMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | |
| | | entity.setCreateBy(userId); |
| | | entity.setUpdateBy(userId); |
| | | baseMapper.insert(entity); |
| | | addPlan(entity.getId()); //添加计划表 |
| | | //添加文件 |
| | | List<File> fileList = form.getFileList(); |
| | | fileList.forEach(item -> { |
| | |
| | | }); |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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(); |