|
@@ -1,5 +1,6 @@
|
|
|
package net.chenlin.dp.modules.api.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.taobao.api.ApiException;
|
|
|
import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
|
|
|
import net.chenlin.dp.common.openapi4j.util.PropUtil;
|
|
@@ -56,14 +57,22 @@ public class PayrequestController {
|
|
|
for (String id:orderIdList){
|
|
|
Map<String, Object> orderDetails = dingdingOpenInterface.getOrderDetails(id);
|
|
|
Map<String, Object> map = DingdingOpenInterface.tableToMap(orderDetails);
|
|
|
- Object code = map.get("单据编号");
|
|
|
+ Object code = map.get("表格");
|
|
|
+ List<Object> list = JSONObject.parseObject(code.toString(), List.class);
|
|
|
+ Object o = list.get(0);
|
|
|
+ Map map1 = JSONObject.parseObject(o.toString(), Map.class);
|
|
|
+ Object rowValue = map1.get("rowValue");
|
|
|
+ List<Object> li= JSONObject.parseObject(rowValue.toString(), List.class);
|
|
|
+ Object o1 = li.get(0);
|
|
|
+ Map map2 = JSONObject.parseObject(o1.toString(), Map.class);
|
|
|
+ Object codes = map2.get("value");
|
|
|
Object result = orderDetails.get("result");
|
|
|
if (!result.equals("")&&result!=null){
|
|
|
if (result.equals("agree")){
|
|
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
|
|
|
String format = df.format(new Date());
|
|
|
DynamicDataSource.setDataSource("slave-data-source");
|
|
|
- sysUserService.Payrequestshenhe(code.toString(),format,format,"demo");
|
|
|
+ sysUserService.Payrequestshenhe(codes.toString(),format,format,"demo");
|
|
|
DynamicDataSource.setDataSource("");
|
|
|
}
|
|
|
}
|