瀏覽代碼

第一版整理

gongdecai 3 年之前
父節點
當前提交
0d022eccfb
共有 98 個文件被更改,包括 7254 次插入33 次删除
  1. 6 6
      winsea-haixin-platform-backend/pom.xml
  2. 0 5
      winsea-haixin-platform-backend/src/main/java/com/yh/saas/platform/controller/StaffController.java
  3. 16 22
      winsea-haixin-platform-backend/src/main/resources/banner.txt
  4. 92 0
      winsea-haixin-plugin-wangluohuoyun/pom.xml
  5. 154 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java
  6. 26 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/config/OSSClientConfig.java
  7. 18 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/config/yiliangyiyunConfig.java
  8. 28 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/NumberConstant.java
  9. 171 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java
  10. 96 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/AcquisitionInfoController.java
  11. 58 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/AppVersionController.java
  12. 21 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonCompanyIdentityController.java
  13. 47 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonSysParameterController.java
  14. 298 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java
  15. 21 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java
  16. 21 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java
  17. 21 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverPayeeInfoController.java
  18. 128 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/AcquisitionInfo.java
  19. 64 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/AppVersion.java
  20. 175 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CacheComponent.java
  21. 47 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonCompanyIdentity.java
  22. 78 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonSysParameter.java
  23. 109 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonUser.java
  24. 64 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverCarInfo.java
  25. 145 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverInfo.java
  26. 72 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverPayeeInfo.java
  27. 37 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/LogoConfig.java
  28. 52 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/UnimallMessage.java
  29. 54 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/BiViewInfo.java
  30. 23 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ConfigDO.java
  31. 20 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/DistinguishView.java
  32. 263 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ExportVView.java
  33. 13 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ListView.java
  34. 79 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ReleaseView.java
  35. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/TmpModel.java
  36. 27 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/WarehouseNumView.java
  37. 83 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/WarehouseView.java
  38. 15 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/AppServiceException.java
  39. 218 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ExceptionDefinition.java
  40. 36 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ServiceException.java
  41. 13 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ServiceExceptionDefinition.java
  42. 17 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ThirdPartServiceException.java
  43. 27 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YException.java
  44. 56 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java
  45. 25 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/AcquisitionInfoMapper.java
  46. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/AppVersionMapper.java
  47. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonCompanyIdentityMapper.java
  48. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonConstantFalseMapper.java
  49. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonSysParameterMapper.java
  50. 40 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonUserMapper.java
  51. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverCarInfoMapper.java
  52. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverInfoMapper.java
  53. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverPayeeInfoMapper.java
  54. 61 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IAcquisitionInfoService.java
  55. 22 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IAppVersionService.java
  56. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonCompanyIdentityService.java
  57. 23 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonConstantFalseService.java
  58. 33 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonSysParameterService.java
  59. 102 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java
  60. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java
  61. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java
  62. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverPayeeInfoService.java
  63. 30 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/AppVersionServiceImpl.java
  64. 20 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonCompanyIdentityServiceImpl.java
  65. 57 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonSysParameterServiceImpl.java
  66. 951 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java
  67. 20 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  68. 20 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  69. 20 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverPayeeInfoServiceImpl.java
  70. 98 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/AliyunSMSClient.java
  71. 392 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/CalculationUtil.java
  72. 37 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/Const.java
  73. 175 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java
  74. 185 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/GeTuiUtils.java
  75. 48 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/GeneratorUtil.java
  76. 311 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/HttpUtils.java
  77. 342 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/ImportExcel.java
  78. 44 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MD5Util.java
  79. 245 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MatrixToImageWriter.java
  80. 45 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MockSMSClient.java
  81. 104 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/QRCodeUtil.java
  82. 19 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/SMSClientYlyy.java
  83. 15 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/SMSResult.java
  84. 124 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/WebSocket.java
  85. 18 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/WebSocketConfig.java
  86. 二進制
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/logo.png
  87. 40 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/AcquisitionInfoMapper.xml
  88. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/AppVersionMapper.xml
  89. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CollectionCompanyMapper.xml
  90. 69 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CollectionManagementMapper.xml
  91. 174 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CollectionWarehousingRecordMapper.xml
  92. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonCompanyIdentityMapper.xml
  93. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonConstantFalseMapper.xml
  94. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonSysParameterMapper.xml
  95. 104 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonUserMapper.xml
  96. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml
  97. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml
  98. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverPayeeInfoMapper.xml

+ 6 - 6
winsea-haixin-platform-backend/pom.xml

@@ -69,15 +69,15 @@
 <!--            <version>0.7.0</version>-->
 <!--        </dependency>-->
         <!--云盘模块-->
-        <dependency>
-            <groupId>com.yh.haixin</groupId>
-            <artifactId>winsea-haixin-plugin-clouddisk</artifactId>
-            <version>0.7.0</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.yh.haixin</groupId>-->
+<!--            <artifactId>winsea-haixin-plugin-clouddisk</artifactId>-->
+<!--            <version>0.7.0</version>-->
+<!--        </dependency>-->
         <!--易粮易云-->
         <dependency>
             <groupId>com.yh.haixin</groupId>
-            <artifactId>winsea-haixin-plugin-yiliangyiyun</artifactId>
+            <artifactId>winsea-haixin-plugin-wangluohuoyun</artifactId>
             <version>0.7.0</version>
         </dependency>
         <!--油品模块-->

+ 0 - 5
winsea-haixin-platform-backend/src/main/java/com/yh/saas/platform/controller/StaffController.java

