Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeKeyAttrRepeat.java
@@ -126,7 +126,7 @@ * */ @ApiModelProperty(value = "") private Short revisionseq; private Integer revisionseq; /** * */ @@ -136,7 +136,7 @@ * */ @ApiModelProperty(value = "") private Short versionseq; private Integer versionseq; /** * */ Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeSerialValue.java
@@ -13,7 +13,7 @@ * @date 2022-3-1 */ @Data @TableName("PL_CODE_CODESERIALVALUE") @TableName("PL_CODE_SERIALVALUE") @ApiModel(value = "CodeSerialValue对象", description = "编码规则的流水值") @EqualsAndHashCode(callSuper = true) public class CodeSerialValue extends BaseModel { Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeWupin.java
@@ -116,7 +116,7 @@ * */ @ApiModelProperty(value = "") private Short materialtype; private Integer materialtype; /** * */ Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/service/RevisionModelUtil.java
@@ -55,6 +55,7 @@ oidValues.add(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField(s, doObject))); }); tree.setOid((String)oidValues.stream().collect(Collectors.joining(wrapperOptions.getOidValueSep()))); tree.setName((String) VciBaseUtil.getValueFromField("name", doObject)); if (f != null) { tree.setText((String)f.apply(doObject)); } else { Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
@@ -14,6 +14,7 @@ private static final long serialVersionUID = 6886695271635257882L; private String oid; private String text; private String name; private boolean leaf = false; private boolean showCheckbox = false; private boolean checked = false; @@ -44,6 +45,14 @@ this.oid = oid; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getText() { return this.text; } Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/BeanUtilForVCI.java
@@ -7,9 +7,19 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.math.BigDecimal; import java.util.*; public class BeanUtilForVCI { @@ -159,4 +169,136 @@ return result; } } /** * 将一个 Map 对象转化为一个 JavaBean * @param clazz 要转化的类型 * @param map 包含属性值的 map * @return 转化出来的 JavaBean 对象 * @throws IntrospectionException * 如果分析类属性失败 * @throws IllegalAccessException * 如果实例化 JavaBean 失败 * @throws InstantiationException * 如果实例化 JavaBean 失败 * @throws InvocationTargetException * 如果调用属性的 setter 方法失败 */ public static <T>T convertMap(Class<T> clazz, Map map) throws IntrospectionException, IllegalAccessException, InstantiationException, InvocationTargetException { BeanInfo beanInfo = Introspector.getBeanInfo(clazz); // 获取类属性 T obj = clazz.newInstance(); // 给 JavaBean 对象的属性赋值 PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); for (int i = 0; i< propertyDescriptors.length; i++) { PropertyDescriptor descriptor = propertyDescriptors[i]; String propertyName = descriptor.getName(); if (map.containsKey(propertyName)) { // 下面一句可以 try 起来,这样当一个属性赋值失败的时候就不会影响其他属性赋值。 Object value = map.get(propertyName); Object[] args = new Object[1]; args[0] = value; Field privateField = getPrivateField(propertyName, clazz); if (privateField == null) { } privateField.setAccessible(true); String type = privateField.getGenericType().toString(); if (type.equals("class java.lang.String")) { privateField.set(obj, value); } else if (type.equals("class java.lang.Boolean")) { privateField.set(obj, Boolean.parseBoolean(String.valueOf(value))); } else if (type.equals("class java.lang.Long")) { privateField.set(obj, Long.parseLong(String.valueOf(value))); } else if (type.equals("class java.lang.Integer")) { privateField.set(obj, Integer.parseInt(String.valueOf(value))); } else if (type.equals("class java.lang.Double")) { privateField.set(obj,Double.parseDouble(String.valueOf(value))); } else if (type.equals("class java.lang.Float")) { privateField.set(obj,Float.parseFloat(String.valueOf(value))); } else if (type.equals("class java.math.BigDecimal")){ privateField.set(obj,new BigDecimal(String.valueOf(value))); }//可继续追加类型 } } return obj; } /*拿到反射父类私有属性*/ private static Field getPrivateField(String name, Class cls) { Field declaredField = null; try { declaredField = cls.getDeclaredField(name); } catch (NoSuchFieldException ex) { if (cls.getSuperclass() == null) { return declaredField; } else { declaredField = getPrivateField(name, cls.getSuperclass()); } } return declaredField; } /** * 获取到对象中属性为null的属性名 * * @param source * @return */ private static String[] getNullPropertyNames(Object source) { final BeanWrapper src = new BeanWrapperImpl(source); PropertyDescriptor[] pds = src.getPropertyDescriptors(); Set<String> emptyNames = new HashSet<>(); for (PropertyDescriptor pd : pds) { Object srcValue = src.getPropertyValue(pd.getName()); if (ObjectUtils.isEmpty(srcValue)) { emptyNames.add(pd.getName()); } } String[] result = new String[emptyNames.size()]; return emptyNames.toArray(result); } /** * 拷贝非空对象属性值 * * @param source * @param target */ public static void copyPropertiesIgnoreNull(Object source, Object target) { BeanUtils.copyProperties(source, target, getNullPropertyNames(source)); } /** * 集合拷贝非空数据 * * @param source 数据源 * @param target 目标 * @param propertyName 要匹配的属性名,例如两个集合使用id进行匹配拷贝 propertyName: "id" */ public static void copyListPropertiesIgnoreNull(List<?> source, List<?> target, String propertyName) { if (CollectionUtils.isEmpty(source)) { throw new NullPointerException("copyListPropertiesIgnoreNull source源数据为空!"); } Map<Object, Object> map = new HashMap<>(source.size()); source.forEach(s -> { final BeanWrapper sourceBean = new BeanWrapperImpl(s); Object value = sourceBean.getPropertyValue(propertyName); if (value == null) { throw new NullPointerException("copyListPropertiesIgnoreNull获取参数异常"); } map.put(value, s); }); target.forEach(s -> { final BeanWrapper targetBean = new BeanWrapperImpl(s); Object value = targetBean.getPropertyValue(propertyName); if (value == null) { throw new NullPointerException("copyListPropertiesIgnoreNull获取参数异常"); } Object o = map.get(value); copyPropertiesIgnoreNull(o, s); }); } } Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -687,13 +687,14 @@ if(StringUtils.isBlank(ruleOid)){ return new ArrayList<>(); } Map<String,String> conditionMap = new HashMap<>(); conditionMap.put("pkCodeRule",ruleOid); // Map<String,String> conditionMap = new HashMap<>(); // conditionMap.put("pkCodeRule",ruleOid); // PageHelper pageHelper = new PageHelper(-1); // pageHelper.addDefaultAsc("ordernum"); QueryWrapper<CodeBasicSec> wrapper = new QueryWrapper<>(); wrapper.eq("pkCodeRule",ruleOid); wrapper.orderByAsc("ordernum"); List<CodeBasicSec> secDOList = codeBasicSecMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper); List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper); return codeBasicSecDO2VOs(secDOList,true); } Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -25,6 +25,7 @@ import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; import com.vci.ubcs.code.vo.pagemodel.CodeKeyAttrRepeatRuleVO; import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; import com.vci.ubcs.core.log.exception.ServiceException; import com.vci.ubcs.starter.bo.WriteExcelData; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.poi.bo.ReadExcelOption; @@ -45,7 +46,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; @@ -255,7 +255,7 @@ if(StringUtils.isBlank(oid)){ throw new ServiceException("oid不能为空!"); } return !codeClassifyMapper.checkHasChild(oid.trim()); return codeClassifyMapper.checkHasChild(oid.trim()); } @@ -1089,14 +1089,16 @@ CodeClassify classifyDO = selectByOid(codeClassifyOid); //查询上级 fullInfo.setCurrentClassifyVO(codeClassifyDO2VO(classifyDO)); List<Map<String, Object>> maps = codeClassifyMapper.selectAllLevelParentByOid(codeClassifyOid); List<CodeClassify> codeClassifyList = new ArrayList<>(); for (Map<String, Object> map : maps) { CodeClassify codeClassify = new CodeClassify(); codeClassify.setOid(String.valueOf(map.get("OID"))); codeClassify.setOid(String.valueOf(map.get("LEVEL"))); codeClassifyList.add(codeClassify); } // List<Map<String, Object>> maps = codeClassifyMapper.selectAllLevelParentByOid(codeClassifyOid); // List<Map<String, Object>> maps = selectAllLevelParentByOid(codeClassifyOid); List<CodeClassify> codeClassifyList = selectAllLevelParentByOid(codeClassifyOid); // for (Map<String, Object> map : maps) { // CodeClassify codeClassify = new CodeClassify(); // codeClassify.setOid(String.valueOf(map.get("OID"))); // codeClassify.setDataLevel((Integer) map.get("LEVEL")); // codeClassifyList.add(codeClassify); // } fullInfo.setParentClassifyVOs(codeClassifyDO2VOs(codeClassifyList)); if(!CollectionUtils.isEmpty(fullInfo.getParentClassifyVOs())){ fullInfo.setTopClassifyVO(fullInfo.getParentClassifyVOs().stream().filter(s->StringUtils.isBlank(s.getParentcodeclassifyoid())).findFirst().orElseGet(()->null)); Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
@@ -648,7 +648,10 @@ codeClassifyTemplateDO_old.setDescription(codeClassifyDTO.getDescription());//描述 codeClassifyTemplateDO_old.setCodeClassifyOid(codeClassifyOid);//分类oid codeClassifyTemplateDO_old.setOid(newOid); List<CodeClassifyTemplate> codeClassifyTemplateDOList = new ArrayList<CodeClassifyTemplate>(); codeClassifyTemplateDO_old.setTs(new Date()); codeClassifyTemplateDO_old.setCreateTime(new Date()); codeClassifyTemplateDO_old.setLastModifyTime(new Date()); List<CodeClassifyTemplate> codeClassifyTemplateDOList = new ArrayList<>(); codeClassifyTemplateDOList.add(codeClassifyTemplateDO_old); //复制模板属性 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -21,6 +21,9 @@ import com.vci.ubcs.code.vo.pagemodel.*; import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO; import com.vci.ubcs.code.vo.pagemodel.UITablePageVO; import com.vci.ubcs.omd.feign.IEnumClient; import com.vci.ubcs.omd.feign.IEnumItemClient; import com.vci.ubcs.omd.vo.EnumVO; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.revision.model.TreeWrapperOptions; import com.vci.ubcs.starter.revision.service.RevisionModelUtil; @@ -31,12 +34,10 @@ import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; import com.vci.ubcs.starter.web.pagemodel.*; import com.vci.ubcs.starter.web.toolmodel.DateConverter; import com.vci.ubcs.starter.web.util.VciBaseUtil; import com.vci.ubcs.starter.web.util.VciDateUtil; import com.vci.ubcs.starter.web.util.VciQueryWrapperForDO; import com.vci.ubcs.starter.web.util.WebUtil; import com.vci.ubcs.starter.web.util.*; import com.vci.ubcs.system.entity.DictBiz; import com.vci.ubcs.system.feign.IDictBizClient; import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils; import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -44,10 +45,13 @@ import org.springblade.core.tool.api.R; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cglib.beans.BeanMap; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.beans.IntrospectionException; import java.lang.reflect.InvocationTargetException; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; @@ -84,10 +88,15 @@ @Resource private MdmProductCodeService productCodeService; /** * 字典的服务 * 可输可选的服务 */ @Resource IDictBizClient iDictBizClient; /** * 字典的服务 */ @Resource IEnumClient enumClient; /** * 公式的服务 */ @@ -244,19 +253,19 @@ */ @Override public List<KeyValue> listComboboxItems(CodeClassifyTemplateAttrVO attrVO) { List<KeyValue> comboboxKVs = null; List<KeyValue> comboboxKVs = new ArrayList<>(); if (StringUtils.isNotBlank(attrVO.getEnumString())) { comboboxKVs = JSONObject.parseArray(attrVO.getEnumString(), KeyValue.class); } else { // comboboxKVs = enumService.getEnum(attrVO.getEnumid()); // Dict dict = new Dict(); // dict.setParentId(Long.valueOf(attrVO.getEnumid())); R<List<DictBiz>> list = iDictBizClient.getList(attrVO.getEnumId()); R<List<EnumVO>> list = enumClient.getList(attrVO.getEnumId()); if(list.isSuccess()){ for (DictBiz datum : list.getData()) { for (EnumVO datum : list.getData()) { KeyValue keyValue = new KeyValue(); keyValue.setKey(datum.getDictKey()); keyValue.setValue(datum.getDictValue()); keyValue.setKey(datum.getItemValue()); keyValue.setValue(datum.getItemName()); comboboxKVs.add(keyValue); } } @@ -563,7 +572,9 @@ //没有限制分类,但是一个模板只可能在一个业务类型里面,所以直接查询这个业务类型即可 if (!CollectionUtils.isEmpty(conditionMap)) { final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "}; //表需要改 // final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "}; final String[] sql = {"select count(*) from pl_code_wupin t where 1 = 1 "}; conditionMap.forEach((key, value) -> { sql[0] += " and " + key + " = " + value; }); @@ -700,7 +711,7 @@ */ private void copyValueToCBO(CodeClassifyFullInfoBO classifyFullInfo, CodeWupin cbo, CodeOrderDTO orderDTO, CodeClassifyTemplateVO templateVO, boolean edit) { boolean edit) { String fullPath = ""; if (!CollectionUtils.isEmpty(classifyFullInfo.getParentClassifyVOs())) { fullPath = classifyFullInfo.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel()))) @@ -710,8 +721,8 @@ } // BeanUtils. BeanUtils.copyProperties(orderDTO.getData(),cbo); cbo.setMaterialtype(Short.valueOf("1001")); // BeanUtils.copyProperties(orderDTO.getData(),cbo); // cbo.setMaterialtype(Short.valueOf("1001")); // orderDTO.getData().forEach((key, value) -> { // if (!edit || (!checkUnAttrUnEdit(key) && // !VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) { @@ -722,18 +733,19 @@ // } // } // }); // BeanMap beanMap = BeanMap.create(cbo); // beanMap.putAll(orderDTO.getData()); try { BeanUtilForVCI.copyPropertiesIgnoreNull(BeanUtilForVCI.convertMap(CodeWupin.class,orderDTO.getData()),cbo); cbo.setCodeclsfid(classifyFullInfo.getCurrentClassifyVO().getOid()); cbo.setCodetemplateoid(templateVO.getOid()); cbo.setCodeclsfpath(fullPath); // cbo.setMaterialclassify("model_type"); // cbo.setMaterialname(orderDTO.getData().get("materialname")); // cbo.setShifoupihaoguanli("true"); // cbo.setKucunwl("true"); // cbo.setXiaoshouwl("false"); cbo.setTs(new Date()); if (!edit && StringUtils.isBlank(orderDTO.getLcStatus())) { //找生命周期的起始状态,插个点,看生命周期是否需要创建 //找生命周期的起始状态,插个点,生命周期是否需要创建 if (StringUtils.isNotBlank(cbo.getLctid())) { // OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(cbo.getLctid()); // if (lifeCycleVO != null) { @@ -748,7 +760,7 @@ } int secret = VciBaseUtil.getInt(cbo.getSecretGrade().toString()); int secret = VciBaseUtil.getInt(String.valueOf(cbo.getSecretGrade())); //插个点,后续看密级服务是否可用 // if (secret == 0 || !secretService.checkDataSecret(secret)) { if (secret == 0 ) { @@ -789,13 +801,13 @@ // } // ClientBusinessObject cbo = cloneClientBusinessObject(hasCreatedCbos.get(btmName)); QueryWrapper<CodeOsbtmtypeEntity> btmWrapper = new QueryWrapper<>(); btmWrapper.eq("ID",btmName); CodeOsbtmtypeEntity btmTypeVO = codeOsbtmtypeMapper.selectOne(btmWrapper); // QueryWrapper<CodeOsbtmtypeEntity> btmWrapper = new QueryWrapper<>(); // btmWrapper.eq("ID",btmName); // CodeOsbtmtypeEntity btmTypeVO = codeOsbtmtypeMapper.selectOne(btmWrapper); // OsBtmTypeVO btmTypeVO = btmService.getBtmById(boName); String userName = AuthUtil.getUser().getUserName(); CodeWupin wupinEntity = new CodeWupin(); wupinEntity.setOid(null); wupinEntity.setOid(VciBaseUtil.getPk()); // bo.setRevisionid((new ObjectUtility()).getNewObjectID36()); // bo.setNameoid((new ObjectUtility()).getNewObjectID36()); wupinEntity.setBtmname(btmName); @@ -807,13 +819,13 @@ wupinEntity.setCreateTime(new Date()); wupinEntity.setLastModifier(userName); wupinEntity.setLastModifyTime(new Date()); wupinEntity.setRevisionRule(btmTypeVO.getRevisionruleid()); wupinEntity.setVersionRule(String.valueOf(btmTypeVO.getVersionRule())); if(StringUtils.isNotBlank(btmTypeVO.getRevisionruleid())){ //插个点,需要问勇哥版本问题,展示默认为1 wupinEntity.setRevisionRule("numberversionrule"); wupinEntity.setVersionRule("0"); // if(StringUtils.isNotBlank(btmTypeVO.getRevisionruleid())){ // // OsRevisionRuleVO revisionRuleVO = revisionRuleService.getRevisionRuleById(btmTypeVO.getRevisionruleid()); wupinEntity.setRevisionValue("1"); } wupinEntity.setRevisionValue("1"); // } wupinEntity.setRevisionSeq(1); wupinEntity.setVersionSeq(1); @@ -827,7 +839,7 @@ wupinEntity.setOwner(userName); wupinEntity.setCheckinby(userName); wupinEntity.setCopyFromVersion(""); wupinEntity.setMaterialtype((short) 1001); wupinEntity.setMaterialtype(1001); wupinEntity.setCaigouwl("true"); wupinEntity.setShifoupihaoguanli("true"); wupinEntity.setKucunwl("true"); @@ -1341,7 +1353,7 @@ maps.stream().forEach(map -> { Map<String, String> data = new HashMap<>(); map.forEach((key, value) -> { data.put(((String) key).toLowerCase(Locale.ROOT), (String) value); data.put(((String) key).toLowerCase(Locale.ROOT), String.valueOf(value)); }); dataList.add(data); }); @@ -1514,8 +1526,9 @@ referVO.setValueField(VciQueryWrapperForDO.OID_FIELD); referVO.setTextField("name"); } String referTable = VciBaseUtil.getTableName(referVO.getReferType()); //表需要改 // String referTable = VciBaseUtil.getTableName(referVO.getReferType()); String referTable = "pl_code_wupin"; String referTableNick = attrVO.getId() + "0"; String left = " left join " + referTable + " " + referTableNick + " on " + referTableNick + "." + referVO.getValueField() + " = t." + attrVO.getId(); joinTableList.put(attrVO.getId(), left); @@ -1603,7 +1616,9 @@ } whereSql += " and ( t.secretGrade <= " + userSecret + ") "; } String tableName = VciBaseUtil.getTableName(btmType); //要改,表明获取有问题 // String tableName = VciBaseUtil.getTableName(btmType); String tableName = "pl_code_wupin"; String sql = "select " + selectFieldList.stream().map(s -> (s.contains(".") ? s : ("t." + s))).collect(Collectors.joining(",")) + " from " + tableName + SPACE + "t" + SPACE + joinTableList.values().stream().collect(Collectors.joining(SPACE)) @@ -2049,12 +2064,13 @@ if (!classifyService.checkHasChild(codeClassifyOid)) { conditionMap.put(CODE_CLASSIFY_OID_FIELD, codeClassifyOid); } else { conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY) + " where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED + //表需要改 // conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY) conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from pl_code_wupin where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED + "' start with parentCodeClassifyOid = '" + codeClassifyOid + "' CONNECT BY PRIOR OID = parentCodeClassifyOid )"); } conditionMap.put("islastr", "1"); conditionMap.put("islastv", "1"); conditionMap.put("lastr", "1"); conditionMap.put("lastv", "1"); return queryGrid(btmTypeId, templateVO, conditionMap, pageHelper); // List<String> selectFieldList = templateVO.getAttributes().stream().map(CodeClassifyTemplateAttrVO::getId).collect(Collectors.toList()); // //参照让平台直接查询就行 @@ -2437,7 +2453,7 @@ executionId = executionId.substring(0, executionId.lastIndexOf(".")); } String sql = "select wm_concat(distinct (t.codetempattrOidArr)) codetempattroidarr\n" + "from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY_PROCESS_TEMPLATE) + " t\n" + "from pl_code_wupin t\n" + "join PLFLOWINSTANCE plfi on t.ID = plfi.PLTEMPLATEPUID\n" + "where plfi.PLEXECUTIONID = '" + executionId + "' and t.CLASSIFYTEMPLATEOID = '" + templateOid + "' and t.CODEPROCESSUSE = '" + processUse + "'"; // List<ClientBusinessObject> tempAttrOidArr = boService.queryByOnlySql(sql); Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
@@ -20,6 +20,7 @@ import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; import com.vci.ubcs.starter.exception.VciBaseException; import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; import com.vci.ubcs.starter.web.constant.QueryOptionConstant; import com.vci.ubcs.starter.web.constant.RegExpConstant; import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum; @@ -304,6 +305,9 @@ s.setLcStatus(statusMap.get(s.getOid())); }); allCodeDOList.stream().forEach( allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} ); codeAllCodeService.saveBatch(allCodeDOList); iCodeWupinService.saveBatch(dataCBOList); // batchCBO.getCreateCbos().stream().filter(s -> StringUtils.equalsIgnoreCase("codeallcode",s.getBtmName())).forEach(s -> { Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -52,9 +52,9 @@ </select> <select id="checkHasChild" resultType="java.lang.Boolean"> select count(oid) <![CDATA[select count(oid) from PL_CODE_CLASSIFY where parentCodeClassifyOid = #{oid} where parentCodeClassifyOid = #{oid}]]> </select> <select id="selectCodeClassifyVOByTree" resultMap="plCodeClassifyResultMap"> @@ -141,7 +141,8 @@ </select> <select id="selectAllLevelParentByOid" resultType="java.util.HashMap"> select oid,level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid select oid, level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid </select> <select id="selectByFieldNamePath" resultMap="plCodeClassifyResultMap"> Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodePhaseAttrMapper.xml
@@ -80,31 +80,27 @@ description, oid, versionseq, checkinby, revisionrule, lctid, id, owner, checkoutby, creator, createtime, isfirstv, firstv, attributegroup, revisionoid, btmname, checkouttime, revisionvalue, versionrule, name, islastr, lastr, lastmodifytime, copyfromversion, nameoid, lcstatus, islastv, checkintime, lastv, codephaseoid, isfirstr firstr from PL_CODE_PHASEATTR where codephaseoid in (#{oids})