value
2024-06-07 c92bf69063c83be167d796fd4576e3b95dd7880e
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());