袁少华 преди 4 години
родител
ревизия
bc243ad2d7

+ 4 - 0
src/main/java/org/jeecg/modules/appInterface/controller/OpenApiU8Interface.java

@@ -0,0 +1,4 @@
+package org.jeecg.modules.appInterface.controller;
+
+public class OpenApiU8Interface {
+}

+ 49 - 0
src/main/java/org/jeecg/modules/appInterface/controller/getHttpInterface.java

@@ -0,0 +1,49 @@
+package org.jeecg.modules.appInterface.controller;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+public class getHttpInterface {
+
+    // 调用http接口获取数据
+    public static String getHttpInterface(String path){
+        BufferedReader in = null;
+        StringBuffer result = null;
+        try {
+            URL url = new URL(path);
+            //打开和url之间的连接
+            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+            connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+            connection.setRequestProperty("Charset", "utf-8");
+            connection.connect();
+
+            result = new StringBuffer();
+            //读取URL的响应
+            in = new BufferedReader(new InputStreamReader(
+                    connection.getInputStream()));
+            String line;
+            while ((line = in.readLine()) != null) {
+                result.append(line);
+            }
+            return result.toString();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally {
+            try {
+                if (in != null) {
+                    in.close();
+                }
+            } catch (Exception e2) {
+                e2.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+    public static void main(String[] args){
+        String str = getHttpInterface("https://api.yonyouup.com/system/tradeid");
+        System.out.println(str);
+    }
+
+}

+ 1 - 2
src/main/java/org/jeecg/modules/fbsDispatchLists/mapper/xml/FbsDispatchListsMapper.xml

@@ -2,8 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.fbsDispatchLists.mapper.FbsDispatchListsMapper">
     <select id="getProjectDelivery" resultType="org.jeecg.modules.fbsDispatchLists.entity.FbsDispatchLists">
-        SELECT TOP
-            6 SUM ( iQuantity ) AS iQuantity,
+        SELECT  top 1000 SUM ( iQuantity ) AS iQuantity,
             cItemName
         FROM
             DispatchLists

+ 3 - 0
src/main/java/org/jeecg/modules/fbsDispatchLists/service/impl/FbsDispatchListsServiceImpl.java

@@ -34,6 +34,9 @@ public class FbsDispatchListsServiceImpl extends ServiceImpl<FbsDispatchListsMap
         Map<String, Object> map=new HashMap<>();
         if(fbsDispatchListsList!=null){
             for(FbsDispatchLists fbsDispatchLists:fbsDispatchListsList){
+                if(StringUtils.isBlank(fbsDispatchLists.getCitemname())){
+                    fbsDispatchLists.setCitemname("空");
+                }
                 map.put(fbsDispatchLists.getCitemname(),fbsDispatchLists.getIquantity());
             }
         }

+ 1 - 1
src/main/java/org/jeecg/modules/fbsInventory/mapper/xml/FbsInventoryMapper.xml

@@ -24,7 +24,7 @@
 
     <select id="getAllStockList" resultType="java.util.HashMap">
 
-        select top 5 a.iQuantity realStockSum,b.cInvName materialName,b.cInvCode cInvCode from
+        select a.iQuantity realStockSum,b.cInvName materialName,b.cInvCode cInvCode from
         (select cInvCode,sum(iQuantity) as iQuantity  from CurrentStock group by cInvCode) a
         left join Inventory b on a.cInvCode = b.cInvCode
 

+ 2 - 2
src/main/java/org/jeecg/modules/fbsPuArrivalvouch/mapper/xml/FbsPuArrivalvouchMapper.xml

@@ -19,8 +19,8 @@
             pp.cVenCode vendorName,
             pps.cInvCode materialCode,
             i.cInvName materialName,
-            pps.dArriveDate arriveDate,
-            pp.dPODate,
+            CONVERT(varchar(30),pps.dArriveDate,23) arriveDate,
+			CONVERT(varchar(30),pp.dPODate,23) dPODate,
             pps.iArrQTY arriveSum,
             1 AS bj,
             pps.freceivedqty