skyouc
2025-03-26 f8c64c4e54cec545eb613d8450932096f15937ef
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/MatnrServiceImpl.java
@@ -87,7 +87,11 @@
                String uuid = CommonUtil.randomUUID16();
                matnr.setFieldsIndex(uuid);
                //保存物料扩展属性值
                FieldsUtils.saveFields(template, uuid);
                try {
                    FieldsUtils.saveFields(template, uuid);
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
            matnrs.add(matnr);
        });
@@ -212,8 +216,14 @@
         */
        String uuid16 = CommonUtil.randomUUID16();
        if (!FieldsUtils.getFieldsSta().isEmpty()) {
            FieldsUtils.saveFields(matnr, uuid16);
            matnr1.setFieldsIndex(uuid16);
            Map<String, ?> extendFields = (Map<String, ?>) matnr.get("extendFields");
            try {
                FieldsUtils.saveFields(extendFields, uuid16);
                matnr1.setFieldsIndex(uuid16);
            } catch (Exception ex) {
                log.error(ex.toString());
                throw new CoolException("动态字段保存失败");
            }
        }
        if (!this.saveOrUpdate(matnr1)) {
            return R.error("Save Fail");