| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Log(title = "合并生产计划", businessType = BusinessType.INSERT) |
| | | @ApiOperation("合并生产计划") |
| | | public AjaxResult combine(@RequestBody ProductionPlanDto productionPlanDto) { |
| | | if (productionPlanDto.getIds() == null || productionPlanDto.getIds().isEmpty()) { |
| | | return AjaxResult.error("请选择要下发的生产计划"); |
| | | } |
| | | |
| | | if (productionPlanDto.getTotalAssignedQuantity() == null || productionPlanDto.getTotalAssignedQuantity().compareTo(BigDecimal.ZERO) <= 0) { |
| | | return AjaxResult.error("请输入下发数量"); |
| | | } |
| | | return AjaxResult.success(productionPlanService.combine(productionPlanDto)); |
| | | } |
| | | |
| | |
| | | @Log(title = "更新生产计划", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("更新生产计划") |
| | | public AjaxResult update(@RequestBody ProductionPlanDto productionPlanDto) { |
| | | return AjaxResult.success(productionPlanService.updateById(productionPlanDto)); |
| | | return AjaxResult.success(productionPlanService.update(productionPlanDto)); |
| | | } |
| | | |
| | | @DeleteMapping("") |