| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ReplenishService; |
| | | import com.example.erp.service.pp.ReworkService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="补片controller",tags={"补片操作接口"}) |
| | | @RequestMapping("/Replenish") |
| | | public class ReplenishController { |
| | | |
| | |
| | | |
| | | /*发货订单查询*/ |
| | | @ApiOperation("补片新增查询接口") |
| | | @SaCheckPermission("AddReplenish.search") |
| | | @PostMapping("/getSelectReplenish/{pageNum}/{pageSize}") |
| | | public Result getSelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize){ |
| | | return Result.seccess(replenishService.getSelectReplenish(pageNum,pageSize)); |
| | | } |
| | | |
| | | @ApiOperation("补片查询接口") |
| | | @SaCheckPermission("SelectReplenish.search") |
| | | @PostMapping("/SelectReplenish/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result SelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@RequestBody PatchLog patchLog){ |
| | | return Result.seccess(replenishService.SelectReplenish(pageNum,pageSize,selectDate,patchLog)); |
| | |
| | | |
| | | |
| | | @ApiOperation("补片新增接口") |
| | | @SaCheckPermission("AddReplenish.add") |
| | | @PostMapping("/saveReplenish") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(replenishService.saveReplenish(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"返工失败"); |
| | | |
| | | } |
| | | return Result.seccess(replenishService.saveReplenish(object)); |
| | | } |
| | | |
| | | @ApiOperation("订单调拨接口") |
| | | @ApiOperation("补片审核接口") |
| | | @SaCheckPermission("SelectReplenish.review") |
| | | @PostMapping("/updateReplenish") |
| | | public Result updateReplenish( @RequestBody Map<String,Object> object){ |
| | | if(replenishService.updateReplenish(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(replenishService.updateReplenish(object)); |
| | | } |
| | | } |