| | |
| | | import com.vci.ubcs.code.mapper.CodeClassifyTemplateAttrMapper; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyTemplateMapper; |
| | | import com.vci.ubcs.code.service.ICodeClassifyTemplateAttrService; |
| | | import com.vci.ubcs.code.service.ICodeReferConfigService; |
| | | import com.vci.ubcs.code.service.ICodeTempphaseService; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyTemplateAttrWrapper; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cglib.beans.BeanMap; |
| | |
| | | |
| | | @Resource |
| | | CodeClassifyTemplateMapper codeClassifyTemplateMapper; |
| | | |
| | | @Resource |
| | | private ICodeReferConfigService codeReferConfigService; |
| | | |
| | | @Resource |
| | | @Lazy |
| | |
| | | pageHelper.addDefaultAsc("ordernum"); |
| | | Query query = new Query(); |
| | | query.setAscs("ordernum"); |
| | | query.setSize(pageHelper.getLimit()); |
| | | if(pageHelper.getLimit() != -1){ |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | } |
| | | IPage<CodeClassifyTemplateAttr> doList = baseMapper. |
| | |
| | | throw new VciBaseException("模板属性英文名称【{0}】重复",new String[]{ repeatIdList.stream().collect(Collectors.joining(","))}); |
| | | } |
| | | |
| | | //模板oid |
| | | // 模板oid |
| | | String CLASSIFYTEMPLATEOID = null; |
| | | // |
| | | CodeReferConfigVO codeReferConfigVO = null; |
| | | //转换 |
| | | List<CodeClassifyTemplateAttr> codeClassifyTemplateAttrDOInsert = new ArrayList<CodeClassifyTemplateAttr>(); |
| | | List<String> prefix = new ArrayList<>(); |
| | |
| | | CLASSIFYTEMPLATEOID = codeClassifyTemplateAttrDTO.getClassifyTemplateOid(); |
| | | } |
| | | |
| | | // 参照配置是否需要持久化 |
| | | codeReferConfigVO = JSONObject.parseObject(codeClassifyTemplateAttrDTO.getReferConfig(), CodeReferConfigVO.class); |
| | | if(Func.isNotEmpty(codeReferConfigVO) && codeReferConfigVO.getIsPersistence()=="true"){ |
| | | codeReferConfigService.insert(codeReferConfigVO); |
| | | } |
| | | |
| | | } |
| | | |
| | | //执行数据保存操作 |
| | |
| | | if(!CollectionUtils.isEmpty(oids)){ |
| | | this.removeBatchByIds(oids); |
| | | } |
| | | |
| | | //再新增 |
| | | if(!CollectionUtils.isEmpty(codeClassifyTemplateAttrDOInsert)){ |
| | | this.saveBatch(codeClassifyTemplateAttrDOInsert); |
| | |
| | | // queryWrapper.addQueryMap("CLASSIFYTEMPLATEOID",templateAttrOid); |
| | | Map<String,Object> condition = new HashMap<>(1); |
| | | condition.put("CLASSIFYTEMPLATEOID",templateAttrOid); |
| | | |
| | | List<CodeClassifyTemplateAttr> codeClassifyTemplateAttrDOList = baseMapper.selectByMap(condition); |
| | | |
| | | List<String> btmIds = new ArrayList<String>(); |
| | |
| | | |
| | | //过滤掉已经存在的属性 |
| | | List<BtmTypeAttributeVO> boAttrss = new ArrayList<BtmTypeAttributeVO>(); |
| | | |
| | | for (BtmTypeAttributeVO osBtmTypeAttributeVO:btmTypeVOR.getData().getAttributes()){ |
| | | if(!btmIds.contains(osBtmTypeAttributeVO.getId())){ |
| | | //看看是不是有模糊查询 |
| | |
| | | } |
| | | } |
| | | } |
| | | // 按照id升序排序 |
| | | boAttrss = boAttrss.stream().sorted(Comparator.comparing(BtmTypeAttributeVO::getId)).collect(Collectors.toList()); |
| | | dataGrid.setData(boAttrss); |
| | | dataGrid.setTotal(boAttrss.size()); |
| | | return dataGrid; |