Преглед изворни кода

Merge remote-tracking branch 'origin/dev' into dev

dingyl пре 7 година
родитељ
комит
00833eac8f

+ 3 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -353,7 +353,9 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
         map.put("custuu", companyDTO.getUu());
         map.put("apcheck", 1);
         Map<String, String> params = new HashMap<String, String>();
-        params.put("data", JsonUtils.toJsonString(map));
+        List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
+        data.add(map);
+        params.put("data", JsonUtils.toJsonString(data));
         Response response = HttpUtil.sendPostRequest(b2bUrl + "/erp/vendor/apcheck?access_id=" + companyDTO.getUu(), params, true, companyDTO.getAccessKey());
         if (response.getStatusCode() == 200){
             LOGGER.info("供应商UU={},启用B2B对账成功!", ve_uu);

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -100,7 +100,7 @@
         pr_whname, pr_zxbzs, pr_leadtime, pr_brand, pr_standardprice, pr_purcprice, pr_saleprice,
         pr_vendid, pr_vendcode, pr_vendname, pr_status,
         pr_statuscode, companyId, updaterId, updateTime, pr_text1, pr_text2, pr_text3,
-        pr_text4, pr_text5,pr_remark
+        pr_text4, pr_text5,pr_remark,b2bStatus
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
         select

+ 31 - 0
applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/VendorTest.java

@@ -2,16 +2,25 @@ package com.usoftchina.saas.document.service;
 
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.account.dto.CompanyDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.DocumentApplication;
 import com.usoftchina.saas.document.dto.VendorDTO;
+import com.usoftchina.saas.utils.JsonUtils;
+import com.usoftchina.saas.utils.http.HttpUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = DocumentApplication.class)
@@ -21,6 +30,8 @@ public class VendorTest {
     @Autowired
     private VendorService vendorService;
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(VendorTest.class);
+
     @Test
     public void testSelectAll(){
         PageInfo<VendorDTO> vendorList = vendorService.getVendorsByCondition(null, null);
@@ -29,4 +40,24 @@ public class VendorTest {
         System.out.println("vendType: " + vendorList.getList().get(0).getVe_type());
         System.out.println("vendBeginDate: " + vendorList.getList().get(0).getVe_status());
     }
+
+    @Test
+    public void enableApCheck() throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+        String ve_uu = "10050735";
+        map.put("venduu", ve_uu);
+        map.put("custuu", 10050742);
+        map.put("apcheck", 1);
+        Map<String, String> params = new HashMap<String, String>();
+        List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
+        data.add(map);
+        params.put("data", JsonUtils.toJsonString(data));
+        HttpUtil.Response response = HttpUtil.sendPostRequest("http://test-b2b.uuzcc.cn" + "/erp/vendor/apcheck?access_id=" + 10050735, params, true, "94be4fe301c64a728a4bbf37bd348eab");
+        if (response.getStatusCode() == 200){
+            LOGGER.info("供应商UU={},启用B2B对账成功!", ve_uu);
+        }else {
+            LOGGER.info("供应商UU={},启用B2B对账失败!,原因={}", ve_uu, response.getResponseText());
+        }
+    }
+
 }

+ 1 - 1
applications/money/money-server/src/main/resources/application.yml

@@ -49,7 +49,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@10.1.80.137:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@10.1.81.61:8510/eureka/
 management:
   endpoints:
     web:

+ 7 - 1
base-servers/file/file-server/src/main/resources/application.yml

@@ -39,6 +39,12 @@ spring:
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     time-zone: GMT+8
+  servlet:
+    multipart:
+      enabled: true
+      #20971520 ->  20M
+      max-file-size: 20971520
+      max-request-size: 20971520
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10
@@ -51,7 +57,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@10.1.81.61:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 8640
   tomcat: