| | |
| | | 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.dto.pp.ReworkDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | 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.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="返工controller",tags={"返工操作接口"}) |
| | | @RequestMapping("/rework") |
| | | public class ReworkController { |
| | | |
| | |
| | | |
| | | |
| | | /*发货订单查询*/ |
| | | @ApiOperation("发货订单查询接口") |
| | | @ApiOperation("可返工数据查询接口") |
| | | @SaCheckPermission("addRework.search") |
| | | @PostMapping("/getSelectRework/{pageNum}/{pageSize}") |
| | | public Result getSelectRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize){ |
| | | return Result.seccess(reworkService.getSelectRework(pageNum,pageSize)); |
| | | } |
| | | |
| | | @ApiOperation("发货订单查询接口") |
| | | @ApiOperation("返工数据查询接口") |
| | | @SaCheckPermission("selectRework.search") |
| | | @PostMapping("/SelectRework/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result SelectRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@RequestBody Rework rework){ |
| | | public Result SelectRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@RequestBody ReworkDTO rework){ |
| | | return Result.seccess(reworkService.SelectRework(pageNum,pageSize,selectDate,rework)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("订单调拨接口") |
| | | @ApiOperation("返工接口新增") |
| | | @SaCheckPermission("addRework.add") |
| | | @PostMapping("/saveRework") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(reworkService.saveRework(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"返工失败"); |
| | | |
| | | } |
| | | return Result.seccess(reworkService.saveRework(object)); |
| | | } |
| | | |
| | | @ApiOperation("订单调拨接口") |
| | | @ApiOperation("返工审核接口") |
| | | @SaCheckPermission("selectRework.review") |
| | | @PostMapping("/updateRework") |
| | | public Result updateRework( @RequestBody Map<String,Object> object){ |
| | | if(reworkService.updateRework(object)){ |
| | | return Result.seccess(reworkService.updateRework(object)); |
| | | } |
| | | |
| | | return Result.seccess(); |
| | | @ApiOperation("返工流程卡明细查询接口") |
| | | @SaCheckPermission("printReworkFlowCard.search") |
| | | @PostMapping("/selectPrint/{selectTime1}/{selectTime2}") |
| | | public Result selectPrint( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(reworkService.selectPrintSv(selectTime1,selectTime2, flowCard)); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | } |
| | | |
| | | } |
| | | @ApiOperation("返工删除接口") |
| | | @SaCheckPermission("selectRework.delete") |
| | | @PostMapping("/deleteRework") |
| | | public Result deleteRework( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(reworkService.deleteReworkSv(object)); |
| | | } |
| | | } |