| | |
| | | import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vincent.rsf.framework.common.R; |
| | |
| | | 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); |
| | | }); |
| | |
| | | |
| | | @Override |
| | | public PageParam<Matnr, BaseParam> getMatnrPage(PageParam<Matnr, BaseParam> pageParam) { |
| | | QueryWrapper<Matnr> queryWrapper = pageParam.buildWrapper(true); |
| | | IPage<Map<String, Object>> reulst = this.baseMapper.selectMatnrs(pageParam, pageParam.buildWrapper(true)); |
| | | /**获取物料分页信息 */ |
| | | List<Map<String, Object>> mapList = reulst.getRecords(); |
| | |
| | | */ |
| | | 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"); |