From ab1ad5468ff5bebed2f151db209f98da2f847f97 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期一, 17 七月 2023 14:28:09 +0800
Subject: [PATCH] 集成获取分类接口(包含编码规则码段码值信息)

---
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java |   70 +++++++++++++++++++---------------
 1 files changed, 39 insertions(+), 31 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
index c47f444..592cb69 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -46,6 +46,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springblade.core.tool.api.R;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import javax.annotation.Resource;
@@ -64,7 +65,8 @@
 @Slf4j
 @VciWebservice(path = "/universalInterface")
 public class UniversalInterfaceImpl<IDockingLogeServiceing> implements UniversalInterfaceI {
-
+	@Value("${code.checkConfig:true}")
+	public boolean CODE_CHECKCONFIG;
 	@Autowired(required = false)
 	private AttributeMapConfig attributeMapConfig;
 	/**
@@ -160,11 +162,13 @@
 			}
 			ClassfysVO classfysVO = interParameterVO.getData().getClassifys();
 			systemId = interParameterVO.getData().getSystemId();
-			//鏍¢獙鏄惁閰嶇疆
-			boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue());
-			if(!checkPass){
-				errorid="101";
-				throw new Throwable("绯荤粺鏍囪瘑涓恒��"+systemId+"銆�,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+			if(CODE_CHECKCONFIG){
+				//鏍¢獙鏄惁閰嶇疆
+				boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue());
+				if(!checkPass){
+					errorid="101";
+					throw new Throwable("绯荤粺鏍囪瘑涓恒��"+systemId+"銆�,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+				}
 			}
 			UserVO userVo = interParameterVO.getData().getUser();
 			List<ClassfyVO> classVOList = classfysVO.getClassify();
@@ -334,14 +338,14 @@
 			ClassfysVO classfysVO = interParameterVO.getData().getClassifys();
 			systemId = interParameterVO.getData().getSystemId();
 
-
-			//鏍¢獙鏄惁閰嶇疆
-			boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue());
-			if(!checkPass){
-				errorid="101";
-				throw new Throwable("绯荤粺鏍囪瘑涓恒��"+systemId+"銆�,"+sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+			if(CODE_CHECKCONFIG) {
+				//鏍¢獙鏄惁閰嶇疆
+				boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue());
+				if (!checkPass) {
+					errorid = "101";
+					throw new Throwable("绯荤粺鏍囪瘑涓恒��" + systemId + "銆�," + sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getText() + "鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+				}
 			}
-
 			UserVO userVo = interParameterVO.getData().getUser();
 			List<ClassfyVO> classVOList = classfysVO.getClassify();
 			InterParameterVO finalInterParameterVO = interParameterVO;
@@ -493,12 +497,13 @@
 			String libId= libraryVO.getId();
 			List<String> classifyIdList=  libraryVO.getClassifyid();
 			List<CodeClassifyVO> codeClassifyVOS =new ArrayList<>();
-
-			//鏍¢獙鏄惁閰嶇疆
-			boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getValue());
-			if(!checkPass){
-				errorid="101";
-				throw new Throwable("绯荤粺鏍囪瘑涓恒��"+systemId+"銆�,"+sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+			if(CODE_CHECKCONFIG) {
+				//鏍¢獙鏄惁閰嶇疆
+				boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getValue());
+				if (!checkPass) {
+					errorid = "101";
+					throw new Throwable("绯荤粺鏍囪瘑涓恒��" + systemId + "銆�," + sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getText() + "鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+				}
 			}
 
 			//杩欐槸璐﹀彿淇℃伅
@@ -662,11 +667,13 @@
 				msg = "鎺ュ彛鍙傛暟锛歭ibrary 涓簄ull";
 				throw new Throwable(msg);
 			}
-			//鏍¢獙鏄惁閰嶇疆
-			boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getValue());
-			if(!checkPass){
-				errorid="101";
-				throw new Throwable("绯荤粺鏍囪瘑涓恒��"+systemId+"銆�,"+sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+			if(CODE_CHECKCONFIG) {
+				//鏍¢獙鏄惁閰嶇疆
+				boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getValue());
+				if (!checkPass) {
+					errorid = "101";
+					throw new Throwable("绯荤粺鏍囪瘑涓恒��" + systemId + "銆�," + sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getText() + "鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+				}
 			}
 			//鍏堢畝绉版槸鍚︽湁鍏宠仈妯℃澘锛屾湁妯℃澘瑕佸厛鍒犻櫎
 
@@ -852,13 +859,14 @@
 			String libId= libraryVO.getId();
 			List<String> classifyIdList=  libraryVO.getClassifyid();
 			List<CodeClassifyVO> codeClassifyVOS =new ArrayList<>();
-
-			/*//鏍¢獙鏄惁閰嶇疆
-			boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getValue());
-			if(!checkPass){
-				errorid="101";
-				throw new Throwable("绯荤粺鏍囪瘑涓恒��"+systemId+"銆�,"+sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
-			}*/
+			if(CODE_CHECKCONFIG) {
+				//鏍¢獙鏄惁閰嶇疆
+				boolean checkPass = checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getValue());
+				if (!checkPass) {
+					errorid = "101";
+					throw new Throwable("绯荤粺鏍囪瘑涓恒��" + systemId + "銆�," + sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getText() + "鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+				}
+			}
 			//杩欐槸璐﹀彿淇℃伅
 			//杩欐槸璐﹀彿淇℃伅
 			if(userVo!=null) {

--
Gitblit v1.9.3