haungfuli 2 лет назад
Родитель
Сommit
d11214e05b

+ 4 - 3
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java

@@ -170,7 +170,8 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
         page.setTotal(dataCount == null ? 0 : dataCount);
         page.setCurrent(driverViewInfo.getCurrentPage());
         page.setSize(driverViewInfo.getPageSize());
-        TestJson.sendTest();
+        TestJson j = new TestJson();
+        j.sendTest();
         return page;
     }
 
@@ -511,7 +512,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
                     @Override
                     public void run() {
                         try{
-                            MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
+//                            MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
                         }catch (Exception e){
                             e.printStackTrace();
                         }
@@ -542,7 +543,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
                     @Override
                     public void run() {
                         try{
-                            MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
+//                            MonitoringSystemReporting.testDriverRoot(hyDriverInfo1);
                         }catch (Exception e){
                             e.printStackTrace();
                         }

+ 3 - 10
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MonitoringSystemReporting.java

@@ -101,7 +101,7 @@ public class MonitoringSystemReporting {
      * @return
      * @throws IOException
      */
-    public static Map<String, String> login(String userName, String password, String debug) {
+    public Map<String, String> login(String userName, String password, String debug) {
         Map<String, String> map = new HashMap<>();
 
         try {
@@ -140,7 +140,7 @@ public class MonitoringSystemReporting {
         return map;
     }
 
-    public static Root loginRoot(String userName, String password, String uscc, String debug) {
+    public Root loginRoot(String userName, String password, String uscc, String debug) {
         Map<String, String> token = login(userName, password, debug);
         Root edmRoot = new Root();
         edmRoot.setToken(token.get("token"));
@@ -210,7 +210,7 @@ public class MonitoringSystemReporting {
      * @return
      * @throws Exception
      */
-    public static Root testDriverRoot(HyDriverInfo hyDriverInfo) throws Exception {
+    public Root testDriverRoot(HyDriverInfo hyDriverInfo) throws Exception {
         String name = "驾驶员信息单";
         DriverInfo driver = testDriver(hyDriverInfo);
         //roots.get(0)
@@ -526,13 +526,6 @@ public class MonitoringSystemReporting {
     static List<String[]> users = new ArrayList<>();
 
     static {
-
-        for (String[] user1 : usersArr) {
-            users.add(user1);
-        }
-        for (int i = 0; i < users.size(); i++) {
-            roots.add(loginRoot(users.get(i)[0], users.get(i)[1], users.get(i)[2], debugStr));
-        }
     }
 
 }

+ 4 - 9
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/TestJson.java

@@ -33,13 +33,8 @@ public class TestJson {
 //	public static final String debugStr = "";
 //	public static final String sendUrl = "http://wlhy.org.cn/wlhy-exchange-kafka/message/send";
 
-    public static void sendTest() {
-        for (String[] user1 : usersArr) {
-            users.add(user1);
-        }
-        for (int i = 0; i < users.size(); i++) {
-            roots.add(loginRoot(users.get(i)[0], users.get(i)[1], users.get(i)[2], debugStr));
-        }
+    public void sendTest() {
+        loginRoot("23106960", "qweasd!@#123", "91210804MA10FPAM2G", "debugSystem");
     }
 
     public static Root testDispatch() {
@@ -388,7 +383,7 @@ public class TestJson {
 
     static List<String[]> users = new ArrayList<>();
 
-    public static Map<String, String> login(String userName, String password, String debug) {
+    public Map<String, String> login(String userName, String password, String debug) {
         Map<String, String> map = new HashMap<>();
 
         try {
@@ -427,7 +422,7 @@ public class TestJson {
         return map;
     }
 
-    public static Root loginRoot(String userName, String password, String uscc, String debug) {
+    public Root loginRoot(String userName, String password, String uscc, String debug) {
         Map<String, String> token = login(userName, password, debug);
         Root edmRoot = new Root();
         edmRoot.setToken(token.get("token"));