|
|
@@ -113,7 +113,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
map.put("msg","成功");
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
- map.put("status", "0009");
|
|
|
+ map.put("status", "0002");
|
|
|
map.put("msg", "服务器请求异常,请稍后再试");
|
|
|
}
|
|
|
return map;
|
|
|
@@ -408,7 +408,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("ReqOutStocks", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
@@ -862,7 +862,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("BILLs", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
@@ -1032,7 +1032,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("BILLs", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
@@ -1162,8 +1162,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("BILLs", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
-
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
error.setUrl(url);
|
|
|
error.setDataVal(ReqOutStocks2.toJSONString()).setType("生产收货");
|
|
|
@@ -1284,7 +1283,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("BILLs", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
@@ -1407,7 +1406,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("ReqOutStocks", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
@@ -1531,7 +1530,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
ReqOutStocks1.put("ReqOutStocks", retunList2);
|
|
|
|
|
|
JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
- ReqOutStocks2.put("strJson",ReqOutStocks1);
|
|
|
+ ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
@@ -1846,6 +1845,25 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 转JSON
|
|
|
+ * */
|
|
|
+ @Override
|
|
|
+ public void jsonError() {
|
|
|
+ List<Error> errorList = askGoodsMapper.getJsonError();
|
|
|
+ for (Error error : errorList) {
|
|
|
+ System.out.println("字符串为:"+error.getDataVal());
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(error.getDataVal());
|
|
|
+
|
|
|
+ JSONObject jsonObject1 = JSONObject.parseObject(jsonObject.get("strJson").toString());
|
|
|
+
|
|
|
+ JSONObject jsonObject2 = new JSONObject();
|
|
|
+ jsonObject2.put("strJson",jsonObject1.toJSONString());
|
|
|
+
|
|
|
+ System.out.println("toJsonString字符串为:"+ jsonObject2.toJSONString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void test() {
|
|
|
AskGoods askGoods = new AskGoods();
|