2 Commits 8acf49340d ... 3c2dd80eb8

Autor SHA1 Mensaje Fecha
  pancy 3c2dd80eb8 去掉test目录 hace 1 año
  pancy fe967fdff7 metadata增加了一个字段以及调接口时加了日志输入 hace 1 año

+ 13 - 3
gl/gl/src/private/nc/bs/gl/pfxx/VoucherToOA.java

@@ -46,13 +46,13 @@ public class VoucherToOA implements IBackgroundWorkPlugin{
         List<Object> listCount = (List<Object>) dao.executeQuery(qryCount, new ColumnListProcessor());
         int count = (Integer) listCount.get(0);//总条数
         double fenzi = count;
-        double fenmu = 1;
+        double fenmu = 10;
         int yeshu = (int) Math.ceil(fenzi/fenmu);//页数
         for(int i = 1;i <= yeshu;i++ ){
-            int startIndex = (i-1)*1+1;
+            int startIndex = (i-1)*100+1;
             int endIndex;
             if(i != yeshu){
-                endIndex = i*1;
+                endIndex = i*100;
             }
             else{
                 endIndex = count;
@@ -212,6 +212,16 @@ public class VoucherToOA implements IBackgroundWorkPlugin{
                             throw new RuntimeException(e);
                         }
                         fieldArrays.add(fieldObj1);
+                        //公司编码
+                        JSONObject fieldObj17 = new JSONObject();
+                        fieldObj17.put("name","gsbm");
+                        fieldObj17.put("title","公司编码");
+                        try {
+                            fieldObj17.put("content",GetBaseDAOUtil.getOrgCode(maph.get("pk_org")));
+                        } catch (Exception e) {
+                            throw new RuntimeException(e);
+                        }
+                        fieldArrays.add(fieldObj17);
                         //制单日期
                         JSONObject fieldObj2 = new JSONObject();
                         fieldObj2.put("name","zdrq");

+ 8 - 3
gl/gl/src/public/org/jeecg/common/util/HttpHelper.java

@@ -8,7 +8,7 @@ import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
-
+import nc.log.NcLog;
 
 import nc.vo.pubapp.pattern.exception.ExceptionUtils;
 //import net.sf.json.JSONObject;
@@ -48,9 +48,9 @@ public class HttpHelper {
             //设置请求方法
             connection.setRequestMethod("POST");
             //设置连接超时时间
-            connection.setConnectTimeout(30000);
+            connection.setConnectTimeout(60000);
             //设置读取超时时间
-            connection.setReadTimeout(30000);
+            connection.setReadTimeout(60000);
             //DoOutput设置是否向httpUrlConnection输出,DoInput设置是否从httpUrlConnection读入,此外发送post请求必须设置这两个
             //设置是否可读取
             connection.setDoOutput(true);
@@ -87,8 +87,10 @@ public class HttpHelper {
             }
 
         } catch (MalformedURLException e) {
+            NcLog.info(e.getMessage());
         	ExceptionUtils.wrappBusinessException(e.getMessage());
         } catch (IOException e) {
+            NcLog.info(e.getMessage());
         	ExceptionUtils.wrappBusinessException(e.getMessage());
         } finally {
             //关闭连接
@@ -96,6 +98,7 @@ public class HttpHelper {
                 try {
                     br.close();
                 } catch (IOException e) {
+                    NcLog.info(e.getMessage());
                 	ExceptionUtils.wrappBusinessException(e.getMessage());
                 }
             }
@@ -103,6 +106,7 @@ public class HttpHelper {
                 try {
                     os.close();
                 } catch (IOException e) {
+                    NcLog.info(e.getMessage());
                 	ExceptionUtils.wrappBusinessException(e.getMessage());
                 }
             }
@@ -110,6 +114,7 @@ public class HttpHelper {
                 try {
                     is.close();
                 } catch (IOException e) {
+                    NcLog.info(e.getMessage());
                 	ExceptionUtils.wrappBusinessException(e.getMessage());
                 }
             }