Quellcode durchsuchen

metadata增加了一个字段以及调接口时加了日志输入

pancy vor 1 Jahr
Ursprung
Commit
fe967fdff7

+ 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());
                 }
             }

+ 34 - 0
gl/gl/src/test/BOM.html

@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+  <meta charset="UTF-8">
+  <title></title>
+</head>
+
+<body>
+<button onclick="set()">设置本地存储</button>
+<button onclick="get()">获取本地存储</button>
+<button onclick="deleteByKey()">删除某个本地存储</button>
+<button onclick="clearAll()">清空所有本地存储</button>
+
+</body>
+<script type="text/javascript">
+  function set() {
+    localStorage.setItem("name", "jack");
+  }
+  function get() {
+    console.log(localStorage.getItem("name"))
+  }
+
+  function deleteByKey() {
+    localStorage.removeItem("name")
+  }
+
+  function clearAll() {
+    localStorage.clear();
+  }
+
+</script>
+
+</html>

+ 25 - 0
gl/gl/src/test/bindEvent.html

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+  <title>阻止事件的默认行为</title>
+  <script type="text/javascript">
+    //IE:window.event.returnValue = false;
+    //W3C:传递过来的对象.preventDefault();
+    function fun(e){
+      //W3C
+      if(e && e.preventDefault){
+        alert("W3C");
+        e.preventDefault();
+      }else{
+        alert("IE");
+        window.event.returnValue = false;
+      }
+    }
+  </script>
+</head>
+<body>
+<a href="15-onload事件.html" onclick="fun(event)">点我啊</a>
+</body>
+</html>
+

+ 48 - 0
gl/gl/src/test/click.html

@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+<script type="text/javascript">
+    //将图片名称放到数组中
+    let imgObj = {
+        imgs:["images/1.png","images/2.png","images/3.png"]
+    };
+
+    let num = 0;//数组的下标,0-2
+    function prev(){
+        //1)找到img标签
+        let imgEle = document.getElementsByTagName("img")[0];
+        //2、给img标签的SRC属性赋值
+        num--;
+        //从后面重新开始展示图片
+        if(num<0){
+            num = 2;
+        }
+        let url = imgObj.imgs[num];
+        imgEle.src=url;
+    }
+
+    function next(){
+        //1)找到img标签
+        let imgEle = document.getElementsByTagName("img")[0];
+        //2、给img标签的SRC属性赋值
+        num++;
+        //从前面重新开始展示图片
+        if(num>2){
+            num = 0;
+        }
+        let url = imgObj.imgs[num];
+        imgEle.src=url;
+
+    }
+</script>
+<button style="height: 150px;width: 50px" onclick="prev()"> &lt; </button>
+
+<img src="images/1.png" width="600px" height="450px" style="position: relative;top:70px">
+
+<button style="height: 150px;width: 50px" onclick="next()"> &gt; </button>
+</body>
+</html>

BIN
gl/gl/src/test/images/1.png


BIN
gl/gl/src/test/images/2.png


BIN
gl/gl/src/test/images/3.png