zouyu
昨天 004ee58feda41620f621db1fb8773f1b56eaf71e
外购成品功能迁移v1
已添加17个文件
已修改20个文件
1361 ■■■■ 文件已修改
basic-server/src/main/java/com/ruoyi/basic/dto/IfsInventoryQuantityDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/dto/IfsInventoryQuantitySupplierDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/mapper/StandardTreeMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/pojo/IfsInventoryQuantity.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardMethodServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/IfsOrderInspectionController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/IfsPartPropsRecordController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/OutsourcingFinishProductInspectionController.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/dto/EnterFactoryReport.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/dto/IfsPartPropsRecordDTO.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/IfsPartPropsRecordMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/IfsSplitOrderRecordMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/pojo/IfsPartPropsRecord.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/IfsOrderInspectionService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/IfsPartPropsRecordService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/OutsourcingFinishProductInspectionService.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsOrderInspectionServiceImpl.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsPartPropsRecordServiceImpl.java 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java 438 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/OutsourcingFinishProductInspectionServiceImpl.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/vo/IfsOrderVO.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsSampleUserVO.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/IfsPartPropsRecordMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsOrderMapper.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/static/small-wg-report-template.docx 补丁 | 查看 | 原始文档 | blame | 历史
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryOutputWorkingHoursMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/enums/OrderType.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/QueryWrappers.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/dto/IfsInventoryQuantityDto.java
@@ -79,4 +79,7 @@
    @ApiModelProperty("检验人")
    private String userName;
    @ApiModelProperty("销售订单分类")
    private String orderType;
}
basic-server/src/main/java/com/ruoyi/basic/dto/IfsInventoryQuantitySupplierDto.java
@@ -40,6 +40,9 @@
    @ApiModelProperty("样品编号")
    private String sampleCode;
    @ApiModelProperty("销售订单分类名称")
    private String orderTypeName;
    // è¿›åŽ‚
    @ApiModelProperty("进厂订单id")
    private Integer enterOrderId;
basic-server/src/main/java/com/ruoyi/basic/mapper/StandardTreeMapper.java
@@ -9,6 +9,7 @@
import com.ruoyi.basic.pojo.StandardProductList;
import com.ruoyi.basic.pojo.StandardTree;
import com.ruoyi.basic.vo.IfsInventoryQuantityVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -20,6 +21,7 @@
 * @createDate 2024-03-01 15:06:44
 * @Entity com.ruoyi.basic.pojo.StandardTree
 */
@Mapper
public interface StandardTreeMapper extends BaseMapper<StandardTree> {
    List<FactoryDto> selectStandardTreeList();
basic-server/src/main/java/com/ruoyi/basic/pojo/IfsInventoryQuantity.java
@@ -37,6 +37,9 @@
    @ApiModelProperty("接收号")
    private Integer receiptNo;
    @ApiModelProperty("订单类型(01raw:原材料,02wg:外购成品)")
    private String orderType;
    @ExcelProperty(index = 3, value = "零件号")
    @ApiModelProperty("零件号")
    private String partNo;
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardMethodServiceImpl.java
@@ -26,6 +26,7 @@
import java.io.IOException;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/**
 * @author Administrator
@@ -193,7 +194,8 @@
                return map;
        }
        standardMethodLists.addAll(standardMethodMapper.selectStandardMethodListsByNull(str));
        map.put("standardMethodList", standardMethodLists);
        List<StandardMethodList> collect = standardMethodLists.stream().distinct().collect(Collectors.toList());
        map.put("standardMethodList", collect);
        return map;
    }
inspect-server/src/main/java/com/ruoyi/inspect/controller/IfsOrderInspectionController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.ruoyi.inspect.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.inspect.service.IfsOrderInspectionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * ifs销售订单报检controller
 */
@RestController
@RequestMapping("/ifsOrderInspection")
public class IfsOrderInspectionController {
    @Autowired
    private IfsOrderInspectionService ifsOrderInspectionService;
    @ApiOperation(value = "销售订单报检查询全部")
    @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')")
    @GetMapping("/getIfsByAll")
    public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
        return Result.success(ifsOrderInspectionService.getIfsByOver(page, ifsInventoryQuantityDto));
    }
    @ApiOperation(value = "销售订单报检查看已完成信息")
    @GetMapping("/getIfsByFinish")
    public Result getIfsByFinish(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
        ifsInventoryQuantityDto.setIsFinish(1);
        return Result.success(ifsOrderInspectionService.getIfsByOver(page, ifsInventoryQuantityDto));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/controller/IfsPartPropsRecordController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
package com.ruoyi.inspect.controller;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO;
import com.ruoyi.inspect.service.IfsPartPropsRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * ifs零件属性controller
 */
@Api("ifs零件属性")
@RestController
@RequestMapping("/ifsPartProps")
public class IfsPartPropsRecordController {
    @Autowired
    private IfsPartPropsRecordService ifsPartPropsRecordService;
    @ApiOperation(value = "新增或保存零件属性")
    @PostMapping("/saveOrUpdateProps")
    public Result saveOrUpdateProps(@RequestBody  IfsPartPropsRecordDTO ifsPartPropsRecord){
        return Result.success(ifsPartPropsRecordService.saveOrUpdateProps(ifsPartPropsRecord));
    }
    @ApiOperation(value = "查询ifs订单的零件属性记录")
    @GetMapping("/getOneByIfsId/{ifsId}")
    public Result getOneByIfsId(@PathVariable("ifsId") Long ifsId){
        return Result.success(ifsPartPropsRecordService.getOneByIfsId(ifsId));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/controller/OutsourcingFinishProductInspectionController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
package com.ruoyi.inspect.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.common.annotation.PersonalScope;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.inspect.service.OutsourcingFinishProductInspectionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * å¤–购成品检验controller
 */
@RestController
@RequestMapping("/outsourcingFinishProduct")
public class OutsourcingFinishProductInspectionController {
    @Autowired
    private OutsourcingFinishProductInspectionService outsourcingFinishProductInspectionService;
    @ApiOperation(value = "仓库报检查询")
    @GetMapping("/getWarehouseSubmit")
    public Result getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity) {
        return Result.success(outsourcingFinishProductInspectionService.getWarehouseSubmit(page, ifsInventoryQuantity));
    }
    @ApiOperation(value = "外购成品检验查询检验中")
    @GetMapping("/getIfsByStateOne")
    @PreAuthorize("@ss.hasPermi('business:order')")
    @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantityDto.class, paramName = "createUser")
    public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto){
        return Result.success(outsourcingFinishProductInspectionService.getIfsByStateOne(page, ifsInventoryQuantityDto));
    }
    @ApiOperation(value = "外购成品检验查询已检验")
    @GetMapping("/getIfsByOver")
    @PreAuthorize("@ss.hasPermi('business:order')")
    @PersonalScope(permsName = "business:order", objectName = IfsInventoryQuantitySupplierDto.class, paramName = "createUser")
    public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
        return Result.success(outsourcingFinishProductInspectionService.getIfsByOver(page, ifsInventoryQuantityDto));
    }
    @ApiOperation(value = "原材料报检查询全部")
    @PreAuthorize("@ss.hasPermi('get:Ifs:ByAll')")
    @GetMapping("/getIfsByAll")
    public Result getIfsByAll(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
        return Result.success(outsourcingFinishProductInspectionService.getIfsByOver(page, ifsInventoryQuantityDto));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
@@ -1,23 +1,21 @@
package com.ruoyi.inspect.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.*;
import com.ruoyi.basic.dto.IfsInventoryQuantityCheckDto;
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.common.annotation.PersonalScope;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.utils.WxCpUtils;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.inspect.dto.InsPlaceOrderDto;
import com.ruoyi.inspect.dto.OrderSplitDTO;
import com.ruoyi.inspect.dto.SampleProductDto;
import com.ruoyi.inspect.pojo.InsOrder;
import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate;
import com.ruoyi.inspect.service.InsOrderService;
import com.ruoyi.inspect.service.RawMaterialOrderService;
import com.ruoyi.inspect.service.RawMaterialOrderTemplateService;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.utils.JackSonUtil;
import com.ruoyi.common.utils.WxCpUtils;
import com.ruoyi.inspect.dto.CopperInsOrderDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@@ -30,6 +28,7 @@
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
 * @Author zhuo
@@ -106,7 +105,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("orderType"))?param.get("orderType").toString():"";
        if(!OrderType.validateValue(orderType)){
            throw new ErrorException("批量报检失败,非法的销售订单分类枚举");
        }
        return Result.success(rawMaterialOrderService.inspectionReport(ids,orderType));
    }
    /**
@@ -221,6 +224,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 +240,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));
    }
@@ -349,4 +354,13 @@
        return Result.success(rawMaterialOrderService.confirmSplitOrder(orderSplitDTO));
    }
    /**
     * æ ¹æ®ifsId查询下单数量
     */
    @ApiOperation(value = "根据ifsId查询下单数量")
    @GetMapping("/getOrderCountByIfsId/{ifsId}")
    public Result getOrderCountByIfsId(@PathVariable("ifsId") Long ifsId){
        return Result.success(rawMaterialOrderService.getOrderCountByIfsId(ifsId));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/dto/EnterFactoryReport.java
@@ -30,4 +30,23 @@
    @ApiModelProperty("检测编号")
    private String code;
    /**
     * å¤–护颜色
     */
    @ApiModelProperty("外护颜色")
    private String outerColor;
    /**
     * æ£€éªŒå‘˜
     */
    @ApiModelProperty("检验员")
    private String inspector;
    /**
     * æ£€éªŒæ—¥æœŸ
     */
    @ApiModelProperty("检验日期")
    private String inspectDate;
}
inspect-server/src/main/java/com/ruoyi/inspect/dto/IfsPartPropsRecordDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
package com.ruoyi.inspect.dto;
import com.ruoyi.inspect.pojo.IfsPartPropsRecord;
import lombok.Data;
@Data
public class IfsPartPropsRecordDTO extends IfsPartPropsRecord {
    private String partNo;
    private String lotBatchNo;
}
inspect-server/src/main/java/com/ruoyi/inspect/mapper/IfsPartPropsRecordMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
package com.ruoyi.inspect.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.inspect.pojo.IfsPartPropsRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @author 27233
* @description é’ˆå¯¹è¡¨ã€ifs_part_props_record(ifs订单零件属性记录表)】的数据库操作Mapper
* @createDate 2025-10-23 15:00:34
* @Entity com.ruoyi.inspect.pojo.IfsPartPropsRecord
*/
@Mapper
public interface IfsPartPropsRecordMapper extends BaseMapper<IfsPartPropsRecord> {
    Long selectCountByPartNoAndLotBatchNo(@Param("partNo") String partNo, @Param("lotBatchNo") String lotBatchNo);
}
inspect-server/src/main/java/com/ruoyi/inspect/mapper/IfsSplitOrderRecordMapper.java
@@ -2,6 +2,7 @@
import com.ruoyi.inspect.pojo.IfsSplitOrderRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* @author 27233
@@ -9,6 +10,7 @@
* @createDate 2025-10-29 16:39:41
* @Entity com.ruoyi.inspect.pojo.IfsSplitOrderRecord
*/
@Mapper
public interface IfsSplitOrderRecordMapper extends BaseMapper<IfsSplitOrderRecord> {
}
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java
@@ -9,8 +9,10 @@
import com.ruoyi.inspect.dto.SampleProductDto2;
import com.ruoyi.inspect.dto.SampleProductExportDto;
import com.ruoyi.inspect.pojo.InsOrder;
import com.ruoyi.inspect.vo.IfsOrderVO;
import com.ruoyi.inspect.vo.InsOrderPrintingVo;
import com.ruoyi.inspect.vo.SampleDefectsFatherVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -23,6 +25,7 @@
 * @createDate 2024-03-12 16:17:55
 * @Entity com.yuanchu.mom.pojo.InsOrder
 */
