From 7be1cd12e081cad2942c02b4c287d2562274d15f Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 01 三月 2024 08:03:51 +0800
Subject: [PATCH] 订单相关程序

---
 north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java |  106 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 105 insertions(+), 1 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
index 5713972..6fd4571 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -1,11 +1,18 @@
 package com.example.erp.controller.pp;
+
+import com.example.erp.common.Constants;
 import com.example.erp.entity.pp.FlowCard;
+import com.example.erp.entity.sd.Order;
 import com.example.erp.common.Result;
+import com.example.erp.entity.sd.OrderDetail;
+import com.example.erp.entity.sd.OrderGlassDetail;
+import com.example.erp.exception.ServiceException;
 import com.example.erp.service.pp.FlowCardService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.sql.Date;
+import java.util.Map;
 
 @RestController
 @RequestMapping("/processCard")
@@ -13,11 +20,108 @@
     @Autowired
     FlowCardService flowCardService;
 
-    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}}")
+    //娴佺▼鍗$鐞嗘煡璇�
+    @PostMapping  ("/flowCard/{selectTime1}/{selectTime2}")
     public Result DateProcess(
             @PathVariable Date selectTime1,
             @PathVariable Date selectTime2,
             @RequestBody FlowCard  flowCard){
         return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard));
+        
     }
+
+    //鍒嗘灦鏌ヨ
+    @PostMapping  ("/selectAddProcess/{selectTime1}/{selectTime2}")
+    public Result SelectAddProcess(
+            @PathVariable Date selectTime1,
+            @PathVariable Date selectTime2,
+            @RequestBody FlowCard  flowCard){
+    //    System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString());
+        return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard));
+
+    }
+
+    //鍒嗘灦鏄庣粏鏌ヨ
+    @PostMapping  ("/detailsSelect/{orderId}")
+
+    public Result DetailsSelect(
+            @PathVariable String orderId,
+            @RequestBody FlowCard flowCard){
+        return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard));
+
+    }
+
+
+    //鍒犻櫎宸ュ崟
+    @PostMapping("/deleteFlowCard/{orderId}/{processId}")
+    public Result deleteOrderWork(
+            @PathVariable String orderId,
+            @PathVariable String processId
+    ){
+        if(flowCardService.DeleteFlowCardSv(orderId,processId)){
+            return Result.seccess();
+        }else {
+            throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触");
+
+        }
+    }
+
+    //淇敼鎺掔増鐘舵��
+    @PostMapping("/updateLayoutStatus/{processId}")
+    public Result updateLayoutStatus(
+            @PathVariable String processId
+    ){
+        System.out.println(flowCardService.UpdateLayoutStatusSv(processId));
+        if(flowCardService.UpdateLayoutStatusSv(processId)){
+            return Result.seccess();
+        }else {
+            throw new ServiceException(Constants.Code_500,"淇敼澶辫触");
+
+        }
+    }
+
+    //鍒嗘灦鏂板鏄庣粏鏌ヨ
+    @PostMapping  ("/selectNoCard/{orderId}/{productionId}")
+    public Result SelectNoCard(
+            @PathVariable String orderId,
+            @PathVariable String productionId,
+            @RequestBody FlowCard flowCard){
+        return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard));
+
+    }
+
+    //娣诲姞娴佺▼鍗�
+    @PostMapping("/addFlowCard")
+    public Result AddOrderWork( @RequestBody Map<String,Object> object){
+        System.out.println("obj:"+object);
+        if(flowCardService.AddFlowCardSv(object)){
+            return Result.seccess();
+        }else {
+            throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触");
+
+        }
+    }
+
+    //鏌ヨ绗竴娆℃帓鐗堟暟鎹�
+    @PostMapping  ("/selectLastScheduling/{selectTime1}/{selectTime2}")
+    public Result selectLastScheduling(
+            @PathVariable String selectTime1,
+            @PathVariable String selectTime2,
+            @RequestBody FlowCard flowCard){
+        return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard));
+
+    }
+    //鏌ヨ鎺掔増鏁版嵁
+    @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));
+
+    }
+
 }

--
Gitblit v1.8.0