| | |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.enumpack.*; |
| | | import com.vci.ubcs.code.mapper.CodeOsbtmtypeMapper; |
| | | import com.vci.ubcs.code.mapper.CodeWupinMapper; |
| | | import com.vci.ubcs.code.mapper.CommonsMapper; |
| | | import com.vci.ubcs.code.service.*; |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.UITablePageVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.feign.IEnumClient; |
| | | import com.vci.ubcs.omd.feign.IRevisionRuleClient; |
| | |
| | | */ |
| | | @Resource |
| | | private CodeClstemplateServiceImpl templateService; |
| | | /** |
| | | * 模板的服务 |
| | | */ |
| | | |
| | | @Resource |
| | | private CodeOsbtmtypeMapper codeOsbtmtypeMapper; |
| | | @Resource |
| | | private CodeOsattributeServiceImpl attributeService; |
| | | private IAttributeClient attributeClient; |
| | | |
| | | /** |
| | | * 生成编码的服务 |
| | | */ |
| | | @Resource |
| | | private MdmProductCodeService productCodeService; |
| | | |
| | | /** |
| | | * 可输可选的服务 |
| | | */ |
| | | @Resource |
| | | IDictBizClient iDictBizClient; |
| | | |
| | | /** |
| | | * 字典的服务 |
| | | */ |
| | | @Resource |
| | | IEnumClient enumClient; |
| | | |
| | | /** |
| | | * 公式的服务 |
| | | */ |
| | |
| | | List<String> oids = VciBaseUtil.str2List(baseModelDTO.getOid()); |
| | | // List<ClientBusinessObject> cboList = boService.selectCBOByOidCollection(oids, baseModelDTO.getBtmname()); |
| | | //插个点 业务类型完成后需要修改 |
| | | QueryWrapper<CodeOsbtmtypeEntity> wrapper = new QueryWrapper<>(); |
| | | QueryWrapper<BtmTypeVO> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("BTMNAME",baseModelDTO.getBtmname()); |
| | | wrapper.in("OID",oids); |
| | | List<CodeOsbtmtypeEntity> cboList = codeOsbtmtypeMapper.selectList(wrapper); |
| | | // 待完善 |
| | | List<BtmTypeVO> cboList = null; // btmTypeClient.selectList(wrapper); |
| | | //还需要修改allCode的生命周期 |
| | | // Map<String, String> conditionMap = new HashMap<>(); |
| | | QueryWrapper<CodeAllCode> allCodeWrapper = new QueryWrapper<>(); |
| | |
| | | // List<ClientBusinessObject> codeCbos = boService.queryCBO(MdmBtmTypeConstant.CODE_ALL_CODE, conditionMap); |
| | | // 回收需要业务数据删除 |
| | | if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) { |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | codeOsbtmtypeMapper.deleteBatchIds(cboList); |
| | | // boService.persistenceBatch(batchCBO); |
| | | } else { |
| | | // lifeCycleService.transCboStatus(cboList, baseModelDTO.getLcStatus()); |
| | | } |
| | | // lifeCycleService.transCboStatus(codeCbos, baseModelDTO.getLcStatus()); |
| | | } |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | |
| | | // 待完善 |
| | | //btmTypeClient.deleteBatchIds(cboList); |
| | | |
| | | //boService.persistenceBatch(batchCBO); |
| | | } else { |
| | | // lifeCycleService.transCboStatus(cboList, baseModelDTO.getLcStatus()); |
| | | } |
| | | // lifeCycleService.transCboStatus(codeCbos, baseModelDTO.getLcStatus()); |
| | | } |
| | | |
| | | /** |
| | | * 申请单一编码 |
| | |
| | | selectFieldList.add(referTableNick + "." + showFieldInSource + " as " + referShowField); |
| | | }); |
| | | } |
| | | Optional.ofNullable(attributeService.getDefaultAttributeVOMap()).orElseGet(() -> new HashMap<>()).keySet().stream().forEach(attrId -> { |
| | | if (!selectFieldList.contains(attrId) && !"secretgrade".equalsIgnoreCase(attrId)) { |
| | | selectFieldList.add(attrId); |
| | | } |
| | | }); |
| | | // 待完善 |
| | | // Optional.ofNullable(attributeService.getDefaultAttributeVOMap()).orElseGet(() -> new HashMap<>()).keySet().stream().forEach(attrId -> { |
| | | // if (!selectFieldList.contains(attrId) && !"secretgrade".equalsIgnoreCase(attrId)) { |
| | | // selectFieldList.add(attrId); |
| | | // } |
| | | // }); |
| | | if (!selectFieldList.contains(CODE_FIELD)) { |
| | | selectFieldList.add(CODE_FIELD); |
| | | } |
| | |
| | | */ |
| | | private String getSqlByValue(String selectKey, String value, Map<String, CodeClassifyTemplateAttrVO> attrVOMap) { |
| | | StringBuilder sql = new StringBuilder(); |
| | | if (!selectKey.contains(".") && (attrVOMap.containsKey(selectKey.toLowerCase(Locale.ROOT)) || attributeService.isDefaultAttr(selectKey) || selectKey.matches(RegExpConstant.LETTER))) { |
| | | sql.append("t."); |
| | | } |
| | | // 待完善 |
| | | // if (!selectKey.contains(".") && (attrVOMap.containsKey(selectKey.toLowerCase(Locale.ROOT)) || attributeService.isDefaultAttr(selectKey) || selectKey.matches(RegExpConstant.LETTER))) { |
| | | // sql.append("t."); |
| | | // } |
| | | if (value.startsWith(QueryOptionConstant.IN)) { |
| | | sql.append(selectKey) |
| | | .append(SPACE) |