ccj hace 1 año
padre
commit
b9dfeb974b

+ 5 - 5
winsea-haixin-platform-backend/src/main/resources/application-dev.yml

@@ -34,8 +34,8 @@ client:
   sync:
     address: http://114.115.215.70:85/webservice/ClientUpdateService?wsdl
 file:
-  path: E://alpha//winsea//file//
-file-root-path: E://file//crew/
+  path: D://alpha//winsea//file//
+file-root-path: D://file//crew/
 front-origin: 192.168.1.162:9527
 jasypt:
   encryptor:
@@ -44,7 +44,7 @@ jasypt:
 logging:
   level:
     root: INFO
-  path: E:/winsea_platform6.0/logs
+  path: D:/winsea_platform6.0/logs
 oss:
   access:
     key:
@@ -57,7 +57,7 @@ oss:
     internal: https://warehouse-erp-zhaoliang.oss-cn-zhangjiakou.aliyuncs.com/
 po:
   password: CA1XB-MF7Y-12ST-PSBP2
-  syspath: E://officeTest//
+  syspath: D://officeTest//
 purchase:
   webservice:
     address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
@@ -68,7 +68,7 @@ servicer:
       address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
 
 system:
-  temp-file-path: E://file//
+  temp-file-path: D://file//
   prod-temp-file-path: /opt/winsea/temp/platform/
   department-deck: efc79c703d6c4a8dafb88b5e60192e82
 

+ 5 - 5
winsea-haixin-platform-backend/src/main/resources/application-local.yml

@@ -34,8 +34,8 @@ client:
   sync:
     address: http://114.115.215.70:85/webservice/ClientUpdateService?wsdl
 file:
-  path: E://alpha//winsea//file//
-file-root-path: E://file//crew/
+  path: D://alpha//winsea//file//
+file-root-path: D://file//crew/
 front-origin: 192.168.1.162:9527
 jasypt:
   encryptor:
@@ -44,7 +44,7 @@ jasypt:
 logging:
   level:
     root: INFO
-  path: E:/winsea_platform6.0/logs
+  path: D:/winsea_platform6.0/logs
 oss:
   access:
     key:
@@ -57,7 +57,7 @@ oss:
     internal: https://warehouse-erp-zhaoliang.oss-cn-zhangjiakou.aliyuncs.com/
 po:
   password: CA1XB-MF7Y-12ST-PSBP2
-  syspath: E://officeTest//
+  syspath: D://officeTest//
 purchase:
   webservice:
     address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
@@ -68,7 +68,7 @@ servicer:
       address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
 
 system:
-  temp-file-path: E://file//
+  temp-file-path: D://file//
   prod-temp-file-path: /opt/winsea/temp/platform/
   department-deck: efc79c703d6c4a8dafb88b5e60192e82
 

+ 5 - 5
winsea-haixin-platform-backend/src/main/resources/application-prod.yml

@@ -34,8 +34,8 @@ client:
   sync:
     address: http://114.115.215.70:85/webservice/ClientUpdateService?wsdl
 file:
-  path: E://alpha//winsea//file//
-file-root-path: E://file//crew/
+  path: D://alpha//winsea//file//
+file-root-path: D://file//crew/
 front-origin: 192.168.1.162:9527
 jasypt:
   encryptor:
@@ -44,7 +44,7 @@ jasypt:
 logging:
   level:
     root: INFO
-  path: E:/winsea_platform6.0/logs
+  path: D:/winsea_platform6.0/logs
 oss:
   access:
     key:
@@ -57,7 +57,7 @@ oss:
     internal: https://warehouse-erp-zhaoliang.oss-cn-zhangjiakou.aliyuncs.com/
 po:
   password: CA1XB-MF7Y-12ST-PSBP2
-  syspath: E://officeTest//
+  syspath: D://officeTest//
 purchase:
   webservice:
     address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
@@ -68,7 +68,7 @@ servicer:
       address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
 
 system:
-  temp-file-path: E://file//
+  temp-file-path: D://file//
   prod-temp-file-path: /opt/winsea/temp/platform/
   department-deck: efc79c703d6c4a8dafb88b5e60192e82
 

+ 5 - 5
winsea-haixin-platform-backend/src/main/resources/application-test.yml

@@ -34,8 +34,8 @@ client:
   sync:
     address: http://114.115.215.70:85/webservice/ClientUpdateService?wsdl
 file:
-  path: E://alpha//winsea//file//
-file-root-path: E://file//crew/
+  path: D://alpha//winsea//file//
+file-root-path: D://file//crew/
 front-origin: 192.168.1.162:9527
 jasypt:
   encryptor:
@@ -44,7 +44,7 @@ jasypt:
 logging:
   level:
     root: INFO
-  path: E:/winsea_platform6.0/logs
+  path: D:/winsea_platform6.0/logs
 oss:
   access:
     key:
