| | |
| | | import cn.iocoder.yudao.module.mes.service.pro.workorder.MesProWorkOrderService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/calculate-duration") |
| | | @Operation(summary = "计算生产时长", description = "根据工作站绑定设备的生产效率和传送履带,自动计算生产时长(小时)") |
| | | @Parameters({ |
| | | @Parameter(name = "workstationId", description = "工作站编号", required = true), |
| | | @Parameter(name = "quantity", description = "排产数量", required = true) |
| | | }) |
| | | @PreAuthorize("@ss.hasPermission('mes:pro-task:query')") |
| | | public CommonResult<java.util.Map<String, Object>> calculateDuration( |
| | | @RequestParam("workstationId") Long workstationId, |
| | | @RequestParam("quantity") BigDecimal quantity) { |
| | | Integer duration = taskService.calculateDuration(workstationId, quantity); |
| | | return success(java.util.Map.of("duration", duration)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除生产任务") |
| | | @Parameter(name = "id", description = "编号", required = true) |