82 lines
2.3 KiB
Java
82 lines
2.3 KiB
Java
package com.example.sso.newdao;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.example.sso.util.V5utils;
|
|
|
|
public class FaPiaos {
|
|
public static JSONArray add() {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject.put("entry_id", "677390b35daf3616d58aecbf");
|
|
jsonObject.put("limit", 99999999);
|
|
|
|
|
|
JSONObject filter = new JSONObject();
|
|
filter.put("rel", "and");
|
|
JSONArray cond = new JSONArray();
|
|
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("field", "is_check");
|
|
jsonObject1.put("method", "eq");
|
|
JSONArray value = new JSONArray();
|
|
value.add("是");
|
|
jsonObject1.put("value", value);
|
|
|
|
JSONObject jsonObject2 = new JSONObject();
|
|
jsonObject2.put("field", "apply_stype");
|
|
jsonObject2.put("method", "eq");
|
|
JSONArray array = new JSONArray();
|
|
array.add("新增");
|
|
jsonObject2.put("value", array);
|
|
|
|
cond.add(jsonObject1);
|
|
cond.add(jsonObject2);
|
|
filter.put("cond", cond);
|
|
jsonObject.put("filter", filter);
|
|
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String list = V5utils.list(jsonString);
|
|
JSONObject jsonObject11 = JSON.parseObject(list);
|
|
JSONArray jsonArray = jsonObject11.getJSONArray("data");
|
|
|
|
return jsonArray;
|
|
}
|
|
|
|
public static void updata(String id, String code, String msg) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject.put("entry_id", "677390b35daf3616d58aecbf");
|
|
jsonObject.put("data_id", id);
|
|
jsonObject.put("is_start_trigger", true);
|
|
|
|
|
|
JSONObject data = new JSONObject();
|
|
|
|
JSONObject code_state = new JSONObject();
|
|
code_state.put("value",code);
|
|
data.put("fetch_state",code_state);
|
|
|
|
JSONObject code_note = new JSONObject();
|
|
code_note.put("value",msg);
|
|
data.put("fetch_explain",code_note);
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject is_check = new JSONObject();
|
|
is_check.put("value","否");
|
|
data.put("is_check",is_check);
|
|
|
|
jsonObject.put("data", data);
|
|
String jsonString = jsonObject.toJSONString();
|
|
V5utils.updata(jsonString);
|
|
|
|
|
|
}
|
|
|
|
}
|