Browse Source

修改数据转JSONString代码

chenw 7 years ago
parent
commit
0ee4a4f286

+ 2 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseEndTask.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.alibaba.fastjson.JSON;
 import com.usoftchina.saas.account.api.CompanyApi;
 import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.inquiry.po.purchase.PurchaseDetailEnd;
@@ -64,7 +65,7 @@ public class SendPurchaseEndTask extends Executable {
             //添加身份ID
             String url = b2bConfig.getCommon() + purchaseEndUrl + "?access_id=" + companyDTO.getUu();
             //发送给b2b
-            boolean success = SendUtil.sendToB2B(url, JsonUtils.toJsonString(purchaseDetailEndList), companyDTO.getAccessKey());
+            boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(purchaseDetailEndList), companyDTO.getAccessKey());
             if (success) {
                 purchaseApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");
             } else {

+ 2 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseInResTask.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.alibaba.fastjson.JSON;
 import com.usoftchina.saas.account.api.CompanyApi;
 import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.inquiry.po.purchase.PurchaseProdInOut;
@@ -63,7 +64,7 @@ public class SendPurchaseInResTask extends Executable {
         List<PurchaseProdInOut> data = new ArrayList<PurchaseProdInOut>();
         data.add(b2bPurchaseProdInOut);
 
-        boolean success = SendUtil.sendToB2B(url, JsonUtils.toJsonString(data), companyDTO.getAccessKey());
+        boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
         if (success) {
             LOGGER.info("采购验收单(反过账)上传成功, id={}", messageInfo.getBizId());
             prodInOutApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");

+ 2 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseInTask.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.alibaba.fastjson.JSON;
 import com.usoftchina.saas.account.api.AccountApi;
 import com.usoftchina.saas.account.api.CompanyApi;
 import com.usoftchina.saas.account.dto.AccountDTO;
@@ -68,7 +69,7 @@ public class SendPurchaseInTask extends Executable{
         //将数据改为B2B数据格式
         List<PurchaseProdInOut> data = new ArrayList<PurchaseProdInOut>();
         data.add(b2bPurchaseProdInOut);
-        boolean success = SendUtil.sendToB2B(url, JsonUtils.toJsonString(data), companyDTO.getAccessKey());
+        boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
         if (success) {
             LOGGER.info("采购验收单上传成功, id={}", messageInfo.getBizId());
             prodInOutApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");

+ 2 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseOutResTask.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.alibaba.fastjson.JSON;
 import com.usoftchina.saas.account.api.CompanyApi;
 import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.inquiry.po.purchase.PurchaseProdInOut;
@@ -63,7 +64,7 @@ public class SendPurchaseOutResTask extends Executable {
         List<PurchaseProdInOut> data = new ArrayList<PurchaseProdInOut>();
         data.add(b2bPurchaseProdInOut);
 
-        boolean success = SendUtil.sendToB2B(url, JsonUtils.toJsonString(data), companyDTO.getAccessKey());
+        boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
         if (success) {
             LOGGER.info("采购验退单(反过账)上传成功, id={}", messageInfo.getBizId());
             prodInOutApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");

+ 2 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseOutTask.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.alibaba.fastjson.JSON;
 import com.usoftchina.saas.account.api.CompanyApi;
 import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.inquiry.po.purchase.PurchaseProdInOut;
@@ -64,7 +65,7 @@ public class SendPurchaseOutTask extends Executable{
         List<PurchaseProdInOut> data = new ArrayList<PurchaseProdInOut>();
         data.add(b2bPurchaseProdInOut);
 
-        boolean success = SendUtil.sendToB2B(url, JsonUtils.toJsonString(data), companyDTO.getAccessKey());
+        boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
         if (success) {
             LOGGER.info("采购验退单上传成功, id={}", messageInfo.getBizId());
             prodInOutApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");

+ 2 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/SendPurchaseTask.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.alibaba.fastjson.JSON;
 import com.usoftchina.saas.account.api.AccountApi;
 import com.usoftchina.saas.account.api.CompanyApi;
 import com.usoftchina.saas.account.dto.AccountDTO;
@@ -73,7 +74,7 @@ public class SendPurchaseTask extends Executable {
             //将数据改为B2B数据格式
             List<Purchase> data = new ArrayList<Purchase>();
             data.add(b2bPurchase);
-            boolean success = SendUtil.sendToB2B(url, JsonUtils.toJsonString(data), companyDTO.getAccessKey());
+            boolean success = SendUtil.sendToB2B(url, JSON.toJSONString(data), companyDTO.getAccessKey());
             if (success) {
                 purchaseApi.updateB2BStatus(Long.parseLong(messageInfo.getBizId()), "已上传");
             }else{