diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java index dfdd089..c208158 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java @@ -4,6 +4,7 @@ import com.hz.pm.api.common.util.ExcelDownUtil; import com.hz.pm.api.projectdeclared.manage.ConstructionManage; import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; import com.hz.pm.api.projectdeclared.model.dto.PreInsSaveDTO; +import com.hz.pm.api.projectdeclared.model.dto.XcfhxApplySaveDTO; import com.hz.pm.api.projectdeclared.model.req.SubmitConstructionReq; import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; import com.hz.pm.api.projectdeclared.model.vo.ContractVO; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java index b016a02..4c7bf98 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/PurchaseController.java @@ -3,6 +3,7 @@ package com.hz.pm.api.projectdeclared.controller; import com.hz.pm.api.common.util.ExcelDownUtil; import com.hz.pm.api.projectdeclared.manage.PurchaseManage; import com.hz.pm.api.projectdeclared.model.dto.PurchaseSaveDTO; +import com.hz.pm.api.projectdeclared.model.dto.XcfhxApplyEditDTO; import com.hz.pm.api.projectdeclared.model.dto.XcfhxApplySaveDTO; import com.hz.pm.api.projectdeclared.model.req.*; import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq.PurchaseNoticeTenderDTO; @@ -130,13 +131,20 @@ public class PurchaseController { return purchaseManage.detailXcfhxApply(id); } - @ApiOperation("新增系统") - @WebLog("新增系统") + @ApiOperation("新增系统(信创审符合性查信息)") + @WebLog("新增系统(信创审符合性查信息)") @PostMapping("/add-system") public Long addSystem(@Validated @RequestBody XcfhxApplySaveDTO dto) { return purchaseManage.addSystem(dto); } + @ApiOperation("编辑信创审符合性查信息") + @WebLog("编辑信创审符合性查信息") + @PostMapping("/update-system") + public Long updateSystem(@Validated @RequestBody XcfhxApplyEditDTO dto) { + return purchaseManage.updateSystem(dto); + } + @GetMapping("/xcfhxReportFiles/{code}") @ApiOperation("获取信创文件预览") public String xcfhxReportFiles(@PathVariable String code) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java index 61ec763..42da514 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java @@ -22,6 +22,7 @@ import com.hz.pm.api.projectdeclared.helper.MhXchxFileHelper; import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; import com.hz.pm.api.projectdeclared.model.dto.PreInsSaveDTO; +import com.hz.pm.api.projectdeclared.model.dto.XcfhxApplySaveDTO; import com.hz.pm.api.projectdeclared.model.entity.*; import com.hz.pm.api.projectdeclared.model.req.SubmitConstructionReq; import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java index 778ea12..041e072 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java @@ -30,6 +30,7 @@ import com.hz.pm.api.external.model.dto.MhPurchaseNoticeDTO; import com.hz.pm.api.projectdeclared.helper.MhXchxFileHelper; import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; import com.hz.pm.api.projectdeclared.model.dto.PurchaseSaveDTO; +import com.hz.pm.api.projectdeclared.model.dto.XcfhxApplyEditDTO; import com.hz.pm.api.projectdeclared.model.dto.XcfhxApplySaveDTO; import com.hz.pm.api.projectdeclared.model.entity.*; import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; @@ -723,8 +724,12 @@ public class PurchaseManage { * @return */ public Long addSystem(XcfhxApplySaveDTO dto) { + UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); + Xinchuang xinchuang = BeanUtil.copyProperties(dto, Xinchuang.class); xinchuang.setSourceType(PurchaseSourceTypeEnum.MANUAL_ADDITION.getCode()); + xinchuang.setBuildOrgCode(userFullInfo.getMhUnitIdStr()); + xinchuang.setBuildOrgName(userFullInfo.getMhUnitName()); if(xinchuangService.save(xinchuang)){ if (Boolean.TRUE.equals(dto.getMatchXcfhx())) { if (StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { @@ -737,6 +742,19 @@ public class PurchaseManage { throw BizException.wrap("新增失败"); } + public Long updateSystem(XcfhxApplyEditDTO dto) { + Xinchuang xinchuang = BeanUtil.copyProperties(dto, Xinchuang.class); + if(xinchuangService.updateById(xinchuang)){ + if (Boolean.TRUE.equals(dto.getMatchXcfhx()) && StrUtils.isNotBlank(dto.getMhXcfhxReportFile()) && + !dto.getMatchXcfhx().equals(xinchuang.getMatchXcfhx())) { + String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; + xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); + } + return xinchuang.getId(); + } + throw BizException.wrap("编辑失败"); + } + public String xcfhxReportFiles(String code) { return mhXchxFileHelper.getXchxFile(code, null); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplyEditDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplyEditDTO.java new file mode 100644 index 0000000..c10b2f3 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplyEditDTO.java @@ -0,0 +1,53 @@ +package com.hz.pm.api.projectdeclared.model.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * @Classname XcfhxApplyEditDTO + * @Description + * @Date 2024/7/2 15:38 + * @Author PoffyZhang + */ +@Data +@ApiModel(value = "信创审查对象", description = "采购对象") +@AllArgsConstructor +public class XcfhxApplyEditDTO { + @ApiModelProperty("系统名称") + @NotNull(message = "编辑时id必传") + private Long id; + + + @ApiModelProperty("系统名称") + private String bidName; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("信创符合性测评报告文件") + private String mhXcfhxReportFile; + + @ApiModelProperty("信创符合性测评记录ID") + private String mhXcfhxReportRecordId; + + @ApiModelProperty("是否符合信创符合性要求") + @NotNull(message = "复合型要求必填") + private Boolean matchXcfhx; + + @ApiModelProperty("信创符合性申请备注") + private String xcfhxApplyRemark; + + @ApiModelProperty("信创符合性申请其他附件") + private String xcfhxApplyFiles; + + @ApiModelProperty("信创报告") + private String xcfhxReportFiles; + + @ApiModelProperty("资源类型 1手动新增 2系统生成 3大数据局") + private Integer sourceType; +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplySaveDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplySaveDTO.java index 4bde769..59ed2db 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplySaveDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/XcfhxApplySaveDTO.java @@ -1,6 +1,5 @@ package com.hz.pm.api.projectdeclared.model.dto; -import com.hz.pm.api.projectdeclared.model.enumerization.PurchaseSourceTypeEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Xinchuang.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Xinchuang.java index 9b899bc..7d0a903 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Xinchuang.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Xinchuang.java @@ -26,6 +26,12 @@ public class Xinchuang { @ApiModelProperty("系统名称") private String bidName; + @ApiModelProperty("单位code") + private String buildOrgCode; + + @ApiModelProperty("单位名称") + private String buildOrgName; + @ApiModelProperty("创建时间") @TableField(fill = FieldFill.INSERT) private LocalDateTime createOn; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java index 7bb6565..deda1ae 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java @@ -301,9 +301,10 @@ public class TodoCenterManage { if(Objects.nonNull(xinchuang)){ res.setXinchuangId(xinchuang.getId()); res.setProjectName(xinchuang.getProjectName()); + res.setBuildOrg(xinchuang.getBuildOrgName()); + res.setBuildOrgCode(xinchuang.getBuildOrgCode()); } res.setInstCode(d.getInstanceId()); - res.setBuildOrg(userFullInfo.getMhUnitName()); ProcessTaskVo taskVo = taskMap.get(d.getNodeId()); res.setNodeId(d.getNodeId()); res.setProcessStatusName(taskVo.getStatus()); @@ -970,9 +971,10 @@ public class TodoCenterManage { if(Objects.nonNull(xinchuang)){ res.setXinchuangId(xinchuang.getId()); res.setProjectName(xinchuang.getProjectName()); + res.setBuildOrg(xinchuang.getBuildOrgName()); + res.setBuildOrgCode(xinchuang.getBuildOrgCode()); } res.setInstCode(d.getInstanceId()); - res.setBuildOrg(userFullInfo.getMhUnitName()); res.setProcessStatusName(d.getStatus()); res.setProcessLaunchTime(d.getCreateTime()); res.setProcessHandleTime(d.getTaskEndTime()); @@ -1173,9 +1175,10 @@ public class TodoCenterManage { if(Objects.nonNull(xinchuang)){ res.setXinchuangId(xinchuang.getId()); res.setProjectName(xinchuang.getProjectName()); + res.setBuildOrg(xinchuang.getBuildOrgName()); + res.setBuildOrgCode(xinchuang.getBuildOrgCode()); } res.setInstCode(d.getInstanceId()); - res.setBuildOrg(userFullInfo.getMhUnitName()); res.setProcessStatusName(d.getStatus()); res.setProcessLaunchTime(d.getStartTime()); return res;