Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/controller/TestCalledIntegrationController.java
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.net.MalformedURLException; @@ -28,5 +29,9 @@ calledIntegrationService.sendApplyCodeByWebService(); } @GetMapping("/sendApplyCodeByWebServicexml") public void sendApplyCodeByWebServicexml(@RequestParam("frequency") Integer frequency) throws MalformedURLException, RemoteException { calledIntegrationService.sendApplyCodeByWebServicexml(frequency); } } Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/ICalledIntegrationService.java
@@ -21,6 +21,9 @@ void sendApplyCodeByWebService() throws MalformedURLException, RemoteException; /** * 编码系统,统一申请接口,用WebService方式调用xml */ void sendApplyCodeByWebServicexml(int frequency) throws MalformedURLException, RemoteException; } Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/CalledIntegrationServiceImpl.java
@@ -151,6 +151,125 @@ } /** * 对编码系统统一申请接口调用,WebService方式 */ @Override public void sendApplyCodeByWebServicexml(int frequency) throws MalformedURLException, RemoteException { //使用sopui生成调用webservice接口的代码 String dataType = "xml"; //或者xml String dataString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<data systemId=\"PDM\">\n" + " <user ip=\"130.31.92.101\" trueName=\"王琪\" userName=\"19851584\"/>\n" + " <classifys>\n" + " <classify classCode=\"1025\" fullclsfNamePath=\"\" library=\"10\">\n" + " <sections>\n" + " <section name=\"分类\" value=\"1025\"/>\n" + " </sections>\n" + " <objects>\n" + " <object code=\"\" creator=\"19851584\" id=\"2548M16G02\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2548M16G02\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"高压涡轮静止密封圈\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2548M16P06\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2548M16P06\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"法兰盘\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2548M16P02\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2548M16P02\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"焊接法兰盘\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2548M16P05\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2548M16P05\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"防风罩\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2548M16P03\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2548M16P03\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"封严蜂窝\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2548M16P04\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2548M16P04\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"蜂窝封严边\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2551M46P01\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2551M46P01\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"壳体固定环\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2552M51G07\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2552M51G07\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"压气机机匣尾部中心支架\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2552M51P08\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2552M51P08\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"压气机机匣尾部中心支架\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"2552M51P02\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"2552M51P02\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"压气机尾部中心支架\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " <object code=\"\" creator=\"19851584\" id=\"4127T52P06\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1025\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"4127T52P06\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"设计零组件\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"销子\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " </object>\n" + " </objects>\n" + " </classify>\n" + " <classify classCode=\"1040\" fullclsfNamePath=\"\" library=\"10\">\n" + " <sections>\n" + " <section name=\"分类\" value=\"1040\"/>\n" + " </sections>\n" + " <objects>\n" + " <object code=\"\" creator=\"19851584\" id=\"LEAP 1B-ZP1\" operate=\"create\" status=\"Released\">\n" + " <prop key=\"partclassification\" text=\"分类\" value=\"1040\"/>\n" + " <prop key=\"c6e_drawingNo\" text=\"图号\" value=\"LEAP 1B-ZP1\"/>\n" + " <prop key=\"c6e_partClass\" text=\"Part分类\" value=\"制造过程件\"/>\n" + " <prop key=\"c6e_hash\" text=\"哈希码\" value=\"/\"/>\n" + " <prop key=\"c6e_partName\" text=\"名称\" value=\"LEAP 1B发动机交付件\"/>\n" + " </object>\n" + " </objects>\n" + " </classify>\n" + " </classifys>\n" + "</data>"; for (int i = 0; i <= frequency; i++) { String res = universalInterface.applyCode(dataString,dataType); System.out.println("第"+i+"次执行,返回结果:"+res); } System.out.println("=================END======================="); } /** * 对标准申码接口调用示例:rest方式,调用方式和统一申码接口没有区别,只是参数上有所调整 */ public void sendApplyCodeBZByRest(){ Source/ExampleIntegratedPushCalled/src/main/java/com/vci/ubcs/example/service/impl/UniversalInterfaceImplServiceLocator.java
@@ -34,7 +34,7 @@ } // Use to get a proxy class for UniversalInterfaceImplPort private String UniversalInterfaceImplPort_address = "http://localhost:37000/ubcs-code/services/universalInterface"; private String UniversalInterfaceImplPort_address = "http://192.168.0.104/ubcs-code/services/universalInterface"; public String getUniversalInterfaceImplPortAddress() { return UniversalInterfaceImplPort_address; Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/util/DefaultAttrAssimtUtil.java
@@ -87,20 +87,19 @@ baseModel.setFirstV("1"); baseModel.setLastR("1"); baseModel.setLastV("1"); baseModel.setRevisionSeq(1); // TODO:目前只有编码规则中有用到,后期需要去掉这段代码的话,就把他加在编码规则新增中去 if(Func.isBlank(baseModel.getOwner())){ // 设置所有者 baseModel.setOwner(Func.isNotEmpty(user) ? user.getUserId().toString():AuthUtil.getUserId().toString()); } baseModel.setVersionSeq(1); baseModel.setVersionRule("0"); baseModel.setVersionValue("1"); baseModel.setRevisionOid(VciBaseUtil.getPk()); baseModel.setLastModifier(account); baseModel.setVersionRule("0"); baseModel.setRevisionSeq(1); baseModel.setRevisionValue("1"); baseModel.setRevisionRule("1"); baseModel.setRevisionOid(VciBaseUtil.getPk()); baseModel.setLastModifier(account); baseModel.setTenantId(Func.isNotEmpty(user) ? user.getTenantId():AuthUtil.getTenantId()); }catch (VciBaseException e){ e.printStackTrace(); Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -72,12 +72,9 @@ import java.awt.event.ItemEvent; import java.io.File; import java.util.*; import java.util.concurrent.ForkJoinPool; import java.util.stream.Collectors; import java.util.stream.Stream; import static com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant.*; import static com.vci.ubcs.starter.web.util.VciBaseUtil.getTableName; @Service public class CodeClassifyServiceImpl extends ServiceImpl<CodeClassifyMapper, CodeClassify> implements ICodeClassifyService { Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -2424,7 +2424,7 @@ //都转换完了。需要批量检查 //如果出错了,我们依然执行有效的数据,无效的数据写回到excel中 Map<String, String> errorKeyMap = new HashMap<>(); Map<String, String> errorKeyMap = new ConcurrentHashMap<>(); //1.分类注入 batchSwitchClassifyAttrOnOrder(attrVOS, cboList, classifyFullInfo, false); //boolean @@ -2447,6 +2447,7 @@ batchSwitchComponentAttrOnOrder(attrVOS, cboList); //3.判断关键属性 CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList, false, errorKeyMap); log.info("================查重后的errorKeyMap错误信息================="+JSON.toJSONString(errorKeyMap)); Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList(); Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList(); @@ -2688,7 +2689,6 @@ } } } /*** @@ -4423,9 +4423,11 @@ * @param classifyFullInfo 分类的全部信息 * @param templateVO 模板的内容,必须包含模板属性 * @param cboList 批量的数据 */ * @param isEdit 是否是修改 * @param errorMap 必须必须必须是线程安全的集合 * */ private CodeImportResultVO batchCheckKeyAttrOnOrder(CodeClassifyFullInfoBO classifyFullInfo, CodeClassifyTemplateVO templateVO, List<ClientBusinessObject> cboList, boolean isEdit, Map<String, String> errorMap) { List<ClientBusinessObject> cboList, boolean isEdit, Map<String, String> errorMap/*必须要是线程安全的集合*/) { //与MdmEngineServiceImpl里的checkKeyAttrOnOrder相似 //先获取关键属性的规则,也利用继承的方式 CodeKeyAttrRepeatVO keyRuleVO = keyRuleService.getRuleByClassifyFullInfo(classifyFullInfo); @@ -4478,7 +4480,7 @@ // TODO:Thread limit exceeded replacing blocked 异常是这部分代码抛出的 // ,所以暂时将parallelStream改成了stream,改成了stream之后发现巨慢 // customForkJoinPool控制并发度 List<ClientBusinessObject> finalCboList = cboList; final List<ClientBusinessObject> finalCboList = cboList; Map<String, List<CodeSynonym>> finalCodeSynonymMaps = codeSynonymMaps; List<ClientBusinessObject> repeatDataMap = (List<ClientBusinessObject>) customForkJoinPool.submit(() -> { finalCboList.parallelStream().filter(cbo -> { @@ -4522,6 +4524,7 @@ }); // 添加错误值 String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); log.info("=============关键属性查询重复的============="+JSON.toJSONString(repeatData)); errorMap.put(rowIndex, "重复的记录编号为:" + repeatData.stream().collect(Collectors.joining(","))); if (!CollectionUtils.isEmpty(newCboList)) { indexTODataMap.put(cbo.getAttributeValue(IMPORT_ROW_INDEX), newCboList); @@ -5365,7 +5368,7 @@ List<String> codeList = cboList.stream().map(ClientBusinessObject::getId).collect(Collectors.toList()); List<Map<String, String>> dataList = new ArrayList<>(); Map<String, String> errorMap = new HashMap<>(); Map<String, String> errorMap = new ConcurrentHashMap<>(); batchSwitchCheckExist(errorMap, cboList, classifyFullInfo, templateVO, execGroupCodePortDataDTO, fieldIndexMap); //判断必输项 batchCheckRequiredAttrOnOrder(templateVO, cboList, errorMap); Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
@@ -1,5 +1,6 @@ package com.vci.ubcs.code.service.impl; import com.alibaba.fastjson.JSON; import com.vci.ubcs.code.algorithm.CustomSerialEnum; import com.vci.ubcs.code.annotation.MdmSerialAlgorithm; import com.vci.ubcs.code.annotation.MdmSerialAlgorithmMethod; Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -293,7 +293,7 @@ passwordFreeLoginService.pwdFreeLoginByBoolean(systemId.toLowerCase(Locale.ROOT), this.getRequest()); }catch (Throwable e){ errorid[0] ="1"; throw new Throwable("用户鉴权失败."); throw new Throwable("用户鉴权失败,原因:"+e.getMessage()); } List<ClassfyVO> classVOList = classfysVO.getClassify(); //InterParameterVO finalInterParameterVO = interParameterVO; Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/wrapper/CodeRuleWrapper.java
@@ -18,8 +18,6 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.vci.ubcs.code.entity.CodeRule; import com.vci.ubcs.code.enumpack.CodeClassifyTemplateLC; import com.vci.ubcs.code.lifecycle.CodeRuleLC; import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; import com.vci.ubcs.omd.cache.EnumCache; import com.vci.ubcs.omd.enums.EnumEnum; Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/MenuController.java
@@ -65,6 +65,7 @@ public class MenuController extends BladeController { private final IMenuService menuService; private final ITopMenuService topMenuService; /**