【工具类】配置表查询
This commit is contained in:
		
							parent
							
								
									cb11222a65
								
							
						
					
					
						commit
						534cffe31f
					
				|  | @ -0,0 +1,53 @@ | |||
| package tqq9.lc123.cloud.app.plugin.utils; | ||||
| 
 | ||||
| import kd.bos.dataentity.entity.DynamicObject; | ||||
| import kd.bos.orm.query.QCP; | ||||
| import kd.bos.orm.query.QFilter; | ||||
| import kd.bos.servicehelper.BusinessDataServiceHelper; | ||||
| import org.apache.commons.lang3.StringUtils; | ||||
| 
 | ||||
| /** | ||||
|  * 配置标工具类 | ||||
|  */ | ||||
| public class ConfigUtils { | ||||
| 
 | ||||
|     /** | ||||
|      * 获取第三方系统配置 | ||||
|      * @param number | ||||
|      * @return | ||||
|      */ | ||||
|     public static String getThirdConfigByNumber(String number){ | ||||
|         String value = null; | ||||
|         if(StringUtils.isNotBlank(number)){ | ||||
|             QFilter f1 = new QFilter("number", QCP.equals, number); | ||||
|             QFilter f2 = new QFilter("enable", QCP.equals, "1"); | ||||
|             QFilter f3 = new QFilter("status", QCP.equals, "C"); | ||||
|             DynamicObject[] configArr = BusinessDataServiceHelper.load("tqq9_thirdconfig", "id,number,name", new QFilter[]{f1, f2, f3}); | ||||
|             if(configArr != null && configArr.length > 0){ | ||||
|                 value = configArr[0].getString("name"); | ||||
|             } | ||||
|         } | ||||
|         return value; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 获取开发系统配置 | ||||
|      * @param number | ||||
|      * @return | ||||
|      */ | ||||
|     public static String getDevSysConfigByNumber(String number){ | ||||
|         String value = null; | ||||
|         if(StringUtils.isNotBlank(number)){ | ||||
|             QFilter f1 = new QFilter("number", QCP.equals, number); | ||||
|             QFilter f2 = new QFilter("enable", QCP.equals, "1"); | ||||
|             QFilter f3 = new QFilter("status", QCP.equals, "C"); | ||||
|             DynamicObject[] configArr = BusinessDataServiceHelper.load("tqq9_devsysconfig", "id,number,tqq9_value", new QFilter[]{f1, f2, f3}); | ||||
|             if(configArr != null && configArr.length > 0){ | ||||
|                 value = configArr[0].getString("tqq9_value"); | ||||
|             } | ||||
|         } | ||||
|         return value; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
		Loading…
	
		Reference in New Issue