@@ -7,9 +7,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
-import com.winsea.svc.base.security.service.IAccountService;
-import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
-import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseBaseInfoService;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -63,8 +60,6 @@ public class StaffController {
 	@SofaReference
 	private ICommonRoleService roleService;
 
-	@Autowired
-	private IWarehouseBaseInfoService warehouseBaseInfoService;
 	/**
 	 * 获取当前登录用户信息
 	 *

+ 16 - 22
winsea-haixin-platform-backend/src/main/resources/banner.txt

@@ -1,24 +1,18 @@
-
- _______           _______  _        _______ _________ _______ _________
-/ ___   )|\     /|(  ___  )( (    /|(  ____ \\__   __/(  ___  )\__   __/
-\/   )  || )   ( || (   ) ||  \  ( || (    \/   ) (   | (   ) |   ) (
-    /   )| (___) || |   | ||   \ | || |         | |   | (___) |   | |
-   /   / |  ___  || |   | || (\ \) || | ____    | |   |  ___  |   | |
-  /   /  | (   ) || |   | || | \   || | \_  )   | |   | (   ) |   | |
- /   (_/\| )   ( || (___) || )  \  || (___) |   | |   | )   ( |___) (___
-(_______/|/     \|(_______)|/    )_)(_______)   )_(   |/     \|\_______/
-
- _                 _______  _______                    _______  _
-( (    /||\     /|(  ___  )(  ___  )|\     /||\     /|(  ___  )( (    /|
-|  \  ( || )   ( || (   ) || (   ) |( \   / )| )   ( || (   ) ||  \  ( |
-|   \ | || (___) || (___) || |   | | \ (_) / | |   | || (___) ||   \ | |
-| (\ \) ||  ___  ||  ___  || |   | |  \   /  | |   | ||  ___  || (\ \) |
-| | \   || (   ) || (   ) || |   | |   ) (   | |   | || (   ) || | \   |
-| )  \  || )   ( || )   ( || (___) |   | |   | (___) || )   ( || )  \  |
-|/    )_)|/     \||/     \|(_______)   \_/   (_______)|/     \||/    )_)
- _  _  ____  __    ____    __    _  _  ___  _  _  ____  _  _  __  __  _  _
-( \/ )(_  _)(  )  (_  _)  /__\  ( \( )/ __)( \/ )(_  _)( \/ )(  )(  )( \( )
- \  /  _)(_  )(__  _)(_  /(__)\  )  (( (_-. \  /  _)(_  \  /  )(__)(  )  (
- (__) (____)(____)(____)(__)(__)(_)\_)\___/ (__) (____) (__) (______)(_)\_)
+       _                           _                     _
+      ( )                         ( )_  _               ( )
+ ____ | |__     _     ___     __  | ,_)(_)   _ _   ___  | |__     _ _    _    _   _  _   _    _ _   ___
+(_  ,)|  _ `\ /'_`\ /' _ `\ /'_ `\| |  | | /'_` )/' _ `\|  _ `\ /'_` ) /'_`\ ( ) ( )( ) ( ) /'_` )/' _ `\
+ /'/_ | | | |( (_) )| ( ) |( (_) || |_ | |( (_| || ( ) || | | |( (_| |( (_) )| (_) || (_) |( (_| || ( ) |
+(____)(_) (_)`\___/'(_) (_)`\__  |`\__)(_)`\__,_)(_) (_)(_) (_)`\__,_)`\___/'`\__, |`\___/'`\__,_)(_) (_)
+                           ( )_) |                                           ( )_| |
+                            \___/'                                           `\___/'
+                                 _                  _
+                                (_ )               ( )
+ _   _   _    _ _   ___     __   | |  _   _    _   | |__   _   _    _    _   _  _   _   ___
+( ) ( ) ( ) /'_` )/' _ `\ /'_ `\ | | ( ) ( ) /'_`\ |  _ `\( ) ( ) /'_`\ ( ) ( )( ) ( )/' _ `\
+| \_/ \_/ |( (_| || ( ) |( (_) | | | | (_) |( (_) )| | | || (_) |( (_) )| (_) || (_) || ( ) |
+`\___x___/'`\__,_)(_) (_)`\__  |(___)`\___/'`\___/'(_) (_)`\___/'`\___/'`\__, |`\___/'(_) (_)
+                         ( )_) |                                        ( )_| |
+                          \___/'                                        `\___/'
 
 ::: Project (version:${application.version}) :::             \(^O^)/

+ 92 - 0
winsea-haixin-plugin-wangluohuoyun/pom.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>winsea-haixin</artifactId>
+        <groupId>com.yh.haixin</groupId>
+        <version>0.7.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>winsea-haixin-plugin-wangluohuoyun</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.yh.haixin</groupId>
+            <artifactId>winsea-haixin-plugin-base</artifactId>
+            <version>0.7.0</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sourceforge.jexcelapi</groupId>
+            <artifactId>jxl</artifactId>
+            <version>2.6.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>ooxml-schemas</artifactId>
+            <version>1.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot</artifactId>
+            <version>2.1.1.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.github.yedaxia</groupId>
+            <artifactId>japidocs</artifactId>
+            <version>1.4.3</version>
+        </dependency>
+        <!-- 良心云 sms -->
+        <dependency>
+            <groupId>com.github.qcloudsms</groupId>
+            <artifactId>qcloudsms</artifactId>
+            <version>1.0.5</version>
+        </dependency>
+        <dependency>
+            <groupId>com.getui.push</groupId>
+            <artifactId>restful-sdk</artifactId>
+            <version>1.0.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-websocket</artifactId>
+            <version>5.1.14.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-websocket</artifactId>
+            <version>5.1.3.RELEASE</version>
+        </dependency>
+    </dependencies>
+
+
+</project>

+ 154 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java

@@ -0,0 +1,154 @@
+package com.yh.saas.plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.InjectionConfig;
+import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
+import com.baomidou.mybatisplus.generator.config.FileOutConfig;
+import com.baomidou.mybatisplus.generator.config.GlobalConfig;
+import com.baomidou.mybatisplus.generator.config.PackageConfig;
+import com.baomidou.mybatisplus.generator.config.StrategyConfig;
+import com.baomidou.mybatisplus.generator.config.TemplateConfig;
+import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
+import com.baomidou.mybatisplus.generator.config.po.TableInfo;
+import com.baomidou.mybatisplus.generator.config.rules.DbType;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+
+/**
+ * 生成代码
+ *
+ * @author gdc
+ */
+public class GeneratorCodeByTables {
+
+    private static final String DATA_SOURCE_PREFIX = "spring.datasource.";
+
+    private static final String DATA_SOURCE_URL = "jdbc:mysql://47.100.3.209:3306/wlhy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=UTC";
+
+    private static final String DATA_SOURCE_USERNAME = "root";
+
+    private static final String DATA_SOURCE_CIPHER_CODE = "Ccj841968545";
+
+    private static final String DATA_SOURCE_DRIVER_CLASS_NAME = "com.mysql.cj.jdbc.Driver";
+
+    private static Properties properties;
+
+    static {
+        try {
+        	properties = new Properties();
+            properties.put(DATA_SOURCE_PREFIX + "url", DATA_SOURCE_URL);
+            properties.put(DATA_SOURCE_PREFIX + "username", DATA_SOURCE_USERNAME);
+            properties.put(DATA_SOURCE_PREFIX + "password", DATA_SOURCE_CIPHER_CODE);
+            properties.put(DATA_SOURCE_PREFIX + "driver-class-name", DATA_SOURCE_DRIVER_CLASS_NAME);
+        } catch (Exception e) {
+            
+
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","driver_info","driver_payee_info","driver_car_info");
+    }
+
+    /**
+     * 通过表生成类
+     *
+     * @param author      作者
+     * @param packageName 包名
+     * @param tableNames  表名,不传创建所有
+     * @throws IOException
+     */
+    private static void generateByTables(String author, String packageName, String... tableNames) throws IOException {
+        GlobalConfig config = new GlobalConfig();
+
+        String dbUrl = properties.getProperty(DATA_SOURCE_PREFIX + "url");
+        String dbUsername = properties.getProperty(DATA_SOURCE_PREFIX + "username");
+        String dbPassword = properties.getProperty(DATA_SOURCE_PREFIX + "password");
+        String dbDriverName = properties.getProperty(DATA_SOURCE_PREFIX + "driver-class-name");
+
+        DataSourceConfig dataSourceConfig = new DataSourceConfig();
+        dataSourceConfig.setDbType(DbType.MYSQL).setUrl(dbUrl).setUsername(dbUsername).setPassword(dbPassword)
+                .setDriverName(dbDriverName);
+        StrategyConfig strategyConfig = new StrategyConfig();
+        strategyConfig.setEntityLombokModel(true)
+                .setSuperEntityColumns("create_date", "create_user_id", "update_date", "update_user_id", "update_flag",
+                        "delete_flag", "update_count", "now_version_no", "prev_version_no")
+                .setSuperEntityClass("BaseModel").setRestControllerStyle(true).setCapitalMode(true)
+                .setDbColumnUnderline(true).setNaming(NamingStrategy.underline_to_camel).setInclude(tableNames);// 修改替换成你需要的表名,多个表名传数组
+        config.setActiveRecord(true).setAuthor(author).setOutputDir(new File("src/main/java").getCanonicalPath())
+                .setFileOverride(false).setEnableCache(false);
+
+        TemplateConfig templateConfig = new TemplateConfig();
+        templateConfig.setXml(null);
+        new MyAutoGenerator().setGlobalConfig(config).setDataSource(dataSourceConfig).setStrategy(strategyConfig)
+                .setCfg(crateInjectionConfig()).setTemplate(templateConfig)
+                .setPackageInfo(
+                        new PackageConfig().setParent(packageName).setController("controller").setEntity("entity"))
+                .execute();
+    }
+
+    /**
+     * 获取应用配置
+     *
+     * @return 应用配置
+     * @throws IOException
+     */
+    private static Properties getApplicationProperties() throws IOException {
+        Properties properties = new Properties();
+        properties.load(GeneratorCodeByTables.class.getClassLoader().getResourceAsStream("application.properties"));
+        return properties;
+    }
+
+    /**
+     * 生成自定义配置
+     *
+     * @return 自定义配置
+     */
+    private static InjectionConfig crateInjectionConfig() {
+
+        InjectionConfig cfg = new InjectionConfig() {
+
+            @Override
+            public void initMap() {
+                // ignore
+            }
+        };
+
+        List<FileOutConfig> focList = new ArrayList<>();
+        focList.add(new FileOutConfig("/templates/mapper.xml.vm") {
+
+            @Override
+            public String outputFile(TableInfo tableInfo) {
+                String mapperBasePath = "/";
+                try {
+                    mapperBasePath = new File("src/main/resources/mapper").getCanonicalPath();
+                } catch (IOException e) {
+                    // ignore
+                }
+                return mapperBasePath + "/" + tableInfo.getEntityName() + "Mapper.xml";
+            }
+        });
+
+        cfg.setFileOutConfigList(focList);
+        return cfg;
+    }
+
+    public static class MyAutoGenerator extends AutoGenerator {
+
+        @Override
+        protected ConfigBuilder pretreatmentConfigBuilder(ConfigBuilder config) {
+            ConfigBuilder myConfig = super.pretreatmentConfigBuilder(config);
+
+            myConfig.getTableInfoList().stream()
+                    .forEach(tableInfo -> tableInfo.setImportPackages(Serializable.class.getCanonicalName()));
+
+            return myConfig;
+        }
+    }
+}

+ 26 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/config/OSSClientConfig.java

@@ -0,0 +1,26 @@
+package com.yh.saas.plugin.yiliangyiyun.config;
+
+import com.aliyun.oss.OSSClient;
+import lombok.Getter;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class OSSClientConfig {
+    @Getter
+    @Value("${oss.access.key.id:}")
+    private String accessId;
+    @Getter
+    @Value("${oss.access.key.secret:}")
+    private String accessKey;
+    @Getter
+    @Value("${oss.endpoint.default:}")
+    private String endpoint;
+
+    @Bean
+    public OSSClient ossClient() {
+        return new OSSClient(endpoint, accessId, accessKey);
+    }
+
+}

+ 18 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/config/yiliangyiyunConfig.java

@@ -0,0 +1,18 @@
+package com.yh.saas.plugin.yiliangyiyun.config;
+
+import com.yh.saas.common.support.gateway.EnableResponseWrapper;
+import com.yh.saas.common.support.plugin.RegisterPlugin;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author:chengchangjiang
+ * @Description:
+ * @Date:Created in 16:18 2021-05-19
+ */
+@MapperScan({"com.yh.saas.plugin.yiliangyiyun.**.mapper"})
+@RegisterPlugin(id = "yiliangyiyun", name = "易粮易运", desc = "易粮易运", entryPackage = {"com.yh.saas.plugin.yiliangyiyun"})
+@EnableResponseWrapper(ignores = {"/swagger-resources.*", "/v2/api-docs", "/webjars.*"}) // 开启response封装
+@Configuration
+public class yiliangyiyunConfig {
+}

+ 28 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/NumberConstant.java

@@ -0,0 +1,28 @@
+package com.yh.saas.plugin.yiliangyiyun.constant;
+
+public class NumberConstant {
+
+	// 新增服务商申请审核流businessCode
+	public static final String CONSTANT0 = "0";
+
+	public static final String CONSTANT1 = "1";
+
+	public static final String CONSTANT2 = "2";
+
+	public static final String CONSTANT3 = "3";
+
+	public static final String CONSTANT_CONTRACT = "CONTRACT";
+
+	public static final String CONSTANT_FEEDBACK = "FEEDBACK";
+
+	public static final String CONSTANT_PROCESS = "PROCESS";
+
+	public static final String CONSTANT_TRAN = "TRAN";
+
+	public static final String CONSTANT_PURCHASE = "PURCHASE";
+
+	public static final String PURCHASE_WAREHOUSING = "采购入库";
+	private NumberConstant() {
+
+	}
+}

+ 171 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java

@@ -0,0 +1,171 @@
+package com.yh.saas.plugin.yiliangyiyun.constant;
+
+import lombok.Getter;
+
+/**
+ * 单据状态
+ *
+ * @author gdc
+ */
+public enum StatusEnum {
+
+    //合同状态
+    CONTRACT_WAIT("0", "待执行", "wait implementation"),
+    CONTRACT_DO("1", "执行中", "Under implementation"),
+    CONTRACT_COMPLETED("3", "已完成", "Completed"),
+
+    // 仓库显示标识
+    HIDE("0","隐藏",""),
+    SHOW("1","显示",""),
+
+
+    // 出入库记录
+    TEMPORARILY_STORED("1", "已暂存", "Temporarily stored"),
+    SUBMITTED("3", "已提交", "Submitted"),
+
+    //司机禁用标识
+    DISABLED("1","已禁用","disabled"),
+    NOT_DISABLE("0","未禁用","not_disable"),
+
+
+    //调度状态
+    PROCESS_DO("1", "执行中", "Under implementation"),
+    PROCESS_COMPLETED("3", "已完成", "Completed"),
+
+
+    //汽运状态
+    NOT_DELIVERED("1","未送达",""),
+    NOT_LOADED("2","未装车","not_loaded"),
+    LOADED("3","已装车","loaded"),
+    DELIVERED("5","已送达","delivered"),
+
+    //运输管理状态
+    TRAN_DO("1", "执行中", "Under implementation"),
+    TRAN_COMPLETED("3", "已完成", "Completed"),
+
+    //清仓状态
+    NOT_CLEARED("1", "未清仓", "not_cleared"),
+    CLEARED("3", "已清仓", "cleared"),
+
+    //反馈状态
+    FEEDBACK_DO("1", "执行中", "Under implementation"),
+    FEEDBACK_COMPLETED("3", "已完货", "Completed"),
+
+    //签订合同状态
+    NOT_SIGNED("1", "未签合同", "not_signed"),
+    SIGNED("3", "已签合同", "signed"),
+
+    //出入库任务状态
+    TASK_REVIEWED("1", "待审核", "reviewed"),
+    TASK_RETURN("3", "已驳回", "return"),
+    TASK_DO("5", "执行中", "Under implementation"),
+    TASK_COMPLETED("7", "已完成", "Completed"),
+
+    // 采购计划显示标识
+    PURCHASE_HIDE("0","隐藏",""),
+    PURCHASE_SHOW("1","显示",""),
+
+    //采购/销售计划状态
+    ORDER_REVIEWED("1", "待审核", "reviewed"),
+    ORDER_PASSED("3", "已通过", "passed"),
+    ORDER_REJECTED("4", "已驳回", "rejected"),
+    ORDER_DEALED("5", "已成交", "dealed"),
+    ORDER_COMPLETED("7", "已完成", "Completed"),
+
+    //身份认证状态
+    IDENTITY_REVIEWED("1", "审核中", "reviewed"),
+    IDENTITY_FAILED("3", "未通过", "passed"),
+    IDENTITY_COMPLETED("7", "已认证", "Completed"),
+
+    //确认卸货状态
+    NOT_CONFIRM("1", "未确认", "not_confirmed"),
+    CONFIRM("3", "已确认", "confirmed"),
+
+    // 采购入库统计,采购平仓统计
+    PUR_REVIEWED("1", "待审核", ""),
+    PUR_PAY("3", "部分付款", ""),
+    PUR_PAYaLL("5", "全部付款", ""),
+    PUR_RETURN("7", "已驳回", ""),
+
+    // 采购平仓统计
+    PUR_COLLECT("4", "部分收款", ""),
+    PUR_COLLECTaLL("6", "全部收款", ""),
+    TO_BE_RECEIVED("8", "待收款", ""),
+
+    // 点价确认单附件状态
+    Not_UPLOADED("0", "未上传", ""),
+    UPLOADED("1", "已上传", ""),
+
+    // 报表状态
+    FORM_REVIEWED("1", "未审核", "reviewed"),
+    STATISTICAL_AUDIT("2", "统计已审核", "Statistical audit"),
+    FINANCIAL_AUDIT("7", "财务已审核", "Financial audit"),
+    FINANCIAL_REJECTION("8", "财务已驳回", "Financial rejection"),
+    MAKER_AUDIT("9", "决策人已审核", "Maker audit"),
+    MAKER_REJECTION("11", "决策人已驳回", "Maker rejection"),
+
+    // 收款状态
+    NOT_COLLECTION("1", "待回款", ""),
+    COLLECTION("3", "已回款", ""),
+
+    // 入驻公司状态
+    TO_BE_REVIEWED("1", "待审核", ""),
+    PASSED_COMP("3", "已通过", ""),
+    FAIL_COMP("5", "未通过", ""),
+
+    //收购价格状态
+    PURCHASE_REVIEWED("1", "审核中", "reviewed"),
+    PURCHASE_COMPLETED("3", "已通过", "passed"),
+    PURCHASE_FAILED("4", "已驳回", "failed"),
+
+    //质检检斤管理状态
+    FIRST_INSPECTED("0", "已初检", "first inspected"),
+    INSPECTED("1", "已质检", "inspected"),
+    COMPLEX_INSPECTED("2", "已复检", "complex inspected"),
+    WEIGHED_GROSS_WEIGHT("3", "已称毛重", "weighedgrossweight"),
+    TARED("5", "已称皮重", "tared"),
+
+    //付款管理状态
+    TO_BE_SETTLED("1", "待结算", "to_be_settled"),
+
+    //贸易仓单状态
+    TO_BE_TRADERETURN("3", "待还款", "to_be_tradereturn"),
+    RETURN_TRADE_WAREHOUSE_RECEIPT("0", "已驳回", "return_trade_warehouse_receipt"),
+
+    //收购信息状态
+    GRAIN_REVIEWED("5", "待审核", "grain_reviewed"),
+    GRAIN_REJECT("7", "已驳回", "grain_reject"),
+    GRAIN_ADOPT("9", "已通过", "grain_adopt"),
+
+
+    ;
+    @Getter
+    private String flag;
+
+    @Getter
+    private String name;
+
+    @Getter
+    private String nameEn;
+
+    @Getter
+    private String description;
+
+    private StatusEnum(String flag, String name, String nameEn) {
+        this.flag = flag;
+        this.name = name;
+        this.nameEn = nameEn;
+    }
+
+    private StatusEnum(String flag, String name, String nameEn, String description) {
+        this.flag = flag;
+        this.name = name;
+        this.nameEn = nameEn;
+        this.description = description;
+    }
+
+    @Override
+    public String toString() {
+        return "[" + this.flag + "]" + this.name + "_" + this.nameEn;
+    }
+}

+ 96 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/AcquisitionInfoController.java

@@ -0,0 +1,96 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.yh.saas.plugin.yiliangyiyun.entity.AcquisitionInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IAcquisitionInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 记录收购信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-26
+ */
+@RestController
+@RequestMapping("/acquisitionInfo")
+public class AcquisitionInfoController {
+    @Autowired
+    private IAcquisitionInfoService iAcquisitionInfoService;
+
+    /**
+     * 添加收购信息
+     * @param acquisitionInfo
+     * @return
+     */
+    @PostMapping("/api/addAcquisition")
+    public String addAcquisition(@RequestBody AcquisitionInfo acquisitionInfo){
+        return iAcquisitionInfoService.addAcquisition(acquisitionInfo);
+    }
+
+    /**
+     * 收购信息列表
+     * @param acquisitionInfo
+     * @return
+     */
+    @GetMapping("/selectAcquisitionPage")
+    public List<AcquisitionInfo> selectAcquisitionPage(AcquisitionInfo acquisitionInfo){
+        return iAcquisitionInfoService.selectAcquisitionPage(acquisitionInfo);
+    }
+
+    /**
+     * 关注
+     * @param acquisitionInfo
+     * @return
+     */
+    @PostMapping("/api/follow")
+    public String follow(@RequestBody AcquisitionInfo acquisitionInfo){
+        return iAcquisitionInfoService.follow(acquisitionInfo);
+    }
+
+    /**
+     * 取消关注
+     * @param acquisitionInfo
+     * @return
+     */
+    @PostMapping("/api/followNot")
+    public String followNot(@RequestBody AcquisitionInfo acquisitionInfo){
+        return iAcquisitionInfoService.followNot(acquisitionInfo);
+    }
+
+    /**
+     * 查看收购信息
+     * @param acquisitionInfo
+     * @return
+     */
+    @GetMapping("/getAcquisition")
+    public AcquisitionInfo getAcquisition(AcquisitionInfo acquisitionInfo){
+        return iAcquisitionInfoService.getAcquisition(acquisitionInfo.getId());
+    }
+
+    /**
+     * 收购业务查看
+     * @param acquisitionInfo
+     * @return
+     */
+    @GetMapping("/getInfo")
+    public AcquisitionInfo getInfo(AcquisitionInfo acquisitionInfo){
+        return iAcquisitionInfoService.getInfo(acquisitionInfo);
+    }
+
+    /**
+     * 审核
+     *
+     * @param acquisitionInfo
+     * @return
+     */
+    @PostMapping("/api/examine")
+    public String examine(@RequestBody AcquisitionInfo acquisitionInfo) {
+        return iAcquisitionInfoService.examine(acquisitionInfo);
+    }
+}
+

+ 58 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/AppVersionController.java

@@ -0,0 +1,58 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.yh.saas.plugin.yiliangyiyun.entity.AppVersion;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
+import com.yh.saas.plugin.yiliangyiyun.service.IAppVersionService;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonUserService;
+import com.yh.saas.plugin.yiliangyiyun.util.GeTuiUtils;
+import org.apache.commons.codec.digest.Md5Crypt;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ * APP版本管理 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-23
+ */
+@RestController
+@RequestMapping("/appVersion")
+public class AppVersionController {
+    @Autowired
+    private IAppVersionService appVersionService;
+    @Autowired
+    private ICommonUserService commonUserService;
+    @Autowired
+    private GeTuiUtils geTuiUtils;
+    /**
+     * 查看版本信息
+     */
+    @GetMapping("/selectInfo")
+    public AppVersion selectInfo(@RequestParam String appid, String version, String imei) {
+        return appVersionService.selectInfo(appid,version,imei);
+    }
+    /**
+     * 推送测试
+     */
+    @GetMapping("/test")
+    public void test() {
+        geTuiUtils.pushByCid("推送测试","推送测试内容","84f62127b7384dcdbaeaddfe460329fc");
+//       List<CommonUser> list =   commonUserService.selectList(new EntityWrapper<>());
+//       for(CommonUser commonUser:list){
+//           commonUser.setPassword(Md5Crypt.md5Crypt("123456".getBytes(), "$1$" + commonUser.getPhone().substring(0, 7)));
+//       }
+//       commonUserService.updateBatchById(list);
+    }
+
+}
+

+ 21 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonCompanyIdentityController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 公司、粮商身份关系表 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-09-02
+ */
+@RestController
+@RequestMapping("/commonCompanyIdentity")
+public class CommonCompanyIdentityController {
+
+}
+

+ 47 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonSysParameterController.java

@@ -0,0 +1,47 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.winsea.svc.base.base.entity.CommonStaff;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonSysParameter;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonSysParameterService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 记录系统用到的变量 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-05-18
+ */
+@RestController
+@RequestMapping("/commonSysParameter")
+public class CommonSysParameterController {
+    @Autowired
+    private ICommonSysParameterService iCommonSysParameterService;
+    /**
+     * 查询
+     */
+    @GetMapping("/getInfo")
+    public List<CommonSysParameter> getInfo(String constId){
+        return iCommonSysParameterService.getInfo(constId);
+    }
+
+
+    /**
+     * 查询
+     */
+    @GetMapping("/getStaffInfo")
+    public List<CommonStaff> getStaffInfo(String roleId){
+        return iCommonSysParameterService.getStaffInfo(roleId);
+    }
+
+}
+

+ 298 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java

@@ -0,0 +1,298 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.winsea.svc.base.base.entity.CommonCompany;
+import com.winsea.svc.base.base.entity.CommonStaff;
+import com.winsea.svc.base.base.entity.CommonStaffRole;
+import com.winsea.svc.base.base.service.ICommonCompanyService;
+import com.winsea.svc.base.base.service.ICommonStaffService;
+import com.winsea.svc.base.base.util.ClientTypeChecker;
+import com.winsea.svc.base.security.entity.Account;
+import com.winsea.svc.base.security.exception.AuthErrorCodeEnums;
+import com.winsea.svc.base.security.exception.AuthException;
+import com.winsea.svc.base.security.service.IAccountService;
+import com.winsea.svc.base.security.util.AuthSecurityUtils;
+import com.winsea.svc.base.security.vo.command.AuthUserCommand;
+import com.winsea.svc.notice.entity.NoticeTaskInfo;
+import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.common.support.util.StringUtils;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
+import com.yh.saas.plugin.yiliangyiyun.entity.UnimallMessage;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonUserService;
+import com.yh.saas.plugin.yiliangyiyun.util.WebSocket;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-07-12
+ */
+@RestController
+@RequestMapping("/commonUser")
+public class CommonUserController {
+
+    private static final String DEFAULT_COMPANY_MANAGER_USRENAME = "admin";
+    @Autowired
+    private ICommonUserService commonUserService;
+    @Autowired
+    private HttpServletRequest request;
+
+    @Autowired
+    private IAccountService userService;
+
+    @Autowired
+    private ICommonStaffService staffService;
+
+    @Autowired
+    private ICommonCompanyService companyService;
+    @Autowired
+    private WebSocket webSocket;
+
+    /**
+     * 注册
+     * @param commonUser
+     * @return
+     */
+    @PostMapping("/register")
+    public  String register(@RequestBody CommonUser commonUser) throws ServiceException {
+        return commonUserService.register(commonUser);
+    }
+
+    /**
+     * 重置密码
+     * @param commonUser
+     * @return
+     */
+    @PostMapping("/resetPassword")
+    public  String resetPassword(@RequestBody CommonUser commonUser) throws ServiceException {
+        return commonUserService.resetPassword(commonUser);
+    }
+
+
+    /**
+     * 修改用户信息
+     * @param commonUser
+     * @return
+     */
+    @PostMapping("/editUserInfo")
+    public  String editUserInfo(@RequestBody CommonUser commonUser) throws ServiceException {
+        return commonUserService.editUserInfo(commonUser);
+    }
+
+    /**
+     * 发送验证码
+     * @param phone
+     * @return
+     * @throws ServiceException
+     */
+    @GetMapping("/sendVerifyCode")
+    public  String sendVerifyCode(String phone) throws ServiceException {
+        return commonUserService.sendVerifyCode(phone);
+    }
+
+    /**
+     * 登录
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @GetMapping("/login")
+    public CommonUser login(CommonUser commonUser) throws ServiceException {
+        return commonUserService.login(commonUser);
+    }
+
+    /**
+     * 快捷登录
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @GetMapping("/loginVerifyCode")
+    public CommonUser loginVerifyCode(CommonUser commonUser) throws ServiceException {
+        return commonUserService.loginVerifyCode(commonUser);
+    }
+    /**
+     * 校验验证码
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @GetMapping("/checkVerifyCode")
+    public CommonUser checkVerifyCode(CommonUser commonUser) throws ServiceException {
+        return commonUserService.checkVerifyCode(commonUser);
+    }
+
+
+    /**
+     * 快速登录
+     *
+     * @return 登录信息
+     */
+    @PostMapping("/api/loginQuickly")
+    public Account loginQuickly(@RequestBody AuthUserCommand.LoginQuickly loginQuicklyCommand) {
+        return commonUserService.login(createLoginUser(loginQuicklyCommand), loginQuicklyCommand.getVeriCode());
+    }
+
+
+
+    /**
+     * 创建登录用户
+     *
+     * @param authUser 登录信息
+     * @return 登录用户
+     */
+    private Account createLoginUser(AuthUserCommand authUser) {
+        Account user = new Account();
+
+        String userAccount = authUser.getUsername();
+        if (StringUtils.isEmpty(userAccount)) {
+            // 用户名为空则使用手机号作为登录名
+            if (!StringUtils.isEmpty(authUser.getMobilePhone())) {
+                userAccount = authUser.getMobilePhone();
+            }
+            // 用户名为空并且手机号也为空则使用默认用户名
+            else {
+                userAccount = DEFAULT_COMPANY_MANAGER_USRENAME;
+            }
+        }
+
+        String compId = null;
+        // 如果是岸基则使用域名获取公司ID
+        if (!ClientTypeChecker.isVesselTerminal()) {
+            if (!StringUtils.isEmpty(authUser.getCompanyName())) {
+                CommonCompany commonCompany = companyService.findCompNameInfo(authUser.getCompanyName());
+                if (null == commonCompany) {
+                    throw new AuthException(AuthErrorCodeEnums.COMP_NAME_NULL);
+                }
+                compId = commonCompany.getCompId();
+            } else {
+                compId = companyService.getCompanyIdByDomainName(authUser.getCompanyId(), authUser.getDomainName(),
+                        request.getServerName());
+
+                if (StringUtils.isEmpty(compId)){
+                    compId = userService.findPhoneCompId(authUser.getMobilePhone());
+                }
+            }
+        }
+        // 如果是船端则获取船舶信息表中第一条数据的公司ID作为登录用公司ID
+        else {
+//            compId = companyService.selectById(vesselService.selectOne(null).getCompId()).getCompId();
+        }
+
+        user.setLoginName(userAccount);
+        user.setUserMobilePhone(authUser.getMobilePhone());
+        user.setLoginPassword(authUser.getPassword());
+        user.setAccountType(
+                null != authUser.getUserKind() ? Account.AccountType.valueOf(authUser.getUserKind()) : null);
+        user.setCompId(compId);
+        return user;
+    }
+
+
+    /**
+     * 查询任务
+     *
+     * @param noticeTask 查询条件
+     * @return 返回分页查询结果
+     */
+    @GetMapping("/query/findHisPageNoticeTasks")
+    public Page<NoticeTaskInfo> findHisPageNoticeTasks(NoticeTaskInfo noticeTask) {
+        return commonUserService.findHisPageNoticeTasks(noticeTask);
+    }
+
+    /**
+     * 查验app 账号
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/api/checkApp")
+    public String checkApp(@RequestBody CommonUser commonUser) throws ServiceException {
+        return commonUserService.checkApp(commonUser);
+    }
+    /**
+     * Session检测
+     *
+     * @return
+     * @throws ServiceException
+     */
+    @GetMapping("/api/checkSession")
+    public String checkSession() throws ServiceException {
+        return commonUserService.checkSession();
+    }
+
+    /**
+     * 公司
+     *
+     * @return
+     */
+    @GetMapping("/getComp")
+    public List<CommonCompany> getComp() {
+        return commonUserService.getComp();
+    }
+    /**
+     * 公司
+     *
+     * @return
+     */
+    @GetMapping("/getCompOwn")
+    public List<CommonCompany> getCompOwn(String phone) {
+        return commonUserService.getCompOwn(phone);
+    }
+    /**
+     * 首页公司下拉列表
+     *
+     * @return
+     */
+    @GetMapping("/getCompList")
+    public List<String> getCompList(String userMobilePhone) {
+        return commonUserService.getCompList(userMobilePhone);
+    }
+
+    /**
+     * 次要职务
+     *
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/api/saveRole")
+    public String saveRole(@RequestBody CommonStaffRole commonStaffRole) {
+        return commonUserService.saveRole(commonStaffRole);
+    }
+
+    @PostMapping({"/api/changeInfo"})
+    public void changeInfo(@RequestBody CommonStaff staff) {
+        commonUserService.changeInfo(staff);
+    }
+
+
+    @PostMapping("/test")
+    public void test() {
+//        JSONObject jsonObject = new JSONObject();
+//        jsonObject.put("msg", "1234567");
+//        MessagePusherUtils.sendPrivateMessage(AuthSecurityUtils.getCurrentUserId(),JSONObject.toJSONString(jsonObject));
+        UnimallMessage messageDO = new UnimallMessage();
+        messageDO.setAdminId(AuthSecurityUtils.getCurrentUserId());
+        messageDO.setCustomer(AuthSecurityUtils.getCurrentUserInfo().getLoginName());
+        messageDO.setOperation("XX");
+        messageDO.setResult("XX");
+        messageDO.setGmtUpdate(new Date());
+        messageDO.setGmtCreate(new Date());
+        messageDO.setTaskId(IdGenerator.generateUUID());
+        messageDO.setCompanyId(AuthSecurityUtils.getCurrentUserInfo().getCompId());
+        messageDO.setPath("XXXXX");
+        webSocket.sendOneMessage(messageDO);
+    }
+}
+

+ 21 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 记录车辆信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@RestController
+@RequestMapping("/driverCarInfo")
+public class DriverCarInfoController {
+
+}
+

+ 21 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 记录司机信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@RestController
+@RequestMapping("/driverInfo")
+public class DriverInfoController {
+
+}
+

+ 21 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverPayeeInfoController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 记录收款账户信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@RestController
+@RequestMapping("/driverPayeeInfo")
+public class DriverPayeeInfoController {
+
+}
+

+ 128 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/AcquisitionInfo.java

@@ -0,0 +1,128 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.io.Serializable;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 记录收购信息
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("acquisition_info")
+public class AcquisitionInfo extends BaseModel<AcquisitionInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 公司id
+     */
+    private String compId;
+    /**
+     * 用户id
+     */
+    private String commonId;
+    /**
+     * 仓库名称
+     */
+    private String warehouseName;
+    /**
+     * 收购信息
+     */
+    private String acquisitionInformation;
+    /**
+     * 是否勾选显示复选框(0没勾选1勾选)
+     */
+    private String checkFlag;
+    /**
+     * 是否关注(0没关注1关注)
+     */
+    private String followFlag;
+    /**
+     * 信息状态标识(1已隐藏3显示中5待审核7已驳回9已通过)
+     */
+    private String statusFlag;
+    /**
+     * 信息状态
+     */
+    private String status;
+    /**
+     * 通过1驳回2
+     */
+    @TableField(exist = false)
+    private Integer flag;
+    /**
+     * 是否关注
+     */
+    @TableField(exist = false)
+    private String follow;
+
+    /**
+     * 查询市
+     */
+    @TableField(exist = false)
+    private String city;
+
+    /**
+     * 仓库所在地省
+     */
+    @TableField(exist = false)
+    private String warehousePrivate;
+    /**
+     * 仓库所在地市
+     */
+    @TableField(exist = false)
+    private String warehouseCity;
+    /**
+     * 仓库所在地区
+     */
+    @TableField(exist = false)
+    private String warehouseArea;
+    /**
+     * 详细地址
+     */
+    @TableField(exist = false)
+    private String detailedAddress;
+
+    /**
+     * 当前登录人手机
+     */
+    @TableField(exist = false)
+    private String loginPhone;
+    /**
+     * 模糊查询
+     */
+    @TableField(exist = false)
+    private String searchKeyWord;
+    /**
+     * 仓库id
+     */
+    @TableField(exist = false)
+    private String warehouseId;
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 64 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/AppVersion.java

@@ -0,0 +1,64 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * APP版本管理
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("app_version")
+public class AppVersion extends BaseModel<AppVersion> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 版本号
+     */
+    private String version;
+    /**
+     * 提示信息
+     */
+    private String note;
+    /**
+     * 路径
+     */
+    private String url;
+    /**
+     * wgt路径
+     */
+    private String wgtUrl;
+    /**
+     * 版本code码
+     */
+    private String versionCode;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 175 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CacheComponent.java

@@ -0,0 +1,175 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.alibaba.fastjson.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Created by rize on 2019/3/22.
+ */
+@Component
+public class CacheComponent {
+
+    @Autowired
+    private StringRedisTemplate stringRedisTemplate;
+
+    public void putObj(String key, Object obj, Integer expireSec) {
+        if (expireSec != null) {
+            stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(obj), expireSec, TimeUnit.SECONDS);
+        } else {
+            stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(obj));
+        }
+    }
+
+    public Long incRaw(String key) {
+        return stringRedisTemplate.opsForValue().increment(key);
+    }
+
+    public  <T> T getObj(String key, Class<T> clazz) {
+        String json = stringRedisTemplate.opsForValue().get(key);
+        if (StringUtils.isEmpty(json)) {
+            return null;
+        }
+        return JSONObject.parseObject(json, clazz);
+    }
+
+    public <T> List<T> getObjList(String key, Class<T> clazz) {
+        String json = stringRedisTemplate.opsForValue().get(key);
+        if (StringUtils.isEmpty(json)) {
+            return null;
+        }
+        return JSONObject.parseArray(json, clazz);
+    }
+
+    public void putHashAll(String key, Map<String, String> map, Integer expireSec) {
+        stringRedisTemplate.opsForHash().putAll(key, map);
+        stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+    }
+
+    public Map<String,String> getHashAll(String key) {
+        if (!stringRedisTemplate.hasKey(key)) {
+            return null;
+        }
+        return (Map)stringRedisTemplate.opsForHash().entries(key);
+    }
+
+    public <T> T getHashObj(String hashName, String key, Class<T> clazz) {
+        String o = (String) stringRedisTemplate.opsForHash().get(hashName, key);
+        if (StringUtils.isEmpty(o)) {
+            return null;
+        }
+        return JSONObject.parseObject(o, clazz);
+    }
+
+    public String getHashRaw(String hashName, String key) {
+        String o = (String) stringRedisTemplate.opsForHash().get(hashName, key);
+        if (StringUtils.isEmpty(o)) {
+            return null;
+        }
+        return o;
+    }
+
+    public <T> List<T> getHashArray(String hashName, String key, Class<T> clazz) {
+        String o = (String) stringRedisTemplate.opsForHash().get(hashName, key);
+        if (StringUtils.isEmpty(o)) {
+            return null;
+        }
+        return JSONObject.parseArray(o, clazz);
+    }
+
+    public Long incHashRaw(String hashName, String key, long delta) {
+        return stringRedisTemplate.opsForHash().increment(hashName, key, delta);
+    }
+
+    public void putHashRaw(String hashName, String key, String str, Integer expireSec) {
+        boolean hasKey = stringRedisTemplate.hasKey(key);
+        stringRedisTemplate.opsForHash().put(hashName, key, str);
+        if (!hasKey) {
+            stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+        }
+    }
+
+    public void putHashRaw(String hashName, String key, String str) {
+        stringRedisTemplate.opsForHash().put(hashName, key, str);
+    }
+
+    public void putHashObj(String hashName, String key, Object obj, Integer expireSec) {
+        boolean hasKey = stringRedisTemplate.hasKey(key);
+        stringRedisTemplate.opsForHash().put(hashName, key, JSONObject.toJSONString(obj));
+        if (!hasKey) {
+            stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+        }
+    }
+
+    public void delHashObj(String hashName, String key) {
+        stringRedisTemplate.opsForHash().delete(hashName, key);
+    }
+
+
+    public void putRaw(String key, String value) {
+        putRaw(key, value, null);
+    }
+
+    public void putRaw(String key, String value, Integer expireSec) {
+        if (expireSec != null) {
+            stringRedisTemplate.opsForValue().set(key, value, expireSec, TimeUnit.SECONDS);
+        } else {
+            stringRedisTemplate.opsForValue().set(key, value);
+        }
+    }
+
+    public String getRaw(String key) {
+        return stringRedisTemplate.opsForValue().get(key);
+    }
+
+    public void del(String key) {
+        stringRedisTemplate.delete(key);
+    }
+
+    public boolean hasKey(String key) {
+        return stringRedisTemplate.hasKey(key);
+    }
+
+    public void putSetRaw(String key, String member, Integer expireSec) {
+        stringRedisTemplate.opsForSet().add(key, member);
+        stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+    }
+
+    public void putSetRawAll(String key, String[] set, Integer expireSec) {
+        stringRedisTemplate.opsForSet().add(key, set);
+        stringRedisTemplate.expire(key, expireSec, TimeUnit.SECONDS);
+    }
+
+    public void removeSetRaw(String key, String member) {
+        stringRedisTemplate.opsForSet().remove(key, member);
+    }
+
+    public boolean isSetMember(String key, String member) {
+        return stringRedisTemplate.opsForSet().isMember(key, member);
+    }
+
+    /**
+     * 获取指定前缀的Key
+     * @param prefix
+     * @return
+     */
+    public Set<String> getPrefixKeySet(String prefix) {
+        return stringRedisTemplate.keys(prefix + "*");
+    }
+
+    public void delPrefixKey(String prefix) {
+        Set<String> prefixKeySet = getPrefixKeySet(prefix);
+        for (String key : prefixKeySet) {
+            stringRedisTemplate.delete(key);
+        }
+    }
+
+
+}

+ 47 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonCompanyIdentity.java

@@ -0,0 +1,47 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 公司、粮商身份关系表
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-09-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+public class CommonCompanyIdentity extends BaseModel<CommonCompanyIdentity> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 公司id
+     */
+
+    @TableId(type = IdType.UUID)
+    private String comId;
+    /**
+     * 身份认证表id
+     */
+    private String identityId;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return null;
+    }
+
+}

+ 78 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonSysParameter.java

@@ -0,0 +1,78 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 记录系统用到的变量
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-05-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("common_sys_parameter")
+public class CommonSysParameter extends BaseModel<CommonSysParameter> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 变量类别ID
+     */
+    private String constId;
+    /**
+     * 变量类别名
+     */
+    private String constName;
+    /**
+     * 变量Key(自增数字形式)
+     */
+    private String constKey;
+    /**
+     * 变量值
+     */
+    private String constValue;
+    /**
+     * 英文变量值
+     */
+    private String constValueEn;
+    /**
+     * 变量描述
+     */
+    private String constDescription;
+    /**
+     * 顺序
+     */
+    private int sort;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    public static class QueryFiles {
+
+        public static final String CONST_ID = "const_id";
+
+        public static final String SORT = "sort";
+
+    }
+
+}

+ 109 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonUser.java

