fuliqi
2025-02-19 f6f038ba68b51318fe558b94dee8b6ff96574f65
中标单位
2个文件已修改
21 ■■■■■ 已修改文件
business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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")
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) {