From d35d14bc183e7275e79cb64537ce28dc83f271f0 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期一, 13 五月 2024 10:53:30 +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/mm/FinishedGoodsInventoryController.java | 110 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 92 insertions(+), 18 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 c938e49..0b1f5ef 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 @@ -2,6 +2,7 @@ +import cn.dev33.satoken.annotation.SaCheckPermission; import com.example.erp.common.Constants; import com.example.erp.common.Result; import com.example.erp.entity.mm.FinishedOperateLog; @@ -9,6 +10,8 @@ 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; @@ -19,26 +22,33 @@ @RestController @RequestMapping("/FinishedGoodsInventory") +@Api(value="鎴愬搧搴撳瓨controller",tags={"鎴愬搧搴撳瓨鎿嶄綔鎺ュ彛"}) public class FinishedGoodsInventoryController { @Autowired FinishedGoodsInventoryService finishedGoodsInventoryService; /*鎴愬搧搴撳瓨鏌ヨ*/ - @PostMapping("/getselet/{pageNum}/{pageSize}") + @ApiOperation("鎴愬搧搴撳瓨鏌ヨ鎺ュ彛") + @SaCheckPermission("ProductStockList.search") + @PostMapping("/getSelect/{pageNum}/{pageSize}") public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory 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){ - return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard)); + @ApiOperation("鍙叆搴撶殑鎴愬搧鏌ヨ鎺ュ彛") + @SaCheckPermission("CreateProductStock.search") + @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,Object> object){ - if(finishedGoodsInventoryService.addseletwarehousing(object)){ + @ApiOperation("鎴愬搧鍏ュ簱鎺ュ彛") + @SaCheckPermission("CreateProductStock.add") + @PostMapping("/addSelectWarehousing") + public Result addSelectWarehousing( @RequestBody Map<String,Object> object){ + if(finishedGoodsInventoryService.addSelectWarehousing(object)){ return Result.seccess(); }else { throw new ServiceException(Constants.Code_500,"鍏ュ簱澶辫触"); @@ -47,15 +57,19 @@ } /*鏌ヨ鍙彂璐х殑鎴愬搧鏁版嵁*/ - @PostMapping("/getseletdeliveryDetail/{pageNum}/{pageSize}") - public Result getseletdeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ - return Result.seccess(finishedGoodsInventoryService.getseletdeliveryDetail(pageNum,pageSize,orderDetail)); + @ApiOperation("鍙彂璐х殑鎴愬搧鏌ヨ鎺ュ彛") + @SaCheckPermission("FinishedProductOut.search") + @PostMapping("/getSelectDeliveryDetail/{pageNum}/{pageSize}") + public Result getSelectDeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ + return Result.seccess(finishedGoodsInventoryService.getSelectDeliveryDetail(pageNum,pageSize,orderDetail)); } /*鎴愬搧鍙戣揣*/ - @PostMapping("/adddeliveryDetail") - public Result adddeliveryDetail( @RequestBody Map<String,Object> object){ - if(finishedGoodsInventoryService.adddeliveryDetail(object)){ + @ApiOperation("鎴愬搧鍙戣揣鎺ュ彛") + @SaCheckPermission("FinishedProductOut.add") + @PostMapping("/addDeliveryDetail") + public Result addDeliveryDetail( @RequestBody Map<String,Object> object){ + if(finishedGoodsInventoryService.addDeliveryDetail(object)){ return Result.seccess(); }else { throw new ServiceException(Constants.Code_500,"鍑哄簱澶辫触"); @@ -64,12 +78,16 @@ } /* 璋冩嫧鏌ヨ*/ + @ApiOperation("鍙皟鎷ㄦ暟鎹煡璇㈡帴鍙�") + @SaCheckPermission("OrderAllocation.search") @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("璁㈠崟璋冩嫧鎺ュ彛") + @SaCheckPermission("OrderAllocation.add") @PostMapping("/updateFinishedGoodsInventoryAllocate") public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){ @@ -83,12 +101,16 @@ } /*璋冩嫧璁板綍鏌ヨ*/ - @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("璋冩嫧璁板綍鏌ヨ鎺ュ彛") + @SaCheckPermission("TransferRecord.search") + @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("璁㈠崟棰嗗嚭鎺ュ彛") + @SaCheckPermission("FinishedGoodsIssue.add") @PostMapping("/updateFinishedGoodsInventoryTakeOut") public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object> object){ @@ -102,12 +124,15 @@ } /*棰嗗嚭璁板綍鏌ヨ*/ + @ApiOperation("棰嗗嚭璁板綍鏌ヨ鎺ュ彛") + @SaCheckPermission("TakeOutRecord.search") @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){ @@ -123,6 +148,8 @@ /*璁㈠崟瀹℃牳*/ + @ApiOperation("璁㈠崟瀹℃牳鎺ュ彛") + @SaCheckPermission("TakeOutRecord.review") @PostMapping("/updateFinishedGoodsInventoryToExamine") public Result updateFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object> object){ @@ -135,8 +162,10 @@ } } /*璁㈠崟鍙嶅*/ - @PostMapping("/updateFinishedGoodsInventoryCounterexamination") - public Result updateFinishedGoodsInventoryCounterexamination( @RequestBody Map<String,Object> object){ + @ApiOperation("璁㈠崟鍙嶅鎺ュ彛") + @SaCheckPermission("TakeOutRecord.review") + @PostMapping("/updateFinishedGoodsInventoryCounterExamination") + public Result updateFinishedGoodsInventoryCounterExamination( @RequestBody Map<String,Object> object){ if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"鍙嶅")){ return Result.seccess(); @@ -146,4 +175,49 @@ } } + + /*璁㈠崟浣滃簾*/ + @ApiOperation("璁㈠崟浣滃簾鎺ュ彛") + @SaCheckPermission("TakeOutRecord.update") + @PostMapping("/cancelFinishedGoodsInventoryToExamine") + public Result cancelFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object> object){ + + if(finishedGoodsInventoryService.cancelFinishedGoodsInventoryToExamine(object)){ + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"棰嗗嚭澶辫触"); + + } + } + + /*鍑哄叆搴撹褰曟煡璇�*/ + @ApiOperation("鍑哄叆搴撹褰曟煡璇㈡帴鍙�") + @SaCheckPermission("storageRecord.search") + @PostMapping("/getSelectStorageRecord/{pageNum}/{pageSize}/{selectDate}/{type}") + public Result getSelectStorageRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@PathVariable String type, @RequestBody FinishedOperateLog finishedOperateLog){ + return Result.seccess(finishedGoodsInventoryService.getSelectStorageRecord(pageNum,pageSize,selectDate,type,finishedOperateLog)); + } + + /*鍑哄叆搴撹繑鍥�*/ + @ApiOperation("鍑哄叆搴撹繑鍥炴帴鍙�") + @SaCheckPermission("storageRecord.update") + @PostMapping("/cancelFinishedGoodsInventoryStorage") + public Result cancelFinishedGoodsInventoryStorage( @RequestBody Map<String,Object> object){ + + if(finishedGoodsInventoryService.cancelFinishedGoodsInventoryStorage(object)){ + return Result.seccess(); + + }else { + throw new ServiceException(Constants.Code_500,"杩斿洖澶辫触"); + + } + } + + @ApiOperation("鎴愬搧搴撳瓨璁板綍鏌ヨ鎺ュ彛") + @SaCheckPermission("WarehouseReport.search") + @PostMapping("/getSelectFinishedOperateLogReport/{pageNum}/{pageSize}/{selectDate}") + public Result getSelectFinishedOperateLogReport(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody FinishedOperateLog finishedOperateLog){ + return Result.seccess(finishedGoodsInventoryService.getSelectFinishedOperateLogReport(pageNum,pageSize,selectDate,finishedOperateLog)); + } } -- Gitblit v1.8.0