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 e08fd6b..e39ee20 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 @@ -727,13 +727,13 @@ public class PurchaseManage { public Long addSystem(XcfhxApplySaveDTO dto) { Xinchuang xinchuang = BeanUtil.copyProperties(dto, Xinchuang.class); xinchuang.setSourceType(PurchaseSourceTypeEnum.MANUAL_ADDITION.getCode()); - if(xinchuangService.save(xinchuang)){ - if (Boolean.TRUE.equals(dto.getMatchXcfhx())) { - if (StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { - String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; - xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); - } + if (Boolean.TRUE.equals(dto.getMatchXcfhx())) { + if (StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { + String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; + xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); } + } + if(xinchuangService.save(xinchuang)){ return xinchuang.getId(); } throw BizException.wrap("新增失败"); @@ -741,12 +741,12 @@ public class PurchaseManage { public Long updateSystem(XcfhxApplyEditDTO dto) { Xinchuang xinchuang = BeanUtil.copyProperties(dto, Xinchuang.class); + if (Boolean.TRUE.equals(dto.getMatchXcfhx()) && StrUtils.isNotBlank(dto.getMhXcfhxReportFile()) && + !dto.getMhXcfhxReportFile().equals(xinchuang.getMhXcfhxReportFile())) { + String fileName = xinchuang.getBidName() + "-信创符合性测评报告."; + xinchuang.setXcfhxReportFiles(mhXchxFileHelper.getXchxFile(dto.getMhXcfhxReportFile(), fileName)); + } 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("编辑失败"); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/XinchuangVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/XinchuangVO.java index 0c4cc99..ecb177e 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/XinchuangVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/XinchuangVO.java @@ -26,6 +26,12 @@ public class XinchuangVO { @ApiModelProperty("系统名称") private String bidName; + @ApiModelProperty("单位code") + private String buildOrgCode; + + @ApiModelProperty("单位名称") + private String buildOrgName; + @ApiModelProperty("创建时间") @TableField(fill = FieldFill.INSERT) private LocalDateTime createOn;