| | |
| | | } |
| | | //获取动态字段,并保存明细内容 |
| | | if (!FieldsUtils.getFieldsSta().isEmpty()) { |
| | | String uuid = CommonUtil.randomUUID16(); |
| | | matnr.setFieldsIndex(uuid); |
| | | //保存物料扩展属性值 |
| | | try { |
| | | FieldsUtils.saveFields(template, uuid); |
| | | String uuid = CommonUtil.randomUUID16(); |
| | | boolean b = FieldsUtils.saveFields(template, uuid); |
| | | if (b) { |
| | | matnr.setFieldsIndex(uuid); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | // IPage<Map<String, Object>> reulst = this.baseMapper.selectMatnrs(pageParam, queryWrapper); |
| | | // /**获取物料分页信息 */ |
| | | // List<Map<String, Object>> mapList = reulst.getRecords(); |
| | | // if (!mapList.isEmpty()) { |
| | | // mapList.forEach(map -> { |
| | | // if (!Objects.isNull(map.get("fieldsIndex"))) { |
| | | // FieldsUtils.mergeFields(map, map.get("fieldsIndex").toString()); |
| | | // } |
| | | // }); |
| | | // } |
| | | |
| | | /**拼接扩展字段*/ |
| | | PageParam<Matnr, BaseParam> page = this.page(pageParam, queryWrapper); |
| | | List<Matnr> records = page.getRecords(); |
| | |
| | | */ |
| | | String uuid16 = CommonUtil.randomUUID16(); |
| | | if (!FieldsUtils.getFieldsSta().isEmpty()) { |
| | | Map<String, ?> extendFields = (Map<String, ?>) matnr.get("extendFields"); |
| | | // Map<String, ?> extendFields = (Map<String, ?>) matnr.get("extendFields"); |
| | | try { |
| | | FieldsUtils.saveFields(extendFields, uuid16); |
| | | FieldsUtils.saveFields(matnr, uuid16); |
| | | matnr1.setFieldsIndex(uuid16); |
| | | } catch (Exception ex) { |
| | | log.error(ex.toString()); |