| | |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | 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("/processCard") |
| | | public class ProcessCardController { |
| | | @Autowired |
| | | FlowCardService flowCardService; |
| | | |
| | | //流程卡管理查询 |
| | | @PostMapping ("/flowCard/{selectTime1}/{selectTime2}") |
| | | public Result DateProcess( |
| | | @ApiOperation("流程卡管理查询接口") |
| | | @PostMapping ("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") |
| | | public Result dateProcess( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard)); |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | //分架查询 |
| | | @ApiOperation("分架查询接口") |
| | | @PostMapping ("/selectAddProcess/{selectTime1}/{selectTime2}") |
| | | public Result SelectAddProcess( |
| | | public Result selectAddProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | // System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString()); |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | //分架明细查询 |
| | | @ApiOperation("分架明细查询接口") |
| | | @PostMapping ("/detailsSelect/{orderId}") |
| | | |
| | | public Result DetailsSelect( |
| | | public Result detailsSelect( |
| | | @PathVariable String orderId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard)); |
| | | return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard)); |
| | | |
| | | } |
| | | |
| | | |
| | | //删除工单 |
| | | @ApiOperation("删除工单接口") |
| | | @PostMapping("/deleteFlowCard/{orderId}/{processId}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String processId |
| | | ){ |
| | | if(flowCardService.DeleteFlowCardSv(orderId,processId)){ |
| | | if(flowCardService.deleteFlowCardSv(orderId,processId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | throw new ServiceException(Constants.Code_500,"删除失败,请检查是否已报工"); |
| | | |
| | | } |
| | | } |
| | | |
| | | //修改排版状态 |
| | | @PostMapping("/updateLayoutStatus/{processId}") |
| | | @ApiOperation("修改排版状态接口") |
| | | @PostMapping("/updateLayoutStatus/{processId}/{state}") |
| | | public Result updateLayoutStatus( |
| | | @PathVariable String processId |
| | | @PathVariable String processId, |
| | | @PathVariable Integer state |
| | | ){ |
| | | System.out.println(flowCardService.UpdateLayoutStatusSv(processId)); |
| | | if(flowCardService.UpdateLayoutStatusSv(processId)){ |
| | | if(flowCardService.updateLayoutStatusSv(processId,state)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"修改失败"); |
| | |
| | | } |
| | | |
| | | //分架新增明细查询 |
| | | @ApiOperation("分架明细新增接口") |
| | | @PostMapping ("/selectNoCard/{orderId}/{productionId}") |
| | | public Result SelectNoCard( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productionId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard)); |
| | | return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard)); |
| | | |
| | | } |
| | | |
| | | //添加流程卡 |
| | | @ApiOperation("流程卡创建接口") |
| | | @PostMapping("/addFlowCard") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | System.out.println("obj:"+object); |
| | | if(flowCardService.AddFlowCardSv(object)){ |
| | | if(flowCardService.addFlowCardSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | |
| | | } |
| | | } |
| | | |
| | | //查询第一次排版数据 |
| | | //查询第一次排产数据 |
| | | @ApiOperation("排产界面加载查询接口") |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | public Result selectLastScheduling( |
| | | @PathVariable String selectTime1, |
| | |
| | | return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | //查询排版数据 |
| | | //查询排产数据 |
| | | @ApiOperation("排产点击按钮查询接口") |
| | | @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result selectScheduling( |
| | | @PathVariable String selectTime1, |
| | |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | |
| | | } |
| | | |