| | |
| | | import com.ruoyi.production.service.ProductionPlanService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | |
| | | return R.ok(productionPlanService.listPage(page, productionPlanDto)); |
| | | } |
| | | |
| | | @GetMapping("/loadProdData") |
| | | @ApiOperation("拉取销售生产计划") |
| | | @Log(title = "拉取销售生产计划", businessType = BusinessType.INSERT) |
| | | public R loadProdData() { |
| | | productionPlanService.loadProdData(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/combine") |
| | | @Log(title = "合并生产计划", businessType = BusinessType.INSERT) |
| | | @ApiOperation("合并生产计划") |
| | |
| | | return R.ok(productionPlanService.combine(productionPlanDto)); |
| | | } |
| | | |
| | | @PostMapping("") |
| | | @PostMapping("addProductionPlan") |
| | | @Log(title = "创建生产计划", businessType = BusinessType.INSERT) |
| | | @ApiOperation("创建生产计划") |
| | | public R add(@RequestBody ProductionPlanDto productionPlanDto) { |
| | | return R.ok(productionPlanService.add(productionPlanDto)); |
| | | } |
| | | |
| | | @PutMapping("") |
| | | @PutMapping("updateProductionPlan") |
| | | @Log(title = "更新生产计划", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("更新生产计划") |
| | | public R update(@RequestBody ProductionPlanDto productionPlanDto) { |
| | | return R.ok(productionPlanService.update(productionPlanDto)); |
| | | } |
| | | |
| | | @DeleteMapping("") |
| | | @DeleteMapping("deleteProductionPlan") |
| | | @Log(title = "删除生产计划", businessType = BusinessType.DELETE) |
| | | @ApiOperation("删除生产计划") |
| | | public R delete(@RequestBody List<Long> ids) { |
| | | return R.ok(productionPlanService.removeByIds(ids)); |
| | | return R.ok(productionPlanService.delete(ids)); |
| | | } |
| | | |
| | | @PostMapping("/downloadTemplate") |