value
2024-06-07 c92bf69063c83be167d796fd4576e3b95dd7880e
实现电缆配置
已修改3个文件
23 ■■■■■ 文件已修改
inspect-server/src/main/java/com/yuanchu/mom/dto/SampleProductDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsSample.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/yuanchu/mom/dto/SampleProductDto.java
@@ -13,4 +13,6 @@
    private List<BushingDto> bushing;
    private List<SampleProductDto> childSampleList;
}
inspect-server/src/main/java/com/yuanchu/mom/pojo/InsSample.java
@@ -109,4 +109,9 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    private Integer parentId;
    @TableField(select = false,exist = false)
    private Integer num;
}
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderServiceImpl.java
@@ -147,6 +147,22 @@
            if (ObjectUtil.isNotEmpty(a.getInsProduct())) {
                addInsProductMethod(a.getId(), a.getInsProduct(), null, 0);
            }
            if(ObjectUtil.isNotEmpty(a.getChildSampleList())){
                for (SampleProductDto b : a.getChildSampleList()) {
                    for (int i = 0; i < b.getNum(); i++) {
                        b.setId(null);
                        b.setInsOrderId(insOrder.getId());
                        b.setParentId(a.getId());
                        if (StrUtil.isEmpty(b.getSampleCode())) {
                            b.setSampleCode(giveCode.giveCode("", "ins_sample", "", "yyMMdd"));
                        }
                        insSampleMapper.insert(b);
                        if (ObjectUtil.isNotEmpty(b.getInsProduct())) {
                            addInsProductMethod(b.getId(), b.getInsProduct(), null, 0);
                        }
                    }
                }
            }
            if (ObjectUtil.isNotEmpty(a.getBushing())) {
                for (BushingDto bushingDto : a.getBushing()) {
                    bushingDto.setInsSampleId(a.getId());