| | |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.dto.pp.FlowCardDTO; |
| | | import com.example.erp.dto.pp.TeamOutputDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | //流程卡管理查询 |
| | | @ApiOperation("流程卡管理查询接口") |
| | | @SaCheckPermission("selectProcessCard.search") |
| | | @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") |
| | | @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result dateProcess( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize, selectTime1, selectTime2, flowCard)); |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize,selectDate, flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | //添加流程卡 |
| | | @ApiOperation("流程卡创建接口") |
| | | @SaCheckPermission("addProcessCard.add") |
| | | @PostMapping("/addFlowCard") |
| | | public Result AddOrderWork(@RequestBody Map<String, Object> object) { |
| | | if (flowCardService.addFlowCardSv(object)) { |
| | | @PostMapping("/addFlowCard/{orderId}") |
| | | public Result AddOrderWork(@PathVariable String orderId,@RequestBody Map<String, Object> object) { |
| | | if (flowCardService.addFlowCardSv(orderId,object)) { |
| | | return Result.seccess(); |
| | | } else { |
| | | throw new ServiceException(Constants.Code_500, "保存失败"); |
| | |
| | | |
| | | @ApiOperation("流程卡打印查询接口") |
| | | @SaCheckPermission("selectPrintFlowCard.search") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}/{state}") |
| | | public Result selectPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String project, |
| | | @PathVariable String userId, |
| | | @PathVariable Integer state, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId, flowCard)); |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId,state, flowCard)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡明细查询接口") |
| | |
| | | } |
| | | |
| | | @ApiOperation("打印流程卡数据查询接口") |
| | | @PostMapping("/getSelectPrinting/{printMerge}/{printLike}") |
| | | @PostMapping("/getSelectPrinting/{printMerge}/{printLike}/{merge}/{flashback}/{compound}/{landingSequence}") |
| | | public Result getSelectPrinting( |
| | | @PathVariable String printMerge, |
| | | @PathVariable String printLike, |
| | | @PathVariable String merge, |
| | | @PathVariable String flashback, |
| | | @PathVariable String compound, |
| | | @PathVariable String landingSequence, |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintingSv(object,printMerge,printLike)); |
| | | return Result.seccess(flowCardService.getSelectPrintingSv(object,printMerge,printLike,merge,flashback,compound,landingSequence)); |
| | | } |
| | | |
| | | @ApiOperation("工程打印流程卡数据查询接口") |
| | | @PostMapping("/getSelectPrintProject/{printProject}/{merge}/{flashback}/{landingSequence}") |
| | | public Result getSelectPrintProject( |
| | | @PathVariable String printProject,@PathVariable String merge,@PathVariable String flashback,@PathVariable String landingSequence) { |
| | | return Result.seccess(flowCardService.getSelectPrintProject(printProject,merge,flashback,landingSequence)); |
| | | } |
| | | |
| | | @ApiOperation("打印标签数据查询接口") |
| | |
| | | return Result.seccess(flowCardService.getSelectPrintLabelDetails(object)); |
| | | } |
| | | |
| | | @ApiOperation("打印自定义标签数据查询接口") |
| | | @ApiOperation("打印自定义标签数据查询接口明细") |
| | | @PostMapping("/getSelectPrintCustomLabel/{type}/{lableType}") |
| | | public Result getSelectPrintCustomLabel( @PathVariable String type, |
| | | @PathVariable Integer lableType, |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintCustomLabelSv(type,lableType,object)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("打印自定义标签数据查询接口") |
| | | @PostMapping("/getSelectPrintCustomLabel2/{type}/{lableType}") |
| | | public Result getSelectPrintCustomLabel2( @PathVariable String type, |
| | | @PathVariable Integer lableType, |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintCustomLabelSv2(type,lableType,object)); |
| | | |
| | | } |
| | | |
| | |
| | | return Result.seccess(flowCardService.updateComposingSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("复选框撤销可排版状态") |
| | | @SaCheckPermission("selectProcessCard.review") |
| | | @PostMapping("/revokeComposing") |
| | | public Result revokeComposing( |
| | | @RequestBody Map<String, Object> object |
| | | ) { |
| | | |
| | | return Result.seccess(flowCardService.revokeComposingSv(object)); |
| | | } |
| | | @ApiOperation("流程卡打印明细数据排序查询接口") |
| | | @PostMapping("/printFlowCardDetails/{processId}/{technologyNumber}/{process}") |
| | | public Result printFlowCardDetails(@PathVariable String processId, |
| | |
| | | } |
| | | |
| | | @ApiOperation("合并流程卡接口") |
| | | @PostMapping("/mergeFlowCard") |
| | | public Result mergeFlowCard(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.mergeFlowCard(object)); |
| | | @PostMapping("/mergeFlowCard/{merge}") |
| | | public Result mergeFlowCard(@RequestBody Map<String, Object> object, |
| | | @PathVariable Integer merge) { |
| | | return Result.seccess(flowCardService.mergeFlowCard(object,merge)); |
| | | } |
| | | @ApiOperation("汉玻获取流程卡接口") |
| | | @PostMapping("/getProcessCardList/hanbo") |
| | | public Result getProcessCard(@RequestBody Map<String,String> processCards) { |
| | | return Result.seccess(flowCardService.getProcessCard(processCards)); |
| | | } |
| | | |
| | | @ApiOperation("获取流程卡接口") |
| | | @PostMapping("/getProcessCardList/all") |
| | | public Result getProcessCardAll(@RequestBody Map<String,String> processCards) { |
| | | return Result.seccess(flowCardService.getProcessCardAll(processCards)); |
| | | } |
| | | |
| | | @ApiOperation("复选框删除流程卡") |
| | |
| | | return Result.seccess(flowCardService.checkboxDeleteSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("工程明细打印查询") |
| | | @PostMapping("/selectPrintProjectDetails/{projectNo}") |
| | | public Result selectPrintProjectDetails( |
| | | @PathVariable String projectNo) { |
| | | return Result.seccess(flowCardService.getPrintProjectDetails(projectNo)); |
| | | |
| | | } |
| | | @ApiOperation("工程明细打印标签查询") |
| | | @PostMapping("/getPrintCustomDataProjectNoDetail/{type}/{detailType}") |
| | | public Result getPrintCustomDataProjectNoDetail( |
| | | @PathVariable String type, |
| | | @PathVariable Integer detailType, |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getPrintCustomDataProjectNoDetailSv(type,detailType,object)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("修改工艺流程") |
| | | @PostMapping("/updateProcess/{processId}/{technologyNumber}/{orderId}/{process}") |
| | | public Result updateProcess( |
| | | @PathVariable String processId, |
| | | @PathVariable String technologyNumber, |
| | | @PathVariable String orderId, |
| | | @PathVariable String process, |
| | | @RequestBody Map<String, Object> object |
| | | ) { |
| | | |
| | | return Result.seccess(flowCardService.updateProcessSv(processId,technologyNumber,orderId,process,object)); |
| | | } |
| | | |
| | | @ApiOperation("工程打印标签次数修改") |
| | | @PostMapping("/updateProjectLabelPrintCount/{projectNo}") |
| | | public Result updateProjectLabelPrintCount(@PathVariable String projectNo){ |
| | | return Result.seccess(flowCardService.updateProjectLabelPrintCount(projectNo)); |
| | | } |
| | | |
| | | @ApiOperation("工程打印标签次数修改") |
| | | @PostMapping("/updateProjectProcessPrintCount/{projectNo}") |
| | | public Result updateProjectProcessPrintCount(@PathVariable String projectNo){ |
| | | return Result.seccess(flowCardService.updateProjectProcessPrintCount(projectNo)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡合架") |
| | | @PostMapping("/flowCardDetail") |
| | | public Result flowCardDetail( |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.flowCardDetail(object)); |
| | | } |
| | | |
| | | @ApiOperation("保存流程卡合架") |
| | | @PostMapping("/updateProcessCardRack") |
| | | public Result updateProcessCardRack( |
| | | @RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.updateProcessCardRack(object)); |
| | | } |
| | | |
| | | @ApiOperation("智能分架") |
| | | @PostMapping("/processCardAutoRack") |
| | | public Result processCardAutoRack(@ RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.processCardAutoRack(object)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡查询导出") |
| | | @PostMapping("/exportDateProcess") |
| | | public void exportDateProcess(HttpServletResponse response, |
| | | @RequestBody Map<String, Object> dates |
| | | ) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, FlowCardDTO.class, flowCardService.exportDateProcessSv(dates), "DateProcess"); |
| | | } |
| | | } |