@@ -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.manage.ConstructionManage; | ||||
import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; | 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.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.SubmitConstructionReq; | ||||
import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; | import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; | ||||
import com.hz.pm.api.projectdeclared.model.vo.ContractVO; | import com.hz.pm.api.projectdeclared.model.vo.ContractVO; | ||||
@@ -3,6 +3,7 @@ package com.hz.pm.api.projectdeclared.controller; | |||||
import com.hz.pm.api.common.util.ExcelDownUtil; | import com.hz.pm.api.common.util.ExcelDownUtil; | ||||
import com.hz.pm.api.projectdeclared.manage.PurchaseManage; | 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.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.dto.XcfhxApplySaveDTO; | ||||
import com.hz.pm.api.projectdeclared.model.req.*; | import com.hz.pm.api.projectdeclared.model.req.*; | ||||
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq.PurchaseNoticeTenderDTO; | import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq.PurchaseNoticeTenderDTO; | ||||
@@ -130,13 +131,20 @@ public class PurchaseController { | |||||
return purchaseManage.detailXcfhxApply(id); | return purchaseManage.detailXcfhxApply(id); | ||||
} | } | ||||
@ApiOperation("新增系统") | |||||
@WebLog("新增系统") | |||||
@ApiOperation("新增系统(信创审符合性查信息)") | |||||
@WebLog("新增系统(信创审符合性查信息)") | |||||
@PostMapping("/add-system") | @PostMapping("/add-system") | ||||
public Long addSystem(@Validated @RequestBody XcfhxApplySaveDTO dto) { | public Long addSystem(@Validated @RequestBody XcfhxApplySaveDTO dto) { | ||||
return purchaseManage.addSystem(dto); | return purchaseManage.addSystem(dto); | ||||
} | } | ||||
@ApiOperation("编辑信创审符合性查信息") | |||||
@WebLog("编辑信创审符合性查信息") | |||||
@PostMapping("/update-system") | |||||
public Long updateSystem(@Validated @RequestBody XcfhxApplyEditDTO dto) { | |||||
return purchaseManage.updateSystem(dto); | |||||
} | |||||
@GetMapping("/xcfhxReportFiles/{code}") | @GetMapping("/xcfhxReportFiles/{code}") | ||||
@ApiOperation("获取信创文件预览") | @ApiOperation("获取信创文件预览") | ||||
public String xcfhxReportFiles(@PathVariable String code) { | public String xcfhxReportFiles(@PathVariable String code) { | ||||
@@ -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.DeclaredProjectExportDTO; | ||||
import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; | 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.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.entity.*; | ||||
import com.hz.pm.api.projectdeclared.model.req.SubmitConstructionReq; | 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.req.XcfhxApplyReq; | ||||
@@ -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.helper.MhXchxFileHelper; | ||||
import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; | 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.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.dto.XcfhxApplySaveDTO; | ||||
import com.hz.pm.api.projectdeclared.model.entity.*; | import com.hz.pm.api.projectdeclared.model.entity.*; | ||||
import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; | import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; | ||||
@@ -723,8 +724,12 @@ public class PurchaseManage { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public Long addSystem(XcfhxApplySaveDTO dto) { | public Long addSystem(XcfhxApplySaveDTO dto) { | ||||
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); | |||||
Xinchuang xinchuang = BeanUtil.copyProperties(dto, Xinchuang.class); | Xinchuang xinchuang = BeanUtil.copyProperties(dto, Xinchuang.class); | ||||
xinchuang.setSourceType(PurchaseSourceTypeEnum.MANUAL_ADDITION.getCode()); | xinchuang.setSourceType(PurchaseSourceTypeEnum.MANUAL_ADDITION.getCode()); | ||||
xinchuang.setBuildOrgCode(userFullInfo.getMhUnitIdStr()); | |||||
xinchuang.setBuildOrgName(userFullInfo.getMhUnitName()); | |||||
if(xinchuangService.save(xinchuang)){ | if(xinchuangService.save(xinchuang)){ | ||||
if (Boolean.TRUE.equals(dto.getMatchXcfhx())) { | if (Boolean.TRUE.equals(dto.getMatchXcfhx())) { | ||||
if (StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { | if (StrUtils.isNotBlank(dto.getMhXcfhxReportFile())) { | ||||
@@ -737,6 +742,19 @@ public class PurchaseManage { | |||||
throw BizException.wrap("新增失败"); | 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) { | public String xcfhxReportFiles(String code) { | ||||
return mhXchxFileHelper.getXchxFile(code, null); | return mhXchxFileHelper.getXchxFile(code, null); | ||||
} | } | ||||
@@ -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; | |||||
} |
@@ -1,6 +1,5 @@ | |||||
package com.hz.pm.api.projectdeclared.model.dto; | 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.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
@@ -26,6 +26,12 @@ public class Xinchuang { | |||||
@ApiModelProperty("系统名称") | @ApiModelProperty("系统名称") | ||||
private String bidName; | private String bidName; | ||||
@ApiModelProperty("单位code") | |||||
private String buildOrgCode; | |||||
@ApiModelProperty("单位名称") | |||||
private String buildOrgName; | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@TableField(fill = FieldFill.INSERT) | @TableField(fill = FieldFill.INSERT) | ||||
private LocalDateTime createOn; | private LocalDateTime createOn; | ||||
@@ -301,9 +301,10 @@ public class TodoCenterManage { | |||||
if(Objects.nonNull(xinchuang)){ | if(Objects.nonNull(xinchuang)){ | ||||
res.setXinchuangId(xinchuang.getId()); | res.setXinchuangId(xinchuang.getId()); | ||||
res.setProjectName(xinchuang.getProjectName()); | res.setProjectName(xinchuang.getProjectName()); | ||||
res.setBuildOrg(xinchuang.getBuildOrgName()); | |||||
res.setBuildOrgCode(xinchuang.getBuildOrgCode()); | |||||
} | } | ||||
res.setInstCode(d.getInstanceId()); | res.setInstCode(d.getInstanceId()); | ||||
res.setBuildOrg(userFullInfo.getMhUnitName()); | |||||
ProcessTaskVo taskVo = taskMap.get(d.getNodeId()); | ProcessTaskVo taskVo = taskMap.get(d.getNodeId()); | ||||
res.setNodeId(d.getNodeId()); | res.setNodeId(d.getNodeId()); | ||||
res.setProcessStatusName(taskVo.getStatus()); | res.setProcessStatusName(taskVo.getStatus()); | ||||
@@ -970,9 +971,10 @@ public class TodoCenterManage { | |||||
if(Objects.nonNull(xinchuang)){ | if(Objects.nonNull(xinchuang)){ | ||||
res.setXinchuangId(xinchuang.getId()); | res.setXinchuangId(xinchuang.getId()); | ||||
res.setProjectName(xinchuang.getProjectName()); | res.setProjectName(xinchuang.getProjectName()); | ||||
res.setBuildOrg(xinchuang.getBuildOrgName()); | |||||
res.setBuildOrgCode(xinchuang.getBuildOrgCode()); | |||||
} | } | ||||
res.setInstCode(d.getInstanceId()); | res.setInstCode(d.getInstanceId()); | ||||
res.setBuildOrg(userFullInfo.getMhUnitName()); | |||||
res.setProcessStatusName(d.getStatus()); | res.setProcessStatusName(d.getStatus()); | ||||
res.setProcessLaunchTime(d.getCreateTime()); | res.setProcessLaunchTime(d.getCreateTime()); | ||||
res.setProcessHandleTime(d.getTaskEndTime()); | res.setProcessHandleTime(d.getTaskEndTime()); | ||||
@@ -1173,9 +1175,10 @@ public class TodoCenterManage { | |||||
if(Objects.nonNull(xinchuang)){ | if(Objects.nonNull(xinchuang)){ | ||||
res.setXinchuangId(xinchuang.getId()); | res.setXinchuangId(xinchuang.getId()); | ||||
res.setProjectName(xinchuang.getProjectName()); | res.setProjectName(xinchuang.getProjectName()); | ||||
res.setBuildOrg(xinchuang.getBuildOrgName()); | |||||
res.setBuildOrgCode(xinchuang.getBuildOrgCode()); | |||||
} | } | ||||
res.setInstCode(d.getInstanceId()); | res.setInstCode(d.getInstanceId()); | ||||
res.setBuildOrg(userFullInfo.getMhUnitName()); | |||||
res.setProcessStatusName(d.getStatus()); | res.setProcessStatusName(d.getStatus()); | ||||
res.setProcessLaunchTime(d.getStartTime()); | res.setProcessLaunchTime(d.getStartTime()); | ||||
return res; | return res; | ||||