| | |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.pd.techconfirm.vo.ProductTechConfirmAuditReqVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.pd.techconfirm.vo.ProductTechConfirmPageReqVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.pd.techconfirm.vo.ProductTechConfirmRespVO; |
| | | import cn.iocoder.yudao.module.mes.controller.admin.pd.techconfirm.vo.ProductTechConfirmSaveReqVO; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| | | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除产品技术确认函") |
| | | @Operation(summary = "删除产品技术确认函(仅草稿 / 审核不通过状态可删除)") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:pd-tech-confirm:delete')") |
| | | public CommonResult<Boolean> deleteTechConfirm(@RequestParam("id") Long id) { |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/submit-approval") |
| | | @Operation(summary = "提交技术确认函审核(草稿/审核不通过→待审核),审核人由审批配置统一指定") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:pd-tech-confirm:update')") |
| | | public CommonResult<Boolean> submitTechConfirmAudit(@RequestParam("id") Long id) { |
| | | techConfirmService.submitTechConfirmAudit(id); |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/audit") |
| | | @Operation(summary = "审核技术确认函(待审核→已审核/审核不通过),仅审批人本人可操作") |
| | | @PreAuthorize("@ss.hasPermission('mes:pd-tech-confirm:audit')") |
| | | public CommonResult<Boolean> auditTechConfirm(@Valid @RequestBody ProductTechConfirmAuditReqVO auditReqVO) { |
| | | techConfirmService.auditTechConfirm(auditReqVO.getId(), auditReqVO.getPass(), auditReqVO.getReviewRemark()); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/approver-ids") |
| | | @Operation(summary = "获得技术确认函的审核人编号集合,供前端判断是否展示审核按钮") |
| | | @PreAuthorize("@ss.hasPermission('mes:pd-tech-confirm:query')") |
| | | public CommonResult<Set<Long>> getApproverUserIds() { |
| | | return success(techConfirmService.getTechConfirmApproverUserIds()); |
| | | } |
| | | |
| | | @PutMapping("/customer-confirm") |
| | | @Operation(summary = "客户确认(已审核→客户已确认)") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @Parameter(name = "customerConfirmUser", description = "客户确认人姓名", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:pd-tech-confirm:update')") |
| | | public CommonResult<Boolean> confirmTechConfirmByCustomer(@RequestParam("id") Long id, |
| | | @RequestParam("customerConfirmUser") String customerConfirmUser) { |
| | | techConfirmService.confirmTechConfirmByCustomer(id, customerConfirmUser); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得产品技术确认函") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |