| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | |
| | | private SalesLedgerSchedulingServiceImpl salesLedgerSchedulingService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "生产管理-生产订单-分页查询", businessType = BusinessType.OTHER) |
| | | @ApiOperation("生产管理-生产订单-分页查询") |
| | | public AjaxResult listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { |
| | | IPage<SalesLedgerSchedulingDto> result = salesLedgerSchedulingService.listPage(page,salesLedgerSchedulingDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | // @GetMapping("/listPage") |
| | | // @Log(title = "生产管理-生产订单-分页查询", businessType = BusinessType.OTHER) |
| | | // @ApiOperation("生产管理-生产订单-分页查询") |
| | | // public AjaxResult listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { |
| | | // IPage<SalesLedgerSchedulingDto> result = salesLedgerSchedulingService.listPage(page,salesLedgerSchedulingDto); |
| | | // return AjaxResult.success(result); |
| | | // } |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("生产管理-生产订单-导出") |
| | | public void export(HttpServletResponse response) { |
| | | salesLedgerSchedulingService.export(response); |
| | | } |
| | | // /** |
| | | // * 导出 |
| | | // * @param response |
| | | // */ |
| | | // @PostMapping("/export") |
| | | // @ApiOperation("生产管理-生产订单-导出") |
| | | // public void export(HttpServletResponse response) { |
| | | // salesLedgerSchedulingService.export(response); |
| | | // } |
| | | |
| | | |
| | | |
| | | @PostMapping("/productionDispatch") |
| | | @Log(title = "生产管理-生产订单-生产派工", businessType = BusinessType.INSERT) |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportTwo") |
| | | @ApiOperation("生产管理-工序排产-导出") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | | SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto = new SalesLedgerSchedulingProcessDto(); |
| | | IPage<SalesLedgerSchedulingProcessDto> result = salesLedgerSchedulingService.listPageProcess(page,salesLedgerSchedulingDto); |
| | | result.getRecords().forEach(item -> { |
| | | item.setStatusName(item.getStatus().toString()); |
| | | }); |
| | | ExcelUtil<SalesLedgerSchedulingProcessDto> util = new ExcelUtil<>(SalesLedgerSchedulingProcessDto.class); |
| | | util.exportExcel(response, result.getRecords(), "工序排产"); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/productionDispatchDelete") |
| | | @Log(title = "生产管理-工序排产-取消排产", businessType = BusinessType.DELETE) |