@@ -38,14 +38,14 @@ public class ProjectStoppedChangeController { | |||||
@PostMapping("/stopped/submitApply") | @PostMapping("/stopped/submitApply") | ||||
@ApiOperation("提交项目终止申请") | @ApiOperation("提交项目终止申请") | ||||
@WebLog("提交项目终止申请") | @WebLog("提交项目终止申请") | ||||
public void submitProjectStoppedApply(@RequestBody @Valid SubmitProjectStoppedApplyReq req) { | |||||
public void submitStoppedApply(@RequestBody @Valid SubmitProjectStoppedApplyReq req) { | |||||
projectStoppedManage.submitProjectStoppedApply(req); | projectStoppedManage.submitProjectStoppedApply(req); | ||||
} | } | ||||
@PostMapping("/change/submitApply") | @PostMapping("/change/submitApply") | ||||
@ApiOperation("提交项目变更申请") | @ApiOperation("提交项目变更申请") | ||||
@WebLog("提交项目变更申请") | @WebLog("提交项目变更申请") | ||||
public void submitProjectChangeApply(@RequestBody @Valid SubmitProjectChangeApplyReq req) { | |||||
public void submitChangeApply(@RequestBody @Valid SubmitProjectChangeApplyReq req) { | |||||
projectChangeManage.submitProjectChangeApply(req); | projectChangeManage.submitProjectChangeApply(req); | ||||
} | } | ||||
@@ -70,12 +70,11 @@ public class ProjectStoppedChangeController { | |||||
return projectChangeManage.page(req); | return projectChangeManage.page(req); | ||||
} | } | ||||
@GetMapping("/change/detail/{projectCode}/{instCode}") | |||||
@GetMapping("/change/detail/{id}") | |||||
@ApiOperation("项目变更详情") | @ApiOperation("项目变更详情") | ||||
@WebLog("项目变更详情") | @WebLog("项目变更详情") | ||||
public ProjectChangeDetailVO changeDetail(@PathVariable("projectCode") String projectCode, | |||||
@PathVariable("instCode") String instCode) { | |||||
return projectChangeManage.changeDetail(projectCode, instCode); | |||||
public ProjectChangeDetailVO changeDetail(@PathVariable("id") Long id) { | |||||
return projectChangeManage.changeDetail(id); | |||||
} | } | ||||
@GetMapping("/change/options") | @GetMapping("/change/options") | ||||
@@ -134,7 +134,7 @@ public class ProjectChangeManage { | |||||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | ProcessStartParamsVo params = new ProcessStartParamsVo(); | ||||
params.setUser(declaredProjectHelper.buildUser(userDetail)); | params.setUser(declaredProjectHelper.buildUser(userDetail)); | ||||
params.setProcessUsers(Collections.emptyMap()); | params.setProcessUsers(Collections.emptyMap()); | ||||
params.setFormData(Collections.emptyMap()); | |||||
params.setFormData(BeanUtil.beanToMap(req)); | |||||
// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 | // 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 | ||||
Map<String, OrgInfoDTO> orgModelMap = declaredProjectHelper.buildOrgModelMap(userDetail, project); | Map<String, OrgInfoDTO> orgModelMap = declaredProjectHelper.buildOrgModelMap(userDetail, project); | ||||
@@ -154,7 +154,8 @@ public class ProjectChangeManage { | |||||
projectChangeHistory.setProjectCode(project.getProjectCode()); | projectChangeHistory.setProjectCode(project.getProjectCode()); | ||||
projectChangeHistory.setStatus(ProjectChangeStatus.ON_CHANGE_APPLY.getCode()); | projectChangeHistory.setStatus(ProjectChangeStatus.ON_CHANGE_APPLY.getCode()); | ||||
projectChangeHistory.setInstCode(instId); | projectChangeHistory.setInstCode(instId); | ||||
projectChangeHistoryService.save(projectChangeHistory); | |||||
projectChangeHistory.setId(req.getId()); | |||||
projectChangeHistoryService.saveOrUpdate(projectChangeHistory); | |||||
} | } | ||||
public PageVo<ProjectChangeListVO> page(ProjectListReq req) { | public PageVo<ProjectChangeListVO> page(ProjectListReq req) { | ||||
@@ -178,11 +179,8 @@ public class ProjectChangeManage { | |||||
return PageVo.of(data, page.getTotal()); | return PageVo.of(data, page.getTotal()); | ||||
} | } | ||||
public ProjectChangeDetailVO changeDetail(String projectCode, String instCode) { | |||||
LambdaQueryWrapper<ProjectChangeHistory> wrapper = Wrappers.lambdaQuery(ProjectChangeHistory.class) | |||||
.eq(ProjectChangeHistory::getProjectCode, projectCode) | |||||
.eq(ProjectChangeHistory::getInstCode, instCode); | |||||
ProjectChangeHistory changeHistory = projectChangeHistoryService.getOne(wrapper); | |||||
public ProjectChangeDetailVO changeDetail(Long id) { | |||||
ProjectChangeHistory changeHistory = projectChangeHistoryService.getById(id); | |||||
if (changeHistory == null) { | if (changeHistory == null) { | ||||
return null; | return null; | ||||
} | } | ||||
@@ -1,5 +1,6 @@ | |||||
package com.hz.pm.api.projectlib.manage; | package com.hz.pm.api.projectlib.manage; | ||||
import cn.hutool.core.bean.BeanUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
@@ -88,7 +89,7 @@ public class ProjectStoppedManage { | |||||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | ProcessStartParamsVo params = new ProcessStartParamsVo(); | ||||
params.setUser(declaredProjectHelper.buildUser(userDetail)); | params.setUser(declaredProjectHelper.buildUser(userDetail)); | ||||
params.setProcessUsers(Collections.emptyMap()); | params.setProcessUsers(Collections.emptyMap()); | ||||
params.setFormData(Collections.emptyMap()); | |||||
params.setFormData(BeanUtil.beanToMap(req)); | |||||
// 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 | // 获取发起单位、发起单位主管单位、发起单位上级主管条线单位信息 | ||||
Map<String, OrgInfoDTO> orgModelMap = declaredProjectHelper.buildOrgModelMap(userDetail, project); | Map<String, OrgInfoDTO> orgModelMap = declaredProjectHelper.buildOrgModelMap(userDetail, project); | ||||
@@ -15,6 +15,9 @@ import lombok.Data; | |||||
@Data | @Data | ||||
public class SubmitProjectChangeApplyReq { | public class SubmitProjectChangeApplyReq { | ||||
@ApiModelProperty("变更ID") | |||||
private Long id; | |||||
@ApiModelProperty("变更原因") | @ApiModelProperty("变更原因") | ||||
private String changeReason; | private String changeReason; | ||||