package com.qianwen.smartman.modules.coproduction.controller;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiParam;
|
import java.util.List;
|
import javax.validation.Valid;
|
import com.qianwen.smartman.common.constant.ExtCacheConstant;
|
import com.qianwen.core.boot.ctrl.BladeController;
|
import com.qianwen.core.redis.lock.RedisLock;
|
import com.qianwen.core.scanner.modular.annotation.GetResource;
|
import com.qianwen.core.scanner.modular.annotation.PostResource;
|
import com.qianwen.core.scanner.modular.stereotype.ApiResource;
|
import com.qianwen.core.secure.annotation.PreAuth;
|
import com.qianwen.core.tool.api.R;
|
import com.qianwen.smartman.modules.coproduction.dto.IsEditDTO;
|
import com.qianwen.smartman.modules.coproduction.dto.ReportParallelProcessDTO;
|
import com.qianwen.smartman.modules.coproduction.dto.ReportWorkDTO;
|
import com.qianwen.smartman.modules.coproduction.service.IOrderProcessService;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessDetailVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessGeneralDetailVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessParallelDetailVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessRelationQueryVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessRelationVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessStartGeneralVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessStartParallelVO;
|
import com.qianwen.smartman.modules.coproduction.vo.OrderProcessStartResultVO;
|
import com.qianwen.smartman.modules.cps.vo.WorkstationInGroupVO;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@Api(value = "blade_order_process管理", tags = {"blade_order_process管理"})
|
@ApiResource({"blade-coproduction/order-process"})
|
@RestController
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/coproduction/controller/OrderProcessController.class */
|
public class OrderProcessController extends BladeController {
|
private final IOrderProcessService orderProcessService;
|
|
public OrderProcessController(final IOrderProcessService orderProcessService) {
|
this.orderProcessService = orderProcessService;
|
}
|
|
@ApiOperationSupport(order = 7)
|
@GetResource({"/start-detail-general"})
|
@ApiOperation("开工页面详情(非并行序)")
|
@PreAuth
|
public R<OrderProcessGeneralDetailVO> startDetailGeneral(@RequestParam("orderProcessId") @ApiParam("工单工序ID") String orderProcessId) {
|
return R.data(this.orderProcessService.startDetailGeneral(Long.valueOf(orderProcessId)));
|
}
|
|
@ApiOperationSupport(order = 8)
|
@PostResource({"/start-general"})
|
@RedisLock(value = ExtCacheConstant.OPEN_RECORD, param = "#orderProcessStartGeneralVO.orderProcessId")
|
@ApiOperation(value = "开工(非并行序)", notes = "传入orderProcessVO")
|
@PreAuth
|
public R<List<OrderProcessStartResultVO>> startGeneral(@Valid @RequestBody OrderProcessStartGeneralVO orderProcessStartGeneralVO) {
|
return R.data(this.orderProcessService.startGeneral(orderProcessStartGeneralVO));
|
}
|
|
@ApiOperationSupport(order = 9)
|
@GetResource({"/detail"})
|
@ApiOperation("工单工序详情")
|
@PreAuth
|
public R<List<OrderProcessDetailVO>> detail(String orderId) {
|
return R.data(this.orderProcessService.detail(Long.valueOf(orderId)));
|
}
|
|
@ApiOperationSupport(order = 10)
|
@GetResource({"/start-detail-parallel"})
|
@ApiOperation("开工页面详情(并行序)")
|
@PreAuth
|
public R<OrderProcessParallelDetailVO> startDetailParallel(@RequestParam("orderProcessId") @ApiParam("工单工序ID") String orderProcessId) {
|
return R.data(this.orderProcessService.startDetailParallel(Long.valueOf(orderProcessId)));
|
}
|
|
@ApiOperationSupport(order = 11)
|
@PostResource({"/start-parallel"})
|
@ApiOperation(value = "开工(并行序)", notes = "传入orderProcessVO")
|
@PreAuth
|
public R<List<OrderProcessStartResultVO>> startParallel(@Valid @RequestBody OrderProcessStartParallelVO orderProcessStartParallelVO) {
|
return R.data(this.orderProcessService.startParallel(orderProcessStartParallelVO));
|
}
|
|
@ApiOperationSupport(order = 13)
|
@PostResource({"/report-work"})
|
@ApiOperation(value = "报工(非并行序)", notes = "传入orderProcessVO")
|
@PreAuth
|
public R<Boolean> reportWork(@Valid @RequestBody ReportWorkDTO reportWorkDTO) {
|
Boolean result = this.orderProcessService.reportWork(reportWorkDTO);
|
this.orderProcessService.dealCompleteProcessSurplusRecords(reportWorkDTO.getOrderId());
|
return R.data(result);
|
}
|
|
@ApiOperationSupport(order = 14)
|
@PostResource({"/report-parallel"})
|
@ApiOperation(value = "报工(并行序)", notes = "传入parallelProcessDTO")
|
@PreAuth
|
public R<Boolean> reportParallel(@Valid @RequestBody ReportWorkDTO reportWorkDTO) {
|
return R.data(this.orderProcessService.reportParallel(reportWorkDTO));
|
}
|
|
@ApiOperationSupport(order = 15)
|
@PostResource({"/check-parallel-quality"})
|
@ApiOperation(value = "并行序主序可报工合格数量范围", notes = "传入parallelProcessDTO")
|
public R<Integer> checkParallelQualityNum(@Valid @RequestBody List<ReportParallelProcessDTO> parallelProcessDTO, IsEditDTO editDTO) {
|
return R.data(this.orderProcessService.parallelProcessAround(parallelProcessDTO, editDTO.getIsEdit()));
|
}
|
|
@ApiOperationSupport(order = 16)
|
@PostResource({"/get-relation"})
|
@ApiOperation("获取刀具、夹具信息")
|
@PreAuth
|
public R<OrderProcessRelationVO> getRelation(@Valid @RequestBody OrderProcessRelationQueryVO orderProcessRelationQueryVO) {
|
return R.data(this.orderProcessService.getRelation(orderProcessRelationQueryVO));
|
}
|
|
@ApiOperationSupport(order = 17)
|
@GetResource({"/tree-workstation"})
|
@ApiOperation("获取指派的工位组以及工位")
|
@PreAuth
|
public R<List<WorkstationInGroupVO>> treeWorkstation(Long planId, String processCode, Integer sort) {
|
return R.data(this.orderProcessService.treeWorkstation(planId, processCode, sort));
|
}
|
|
@ApiOperationSupport(order = 18)
|
@PostResource({"/child-stay-num"})
|
@ApiOperation(value = "获取并行序的待报工数量", notes = "传入parallelProcessDTO")
|
public R<Integer> getChildStayNum(@RequestParam("orderProcessId") Long orderProcessId) {
|
return R.data(this.orderProcessService.getChildReportNum(orderProcessId));
|
}
|
}
|