zouyu
2025-10-23 d425460023114e81caedc7a0430f9246ed3bb839
inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
@@ -7,6 +7,8 @@
import com.ruoyi.basic.dto.*;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.common.annotation.PersonalScope;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.inspect.dto.InsPlaceOrderDto;
import com.ruoyi.inspect.dto.OrderSplitDTO;
import com.ruoyi.inspect.dto.SampleProductDto;
@@ -31,6 +33,7 @@
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
 * @Author zhuo
@@ -106,7 +109,11 @@
    @PostMapping("/inspectionReport")
    public Result<?> inspectionReport(@RequestBody Map<String, Object> param) {
        List<Long> ids = (List<Long>) param.get("ids");
        return Result.success(rawMaterialOrderService.inspectionReport(ids));
        String orderType = Objects.nonNull(param.get("ids"))?param.get("ids").toString():"";
        if(!OrderType.validateValue(orderType)){
            throw new ErrorException("批量报检失败,非法的销售订单分类枚举");
        }
        return Result.success(rawMaterialOrderService.inspectionReport(ids,orderType));
    }
    /**
@@ -221,6 +228,7 @@
    @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')")
    @GetMapping("/getIfsByAll")
    public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
    }
@@ -236,6 +244,7 @@
    @GetMapping("/getIfsByFinish")
    public Result getIfsByFinish(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) throws Exception {
        ifsInventoryQuantityDto.setIsFinish(1);
        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
    }