chenlu
2024-07-02 0d91c32f348565109b40c5e1c516bfdd28538bd3
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -19,7 +19,7 @@
import java.util.Map;
@RestController
@Api(value="流程卡controller",tags={"流程卡操作接口"})
@Api(value = "流程卡controller", tags = {"流程卡操作接口"})
@RequestMapping("/processCard")
public class ProcessCardController {
    @Autowired
@@ -28,36 +28,36 @@
    //流程卡管理查询
    @ApiOperation("流程卡管理查询接口")
    @SaCheckPermission("SelectProcessCard.search")
    @PostMapping  ("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}")
    @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}")
    public Result dateProcess(
            @PathVariable Integer pageNum,
            @PathVariable Integer pageSize,
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize, selectTime1, selectTime2, flowCard));
    }
    //分架查询
    @ApiOperation("分架查询接口")
    @SaCheckPermission("SelectAddProcess.search")
    @PostMapping  ("/selectAddProcess/{selectTime1}/{selectTime2}")
    @PostMapping("/selectAddProcess/{selectTime1}/{selectTime2}")
    public Result selectAddProcess(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @RequestBody FlowCard  flowCard){
        return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectAddProcess(selectTime1, selectTime2, flowCard));
    }
    //分架明细查询
    @ApiOperation("分架明细查询接口")
    @SaCheckPermission("SplittingDetails.search")
    @PostMapping  ("/detailsSelect/{orderId}")
    @PostMapping("/detailsSelect/{orderId}")
    public Result detailsSelect(
            @PathVariable String orderId,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.detailsSelectSv(orderId, flowCard));
    }
@@ -69,14 +69,14 @@
    public Result deleteOrderWork(
            @PathVariable String orderId,
            @PathVariable String processId
    ){
    ) {
//        if(flowCardService.deleteFlowCardSv(orderId,processId)){
//            return Result.seccess();
//        }else {
//            throw new ServiceException(Constants.Code_500,"删除失败,请检查是否已报工");
//
//        }
        return  Result.seccess(flowCardService.deleteFlowCardSv(orderId,processId));
        return Result.seccess(flowCardService.deleteFlowCardSv(orderId, processId));
    }
    //修改排版状态
@@ -86,23 +86,23 @@
    public Result updateLayoutStatus(
            @PathVariable String processId,
            @PathVariable Integer state
    ){
        if(flowCardService.updateLayoutStatusSv(processId,state)){
    ) {
        if (flowCardService.updateLayoutStatusSv(processId, state)) {
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"修改失败");
        } else {
            throw new ServiceException(Constants.Code_500, "修改失败");
        }
    }
    //分架新增明细查询
    @ApiOperation("分架明细新增接口")
    @PostMapping  ("/selectNoCard/{orderId}/{productionId}")
    @PostMapping("/selectNoCard/{orderId}/{productionId}")
    public Result SelectNoCard(
            @PathVariable String orderId,
            @PathVariable String productionId,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectNoCardSv(orderId, productionId, flowCard));
    }