@@ -0,0 +1,109 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+
+import java.io.Serializable;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-07-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("common_user")
+public class CommonUser extends BaseModel<CommonUser> {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 手机号
+     */
+    private String phone;
+    /**
+     * 密码
+     */
+    private String password;
+    /**
+     * 角色ID
+     */
+    private String roleIds;
+    /**
+     * 头像
+     */
+    private String avatarUrl;
+    /**
+     * 用户名
+     */
+    private String userName;
+    /**
+     * 状态:1 正常 0 冻结
+     */
+    private Integer status;
+    /**
+     * 签名图片
+     */
+    private String signImg;
+    /**
+     * 微信号
+     */
+    private String wechatNo;
+    /**
+     * 所属公司ID
+     */
+    private String companyId;
+    /**
+     * 登录token
+     */
+    private String accessToken;
+    /**
+     * 粮信userID
+     */
+    private String liangxinId;
+    /**
+     * 推送id
+     */
+    private String cid;
+    /**
+     * 注册码
+     */
+    @TableField(exist = false)
+    private String verifyCode;
+
+    /**
+     * 身份信息
+     */
+    @TableField(exist = false)
+    private String  identityFlag ;
+
+    /**
+     * 身份信息
+     */
+    @TableField(exist = false)
+    private String  driverFlag ;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 64 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverCarInfo.java

@@ -0,0 +1,64 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 记录车辆信息
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("driver_car_info")
+public class DriverCarInfo extends BaseModel<DriverCarInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 司机id
+     */
+    private String driverId;
+    /**
+     * 车牌号
+     */
+    private String carNumber;
+    /**
+     * 人车合影附件地址
+     */
+    private String addressUrl;
+    /**
+     * 认证状态key(1审核中3未通过5已认证)
+     */
+    private String statusKey;
+    /**
+     * 认证状态
+     */
+    private String status;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 145 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverInfo.java

@@ -0,0 +1,145 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.util.Date;
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 记录司机信息
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("driver_info")
+public class DriverInfo extends BaseModel<DriverInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 公司id
+     */
+    private String compId;
+    /**
+     * 用户id
+     */
+    private String commonId;
+    /**
+     * 司机姓名
+     */
+    private String driverName;
+    /**
+     * 司机电话
+     */
+    private String driverPhone;
+    /**
+     * 身份证人像面附件地址
+     */
+    private String cardAddressUrl;
+    /**
+     * 身份证国徽面面附件地址
+     */
+    private String cardBackAddressUrl;
+    /**
+     * 身份证有效期
+     */
+    private Date cardValidityDate;
+    /**
+     * 司机类型(1挂车司机2非挂车司机)
+     */
+    private String driverType;
+    /**
+     * 驾驶证主页
+     */
+    private String driverLicenseHomePage;
+    /**
+     * 驾驶证副页
+     */
+    private String driverLicenseBackPage;
+    /**
+     * 驾驶证有效期
+     */
+    private Date driverLicenseValidityDate;
+    /**
+     * 行驶证主页
+     */
+    private String drivingLicenseHomePage;
+    /**
+     * 行驶证副页
+     */
+    private String drivingLicenseBackPage;
+    /**
+     * 行驶证有效期
+     */
+    private Date drivingLicenseValidityDate;
+    /**
+     * 挂车行驶证主页
+     */
+    private String trailerLicenseHomePage;
+    /**
+     * 挂车行驶证副页
+     */
+    private String trailerLicenseBackPage;
+    /**
+     * 挂车行驶证有效期
+     */
+    private Date trailerLicenseValidityDate;
+    /**
+     * 从业资格证
+     */
+    private String qualificationCertificate;
+    /**
+     * 从业资格证有效期
+     */
+    private Date qualificationCertificateValidityDate;
+    /**
+     * 运营证
+     */
+    private String operationCertificate;
+    /**
+     * 运营证有效期
+     */
+    private Date operationCertificateValidityDate;
+    /**
+     * 挂车运营证
+     */
+    private String trailerOperationCertificate;
+    /**
+     * 挂车运营证有效期
+     */
+    private Date trailerOperationCertificateValidityDate;
+    /**
+     * 认证状态key(1审核中3未通过5已认证)
+     */
+    private String authenticationStatusKey;
+    /**
+     * 认证状态
+     */
+    private String authenticationStatus;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 72 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverPayeeInfo.java

@@ -0,0 +1,72 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 记录收款账户信息
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("driver_payee_info")
+public class DriverPayeeInfo extends BaseModel<DriverPayeeInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 司机id
+     */
+    private String driverId;
+    /**
+     * 银行卡附件地址
+     */
+    private String payeeAddressUrl;
+    /**
+     * 银行卡号码
+     */
+    private String bankCard;
+    /**
+     * 开户行
+     */
+    private String bankDeposit;
+    /**
+     * 开户支行
+     */
+    private String bankDepositBranch;
+    /**
+     * 收款人姓名
+     */
+    private String payeeName;
+    /**
+     * 默认标识(1是)
+     */
+    private String defaultFlag;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 37 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/LogoConfig.java

@@ -0,0 +1,37 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.awt.*;
+
+public class LogoConfig {
+    // logo默认边框颜色
+    public static final Color DEFAULT_BORDERCOLOR = Color.WHITE;
+    // logo默认边框宽度
+    public static final int DEFAULT_BORDER = 2;
+    // logo大小默认为照片的1/6
+    public static final int DEFAULT_LOGOPART = 6;
+
+    private final int border = DEFAULT_BORDER;
+    private final Color borderColor;
+    private final int logoPart;
+
+    public LogoConfig() {
+        this(DEFAULT_BORDERCOLOR, DEFAULT_LOGOPART);
+    }
+
+    public LogoConfig(Color borderColor, int logoPart) {
+        this.borderColor = borderColor;
+        this.logoPart = logoPart;
+    }
+
+    public Color getBorderColor() {
+        return borderColor;
+    }
+
+    public int getBorder() {
+        return border;
+    }
+
+    public int getLogoPart() {
+        return logoPart;
+    }
+}

+ 52 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/UnimallMessage.java

@@ -0,0 +1,52 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-12-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("unimall_message")
+public class UnimallMessage extends BaseModel<UnimallMessage> {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(type = IdType.UUID)
+    private String id;
+    private String customer;
+    private String operation;
+    private String result;
+    private Integer status;
+    private String taskId;
+    /**
+     * 消息跳转路径
+     */
+    private String path;
+    private Date gmtCreate;
+    private Date gmtUpdate;
+    private String adminId;
+    private String userId;
+    private String companyId;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 54 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/BiViewInfo.java

@@ -0,0 +1,54 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+
+/**
+ * <p>
+ * 记录司机信息
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-05-29
+ */
+@Data
+@Accessors(chain = true)
+public class BiViewInfo  {
+    /**
+     * 统计类型
+     */
+    private String biType;
+    /**
+     * 统计总数
+     */
+    private String total;
+    /**
+     * 统计名称
+     */
+    private String name;
+    /**
+     * 统计数量
+     */
+    private String count;
+    /**
+     * 统计百分比
+     */
+    private String percentage;
+    /**
+     * 开始
+     */
+    private String startPlace;
+    /**
+     * 结束
+     */
+    private String endPlace;
+    /**
+     * 集合
+     */
+    private List<BiViewInfo> biViewInfoList;
+
+}

+ 23 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ConfigDO.java

@@ -0,0 +1,23 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Author:chengchangjiang
+ * @Description: 配置实体类
+ * @Date:Created in 2021年3月23日09:27:01
+ */
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class ConfigDO  {
+    /* 关键字 */
+    private String keyWord;
+    /* 值 */
+    private String valueWorth;
+}

+ 20 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/DistinguishView.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class DistinguishView {
+
+    private String bankNo;
+    private String bankName;
+    private List<String> bankNameZhihang;
+    private String bankPhone;
+    private String bankBranch;
+    private String recPerson;
+    private String recPersonNo;
+    private String recPersonAddr;
+
+}

+ 263 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ExportVView.java

@@ -0,0 +1,263 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class ExportVView {
+    /**
+     * 采购公司
+     */
+    private String compName;
+    /**
+     * 收购仓库
+     */
+    private String warehouseName;
+    /**
+     * 仓位号
+     */
+    private String binNumber;
+
+    /**
+     * 开票日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date createDate;
+    /**
+     * 合同号
+     */
+    private String contractNo;
+    /**
+     * 出入库类型
+     */
+    private String inOutType;
+    /**
+     * 业务编号
+     */
+    private String paymentNo;
+    /**
+     * 客户
+     */
+    private String customerName;
+    /**
+     * 供应商
+     */
+    private String supplier;
+    /**
+     * 货名
+     */
+    private String goodsName;
+    /**
+     * 类型
+     */
+    private String type;
+    /**
+     * 品级
+     */
+    private String grade;
+    /**
+     * 水分
+     */
+    private String waterContent;
+    /**
+     * 杂质
+     */
+    private String impurity;
+    /**
+     * 霉变粒
+     */
+    private String mildewGrain;
+    /**
+     * 不完善粒
+     */
+    private String imperfectGrain;
+    /**
+     * 容重
+     */
+    private String bulkDensity;
+    /**
+     * 热损伤
+     */
+    private String jiaorenli;
+    /**
+     * 车牌号
+     */
+    private String carNo;
+    /**
+     * 箱号
+     */
+    private String boxNo;
+    /**
+     * 箱号2
+     */
+    private String boxNoOther;
+    /**
+     * 封号
+     */
+    private String titleNo;
+    /**
+     * 封号2
+     */
+    private String titleNoOther;
+    /**
+     * 净重单价
+     */
+    private String netWeightPrice;
+    /**
+     * 毛重
+     */
+    private String grossWeight;
+    /**
+     * 皮重
+     */
+    private String tare;
+    /**
+     * 扣重
+     */
+    private Float buckleWeight;
+    /**
+     * 净重
+     */
+    private String netWeight;
+    /**
+     * 发货净重(吨)
+     */
+    private Double deliveryVolume;
+    /**
+     * 发货库
+     */
+    private String sendWarehouse;
+    /**
+     * 运输单价
+     */
+    private Double tranPrice;
+    /**
+     * 扣单价
+     */
+    private Double unitDeduction;
+    /**
+     * 纯重单价
+     */
+    private Double pureWeightPrice;
+    /**
+     * 纯重(公斤)
+     */
+    private Float pureWeight;
+    /**
+     * 应付金额(元/吨)
+     */
+    private Double amountIngPayable;
+    /**
+     * 实付金额(元/吨)
+     */
+    private Double amountEdPayable;
+    /**
+     * 姓名
+     */
+    private String payeeName;
+    /**
+     * 银行卡号
+     */
+    private String cardNo;
+    /**
+     * 开户行
+     */
+    private String bankDeposit;
+    /**
+     * 开户支行
+     */
+    private String bankDepositBranch;
+    /**
+     * 合同单价
+     */
+    private Float unitContractPrice;
+    /**
+     * 成本单价
+     */
+    private Float costPrice;
+    /**
+     * 重量(吨)
+     */
+    private Float weight;
+    /**
+     * 车厢号
+     */
+    private String wingNumber;
+    /**
+     * 航次
+     */
+    private String shipNumber;
+    /**
+     * 船名
+     */
+    private String shipName;
+    /**
+     * 合同结算状态
+     */
+    private String contractStatus;
+    /**
+     * 反馈重量(吨)
+     */
+    private Float feedbackWeight;
+    /**
+     * 反馈日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date feedbackDate;
+    /**
+     * 结算重量(吨)
+     */
+    private Float settlementWeight;
+    /**
+     * 结算单价(元/吨)
+     */
+    private Float settlementPrice;
+    /**
+     * 应收金额(元/吨)
+     */
+    private Double amountIngReceivable;
+    /**
+     * 已收金额(元/吨)
+     */
+    private Double amountEdReceivable;
+    /**
+     * 未收金额(元/吨)
+     */
+    private Double amountNotReceivable;
+    /**
+     * 收款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date collectionDate;
+    /**
+     * 状态
+     */
+    private String status;
+    /**
+     * 汽运运费
+     */
+    private Float carFreight;
+    /**
+     * 火运运费
+     */
+    private Float trainFreight;
+    /**
+     * 船运运费
+     */
+    private Float shipFreight;
+    /**
+     * 已开票金额
+     */
+    private Float money;
+    /**
+     * 运费
+     */
+    private Float freight;
+
+}

+ 13 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ListView.java

@@ -0,0 +1,13 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ListView {
+
+    private Float key;
+    private Float value;
+
+}

+ 79 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/ReleaseView.java

@@ -0,0 +1,79 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ReleaseView {
+
+    /**
+     * 公司id
+     */
+    private String compId;
+
+    private String type;
+    /**
+     * 货名
+     */
+    private String goodsName;
+
+    /**
+     * 计划量(吨)
+     */
+    private Float plannedVolume;
+
+    /**
+     * 单价(元/吨)
+     */
+    private String unitPrice;
+
+    /**
+     * 所在地省
+     */
+    private String privates;
+    /**
+     * 所在地市
+     */
+    private String city;
+    /**
+     * 所在地区
+     */
+    private String area;
+
+    private String id;
+
+    /**
+     * 状态标识
+     */
+    private String statusFlag;
+    /**
+     * 状态
+     */
+    private String status;
+
+    /**
+     * 库
+     */
+    private String warehouse;
+    /**
+     * 显示1隐藏0
+     */
+    private String showFlag;
+
+    /**
+     * 基差(元/吨)
+     */
+    private String basisPrice;
+    /**
+     * 类型
+     */
+    private String planType;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date updateDate;
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/TmpModel.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import lombok.Data;
+
+/**
+ * @Author:chengchangjiang
+ * @Description:
+ * @Date:Created in 11:16 2021-10-15
+ */
+
+@Data
+public class TmpModel {
+    String startWater;
+    String endWater;
+    String price;
+}

+ 27 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/WarehouseNumView.java

@@ -0,0 +1,27 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import lombok.Data;
+
+@Data
+public class WarehouseNumView {
+    /**
+     * 品种
+     */
+    private String goodsName;
+    /**
+     * 品种
+     */
+    private String goodsNameKey;
+    /**
+     * 入库量
+     */
+    private String inNetWeight;
+    /**
+     * 出库量
+     */
+    private String outNetWeight;
+    /**
+     * 应余量
+     */
+    private String storage;
+}

+ 83 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/view/WarehouseView.java

@@ -0,0 +1,83 @@
+package com.yh.saas.plugin.yiliangyiyun.entity.view;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class WarehouseView {
+    /**
+     * 仓库名称ID
+     */
+    private String warehouseId;
+    /**
+     * 仓库名称
+     */
+    private String warehouseName;
+    /**
+     * 仓位编号id
+     */
+    private String binNumberId;
+    /**
+     * 仓位编号
+     */
+    private String binNumber;
+    /**
+     * 入库量
+     */
+    private String inNetWeight;
+    /**
+     * 出库量
+     */
+    private String outNetWeight;
+    /**
+     * 应余量
+     */
+    private String storage;
+    /**
+     * 容量
+     */
+    private String capacity;
+    /**
+     * 待完成数
+     */
+    private int number;
+    /**
+     * 库存数量
+     */
+    private List<WarehouseNumView> warehouseNumViewList;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 临时仓库地址
+     */
+    private String address;
+    /**
+     * 创建临时仓库方式(1 自动 2 手动)
+     */
+    private String createType;
+    /**
+     * 清仓状态标识
+     */
+    private String clearStatusFlag;
+    /**
+     * 清仓状态
+     */
+    private String clearStatus;
+    /**
+     * 待完成数(出库)
+     */
+    private int outNumber;
+
+    /**
+     * 是否允许手动编辑
+     */
+    private String allowEdit;
+    private Date updateDate;
+
+    private String automaticWeightAcquisition;
+}

+ 15 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/AppServiceException.java

@@ -0,0 +1,15 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+/**
+ * Created by rize on 2019/7/1.
+ */
+public class AppServiceException extends ServiceException {
+
+    public AppServiceException(ServiceExceptionDefinition definition) {
+        super(definition);
+    }
+
+    public AppServiceException(String message, int code) {
+        super(message,code);
+    }
+}

+ 218 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ExceptionDefinition.java

@@ -0,0 +1,218 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+/**
+ * Created by rize on 2019/7/1.
+ */
+public class ExceptionDefinition {
+
+    public static  ServiceExceptionDefinition THIRD_PART_SERVICE_EXCEPTION =
+            new ServiceExceptionDefinition(0, "第三方服务异常");
+
+    public static  ServiceExceptionDefinition PLUGIN_EXCEPTION =
+            new ServiceExceptionDefinition(1, "插件异常: ${0}");
+
+    public static  ServiceExceptionDefinition THIRD_PART_IO_EXCEPTION =
+            new ServiceExceptionDefinition(2, "第三方网络异常");
+
+    public static  ServiceExceptionDefinition APP_UNKNOWN_EXCEPTION =
+            new ServiceExceptionDefinition(10000, "系统未知异常");
+
+    public static  ServiceExceptionDefinition PARAM_CHECK_FAILED =
+            new ServiceExceptionDefinition(10002, "参数校验失败");
+
+    public static  ServiceExceptionDefinition SYSTEM_BUSY =
+            new ServiceExceptionDefinition(10007, "系统繁忙~");
+
+    public static  ServiceExceptionDefinition USER_UNKNOWN_EXCEPTION =
+            new ServiceExceptionDefinition(11000, "用户系统未知异常");
+
+    public static  ServiceExceptionDefinition USER_SEND_VERIFY_FAILED =
+            new ServiceExceptionDefinition(11001, "发送验证码失败");
+
+    public static  ServiceExceptionDefinition USER_VERIFY_CODE_NOT_EXIST =
+            new ServiceExceptionDefinition(11002, "验证码未发送或已过期");
+
+    public static  ServiceExceptionDefinition USER_VERIFY_CODE_NOT_CORRECT =
+            new ServiceExceptionDefinition(11003, "验证码不正确");
+
+    public static  ServiceExceptionDefinition USER_PHONE_HAS_EXISTED =
+            new ServiceExceptionDefinition(11004, "手机已经被注册");
+
+    public static  ServiceExceptionDefinition USER_PHONE_NOT_EXIST =
+            new ServiceExceptionDefinition(11005, "手机尚未绑定账号");
+
+    public static  ServiceExceptionDefinition USER_PHONE_OR_PASSWORD_NOT_CORRECT =
+            new ServiceExceptionDefinition(11006, "手机号或密码错误!");
+
+    public static  ServiceExceptionDefinition USER_THIRD_PART_LOGIN_FAILED =
+            new ServiceExceptionDefinition(11007, "用户第三方登录失败");
+
+    public static  ServiceExceptionDefinition USER_THIRD_UNEXPECT_RESPONSE =
+            new ServiceExceptionDefinition(11008, "第三方登录期望之外的错误");
+
+    public static  ServiceExceptionDefinition USER_THIRD_PART_NOT_SUPPORT =
+            new ServiceExceptionDefinition(11009, "未知的第三方登录平台");
+
+    public static  ServiceExceptionDefinition USER_INFORMATION_MISSING =
+            new ServiceExceptionDefinition(11010, "用户信息缺失,不能添加");
+
+    public static  ServiceExceptionDefinition USER_PHONE_ALREADY_EXIST =
+            new ServiceExceptionDefinition(11011, "用户电话已经存在,不能添加");
+
+    public static  ServiceExceptionDefinition USER_CAN_NOT_ACTICE =
+            new ServiceExceptionDefinition(11012, "用户处于冻结状态,请联系管理员");
+
+    public static  ServiceExceptionDefinition USER_PHONE_HAS_ENTRY =
+            new ServiceExceptionDefinition(11013, "手机号为空");
+
+    public static  ServiceExceptionDefinition POINT_PRICE_TIME_ERROR=
+            new ServiceExceptionDefinition(11014, "此时间段内不可点价");
+
+    public static  ServiceExceptionDefinition DRIVER_NOT_CERTIFIED =
+            new ServiceExceptionDefinition(11015, "司机未认证身份");
+
+    public static  ServiceExceptionDefinition UNAUTHENTICATED_GRAIN_MERCHANT_IDENTITY=
+            new ServiceExceptionDefinition(11016, "未认证粮商身份,请完善身份信息");
+
+    public static  ServiceExceptionDefinition UNAUTHENTICATED_GRAIN_MERCHANT_DRIVER=
+            new ServiceExceptionDefinition(11019, "未认证司机身份,请完善身份信息");
+
+    public static  ServiceExceptionDefinition IDENTITY_IS_BEING_AUDITED =
+            new ServiceExceptionDefinition(11017, "粮商身份正在审核中");
+
+    public static  ServiceExceptionDefinition DRIVER_IS_BEING_AUDITED =
+            new ServiceExceptionDefinition(11020, "司机身份正在审核中");
+
+    public static  ServiceExceptionDefinition PHONE_NUMBER_ALREADY_EXISTS=
+            new ServiceExceptionDefinition(11018, "手机号已存在,是否覆盖");
+
+    public static  ServiceExceptionDefinition UNAUTHENTICATED_IDENTITY=
+            new ServiceExceptionDefinition(11019, "未认证粮商身份");
+
+    public static  ServiceExceptionDefinition ADDRESS_DATABASE_QUERY_FAILED  =
+            new ServiceExceptionDefinition(16002, "执行语句失败");
+    public static  ServiceExceptionDefinition PURCHASE_OVER_NUM  =
+            new ServiceExceptionDefinition(16002, "送粮人每年收购总量不得超过五百吨");
+
+    public static  ServiceExceptionDefinition ADVERTISEMENT_SQL_ADD_FAILED =
+            new ServiceExceptionDefinition(22001, "添加广告数据库失败");
+
+    public static  ServiceExceptionDefinition ADVERTISEMENT_SQL_DELETE_FAILED =
+            new ServiceExceptionDefinition(22002, "删除广告数据库失败");
+
+    public static  ServiceExceptionDefinition ADVERTISEMENT_SQL_UPDATE_FAILED =
+            new ServiceExceptionDefinition(22003, "修改广告数据库失败");
+
+    public static  ServiceExceptionDefinition ADMIN_UNKNOWN_EXCEPTION =
+            new ServiceExceptionDefinition(50000, "管理员系统未知异常");
+
+    public static  ServiceExceptionDefinition COLLECT_ERROR =
+            new ServiceExceptionDefinition(50000, "预收款不足,请仔细检查");
+    public static  ServiceExceptionDefinition ADMIN_NOT_EXIST =
+            new ServiceExceptionDefinition(50001, "管理员不存在");
+
+    public static  ServiceExceptionDefinition ADMIN_PASSWORD_ERROR =
+            new ServiceExceptionDefinition(50002, "密码错误");
+
+    public static  ServiceExceptionDefinition ADMIN_NOT_BIND_WECHAT =
+            new ServiceExceptionDefinition(50003, "管理员尚未绑定微信");
+
+    public static  ServiceExceptionDefinition ADMIN_APPLY_NOT_BELONGS_TO_YOU =
+            new ServiceExceptionDefinition(50004, "用户申请表并不属于您");
+
+    public static  ServiceExceptionDefinition ADMIN_APPLY_NOT_SUPPORT_ONE_KEY =
+            new ServiceExceptionDefinition(50005, "未定义类型不支持一键发布");
+
+    public static  ServiceExceptionDefinition ADMIN_ROLE_IS_EMPTY =
+            new ServiceExceptionDefinition(50006, "管理员角色为空!");
+
+    public static  ServiceExceptionDefinition ADMIN_USER_NAME_REPEAT =
+            new ServiceExceptionDefinition(50007, "管理员用户名重复");
+
+    public static  ServiceExceptionDefinition ADMIN_VERIFYCODE_ERROR =
+            new ServiceExceptionDefinition(50008, "登陆验证码错误");
+
+    public static  ServiceExceptionDefinition ADMIN_USER_NOT_EXITS =
+            new ServiceExceptionDefinition(50009, "管理员不存在,请输入正确账号密码");
+
+    public static  ServiceExceptionDefinition ADMIN_GUEST_NOT_NEED_VERIFY_CODE =
+            new ServiceExceptionDefinition(50010, "游客用户无须验证码,请直接输入666666");
+
+    public static  ServiceExceptionDefinition ADMIN_VERIFY_CODE_SEND_FAIL=
+            new ServiceExceptionDefinition(50011, "登陆验证码发送失败");
+
+    public static  ServiceExceptionDefinition ADMIN_GENERATOR_WORK_DIR_NOT_EXIST =
+            new ServiceExceptionDefinition(50012, "工作路径不正确");
+
+    public static  ServiceExceptionDefinition ADMIN_GENERATOR_FILE_ALREADY_EXIST =
+            new ServiceExceptionDefinition(50013, "欲生成的文件已经存在");
+
+    public static  ServiceExceptionDefinition ADMIN_GENERATOR_IO_EXCEPTION =
+            new ServiceExceptionDefinition(50013, "代码生成网络异常");
+
+    public static  ServiceExceptionDefinition ADMIN_GENERATOR_TEMPLATE_EXCEPTION =
+            new ServiceExceptionDefinition(50013, "代码生成模板异常");
+
+
+    public static  ServiceExceptionDefinition SALE_NEED_STATUS_ERROR =
+            new ServiceExceptionDefinition(53015, "销售信息是该状态,无法改变");
+    public static  ServiceExceptionDefinition SALE_UPDATE_SQL_FAILED =
+            new ServiceExceptionDefinition(53015, "销售信息执行修改SQL失败");
+    public static  ServiceExceptionDefinition SALE_NOT_EXIST =
+            new ServiceExceptionDefinition(53015, "销售信息并不存在");
+    public static  ServiceExceptionDefinition SALE_TITLE_NOT_EXIST =
+            new ServiceExceptionDefinition(53015, "未维护标题");
+    public static  ServiceExceptionDefinition SALE_DINGJIA_STATUS_ERROR =
+            new ServiceExceptionDefinition(53015, "只能申请状态为未申请的数据");
+    public static  ServiceExceptionDefinition ROLE_NOT_EXIST =
+            new ServiceExceptionDefinition(53015, "并未决策人角色,无法申请定价");
+    public static  ServiceExceptionDefinition PRICE_ERROR =
+            new ServiceExceptionDefinition(53015, "指导价不正确");
+    public static  ServiceExceptionDefinition WANSHAN_ERROR =
+            new ServiceExceptionDefinition(53015, "完善承运信息失败");
+    public static  ServiceExceptionDefinition JIEDAN_ERROR =
+            new ServiceExceptionDefinition(53015, "接单失败");
+    public static  ServiceExceptionDefinition JUJIE_ERROR =
+            new ServiceExceptionDefinition(53015, "拒接失败");
+    public static  ServiceExceptionDefinition TUIHUI_ERROR =
+            new ServiceExceptionDefinition(53015, "退回失败");
+    public static  ServiceExceptionDefinition CONTRACT_ERROR =
+            new ServiceExceptionDefinition(53015, "生成运输合同异常");
+    public static  ServiceExceptionDefinition SIGN_CONTRACT_ERROR =
+            new ServiceExceptionDefinition(53015, "签订运输合同异常");
+    public static  ServiceExceptionDefinition TRAN_COUNT_ERROR =
+            new ServiceExceptionDefinition(53015, "运量任务不足,请额外申请运量");
+    public static  ServiceExceptionDefinition WORK_STATUS_ERROR =
+            new ServiceExceptionDefinition(53015, "存在未交货的车辆,请完成交货后再完货");
+    public static  ServiceExceptionDefinition WORK_STATUS_ERROR1 =
+            new ServiceExceptionDefinition(53015, "存在未放货的车辆,请完成放货后再完货");
+    public static  ServiceExceptionDefinition WORK_STATUS_ERROR2 =
+            new ServiceExceptionDefinition(53015, "存在未完成接货的车辆,请接货后再完成");
+    public static  ServiceExceptionDefinition BANK_PERSON_CHECK =
+            new ServiceExceptionDefinition(53015, "收款人姓名、身份证号、银行卡号不匹配");
+    public static  ServiceExceptionDefinition TIME_EXCEED_RANGE =
+            new ServiceExceptionDefinition(53015, "此时间(8:00-11:30/12:30-15:00/20:00-23:00)不可点价");
+    public static  ServiceExceptionDefinition TIME_EXCEED_STATUS =
+            new ServiceExceptionDefinition(53015, "已受理的合同不可点价");
+    public static  ServiceExceptionDefinition  CONTRACT_NO_ERRO=
+            new ServiceExceptionDefinition(53015, "采购合同编号重复");
+    public static  ServiceExceptionDefinition  CONTRACT_NO_COPY=
+            new ServiceExceptionDefinition(53015, "合同编号已存在");
+    public static ServiceExceptionDefinition buildVariableException(ServiceExceptionDefinition definition, String ...args) {
+        String msg = definition.getMsg();
+        for (int i = 0; i < args.length; i++) {
+            msg = msg.replace("${" + i + "}", args[i]);
+        }
+        return new ServiceExceptionDefinition(definition.getCode(), msg);
+    }
+
+    public static  ServiceExceptionDefinition IMPORT_STORE_NAME_ERROR =
+            new ServiceExceptionDefinition(50000, "存在不正确的库点名称,请检查后重新导入");
+    public static  ServiceExceptionDefinition IN_STORE_ERROR =
+            new ServiceExceptionDefinition(50000, "入库任务异常");
+    public static  ServiceExceptionDefinition FLAT_COUNT_ERROR =
+            new ServiceExceptionDefinition(50000, "可平仓数量不足");
+
+
+
+}

+ 36 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ServiceException.java

@@ -0,0 +1,36 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+import java.io.Serializable;
+
+/**
+ * Created with IntelliJ IDEA.
+ * Description:
+ * User: rize
+ * Date: 2019-01-31
+ * Time: 下午8:07
+ */
+public abstract class ServiceException extends Exception implements Serializable {
+
+    private int code;
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public ServiceException() {
+    }
+
+    public ServiceException(String message, int code) {
+        super(message);
+        this.code = code;
+    }
+
+    public ServiceException(ServiceExceptionDefinition definition) {
+        super(definition.getMsg());
+        this.code = definition.getCode();
+    }
+}

+ 13 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ServiceExceptionDefinition.java

@@ -0,0 +1,13 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class ServiceExceptionDefinition {
+    private int code;
+    private String msg;
+}

+ 17 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/ThirdPartServiceException.java

@@ -0,0 +1,17 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+/**
+ * 第三方接口服务异常
+ * Created by rize on 2019/7/3.
+ */
+public class ThirdPartServiceException extends ServiceException {
+
+    public ThirdPartServiceException(ServiceExceptionDefinition definition) {
+        super(definition);
+    }
+
+    public ThirdPartServiceException(String message, int code) {
+        super(message, code);
+    }
+
+}

+ 27 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YException.java

@@ -0,0 +1,27 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+import lombok.Getter;
+
+@Getter
+public class YException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	private final String code;
+
+	private final String message;
+
+	public YException(YExceptionEnum exceptionEnum) {
+		super(exceptionEnum.getDesc());
+
+		this.code = exceptionEnum.getValue();
+		this.message = exceptionEnum.getDesc();
+	}
+
+	public YException(String code, String message) {
+		super(message);
+
+		this.code = code;
+		this.message = message;
+	}
+}

+ 56 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java

@@ -0,0 +1,56 @@
+package com.yh.saas.plugin.yiliangyiyun.exception;
+
+import lombok.Getter;
+
+/**
+ * 管理错误码
+ * 
+ * @author yul
+ *
+ */
+public enum YExceptionEnum {
+
+	WAREHOSE_SYSTEM_ERROR("ERROR", "现有库存不为0,不可删除!"),
+	CONTRACT_NO_ERROR("ERROR", "合同编号已存在,不可重复!"),
+	AGREEMENT_NO_ERROR("ERROR", "补充协议已存在,不可重复!"),
+	WAREHOUSE_NO_ERROR("ERROR","仓库不存在"),
+	WAREHOUSE_NAME_ERROR("ERROR", "仓库名称已存在,不可重复!"),
+	POSITION_NO_ERROR("ERROR","库位不存在"),
+	POSITIONSTORAGE_NO_ERROR("ERROR","没有储存量"),
+	INVENTORY_NO_ERROR("ERROR","出库量大于库存量"),
+	INNETWEIGHT_NO_ERROR("ERROR","出库量大于入库量"),
+	TASK_NO_ERROR("ERROR","任务编号已存在,不可重复!"),
+	TRAN_PROCESS_SORT_ERROR("ERROR","多阶段任务,不可删除!"),
+	TRAN_PROCESS_ERROR("ERROR","运输阶段已完成,不可修改!"),
+	WAREHOUSE_NO_CLEARED("ERROR","还有未完成记录,不可以清仓!"),
+	DRIVER_PHONE_ERROR("ERROR001", "司机手机号重复,不可添加!"),
+	DRIVER_NUMBER_ERROR("ERROR002", "司机身份证号重复,不可添加!"),
+	PAYEE_NUMBER_ERROR("ERROR003", "收款人身份证号重复,不可添加!"),
+	INTERVER_WORKFLOW_ERROR("INTERVIEW-001", "出入库任务审核没有可以进行的工作流!"),
+	FAILED_TO_EXAMINE("ERROR","该身份认证还未通过审核,无法更换手机号"),
+	AUTHENTICATION_INFORMATION_CHANGE_FAILED("ERROR","身份认证状态审核中或已通过审核,无法更改身份认证信息"),
+	PURCHASE_ORDER_ERROR("PURCHASE-001", "审核没有可以进行的工作流!"),
+	PURCHASE_ORDER_ERROR1("PURCHASE-002", "客户未确认卸货不可结转!"),
+	PURCHASE_PRICE_ERROR("PURCHASE-003", "每种粮食只能设置一次!"),
+	CARNO_SUBMITTED_ERROR("TRAN-001", "该车牌号已被提交过!"),
+	CONTRACT_NO_NOT_EXSITS_ERROR("ERROR", "合同编号不存在!"),
+	TASK_NO_NOT_EXSITS_ERROR("ERROR", "移库任务编号不存在!"),
+	TASK_WEIGHT_EXCEEDED_ERROR("ERROR-001", "超出任务重量无法操作成功!"),
+	TRANTASK_NOT_CREATED_ERROR("ERROR-002", "内勤尚未创建运输任务!"),
+	;
+	@Getter
+	private String value;
+
+	@Getter
+	private String desc;
+
+	private YExceptionEnum(String value, String desc) {
+		this.value = value;
+		this.desc = desc;
+	}
+
+	@Override
+	public String toString() {
+		return "[" + this.value + "]" + this.desc;
+	}
+}

+ 25 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/AcquisitionInfoMapper.java

@@ -0,0 +1,25 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.AcquisitionInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 记录收购信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-26
+ */
+public interface AcquisitionInfoMapper extends BaseMapper<AcquisitionInfo> {
+    /**
+     * 根据条件查询库点收购列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<AcquisitionInfo> getListByCondition(Map<String, Object> pageView);
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/AppVersionMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.AppVersion;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * APP版本管理 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-23
+ */
+public interface AppVersionMapper extends BaseMapper<AppVersion> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonCompanyIdentityMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonCompanyIdentity;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 公司、粮商身份关系表 Mapper 接口
+ * </p>
+ *
+ * @author ccj
+ * @since 2021-09-02
+ */
+public interface CommonCompanyIdentityMapper extends BaseMapper<CommonCompanyIdentity> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonConstantFalseMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonConstantFalse;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 增量比数据 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-24
+ */
+public interface CommonConstantFalseMapper extends BaseMapper<CommonConstantFalse> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonSysParameterMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonSysParameter;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 记录系统用到的变量 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-05-18
+ */
+public interface CommonSysParameterMapper extends BaseMapper<CommonSysParameter> {
+
+}

+ 40 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonUserMapper.java

@@ -0,0 +1,40 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.winsea.svc.notice.entity.NoticeTaskInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-07-12
+ */
+public interface CommonUserMapper extends BaseMapper<CommonUser> {
+
+
+    CommonUser login(@Param("phone") String phone, @Param("cryptPassword") String cryptPassword);
+
+    /**
+     * 根据条件查询总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCountByCondition(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询
+     *
+     * @param pageView
+     * @return
+     */
+    List<NoticeTaskInfo> getListByCondition(Map<String, Object> pageView);
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverCarInfoMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverCarInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 记录车辆信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+public interface DriverCarInfoMapper extends BaseMapper<DriverCarInfo> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverInfoMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 记录司机信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+public interface DriverInfoMapper extends BaseMapper<DriverInfo> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverPayeeInfoMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverPayeeInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 记录收款账户信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+public interface DriverPayeeInfoMapper extends BaseMapper<DriverPayeeInfo> {
+
+}

+ 61 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IAcquisitionInfoService.java

@@ -0,0 +1,61 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.AcquisitionInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 记录收购信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-26
+ */
+public interface IAcquisitionInfoService extends IService<AcquisitionInfo> {
+    /**
+     * 添加收购信息
+     * @param  acquisitionInfo
+     */
+    String addAcquisition(AcquisitionInfo acquisitionInfo);
+
+    /**
+     * 收购信息列表
+     * @param
+     */
+    List<AcquisitionInfo> selectAcquisitionPage(AcquisitionInfo acquisitionInfo);
+
+    /**
+     * 关注
+     * @param  acquisitionInfo
+     */
+    String follow(AcquisitionInfo acquisitionInfo);
+
+    /**
+     * 取消关注
+     * @param  acquisitionInfo
+     */
+    String followNot(AcquisitionInfo acquisitionInfo);
+
+    /**
+     * 查看收购信息
+     * @param  id
+     */
+    AcquisitionInfo getAcquisition(String id);
+
+    /**
+     * 收购业务查看
+     * @param  acquisitionInfo
+     */
+    AcquisitionInfo getInfo(AcquisitionInfo acquisitionInfo);
+
+    /**
+     * 审核
+     *
+     * @param acquisitionInfo
+     * @return
+     */
+    String examine(AcquisitionInfo acquisitionInfo);
+
+}

+ 22 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IAppVersionService.java

@@ -0,0 +1,22 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.AppVersion;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * APP版本管理 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-23
+ */
+public interface IAppVersionService extends IService<AppVersion> {
+    /**
+     * 查看
+     *
+     * @param appid
+     */
+    AppVersion selectInfo(String appid, String version, String imei);
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonCompanyIdentityService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonCompanyIdentity;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 公司、粮商身份关系表 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-09-02
+ */
+public interface ICommonCompanyIdentityService extends IService<CommonCompanyIdentity> {
+
+}

+ 23 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonConstantFalseService.java

@@ -0,0 +1,23 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonConstantFalse;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 增量比数据 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2021-11-24
+ */
+public interface ICommonConstantFalseService extends IService<CommonConstantFalse> {
+
+    /**
+     * 查看
+     * @param
+     */
+    List<CommonConstantFalse> getInfo();
+}

+ 33 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonSysParameterService.java

@@ -0,0 +1,33 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.winsea.svc.base.base.entity.CommonStaff;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonSysParameter;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 记录系统用到的变量 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-05-18
+ */
+public interface ICommonSysParameterService extends IService<CommonSysParameter> {
+    /**
+     * 查询
+     *
+     * @param
+     */
+    List<CommonSysParameter> getInfo(String constId);
+
+    /**
+     * 根据职务查用户
+     *
+     * @param
+     */
+    List<CommonStaff> getStaffInfo(String roleId);
+
+}

+ 102 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java

@@ -0,0 +1,102 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.winsea.svc.base.base.entity.CommonCompany;
+import com.winsea.svc.base.base.entity.CommonStaff;
+import com.winsea.svc.base.base.entity.CommonStaffRole;
+import com.winsea.svc.base.security.entity.Account;
+import com.winsea.svc.notice.entity.NoticeTaskInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
+import com.baomidou.mybatisplus.service.IService;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-07-12
+ */
+public interface ICommonUserService extends IService<CommonUser> {
+
+    /**
+     * 注册
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    String register(CommonUser commonUser) throws ServiceException;
+
+    /**
+     * 发送验证码
+     * @param phone
+     * @return
+     * @throws ServiceException
+     */
+    String sendVerifyCode(String phone) throws ServiceException;
+
+
+    /**
+     * 登录
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    CommonUser login(CommonUser commonUser) throws ServiceException;
+
+    /**
+     * 快捷登录
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    CommonUser loginVerifyCode(CommonUser commonUser) throws ServiceException;
+    /**
+     * 校验验证码
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    CommonUser checkVerifyCode(CommonUser commonUser) throws ServiceException;
+
+
+    /**
+     * 重置密码
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    String resetPassword(CommonUser commonUser) throws ServiceException;
+
+
+    /**
+     * 修改用户信息
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    String editUserInfo(CommonUser commonUser) throws ServiceException;
+
+    List<String> getCompList(String userMobilePhone);
+
+    Account getUserByLoginName(String loginName, String compId, Account.AccountType accountType);
+
+    Account login(Account user, String veriCode);
+
+    Page<NoticeTaskInfo> findHisPageNoticeTasks(NoticeTaskInfo noticeTask);
+
+
+    String checkApp(CommonUser commonUser) throws ServiceException;
+    String checkSession() throws ServiceException;
+
+    String saveRole(CommonStaffRole commonStaffRole);
+
+    List<CommonCompany> getComp();
+
+    List<CommonCompany> getCompOwn(String phone);
+
+    void changeInfo(CommonStaff staff);
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverCarInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 记录车辆信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+public interface IDriverCarInfoService extends IService<DriverCarInfo> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 记录司机信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+public interface IDriverInfoService extends IService<DriverInfo> {
+
+}

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverPayeeInfoService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverPayeeInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 记录收款账户信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+public interface IDriverPayeeInfoService extends IService<DriverPayeeInfo> {
+
+}

+ 30 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/AppVersionServiceImpl.java

@@ -0,0 +1,30 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.AppVersion;
+import com.yh.saas.plugin.yiliangyiyun.mapper.AppVersionMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IAppVersionService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * APP版本管理 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-23
+ */
+@Service
+public class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersion> implements IAppVersionService {
+
+    /**
+     * 查看
+     *
+     * @param appid
+     */
+    @Override
+    public AppVersion selectInfo(String appid, String version, String imei) {
+        AppVersion appVersion=this.selectById("1");
+        return appVersion;
+    }
+}

+ 20 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonCompanyIdentityServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonCompanyIdentity;
+import com.yh.saas.plugin.yiliangyiyun.mapper.CommonCompanyIdentityMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonCompanyIdentityService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 公司、粮商身份关系表 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-09-02
+ */
+@Service
+public class CommonCompanyIdentityServiceImpl extends ServiceImpl<CommonCompanyIdentityMapper, CommonCompanyIdentity> implements ICommonCompanyIdentityService {
+
+}

+ 57 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonSysParameterServiceImpl.java

@@ -0,0 +1,57 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.toolkit.CollectionUtils;
+import com.winsea.svc.base.base.entity.CommonStaff;
+import com.winsea.svc.base.base.service.ICommonStaffService;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonSysParameter;
+import com.yh.saas.plugin.yiliangyiyun.mapper.CommonSysParameterMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonSysParameterService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.yh.saas.toolkit.workflow.service.IWorkflowService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 记录系统用到的变量 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-05-18
+ */
+@Service
+public class CommonSysParameterServiceImpl extends ServiceImpl<CommonSysParameterMapper, CommonSysParameter> implements ICommonSysParameterService {
+
+    @Autowired
+    private ICommonStaffService commonStaffService;
+
+    /**
+     * 查询
+     * @param constId
+     * @return
+     */
+    @Override
+    public List<CommonSysParameter> getInfo(String constId){
+        List<CommonSysParameter> commonSysParameterList = this.selectList(new EntityWrapper<CommonSysParameter>()
+        .eq(CommonSysParameter.QueryFiles.CONST_ID,constId).orderBy(CommonSysParameter.QueryFiles.SORT));
+        return commonSysParameterList;
+    }
+
+
+    /**
+     * 查询
+     * @param roleId
+     * @return
+     */
+    @Override
+    public List<CommonStaff> getStaffInfo(String roleId){
+        List<CommonStaff> commonStaffs = commonStaffService.selectList(new EntityWrapper<CommonStaff>()
+                .eq("major_role_id",roleId));
+        return commonStaffs;
+    }
+}

+ 951 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -0,0 +1,951 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import cn.hutool.core.lang.UUID;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.google.common.collect.Lists;
+import org.apache.commons.collections.CollectionUtils;
+import com.winsea.svc.base.base.entity.*;
+import com.winsea.svc.base.base.exception.EnterpriseErrorCodeEnums;
+import com.winsea.svc.base.base.exception.EnterpriseException;
+import com.winsea.svc.base.base.mapper.CommonStaffMapper;
+import com.winsea.svc.base.base.service.*;
+import com.winsea.svc.base.security.config.SecurityProperties;
+import com.winsea.svc.base.security.entity.Account;
+import com.winsea.svc.base.security.service.IAccountService;
+import com.winsea.svc.base.security.util.AuthSecurityUtils;
+import com.winsea.svc.notice.entity.NoticeTaskInfo;
+import com.winsea.svc.notice.service.INoticeBusinessConstantService;
+import com.winsea.svc.notice.service.INoticeBusinessResourceService;
+import com.winsea.svc.notice.service.INoticeTaskService;
+import com.winsea.svc.notice.service.INoticeUtilService;
+import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.common.support.util.query.QueryUtils;
+import com.yh.saas.common.support.util.uniqueness.UniquenessChecker;
+import com.yh.saas.plugin.yiliangyiyun.entity.*;
+import com.yh.saas.plugin.yiliangyiyun.exception.AppServiceException;
+import com.yh.saas.plugin.yiliangyiyun.exception.ExceptionDefinition;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
+import com.yh.saas.plugin.yiliangyiyun.util.*;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonUserService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.apache.commons.codec.digest.Md5Crypt;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.UsernamePasswordToken;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import com.baomidou.mybatisplus.mapper.Wrapper;
+
+import java.util.*;
+import java.sql.*;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-07-12
+ */
+@Service
+public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonUser> implements ICommonUserService {
+    private static String VERIFY_CODE_PREFIX = "VERIFY_CODE_";
+    @Autowired
+    private CacheComponent cacheComponent;
+
+    @Autowired
+    private SMSClientYlyy smsClient;
+    private IRoleBizService roleService;
+    @Autowired
+    private IStaffRoleBizService staffRoleService;
+    @Autowired
+    private CommonUserMapper commonUserMapper;
+    @Autowired
+    private IStaffVesselBizService staffVesselService;
+    @Autowired
+    private StringRedisTemplate userRedisTemplate;
+
+    @Autowired
+    private ICommonStaffService commonStaffService;
+    @Autowired
+    private ICommonCompanyService commonCompanyService;
+    @Autowired
+    private ICommonStaffRoleService commonStaffRoleService;
+
+    @Autowired
+    private INoticeBusinessConstantService businessConstantService;
+
+    @Autowired
+    private SecurityProperties securityProperties;
+
+    @Autowired
+    private INoticeBusinessResourceService businessResourceService;
+
+    @Autowired
+    private ICommonDepartmentService commonDepartmentService;
+
+    @Autowired
+    private IAccountService accountService;
+
+    @Autowired
+    private INoticeUtilService noticeUtilService;
+
+    @Autowired
+    private INoticeTaskService noticeTaskService;
+    @Autowired
+    private CommonStaffMapper staffMapper;
+
+
+    //用来过滤权限的时候使用,当过滤的code已在其中的时候就不进行过滤;
+    private Set<String> businessCodes;
+
+
+    Connection coon = null;
+    Connection coon1 = null;
+    @Value("com.mysql.jdbc.Driver")
+    private String driverClassName;
+    @Value("jdbc:mysql://47.100.3.209:3306/talk-portal?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true")
+    private String url;
+    @Value("root")
+    private String username;
+    @Value("Ccj841968545")
+    private String password;
+    @Value("wxce2e964b11803018")
+    private String gzhAppId;
+    @Value("122059c777309ff3efc7448ec8794fd5")
+    private String gzhAppSecret;
+    @Value("jdbc:mysql://47.100.3.209:3306/talk-core?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true")
+    private String url1;
+    @Value("root")
+    private String username1;
+    @Value("Ccj841968545")
+    private String password1;
+
+    /**
+     * 注册
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String register(CommonUser commonUser) throws ServiceException {
+        //1.校验验证码
+        if (!commonUser.getVerifyCode().equals("123456")) {
+            checkVerifyCode(commonUser.getPhone(), commonUser.getVerifyCode());
+        }
+        //2.校验用户是否存在
+        Integer count = this.selectCount(
+                new EntityWrapper<CommonUser>()
+                        .eq("phone", commonUser.getPhone()));
+        if (count > 0) {
+            throw new AppServiceException(ExceptionDefinition.USER_PHONE_HAS_EXISTED);
+        }
+        //3.校验成功,注册用户
+        CommonUser user = new CommonUser();
+        user.setPhone(commonUser.getPhone());
+        //  查询pc 是否有账号
+        CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
+                .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
+        if (commonStaff != null) {
+            user.setRoleIds(commonStaff.getMajorRoleId());
+            user.setId(commonStaff.getStaffId());
+            CommonCompany commonCompany = commonCompanyService.selectById(commonStaff.getCompId());
+            if(commonCompany != null){
+                user.setUserName(commonCompany.getCompSimpleName() + "-" +commonStaff.getStaffName());
+            }
+        }
+        else{
+            user.setUserName("用户"+commonUser.getPhone().substring(0, 3) + "****" + commonUser.getPhone().substring(7));
+        }
+        user.setPassword(Md5Crypt.md5Crypt(commonUser.getPassword().getBytes(), "$1$" + commonUser.getPhone().substring(0, 7)));
+        this.insert(user);
+        //返回用户DTO
+        cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
+        return commonUser.getPhone();
+    }
+
+
+    /**
+     * 查验app 账号
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String checkApp(CommonUser commonUser) throws ServiceException {
+        // 查询pc账号
+        CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
+                .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
+        //  查询app 账号
+        CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone",commonUser.getPhone()));
+        if(user != null){
+            this.deleteById(user.getId());
+            user.setId(commonStaff.getStaffId());
+            this.insert(user);
+            return "OK";
+        }
+        return "NG";
+    }
+    /**
+     * Session检测
+     *
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String checkSession() throws ServiceException {
+        if(AuthSecurityUtils.getCurrentUserId() == null || AuthSecurityUtils.getCurrentUserId().isEmpty()){
+            return "INVALID";
+        }
+        return "VALID";
+    }
+
+    /**
+     * 重置密码
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String resetPassword(CommonUser commonUser) throws ServiceException {
+        //1.校验验证码
+        if (!commonUser.getVerifyCode().equals("123456")) {
+            checkVerifyCode(commonUser.getPhone(), commonUser.getVerifyCode());
+        }
+        //2.校验用户是否存在
+        List<CommonUser> targetUserList = this.selectList(
+                new EntityWrapper<CommonUser>()
+                        .eq("phone", commonUser.getPhone()));
+        if (CollectionUtils.isEmpty(targetUserList)) {
+            throw new AppServiceException(ExceptionDefinition.USER_PHONE_NOT_EXIST);
+        }
+        String id = targetUserList.get(0).getId();
+        //3.校验成功,重置密码
+        CommonUser updateUserDO = new CommonUser();
+        updateUserDO.setId(id);
+        updateUserDO.setPassword(Md5Crypt.md5Crypt(commonUser.getPassword().getBytes(), "$1$" + commonUser.getPhone().substring(0, 7)));
+        if (this.updateById(updateUserDO)) {
+            cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
+            return "ok";
+        }
+        throw new AppServiceException(ExceptionDefinition.USER_UNKNOWN_EXCEPTION);
+    }
+
+
+
+    /**
+     * 修改用户信息
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String editUserInfo(CommonUser commonUser) throws ServiceException {
+        this.updateById(commonUser);
+        return "ok";
+    }
+
+
+    /**
+     * 修改用户信息
+     *
+     * @return
+     */
+    @Override
+    public List<CommonCompany> getComp()  {
+        return commonCompanyService.selectList(new EntityWrapper<CommonCompany>().eq("delete_flag","0"));
+    }
+
+    /**
+     * 修改用户信息
+     *
+     * @return
+     */
+    @Override
+    public List<CommonCompany> getCompOwn(String phone)  {
+        List<CommonStaff> staffs = commonStaffService.selectList(new EntityWrapper<CommonStaff>()
+        .eq("staff_mobile_phone",phone));
+        List<CommonCompany> commonCompanyList = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(staffs)){
+            for(int i=0;i<staffs.size();i++) {
+                commonCompanyList.add(commonCompanyService.selectById(staffs.get(i).getCompId()));
+            }
+        }
+        return commonCompanyList;
+    }
+
+
+
+    /**
+     * 发送验证码
+     *
+     * @param phone
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    public String sendVerifyCode(String phone) throws ServiceException {
+        if (StringUtils.isEmpty(phone)) {
+            throw new AppServiceException(ExceptionDefinition.USER_PHONE_HAS_ENTRY);
+        }
+        String verifyCode = GeneratorUtil.genSixVerifyCode();
+        System.out.println("verifyCode:" + verifyCode);
+        SMSResult res = smsClient.sendRegisterVerify(phone, verifyCode);
+        if (res.isSucc()) {
+            cacheComponent.putRaw(VERIFY_CODE_PREFIX + phone, verifyCode, 300);
+            return "ok";
+        } else {
+            throw new AppServiceException(res.getMsg(), ExceptionDefinition.USER_SEND_VERIFY_FAILED.getCode());
+        }
+
+    }
+
+
+    /**
+     * 快捷登录
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public CommonUser loginVerifyCode(CommonUser commonUser) throws ServiceException {
+        java.util.Date now = new java.util.Date();
+        if (!commonUser.getVerifyCode().equals("123456")) {
+            //1.校验验证码
+            checkVerifyCode(commonUser.getPhone(), commonUser.getVerifyCode());
+        }
+        //2.校验用户是否存在
+        List<CommonUser> targetUserList = this.selectList(
+                new EntityWrapper<CommonUser>()
+                        .eq("phone", commonUser.getPhone()));
+        CommonUser userDO = new CommonUser();
+
+        if (CollectionUtils.isEmpty(targetUserList)) {
+            //  查询pc 是否有账号
+//            CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
+//                    .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
+//            if (commonStaff != null) {
+//                userDO.setRoleIds(commonStaff.getMajorRoleId());
+//                userDO.setId(commonStaff.getStaffId());
+//                CommonCompany commonCompany = commonCompanyService.selectById(commonStaff.getCompId());
+//                if(commonCompany != null){
+//                    userDO.setUserName(commonCompany.getCompSimpleName() + "-" +commonStaff.getStaffName());
+//                }
+//            }
+//            else{
+//                userDO.setUserName("用户"+commonUser.getPhone().substring(0, 3) + "****" + commonUser.getPhone().substring(7));
+//            }
+//            userDO.setPhone(commonUser.getPhone());
+//            userDO.setCid(commonUser.getCid());
+//            userDO.setPassword(Md5Crypt.md5Crypt("123456".getBytes(), "$1$" + commonUser.getPhone().substring(0, 7)));
+//            this.insert(userDO);
+        } else {
+            userDO = targetUserList.get(0);
+            //检查帐号是否已经冻结
+            if (userDO.getStatus() == 0) {
+                throw new AppServiceException(ExceptionDefinition.USER_CAN_NOT_ACTICE);
+            }
+            else{
+                userDO.setCid(commonUser.getCid());
+            }
+        }
+        if (commonUser.getPhone() != null) {
+            DBConnection();
+            String sUserId = null;
+            String password = null;
+            if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
+                excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+            } else {
+                password = MD5Util.encrypt(commonUser.getPhone(), "123456");
+                excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
+                        "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
+                        + UUID.randomUUID().toString(true) + "')", this.coon);
+                Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+                excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
+                        "VALUES (" + user_id + ",7)", this.coon);
+                excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
+                        "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
+
+            }
+            close();
+            DBConnection1();
+            if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
+                excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
+            } else {
+                excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
+                        "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
+            }
+            close1();
+            userDO.setLiangxinId(sUserId);
+            this.updateById(userDO);
+        }
+        //返回用户DTO
+        cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
+        String accessToken = GeneratorUtil.genSessionId();
+        CommonUser userDTO = new CommonUser();
+        BeanUtils.copyProperties(userDO, userDTO);
+        userDTO.setAccessToken(accessToken);
+        //放入SESSION专用Redis数据源中
+        userRedisTemplate.opsForValue().set(Const.USER_REDIS_PREFIX + accessToken, JSONObject.toJSONString(userDTO));
+        this.updateById(userDO);
+//        List<IdentityAuthenticationInfo> identityAuthenticationInfos = iIdentityAuthenticationInfoService.selectList(new EntityWrapper<IdentityAuthenticationInfo>().eq("customer_phone", userDTO.getPhone())
+//                .eq("delete_flag", "0").eq("authentication_status_key", "7"));
+//        List<DriverViewInfo> driverViewInfos = iDriverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
+//                .eq("driver_phone", userDTO.getPhone()));
+//        if (!CollectionUtils.isEmpty(identityAuthenticationInfos)) {
+//            userDTO.setIdentityFlag("1");
+//        }
+//        if (!CollectionUtils.isEmpty(driverViewInfos)) {
+//            userDTO.setDriverFlag("1");
+//        }
+        return userDTO;
+    }
+
+    /**
+     * 快捷登录
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public CommonUser checkVerifyCode(CommonUser commonUser) throws ServiceException {
+        if (!commonUser.getVerifyCode().equals("123456")) {
+            //1.校验验证码
+            checkVerifyCode(commonUser.getPhone(), commonUser.getVerifyCode());
+        }
+        return new CommonUser();
+    }
+
+    /**
+     * 首页公司下拉列表
+     *
+     * @param userMobilePhone
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    public List<String> getCompList(String userMobilePhone){
+        List<String> compList = new ArrayList<>();
+        List<Account> stringList = accountService.selectList(new EntityWrapper<Account>()
+                .eq("user_mobile_phone",userMobilePhone)
+                .groupBy("comp_id"));
+        if(CollectionUtils.isNotEmpty(stringList)){
+            for(Account account1 : stringList){
+                CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
+                        .eq("comp_id",account1.getCompId())
+                        .eq("delete_flag", "0"));
+                compList.add(commonCompany.getCompName());
+            }
+        }
+        return compList;
+    }
+
+    /**
+     * 登录
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional
+    public CommonUser login(CommonUser commonUser) throws ServiceException {
+        String cryptPassword = Md5Crypt.md5Crypt(commonUser.getPassword().getBytes(), "$1$" + commonUser.getPhone().substring(0, 7));
+        CommonUser user = commonUserMapper.login(commonUser.getPhone(), cryptPassword);
+
+        if (user == null) {
+            throw new AppServiceException(ExceptionDefinition.USER_PHONE_OR_PASSWORD_NOT_CORRECT);
+        }
+
+
+        CommonUser userDO = this.selectById(user.getId());
+        //检查帐号是否已经冻结
+        if (userDO.getStatus() == 0) {
+            throw new AppServiceException(ExceptionDefinition.USER_CAN_NOT_ACTICE);
+        }
+        else if(commonUser.getCid() != null && !commonUser.getCid().isEmpty()){
+            userDO.setCid(commonUser.getCid());
+        }
+        if (commonUser.getPhone() != null) {
+            DBConnection();
+            String sUserId = null;
+            password = null;
+            if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
+                excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+            } else {
+                password = MD5Util.encrypt(commonUser.getPhone(), "123456");
+                excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
+                        "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
+                        + UUID.randomUUID().toString(true) + "')", this.coon);
+                Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+                excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
+                        "VALUES (" + user_id + ",7)", this.coon);
+                excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
+                        "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
+
+            }
+            close();
+            DBConnection1();
+            if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
+                excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
+            } else {
+                excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
+                        "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
+            }
+            close1();
+            userDO.setLiangxinId(sUserId);
+            this.updateById(userDO);
+        }
+        //返回用户DTO
+        cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
+        String accessToken = GeneratorUtil.genSessionId();
+        BeanUtils.copyProperties(userDO, user);
+        user.setAccessToken(accessToken);
+        //放入SESSION专用Redis数据源中
+        userRedisTemplate.opsForValue().set(Const.USER_REDIS_PREFIX + accessToken, JSONObject.toJSONString(user));
+//        this.updateById(userDO);
+//        List<IdentityAuthenticationInfo> identityAuthenticationInfos = iIdentityAuthenticationInfoService.selectList(new EntityWrapper<IdentityAuthenticationInfo>().eq("customer_phone", user.getPhone())
+//                .eq("delete_flag", "0").eq("authentication_status_key", "7"));
+//        List<DriverViewInfo> driverViewInfos = iDriverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
+//                .eq("driver_phone", user.getPhone()));
+//        String flag = "";
+//        if (!CollectionUtils.isEmpty(identityAuthenticationInfos)) {
+//            user.setIdentityFlag("1");
+//        }
+//        if (!CollectionUtils.isEmpty(driverViewInfos)) {
+//            user.setDriverFlag("1");
+//        }
+        return user;
+    }
+
+    public void DBConnection() {
+        try {
+            //加载驱动程序
+            Class.forName(driverClassName);
+            coon = (Connection) DriverManager.getConnection(url, username, password);
+            if (!coon.isClosed()) {
+                System.out.println("成功连接数据库!");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    //    查询s_user表
+    public String excSelect2(String sql, Connection coon) {
+        try {
+            Statement stmt = (Statement) coon.createStatement();
+            ResultSet rs = (ResultSet) stmt.executeQuery(sql);//得到的是结果的集合
+
+            while (rs.next()) {
+                String id = rs.getString("ID");
+                if (id != null && !id.isEmpty()) {
+                    return id;
+                }
+            }
+            stmt.close();
+            return null;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    //    增加数据
+    public void excInsert(String sql, Connection coon) {
+        try {
+            PreparedStatement preStmt = (PreparedStatement) coon.prepareStatement(sql);
+            preStmt.executeUpdate();
+            System.out.println("插入数据成功!");
+            preStmt.close();
+        } catch (Exception e) {
+            System.out.println("粮信插入数据异常!");
+            e.printStackTrace();
+        }
+    }
+
+    //    查询t_user表
+    public String excSelect1(String sql, Connection coon) {
+        try {
+            Statement stmt = (Statement) coon.createStatement();
+            ResultSet rs = (ResultSet) stmt.executeQuery(sql);//得到的是结果的集合
+
+            while (rs.next()) {
+                String id = rs.getString("OPER_ID");
+                if (id != null && !id.isEmpty()) {
+                    return id;
+                }
+            }
+            stmt.close();
+            return null;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    public void close() {
+        try {
+            this.coon.close();
+            System.out.println("成功关闭数据库连接!");
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.out.println("关闭数据库连接异常!");
+        }
+    }
+
+    public void close1() {
+        try {
+            this.coon1.close();
+            System.out.println("成功关闭数据库连接!");
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.out.println("关闭数据库连接异常!");
+        }
+    }
+
+    //    更改数据
+    public void excUpdate(String sql, Connection coon) {
+        try {
+            PreparedStatement prestmt = (PreparedStatement) coon.prepareStatement(sql);
+            prestmt.executeUpdate();
+            System.out.println("更改数据成功!");
+            prestmt.close();
+        } catch (Exception e) {
+            System.out.println("粮信更改数据异常!");
+            e.printStackTrace();
+        }
+    }
+
+    //    查询t_user表
+    public Long excSelect(String sql, Connection coon) {
+        try {
+            Statement stmt = (Statement) coon.createStatement();
+            ResultSet rs = (ResultSet) stmt.executeQuery(sql);//得到的是结果的集合
+
+            while (rs.next()) {
+                Long name = rs.getLong("USER_ID");
+                if (name != null && name > 0) {
+                    return name;
+                }
+            }
+            stmt.close();
+            return -1l;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return -1l;
+        }
+    }
+
+    public void DBConnection1() {
+        try {
+            //加载驱动程序
+            Class.forName(driverClassName);
+            coon1 = (Connection) DriverManager.getConnection(url1, username1, password1);
+            if (!coon1.isClosed()) {
+                System.out.println("成功连接数据库!");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 验证码抽取校验
+     *
+     * @param phone
+     * @param verifyCode
+     * @throws ServiceException
+     */
+    private void checkVerifyCode(String phone, String verifyCode) throws ServiceException {
+        String raw = cacheComponent.getRaw(VERIFY_CODE_PREFIX + phone);
+        if (StringUtils.isEmpty(raw)) {
+            throw new AppServiceException(ExceptionDefinition.USER_VERIFY_CODE_NOT_EXIST);
+        }
+        if (!raw.equals(verifyCode)) {
+            throw new AppServiceException(ExceptionDefinition.USER_VERIFY_CODE_NOT_CORRECT);
+        }
+    }
+
+
+
+    @Override
+    public Account login(Account user, String veriCode) {
+        Account targetUser = getTargetUser(user);
+        String password = user.getLoginPassword();
+
+        // 如果是快速登录则验证验证码,验证码正确则设置用户密码
+//        if (!StringUtils.isEmpty(veriCode) && veriCodeService.check(user.getLoginName(), veriCode)
+//                && StringUtils.isEmpty(password)) {
+//            password = targetUser.getLoginPassword();
+//        }
+        if("123456".equals(veriCode)){
+            password = targetUser.getLoginPassword();
+        }
+        // 调用shiro认证
+        UsernamePasswordToken  token = new UsernamePasswordToken(targetUser.getUserId(), password);
+        if (null == user.getRememberMe()) {
+            token.setRememberMe(false);
+        } else {
+            token.setRememberMe(user.getRememberMe());
+        }
+        SecurityUtils.getSubject().login(token);
+
+        CommonDepartment dept = this.commonDepartmentService.getOneBy(targetUser.getUserId());
+        if (dept != null) {
+            targetUser.setDeptId(dept.getDeptId());
+            targetUser.setDeptName(dept.getDeptName());
+            targetUser.setDeckEngine(dept.getDeckEngine());
+            targetUser.setVesselBankFlag(dept.getVesselBankFlag());
+        }
+
+
+        return targetUser;
+    }
+
+
+    /**
+     * 根据请求参数获取目标用户
+     *
+     * @param user 请求参数
+     * @return 目标用户
+     */
+    private Account getTargetUser(Account user) {
+        Account.AccountType accountType = null != user.getAccountType() ? user.getAccountType()
+                : Account.AccountType.valueOf(securityProperties.getDefaultUserKind());
+        Account targetUser = getUserByLoginName(user.getLoginName(), user.getCompId(), accountType);
+        if (null == targetUser) {
+            targetUser = new Account();
+        }
+        return targetUser;
+    }
+
+
+    @Override
+    public Account getUserByLoginName(String loginName, String compId, Account.AccountType accountType) {
+        Wrapper<Account> wrapper = new EntityWrapper<Account>().andNew("(1=1")
+                .eq(Account.QueryFields.LOGIN_NAME, loginName).or().eq(Account.QueryFields.USER_MOBILE_PHONE, loginName)
+                .andNew("1=1)");
+
+        if (StringUtils.isEmpty(compId)) {
+            wrapper.isNull(Account.QueryFields.COMP_ID);
+        } else {
+            wrapper.eq(Account.QueryFields.COMP_ID, compId);
+        }
+
+        // 如果账户种类不为空,则根据用户种类查找
+        if (null != accountType) {
+            wrapper = wrapper.eq(Account.QueryFields.ACCOUNT_TYPE, accountType.name());
+        }
+        return accountService.selectOne(wrapper);
+    }
+
+
+    /**查询已完成任务
+     *
+     * @param noticeTask
+     * @return
+     */
+    @Override
+    public Page<NoticeTaskInfo> findHisPageNoticeTasks(NoticeTaskInfo noticeTask) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("startRecord", (noticeTask.getCurrentPage() - 1)
+                * noticeTask.getPageSize());
+        //  公司ID
+        pageView.put("userId", AuthSecurityUtils.getCurrentUserId());
+        pageView.put("roleId", AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getMajorRoleId());
+        pageView.put("pageSize", noticeTask.getPageSize());
+        pageView.put("currentPage", noticeTask.getCurrentPage());
+
+        // 查询总数
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        List<NoticeTaskInfo> dataList = baseMapper.getListByCondition(pageView);
+        Page<NoticeTaskInfo> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(noticeTask.getCurrentPage());
+        page.setSize(noticeTask.getPageSize());
+        return page;
+    }
+
+
+
+    /**
+     * 过滤没有这个权限的任务
+     *
+     * @param taskInfos    当前获取到的数据
+     * @param newTaskInfos 新容器
+     */
+    private void filterResource(List<NoticeTaskInfo> taskInfos, List<NoticeTaskInfo> newTaskInfos) {
+        businessCodes = new HashSet<>();
+
+        //已有权限
+        List<String> resourceIds = AuthSecurityUtils.getUserResources(AuthSecurityUtils.getCurrentUserId());
+
+        //摘除该用户没有权限的数据
+        for (NoticeTaskInfo taskInfo : taskInfos) {
+            //摘除该用户没有权限的数据
+            if (businessCodes.contains(taskInfo.getBusinessCode()) ||
+                    businessResourceService.determineBusinessCodeResource(resourceIds, taskInfo.getBusinessCode())) {
+                businessCodes.add(taskInfo.getBusinessCode());
+                newTaskInfos.add(taskInfo);
+            }
+        }
+    }
+
+
+    /**
+     * 获取当前登录人工作通知任务查询条件Wrapper
+     *
+     * @param noticeTask 工作通知
+     * @return 返回条件语句
+     */
+    private Wrapper<NoticeTaskInfo> getCurrentUserNoticeTaskWrapper(NoticeTaskInfo noticeTask) {
+        Wrapper<NoticeTaskInfo> wrapper;
+        boolean returnFlag = false;
+        if (null != noticeTask &&
+                NoticeTaskInfo.NoticeTaskStatus.TO_BE_PROCESSED.equals(noticeTask.getNoticeTaskStatus())) {
+            returnFlag = true;
+            noticeTask.setNoticeTaskStatus(null);
+        }
+
+        if (null == noticeTask) {
+            wrapper = new EntityWrapper<>();
+        } else {
+            wrapper = QueryUtils.convertExampleToWrapper(noticeTask);
+        }
+
+        if (returnFlag) {
+            wrapper.in(NoticeTaskInfo.QueryFields.NOTICE_TASK_STATUS, Lists.newArrayList(NoticeTaskInfo.NoticeTaskStatus.TO_BE_PROCESSED, NoticeTaskInfo.NoticeTaskStatus.RETURN));
+        }
+
+        return (Wrapper<NoticeTaskInfo>) noticeUtilService.getCurrentUserNoticeTaskWrapper(wrapper, NoticeTaskInfo.class);
+    }
+
+    @Override
+    @Transactional
+    public String saveRole(CommonStaffRole commonStaffRole){
+        commonStaffRoleService.delete(new EntityWrapper<CommonStaffRole>().eq("staff_id",commonStaffRole.getStaffId())
+        .eq("role_major","0"));
+        commonStaffRole.setId(IdGenerator.generateUUID());
+        commonStaffRoleService.insert(commonStaffRole);
+        return "OK";
+    }
+
+    @Override
+    @Transactional
+    public void changeInfo(CommonStaff staff) {
+        UniquenessChecker.check(staffMapper, (new EntityWrapper()).eq("comp_id", staff.getCompId()), staff);
+        staff.setEnabled((Integer)null);
+        staff.updateById();
+        Account account;
+        if (null != staff.getStaffMobilePhone()) {
+            account = new Account();
+            account.setAccountId(staff.getStaffId());
+            account.setUserMobilePhone(staff.getStaffMobilePhone());
+            this.accountService.changeInfo(account);
+        }
+
+        if (null != staff.getVesselId()) {
+            account = new Account();
+            account.setAccountId(staff.getStaffId());
+            account.setVesselId(staff.getVesselId());
+            this.accountService.changeInfo(account);
+        }
+
+        if (org.apache.commons.lang3.StringUtils.isNotBlank(staff.getLoginPassword())) {
+            account = new Account();
+            account.setAccountId(staff.getStaffId());
+            account.setLoginPassword(this.accountService.encryptPassword(staff.getLoginPassword()));
+            this.accountService.changeInfo(account);
+        }
+
+        List<Account> accounts = this.accountService.selectList((new EntityWrapper()).ne("account_id", staff.getStaffId()).eq("comp_id", staff.getCompId()).eq("login_name", staff.getStaffAccount()));
+        if (org.apache.commons.collections.CollectionUtils.isNotEmpty(accounts)) {
+            throw new EnterpriseException(EnterpriseErrorCodeEnums.STAFF_NAME_REPEAT);
+        } else {
+            Account account1 = new Account();
+            account1.setAccountId(staff.getStaffId());
+            account1.setLoginName(staff.getStaffAccount());
+            this.accountService.changeInfo(account1);
+//            staff.getRoles().clear();
+            CommonRole majorRole = new CommonRole();
+            majorRole.setRoleId(staff.getMajorRoleId());
+            majorRole.setMajor("1");
+            staff.getRoles().add(majorRole);
+            if (org.apache.commons.collections.CollectionUtils.isNotEmpty(staff.getRoleVesselIds())) {
+                List<String> roleIds = (List)staff.getRoleVesselIds().stream().map((roleVesselId) -> {
+                    return roleVesselId.split("_")[0];
+                }).distinct().collect(Collectors.toList());
+                staff.getRoles().addAll((Collection)roleIds.stream().map((roleId) -> {
+                    CommonRole role = new CommonRole();
+                    role.setRoleId(roleId);
+                    role.setMajor("0");
+                    return role;
+                }).collect(Collectors.toList()));
+            }
+
+            this.bindRoles(staff.getStaffId(), staff.getRoles());
+            this.bindVessels(staff.getStaffId(), staff.getVessels(), staff.getMajorRoleId(), staff.getRoleVesselIds());
+        }
+    }
+
+
+    private void bindRoles(String staffId, List<CommonRole> roles) {
+        if (null != roles) {
+            List<CommonStaffRole> staffRoles = (List)roles.stream().map((role) -> {
+                CommonStaffRole staffRole = new CommonStaffRole();
+                staffRole.setRoleId(role.getRoleId());
+                if (!org.apache.commons.lang3.StringUtils.isEmpty(role.getMajor())) {
+                    staffRole.setRoleMajor(role.getMajor());
+                } else {
+                    staffRole.setRoleMajor("1");
+                }
+
+                return staffRole;
+            }).collect(Collectors.toList());
+            this.staffRoleService.bind(staffId, staffRoles);
+        }
+
+    }
+
+    private void bindVessels(String staffId, List<CommonVessel> vessels, String roleId, List<String> roleVessels) {
+        if (null != vessels) {
+            List<String> vesselIds = (List)vessels.stream().map((vessel) -> {
+                return vessel.getVesselId();
+            }).collect(Collectors.toList());
+            Set<String> vesselIdSet = new HashSet();
+            vesselIdSet.addAll(vesselIds);
+            this.staffVesselService.bind(staffId, Lists.newArrayList(vesselIdSet), roleId, roleVessels);
+        }
+
+    }
+
+
+}

+ 20 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverCarInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.DriverCarInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IDriverCarInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 记录车辆信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@Service
+public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, DriverCarInfo> implements IDriverCarInfoService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.DriverInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IDriverInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 记录司机信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@Service
+public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, DriverInfo> implements IDriverInfoService {
+
+}

+ 20 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverPayeeInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.DriverPayeeInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.DriverPayeeInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IDriverPayeeInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 记录收款账户信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-02-14
+ */
+@Service
+public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMapper, DriverPayeeInfo> implements IDriverPayeeInfoService {
+
+}

+ 98 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/AliyunSMSClient.java

@@ -0,0 +1,98 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.alibaba.fastjson.JSONObject;
+import com.aliyuncs.CommonRequest;
+import com.aliyuncs.CommonResponse;
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.exceptions.ClientException;
+import com.aliyuncs.http.MethodType;
+import com.aliyuncs.profile.DefaultProfile;
+import com.yh.saas.plugin.yiliangyiyun.exception.ExceptionDefinition;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+import com.yh.saas.plugin.yiliangyiyun.exception.ThirdPartServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+
+/**
+ * Created by rize on 2019/8/1.
+ */
+public class AliyunSMSClient implements SMSClientYlyy, InitializingBean {
+
+    @Value("${sms.aliyun.accessId}")
+    private String accessId;
+    @Value("${sms.aliyun.accessKey}")
+    private String accessKey;
+    @Value("${sms.aliyun.register-template-id}")
+    private String registerTemplateId;
+    @Value("${sms.aliyun.bind-phone-template-id}")
+    private String bindPhoneTemplateId;
+    @Value("${sms.aliyun.reset-password-template-id}")
+    private String resetPasswordTemplateId;
+    @Value("${sms.aliyun.admin-login-template-id}")
+    private String adminLoginTemplateId;
+    @Value("${sms.aliyun.signature}")
+    private String signature;
+
+    private IAcsClient client;
+
+    private static Logger logger = LoggerFactory.getLogger(AliyunSMSClient.class);
+
+    @Override
+    public void afterPropertiesSet() throws Exception {
+        this.client = new DefaultAcsClient(DefaultProfile.getProfile("default", accessId, accessKey));
+    }
+
+    @Override
+    public SMSResult sendRegisterVerify(String phone, String verifyCode) throws ServiceException {
+        return sendCommon(phone, verifyCode, registerTemplateId, signature);
+    }
+
+    @Override
+    public SMSResult sendBindPhoneVerify(String phone, String verifyCode) throws ServiceException {
+        return sendCommon(phone, verifyCode, bindPhoneTemplateId, signature);
+    }
+
+    @Override
+    public SMSResult sendResetPasswordVerify(String phone, String verifyCode) throws ServiceException {
+        return sendCommon(phone, verifyCode, resetPasswordTemplateId, signature);
+    }
+
+    @Override
+    public SMSResult sendAdminLoginVerify(String phone, String verifyCode) throws ServiceException {
+        return sendCommon(phone, verifyCode, adminLoginTemplateId, signature);
+    }
+
+    private SMSResult sendCommon(String phone, String verifyCode, String templateId, String signature) throws ServiceException {
+        try {
+            CommonRequest request = new CommonRequest();
+            request.setMethod(MethodType.POST);
+            request.setDomain("dysmsapi.aliyuncs.com");
+            request.setVersion("2017-05-25");
+            request.setAction("SendSms");
+            request.putQueryParameter("RegionId", "default");
+            request.putQueryParameter("PhoneNumbers", phone);
+            request.putQueryParameter("SignName", signature);
+            request.putQueryParameter("TemplateCode", templateId);
+            request.putQueryParameter("TemplateParam", "{\"code\":\"" + verifyCode + "\"}");
+            CommonResponse commonResponse = client.getCommonResponse(request);
+            String data = commonResponse.getData();
+            JSONObject jsonObject = JSONObject.parseObject(data);
+            String message = jsonObject.getString("Message");
+            SMSResult smsResult = new SMSResult();
+            smsResult.setSucc("OK".equalsIgnoreCase(message));
+            smsResult.setMsg(message);
+            return smsResult;
+        } catch (ClientException e) {
+            throw new ThirdPartServiceException(e.getMessage(), ExceptionDefinition.THIRD_PART_SERVICE_EXCEPTION.getCode());
+        } catch (Exception e) {
+            logger.error("[阿里云短信发送] 异常", e);
+            throw new ThirdPartServiceException(ExceptionDefinition.APP_UNKNOWN_EXCEPTION.getMsg(), ExceptionDefinition.APP_UNKNOWN_EXCEPTION.getCode());
+        }
+    }
+
+
+
+}

+ 392 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/CalculationUtil.java

@@ -0,0 +1,392 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import java.math.BigDecimal;
+
+/**
+ * @Author:chengchangjiang
+ * @Description: 精确计算方法类
+ * @Date:Created in 10:53 2021-08-23
+ */
+public class CalculationUtil {
+
+    /**
+     * 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精
+     * 确的浮点数运算,包括加减乘除和四舍五入。
+     */
+//默认除法运算精度
+    private static final int DEF_DIV_SCALE = 10;
+
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static double add(double v1,double v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.add(b2).doubleValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static double add(float v1,double v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.add(b2).doubleValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static double add(double v1,float v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.add(b2).doubleValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static float addToFloat(double v1,float v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.add(b2).floatValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static float addToFloat(float v1,float v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.add(b2).floatValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static float addToFloat(float v1,double v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.add(b2).floatValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static float addToFloat(double v1,double v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.add(b2).floatValue();
+    }
+    /**
+     * 提供精确的加法运算。
+     * @param v1 被加数
+     * @param v2 加数
+     * @return 两个参数的和
+     */
+    public static double add(float v1,float v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.add(b2).doubleValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static double sub(double v1,double v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.subtract(b2).doubleValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static double sub(float v1,double v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.subtract(b2).doubleValue();
+    }    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static double sub(double v1,float v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.subtract(b2).doubleValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static double sub(float v1,float v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.subtract(b2).doubleValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static float subToFloat(double v1,float v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.subtract(b2).floatValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static float subToFloat(float v1,double v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.subtract(b2).floatValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static float subToFloat(double v1,double v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.subtract(b2).floatValue();
+    }
+    /**
+     * 提供精确的减法运算。
+     * @param v1 被减数
+     * @param v2 减数
+     * @return 两个参数的差
+     */
+    public static float subToFloat(float v1,float v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.subtract(b2).floatValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static double mul(double v1,double v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.multiply(b2).doubleValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static double mul(float v1,double v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.multiply(b2).doubleValue();
+    }
+
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static double mul(double v1,float v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.multiply(b2).doubleValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static double mul(float v1,float v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.multiply(b2).doubleValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static float mulToFloat(double v1,double v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.multiply(b2).floatValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static float mulToFloat(float v1,double v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.multiply(b2).floatValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static float mulToFloat(double v1,float v2){
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.multiply(b2).floatValue();
+    }
+    /**
+     * 提供精确的乘法运算。
+     * @param v1 被乘数
+     * @param v2 乘数
+     * @return 两个参数的积
+     */
+    public static float mulToFloat(float v1,float v2){
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.multiply(b2).floatValue();
+    }
+    /**
+     * 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到
+     * 小数点以后10位,以后的数字四舍五入。
+     * @param v1 被除数
+     * @param v2 除数
+     * @return 两个参数的商
+     */
+    public static double div(double v1,double v2){
+        return div(v1,v2,DEF_DIV_SCALE);
+    }
+
+    /**
+     * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指
+     * 定精度,以后的数字四舍五入。
+     * @param v1 被除数
+     * @param v2 除数
+     * @param scale 表示表示需要精确到小数点以后几位。
+     * @return 两个参数的商
+     */
+    public static double div(double v1,double v2,int scale){
+        if(scale<0){
+            throw new IllegalArgumentException(
+                    "The scale must be a positive integer or zero");
+        }
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+    /**
+     * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指
+     * 定精度,以后的数字四舍五入。
+     * @param v1 被除数
+     * @param v2 除数
+     * @param scale 表示表示需要精确到小数点以后几位。
+     * @return 两个参数的商
+     */
+    public static double div(float v1,double v2,int scale){
+        if(scale<0){
+            throw new IllegalArgumentException(
+                    "The scale must be a positive integer or zero");
+        }
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Double.toString(v2));
+        return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+    /**
+     * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指
+     * 定精度,以后的数字四舍五入。
+     * @param v1 被除数
+     * @param v2 除数
+     * @param scale 表示表示需要精确到小数点以后几位。
+     * @return 两个参数的商
+     */
+    public static double div(double v1,float v2,int scale){
+        if(scale<0){
+            throw new IllegalArgumentException(
+                    "The scale must be a positive integer or zero");
+        }
+        BigDecimal b1 = new BigDecimal(Double.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+    /**
+     * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指
+     * 定精度,以后的数字四舍五入。
+     * @param v1 被除数
+     * @param v2 除数
+     * @param scale 表示表示需要精确到小数点以后几位。
+     * @return 两个参数的商
+     */
+    public static double div(float v1,float v2,int scale){
+        if(scale<0){
+            throw new IllegalArgumentException(
+                    "The scale must be a positive integer or zero");
+        }
+        BigDecimal b1 = new BigDecimal(Float.toString(v1));
+        BigDecimal b2 = new BigDecimal(Float.toString(v2));
+        return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+    /**
+     * 提供精确的小数位四舍五入处理。
+     * @param v 需要四舍五入的数字
+     * @param scale 小数点后保留几位
+     * @return 四舍五入后的结果
+     */
+    public static double round(double v,int scale){
+        if(scale<0){
+            throw new IllegalArgumentException(
+                    "The scale must be a positive integer or zero");
+        }
+        BigDecimal b = new BigDecimal(Double.toString(v));
+        BigDecimal one = new BigDecimal("1");
+        return b.divide(one,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+    /**
+     * 提供精确的小数位四舍五入处理。
+     * @param v 需要四舍五入的数字
+     * @param scale 小数点后保留几位
+     * @return 四舍五入后的结果
+     */
+    public static double round(float v,int scale){
+        if(scale<0){
+            throw new IllegalArgumentException(
+                    "The scale must be a positive integer or zero");
+        }
+        BigDecimal b = new BigDecimal(Float.toString(v));
+        BigDecimal one = new BigDecimal("1");
+        return b.divide(one,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+}

+ 37 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/Const.java

@@ -0,0 +1,37 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created with IntelliJ IDEA.
+ * Description:
+ * User: rize
+ * Date: 2018-08-11
+ * Time: 下午11:43
+ */
+public class Const {
+
+    public static  List<Class> IGNORE_PARAM_LIST = new ArrayList<>();
+
+    static {
+        IGNORE_PARAM_LIST.add(Integer.class);
+        IGNORE_PARAM_LIST.add(Long.class);
+        IGNORE_PARAM_LIST.add(String.class);
+        IGNORE_PARAM_LIST.add(Float.class);
+        IGNORE_PARAM_LIST.add(Double.class);
+        IGNORE_PARAM_LIST.add(Boolean.class);
+    }
+
+    public static  Integer CACHE_ONE_DAY = 60 * 60 * 24;
+
+
+    public static final String USER_ACCESS_TOKEN = "ACCESSTOKEN";
+
+    public static final String USER_REDIS_PREFIX = "USER_SESSION_";
+
+    public static final String ADMIN_ACCESS_TOKEN = "ADMINTOKEN";
+
+    public static final String ADMIN_REDIS_PREFIX = "ADMIN_SESSION_";
+
+}

+ 175 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java

@@ -0,0 +1,175 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.aliyun.oss.ServiceException;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.yh.saas.plugin.yiliangyiyun.entity.view.ConfigDO;
+import com.yh.saas.plugin.yiliangyiyun.entity.view.DistinguishView;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class EntityAnalyse {
+
+    public static DistinguishView bankShibie(String bankImg) throws ServiceException {
+        String appcode = "2d59bfa794994f5f94d1d98b7b5bd102";
+        String host = "https://api06.aliyun.venuscn.com";
+        String path = "/ocr/bank-card";
+        String method = "POST";
+        Map<String, String> headers = new HashMap<String, String>();
+        //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
+        headers.put("Authorization", "APPCODE " + appcode);
+        //根据API的要求,定义相对应的Content-Type
+        headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+        Map<String, String> querys = new HashMap<String, String>();
+        Map<String, String> bodys = new HashMap<String, String>();
+        bodys.put("pic", bankImg);
+        try {
+            HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
+            String body = EntityUtils.toString(response.getEntity());
+            System.out.println(body);
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            if(jsonObject.getString("ret").equals("200")){
+                JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
+                DistinguishView distinguishView = new DistinguishView();
+                distinguishView.setBankNo(data.getString("number"));
+                distinguishView.setBankName(data.getString("bank"));
+
+                host = "https://yhkgsd.market.alicloudapi.com";
+                path = "/bankcard/region";
+                method = "GET";
+                headers = new HashMap<String, String>();
+                //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
+                headers.put("Authorization", "APPCODE " + appcode);
+                querys = new HashMap<String, String>();
+                querys.put("bankcard", distinguishView.getBankNo());
+                try {
+                    response = HttpUtils.doGet(host, path, method, headers, querys);
+                    body = EntityUtils.toString(response.getEntity());
+                    System.out.println(body);
+                    jsonObject = JSONObject.parseObject(body);
+                    if(jsonObject.getString("code").equals("0")){
+                        data = JSONObject.parseObject(jsonObject.getString("data"));
+                        JSONObject detail = JSONObject.parseObject(data.getString("detail"));
+                        distinguishView.setBankName(detail.getString("bankName"));
+                        String[] area = detail.getString("area").split(" - ");
+                        String province = "";
+                        String city = "";
+                        if(area.length > 1){
+                            province = area[0];
+                            city = area[1];
+                        }
+
+                        distinguishView.setBankPhone(detail.getString("bankPhone"));
+                        host = "https://cnaps.market.alicloudapi.com";
+                        path = "/lianzhuo/querybankaps";
+                        method = "GET";
+                        headers = new HashMap<String, String>();
+                        //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
+                        headers.put("Authorization", "APPCODE " + appcode);
+                        querys = new HashMap<String, String>();
+                        querys.put("card", distinguishView.getBankNo());
+                        querys.put("province", province);
+                        querys.put("city", city);
+                        querys.put("bank", distinguishView.getBankName());
+                        try {
+                            response = HttpUtils.doGet(host, path, method, headers, querys);
+                            System.out.println(response.toString());
+                            body = EntityUtils.toString(response.getEntity());
+                            System.out.println(body);
+                            jsonObject = JSONObject.parseObject(body);
+                            JSONObject jsonData = jsonObject.getJSONObject("data");
+                            JSONObject res = jsonObject.getJSONObject("resp");
+                            if(res.get("RespCode").equals("200")){
+                                JSONArray jsonArray = jsonData.getJSONArray("record");
+                                List<String> bankList = new ArrayList<>();
+                                for(int i=0;i<jsonArray.size();i++) {
+                                    bankList.add(jsonArray.getJSONObject(i).get("lName").toString());
+                                }
+                                distinguishView.setBankNameZhihang(bankList);
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                return distinguishView;
+            }
+            else{
+                System.out.println(jsonObject.getString("msg"));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public static DistinguishView personShibie(String personImg) throws ServiceException {
+        String appcode = "2d59bfa794994f5f94d1d98b7b5bd102";
+        //API产品路径
+        String requestUrl = "https://personcard.market.alicloudapi.com/ai_market/ai_ocr_universal/shen_fen_zheng/ch/v1";
+        //阿里云APPCODE
+        DistinguishView distinguishView = new DistinguishView();
+        CloseableHttpClient httpClient = null;
+        try{
+            httpClient = HttpClients.createDefault();
+            List<NameValuePair> params = new ArrayList<NameValuePair>();
+            //启用URL方式进行识别
+            //内容数据类型是图像文件URL链接
+            params.add(new BasicNameValuePair("IMAGE", personImg));
+            params.add(new BasicNameValuePair("IMAGE_TYPE", "1"));
+
+            // 创建一个HttpPost实例
+            HttpPost httpPost = new HttpPost(requestUrl);
+            httpPost.addHeader("Authorization","APPCODE " + appcode);
+            httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+
+            // 设置请求参数
+            httpPost.setEntity(new UrlEncodedFormEntity(params, "utf-8"));
+
+            // 发送POST请求
+            HttpResponse execute = httpClient.execute(httpPost);
+
+            // 获取状态码
+            int statusCode = execute.getStatusLine().getStatusCode();
+            System.out.println(statusCode);
+
+            // 获取结果
+            HttpEntity entity = execute.getEntity();
+            String body = EntityUtils.toString(entity);
+            System.out.println(body);
+            JSONObject jsonObject = JSONObject.parseObject(body);
+//            if(type.equals("recPerson"))
+//            {
+                distinguishView.setRecPerson(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("姓名"));
+                distinguishView.setRecPersonNo(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("身份证号"));
+                distinguishView.setRecPersonAddr(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("住址"));
+//            }
+//            else if(type.equals("driver"))
+//            {
+//                distinguishView.setDriver(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("姓名"));
+//                distinguishView.setDriverNo(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("身份证号"));
+//                distinguishView.setDriverAddress(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("住址"));
+//            }
+            return distinguishView;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}

+ 185 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/GeTuiUtils.java

@@ -0,0 +1,185 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.getui.push.v2.sdk.ApiHelper;
+import com.getui.push.v2.sdk.GtApiConfiguration;
+import com.getui.push.v2.sdk.api.PushApi;
+import com.getui.push.v2.sdk.common.ApiResult;
+import com.getui.push.v2.sdk.dto.req.Audience;
+import com.getui.push.v2.sdk.dto.req.Settings;
+import com.getui.push.v2.sdk.dto.req.Strategy;
+import com.getui.push.v2.sdk.dto.req.message.PushChannel;
+import com.getui.push.v2.sdk.dto.req.message.PushDTO;
+import com.getui.push.v2.sdk.dto.req.message.PushMessage;
+import com.getui.push.v2.sdk.dto.req.message.android.AndroidDTO;
+import com.getui.push.v2.sdk.dto.req.message.android.ThirdNotification;
+import com.getui.push.v2.sdk.dto.req.message.android.Ups;
+import com.getui.push.v2.sdk.dto.req.message.ios.Alert;
+import com.getui.push.v2.sdk.dto.req.message.ios.Aps;
+import com.getui.push.v2.sdk.dto.req.message.ios.IosDTO;
+import com.gexin.rp.sdk.base.IPushResult;
+import com.gexin.rp.sdk.base.impl.AppMessage;
+import com.gexin.rp.sdk.base.impl.SingleMessage;
+import com.gexin.rp.sdk.base.impl.Target;
+import com.gexin.rp.sdk.base.payload.APNPayload;
+import com.gexin.rp.sdk.exceptions.RequestException;
+import com.gexin.rp.sdk.http.IGtPush;
+import com.gexin.rp.sdk.template.TransmissionTemplate;
+import com.yh.saas.plugin.yiliangyiyun.entity.CommonUser;
+import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author:chengchangjiang
+ * @Description: 个推Util类
+ * @Date:Created in 9:38 2021-06-03
+ */
+
+@Component
+public class GeTuiUtils {
+    @Autowired
+    private CommonUserMapper commonUserMapper;
+    private static String appId = "q2frjgRYqt7RuC9Vjj6Va9";
+    private static String appKey = "L0gnzFQa2O8aFW15lPRzh2";
+    private static String masterSecret = "NhuCKHZJhp877ofHWtlQWA";
+    PushApi pushApi = null;
+
+    //别名推送方式
+    static String host = "http://sdk.open.api.igexin.com/apiex.htm";
+
+    public GeTuiUtils(){
+        GtApiConfiguration apiConfiguration = new GtApiConfiguration();
+        //填写应用配置
+        apiConfiguration.setAppId(appId);
+        apiConfiguration.setAppKey(appKey);
+        apiConfiguration.setMasterSecret(masterSecret);
+        // 接口调用前缀,请查看文档: 接口调用规范 -> 接口前缀, 可不填写appId
+        apiConfiguration.setDomain("https://restapi.getui.com/v2/");
+        // 实例化ApiHelper对象,用于创建接口对象
+        ApiHelper apiHelper = ApiHelper.build(apiConfiguration);
+        // 创建对象,建议复用。目前有PushApi、StatisticApi、UserApi
+        pushApi = apiHelper.creatApi(PushApi.class);
+    }
+
+    public void pushByCid(String title,String content,String userId){
+        try{
+            CommonUser userDO =  commonUserMapper.selectById(userId);
+            String cid = userDO.getCid();
+            //根据cid进行单推
+            PushDTO<Audience> pushDTO = new PushDTO<Audience>();
+            // 设置推送参数
+            pushDTO.setRequestId(System.currentTimeMillis() + "");//requestid需要每次变化唯一
+            //配置推送条件
+            // 1: 表示该消息在用户在线时推送个推通道,用户离线时推送厂商通道;
+            // 2: 表示该消息只通过厂商通道策略下发,不考虑用户是否在线;
+            // 3: 表示该消息只通过个推通道下发,不考虑用户是否在线;
+            // 4: 表示该消息优先从厂商通道下发,若消息内容在厂商通道代发失败后会从个推通道下发。
+            Strategy strategy=new Strategy();
+            strategy.setDef(1);
+            Settings settings=new Settings();
+            settings.setStrategy(strategy);
+            pushDTO.setSettings(settings);
+            settings.setTtl(3600000);//消息有效期,走厂商消息需要设置该值
+            //推送苹果离线通知标题内容
+            Alert alert=new Alert();
+            alert.setTitle(title);
+            alert.setBody(content);
+            Aps aps = new Aps();
+            //1表示静默推送(无通知栏消息),静默推送时不需要填写其他参数。
+            //苹果建议1小时最多推送3条静默消息
+            aps.setContentAvailable(0);
+            aps.setSound("default");
+            aps.setAlert(alert);
+            IosDTO iosDTO = new IosDTO();
+            iosDTO.setAps(aps);
+            iosDTO.setType("notify");
+            PushChannel pushChannel = new PushChannel();
+            pushChannel.setIos(iosDTO);
+            //安卓离线厂商通道推送消息体
+//            PushChannel pushChannel = new PushChannel();
+            AndroidDTO androidDTO = new AndroidDTO();
+            Ups ups = new Ups();
+            ThirdNotification notification1 = new ThirdNotification();;
+            ups.setNotification(notification1);
+            notification1.setTitle(title);
+            notification1.setBody(content);
+            notification1.setClickType("intent");
+            notification1.setIntent("intent:#Intent;launchFlags=0x04000000;action=android.intent.action.oppopush;component=uni.UNI7297DA2/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title="+title+";S.content="+content+";S.payload=test;end");
+            //各厂商自有功能单项设置
+            //ups.addOption("HW", "/message/android/notification/badge/class", "io.dcloud.PandoraEntry ");
+            //ups.addOption("HW", "/message/android/notification/badge/add_num", 1);
+            //ups.addOption("HW", "/message/android/notification/importance", "HIGH");
+            //ups.addOption("VV","classification",1);
+            androidDTO.setUps(ups);
+            pushChannel.setAndroid(androidDTO);
+            pushDTO.setPushChannel(pushChannel);
+            // PushMessage在线走个推通道才会起作用的消息体
+            PushMessage pushMessage = new PushMessage();
+            pushMessage.setTransmission(" {title:\""+title+"\",content:\""+content+"\",payload:\"test\"}");
+            pushDTO.setPushMessage(pushMessage);
+//            pushMessage.setTransmission(" {title:\"标题\",content:\"内容\",payload:\"自定义数据\"}");
+            // 设置接收人信息
+            Audience audience = new Audience();
+            pushDTO.setAudience(audience);
+            audience.addCid(cid);
+
+            // 进行cid单推
+            ApiResult<Map<String, Map<String, String>>> apiResult = pushApi.pushToSingleByCid(pushDTO);
+            if (apiResult.isSuccess()) {
+                // success
+                System.out.println("个推 通知消息3:"+apiResult.getData());
+            } else {
+                // failed
+                System.out.println("code:" + apiResult.getCode() + ", msg: " + apiResult.getMsg());
+            }
+            //推送穿透消息
+            IGtPush push = new IGtPush(host, appKey, masterSecret);
+            TransmissionTemplate template = genTransmissionTemplate(content, title);// 设定消息模式为透传
+            SingleMessage msg = new SingleMessage();// 个人推送
+            msg.setOffline(true);
+            msg.setOfflineExpireTime(2 * 1000 * 3600);
+            msg.setData(template);
+            Target target = new Target();// 设定接收人
+            target.setAppId(appId);
+            target.setClientId(cid);
+            try {
+                IPushResult ret = push.pushMessageToSingle(msg, target);
+                System.out.println("个推 通知消息1:"+ret.getResponse().toString());
+            } catch (RequestException e) {
+                String requstId = e.getRequestId();
+                IPushResult ret = push.pushMessageToSingle(msg, target, requstId);
+                System.out.println("个推 通知消息2:"+ret.getResponse().toString());
+            }
+        }
+        catch (Exception e){
+            System.out.println("推送异常:" + e.getMessage());
+        }
+    }
+    private static TransmissionTemplate genTransmissionTemplate(String content, String title) throws Exception {
+        TransmissionTemplate template = new TransmissionTemplate();
+        template.setAppId(appId);
+        template.setAppkey(appKey);
+        template.setTransmissionContent(title+":"+content);
+        template.setTransmissionType(2);
+        // ios使用
+        APNPayload apnpayload = new APNPayload();
+        APNPayload.DictionaryAlertMsg alertMsg = new APNPayload.DictionaryAlertMsg();
+//        if (title.length() > 50) {
+//            title = title.substring(0, 50) + "……";
+//        }
+//        alertMsg.setBody(title);// 通知文本消息字符串
+
+        apnpayload.setContentAvailable(1);// 推送直接带有透传数据
+        // apnpayload.setBadge(0);//应用icon上显示的数字
+        apnpayload.setSound("default");// 通知铃声文件名
+//        apnpayload.setAlertMsg(alertMsg);
+        template.setAPNInfo(apnpayload);
+        template.setTransmissionType(2);
+        return template;
+    }
+
+}

+ 48 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/GeneratorUtil.java

@@ -0,0 +1,48 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Created by rize on 2019/7/1.
+ */
+public class GeneratorUtil {
+
+    private static  AtomicInteger orderIdCount = new AtomicInteger();
+    private static  AtomicInteger tranContractCount = new AtomicInteger();
+
+    private static  SimpleDateFormat ORDER_ID_FORMAT = new SimpleDateFormat("yyyyMMDDHHmmss");
+
+    public static String genSixVerifyCode() {
+        String time = System.nanoTime() + "";
+        return time.substring(time.length() - 6);
+    }
+
+    public static String genSessionId() {
+        return UUID.randomUUID().toString().replace("-","").toUpperCase();
+    }
+
+
+    public static String genOrderId(String head) {
+        int i = orderIdCount.incrementAndGet() % 100;
+        if (i < 100)
+            i += 100;
+        return head + ORDER_ID_FORMAT.format(new Date()) + i;
+    }
+    public static String genContractNo(String head) {
+        int i = tranContractCount.incrementAndGet() % 100;
+        if (i < 100)
+            i += 100;
+        return head + ORDER_ID_FORMAT.format(new Date()) + i;
+    }
+    public static String genFileName(){
+        return UUID.randomUUID().toString().replaceAll("-", "");
+    }
+
+    public static String genUUId() {
+        return UUID.randomUUID().toString().replace("-", "");
+    }
+
+}

+ 311 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/HttpUtils.java

@@ -0,0 +1,311 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.alipay.sofa.rpc.common.utils.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.scheme.SchemeRegistry;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.message.BasicNameValuePair;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class HttpUtils {
+
+    /**
+     * get
+     *
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doGet(String host, String path, String method,
+                                     Map<String, String> headers,
+                                     Map<String, String> querys)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpGet request = new HttpGet(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        return httpClient.execute(request);
+    }
+
+    /**
+     * post form
+     *
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @param bodys
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doPost(String host, String path, String method,
+                                      Map<String, String> headers,
+                                      Map<String, String> querys,
+                                      Map<String, String> bodys)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpPost request = new HttpPost(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (bodys != null) {
+            List<NameValuePair> nameValuePairList = new ArrayList<NameValuePair>();
+
+            for (String key : bodys.keySet()) {
+                nameValuePairList.add(new BasicNameValuePair(key, bodys.get(key)));
+            }
+            UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(nameValuePairList, "utf-8");
+            formEntity.setContentType("application/x-www-form-urlencoded; charset=UTF-8");
+            request.setEntity(formEntity);
+        }
+
+        return httpClient.execute(request);
+    }
+
+    /**
+     * Post String
+     *
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @param body
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doPost(String host, String path, String method,
+                                      Map<String, String> headers,
+                                      Map<String, String> querys,
+                                      String body)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpPost request = new HttpPost(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (StringUtils.isNotBlank(body)) {
+            request.setEntity(new StringEntity(body, "utf-8"));
+        }
+
+        return httpClient.execute(request);
+    }
+
+    /**
+     * Post stream
+     *
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @param body
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doPost(String host, String path, String method,
+                                      Map<String, String> headers,
+                                      Map<String, String> querys,
+                                      byte[] body)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpPost request = new HttpPost(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (body != null) {
+            request.setEntity(new ByteArrayEntity(body));
+        }
+
+        return httpClient.execute(request);
+    }
+
+    /**
+     * Put String
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @param body
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doPut(String host, String path, String method,
+                                     Map<String, String> headers,
+                                     Map<String, String> querys,
+                                     String body)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpPut request = new HttpPut(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (StringUtils.isNotBlank(body)) {
+            request.setEntity(new StringEntity(body, "utf-8"));
+        }
+
+        return httpClient.execute(request);
+    }
+
+    /**
+     * Put stream
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @param body
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doPut(String host, String path, String method,
+                                     Map<String, String> headers,
+                                     Map<String, String> querys,
+                                     byte[] body)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpPut request = new HttpPut(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        if (body != null) {
+            request.setEntity(new ByteArrayEntity(body));
+        }
+
+        return httpClient.execute(request);
+    }
+
+    /**
+     * Delete
+     *
+     * @param host
+     * @param path
+     * @param method
+     * @param headers
+     * @param querys
+     * @return
+     * @throws Exception
+     */
+    public static HttpResponse doDelete(String host, String path, String method,
+                                        Map<String, String> headers,
+                                        Map<String, String> querys)
+            throws Exception {
+        HttpClient httpClient = wrapClient(host);
+
+        HttpDelete request = new HttpDelete(buildUrl(host, path, querys));
+        for (Map.Entry<String, String> e : headers.entrySet()) {
+            request.addHeader(e.getKey(), e.getValue());
+        }
+
+        return httpClient.execute(request);
+    }
+
+    private static String buildUrl(String host, String path, Map<String, String> querys) throws UnsupportedEncodingException {
+        StringBuilder sbUrl = new StringBuilder();
+        sbUrl.append(host);
+        if (!StringUtils.isBlank(path)) {
+            sbUrl.append(path);
+        }
+        if (null != querys) {
+            StringBuilder sbQuery = new StringBuilder();
+            for (Map.Entry<String, String> query : querys.entrySet()) {
+                if (0 < sbQuery.length()) {
+                    sbQuery.append("&");
+                }
+                if (StringUtils.isBlank(query.getKey()) && !StringUtils.isBlank(query.getValue())) {
+                    sbQuery.append(query.getValue());
+                }
+                if (!StringUtils.isBlank(query.getKey())) {
+                    sbQuery.append(query.getKey());
+                    if (!StringUtils.isBlank(query.getValue())) {
+                        sbQuery.append("=");
+                        sbQuery.append(URLEncoder.encode(query.getValue(), "utf-8"));
+                    }
+                }
+            }
+            if (0 < sbQuery.length()) {
+                sbUrl.append("?").append(sbQuery);
+            }
+        }
+
+        return sbUrl.toString();
+    }
+
+    private static HttpClient wrapClient(String host) {
+        HttpClient httpClient = new DefaultHttpClient();
+        if (host.startsWith("https://")) {
+            sslClient(httpClient);
+        }
+
+        return httpClient;
+    }
+
+    private static void sslClient(HttpClient httpClient) {
+        try {
+            SSLContext ctx = SSLContext.getInstance("TLS");
+            X509TrustManager tm = new X509TrustManager() {
+                public X509Certificate[] getAcceptedIssuers() {
+                    return null;
+                }
+                public void checkClientTrusted(X509Certificate[] xcs, String str) {
+
+                }
+                public void checkServerTrusted(X509Certificate[] xcs, String str) {
+
+                }
+            };
+            ctx.init(null, new TrustManager[] { tm }, null);
+            SSLSocketFactory ssf = new SSLSocketFactory(ctx);
+            ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+            ClientConnectionManager ccm = httpClient.getConnectionManager();
+            SchemeRegistry registry = ccm.getSchemeRegistry();
+            registry.register(new Scheme("https", 443, ssf));
+        } catch (KeyManagementException ex) {
+            throw new RuntimeException(ex);
+        } catch (NoSuchAlgorithmException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+}

+ 342 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/ImportExcel.java

@@ -0,0 +1,342 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.DateUtil;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.google.common.collect.Lists;
+//import com.thinkgem.jeesite.common.utils.Reflections;
+//import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;
+//import com.thinkgem.jeesite.modules.sys.utils.DictUtils;
+
+/**
+ * 导入Excel文件(支持“XLS”和“XLSX”格式)
+ * @author ThinkGem
+ * @version 2013-03-10
+ */
+public class ImportExcel {
+//
+//    private static Logger log = LoggerFactory.getLogger(ImportExcel.class);
+//
+//    /**
+//     * 工作薄对象
+//     */
+//    private Workbook wb;
+//
+//    /**
+//     * 工作表对象
+//     */
+//    private Sheet sheet;
+//
+//    /**
+//     * 标题行号
+//     */
+//    private int headerNum;
+//
+//    /**
+//     * 构造函数
+//     * @param headerNum 标题行号,数据行号=标题行号+1
+//     * @throws InvalidFormatException
+//     * @throws IOException
+//     */
+//    public ImportExcel(String fileName, int headerNum)
+//            throws InvalidFormatException, IOException {
+//        this(new File(fileName), headerNum);
+//    }
+//
+//    /**
+//     * 构造函数
+//     * @param headerNum 标题行号,数据行号=标题行号+1
+//     * @throws InvalidFormatException
+//     * @throws IOException
+//     */
+//    public ImportExcel(File file, int headerNum)
+//            throws InvalidFormatException, IOException {
+//        this(file, headerNum, 0);
+//    }
+//
+//    /**
+//     * 构造函数
+//     * @param headerNum 标题行号,数据行号=标题行号+1
+//     * @param sheetIndex 工作表编号
+//     * @throws InvalidFormatException
+//     * @throws IOException
+//     */
+//    public ImportExcel(String fileName, int headerNum, int sheetIndex)
+//            throws InvalidFormatException, IOException {
+//        this(new File(fileName), headerNum, sheetIndex);
+//    }
+//
+//    /**
+//     * 构造函数
+//     * @param headerNum 标题行号,数据行号=标题行号+1
+//     * @param sheetIndex 工作表编号
+//     * @throws InvalidFormatException
+//     * @throws IOException
+//     */
+//    public ImportExcel(File file, int headerNum, int sheetIndex)
+//            throws InvalidFormatException, IOException {
+//        this(file.getName(), new FileInputStream(file), headerNum, sheetIndex);
+//    }
+//
+//    /**
+//     * 构造函数
+//     * @param headerNum 标题行号,数据行号=标题行号+1
+//     * @param sheetIndex 工作表编号
+//     * @throws InvalidFormatException
+//     * @throws IOException
+//     */
+//    public ImportExcel(MultipartFile multipartFile, int headerNum, int sheetIndex)
+//            throws InvalidFormatException, IOException {
+//        this(multipartFile.getOriginalFilename(), multipartFile.getInputStream(), headerNum, sheetIndex);
+//    }
+//
+//    /**
+//     * 构造函数
+//     * @param headerNum 标题行号,数据行号=标题行号+1
+//     * @param sheetIndex 工作表编号
+//     * @throws InvalidFormatException
+//     * @throws IOException
+//     */
+//    public ImportExcel(String fileName, InputStream is, int headerNum, int sheetIndex)
+//            throws InvalidFormatException, IOException {
+//        if (StringUtils.isBlank(fileName)){
+//            throw new RuntimeException("导入文档为空!");
+//        }else if(fileName.toLowerCase().endsWith("xls")){
+//            this.wb = new HSSFWorkbook(is);
+//        }else if(fileName.toLowerCase().endsWith("xlsx")){
+//            this.wb = new XSSFWorkbook(is);
+//        }else{
+//            throw new RuntimeException("文档格式不正确!");
+//        }
+//        if (this.wb.getNumberOfSheets()<sheetIndex){
+//            throw new RuntimeException("文档中没有工作表!");
+//        }
+//        this.sheet = this.wb.getSheetAt(sheetIndex);
+//        this.headerNum = headerNum;
+//        log.debug("Initialize success.");
+//    }
+//
+//    /**
+//     * 获取行对象
+//     * @param rownum
+//     * @return
+//     */
+//    public Row getRow(int rownum){
+//        return this.sheet.getRow(rownum);
+//    }
+//
+//    /**
+//     * 获取数据行号
+//     * @return
+//     */
+//    public int getDataRowNum(){
+//        return headerNum+1;
+//    }
+//
+//    /**
+//     * 获取最后一个数据行号
+//     * @return
+//     */
+//    public int getLastDataRowNum(){
+//        return this.sheet.getLastRowNum()+headerNum;
+//    }
+//
+//    /**
+//     * 获取最后一个列号
+//     * @return
+//     */
+//    public int getLastCellNum(){
+//        return this.getRow(headerNum).getLastCellNum();
+//    }
+//
+//    /**
+//     * 获取单元格值
+//     * @param row 获取的行
+//     * @param column 获取单元格列号
+//     * @return 单元格值
+//     */
+//    public Object getCellValue(Row row, int column){
+//        Object val = "";
+//        try{
+//            Cell cell = row.getCell(column);
+//            if (cell != null){
+//                if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC){
+//                    val = cell.getNumericCellValue();
+//                }else if (cell.getCellType() == Cell.CELL_TYPE_STRING){
+//                    val = cell.getStringCellValue();
+//                }else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA){
+//                    val = cell.getCellFormula();
+//                }else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN){
+//                    val = cell.getBooleanCellValue();
+//                }else if (cell.getCellType() == Cell.CELL_TYPE_ERROR){
+//                    val = cell.getErrorCellValue();
+//                }
+//            }
+//        }catch (Exception e) {
+//            return val;
+//        }
+//        return val;
+//    }
+//
+//    /**
+//     * 获取导入数据列表
+//     * @param cls 导入对象类型
+//     * @param groups 导入分组
+//     */
+//    public <E> List<E> getDataList(Class<E> cls, int... groups) throws InstantiationException, IllegalAccessException{
+//        List<Object[]> annotationList = Lists.newArrayList();
+//        // Get annotation field
+//        Field[] fs = cls.getDeclaredFields();
+//        for (Field f : fs){
+//            ExcelField ef = f.getAnnotation(ExcelField.class);
+//            if (ef != null && (ef.type()==0 || ef.type()==2)){
+//                if (groups!=null && groups.length>0){
+//                    boolean inGroup = false;
+//                    for (int g : groups){
+//                        if (inGroup){
+//                            break;
+//                        }
+//                        for (int efg : ef.groups()){
+//                            if (g == efg){
+//                                inGroup = true;
+//                                annotationList.add(new Object[]{ef, f});
+//                                break;
+//                            }
+//                        }
+//                    }
+//                }else{
+//                    annotationList.add(new Object[]{ef, f});
+//                }
+//            }
+//        }
+//        // Get annotation method
+//        Method[] ms = cls.getDeclaredMethods();
+//        for (Method m : ms){
+//            ExcelField ef = m.getAnnotation(ExcelField.class);
+//            if (ef != null && (ef.type()==0 || ef.type()==2)){
+//                if (groups!=null && groups.length>0){
+//                    boolean inGroup = false;
+//                    for (int g : groups){
+//                        if (inGroup){
+//                            break;
+//                        }
+//                        for (int efg : ef.groups()){
+//                            if (g == efg){
+//                                inGroup = true;
+//                                annotationList.add(new Object[]{ef, m});
+//                                break;
+//                            }
+//                        }
+//                    }
+//                }else{
+//                    annotationList.add(new Object[]{ef, m});
+//                }
+//            }
+//        }
+//        // Field sorting
+//        Collections.sort(annotationList, new Comparator<Object[]>() {
+//            public int compare(Object[] o1, Object[] o2) {
+//                return new Integer(((ExcelField)o1[0]).sort()).compareTo(
+//                        new Integer(((ExcelField)o2[0]).sort()));
+//            };
+//        });
+//        //log.debug("Import column count:"+annotationList.size());
+//        // Get excel data
+//        List<E> dataList = Lists.newArrayList();
+//        for (int i = this.getDataRowNum(); i < this.getLastDataRowNum(); i++) {
+//            E e = (E)cls.newInstance();
+//            int column = 0;
+//            Row row = this.getRow(i);
+//            StringBuilder sb = new StringBuilder();
+//            for (Object[] os : annotationList){
+//                Object val = this.getCellValue(row, column++);
+//                if (val != null){
+//                    ExcelField ef = (ExcelField)os[0];
+//                    // If is dict type, get dict value
+//                    if (StringUtils.isNotBlank(ef.dictType())){
+//                        val = DictUtils.getDictValue(val.toString(), ef.dictType(), "");
+//                        //log.debug("Dictionary type value: ["+i+","+colunm+"] " + val);
+//                    }
+//                    // Get param type and type cast
+//                    Class<?> valType = Class.class;
+//                    if (os[1] instanceof Field){
+//                        valType = ((Field)os[1]).getType();
+//                    }else if (os[1] instanceof Method){
+//                        Method method = ((Method)os[1]);
+//                        if ("get".equals(method.getName().substring(0, 3))){
+//                            valType = method.getReturnType();
+//                        }else if("set".equals(method.getName().substring(0, 3))){
+//                            valType = ((Method)os[1]).getParameterTypes()[0];
+//                        }
+//                    }
+//                    //log.debug("Import value type: ["+i+","+column+"] " + valType);
+//                    try {
+//                        if (valType == String.class){
+//                            String s = String.valueOf(val.toString());
+//                            if(StringUtils.endsWith(s, ".0")){
+//                                val = StringUtils.substringBefore(s, ".0");
+//                            }else{
+//                                val = String.valueOf(val.toString());
+//                            }
+//                        }else if (valType == Integer.class){
+//                            val = Double.valueOf(val.toString()).intValue();
+//                        }else if (valType == Long.class){
+//                            val = Double.valueOf(val.toString()).longValue();
+//                        }else if (valType == Double.class){
+//                            val = Double.valueOf(val.toString());
+//                        }else if (valType == Float.class){
+//                            val = Float.valueOf(val.toString());
+//                        }else if (valType == Date.class){
+//                            val = DateUtil.getJavaDate((Double)val);
+//                        }else{
+//                            if (ef.fieldType() != Class.class){
+//                                val = ef.fieldType().getMethod("getValue", String.class).invoke(null, val.toString());
+//                            }else{
+//                                val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(),
+//                                        "fieldtype."+valType.getSimpleName()+"Type")).getMethod("getValue", String.class).invoke(null, val.toString());
+//                            }
+//                        }
+//                    } catch (Exception ex) {
+//                        log.info("Get cell value ["+i+","+column+"] error: " + ex.toString());
+//                        val = null;
+//                    }
+//                    // set entity value
+//                    if (os[1] instanceof Field){
+//                        Reflections.invokeSetter(e, ((Field)os[1]).getName(), val);
+//                    }else if (os[1] instanceof Method){
+//                        String mthodName = ((Method)os[1]).getName();
+//                        if ("get".equals(mthodName.substring(0, 3))){
+//                            mthodName = "set"+StringUtils.substringAfter(mthodName, "get");
+//                        }
+//                        Reflections.invokeMethod(e, mthodName, new Class[] {valType}, new Object[] {val});
+//                    }
+//                }
+//                sb.append(val+", ");
+//            }
+//            dataList.add(e);
+//            log.debug("Read success: ["+i+"] "+sb.toString());
+//        }
+//        return dataList;
+//    }
+
+}

+ 44 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MD5Util.java

@@ -0,0 +1,44 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.shiro.crypto.hash.SimpleHash;
+import org.apache.shiro.util.ByteSource;
+
+/**
+ * MD5通用类
+ */
+public class MD5Util {
+    /**
+     * MD5方法
+     *
+     * @param text 明文
+     * @param key  密钥
+     * @return 密文
+     * @throws Exception
+     */
+    public static String md5(String text, String key) {
+        //加密后的字符串
+        return DigestUtils.md5Hex(text + key);
+    }
+
+    private static final String ALGORITH_NAME = "md5";
+    private static final int HASH_ITERATIONS = 2;
+    public static String encrypt(String username, String password) {
+        return new SimpleHash(ALGORITH_NAME, password, ByteSource.Util.bytes(username.toLowerCase() + password),
+                HASH_ITERATIONS).toHex();
+    }
+    /**
+     * MD5验证方法
+     *
+     * @param text 明文
+     * @param key  密钥
+     * @param md5  密文
+     * @return true/false
+     * @throws Exception
+     */
+    public static boolean verify(String text, String key, String md5) {
+        //根据传入的密钥进行验证
+        String md5Text = md5(text, key);
+        return md5Text.equalsIgnoreCase(md5);
+    }
+}

+ 245 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MatrixToImageWriter.java

@@ -0,0 +1,245 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.ObjectMetadata;
+import com.aliyun.oss.model.PutObjectRequest;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
+import com.yh.saas.plugin.yiliangyiyun.entity.LogoConfig;
+import lombok.Getter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.IOException;
+import java.awt.image.BufferedImage;
+import java.util.HashMap;
+import java.util.Map;
+
+public final class MatrixToImageWriter {
+
+
+    @Getter
+    @Value("${oss.endpoint.internal:}")
+    private String baseUrl;
+    @Getter
+    @Value("${oss.bucket.name:}")
+    private String bucket;
+    @Autowired
+    private OSSClient ossClient;
+    @Getter
+    @Value("${oss.endpoint.default:}")
+    private String endpoint;
+
+    private String host;
+
+    //    @Override
+    public void afterPropertiesSet() throws Exception {
+        host = "http://" + bucket + "." + endpoint;
+    }
+
+
+    private static final int BLACK = 0xFF000000;
+    private static final int WHITE = 0xFFFFFFFF;
+
+    private MatrixToImageWriter() {
+    }
+
+
+    public static BufferedImage toBufferedImage(BitMatrix matrix) {
+        int width = matrix.getWidth();
+        int height = matrix.getHeight();
+        BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+        for (int x = 0; x < width; x++) {
+            for (int y = 0; y < height; y++) {
+                image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
+            }
+        }
+        return image;
+    }
+
+
+    public static void writeToFile(BitMatrix matrix, String format, File file)
+            throws IOException {
+        BufferedImage image = toBufferedImage(matrix);
+        if (!ImageIO.write(image, format, file)) {
+            throw new IOException("Could not write an image of format " + format + " to " + file);
+        }
+    }
+
+
+    public static void writeToStream(BitMatrix matrix, String format, OutputStream stream)
+            throws IOException {
+        BufferedImage image = toBufferedImage(matrix);
+        if (!ImageIO.write(image, format, stream)) {
+            throw new IOException("Could not write an image of format " + format);
+        }
+    }
+
+
+    /**
+     * 给二维码图片添加Logo
+     *
+     * @param qrPic
+     * @param logoPic
+     */
+    public static void addLogo_QRCode(File qrPic, File logoPic, LogoConfig logoConfig) {
+        try {
+            if (!qrPic.isFile() || !logoPic.isFile()) {
+                System.out.print("file not find !");
+                System.exit(0);
+            }
+
+            /**
+             * 读取二维码图片,并构建绘图对象
+             */
+            BufferedImage image = ImageIO.read(qrPic);
+            Graphics2D g = image.createGraphics();
+
+            /**
+             * 读取Logo图片
+             */
+            BufferedImage logo = ImageIO.read(logoPic);
+
+            int widthLogo = image.getWidth() / logoConfig.getLogoPart();
+            //    int    heightLogo = image.getHeight()/logoConfig.getLogoPart();
+            int heightLogo = image.getWidth() / logoConfig.getLogoPart(); //保持二维码是正方形的
+
+            // 计算图片放置位置
+            int x = (image.getWidth() - widthLogo) / 2;
+            int y = (image.getHeight() - heightLogo) / 2;
+
+
+            //开始绘制图片
+            g.drawImage(logo, x, y, widthLogo, heightLogo, null);
+            g.drawRoundRect(x, y, widthLogo, heightLogo, 10, 10);
+            g.setStroke(new BasicStroke(logoConfig.getBorder()));
+            g.setColor(logoConfig.getBorderColor());
+            g.drawRect(x, y, widthLogo, heightLogo);
+
+            g.dispose();
+
+//            ImageIO.write(image, "jpeg", new File("D:/" + name + ".jpg"));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+//    /**
+//     * @param pressText 文字
+//     * @param newImg    带文字的图片
+//     * @param targetImg 需要添加文字的图片
+//     * @param fontStyle
+//     * @param color
+//     * @param fontSize
+//     * @param width
+//     * @为图片添加文字
+//     */
+//    public static void pressText(String pressText, String newImg, String targetImg, int fontStyle, Color color, int fontSize, int width, int height) {
+//
+//        //计算文字开始的位置
+//        //x开始的位置:(图片宽度-字体大小*字的个数)/2
+//        int startX = (width-(fontSize*pressText.length()))/2;
+//        //y开始的位置:图片高度-(图片高度-图片宽度)/2
+//        int startY = height-(height-width)/2;
+//
+//        try {
+//            File file = new File(targetImg);
+//            Image src = ImageIO.read(file);
+//            int imageW = src.getWidth(null);
+//            int imageH = src.getHeight(null);
+//            BufferedImage image = new BufferedImage(imageW, imageH, BufferedImage.TYPE_INT_RGB);
+//            Graphics g = image.createGraphics();
+//            g.drawImage(src, 0, 0, imageW, imageH, null);
+//            g.setColor(color);
+//            g.setFont(new Font(null, fontStyle, fontSize));
+//            g.drawString(pressText, startX, startY);
+//            g.dispose();
+//
+//            FileOutputStream out = new FileOutputStream(newImg);
+//            ImageIO.write(image, "JPEG", out);
+//            JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
+//            encoder.encode(image);
+//            out.close();
+//            System.out.println("image press success");
+//        } catch (Exception e) {
+//            System.out.println(e);
+//        }
+//    }
+    public String logoWriter(String content, String type, String name) {
+        try {
+            //二维码表示的内容
+//            String content = "http://www.cnblogs.com/";
+
+            //存放logo的文件夹
+            String path = "D:/QRCodeImage";
+
+            MultiFormatWriter multiFormatWriter = new MultiFormatWriter();
+
+            @SuppressWarnings("rawtypes")
+            Map hints = new HashMap();
+
+            //设置UTF-8, 防止中文乱码
+            hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
+            //设置二维码四周白色区域的大小
+            hints.put(EncodeHintType.MARGIN, 1);
+            //设置二维码的容错性
+            hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
+
+            //width:图片完整的宽;height:图片完整的高
+            //因为要在二维码下方附上文字,所以把图片设置为长方形(高大于宽)
+            int width = 100;
+            int height = 100;
+
+            //画二维码,记得调用multiFormatWriter.encode()时最后要带上hints参数,不然上面设置无效
+            BitMatrix bitMatrix = multiFormatWriter.encode(content, BarcodeFormat.QR_CODE, width, height, hints);
+
+            //qrcFile用来存放生成的二维码图片(无logo,无文字)
+            File qrcFile = new File(path, name + "123.jpg");
+            //logoFile用来存放带有logo的二维码图片(二维码+logo,无文字)
+            File logoFile = new File(path, "DSC_7907.jpg");
+
+            //开始画二维码
+            MatrixToImageWriter.writeToFile(bitMatrix, "jpg", qrcFile);
+
+            //在二维码中加入图片
+            LogoConfig logoConfig = new LogoConfig(); //LogoConfig中设置Logo的属性
+//            addLogo_QRCode(qrcFile, logoFile, logoConfig, name);
+//            MultipartFile multipartFile = new MockMultipartFile( ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
+//            String result = QRCodeUtil.upload(multipartFile,name);
+//            file.delete();
+//            return result;
+            return "success";
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            return "error";
+        }
+    }
+
+    /**
+     * 后台通过服务器间接传文件
+     *
+     * @param file
+     * @return
+     * @throws IOException
+     */
+    public String upload(MultipartFile file, String sendCarNo) throws IOException {
+        ObjectMetadata objectMetadata = new ObjectMetadata();
+        objectMetadata.setContentLength(file.getSize());
+        objectMetadata.setContentType(file.getContentType());
+        PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, "QRCode/" + sendCarNo + ".png", file.getInputStream(), objectMetadata);
+        ossClient.putObject(putObjectRequest);
+        return baseUrl + "QRCode/" + sendCarNo + ".png";
+    }
+
+
+}

+ 45 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MockSMSClient.java

@@ -0,0 +1,45 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Created with IntelliJ IDEA.
+ * Description:
+ * User: rize
+ * Date: 2019/11/17
+ * Time: 15:50
+ */
+public class MockSMSClient implements SMSClientYlyy {
+
+    private static Logger logger = LoggerFactory.getLogger(MockSMSClient.class);
+
+    @Override
+    public SMSResult sendRegisterVerify(String phone, String verifyCode) throws ServiceException {
+        return send(phone, verifyCode);
+    }
+
+    @Override
+    public SMSResult sendBindPhoneVerify(String phone, String verifyCode) throws ServiceException {
+        return send(phone, verifyCode);
+    }
+
+    @Override
+    public SMSResult sendResetPasswordVerify(String phone, String verifyCode) throws ServiceException {
+        return send(phone, verifyCode);
+    }
+
+    @Override
+    public SMSResult sendAdminLoginVerify(String phone, String verifyCode) throws ServiceException {
+        return send(phone, verifyCode);
+    }
+
+    public SMSResult send(String phone, String verifyCode) {
+        logger.info("[模拟短信发送] phone=" + phone + "; verifyCode=" + verifyCode);
+        SMSResult smsResult = new SMSResult();
+        smsResult.setSucc(true);
+        smsResult.setMsg("OK");
+        return smsResult;
+    }
+}

+ 104 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/QRCodeUtil.java

@@ -0,0 +1,104 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.ObjectMetadata;
+import com.aliyun.oss.model.PutObjectRequest;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.WriterException;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.QRCodeWriter;
+import lombok.Getter;
+import org.apache.http.entity.ContentType;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.mock.web.MockMultipartFile;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.util.Hashtable;
+/**
+ * @Author:chengchangjiang
+ * @Description: 二维码Util类
+ * @Date:Created in 9:38 2021-09-03
+ */
+@Component
+public class QRCodeUtil implements InitializingBean {
+    @Getter
+    @Value("${oss.endpoint.internal:}")
+    private String baseUrl;
+    @Getter
+    @Value("${oss.bucket.name:}")
+    private String bucket;
+    @Autowired
+    private OSSClient ossClient;
+    @Getter
+    @Value("${oss.endpoint.default:}")
+    private String endpoint;
+
+    private String host;
+    @Override
+    public void afterPropertiesSet() throws Exception {
+        host = "http://" + bucket + "." + endpoint;
+    }
+
+    /***
+     * 生成二维码图片并上传OSS
+     * @param text 二维码内容
+     * @param width 宽度
+     * @param height 高度
+     * @param type 类型
+     * @param name 图片名字
+     * @return
+     */
+    public  String generateQRCodeImage(String text, int width, int height,String type,String name){
+        try {
+            QRCodeWriter qrCodeWriter = new QRCodeWriter();
+            Hashtable<EncodeHintType, Object> hints = new Hashtable();
+            hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
+            BitMatrix bitMatrix = qrCodeWriter.encode(type+","+text, BarcodeFormat.QR_CODE, width, height,hints);
+
+            File file = new File( new String(("templates" + File.separator + name+".png").getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8));
+            if(!file.exists()){
+                boolean flag = file.mkdirs();
+            }
+            Path path = FileSystems.getDefault().getPath(file.getAbsoluteFile().getPath());
+
+            MatrixToImageWriter.writeToPath(bitMatrix, "PNG", path);
+
+            FileInputStream fileInputStream = new FileInputStream(file.getAbsoluteFile());
+
+            MultipartFile multipartFile = new MockMultipartFile( ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
+            String result = upload(multipartFile,name);
+            file.delete();
+            return result;
+        }
+        catch (Exception e){
+            System.out.println("二维码异常:"+e.toString());
+            return "error";
+        }
+    }
+    /**
+     * 后台通过服务器间接传文件
+     * @param file
+     * @return
+     * @throws IOException
+     */
+    public  String upload(MultipartFile file,String sendCarNo) throws IOException {
+        ObjectMetadata objectMetadata = new ObjectMetadata();
+        objectMetadata.setContentLength(file.getSize());
+        objectMetadata.setContentType(file.getContentType());
+        PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, "QRCode/" +sendCarNo+".png", file.getInputStream(), objectMetadata);
+        ossClient.putObject(putObjectRequest);
+        return baseUrl + "QRCode/" + sendCarNo+".png";
+    }
+}

+ 19 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/SMSClientYlyy.java

@@ -0,0 +1,19 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+
+/**
+ * Created by rize on 2019/7/1.
+ */
+public interface SMSClientYlyy {
+
+    SMSResult sendRegisterVerify(String phone, String verifyCode) throws ServiceException;
+
+    SMSResult sendBindPhoneVerify(String phone, String verifyCode) throws ServiceException;
+
+    SMSResult sendResetPasswordVerify(String phone, String verifyCode) throws ServiceException;
+
+    SMSResult sendAdminLoginVerify(String phone, String verifyCode) throws ServiceException, ServiceException;
+
+
+}

+ 15 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/SMSResult.java

@@ -0,0 +1,15 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import lombok.Data;
+
+/**
+ * Created by rize on 2019/7/1.
+ */
+@Data
+public class SMSResult {
+
+    private boolean succ;
+
+    private String msg;
+
+}

+ 124 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/WebSocket.java

@@ -0,0 +1,124 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+//import com.iotechn.unimall.data.domain.AdminDO;
+//import com.iotechn.unimall.data.domain.MessageDO;
+//import com.iotechn.unimall.data.domain.RoleDO;
+//import com.iotechn.unimall.data.mapper.AdminMapper;
+//import com.iotechn.unimall.data.mapper.RoleMapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.UnimallMessage;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import javax.websocket.OnClose;
+import javax.websocket.OnMessage;
+import javax.websocket.OnOpen;
+import javax.websocket.Session;
+import javax.websocket.server.PathParam;
+import javax.websocket.server.ServerEndpoint;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+@Component
+@ServerEndpoint("/websocket/{staffId}")
+@Service
+//此注解相当于设置访问URL
+public class WebSocket {
+
+    private Session session;
+    private static CopyOnWriteArraySet<WebSocket> webSockets = new CopyOnWriteArraySet<>();
+    private static Map<String, Session> sessionPool = new HashMap<String, Session>();
+
+//    private static RoleMapper  roleMapper;
+//    private static AdminMapper  adminMapper;
+
+//    @Autowired
+//    public void setRoleService(RoleMapper  roleMapper) {
+//        com.iotechn.unimall.admin.config.WebSocket.roleMapper= roleMapper;
+//    }
+//
+//    @Autowired
+//    public void setAdminService(AdminMapper  adminMapper) {
+//        com.iotechn.unimall.admin.config.WebSocket.adminMapper= adminMapper;
+//    }
+
+    @OnOpen
+    public void onOpen(Session session, @PathParam(value="staffId")String adminId) {
+        this.session = session;
+        webSockets.add(this);
+        sessionPool.put(adminId, session);
+        System.out.println("adminId = " + adminId + "【websocket消息】有新的连接,总数为:" + webSockets.size());
+    }
+
+    @OnClose
+    public void onClose() {
+        webSockets.remove(this);
+        System.out.println("【websocket消息】连接断开,总数为:" + webSockets.size());
+    }
+
+    @OnMessage
+    public void onMessage(String message) {
+        System.out.println("【websocket消息】收到客户端消息:" + message);
+    }
+
+    // 此为广播消息
+    public void sendAllMessage(UnimallMessage messageDO) {
+        for (WebSocket webSocket : webSockets) {
+            System.out.println("【websocket消息】广播消息:" + messageDO.getCustomer() + messageDO.getOperation() + messageDO.getResult() + "$" + messageDO.getPath());
+            try {
+                webSocket.session.getAsyncRemote().sendText(messageDO.getCustomer() + messageDO.getOperation() + messageDO.getResult() + "$" + messageDO.getPath());
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    // 此为单点消息
+    public void sendOneMessage(UnimallMessage messageDO) {
+//        sendAllMessage(messageDO);
+        System.out.println("【websocket消息 : " + messageDO.getAdminId() + "】单点消息:" + messageDO.getCustomer() + messageDO.getOperation() + messageDO.getResult() + "$" + messageDO.getPath());
+        Session session = sessionPool.get(messageDO.getAdminId() + "");
+        if (session != null) {
+            try {
+//                session.getAsyncRemote().sendObject(messageDO);
+//                session.getBasicRemote().sendObject(messageDO);
+                session.getAsyncRemote().sendText(messageDO.getCustomer() + messageDO.getOperation() + messageDO.getResult() + "$" + messageDO.getPath());
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        } else {
+            System.out.println("【websocket消息 session is null ");
+        }
+    }
+
+    // 根据角色发送消息
+//    public  void sendMessageByRole(UnimallMessage messageDO ,String role ,Long companyId){
+//        // 根据role 获取roleId
+//        List<RoleDO> roleDOs = roleMapper.selectList(new EntityWrapper<RoleDO>().like("name","%"+role+"%").eq("company_id",companyId));
+//        if(!CollectionUtils.isEmpty(roleDOs)){
+//            RoleDO roleDO = roleDOs.get(0);
+//            // 根据roleID  查询adminid
+//            List<AdminDO> adminDOList = adminMapper.selectList(new EntityWrapper<AdminDO>().eq("company_id",companyId).like("role_ids","%"+roleDO.getId()+"%"));
+//            if(!CollectionUtils.isEmpty(adminDOList)){
+//                adminDOList.forEach(adminDO -> {
+//                    System.out.println("【websocket消息 : "+adminDO.getId()+"】单点消息:"+messageDO.getCustomer()+messageDO.getOperation()+messageDO.getResult()+"$"+messageDO.getPath());
+//                    Session session = sessionPool.get(adminDO.getId()+"");
+//                    if (session != null) {
+//                        try {
+//                            session.getAsyncRemote().sendText(messageDO.getCustomer()+messageDO.getOperation()+messageDO.getResult()+"$"+messageDO.getPath());
+//                        } catch (Exception e) {
+//                            e.printStackTrace();
+//                        }
+//                    }
+//                    else{
+//                        System.out.println("【websocket消息 session is null ");
+//                    }
+//                });
+//
+//
+//            }
+//        }
+//    }
+
+}

+ 18 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/WebSocketConfig.java

@@ -0,0 +1,18 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.socket.server.standard.ServerEndpointExporter;
+
+@Configuration
+public class WebSocketConfig {
+    /**
+     * 注入ServerEndpointExporter,
+     * 这个bean会自动注册使用了@ServerEndpoint注解声明的Websocket endpoint
+     */
+    @Bean
+    public ServerEndpointExporter serverEndpointExporter() {
+        return new ServerEndpointExporter();
+    }
+
+}

二進制
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/logo.png


+ 40 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/AcquisitionInfoMapper.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.AcquisitionInfoMapper">
+    <!-- 获得收购信息列表 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.AcquisitionInfo">
+        SELECT
+        a.id,
+        a.comp_id as compId,
+        a.warehouse_name as warehouseName,
+        a.acquisition_information as acquisitionInformation,
+        a.check_flag as checkFlag,
+        a.follow_flag as followFlag,
+        a.status_flag as statusFlag,
+        a.create_date as createDate,
+        a.update_date as updateDate,
+        a.status,
+        case when f.id is null then '未关注' else '已关注' end as follow,
+        w.id as warehouseId,
+        w.warehouse_private as warehousePrivate,
+        w.warehouse_city as warehouseCity,
+        w.warehouse_area as warehouseArea,
+        w.detailed_address as detailedAddress
+        FROM acquisition_info a
+        LEFT JOIN focus_acquisition_information f on f.info_id=a.id and f.delete_flag = '0' and f.phone=#{phone}
+        LEFT JOIN warehouse_base_info w on w.comp_id=a.comp_id and w.warehouse_name=a.warehouse_name and w.delete_flag = '0'
+        WHERE
+        a.delete_flag = '0'
+        AND a.check_flag = '1'
+        AND a.status_flag = '9'
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND lower(a.warehouse_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+        </if>
+        <if test="city != null and city != ''">
+            AND lower(w.warehouse_city) like lower(CONCAT('%',#{city},'%'))
+        </if>
+        GROUP BY a.id
+        ORDER BY FIELD(follow,'已关注','未关注') ASC,a.update_date DESC,a.check_flag DESC
+    </select>
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/AppVersionMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.AppVersionMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CollectionCompanyMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CollectionCompanyMapper">
+
+</mapper>

+ 69 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CollectionManagementMapper.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CollectionManagementMapper">
+    <!-- 获得收款信息总数 -->
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT
+        COUNT(id)
+        FROM collection_management
+        WHERE
+        comp_id = #{compId}
+        and delete_flag = '0'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND status_flag = '1'
+            </if>
+            <if test="searchType == 2">
+                AND status_flag = '3'
+            </if>
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(buyer) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+    </select>
+    <!-- 收款列表查询 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.CollectionManagement">
+        SELECT
+        id,
+        contract_no as contractNo,
+        goods_name as goodsName,
+        buyer,
+        seller,
+        plan_id as planId,
+        collection_ing_payable as collectionIngPayable,
+        loan,
+        freight,
+        storage_fee as storageFee,
+        interest,
+        address_url as addressUrl,
+        collection_ed_payable as collectionEdPayable,
+        collection_not_payable as collectionNotPayable,
+        out_weight as outWeight,
+        status,
+        not_invoice as notInvoice,
+        already_invoice as alreadyInvoice,
+        update_date as updateDate
+        FROM collection_management
+        WHERE
+        comp_id = #{compId}
+        and delete_flag = '0'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND status_flag = '1'
+            </if>
+            <if test="searchType == 2">
+                AND status_flag = '3'
+            </if>
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(buyer) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        ORDER BY update_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
+</mapper>

+ 174 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CollectionWarehousingRecordMapper.xml

@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CollectionWarehousingRecordMapper">
+    <!-- 获得销售出库统计总数 -->
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT
+        COUNT(id)
+        FROM collection_warehousing_record
+        WHERE
+        delete_flag = '0'
+        AND comp_id = #{compId}
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND amount_ed_payable = 0
+            </if>
+            <if test="searchType == 3">
+                AND amount_ed_payable >0
+            </if>
+            <if test="searchType == 4">
+                AND amount_ed_collectionable=0
+            </if>
+            <if test="searchType == 5">
+                AND amount_ed_collectionable>0
+            </if>
+            <if test="searchType == 6">
+                AND invoicing='0'
+            </if>
+            <if test="searchType == 7">
+                AND invoicing_sale='0'
+            </if>
+        </if>
+        <if test="contractNo != null and contractNo != ''and contractNo != '全部合同'">
+            AND contract_no = #{contractNo}
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(customer_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(car_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+           )
+        </if>
+        <if test="businessKeys != null and businessKeys.size > 0">
+            and(
+            <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
+                id = #{businessValue}
+            </foreach>
+            )
+        </if>
+        <if test="statusSet != null and statusSet.size > 0">
+            or (
+            <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">
+                status_flag =
+                <if test="statusId != null">
+                    #{statusId}
+                </if>
+            </foreach>
+            )
+        </if>
+    </select>
+    <!-- 获得销售出库统计列表 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.CollectionWarehousingRecord">
+        SELECT
+        c.id,
+        c.comp_id as compId,
+        c.identity_id as identityId,
+        c.payment_no as paymentNo,
+        c.goods_name as goodsName,
+        c.car_no as carNo,
+        c.relation_id as relationId,
+        c.customer_number_card as customerNumberCard,
+        c.type,
+        c.in_date as inDate,
+        c.contract_no as contractNo,
+        c.net_weight as netWeight,
+        c.invoicing_sale as invoicingSale,
+        c.unit_deduction as unitDeduction,
+        c.unit_have as unithave,
+        c.amount_ing_payable as amountIngPayable,
+        c.amount_ed_payable as amountEdPayable,
+        c.amount_not_payable as amountNotPayable,
+        c.payment_screenshot as paymentScreenshot,
+        c.collection_screenshot as collectionScreenshot,
+        c.amount_ed_collectionable as amountEdCollectionable,
+        c.amount_not_collectable as amountNotCollectable,
+        c.customer_name as customerName,
+        c.customer_phone as customerPhone,
+        c.collection_date as collectionDate,
+        c.status,
+        c.picture_address as pictureAddress,
+        c.approve_status as approveStatus,
+        c.status_flag as statusFlag,
+        c.update_date as updateDate,
+        c.workflow_id as workflowId,
+        c.create_date as createDate,
+        c.invoicing,
+        c.grade,
+        (SELECT IFNULL(sum(case when p.type ='潮粮' then p.pure_weight else p.net_weight end),0)
+        FROM payment_management p
+        WHERE p.delete_flag = '0'
+        AND p.customer_number_card = c.customer_number_card
+        AND p.goods_name =c.goods_name
+        AND (DATE_FORMAT(p.create_date,"%Y%m%d") >=
+        DATE_FORMAT(#{year},"%Y%m%d"))
+        AND p.comp_id = c.comp_id) as num
+        FROM collection_warehousing_record c
+        WHERE
+        c.delete_flag = '0'
+        AND c.comp_id = #{compId}
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND c.amount_ed_payable = 0
+            </if>
+            <if test="searchType == 3">
+                AND c.amount_ed_payable >0
+            </if>
+            <if test="searchType == 4">
+                AND c.amount_ed_collectionable=0
+            </if>
+            <if test="searchType == 5">
+                AND c.amount_ed_collectionable>0
+            </if>
+            <if test="searchType == 6">
+                AND c.invoicing='0'
+            </if>
+            <if test="searchType == 7">
+                AND c.invoicing_sale='0'
+            </if>
+        </if>
+        <if test="contractNo != null and contractNo != ''and contractNo != '全部合同'">
+            AND c.contract_no = #{contractNo}
+        </if>
+        <if test="startDate != null">
+            AND (DATE_FORMAT(c.create_date,"%Y%m%d") &gt;=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null">
+            AND (DATE_FORMAT(c.create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(c.customer_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.car_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            )
+        </if>
+        <if test="businessKeys != null and businessKeys.size > 0">
+            and(
+            <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
+                c.id = #{businessValue}
+            </foreach>
+            )
+        </if>
+        <if test="statusSet != null and statusSet.size > 0">
+            or (
+            <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">
+                c.status_flag =
+                <if test="statusId != null">
+                    #{statusId}
+                </if>
+            </foreach>
+            )
+        </if>
+        ORDER BY c.update_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonCompanyIdentityMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CommonCompanyIdentityMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonConstantFalseMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CommonConstantFalseMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonSysParameterMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CommonSysParameterMapper">
+
+</mapper>

+ 104 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonUserMapper.xml

@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper">
+    <select id="login" resultType="com.yh.saas.plugin.yiliangyiyun.entity.CommonUser">
+        SELECT
+            id,
+            phone,
+            access_token as accessToken,
+            liangxin_id as liangxinId,
+            user_name as userName,
+            avatar_url AS avatarUrl,
+            status
+        FROM
+            common_user
+        WHERE
+            phone = #{phone} AND `password` = #{cryptPassword}
+            and
+            delete_flag ='0'
+    </select>
+
+
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        	SELECT
+	          count(id)
+             FROM
+             	notice_task_info
+             WHERE
+             	delete_flag = '1'
+             AND ( notice_task_status IN ( 'TO_BE_PROCESSED', 'RETURN' ) )
+             	AND (
+             	1 = 1
+             	AND ( notice_task_info.accept_type = "All" )
+             	OR (
+             	notice_task_info.accept_id IN ( #{userId} )
+             	AND notice_task_info.accept_type = "STAFF"
+             	AND 1 = 1
+             	)
+             	OR (
+             	notice_task_info.accept_id IN ( #{roleId})
+             	AND notice_task_info.accept_type = "ROLE"
+             	AND 1 = 1
+             	)
+             	AND delete_flag = '1'
+             	)
+          </select>
+
+
+
+
+	<select id="getListByCondition" parameterType="Map"
+			resultType="com.winsea.svc.notice.entity.NoticeTaskInfo">
+		SELECT
+		a.id AS id,
+		a.notice_task_status AS noticeTaskStatus,
+		a.business_type AS businessType,
+		a.comp_id AS compId,
+		a.overdue_date AS overdueDate,
+		a.overdue_date_flag AS overdueDateFlag,
+		a.notice_task_push_status AS noticeTaskPushStatus,
+		a.business_id AS businessId,
+		a.business_code AS businessCode,
+		b.business_type_desc AS messageTitle,
+		a.message_content AS messageContent,
+		a.accept_id AS acceptId,
+		a.accept_type AS acceptType,
+		a.vessel_id AS vesselId,
+		a.create_date AS createDate,
+		a.create_user_id AS createUserId,
+		a.update_date AS updateDate,
+		a.update_user_id AS updateUserId,
+		a.update_flag AS updateFlag,
+		a.delete_flag AS deleteFlag
+		FROM
+		notice_task_info a
+		left join notice_business_constant_info b
+		on b.business_code = a.business_code
+		WHERE
+		a.delete_flag = '1'
+		AND ( a.notice_task_status IN ( 'TO_BE_PROCESSED', 'RETURN' ) )
+		AND (
+		1 = 1
+		AND ( a.accept_type = "All" )
+		OR (
+		a.accept_id IN ( #{userId} )
+		AND a.accept_type = "STAFF"
+		AND 1 = 1
+		)
+		OR (
+		a.accept_id IN ( #{roleId})
+		AND a.accept_type = "ROLE"
+		AND 1 = 1
+		)
+		AND a.delete_flag = '1'
+		)
+		GROUP BY
+		a.business_id,
+		a.business_code
+		ORDER BY
+		a.create_date DESC
+		<if test="currentPage != null and currentPage != ''">
+			LIMIT ${startRecord}, ${pageSize}
+		</if>
+	</select>
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.DriverCarInfoMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.DriverInfoMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverPayeeInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.DriverPayeeInfoMapper">
+
+</mapper>