zss
2 天以前 1b912a25864dfbe6968740738afe7c042919724a
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -240,7 +240,7 @@
        }
        //如果报废数量>0,需要进入报废的库存
        if (ObjectUtils.isNotEmpty(dto.getScrapQty())) {
            if (BigDecimal.ZERO.compareTo(dto.getScrapQty()) > 0) {
            if (dto.getScrapQty().compareTo(BigDecimal.ZERO) > 0) {
                stockUtils.addUnStock(productModel.getId(), dto.getScrapQty(), StockUnQualifiedRecordTypeEnum.PRODUCTION_SCRAP.getCode(), productionProductMain.getId());
            }
        }
@@ -248,8 +248,8 @@
    }
    @Override
    public Boolean removeProductMain(ProductionProductMainDto dto) {
        ProductionProductMain productionProductMain = productionProductMainMapper.selectById(dto.getId());
    public Boolean removeProductMain(Long id) {
        ProductionProductMain productionProductMain = productionProductMainMapper.selectById(id);
        //该报工对应的工艺路线详情
        ProductProcessRouteItem productProcessRouteItem = productProcessRouteItemMapper.selectById(productionProductMain.getProductProcessRouteItemId());
        ProductionProductOutput productionProductOutput = productionProductOutputMapper.selectList(Wrappers.<ProductionProductOutput>lambdaQuery().eq(ProductionProductOutput::getProductMainId, productionProductMain.getId())).get(0);
@@ -271,7 +271,6 @@
            productOrder.setEndTime(null);
            productOrderMapper.updateById(productOrder);
        }
        /*删除产出*/
        //删除质检
        qualityInspectMapper.selectList(
                new LambdaQueryWrapper<QualityInspect>()