package com.ruoyi.production.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.procurementrecord.dto.ProcurementDto; import com.ruoyi.production.dto.ProcessSchedulingDto; import com.ruoyi.production.dto.ProductionDispatchAddDto; import com.ruoyi.production.dto.SalesLedgerSchedulingDto; import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; import com.ruoyi.production.service.impl.SalesLedgerSchedulingServiceImpl; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * @author :yys * @date : 2025/7/21 14:43 */ @RestController @Api(tags = "生产订单") @RequestMapping("/salesLedger/scheduling") public class SalesLedgerSchedulingController extends BaseController { @Autowired private SalesLedgerSchedulingServiceImpl salesLedgerSchedulingService; @GetMapping("/listPage") @Log(title = "生产管理-生产订单-分页查询", businessType = BusinessType.OTHER) @ApiOperation("生产管理-生产订单-分页查询") public AjaxResult listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { IPage result = salesLedgerSchedulingService.listPage(page,salesLedgerSchedulingDto); return AjaxResult.success(result); } /** * 导出 * @param response */ @PostMapping("/export") @ApiOperation("生产管理-生产订单-导出") public void export(HttpServletResponse response) { salesLedgerSchedulingService.export(response); } @PostMapping("/productionDispatch") @Log(title = "生产管理-生产订单-生产派工", businessType = BusinessType.INSERT) @ApiOperation("生产管理-生产订单-生产派工") @Transactional(rollbackFor = Exception.class) public AjaxResult productionDispatch(@RequestBody ProductionDispatchAddDto productionDispatchAddDto) { int result = salesLedgerSchedulingService.productionDispatch(productionDispatchAddDto); return AjaxResult.success(result); } @GetMapping("/listPageProcess") @Log(title = "生产管理-工序排产-分页查询", businessType = BusinessType.OTHER) @ApiOperation("生产管理-工序排产-分页查询") public AjaxResult listPageProcess(Page page, SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto) { IPage result = salesLedgerSchedulingService.listPageProcess(page,salesLedgerSchedulingDto); return AjaxResult.success(result); } @DeleteMapping("/productionDispatchDelete") @Log(title = "生产管理-工序排产-取消排产", businessType = BusinessType.DELETE) @ApiOperation("生产管理-工序排产-取消排产") @Transactional(rollbackFor = Exception.class) public AjaxResult productionDispatchDelete(@RequestBody List ids) { int result = salesLedgerSchedulingService.productionDispatchDelete(ids); return AjaxResult.success(result); } @PostMapping("/processScheduling") @Log(title = "生产管理-工序排产", businessType = BusinessType.INSERT) @ApiOperation("生产管理-工序排产") @Transactional(rollbackFor = Exception.class) public AjaxResult processScheduling(@RequestBody List processSchedulingDto) { int result = salesLedgerSchedulingService.processScheduling(processSchedulingDto); return AjaxResult.success(result); } }