@Mapper
public interface InsOrderMapper extends BaseMapper<InsOrder> {
    //获取检验下单数据
@@ -144,4 +147,6 @@
     * @return
     */
    Integer selectNotSpotCheckOrder(@Param("itmeId") Integer itmeId, @Param("startTime") String startTime, @Param("endTime") String endTime);
    IfsOrderVO selectOrderInfoById(@Param("id") Integer id);
}
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java
@@ -8,6 +8,7 @@
import com.ruoyi.inspect.dto.SampleProductRawAnalysisDto;
import com.ruoyi.inspect.pojo.InsProduct;
import com.ruoyi.inspect.pojo.InsProductDeviationWarningDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -19,6 +20,7 @@
* @createDate 2024-03-08 09:45:03
* @Entity com.yuanchu.mom.pojo.InsProduct
*/
@Mapper
public interface InsProductMapper extends BaseMapper<InsProduct> {
    int selectOrderManDay(@Param("orderId") Integer orderId);
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java
@@ -2,6 +2,8 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.inspect.pojo.InsSampleUser;
import com.ruoyi.inspect.vo.InsSampleUserVO;
import org.apache.ibatis.annotations.Param;
/**
* @author Administrator
@@ -11,6 +13,7 @@
*/
public interface InsSampleUserMapper extends BaseMapper<InsSampleUser> {
    InsSampleUserVO selectUserNameByOrderId(@Param("orderId") Integer orderId);
}
inspect-server/src/main/java/com/ruoyi/inspect/pojo/IfsPartPropsRecord.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
package com.ruoyi.inspect.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
 * ifs订单零件属性记录表
 * @TableName ifs_part_props_record
 */
@TableName(value ="ifs_part_props_record")
@Data
public class IfsPartPropsRecord implements Serializable {
    /**
     * ä¸»é”®id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * ifs订单id
     */
    private Long ifsInventoryId;
    /**
     * è½½å…·ç¼–号
     */
    private String drumNo;
    /**
     * èµ·å§‹ç±³æ ‡
     */
    private BigDecimal startMeterMark;
    /**
     * æˆªæ­¢ç±³æ ‡
     */
    private BigDecimal endMeterMark;
    /**
     * ç»ç¼˜é¢œè‰²
     */
    private String insulationColor;
    /**
     * å¤–护颜色
     */
    private String outerColor;
    /**
     * å°å­—信息
     */
    private String letteringInfo;
    /**
     * ifs零件属性更新标识
     */
    private Boolean partPropsFlag;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
inspect-server/src/main/java/com/ruoyi/inspect/service/IfsOrderInspectionService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
package com.ruoyi.inspect.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import org.springframework.stereotype.Component;
@Component
public interface IfsOrderInspectionService {
    /**
     * æŸ¥è¯¢å·²æ£€éªŒ
     * @param page
     * @param ifsInventoryQuantityDto
     * @return
     */
    IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/IfsPartPropsRecordService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
package com.ruoyi.inspect.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO;
import com.ruoyi.inspect.pojo.IfsPartPropsRecord;
/**
* @author 27233
* @description é’ˆå¯¹è¡¨ã€ifs_part_props_record(ifs订单零件属性记录表)】的数据库操作Service
* @createDate 2025-10-23 15:00:34
*/
public interface IfsPartPropsRecordService extends IService<IfsPartPropsRecord> {
    boolean saveOrUpdateProps(IfsPartPropsRecordDTO ifsPartPropsRecord);
    IfsPartPropsRecord getOneByIfsId(Long ifsId);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/OutsourcingFinishProductInspectionService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.ruoyi.inspect.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.basic.vo.IfsInventoryQuantityVO;
import org.springframework.stereotype.Component;
@Component
public interface OutsourcingFinishProductInspectionService {
    /**
     * æŠ¥æ£€æŸ¥è¯¢
     * @param page
     * @param ifsInventoryQuantity
     * @return
     */
    IPage<IfsInventoryQuantityVO> getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity);
    /**
     * æŸ¥è¯¢å·²æ£€éªŒ
     * @param page
     * @param ifsInventoryQuantityDto
     * @return
     */
    IPage<IfsInventoryQuantitySupplierDto>  getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto);
    /**
     * æŸ¥è¯¢æ£€éªŒå€¼
     * @param page
     * @param ifsInventoryQuantityDto
     * @return
     */
    IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java
@@ -43,7 +43,7 @@
     */
    IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto);
    int inspectionReport(List<Long> ids);
    int inspectionReport(List<Long> ids,String orderType);
    int revokeInspectionReport(Long id);
@@ -156,4 +156,6 @@
    Result importSplitOrderData(MultipartFile file, Long ifsId, HttpServletRequest request);
    boolean confirmSplitOrder(OrderSplitDTO orderSplitDTO);
    Long getOrderCountByIfsId(Long ifsId);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsOrderInspectionServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
package com.ruoyi.inspect.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import com.ruoyi.basic.mapper.StandardTreeMapper;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.utils.QueryWrappers;
import com.ruoyi.inspect.service.IfsOrderInspectionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * é”€å”®è®¢å•报检service
 */
@Slf4j
@Service
public class IfsOrderInspectionServiceImpl implements IfsOrderInspectionService {
    @Autowired
    private StandardTreeMapper standardTreeMapper;
    @Override
    public IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
        // todo: åªçœ‹æˆ‘
        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
        ifsInventoryQuantityDto.setBeginDeclareDate(null);
        ifsInventoryQuantityDto.setEndDeclareDate(null);
        IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
        ifsByOver.getRecords().forEach(r->r.setOrderTypeName(OrderType.getLabelByValue(r.getOrderType())));
        return ifsByOver;
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsPartPropsRecordServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,122 @@
package com.ruoyi.inspect.service.impl;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.utils.api.IfsApiUtils;
import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO;
import com.ruoyi.inspect.mapper.IfsPartPropsRecordMapper;
import com.ruoyi.inspect.mapper.IfsSplitOrderRecordMapper;
import com.ruoyi.inspect.pojo.IfsPartPropsRecord;
import com.ruoyi.inspect.pojo.IfsSplitOrderRecord;
import com.ruoyi.inspect.service.IfsPartPropsRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
/**
* @author 27233
* @description é’ˆå¯¹è¡¨ã€ifs_part_props_record(ifs订单零件属性记录表)】的数据库操作Service实现
* @createDate 2025-10-23 15:00:34
*/
@Slf4j
@Service
public class IfsPartPropsRecordServiceImpl extends ServiceImpl<IfsPartPropsRecordMapper, IfsPartPropsRecord>
    implements IfsPartPropsRecordService{
    @Autowired
    private IfsApiUtils ifsApiUtils;
    @Autowired
    private IfsInventoryQuantityMapper ifsInventoryQuantityMapper;
    @Autowired
    private IfsSplitOrderRecordMapper ifsSplitOrderRecordMapper;
    @Value("${ifs.contract}")
    public String contract;
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean saveOrUpdateProps(IfsPartPropsRecordDTO ifsPartPropsRecord) {
        if(Objects.isNull(ifsPartPropsRecord)){
            throw new RuntimeException("参数不能为空");
        }
        //查询是否已有同批次同零件号的批次属性,没有才更新
        Long count = baseMapper.selectCountByPartNoAndLotBatchNo(ifsPartPropsRecord.getPartNo(),ifsPartPropsRecord.getLotBatchNo());
        if(count==0){
            //判断是新增还是更新
            String actionType = Objects.isNull(ifsPartPropsRecord.getId())?"New":"Modify";
            Map<String, Object> inAttrMap = new HashMap<>();
            inAttrMap.put("RECORD_ID", UUID.randomUUID().toString());
            inAttrMap.put("SYSCODE", "LIMS");
            inAttrMap.put("SYSMODEL", "库存物料批次属性修改");
            HashMap<String, Object> batchInfoMap = new HashMap<>();
            batchInfoMap.put("CONTRACT",contract);//域
            batchInfoMap.put("PART_NO",ifsPartPropsRecord.getPartNo());//零件号
            batchInfoMap.put("LOT_BATCH_NO",ifsPartPropsRecord.getLotBatchNo());//批次号
            batchInfoMap.put("ATTR1",ifsPartPropsRecord.getDrumNo());//载具编号
            batchInfoMap.put("ATTR2",ifsPartPropsRecord.getStartMeterMark().toString());//起始米标
            batchInfoMap.put("ATTR3",ifsPartPropsRecord.getEndMeterMark().toString());//截止米标
            batchInfoMap.put("ATTR4", ifsPartPropsRecord.getOuterColor());//外护颜色
            batchInfoMap.put("ATTR5",ifsPartPropsRecord.getInsulationColor());//绝缘颜色
            batchInfoMap.put("ATTR8",ifsPartPropsRecord.getLetteringInfo());//印字信息
            batchInfoMap.put("ATTR23","车间订单");//入库来源
            batchInfoMap.put("ATTR24","0");//分割预留数量
            batchInfoMap.put("ACTION_TYPE",actionType);//操作类型
            inAttrMap.put("BATCH_INFO", Collections.singletonList(batchInfoMap));
            Result result = ifsApiUtils.importPartLotAttr(JSONUtil.toJsonStr(inAttrMap));
            if(result.getCode()!=200){
                throw new RuntimeException("库存物料批次属性更新失败:"+result.getMessage());
            }
        }
        return this.saveOrUpdate(ifsPartPropsRecord);
    }
    @Override
    public IfsPartPropsRecord getOneByIfsId(Long ifsId) {
        //查询ifs订单信息
        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsId);
        if(Objects.isNull(ifsInventoryQuantity)){
            throw new RuntimeException("未找到对应的IFS订单信息");
        }
        //判断是否是拆分订单
        if(ifsInventoryQuantity.getIsSplitOrder().equals(1)&& StringUtils.equals(ifsInventoryQuantity.getOrderType(), OrderType.RAW.getValue())){
            //查询拆分记录
            IfsSplitOrderRecord splitRecord = ifsSplitOrderRecordMapper.selectOne(Wrappers.<IfsSplitOrderRecord>lambdaQuery()
                    .eq(IfsSplitOrderRecord::getOrderNo, ifsInventoryQuantity.getOrderNo())
                    .eq(IfsSplitOrderRecord::getPartNo, ifsInventoryQuantity.getPartNo())
                    .eq(IfsSplitOrderRecord::getReleaseNo, ifsInventoryQuantity.getReleaseNo())
                    .eq(IfsSplitOrderRecord::getLineNo, ifsInventoryQuantity.getLineNo())
                    .eq(IfsSplitOrderRecord::getReceiptNo, ifsInventoryQuantity.getReceiptNo())
                    .eq(IfsSplitOrderRecord::getLotBatchNo, ifsInventoryQuantity.getUpdateBatchNo())
                    .eq(IfsSplitOrderRecord::getOrderNo, ifsInventoryQuantity.getOrderNo())
            );
            if(Objects.isNull(splitRecord)){
                throw new RuntimeException("未找到零件的拆分信息");
            }
            IfsPartPropsRecord ifsPartPropsRecord = new IfsPartPropsRecord();
            ifsPartPropsRecord.setDrumNo(splitRecord.getDrumNo());
            ifsPartPropsRecord.setLetteringInfo(splitRecord.getLetteringInfo());
            ifsPartPropsRecord.setInsulationColor(splitRecord.getInsulationColor());
            ifsPartPropsRecord.setOuterColor(splitRecord.getOuterColor());
            ifsPartPropsRecord.setDrumNo(splitRecord.getDrumNo());
            ifsPartPropsRecord.setDrumNo(splitRecord.getDrumNo());
            return ifsPartPropsRecord;
        }
        return this.getOne(Wrappers.<IfsPartPropsRecord>lambdaQuery().eq(IfsPartPropsRecord::getIfsInventoryId,ifsId).last("limit 1"));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -2,6 +2,7 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
@@ -11,6 +12,7 @@
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.License;
import com.aspose.words.SaveFormat;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -36,6 +38,7 @@
import com.ruoyi.common.core.domain.entity.Custom;
import com.ruoyi.common.core.domain.entity.InformationNotification;
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.utils.*;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.inspect.dto.*;
@@ -45,13 +48,10 @@
import com.ruoyi.inspect.util.HackLoopTableRenderPolicy;
import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo;
import com.ruoyi.inspect.vo.InsOrderPlanVO;
import com.ruoyi.inspect.vo.InsSampleUserVO;
import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper;
import com.ruoyi.performance.mapper.PerformanceShiftMapper;
import com.ruoyi.performance.mapper.ShiftTimeMapper;
import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHoursTemporary;
import com.ruoyi.performance.service.AuxiliaryOutputWorkingHoursService;
import com.ruoyi.performance.service.AuxiliaryOutputWorkingHoursTemporaryService;
import com.ruoyi.system.mapper.CustomMapper;
import com.ruoyi.system.mapper.UserMapper;
import com.ruoyi.system.service.ISysDictTypeService;
@@ -74,9 +74,7 @@
import java.nio.file.Paths;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -131,6 +129,8 @@
    @Resource
    private IfsInventoryQuantityMapper ifsInventoryQuantityMapper;
    @Resource
    private IfsPartPropsRecordMapper ifsPartPropsRecordMapper;
    @Resource
    private InsReportService insReportService;
    @Resource
    private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper;
@@ -167,9 +167,7 @@
    public IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) {
        // todo: ä»…看自己或者实验室
        //获取当前人所属实验室id
        String laboratory = null;
        String userName = null;
        Integer userId = null;
        if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) {
@@ -1637,6 +1635,96 @@
    /*****************************************************  å°æŠ¥å‘Š    ***************************************************************************/
    /**
     * è®¾ç½®è¡¨æ ¼æ ·å¼
     * @param max æ ‡è¯†æœ€å¤§ä¸ªæ•°
     * @return
     */
    private TableStyle setTableStyle(int max){
        //设置样式
        TableStyle tableStyle = new TableStyle();
        if(max<=5){
            for (int i = 1; i <= max; i++) {
                // æ ¹æ®æ£€éªŒç»“果个数修改长度
                switch (i) {
                    case 1:
                        tableStyle.setColWidths(new int[]{650, 2900, 850, 2300, 2100, 1200});
                        break;
                    case 2:
                        tableStyle.setColWidths(new int[]{650, 2700, 850, 2200, 1200, 1200, 1200});
                        break;
                    case 3:
                        tableStyle.setColWidths(new int[]{650, 2700, 850, 1600, 1000, 1000, 1000, 1200});
                        break;
                    case 4:
                        tableStyle.setColWidths(new int[]{650, 2400, 850, 1500, 850, 850, 850, 850, 1200});
                        break;
                    case 5:
                        tableStyle.setColWidths(new int[]{650, 2200, 850, 1350, 770, 770, 770, 770, 770, 1100});
                        break;
                }
            }
        }
        tableStyle.setWidth("10000");
        tableStyle.setAlign(TableRowAlign.CENTER);
        BorderStyle borderStyle = new BorderStyle();
        borderStyle.setColor("000000");
        borderStyle.setType(XWPFTable.XWPFBorderType.SINGLE);
        borderStyle.setSize(4);
        tableStyle.setLeftBorder(borderStyle);
        tableStyle.setRightBorder(borderStyle);
        tableStyle.setInsideHBorder(borderStyle); // è®¾ç½®æ°´å¹³å†…边框
        tableStyle.setInsideVBorder(borderStyle);
        return tableStyle;
    }
    /**
     * å¤„理有电缆颜色标识的检测项
     * @param cableTags ç”µç¼†é¢œè‰²æ ‡è¯†
     * @param collect   æ£€æµ‹é¡¹åˆ—表
     * @param startIndex èµ·å§‹ä¸‹æ ‡
     * @param endIndex   ç»“束下标
     * @return
     */
    private List<SampleProductExportDto> transformSampleProduct(List<String> cableTags,Map<String, List<SampleProductExportDto>> collect,int startIndex,int endIndex){
        List<SampleProductExportDto> sampleProductExportDtos = new ArrayList<>();
        for (String s : collect.keySet()) {
            List<String> lastValueList = new ArrayList<>();
            SampleProductExportDto dto = new SampleProductExportDto();
            BeanUtil.copyProperties(collect.get(s).get(0),dto);
            Set<String> tellSet = new HashSet<>();
            for (int i = startIndex; i < endIndex; i++) {
                String cableTag = cableTags.get(i);
                for (SampleProductExportDto sDto : collect.get(s)) {
                    tellSet.add(sDto.getTell());
                    if(sDto.getCableTag().equals(cableTag)){
                        lastValueList.add(sDto.getLastValue());
                    }
                }
            }
            //切割电缆配置项
            dto.setTell(String.join("\n",tellSet));
            dto.setLastValueList(lastValueList);
            sampleProductExportDtos.add(dto);
        }
        return sampleProductExportDtos;
    }
    /**
     * æ£€æµ‹é¡¹æŽ’序
     * @param sourceMap
     * @param targetMap
     */
    private void sortSampleProduct(Map<String, List<SampleProductExportDto>> sourceMap,Map<String, List<SampleProductExportDto>> targetMap){
        List<Map.Entry<String, List<SampleProductExportDto>>> entries = new ArrayList<>(sourceMap.entrySet());
        entries.sort(Comparator.comparingInt(o -> (o.getValue().get(0).getSort() == null ? 0 : o.getValue().get(0).getSort())));
        for (Map.Entry<String, List<SampleProductExportDto>> entry : entries) {
            targetMap.put(entry.getKey(), entry.getValue());
        }
    }
    /**
     * å°æŠ¥å‘Šç”Ÿæˆ
     * @param orderId
     * @param insOrder
@@ -1654,11 +1742,17 @@
        enterFactoryReport.setSample(insOrder.getSample());
        // èŽ·å–ifs数据
        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
        //查询零件属性
        IfsPartPropsRecord ifsPartPropsRecord = ifsPartPropsRecordMapper.selectOne(Wrappers.<IfsPartPropsRecord>lambdaQuery()
                .eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId()));
        if(Objects.nonNull(ifsPartPropsRecord)){
            enterFactoryReport.setOuterColor(ifsPartPropsRecord.getOuterColor());
        }
        enterFactoryReport.setQtyArrived(ifsInventoryQuantity.getQtyArrived() == null ? "" :
                ifsInventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + ifsInventoryQuantity.getBuyUnitMeas());
        enterFactoryReport.setQuantity(insOrder.getTestQuantity());
        enterFactoryReport.setPartDesc(insOrder.getPartDetail());
        enterFactoryReport.setSupplierName("**********");
        enterFactoryReport.setSupplierName(ifsInventoryQuantity.getSupplierName());
        enterFactoryReport.setLotBatchNo(ifsInventoryQuantity.getUpdateBatchNo());
        // æ£€æµ‹ä¾æ®
@@ -1676,6 +1770,7 @@
        List<RowRenderData> rows = new ArrayList<>();
        List<TextRenderData> text = new ArrayList<>();
        RowRenderData rowRenderData = null;
        List<Map<String,Object>> cableTagEnclosureTables = new ArrayList<>();
        // æŸ¥è¯¢æ£€éªŒå†…容
        List<SampleProductExportDto> sampleProductDto2s = insOrderMapper.selectSampleBySampleId(insSamples.stream()
@@ -1686,21 +1781,167 @@
        List<SampleProductExportDto> sampleList = new ArrayList<>();
        Integer max = insSamples.stream().mapToInt(InsSample::getQuantity).sum();
        TableRenderData tableRenderData = new TableRenderData();
        String templateName;
        if(StringUtils.equals(OrderType.WG.getValue(),ifsInventoryQuantity.getOrderType())){
            //过滤不判定的检测项
            List<SampleProductExportDto> filterItems = sampleProductDto2s.stream().filter(f -> f.getInsResult() != 3).collect(Collectors.toList());
            int maxCableTag = 5;//单个表格,电缆颜色标识最大个数
            templateName = "/static/small-wg-report-template.docx";
            //查询检验单消息
            InsSampleUserVO insSampleUser = insSampleUserMapper.selectUserNameByOrderId(orderId);
            if(Objects.nonNull(insSampleUser)){
                enterFactoryReport.setPartDesc(insSampleUser.getModel());
                enterFactoryReport.setInspector(insSampleUser.getInspector());
                enterFactoryReport.setInspectDate(insSampleUser.getInspectDate());
            }
            Map<String, List<SampleProductExportDto>> totalItem = new LinkedHashMap<>();//检测项列表
            Map<String, List<SampleProductExportDto>> cableTagItem = new LinkedHashMap<>();//电缆配置检测项
            Map<String, List<SampleProductExportDto>> cableTagEnclosureItem = new LinkedHashMap<>();//电缆配置检测项附件
            AtomicInteger finalIndex = new AtomicInteger(1);
            List<String> cableTags = insOrderMapper.selectSampleCableTag(insSample.getId());
            max = Math.max(cableTags.size(),1);
            //处理电缆配置检测项
            Map<String, List<SampleProductExportDto>> tempMap = new HashMap<>();
            Map<String, List<SampleProductExportDto>> tempMap2 = new HashMap<>();
            Map<String, List<SampleProductExportDto>> listMap2 = filterItems.stream()
                    .filter(f -> StringUtils.isNotBlank(f.getCableTag()) && StringUtils.isNotBlank(f.getInspectionItem()))
                    .collect(Collectors.groupingBy(SampleProductExportDto::getInspectionItem));
            for (String key : listMap2.keySet()) {
                List<SampleProductExportDto> sampleProductExportDtos;
                List<SampleProductExportDto> sampleProductExportDtos2;
                //处理电缆配置项
                Map<String, List<SampleProductExportDto>> collect = listMap2.get(key).stream().collect(Collectors.groupingBy(SampleProductExportDto::getInspectionItemSubclass));
                if(cableTags.size()>maxCableTag){
                    sampleProductExportDtos = transformSampleProduct(cableTags,collect,0,maxCableTag);
                    sampleProductExportDtos2 = transformSampleProduct(cableTags,collect,maxCableTag,cableTags.size());
                    tempMap2.put(key,sampleProductExportDtos2);
                }else{
                    sampleProductExportDtos = transformSampleProduct(cableTags,collect,0,cableTags.size());
                }
                cableTagItem.put(key,sampleProductExportDtos);
            }
            //处理非电缆配置检测项
            Map<String, List<SampleProductExportDto>> listMap = filterItems.stream()
                    .filter(f -> StringUtils.isBlank(f.getCableTag()) && StringUtils.isNotBlank(f.getInspectionItem()))
                    .collect(Collectors.groupingBy(s->s.getInspectionItem()+"&"));
            //合并检测项列表
            tempMap.putAll(cableTagItem);
            tempMap.putAll(listMap);
            sortSampleProduct(tempMap,totalItem);
            int tagNum = Math.min(max,maxCableTag);
            List<String> tagList = cableTags.isEmpty()?new ArrayList<>():cableTags.subList(0,tagNum);
            handlerSampleItems(OrderType.WG.getValue(),totalItem,finalIndex,sampleList,tagNum,text,rows,rowRenderData,resultCh,tagList,true);
            if(CollectionUtil.isNotEmpty(tempMap2)){
                sortSampleProduct(tempMap2,cableTagEnclosureItem);
                //生成附件电缆表格
                TableRenderData tableRenderData2 = new TableRenderData();
                List<String> newCableTags = cableTags.subList(maxCableTag,cableTags.size());
                AtomicInteger finalIndex2 = new AtomicInteger(1);
                List<TextRenderData> newText = new ArrayList<TextRenderData>();
                List<RowRenderData> newRows = new ArrayList<>();
                RowRenderData newRowRenderData = null;
                handlerSampleItems(OrderType.WG.getValue(),cableTagEnclosureItem,finalIndex2, new ArrayList<>(),newCableTags.size(),newText,newRows,newRowRenderData,resultCh,newCableTags,true);
                tableRenderData2.setRows(newRows);
                tableRenderData2.setTableStyle(setTableStyle(newCableTags.size()));
                HashMap<String, Object> tableMap = new HashMap<>();
                tableMap.put("enclosureTable",tableRenderData2);
                tableMap.put("resultCh", resultCh);
                tableMap.put("writeUrl", null);
                tableMap.put("examineUrl", null);
                tableMap.put("ratifyUrl", null);
                tableMap.put("writeDateUrl", null);
                tableMap.put("examineDateUrl", null);
                tableMap.put("ratifyDateUrl", null);
                tableMap.put("seal1", null);
                cableTagEnclosureTables.add(tableMap);
            }
            tableRenderData.setRows(rows);
            tableRenderData.setTableStyle(setTableStyle(tagNum));
            if (!resultCh.get().isEmpty()) {
                resultCh.set("经检验," + resultCh.get() + "所检项目不合格,其余所检项目均合格。(盖章有效)");
            } else {
                resultCh.set("本产品符合相关标准要求,经检验合格准予出厂(盖章有效)");
            }
        }else{
            templateName = "/static/small-report-template.docx";
        // è½¬æˆMpa进行排序
        Map<String, List<SampleProductExportDto>> sortedMap = sampleProductDto2s.stream()
                .filter(sampleProductDto2 -> StringUtils.isNotBlank(sampleProductDto2.getInspectionItem()))
                .collect(Collectors.groupingBy(SampleProductExportDto::getInspectionItem));
        List<Map.Entry<String, List<SampleProductExportDto>>> entries = new ArrayList<>(sortedMap.entrySet());
        entries.sort((o1, o2) -> (o1.getValue().get(0).getSort() == null ? 0 : o1.getValue().get(0).getSort())
                - (o2.getValue().get(0).getSort() == null ? 0 : o2.getValue().get(0).getSort()));
        // åˆ›å»ºä¸€ä¸ª LinkedHashMap æ¥ä¿æŒæ’入顺序
//            // åˆ›å»ºä¸€ä¸ª LinkedHashMap æ¥ä¿æŒæ’入顺序
        Map<String, List<SampleProductExportDto>> item = new LinkedHashMap<>();
        for (Map.Entry<String, List<SampleProductExportDto>> entry : entries) {
            item.put(entry.getKey(), entry.getValue());
        }
            sortSampleProduct(sortedMap,item);
        AtomicInteger finalIndex = new AtomicInteger(1);
            handlerSampleItems(OrderType.RAW.getValue(), item,finalIndex,sampleList,max,text,rows,rowRenderData,resultCh,null,true);
            tableRenderData.setRows(rows);
            tableRenderData.setTableStyle(setTableStyle(max));
            if (!resultCh.get().equals("")) {
                resultCh.set("经检验," + resultCh.get() + "所检项目不合格,其余所检项目均合格。");
            } else {
                resultCh.set("经检验此批" + enterFactoryReport.getSample() + "各项目均符合检验规范要求。");
            }
        }
        ConfigureBuilder builder = Configure.builder();
        builder.useSpringEL(true);
        InputStream inputStream = this.getClass().getResourceAsStream(templateName);
        XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render(
                new HashMap<String, Object>() {{
                    put("report", enterFactoryReport);
                    put("standardMethod", standardMethod2.toString().equals("null") ? "" : standardMethod2);
                    put("orderType", orderType);
                    put("table", tableRenderData);
                    put("enclosureTables", cableTagEnclosureTables.isEmpty()?null:cableTagEnclosureTables);
                    put("resultCh", resultCh);
                    put("writeUrl", null);
                    put("examineUrl", null);
                    put("ratifyUrl", null);
                    put("writeDateUrl", null);
                    put("examineDateUrl", null);
                    put("ratifyDateUrl", null);
                    put("seal1", null);
                }});
        try {
            // ä¿®æ”¹æ¢è¡Œå’Œåˆå¹¶é—®é¢˜
            updaeMerge(template.getXWPFDocument(), true);
            String name = insReport.getCode().replace("/", "") + "-J.docx";
            template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name)));
            insReport.setUrl("/word/" + name);
            insReport.setIsPass(0);
            insReport.setWriteUserId(SecurityUtils.getUserId().intValue());//提交人
            insReport.setWriteTime(LocalDateTime.now());//提交时间
            // æŸ¥è¯¢æŠ¥å‘Š, åˆ¤æ–­ä¹‹å‰æ˜¯å¦æ·»åŠ è¿‡, æ·»åŠ è¿‡åˆ é™¤
            insReportMapper.delete(Wrappers.<InsReport>lambdaQuery()
                    .eq(InsReport::getInsOrderId, insOrder.getId()));
            insReportMapper.insert(insReport);
            inputStream.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    /**
     * å¤„理常规检测项
     * @param item
     * @param finalIndex
     * @param sampleList
     * @param max
     * @param text
     * @param rows
     * @param rowRenderData
     * @param resultCh
     */
    private static void handlerSampleItems(String orderType,Map<String, List<SampleProductExportDto>> item,AtomicInteger finalIndex,List<SampleProductExportDto> sampleList,Integer max,List<TextRenderData> text,List<RowRenderData> rows,RowRenderData rowRenderData,AtomicReference<String> resultCh,List<String> cableTagList,Boolean hasAddHead ){
        item.forEach((s, sampleProductDtoInside) -> {
            // æ·»åŠ æ£€éªŒé¡¹
            SampleProductExportDto dto2 = new SampleProductExportDto();
@@ -1713,19 +1954,23 @@
                // å¤„理集合
                Map<String, SampleProductExportDto> map = new LinkedHashMap<>();
                for (SampleProductExportDto productDto2 : sampleProductDtoInside) {
                    String productName = productDto2.getInspectionItemClass() + productDto2.getInspectionItem();
                    String productName = productDto2.getInspectionItemClass() + productDto2.getInspectionItem() + productDto2.getCableTag();
                    if (map.containsKey(productName)) {
                        // å¦‚果名称已经存在,添加 lastValue å€¼åˆ° lastValueList åˆ—表
                        if(CollectionUtil.isEmpty(map.get(productName).getLastValueList()) || StringUtils.equals(OrderType.RAW.getValue(),orderType)){
                        map.get(productName)
                                .getLastValueList()
                                .add(productDto2.getLastValue());
                        }
                        map.get(productName)
                                .getInsResultList()
                                .add(productDto2.getInsResult());
                    } else {
                        // å¦‚果名称不存在,直接放入 map
                        if(CollectionUtil.isEmpty(productDto2.getLastValueList()) || StringUtils.equals(OrderType.RAW.getValue(),orderType)){
                        productDto2.setLastValueList(new ArrayList<>()); // æ£€éªŒå†…容
                        productDto2.getLastValueList().add(productDto2.getLastValue());
                        }
                        productDto2.setInsResultList(new ArrayList<>()); // ç»“æžœ
                        productDto2.getInsResultList().add(productDto2.getInsResult());
@@ -1754,19 +1999,23 @@
                // å¤„理集合
                Map<String, SampleProductExportDto> map = new LinkedHashMap<>();
                for (SampleProductExportDto productDto2 : sampleProductDtoInside) {
                    String productName = productDto2.getInspectionItemClass() + productDto2.getInspectionItem() + productDto2.getInspectionItemSubclass();
                    String productName = productDto2.getInspectionItemClass() + productDto2.getInspectionItem() + productDto2.getInspectionItemSubclass() + productDto2.getCableTag();
                    if (map.containsKey(productName)) {
                        // å¦‚果名称已经存在,添加 lastValue å€¼åˆ° lastValueList åˆ—表
                        if(CollectionUtil.isEmpty(map.get(productName).getLastValueList()) || StringUtils.equals(OrderType.RAW.getValue(),orderType)){
                        map.get(productName)
                                .getLastValueList()
                                .add(productDto2.getLastValue());
                        }
                        map.get(productName)
                                .getInsResultList()
                                .add(productDto2.getInsResult());
                    } else {
                        // å¦‚果名称不存在,直接放入 map
                        if(CollectionUtil.isEmpty(productDto2.getLastValueList()) || StringUtils.equals(OrderType.RAW.getValue(),orderType)){
                        productDto2.setLastValueList(new ArrayList<>()); // æ£€éªŒå†…容
                        productDto2.getLastValueList().add(productDto2.getLastValue());
                        }
                        productDto2.setInsResultList(new ArrayList<>()); // ç»“æžœ
                        productDto2.getInsResultList().add(productDto2.getInsResult());
@@ -1784,8 +2033,9 @@
        });
        // æ·»åŠ å°æŠ¥å‘Šè¡¨å¤´
        text = addSmallHead(text, max, rows);
        if(hasAddHead){
            text = addSmallHead(text, max, rows,cableTagList);
        }
        // ä¸­é—´æ£€æµ‹å€¼æ·»åŠ 
        for (int i = 0; i < sampleList.size(); i++) {
@@ -1802,7 +2052,9 @@
            // æ£€éªŒé¡¹ç›®
            TextRenderData middleRenderData2 = new TextRenderData();
            middleRenderData2.setText(sample.getInspectionName());
            String[] split = sample.getInspectionName().split("&");
            String itemName = split.length>0?split[0]:sample.getInspectionName();
            middleRenderData2.setText(itemName+"∑"+itemName+i+"_"+finalIndex);
            Style middleStyle2 = new Style();
            middleStyle2.setFontFamily("宋体");
            middleStyle2.setColor("000000");
@@ -1889,7 +2141,7 @@
                    TextRenderData middleRenderData6 = new TextRenderData();
                    middleRenderData6.setText((StringUtils.isNotEmpty(sample.getLastValue()) ?
                            sample.getLastValue() : "")
                            + "∑" + (7 + i));
                            + "∑" + (finalIndex.get() +"_"+ i));
                    Style middleStyle6 = new Style();
                    middleStyle6.setFontFamily("宋体");
                    middleStyle6.setColor("000000");
@@ -1927,7 +2179,7 @@
                            String type;
                            if (count.equals(0)) {
                                // æ·»åŠ ä¸åˆæ ¼æè¿°
                                String item1 = (max == 1 ? "" : "第" + Integer.toString(index) + "次")
                                String item1 = (max == 1 ? "" : "第" + index + "次")
                                        + sample.getInspectionItem()
                                        + (StringUtils.isBlank(sample.getInspectionItemSubclass()) ? "" : "" + sample.getInspectionItemSubclass());
                                if (resultCh.get().equals("")) {
@@ -1967,95 +2219,16 @@
            text = new ArrayList<>();
        }
        TableRenderData tableRenderData = new TableRenderData();
        tableRenderData.setRows(rows);
        //设置样式
        TableStyle tableStyle = new TableStyle();
        for (int i = 1; i <= max; i++) {
            // æ ¹æ®å‡åŽ‹é‚£ç»“æžœä¸ªæ•°ä¿®æ”¹é•¿åº¦
            switch (i) {
                case 1:
                    tableStyle.setColWidths(new int[]{650, 2900, 850, 2300, 2100, 1200});
                    break;
                case 2:
                    tableStyle.setColWidths(new int[]{650, 2700, 850, 2200, 1200, 1200, 1200});
                    break;
                case 3:
                    tableStyle.setColWidths(new int[]{650, 2700, 850, 1600, 1000, 1000, 1000, 1200});
                    break;
                case 4:
                    tableStyle.setColWidths(new int[]{650, 2400, 850, 1500, 850, 850, 850, 850, 1200});
                    break;
                case 5:
                    tableStyle.setColWidths(new int[]{650, 2200, 850, 1350, 750, 750, 750, 750, 750, 1200});
                    break;
            }
        }
        tableStyle.setWidth("10000");
        tableStyle.setAlign(TableRowAlign.CENTER);
        BorderStyle borderStyle = new BorderStyle();
        borderStyle.setColor("000000");
        borderStyle.setType(XWPFTable.XWPFBorderType.SINGLE);
        borderStyle.setSize(4);
        tableStyle.setLeftBorder(borderStyle);
        tableStyle.setRightBorder(borderStyle);
        tableStyle.setInsideHBorder(borderStyle); // è®¾ç½®æ°´å¹³å†…边框
        tableStyle.setInsideVBorder(borderStyle);
        tableRenderData.setTableStyle(tableStyle);
        if (!resultCh.get().equals("")) {
            resultCh.set("经检验," + resultCh.get() + "所检项目不合格,其余所检项目均合格。");
        } else {
            resultCh.set("经检验此批" + enterFactoryReport.getSample() + "各项目均符合检验规范要求。");
        }
        ConfigureBuilder builder = Configure.builder();
        builder.useSpringEL(true);
        InputStream inputStream = this.getClass().getResourceAsStream("/static/small-report-template.docx");
        XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render(
                new HashMap<String, Object>() {{
                    put("report", enterFactoryReport);
                    put("standardMethod", standardMethod2.toString().equals("null") ? "" : standardMethod2);
                    put("orderType", orderType);
                    put("table", tableRenderData);
                    put("resultCh", resultCh);
                    put("writeUrl", null);
                    put("examineUrl", null);
                    put("ratifyUrl", null);
                    put("writeDateUrl", null);
                    put("examineDateUrl", null);
                    put("ratifyDateUrl", null);
                    put("seal1", null);
                }});
        try {
            // ä¿®æ”¹æ¢è¡Œå’Œåˆå¹¶é—®é¢˜
            updaeMerge(template.getXWPFDocument(), true);
            String name = insReport.getCode().replace("/", "") + "-J.docx";
            template.writeAndClose(Files.newOutputStream(Paths.get(wordUrl + "/" + name)));
            insReport.setUrl("/word/" + name);
            insReport.setIsPass(0);
            insReport.setWriteUserId(SecurityUtils.getUserId().intValue());//提交人
            insReport.setWriteTime(LocalDateTime.now());//提交时间
            // æŸ¥è¯¢æŠ¥å‘Š, åˆ¤æ–­ä¹‹å‰æ˜¯å¦æ·»åŠ è¿‡, æ·»åŠ è¿‡åˆ é™¤
            insReportMapper.delete(Wrappers.<InsReport>lambdaQuery()
                    .eq(InsReport::getInsOrderId, insOrder.getId()));
            insReportMapper.insert(insReport);
            inputStream.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    /**
     * æ·»åŠ å°å®è¡¨å¤´
     * æ·»åŠ å°æŠ¥å‘Šè¡¨å¤´
     * @param text
     * @param max
     * @param rows
     * @return
     */
    private static List<TextRenderData> addSmallHead(List<TextRenderData> text, Integer max, List<RowRenderData> rows) {
    private static List<TextRenderData> addSmallHead(List<TextRenderData> text, Integer max, List<RowRenderData> rows,List<String> cableTagList) {
        RowRenderData rowRenderData;
//        // å¤´
        TextRenderData headRenderData1 = new TextRenderData();
@@ -2113,7 +2286,7 @@
        text = new ArrayList<>();
        // ç¬¬äºŒè¡Œ(可能没有)
        if (max > 1) {
        if (max > 1 && CollectionUtil.isEmpty(cableTagList)) {
            TextRenderData tagRenderData1 = new TextRenderData();
            tagRenderData1.setText("");
            Style tagStyle1 = new Style();
@@ -2170,7 +2343,62 @@
        }
        //如果有电缆颜色,生成颜色标识行
        if(CollectionUtil.isNotEmpty(cableTagList)){
            TextRenderData tagRenderData1 = new TextRenderData();
            tagRenderData1.setText("");
            Style tagStyle1 = new Style();
            tagStyle1.setFontFamily("宋体");
            tagStyle1.setColor("000000");
            tagRenderData1.setStyle(tagStyle1);
            text.add(tagRenderData1);
            TextRenderData tagRenderData2 = new TextRenderData();
            tagRenderData2.setText("绝缘线芯颜色和标志");
            Style tagStyle2 = new Style();
            tagStyle2.setFontFamily("宋体");
            tagStyle2.setColor("000000");
            tagRenderData2.setStyle(tagStyle2);
            text.add(tagRenderData2);
            TextRenderData tagRenderData4 = new TextRenderData();
            tagRenderData4.setText("/");
            Style tagStyle4 = new Style();
            tagStyle4.setFontFamily("宋体");
            tagStyle4.setColor("000000");
            tagRenderData4.setStyle(tagStyle4);
            text.add(tagRenderData4);
            TextRenderData tagRenderData5 = new TextRenderData();
            tagRenderData5.setText("/");
            Style tagStyle5 = new Style();
            tagStyle5.setFontFamily("宋体");
            tagStyle5.setColor("000000");
            tagRenderData5.setStyle(tagStyle5);
            text.add(tagRenderData5);
            for (String cableTag : cableTagList) {
                TextRenderData tagRenderData6 = new TextRenderData();
                tagRenderData6.setText(cableTag);
                Style tagStyle6 = new Style();
                tagStyle6.setFontFamily("宋体");
                tagStyle6.setColor("000000");
                tagRenderData6.setStyle(tagStyle6);
                text.add(tagRenderData6);
            }
            TextRenderData tagRenderData7 = new TextRenderData();
            tagRenderData7.setText("/");
            Style tagStyle7 = new Style();
            tagStyle7.setFontFamily("宋体");
            tagStyle7.setColor("000000");
            tagRenderData7.setStyle(tagStyle7);
            text.add(tagRenderData7);
            TextRenderData[] text4 = text.toArray(new TextRenderData[0]);
            rowRenderData = Rows.of(text4).center().rowAtleastHeight(1).create();
            rows.add(rowRenderData);
            text = new ArrayList<>();
        }
        return text;
    }
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
@@ -26,6 +26,7 @@
import com.ruoyi.common.constant.InsOrderTypeConstants;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.numgen.NumberGenerator;
import com.ruoyi.common.utils.LimsDateUtil;
import com.ruoyi.common.utils.QueryWrappers;
@@ -39,6 +40,7 @@
import com.ruoyi.inspect.service.InsOrderStateService;
import com.ruoyi.inspect.service.InsProductService;
import com.ruoyi.inspect.service.InsSampleService;
import com.ruoyi.inspect.vo.IfsOrderVO;
import com.ruoyi.inspect.vo.InsOrderPrintingVo;
import com.ruoyi.system.mapper.UserMapper;
import lombok.AllArgsConstructor;
@@ -312,9 +314,9 @@
                }
            }
        });
        //是否为原材料下单
        if (insOrder.getTypeSource() != null && insOrder.getTypeSource().equals(1)) {
            // åŽŸææ–™ä¸‹å•: å§”托人就是报检人, ç”Ÿäº§å•位就是供应商单位
        //原材料下单或外购成品下单
        if (Objects.nonNull(insOrder.getTypeSource())&&Objects.nonNull(insOrder.getIfsInventoryId())) {
            // å§”托人就是报检人, ç”Ÿäº§å•位就是供应商单位
            IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
            Integer declareUserId = ifsInventoryQuantity.getDeclareUserId();
            User user = userMapper.selectById(declareUserId);
@@ -352,8 +354,11 @@
            upInsOrderOfState(insOrder);
            // åˆ†é…æ£€éªŒäºº
            upInsOrder(insOrder.getId(), null, appointed != null ? appointed.toString() : null, SecurityUtils.getUserId().intValue(), "原材料");
            String sonLaboratory = insOrder.getTypeSource().equals(1)?"原材料":"成品实验室";
            upInsOrder(insOrder.getId(), null, appointed != null ? appointed.toString() : null, SecurityUtils.getUserId().intValue(), sonLaboratory);
            //是否为原材料下单
            if(insOrder.getTypeSource().equals(1)){
            // æ ¹æ®é›¶ä»¶å·åˆ¤æ–­æ˜¯å¦æ˜¯è¾…材
            boolean isRaw = false;
            StructureTestObject productObject = insOrderMapper.selectProductByPartNo(ifsInventoryQuantity.getPartNo());
@@ -393,6 +398,7 @@
                    ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
                            .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())
                            .set(IfsInventoryQuantity::getIsFirst, 1));
                    }
                }
            }
        }
@@ -516,9 +522,10 @@
    @Override
    public Map<String, Object> getInsOrderAndSample(Integer id, String laboratory) {
        Map<String, Object> map = new HashMap<>();
        InsOrder insOrder = insOrderMapper.selectById(id);
//        InsOrder insOrder = insOrderMapper.selectById(id);
        IfsOrderVO ifsOrderVO = insOrderMapper.selectOrderInfoById(id);
        List<SampleProductDto> list = insSampleMapper.getInsOrderAndSample(id, laboratory);
        map.put("insOrder", insOrder);
        map.put("insOrder", ifsOrderVO);
        map.put("sampleProduct", list);
        //查询所有记录模版去重
        List<Map<Integer, Object>> list2 = insOrderMapper.selectReportModelByOrderId(id, laboratory);
@@ -1207,9 +1214,12 @@
         * TODO åŽç»­éœ€è¦è°ƒç”¨IFS的接口 ç§»å…¥çš„库位号 toLocation
         */
        // æ£€éªŒåŽç§»åº“
        if(one.getIsSplitOrder().equals(1)){
            //如果订单为原材料的拆分订单,则移到外购库位
            toLocation = "W03";
        //1301:原材料合格库,CP-02-001:成品库
        if(StringUtils.equals(inventoryQuantity.getOrderType(), OrderType.RAW.getValue())){
            //如果订单为原材料的拆分订单,则移到外购原材料库位W03
            toLocation = one.getIsSplitOrder().equals(1)?"W03":"1301";
        }else if(StringUtils.equals(inventoryQuantity.getOrderType(), OrderType.WG.getValue())){
            toLocation = "CP-02-001";
        }else{
            toLocation = "1301";
        }
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/OutsourcingFinishProductInspectionServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,50 @@
package com.ruoyi.inspect.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
import com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto;
import com.ruoyi.basic.mapper.StandardTreeMapper;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.basic.vo.IfsInventoryQuantityVO;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.utils.QueryWrappers;
import com.ruoyi.inspect.service.OutsourcingFinishProductInspectionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * å¤–购成品检验serviceImpl
 */
@Slf4j
@Service
public class OutsourcingFinishProductInspectionServiceImpl implements OutsourcingFinishProductInspectionService {
    @Autowired
    private StandardTreeMapper standardTreeMapper;
    @Override
    public IPage<IfsInventoryQuantityVO> getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity) {
        ifsInventoryQuantity.setOrderType(OrderType.WG.getValue());
        return standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity));
    }
    @Override
    public IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
        ifsInventoryQuantityDto.setBeginDeclareDate(null);
        ifsInventoryQuantityDto.setEndDeclareDate(null);
        ifsInventoryQuantityDto.setOrderType(OrderType.WG.getValue());
        IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
        ifsByOver.getRecords().forEach(r->r.setOrderTypeName(OrderType.getLabelByValue(r.getOrderType())));
        return ifsByOver;
    }
    @Override
    public IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) {
        ifsInventoryQuantityDto.setOrderType(OrderType.WG.getValue());
        return standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -20,21 +20,25 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.*;
import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
import com.ruoyi.basic.mapper.StandardTreeMapper;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.basic.vo.IfsInventoryQuantityVO;
import com.ruoyi.common.config.WechatProperty;
import com.ruoyi.common.constant.InsOrderTypeConstants;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.common.core.domain.entity.User;
import com.ruoyi.common.config.WechatProperty;
import com.ruoyi.common.enums.OrderType;
import com.ruoyi.common.numgen.NumberGenerator;
import com.ruoyi.common.utils.LimsDateUtil;
import com.ruoyi.common.utils.QueryWrappers;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.WxCpUtils;
import com.ruoyi.common.utils.api.IfsApiUtils;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.inspect.dto.CopperInsOrderDto;
import com.ruoyi.inspect.dto.OrderSplitDTO;
import com.ruoyi.inspect.dto.RawMaterialStandardTreeDto;
import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
import com.ruoyi.basic.mapper.StandardTreeMapper;
import com.ruoyi.inspect.dto.SampleProductDto;
import com.ruoyi.inspect.excel.OrderSplitExcelData;
import com.ruoyi.inspect.excel.OrderSplitExcelListener;
@@ -48,9 +52,6 @@
import com.ruoyi.inspect.service.InsOrderService;
import com.ruoyi.inspect.service.InsReportService;
import com.ruoyi.inspect.service.RawMaterialOrderService;
import com.ruoyi.common.numgen.NumberGenerator;
import com.ruoyi.framework.exception.ErrorException;
import com.ruoyi.basic.vo.IfsInventoryQuantityVO;
import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper;
import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
import com.ruoyi.system.mapper.UserMapper;
@@ -148,6 +149,9 @@
    @Override
    public IPage<IfsInventoryQuantityVO> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity) {
        if(ifsInventoryQuantity.getIsInspect().equals(1)){
            ifsInventoryQuantity.setOrderType(OrderType.RAW.getValue());
        }
        IPage<IfsInventoryQuantityVO> ifsInventoryQuantityIPage = standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity));
        ifsInventoryQuantityIPage.getRecords().forEach(f->{
            Long count = ifsInventoryQuantityMapper.selectCount(Wrappers.<IfsInventoryQuantity>lambdaQuery()
@@ -160,6 +164,7 @@
    @Override
    public IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) {
        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
        return standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto));
    }
@@ -170,13 +175,14 @@
     * @return
     */
    @Override
    public int inspectionReport(List<Long> ids) {
    public int inspectionReport(List<Long> ids,String orderType) {
        Integer userId = SecurityUtils.getUserId().intValue();
        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
                .in(IfsInventoryQuantity::getId, ids)
                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
                .set(IfsInventoryQuantity::getDeclareUserId, userId)
                .set(IfsInventoryQuantity::getIsInspect, 1)
                .set(IfsInventoryQuantity::getOrderType,orderType)
                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
        );
        threadPoolTaskExecutor.execute(() -> {
@@ -230,6 +236,13 @@
        return ifsInventoryQuantityMapper.printLabel(ids);
    }
    @Override
    @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED)
    public Long getOrderCountByIfsId(Long ifsId) {
        return insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery().eq(InsOrder::getIfsInventoryId,ifsId).ne(InsOrder::getState,-1));
    }
    /**
     * æŠ¥æ£€
     * @param ifsInventoryQuantity
@@ -238,6 +251,12 @@
    @Override
    public int inspectionReportOne(IfsInventoryQuantity ifsInventoryQuantity) {
        Integer userId = SecurityUtils.getUserId().intValue();
        boolean validateValue = OrderType.validateValue(ifsInventoryQuantity.getOrderType());
        if(!validateValue){
            throw new ErrorException("报检失败,非法的销售订单分类枚举");
        }
        //批次号字母转大写
        ifsInventoryQuantity.setUpdateBatchNo(ifsInventoryQuantity.getUpdateBatchNo().toUpperCase(Locale.ROOT));
        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
                .eq(IfsInventoryQuantity::getId, ifsInventoryQuantity.getId())
                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
@@ -245,6 +264,7 @@
                .set(IfsInventoryQuantity::getIsInspect, 1)
                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
                .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo())
                .set(IfsInventoryQuantity::getOrderType,ifsInventoryQuantity.getOrderType())
        );
        threadPoolTaskExecutor.execute(() -> {
@@ -415,8 +435,9 @@
        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
        ifsInventoryQuantityDto.setBeginDeclareDate(null);
        ifsInventoryQuantityDto.setEndDeclareDate(null);
        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
        IPage<IfsInventoryQuantitySupplierDto> ifsByOver = standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
        ifsByOver.getRecords().forEach(r->r.setOrderTypeName(OrderType.getLabelByValue(r.getOrderType())));
        return ifsByOver;
    }
@@ -533,6 +554,9 @@
        ifsInventoryQuantity.setIsSource(0);
        ifsInventoryQuantity.setState(0);
        ifsInventoryQuantity.setIsFinish(0);
        if(!OrderType.validateValue(ifsInventoryQuantity.getOrderType())){
            throw new ErrorException("新增报检信息失败,非法的销售订单分类枚举");
        }
        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
    }
@@ -796,7 +820,7 @@
        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
        ifsInventoryQuantityDto.setBeginDeclareDate(null);
        ifsInventoryQuantityDto.setEndDeclareDate(null);
        ifsInventoryQuantityDto.setOrderType(OrderType.RAW.getValue());
        return standardTreeMapper.getIfsByQuarter(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
    }
@@ -948,7 +972,7 @@
        if(Objects.nonNull(splitOrderList) && !splitOrderList.isEmpty()){
            List<Long> ids = splitOrderList.stream().map(IfsInventoryQuantity::getId).collect(Collectors.toList());
            ids.add(ifsInventoryQuantity.getId());
            this.inspectionReport(ids);
            this.inspectionReport(ids,OrderType.RAW.getValue());
        }
        //勾选同步到MES,保存订单拆分记录
        if(orderSplitDTO.getPushToMes()){
inspect-server/src/main/java/com/ruoyi/inspect/vo/IfsOrderVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
package com.ruoyi.inspect.vo;
import com.ruoyi.inspect.pojo.InsOrder;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
 * ifs订单vo
 */
@Data
public class IfsOrderVO extends InsOrder implements Serializable {
    /**
     * é›¶ä»¶æ‰¹æ¬¡å±žæ€§ä¸»é”®id
     */
    @ApiModelProperty("零件批次属性主键id")
    private Long lotPartId;
    /**
     * ç»ç¼˜é¢œè‰²
     */
    @ApiModelProperty("绝缘颜色")
    private String insulationColor;
    /**
     * å¤–护颜色
     */
    @ApiModelProperty("外护颜色")
    private String outerColor;
    /**
     * ç›˜å·
     */
    @ApiModelProperty("盘号")
    private String drumNo;
    /**
     * å°å­—信息
     */
    @ApiModelProperty("印字信息")
    private String letteringInfo;
    /**
     * èµ·å§‹ç±³æ ‡
     */
    @ApiModelProperty("起始米标")
    private BigDecimal startMeterMark;
    /**
     * æˆªæ­¢ç±³æ ‡
     */
    @ApiModelProperty("截止米标")
    private BigDecimal endMeterMark;
    /**
     * æ˜¯å¦æ˜¯æ‹†åˆ†è®¢å•(0:否 1:是)
     */
    @ApiModelProperty("是否是拆分订单(0:否 1:是)")
    private Integer isSplitOrder;
    /**
     * ifs订单分类(01raw:原材料 02wg:外购成品)
     */
    @ApiModelProperty("ifs订单分类(01raw:原材料 02wg:外购成品)")
    private String ifsOrderType;
    private String partNo;
    private String lotBatchNo;
}
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsSampleUserVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package com.ruoyi.inspect.vo;
import com.ruoyi.inspect.pojo.InsSampleUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class InsSampleUserVO extends InsSampleUser implements Serializable {
    /**
     * æ£€éªŒå‘˜
     */
    @ApiModelProperty("检验员")
    private String inspector;
    /**
     * æ£€éªŒæ—¥æœŸ
     */
    @ApiModelProperty("检验日期")
    private String inspectDate;
    /**
     * åž‹å·
     */
    @ApiModelProperty("型号")
    private String model;
}
inspect-server/src/main/resources/mapper/IfsPartPropsRecordMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.inspect.mapper.IfsPartPropsRecordMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.inspect.pojo.IfsPartPropsRecord">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="ifsInventoryId" column="ifs_inventory_id" jdbcType="BIGINT"/>
            <result property="drumNo" column="drum_no" jdbcType="VARCHAR"/>
            <result property="startMeterMark" column="start_meter_mark" jdbcType="DECIMAL"/>
            <result property="endMeterMark" column="end_meter_mark" jdbcType="DECIMAL"/>
            <result property="insulationColor" column="insulation_color" jdbcType="VARCHAR"/>
            <result property="outerColor" column="outer_color" jdbcType="VARCHAR"/>
            <result property="letteringInfo" column="lettering_info" jdbcType="VARCHAR"/>
            <result property="partPropsFlag" column="part_props_flag" jdbcType="BIT"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,ifs_inventory_id,drum_no,
        start_meter_mark,end_meter_mark,insulation_color,
        outer_color,lettering_info,part_props_flag
    </sql>
    <select id="selectCountByPartNoAndLotBatchNo" resultType="java.lang.Long">
        select
            COUNT(iiq.id)
        from ifs_inventory_quantity  iiq
            left join ifs_part_props_record ippr
                on iiq.id = ippr.ifs_inventory_id
        where iiq.part_no = #{partNo}
          and iiq.update_batch_no= #{lotBatchNo}
          and ippr.id  is not null
    </select>
</mapper>
inspect-server/src/main/resources/mapper/InsOrderMapper.xml
@@ -469,4 +469,42 @@
                and ip.structure_item_parameter_id = #{itmeId}
              group by io.id) a
    </select>
    <select id="selectOrderInfoById" resultType="com.ruoyi.inspect.vo.IfsOrderVO">
        select  io.*,
                iiq.is_split_order,
                iiq.order_type AS ifs_order_type,
                iiq.part_no,
                iiq.update_batch_no AS lot_batch_no,
                ipps.id AS lot_part_id,
                case
                    when ipps.drum_no is not null and ipps.drum_no!='' then ipps.drum_no
                    else isor.drum_no
                    end AS drum_no,
                case
                    when ipps.insulation_color is not null and ipps.insulation_color!='' then ipps.insulation_color
                    else isor.insulation_color
                    end AS insulation_color,
                case
                    when ipps.outer_color is not null and ipps.outer_color!='' then ipps.outer_color
                    else isor.outer_color
                    end AS outer_color,
                case
                    when ipps.lettering_info is not null and ipps.lettering_info!='' then ipps.lettering_info
                    else isor.lettering_info
                    end AS lettering_info,
                ipps.start_meter_mark,
                ipps.end_meter_mark
        from ins_order io left join ifs_inventory_quantity iiq on io.ifs_inventory_id=iiq.id
                          left join ifs_split_order_record isor
                                    on iiq.order_no=isor.order_no
                                        and iiq.line_no=isor.line_no
                                        and iiq.release_no=isor.release_no
                                        and iiq.receipt_no=isor.receipt_no
                                        and iiq.part_no=isor.part_no
                                        AND iiq.update_batch_no = isor.lot_batch_no
                          LEFT JOIN ifs_part_props_record ipps ON iiq.id = ipps.ifs_inventory_id
        where io.state !=-1
          AND io.id = #{id}
        LIMIT 1
    </select>
</mapper>
inspect-server/src/main/resources/mapper/InsSampleUserMapper.xml
@@ -1,4 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ruoyi.inspect.mapper.InsSampleUserMapper">
    <select id="selectUserNameByOrderId" resultType="com.ruoyi.inspect.vo.InsSampleUserVO">
        select
            group_concat(DISTINCT u.name separator ',') AS inspector,
            date_format(isu.create_time,'%Y-%m-%d') AS inspect_date,
            isa.model
        from ins_sample_user isu
                 left join ins_sample isa on isu.ins_sample_id = isa.ins_order_id
                 left join user u on isu.user_id=u.id
        where isu.ins_sample_id=#{orderId} and isu.state=0
        group by isu.ins_sample_id
        order by isu.create_time
    </select>
</mapper>
inspect-server/src/main/resources/static/small-wg-report-template.docx
Binary files differ
performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryOutputWorkingHoursMapper.java
@@ -8,6 +8,7 @@
import com.ruoyi.performance.dto.AuxiliaryOriginalHoursLookDto;
import com.ruoyi.performance.dto.AuxiliaryOutputWorkingHoursDto;
import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -21,6 +22,7 @@
 * @author æ±Ÿè‹éµ·é›ç½‘络科技有限公司
 * @since 2024-05-28 03:48:48
 */
@Mapper
public interface AuxiliaryOutputWorkingHoursMapper extends BaseMapper<AuxiliaryOutputWorkingHours> {
    IPage<AuxiliaryOutputWorkingHoursDto> selectAuxiliaryOutputWorkingHours(Page page, @Param("ew") QueryWrapper<AuxiliaryOutputWorkingHoursDto> ew, @Param("ids") List<Long> ids);
ruoyi-common/src/main/java/com/ruoyi/common/enums/OrderType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.ruoyi.common.enums;
import org.apache.commons.lang3.StringUtils;
public enum OrderType {
    RAW("原材料","01raw"),
    WG("外购成品","02wg");
    private String label,value;
    public String getLabel() {
        return label;
    }
    public String getValue() {
        return value;
    }
    OrderType(String label, String value) {
        this.label = label;
        this.value = value;
    }
    public static boolean validateValue(String value){
        boolean flag = false;
        for (OrderType orderType : OrderType.values()) {
            if(StringUtils.isNotBlank(value)&&StringUtils.equals(orderType.getValue(),value)){
                flag = true;
            }
        }
        return flag;
    }
    public static String getLabelByValue(String value){
        for (OrderType orderType : OrderType.values()) {
            if(validateValue(value)&&StringUtils.equals(orderType.getValue(), value)){
                return orderType.getLabel();
            }
        }
        return "";
    }
}
ruoyi-common/src/main/java/com/ruoyi/common/utils/QueryWrappers.java
@@ -51,8 +51,10 @@
            if (!field.getName().equals("orderBy")) {
                if(value.getClass()== LocalDateTime.class){
                    wrapper.like(StrUtil.toUnderlineCase(field.getName()), ((LocalDateTime) value).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
                }else{
                }else if(value.getClass()== String.class){
                    wrapper.like(StrUtil.toUnderlineCase(field.getName()), value);
                }else{
                    wrapper.eq(StrUtil.toUnderlineCase(field.getName()), value);
                }
            } else {
                Map<String, String> map = (Map<String, String>) value;
ruoyi-common/src/main/java/com/ruoyi/common/utils/api/IfsApiUtils.java
@@ -79,7 +79,15 @@
        return getResult("MODIFY_PURCH_RECEIPT_LOT_STD", inAttr, ifsProperties.getCustorder(), "修改采购订单批次号-->");
    }
    /**
     * åº“存物料批次属性新增修改接口
     *
     * @param inAttr
     * @return
     */
    public Result importPartLotAttr(String inAttr) {
        return getResult("IMPORT_PART_LOT_ATTR_STD", inAttr, ifsProperties.getCustorder(), "库存物料批次属性新增修改接口-->");
    }
    /**
     * æŸ¥è¯¢åº“存数据