|
|
@@ -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("编辑失败"); |
|
|
|