From 062822b57a29a767f2fbbd7cc1a8b1f6417cf966 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期五, 08 三月 2024 19:37:17 +0800 Subject: [PATCH] 修改工单管理、流程管理BUG --- north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java | 139 +++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 130 insertions(+), 9 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java b/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java index 6f36346..0daeba8 100644 --- a/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java +++ b/north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java @@ -4,41 +4,162 @@ import com.example.erp.common.Constants; import com.example.erp.common.Result; +import com.example.erp.entity.mm.FinishedOperateLog; import com.example.erp.entity.pp.FlowCard; +import com.example.erp.entity.sd.OrderDetail; import com.example.erp.exception.ServiceException; import com.example.erp.service.mm.FinishedGoodsInventoryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import com.example.erp.entity.mm.FinishedGoodsInventory; +import java.util.List; import java.util.Map; @RestController @RequestMapping("/FinishedGoodsInventory") +@Api(value="鎴愬搧搴撳瓨controller",tags={"鎴愬搧搴撳瓨鎿嶄綔鎺ュ彛"}) public class FinishedGoodsInventoryController { @Autowired FinishedGoodsInventoryService finishedGoodsInventoryService; - @PostMapping("/getselet/{pageNum}/{pageSize}") + /*鎴愬搧搴撳瓨鏌ヨ*/ + @ApiOperation("鎴愬搧搴撳瓨鏌ヨ鎺ュ彛") + @PostMapping("/getSelect/{pageNum}/{pageSize}") public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){ - System.out.println(finishedGoodsInventory); return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory)); } - @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}") - public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){ - System.out.println(flowCard); - return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard)); + /*鏌ヨ鍙叆搴撶殑鎴愬搧鏁版嵁*/ + @ApiOperation("鍙叆搴撶殑鎴愬搧鏌ヨ鎺ュ彛") + @PostMapping("/getSelectWarehousing/{pageNum}/{pageSize}") + public Result getSelectWarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){ + return Result.seccess(finishedGoodsInventoryService.getSelectWarehousing(pageNum,pageSize,flowCard)); } - @PostMapping("/addseletwarehousing") - public Result addseletwarehousing( @RequestBody Map<String,Map<String,Object>> object){ - if(finishedGoodsInventoryService.addseletwarehousing(object)){ + /*鎴愬搧鍏ュ簱*/ + @ApiOperation("鎴愬搧鍏ュ簱鎺ュ彛") + @PostMapping("/addSelectWarehousing") + public Result addSelectWarehousing( @RequestBody Map<String,Object> object){ + if(finishedGoodsInventoryService.addSelectWarehousing(object)){ return Result.seccess(); }else { throw new ServiceException(Constants.Code_500,"鍏ュ簱澶辫触"); } } + + /*鏌ヨ鍙彂璐х殑鎴愬搧鏁版嵁*/ + @ApiOperation("鍙彂璐х殑鎴愬搧鏌ヨ鎺ュ彛") + @PostMapping("/getSelectDeliveryDetail/{pageNum}/{pageSize}") + public Result getSelectDeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ + return Result.seccess(finishedGoodsInventoryService.getSelectDeliveryDetail(pageNum,pageSize,orderDetail)); + } + + /*鎴愬搧鍙戣揣*/ + @ApiOperation("鎴愬搧鍙戣揣鎺ュ彛") + @PostMapping("/addDeliveryDetail") + public Result addDeliveryDetail( @RequestBody Map<String,Object> object){ + if(finishedGoodsInventoryService.addDeliveryDetail(object)){ + return Result.seccess(); + }else { + throw new ServiceException(Constants.Code_500,"鍑哄簱澶辫触"); + + } + } + + /* 璋冩嫧鏌ヨ*/ + @ApiOperation("鍙皟鎷ㄦ暟鎹煡璇㈡帴鍙�") + @PostMapping("/getSelectAllocate/{pageNum}/{pageSize}") + public Result getSelectAllocate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ + return Result.seccess(finishedGoodsInventoryService.getSelectAllocate(pageNum,pageSize,orderDetail)); + } + + /*璁㈠崟璋冩嫧*/ + @ApiOperation("璁㈠崟璋冩嫧鎺ュ彛") + @PostMapping("/updateFinishedGoodsInventoryAllocate") + public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ + if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){ + + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"璋冩嫧澶辫触,璇锋鏌ヨ鍗曡緭鍏ユ槸鍚︽纭�"); + + } + } + + /*璋冩嫧璁板綍鏌ヨ*/ + @ApiOperation("璋冩嫧璁板綍鏌ヨ鎺ュ彛") + @PostMapping("/getSelectAllocateFinishedOperateLog/{pageNum}/{pageSize}/{selectDate}") + public Result getSelectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){ + return Result.seccess(finishedGoodsInventoryService.getSelectAllocateFinishedOperateLog(pageNum,pageSize,selectDate,finishedOperateLog)); + } + + /*璁㈠崟棰嗗嚭*/ + @ApiOperation("璁㈠崟棰嗗嚭鎺ュ彛") + @PostMapping("/updateFinishedGoodsInventoryTakeOut") + public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object> object){ + + if(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)){ + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触"); + + } + } + + /*棰嗗嚭璁板綍鏌ヨ*/ + @ApiOperation("棰嗗嚭璁板綍鏌ヨ鎺ュ彛") + @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}/{selectDate}") + public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){ + return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,selectDate,finishedOperateLog)); + } + + /*璁㈠崟杩斿伐*/ + @ApiOperation("璁㈠崟杩斿伐鏌ヨ鎺ュ彛") + @PostMapping("/updateFinishedGoodsInventoryRework") + public Result updateFinishedGoodsInventoryRework( @RequestBody Map<String,Object> object){ + + if(finishedGoodsInventoryService.updateFinishedGoodsInventoryRework(object)){ + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"杩斿伐澶辫触"); + + } + } + + + + /*璁㈠崟瀹℃牳*/ + @ApiOperation("璁㈠崟瀹℃牳鎺ュ彛") + @PostMapping("/updateFinishedGoodsInventoryToExamine") + public Result updateFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object> object){ + + if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"瀹℃牳")){ + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触"); + + } + } + /*璁㈠崟鍙嶅*/ + @ApiOperation("璁㈠崟鍙嶅鎺ュ彛") + @PostMapping("/updateFinishedGoodsInventoryCounterExamination") + public Result updateFinishedGoodsInventoryCounterExamination( @RequestBody Map<String,Object> object){ + + if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"鍙嶅")){ + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触"); + + } + } } -- Gitblit v1.8.0