890 lines
44 KiB
Java
890 lines
44 KiB
Java
package com.example.sso.test;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.example.sso.dao.ShouYinMingXi;
|
|
import com.example.sso.newdao.*;
|
|
|
|
import com.example.sso.util.NcUtils;
|
|
import com.example.sso.util.TimeUtils;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
@Slf4j
|
|
public class A {
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
String A = "";
|
|
String B = "";
|
|
String C = "";
|
|
String D = "";
|
|
|
|
|
|
JSONArray shouyinmingxi = ShouYinMingXi.jiaotong();
|
|
|
|
for (Object khda : shouyinmingxi) {
|
|
JSONObject khdas = (JSONObject) khda;
|
|
Double jine = khdas.getDouble("jine");
|
|
String timec = khdas.getString("timec");
|
|
String id = khdas.getString("_id");//数据id
|
|
|
|
|
|
if (timec != "") {
|
|
long time = Long.parseLong(timec);
|
|
|
|
long currentTimestamp = System.currentTimeMillis();
|
|
Long tim = TimeUtils.tim(currentTimestamp);
|
|
|
|
if (time >= tim && time <= currentTimestamp) {
|
|
String name = khdas.getString("yh_name"); //银行名称
|
|
String taxpayerid = khdas.getString("yh_code"); //银行编码
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("name", name);
|
|
jsonObject.put("code", taxpayerid);
|
|
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String yinhangdangan = NcUtils.yinhangdangan(jsonString);
|
|
if (!yinhangdangan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", yinhangdangan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
A = "1";
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
for (Object khda : shouyinmingxi) {
|
|
JSONObject khdas = (JSONObject) khda;
|
|
Double jine = khdas.getDouble("jine");
|
|
String timec = khdas.getString("timec");
|
|
String id = khdas.getString("_id");
|
|
|
|
if (timec != "") {
|
|
long time = Long.parseLong(timec);
|
|
|
|
long currentTimestamp = System.currentTimeMillis();
|
|
Long tim = TimeUtils.tim(currentTimestamp);
|
|
|
|
if (time >= tim && time <= currentTimestamp) {
|
|
String yhCode = khdas.getString("yh_code");//银行编码
|
|
String zhhCode = khdas.getString("zhh_code");//支行编码
|
|
String zhhName = khdas.getString("zhh_name");//支行名称
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("name", zhhName);
|
|
jsonObject.put("code", zhhCode);
|
|
jsonObject.put("pk_banktype", yhCode);
|
|
jsonObject.put("pk_country", "CN");
|
|
jsonObject.put("enablestate", "Y");
|
|
|
|
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String zhiahangdangan = NcUtils.zhiahangdangan(jsonString);
|
|
if (!zhiahangdangan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", zhiahangdangan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
B = "1";
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
for (Object khda : shouyinmingxi) {
|
|
JSONObject khdas = (JSONObject) khda;
|
|
Double jine = khdas.getDouble("jine");
|
|
String timec = khdas.getString("timec");
|
|
String id = khdas.getString("_id");
|
|
|
|
if (timec != "") {
|
|
long time = Long.parseLong(timec);
|
|
|
|
long currentTimestamp = System.currentTimeMillis();
|
|
Long tim = TimeUtils.tim(currentTimestamp);
|
|
|
|
if (time >= tim && time <= currentTimestamp) {
|
|
String name = khdas.getString("name"); //姓名
|
|
String taxpayerid = khdas.getString("taxpayerid"); //纳税人登记号(身份证号)
|
|
String accountproperty = khdas.getString("accountproperty");
|
|
|
|
|
|
if (accountproperty.equals("公司")) {
|
|
String enablestate = "Y"; //生效状态
|
|
String pk_customerclass = "03"; //客户基本分类
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("name", name);
|
|
//jsonObject.put("taxpayerid", taxpayerid);
|
|
jsonObject.put("enablestate", enablestate);
|
|
jsonObject.put("pk_customerclass", pk_customerclass);
|
|
jsonObject.put("custtype", "0");
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String kehudangan = NcUtils.kehudangan(jsonString);
|
|
if (!kehudangan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", kehudangan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
C = "1";
|
|
}
|
|
}
|
|
|
|
if (accountproperty.equals("个人")) {
|
|
String enablestate = "Y"; //生效状态
|
|
String pk_customerclass = "03"; //客户基本分类
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("name", name);
|
|
jsonObject.put("taxpayerid", taxpayerid);
|
|
jsonObject.put("enablestate", enablestate);
|
|
jsonObject.put("pk_customerclass", pk_customerclass);
|
|
jsonObject.put("custtype", "1");
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String kehudangan = NcUtils.kehudangan(jsonString);
|
|
if (!kehudangan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", kehudangan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
C = "1";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
for (Object khda : shouyinmingxi) {
|
|
JSONObject khdas = (JSONObject) khda;
|
|
Double jine = khdas.getDouble("jine");
|
|
String timec = khdas.getString("timec");
|
|
|
|
if (timec != "") {
|
|
long time = Long.parseLong(timec);
|
|
|
|
long currentTimestamp = System.currentTimeMillis();
|
|
Long tim = TimeUtils.tim(currentTimestamp);
|
|
|
|
if (time >= tim && time <= currentTimestamp) {
|
|
String name = khdas.getString("name"); //姓名
|
|
String taxpayerid = khdas.getString("taxpayerid"); //纳税人登记号(身份证号)
|
|
String enablestate = "Y"; //生效状态
|
|
String accnum = khdas.getString("accnum");//账号
|
|
String zhhCode = khdas.getString("zhh_code");//支行编码
|
|
String accountproperty1 = khdas.getString("accountproperty");//性质
|
|
String id = khdas.getString("_id");
|
|
if (accountproperty1.equals("公司")) {
|
|
String accountproperty = "0";
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("accname", name);
|
|
jsonObject.put("customercode", name);
|
|
jsonObject.put("enablestate", enablestate);
|
|
jsonObject.put("pk_bankdoc", zhhCode);
|
|
jsonObject.put("accnum", accnum);
|
|
jsonObject.put("accountproperty", accountproperty);
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String keshangyinhang = NcUtils.keshangyinhang(jsonString);
|
|
if (!keshangyinhang.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", keshangyinhang);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
D = "1";
|
|
}
|
|
|
|
} else if (accountproperty1.equals("个人")) {
|
|
String accountproperty = "1";
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("accname", name);
|
|
jsonObject.put("customercode", taxpayerid);
|
|
jsonObject.put("enablestate", enablestate);
|
|
jsonObject.put("pk_bankdoc", zhhCode);
|
|
jsonObject.put("accnum", accnum);
|
|
jsonObject.put("accountproperty", accountproperty);
|
|
String jsonString = jsonObject.toJSONString();
|
|
|
|
String keshangyinhang = NcUtils.keshangyinhang(jsonString);
|
|
if (!keshangyinhang.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", keshangyinhang);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
D = "1";
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
JSONArray YJ = new JSONArray();
|
|
JSONArray YJSY = new JSONArray();
|
|
JSONArray JYJ = new JSONArray();
|
|
JSONArray JJ = new JSONArray();
|
|
JSONArray HJ = new JSONArray();
|
|
String wbtime = "";
|
|
|
|
|
|
|
|
JSONArray shouyinmingxi1 = ShouYinMingXi.jiaotong();
|
|
|
|
|
|
for (Object khda : shouyinmingxi1) {
|
|
JSONObject khdas = (JSONObject) khda;
|
|
|
|
|
|
Double jine = khdas.getDouble("jine");
|
|
String name = khdas.getString("name");
|
|
String timec = khdas.getString("timec");
|
|
String string = khdas.getString("accnum");
|
|
String string1 = khdas.getString("taxpayerid");
|
|
String def20 = khdas.getString("def20");
|
|
Double aDoubles = khdas.getDouble("jine");
|
|
String zht = khdas.getString("zht");
|
|
String id = khdas.getString("_id");//数据id
|
|
double aDouble = Math.abs(aDoubles);
|
|
String format = String.format("%.2f", aDouble);
|
|
String leibie = khdas.getString("zfyt");
|
|
|
|
if (timec != "") {
|
|
long time = Long.parseLong(timec);
|
|
|
|
long currentTimestamp = System.currentTimeMillis();
|
|
Long tim = TimeUtils.tim(currentTimestamp);
|
|
|
|
if (time >= tim && time <= currentTimestamp) {
|
|
String pkOrg = khdas.getString("pk_org");
|
|
String wbTime = khdas.getString("wb_time");
|
|
String accountproperty = khdas.getString("accountproperty");
|
|
wbtime = wbTime;
|
|
if (accountproperty.equals("个人")) {
|
|
if (pkOrg.equals("北京银建的士管理有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", string1);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "1");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
|
|
YJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京银建实业股份有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", string1);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "1");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
YJSY.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京金银建出租汽车有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", string1);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "1");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
JYJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京金建出租汽车有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", string1);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "1");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
JJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京华建出租车客运有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", string1);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "1");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
HJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
if (accountproperty.equals("公司")) {
|
|
if (pkOrg.equals("北京银建的士管理有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", name);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "0");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
YJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京银建实业股份有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", name);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "0");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
YJSY.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京金银建出租汽车有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", name);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "0");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
JYJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京金建出租汽车有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", name);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "0");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
JJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
if (pkOrg.equals("北京华建出租车客运有限公司") && zht.equals("1")) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("pk_account", string);
|
|
jsonObject.put("objecttype", "0");
|
|
jsonObject.put("pk_customer", name);
|
|
jsonObject.put("pay_primal", format);
|
|
jsonObject.put("memo", leibie);
|
|
jsonObject.put("custtype", "0");
|
|
jsonObject.put("def20", def20);
|
|
jsonObject.put("ids", id);
|
|
HJ.add(jsonObject);
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
A = "1";
|
|
B = "1";
|
|
C = "1";
|
|
D = "1";
|
|
|
|
|
|
if (!YJ.isEmpty()) {
|
|
/* UUID uuid = UUID.randomUUID();
|
|
String uuidString = uuid.toString();*/
|
|
for (Object o : YJ) {
|
|
JSONObject test = (JSONObject) o;
|
|
|
|
String def20 = test.getString("def20");
|
|
String id = test.getString("ids");
|
|
JSONArray jsonArray = new JSONArray();
|
|
jsonArray.add(test);
|
|
|
|
JSONObject yjds = new JSONObject();
|
|
yjds.put("pk_org", "北京银建的士管理有限公司");
|
|
yjds.put("bill_date", wbtime);
|
|
yjds.put("pk_balatype", "13");
|
|
yjds.put("def20", def20);
|
|
yjds.put("bodys", jsonArray);
|
|
yjds.put("memo", "YJ");
|
|
String jsonString = yjds.toJSONString();
|
|
System.out.println(jsonString);
|
|
String fukuan = NcUtils.fukuan(jsonString);
|
|
System.out.println(fukuan);
|
|
if (!fukuan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", fukuan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
} else {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
if (!YJSY.isEmpty()) {
|
|
/* UUID uuid = UUID.randomUUID();
|
|
String uuidString = uuid.toString();*/
|
|
|
|
for (Object o : YJSY) {
|
|
JSONObject test = (JSONObject) o;
|
|
|
|
String def20 = test.getString("def20");
|
|
String id = test.getString("ids");
|
|
JSONArray jsonArray = new JSONArray();
|
|
jsonArray.add(test);
|
|
|
|
JSONObject yjds = new JSONObject();
|
|
yjds.put("pk_org", "北京银建实业股份有限公司");
|
|
yjds.put("bill_date", wbtime);
|
|
yjds.put("pk_balatype", "13");
|
|
yjds.put("def20", def20);
|
|
yjds.put("bodys", jsonArray);
|
|
yjds.put("memo", "YJ");
|
|
String jsonString = yjds.toJSONString();
|
|
System.out.println(jsonString);
|
|
String fukuan = NcUtils.fukuan(jsonString);
|
|
System.out.println(fukuan);
|
|
if (!fukuan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", fukuan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
} else {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!JYJ.isEmpty()) {
|
|
/* UUID uuid = UUID.randomUUID();
|
|
String uuidString = uuid.toString();*/
|
|
|
|
for (Object o : JYJ) {
|
|
JSONObject test = (JSONObject) o;
|
|
|
|
String def20 = test.getString("def20");
|
|
String id = test.getString("ids");
|
|
JSONArray jsonArray = new JSONArray();
|
|
jsonArray.add(test);
|
|
|
|
JSONObject yjds = new JSONObject();
|
|
yjds.put("pk_org", "北京金银建出租汽车有限公司");
|
|
yjds.put("bill_date", wbtime);
|
|
yjds.put("pk_balatype", "13");
|
|
yjds.put("def20", def20);
|
|
yjds.put("bodys", jsonArray);
|
|
yjds.put("memo", "YJ");
|
|
String jsonString = yjds.toJSONString();
|
|
System.out.println(jsonString);
|
|
String fukuan = NcUtils.fukuan(jsonString);
|
|
System.out.println(fukuan);
|
|
if (!fukuan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", fukuan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
} else {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
if (!JJ.isEmpty()) {
|
|
/* UUID uuid = UUID.randomUUID();
|
|
String uuidString = uuid.toString();
|
|
*/
|
|
for (Object o : JJ) {
|
|
JSONObject test = (JSONObject) o;
|
|
|
|
String def20 = test.getString("def20");
|
|
String id = test.getString("ids");
|
|
JSONArray jsonArray = new JSONArray();
|
|
jsonArray.add(test);
|
|
|
|
JSONObject yjds = new JSONObject();
|
|
yjds.put("pk_org", "北京金建出租汽车有限公司");
|
|
yjds.put("bill_date", wbtime);
|
|
yjds.put("pk_balatype", "13");
|
|
yjds.put("def20", def20);
|
|
yjds.put("bodys", jsonArray);
|
|
yjds.put("memo", "YJ");
|
|
String jsonString = yjds.toJSONString();
|
|
System.out.println(jsonString);
|
|
String fukuan = NcUtils.fukuan(jsonString);
|
|
System.out.println(fukuan);
|
|
if (!fukuan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", fukuan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
} else {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
if (!HJ.isEmpty()) {
|
|
/* UUID uuid = UUID.randomUUID();
|
|
String uuidString = uuid.toString();
|
|
*/
|
|
for (Object o : HJ) {
|
|
JSONObject test = (JSONObject) o;
|
|
|
|
String def20 = test.getString("def20");
|
|
String id = test.getString("ids");
|
|
JSONArray jsonArray = new JSONArray();
|
|
jsonArray.add(test);
|
|
|
|
JSONObject yjds = new JSONObject();
|
|
yjds.put("pk_org", "北京华建出租车客运有限公司");
|
|
yjds.put("bill_date", wbtime);
|
|
yjds.put("pk_balatype", "13");
|
|
yjds.put("def20", def20);
|
|
yjds.put("bodys", jsonArray);
|
|
yjds.put("memo", "YJ");
|
|
String jsonString = yjds.toJSONString();
|
|
System.out.println(jsonString);
|
|
String fukuan = NcUtils.fukuan(jsonString);
|
|
System.out.println(fukuan);
|
|
if (!fukuan.contains("同步成功")) {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", fukuan);
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
} else {
|
|
JSONObject jsonObject1 = new JSONObject();
|
|
jsonObject1.put("app_id", "675b8d1a24d61bca7bf1cb4c");
|
|
jsonObject1.put("entry_id", "6865ed5afa23289ab34ddc60");
|
|
jsonObject1.put("data_id", id);
|
|
jsonObject1.put("is_start_trigger", true);
|
|
JSONObject jsonObject3 = new JSONObject(); //字段
|
|
JSONObject jsonObject4 = new JSONObject(); //值
|
|
jsonObject4.put("value", "推送成功");
|
|
jsonObject3.put("zht", jsonObject4);
|
|
jsonObject1.put("data", jsonObject3);
|
|
String jsonString1 = jsonObject1.toJSONString();
|
|
NcUtils.updatas(jsonString1);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|