From f595d1fc19019f30bb1ee8729eb50aab8999f50f Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期四, 07 三月 2024 13:46:42 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override --- north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 90 insertions(+), 0 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java new file mode 100644 index 0000000..787be26 --- /dev/null +++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java @@ -0,0 +1,90 @@ +package com.example.erp.controller.pp; + +import com.example.erp.common.Constants; +import com.example.erp.common.Result; +import com.example.erp.entity.pp.ProductionScheduling; +import com.example.erp.exception.ServiceException; +import com.example.erp.service.pp.ProductionSchedulingService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.sql.Date; +import java.util.Map; + +@RestController +@RequestMapping("/productionScheduling") +public class ProductionSchedulingController { + @Autowired + ProductionSchedulingService productionSchedulingService; + + //鏌ヨ绗竴娆℃帓鐗堟暟鎹� + @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") + public Result selectLastScheduling( + @PathVariable String selectTime1, + @PathVariable String selectTime2, + @RequestBody ProductionScheduling productionScheduling){ + return Result.seccess(productionSchedulingService.selectLastScheduling(selectTime1,selectTime2,productionScheduling)); + + } + //鐐瑰嚮鏌ヨ鎺掔増鏁版嵁 + @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 ProductionScheduling productionScheduling){ + return Result.seccess(productionSchedulingService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); + + } + + //鐐瑰嚮鏌ヨ鎺掔増鏁版嵁锛堝甫璁㈠崟鍙锋煡璇級 + @PostMapping ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") + public Result selectSchedulingNot( + @PathVariable String selectTime1, + @PathVariable String selectTime2, + @PathVariable String orderId, + @PathVariable String processes, + @PathVariable Integer state, + @RequestBody ProductionScheduling productionScheduling){ + return Result.seccess(productionSchedulingService.selectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); + + } + + //娣诲姞鎺掍骇鏁版嵁 + @PostMapping("/addScheduling") + public Result AddScheduling( @RequestBody Map<String,Object> object){ + + if(productionSchedulingService.AddSchedulingSv(object)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"淇濆瓨澶辫触"); + + } + } + + //鍒犻櫎鎺掍骇鏁版嵁 + @PostMapping("/deleteScheduling") + public Result deleteScheduling( @RequestBody Map<String,Object> object) throws Exception{ + + if(productionSchedulingService.deleteSchedulingSv(object)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"鍒犻櫎澶辫触"); + + } + } + + @PostMapping("/examineScheduling") + public Result ExamineScheduling( @RequestBody Map<String,Object> object){ + + if(productionSchedulingService.ExamineSchedulingSv(object)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"瀹℃牳澶辫触"); + + } + } + +} -- Gitblit v1.8.0