|
|
@@ -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); |
|
|
|
} |
|
|
|