@@ -110,90 +110,146 @@
    @ApiOperation("流程卡创建接口")
    @SaCheckPermission("AddProcessCard.add")
    @PostMapping("/addFlowCard")
    public Result AddOrderWork( @RequestBody Map<String,Object> object){
        if(flowCardService.addFlowCardSv(object)){
    public Result AddOrderWork(@RequestBody Map<String, Object> object) {
        if (flowCardService.addFlowCardSv(object)) {
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"保存失败");
        } else {
            throw new ServiceException(Constants.Code_500, "保存失败");
        }
    }
    //查询第一次排产数据
    @ApiOperation("排产界面加载查询接口")
    @PostMapping  ("/selectLastScheduling/{selectTime1}/{selectTime2}")
    @PostMapping("/selectLastScheduling/{selectTime1}/{selectTime2}")
    public Result selectLastScheduling(
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectLastScheduling(selectTime1, selectTime2, flowCard));
    }
    //查询排产数据
    @ApiOperation("排产点击按钮查询接口")
    @PostMapping  ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    @PostMapping("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    public Result selectScheduling(
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable String orderId,
            @PathVariable String processes,
            @PathVariable Integer state,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectSchedulingSv(selectTime1, selectTime2, orderId, processes, state, flowCard));
    }
    //流程卡明细查询
    @ApiOperation("流程卡明细查询接口")
    @SaCheckPermission("SelectDetailProcessCard.search")
    @PostMapping  ("/flowCardDetail/{processId}")
    @PostMapping("/flowCardDetail/{processId}")
    public Result flowCardDetail(
            @PathVariable String processId,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.flowCardDetailSv(processId,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.flowCardDetailSv(processId, flowCard));
    }
    @ApiOperation("流程卡打印查询接口")
    @SaCheckPermission("SelectPrintFlowCard.search")
    @PostMapping  ("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}")
    @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}")
    public Result selectPrintFlowCard(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2,
            @PathVariable String orderId,
            @PathVariable String project,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1,selectTime2,orderId,project,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project, flowCard));
    }
    @ApiOperation("流程卡明细查询接口")
    @SaCheckPermission("PrintFlowCard.search")
    @PostMapping  ("/selectPrint/{orderId}")
    @PostMapping("/selectPrint/{orderId}")
    public Result selectPrint(
            @PathVariable String orderId,
            @RequestBody FlowCard flowCard){
        return Result.seccess(flowCardService.selectPrintSv(orderId,flowCard));
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.selectPrintSv(orderId, flowCard));
    }
    @ApiOperation("打印流程卡数据查询接口")
    @PostMapping("/getSelectPrinting")
    public Result getSelectPrinting( @RequestBody Map<String,Object> object){
    public Result getSelectPrinting(@RequestBody Map<String, Object> object) {
        return Result.seccess(flowCardService.getSelectPrintingSv(object));
    }
    @ApiOperation("打印标签数据查询接口")
    @PostMapping("/getSelectPrintLabel")
    public Result getSelectPrintLabel( @RequestBody Map<String,Object> object){
        return Result.seccess(flowCardService.getSelectPrintLabelSv(object));
    @PostMapping("/getSelectPrintLabel/{projectNo}")
    public Result getSelectPrintLabel(@PathVariable String projectNo) {
        return Result.seccess(flowCardService.getSelectPrintLabelSv(projectNo));
    }
    @ApiOperation("打印标签查询接口")
    @PostMapping("/getSelectPrintLabel1")
    public Result getSelectPrintLabel1(@RequestBody Map<String, Object> object) {
        return Result.seccess(flowCardService.getSelectPrintLabelSv1(object));
    }
    @ApiOperation("打印自定义标签数据查询接口")
    @PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}")
    public Result getSelectPrintCustomLabel( @PathVariable String type,
                                             @PathVariable Integer lableType,
                                             @RequestBody Map<String, Object> object) {
        return Result.seccess(flowCardService.getSelectPrintCustomLabelSv(type,lableType,object));
    }
    @ApiOperation("复选框修改排版状态")
    @SaCheckPermission("SelectProcessCard.review")
    @PostMapping("/updateComposing")
    public Result updateComposing(
            @RequestBody Map<String,Object>  object
    ){
            @RequestBody Map<String, Object> object
    ) {
        return  Result.seccess(flowCardService.updateComposingSv(object));
        return Result.seccess(flowCardService.updateComposingSv(object));
    }
    @ApiOperation("流程卡打印明细数据排序查询接口")
    @PostMapping("/printFlowCardDetails/{processId}/{technologyNumber}")
    public Result printFlowCardDetails(@PathVariable String processId,
                                       @PathVariable String technologyNumber,
                                       @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.printFlowCardDetailsSv(processId, technologyNumber, flowCard));
    }
    @ApiOperation("保存打印排序接口")
    @PostMapping("/printSort")
    public Result printSort(@RequestBody Map<String, Object> object) {
        if (flowCardService.printSortSv(object)) {
            return Result.seccess();
        } else {
            throw new ServiceException(Constants.Code_500, "保存失败");
        }
    }
    @ApiOperation("自定义标签打印明细接口")
    @PostMapping("/getCustomLabelDetail/{name}/{form}/{id}")
    public Result getCustomLabelDetail(
            @PathVariable String name,
            @PathVariable String form,
            @PathVariable String id,
            @RequestBody FlowCard flowCard) {
        return Result.seccess(flowCardService.getCustomLabelDetailSv(name,form,id, flowCard));
    }
    @ApiOperation("工程打印查询接口")
    @SaCheckPermission("SelectPrintFlowCard.search")
    @PostMapping("/selectPrintPrintProject/{selectTime1}/{selectTime2}")
    public Result selectPrintFlowCard(
            @PathVariable Date selectTime1,
            @PathVariable Date selectTime2) {
        return Result.seccess(flowCardService.selectPrintFlowCard(selectTime1, selectTime2));
    }
}