From 9f87ca56f82c2352adbb7201a190ac944e6deeeb Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期五, 08 九月 2023 17:55:54 +0800
Subject: [PATCH] MOM系统-9-08

---
 production-server/src/main/java/com/yuanchu/mom/controller/ProductionPlanController.java |   67 ++++++++++++++++++++++++---------
 1 files changed, 49 insertions(+), 18 deletions(-)

diff --git a/production-server/src/main/java/com/yuanchu/mom/controller/ProductionPlanController.java b/production-server/src/main/java/com/yuanchu/mom/controller/ProductionPlanController.java
index 060d0a3..2b77136 100644
--- a/production-server/src/main/java/com/yuanchu/mom/controller/ProductionPlanController.java
+++ b/production-server/src/main/java/com/yuanchu/mom/controller/ProductionPlanController.java
@@ -1,42 +1,73 @@
 package com.yuanchu.mom.controller;
 
-import com.yuanchu.mom.service.ProductionPlanService;
+import com.yuanchu.mom.service.ManualTechnologyService;
+import com.yuanchu.mom.service.ManufactureOrderProcessService;
+import com.yuanchu.mom.service.ManufactureOrderService;
+import com.yuanchu.mom.service.ManufactureSchedulingService;
 import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
 
 @Api(tags = "鐢熶骇绠$悊-->鐢熶骇璁″垝")
 @RestController
 @RequestMapping("/productionPlan")
 public class ProductionPlanController {
 
-    @Resource
-    ProductionPlanService productionPlanService;
+    @Autowired
+    private ManualTechnologyService manualTechnologyService;
 
+    @Autowired
+    private ManufactureOrderService manufactureOrderService;
 
-    @ApiOperation(value = "鏌ヨ璁惧鍒楄〃")
-    @GetMapping("/selectAllDev")
-    public Result selectAllDev() {
-        return Result.success(productionPlanService.selectAllDev());
+    @Autowired
+    private ManufactureSchedulingService manufactureSchedulingService;
+
+    @Autowired
+    private ManufactureOrderProcessService manufactureOrderProcessService;
+
+    @ApiOperation(value = "浜岀骇鏍�")
+    @GetMapping("/tow_tree")
+    public Result<?> towTree() {
+        return Result.success(manufactureOrderService.towTree());
     }
 
-    @ApiOperation(value = "鏌ヨ鐢熶骇璁″垝鍒楄〃")
+    @ApiOperation(value = "鏌ョ湅鎺掍骇璇︽儏")
     @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "deviceId", value = "璁惧id", dataTypeClass = Integer.class, required = true),
-            @ApiImplicitParam(name = "orderCode", value = "璁㈠崟鍙�", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "name", value = "浜у搧鍚嶇О", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "startTime", value = "璁″垝寮�濮嬫棩鏈�", dataTypeClass = String.class),
-            @ApiImplicitParam(name = "endTime", value = "璁″垝缁撴潫鏃ユ湡", dataTypeClass = String.class)
+            @ApiImplicitParam(name = "schedulingId", value = "鎺掍骇id", dataTypeClass = Integer.class, required = true)
     })
-    @GetMapping("/selectAllPlan")
-    public Result selectAllPlan(Integer deviceId, String orderCode, String name, String startTime, String endTime) {
-        return Result.success(productionPlanService.selectAllPlan(deviceId,orderCode,name,startTime,endTime));
+    @GetMapping("/sePros")
+    public Result<?> sePros(Integer schedulingId) {
+        return Result.success(manufactureOrderService.sePros(schedulingId));
+    }
+
+    @ApiOperation(value = "鏍规嵁鐢熶骇璁㈠崟鏌ョ湅鐢熶骇璁″垝")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "manOrdId", value = "鐢熶骇璁㈠崟id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "productName", value = "浜у搧鍚嶇О", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "startTime", value = "寮�濮嬫棩鏈�", dataTypeClass = String.class),
+            @ApiImplicitParam(name = "endTime", value = "缁撴潫鏃ユ湡", dataTypeClass = String.class)
+    })
+    @GetMapping("/produceTable")
+    public Result<?> selectProduceTable(Integer manOrdId, String productName, String startTime, String endTime) {
+        return Result.success(manufactureSchedulingService.selectProduceTable(manOrdId, productName, startTime, endTime));
+    }
+
+    @ApiOperation(value = "鏌ョ湅鎺掍骇璇︽儏-->鍒囨崲淇敼鏃堕棿涓庡懆鏈�")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "technologyId", value = "宸ュ簭Id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "schedulingId", value = "鎺掍骇Id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "startTime", value = "寮�濮嬫椂闂�", dataTypeClass = String.class, required = true, dataType = "date"),
+            @ApiImplicitParam(name = "period", value = "鍛ㄦ湡", dataTypeClass = Integer.class, required = true)
+    })
+    @GetMapping("/update_time")
+    public Result<?> updateTime(Integer technologyId, Integer schedulingId, String startTime, Integer period) {
+        manufactureOrderProcessService.updateTime(technologyId, schedulingId, startTime, period);
+        return Result.success("鏇存柊鎴愬姛锛�");
     }
 }

--
Gitblit v1.9.3