Эх сурвалжийг харах

Merge branch 'master' of http://111.75.220.136:10030/turborao/jyyy

wangjun 14 цаг өмнө
parent
commit
b6c392859f

BIN
code/jyyy/nckd-jimin-jyyy-fi/bin/main/nckd/jimin/jyyy/fi/common/CommonHelperUtils.class


BIN
code/jyyy/nckd-jimin-jyyy-fi/bin/main/nckd/jimin/jyyy/fi/webapi/AttachmentFileUtil.class


BIN
code/jyyy/nckd-jimin-jyyy-fi/bin/main/nckd/jimin/jyyy/fi/webapi/TransDetailApiPlugin.class


+ 31 - 0
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/common/CommonHelperUtils.java

@@ -0,0 +1,31 @@
+package nckd.jimin.jyyy.fi.common;
+
+import kd.bos.dataentity.entity.DynamicObject;
+import kd.bos.dataentity.entity.DynamicObjectCollection;
+import kd.bos.orm.query.QCP;
+import kd.bos.orm.query.QFilter;
+import kd.bos.servicehelper.BusinessDataServiceHelper;
+import org.apache.commons.lang3.ObjectUtils;
+
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public class CommonHelperUtils {
+    public static Map<String, String> getCommonParams(String number){
+        String selectField = "nckd_entryentity.nckd_key, nckd_entryentity.nckd_value";
+
+        QFilter qFilter = new QFilter("number", QCP.equals, number);
+        DynamicObject commonParam = BusinessDataServiceHelper.loadSingle("nckd_commonparams", selectField, qFilter.toArray());
+        if (ObjectUtils.isEmpty(commonParam)) {
+            return null;
+        }
+
+        DynamicObjectCollection entryentity = commonParam.getDynamicObjectCollection("nckd_entryentity");
+        if(entryentity == null || entryentity.size() == 0){
+            return null;
+        }
+        Map<String, String> mapentity = entryentity.stream().collect(Collectors.toMap(k -> k.getString("nckd_key"), v -> v.getString("nckd_value")));
+
+        return mapentity;
+    }
+}

+ 4 - 0
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/webapi/AttachmentFileUtil.java

@@ -12,11 +12,15 @@ import kd.bos.logging.LogFactory;
 import kd.bos.servicehelper.AttachmentServiceHelper;
 import kd.bos.servicehelper.MetadataServiceHelper;
 import kd.bos.util.FileNameUtils;
+import nckd.jimin.jyyy.fi.common.CommonHelperUtils;
 import org.apache.commons.net.ftp.FTP;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPReply;
+<<<<<<< HEAD
 import nckd.jimin.jyyy.bd.common.CommonHelperUtils;
 
+=======
+>>>>>>> dcaa1e1363c6ea3a50ec93ae9197973378c6e556
 import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URL;