@@ -57,7 +57,7 @@ oss:
     internal: https://warehouse-erp-zhaoliang.oss-cn-zhangjiakou.aliyuncs.com/
 po:
   password: CA1XB-MF7Y-12ST-PSBP2
-  syspath: E://officeTest//
+  syspath: D://officeTest//
 purchase:
   webservice:
     address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
@@ -68,7 +68,7 @@ servicer:
       address: http://114.115.215.70:8018/webservice/QuoteServerService?wsdl
 
 system:
-  temp-file-path: E://file//
+  temp-file-path: D://file//
   prod-temp-file-path: /opt/winsea/temp/platform/
   department-deck: efc79c703d6c4a8dafb88b5e60192e82
 

+ 2 - 2
winsea-haixin-platform-backend/src/main/resources/application.yml

@@ -12,7 +12,7 @@ spring:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8
   profiles:
-    active: local
+    active: prod
   resources:
     static-locations: file:///winsea/static/
   thymeleaf:
@@ -25,7 +25,7 @@ spring:
 #运行环境 1.开发环境 2.测试环境 3.生产环境
 com:
   yiliangyiyun:
-    env: 2
+    env: 3
 
 auth:
   anon-methods:

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HttpServletlx.java

@@ -145,12 +145,12 @@ public class HttpServletlx extends HttpServlet {
 						
 						System.out.println(tmp);
 						if (a==0){
-	                        m_savetxt.m_fwrite(buf,"E:/newfile.txt");
+	                        m_savetxt.m_fwrite(buf,"D:/newfile.txt");
 	                        show_json(new String(buf));  //对接口接收数据做处理
 	                        a+=1;
 	                    }
 	                    else{
-	                        m_savetxt.m_fwrite(buf,"E:/newfile1.txt");
+	                        m_savetxt.m_fwrite(buf,"D:/newfile1.txt");
 	                        a=0;
 	                    }
 					}

+ 31 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/WarehouseBaseInfoController.java

@@ -1,6 +1,7 @@
 package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.winsea.svc.base.security.util.AuthSecurityUtils;
 import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
@@ -11,11 +12,23 @@ import com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseNumView;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseView;
 import com.yh.saas.plugin.yiliangyiyun.mapper.WarehousePositionStorageInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseBaseInfoService;
+import com.yh.saas.plugin.yiliangyiyun.util.Const;
 import org.apache.commons.collections.CollectionUtils;
+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.HttpGet;
+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 org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -43,7 +56,24 @@ public class WarehouseBaseInfoController {
     public String addWarehouse(@RequestBody WarehouseBaseInfo warehouseBaseInfo) {
         return warehouseBaseInfoService.addWarehouse(warehouseBaseInfo);
     }
-
+    /**
+     * 添加仓库
+     */
+    @GetMapping("/api/getToken")
+    public String getToken() throws IOException {
+        HttpGet httpGet = new HttpGet("https://bi.zhaoliangsz.com:9230/ccm-api/v1/videos/account");
+
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        HttpResponse response = httpClient.execute(httpGet);
+        HttpEntity entity = response.getEntity();
+        String body = EntityUtils.toString(entity, "utf-8");
+        JSONObject jsonObject = JSONObject.parseObject(body);
+        JSONObject res = jsonObject.getJSONObject("data");
+        if(res!=null){
+            return res.getString("token");
+        }
+        return "";
+    }
     /**
      * 添加临时仓库
      *

+ 4 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -527,7 +527,10 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
                 CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
                         .eq("comp_id", account1.getCompId())
                         .eq("delete_flag", "0"));
-                compList.add(commonCompany.getCompName());
+                if(commonCompany != null){
+                    compList.add(commonCompany.getCompName());
+                }
+
             }
         }
         return compList;

+ 3 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/IdentityAuthenticationInfoServiceImpl.java

@@ -49,7 +49,8 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
     private IPaymentManagementService paymentManagementService;
     @Autowired
     private IShippingInformationService shippingInformationService;
-
+    @Value("${com.yiliangyiyun.env}")
+    private String ENV;
     /**
      * 粮商认证列表
      *
@@ -147,7 +148,7 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
         // 银联三要素验证
         Map<String,String> stringMap = EntityAnalyse.checkPerson(identityAuthenticationInfo.getPayeeNumberCard(),identityAuthenticationInfo.getPayeeName(),identityAuthenticationInfo.getBankCard());
 
-        if(!"01".equals(String.valueOf(stringMap.get("status")))){
+        if("3".equals(ENV)&&!"01".equals(String.valueOf(stringMap.get("status")))){
             throw new AppServiceException(ExceptionDefinition.CHECK_SQL_UPDATE_FAILED);
         }
 

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -841,7 +841,7 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         if (listRedis != null && listRedis.size() > 0) {
             return listRedis;
         }
-        //查所有合同编号
+        //查所有合同编号0
         if (flag == null) {
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
                     .eq("comp_id", compId)