| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | //更新工单 |
| | | if (insert > 0) { |
| | | UpdateWrapper<ProductWorkOrder> wrapper = new UpdateWrapper<>(); |
| | | wrapper.set("report_work", true) |
| | | .set("quantity", dto.getQuantity()) |
| | | .set("product_main_id", productionProductMain.getId()) |
| | | .eq("id", dto.getWorkOrderId()); |
| | | productWorkOrderMapper.update(null, wrapper); |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("quantity", dto.getQuantity()); |
| | | params.put("productMainId", productionProductMain.getId()); |
| | | params.put("workOrderId", dto.getWorkOrderId()); |
| | | params.put("deductQuantity", dto.getQuantity()); |
| | | |
| | | productWorkOrderMapper.updatePlanQuantity(params); |
| | | } |
| | | ProductProcess productProcess = productProcessMapper.selectById(productProcessRouteItem.getProcessId()); |
| | | ProductModel productModel = productProcessRouteItem.getProductModelId() != null ? |
| | |
| | | public Boolean removeProductMain(ProductionProductMainDto dto) { |
| | | Long id = dto.getId(); |
| | | |
| | | // 更新工单 |
| | | productWorkOrderMapper.rollbackPlanQuantity(id); |
| | | // 删除质检参数和质检记录 |
| | | qualityInspectMapper.selectList( |
| | | new LambdaQueryWrapper<QualityInspect>() |