first commit
This commit is contained in:
213
src/main/java/com/example/sso/newschedule/BaoXiaoDanAdd.java
Normal file
213
src/main/java/com/example/sso/newschedule/BaoXiaoDanAdd.java
Normal file
@ -0,0 +1,213 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.BaoXiaoDanAdds;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.ShenQingAdds;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@Component
|
||||
public class BaoXiaoDanAdd {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public String bxadd() {
|
||||
JSONArray add = BaoXiaoDanAdds.add();
|
||||
|
||||
for (Object o : add) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
System.out.println(" test" + test);
|
||||
String report_person_org = test.getString("report_person_org");
|
||||
String report_number = test.getString("report_number");
|
||||
String report_date = test.getString("report_date");
|
||||
String trade_num = test.getString("trade_num");
|
||||
String report_id = test.getString("report_id");
|
||||
String report_person = test.getString("report_person");
|
||||
String report_person_dep = test.getString("report_person_dep");
|
||||
String report_company = test.getString("report_company");
|
||||
String pay_dept = test.getString("pay_dept");
|
||||
|
||||
String billing_method = test.getString("billing_method");
|
||||
String collect_right = test.getString("collect_right");
|
||||
String collect_person = test.getString("collect_person");
|
||||
String vendor = test.getString("vendor");
|
||||
String client = test.getString("client");
|
||||
String collection_bank = test.getString("collection_bank");
|
||||
String client_bank = test.getString("client_bank");
|
||||
String unit_bank = test.getString("unit_bank");
|
||||
String sub_thing = test.getString("sub_thing");
|
||||
|
||||
String administration = test.getString("administration");
|
||||
String contract_number = test.getString("contract_number");
|
||||
String jy_report_id = test.getString("jy_report_id");
|
||||
String sub_doc = test.getString("sub_doc");
|
||||
String sin_name = test.getString("sin_name");
|
||||
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
JSONArray jsonArray = test.getJSONArray("_widget_1733981918628");
|
||||
|
||||
|
||||
JSONArray jsonArray1 = test.getJSONArray("_widget_1733981918640");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("pk_org", report_person_org);
|
||||
head.put("djbh", report_number);
|
||||
head.put("djrq", report_date);
|
||||
head.put("djlxbm", trade_num);
|
||||
head.put("applybillid", report_id);
|
||||
head.put("jkbxr", report_person);
|
||||
head.put("deptid", report_person_dep);
|
||||
head.put("fydwbm", report_company);
|
||||
head.put("fydeptid", pay_dept);
|
||||
head.put("jsfs", billing_method);
|
||||
head.put("paytarget", collect_right);
|
||||
head.put("receiver", collect_person);
|
||||
head.put("hbbm", vendor);
|
||||
head.put("customer", client);
|
||||
head.put("skyhzh", collection_bank);
|
||||
head.put("custaccount", client_bank);
|
||||
head.put("fkyhzh", unit_bank);
|
||||
head.put("zy", sub_thing);
|
||||
head.put("zxy10", administration);
|
||||
head.put("zyx24", contract_number);
|
||||
head.put("zyx16", jy_report_id);
|
||||
head.put("djxl", sin_name);
|
||||
|
||||
JSONArray busitem = new JSONArray();
|
||||
|
||||
for (Object oo : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) oo;
|
||||
String item_code = test1.getString("item_code");
|
||||
String dep_expenses = test1.getString("dep_expenses");
|
||||
String taxes = test1.getString("taxes");
|
||||
String tax_rates = test1.getString("tax_rates");
|
||||
String invoice_type = test1.getString("invoice_type");
|
||||
String jy_report_one_id = test1.getString("jy_report_one_id");
|
||||
String insurance = test1.getString("insurance");
|
||||
|
||||
String fp_number = test1.getString("fp_number");
|
||||
String fp_code = test1.getString("fp_code");
|
||||
String fp_type = test1.getString("fp_type");
|
||||
String fp_date = test1.getString("fp_date");
|
||||
String sale_name = test1.getString("sale_name");
|
||||
String p_ticket = test1.getString("p_ticket");
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("szxmid", item_code);
|
||||
jsonObject1.put("bpp", p_ticket);
|
||||
|
||||
jsonObject1.put("defitem50", dep_expenses);
|
||||
jsonObject1.put("defitem42", taxes);
|
||||
jsonObject1.put("defitem40", tax_rates);
|
||||
jsonObject1.put("defitem43", invoice_type);
|
||||
jsonObject1.put("defitem6", jy_report_one_id);
|
||||
|
||||
jsonObject1.put("fphm", fp_number);
|
||||
jsonObject1.put("fpdm", fp_code);
|
||||
jsonObject1.put("fplx", fp_type);
|
||||
jsonObject1.put("kprq", fp_date);
|
||||
jsonObject1.put("defitem25", insurance);
|
||||
jsonObject1.put("xfsmc", sale_name);
|
||||
busitem.add(jsonObject1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
JSONArray files = new JSONArray();
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("fileurl", sub_doc);
|
||||
files.add(jsonObject2);
|
||||
|
||||
|
||||
JSONArray constrastitem = new JSONArray();
|
||||
for (Object ooo : jsonArray1) {
|
||||
JSONObject ooo1 = (JSONObject) ooo;
|
||||
String rush_money = ooo1.getString("rush_money");
|
||||
String borrow_id = ooo1.getString("borrow_id");
|
||||
String borrow_id_thin = ooo1.getString("borrow_id_thin");
|
||||
|
||||
JSONObject jsonObject5 = new JSONObject();
|
||||
jsonObject5.put("cjkybje", rush_money);
|
||||
jsonObject5.put("jkdhid", borrow_id);
|
||||
jsonObject5.put("jkdbid", borrow_id_thin);
|
||||
constrastitem.add(jsonObject5);
|
||||
}
|
||||
|
||||
|
||||
jsonObject.put("head", head);
|
||||
jsonObject.put("busitem", busitem);
|
||||
jsonObject.put("constrastitem", constrastitem);
|
||||
jsonObject.put("files", files);
|
||||
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
|
||||
|
||||
String s = NcUtils.addBx(jsonString);
|
||||
log.info("报销单新增 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String balance = "";
|
||||
String begindate = "";
|
||||
String canusedata = "";
|
||||
String ctrldata = "";
|
||||
String deptname = "";
|
||||
String enddate = "";
|
||||
String orgname = "";
|
||||
String plandata = "";
|
||||
String planname = "";
|
||||
String readydate = "";
|
||||
String rundata = "";
|
||||
String szxmname = "";
|
||||
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
planname = jsonObject4.getString("planname");
|
||||
begindate = jsonObject4.getString("begindate");
|
||||
enddate = jsonObject4.getString("enddate");
|
||||
orgname = jsonObject4.getString("orgname");
|
||||
deptname = jsonObject4.getString("deptname");
|
||||
szxmname = jsonObject4.getString("szxmname");
|
||||
plandata = jsonObject4.getString("plandata");
|
||||
ctrldata = jsonObject4.getString("ctrldata");
|
||||
rundata = jsonObject4.getString("rundata");
|
||||
readydate = jsonObject4.getString("readydate");
|
||||
canusedata = jsonObject4.getString("canusedata");
|
||||
balance = jsonObject4.getString("balance");
|
||||
DanJuAdd.insert("报销单新增", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, jy_report_id);
|
||||
|
||||
}
|
||||
BaoXiaoDanAdds.updata(id, code, msg, billid);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
BaoXiaoDanAdds.updata(id, code, msg, billid);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
}
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
33
src/main/java/com/example/sso/newschedule/BaoXiaoDanDel.java
Normal file
33
src/main/java/com/example/sso/newschedule/BaoXiaoDanDel.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.BaoXiaoDanDels;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class BaoXiaoDanDel {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void bxdel() {
|
||||
JSONArray shenpi = BaoXiaoDanDels.shenpi();
|
||||
for (Object o : shenpi){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String report_ncid = test.getString("report_ncid");
|
||||
String id = test.getString("_id");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid",report_ncid);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.delBx(jsonString);
|
||||
log.info("删除 " +s );
|
||||
JSONObject jsonObject1 = JSON.parseObject(s);
|
||||
String code = jsonObject1.getString("code");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
BaoXiaoDanDels.updata(id,code,msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
109
src/main/java/com/example/sso/newschedule/BaoXiaoDanTongGuo.java
Normal file
109
src/main/java/com/example/sso/newschedule/BaoXiaoDanTongGuo.java
Normal file
@ -0,0 +1,109 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.BaoXiaoDanTongGuos;
|
||||
import com.example.sso.newdao.BxDown;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class BaoXiaoDanTongGuo {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public String bxtg() throws IOException {
|
||||
|
||||
JSONArray shenpi = BaoXiaoDanTongGuos.shenpi();
|
||||
for (Object o : shenpi) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
String report_ncid = test.getString("report_ncid");
|
||||
String jy_report_id = test.getString("jy_report_id");
|
||||
String id = test.getString("_id");
|
||||
String opinion_all = test.getString("opinion_all");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid", report_ncid);
|
||||
jsonObject.put("spyj",opinion_all);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.approveBx(jsonString);
|
||||
|
||||
|
||||
String balance = "";
|
||||
String begindate = "";
|
||||
String canusedata = "";
|
||||
String ctrldata = "";
|
||||
String deptname = "";
|
||||
String enddate = "";
|
||||
String orgname = "";
|
||||
String plandata = "";
|
||||
String planname = "";
|
||||
String readydate = "";
|
||||
String rundata = "";
|
||||
String szxmname = "";
|
||||
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
balance = jsonObject4.getString("balance");
|
||||
begindate = jsonObject4.getString("begindate");
|
||||
canusedata = jsonObject4.getString("canusedata");
|
||||
ctrldata = jsonObject4.getString("ctrldata");
|
||||
deptname = jsonObject4.getString("deptname");
|
||||
enddate = jsonObject4.getString("enddate");
|
||||
orgname = jsonObject4.getString("orgname");
|
||||
plandata = jsonObject4.getString("plandata");
|
||||
planname = jsonObject4.getString("planname");
|
||||
readydate = jsonObject4.getString("readydate");
|
||||
rundata = jsonObject4.getString("rundata");
|
||||
szxmname = jsonObject4.getString("szxmname");
|
||||
DanJuAdd.insert("报销单通过", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, jy_report_id);
|
||||
|
||||
|
||||
}
|
||||
BaoXiaoDanTongGuos.updataal(id, code, msg, ysmsg);
|
||||
BxDown.bx(id);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else if (s.contains("ysmsg")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
|
||||
BaoXiaoDanTongGuos.updataal(id, code, msg, ysmsg);
|
||||
return "olklkkk";
|
||||
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
BaoXiaoDanTongGuos.updata(id, code, msg);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
278
src/main/java/com/example/sso/newschedule/FaPiao.java
Normal file
278
src/main/java/com/example/sso/newschedule/FaPiao.java
Normal file
@ -0,0 +1,278 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.*;
|
||||
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class FaPiao {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void main() {
|
||||
JSONArray add = FaPiaos.add();
|
||||
|
||||
|
||||
for (Object o : add){
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String staff_code = test.getString("staff_code");
|
||||
String invoice_type = test.getString("invoice_type");
|
||||
String id = test.getString("_id");
|
||||
|
||||
String token = NcUtils.getToken(staff_code);
|
||||
JSONObject jsonObject = JSON.parseObject(token);
|
||||
String token1 = jsonObject.getString("token");
|
||||
|
||||
log.info("参数 " +token1 );
|
||||
|
||||
|
||||
String s = NcUtils.getInvoice(token1,invoice_type);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
FaPiaos.updata(id,code,msg);
|
||||
|
||||
if (invoice_type.equals("invoice")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String fpdm = test1.getString("fpdm");
|
||||
String fphm = test1.getString("fphm");
|
||||
String kprq = test1.getString("kprq");
|
||||
String gmfNsrsbh = test1.getString("gmfNsrsbh");
|
||||
String gmfmc = test1.getString("gmfmc");
|
||||
String xsfMc = test1.getString("xsfMc");
|
||||
String xsfNsrsbh = test1.getString("xsfNsrsbh");
|
||||
String jshj = test1.getString("jshj");
|
||||
String hjje = test1.getString("hjje");
|
||||
String hjse = test1.getString("hjse");
|
||||
String sl = test1.getString("sl");
|
||||
|
||||
ZengZhiShuiFaPiaos.add(fplx,fpdm,fphm,kprq,gmfNsrsbh,gmfmc,xsfMc,xsfNsrsbh,jshj,hjje,hjse,sl,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("air")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String ticketNum = test1.getString("ticketNum");
|
||||
String date = test1.getString("date");
|
||||
String issueBy = test1.getString("issueBy");
|
||||
String userName = test1.getString("userName");
|
||||
String fare = test1.getString("fare");
|
||||
String fuelSurcharge = test1.getString("fuelSurcharge");
|
||||
String caacDevelopFund = test1.getString("caacDevelopFund");
|
||||
String insurance = test1.getString("insurance");
|
||||
String tax = test1.getString("tax");
|
||||
String taxAmount = test1.getString("taxAmount");
|
||||
String feeWithoutTax = test1.getString("feeWithoutTax");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
String airType = test1.getString("airType");
|
||||
|
||||
HangKongKePiao.add(fplx,ticketNum,date,issueBy,userName,fare,fuelSurcharge,caacDevelopFund,insurance,tax,taxAmount,feeWithoutTax
|
||||
,totalAmount,airType,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("train")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String number = test1.getString("number");
|
||||
String date = test1.getString("date");
|
||||
String time = test1.getString("time");
|
||||
String trainNum = test1.getString("trainNum");
|
||||
String origin = test1.getString("origin");
|
||||
String destination = test1.getString("destination");
|
||||
String level = test1.getString("level");
|
||||
String seatNo = test1.getString("seatNo");
|
||||
String name = test1.getString("name");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
String feeWithoutTax = test1.getString("feeWithoutTax");
|
||||
String taxAmount = test1.getString("taxAmount");
|
||||
|
||||
|
||||
HuoChePiao.add(fplx,number,date,time,trainNum,origin,destination,level,seatNo,name,totalAmount,feeWithoutTax
|
||||
,taxAmount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("passenger")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String date = test1.getString("date");
|
||||
String time = test1.getString("time");
|
||||
String entrance = test1.getString("entrance");
|
||||
String exit = test1.getString("exit");
|
||||
String name = test1.getString("name");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
String feeWithoutTax = test1.getString("feeWithoutTax");
|
||||
String taxAmount = test1.getString("taxAmount");
|
||||
|
||||
|
||||
|
||||
KeYunQiCheFaPiao.add(fplx,invoiceCode,invoiceNum,date,time,entrance,exit,name,totalAmount,feeWithoutTax,totalAmount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("taxi")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String date = test1.getString("date");
|
||||
String startTime = test1.getString("startTime");
|
||||
String endTime = test1.getString("endTime");
|
||||
String carNum = test1.getString("carNum");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
String amount = test1.getString("amount");
|
||||
|
||||
|
||||
|
||||
|
||||
ChuZuChePiao.add(fplx,invoiceCode,invoiceNum,date,startTime,endTime,carNum,totalAmount,amount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("tolls")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String date = test1.getString("date");
|
||||
String time = test1.getString("time");
|
||||
String entrance = test1.getString("entrance");
|
||||
String exit = test1.getString("exit");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GuoLuFeiFaPiao.add(fplx,invoiceCode,invoiceNum,date,time,entrance,exit,totalAmount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("machine")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String date = test1.getString("date");
|
||||
String sellerName = test1.getString("sellerName");
|
||||
String buyerName = test1.getString("buyerName");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JiDaFaPiao.add(fplx,invoiceCode,invoiceNum,date,sellerName,buyerName,totalAmount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("quota")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DingEFpiao.add(fplx,invoiceCode,invoiceNum,totalAmount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("other")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QiTaFaPiao.add(fplx,invoiceCode,invoiceNum,totalAmount,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
if (invoice_type.equals("nontax")) {
|
||||
|
||||
JSONArray jsonArray = jsonObject3.getJSONObject("data").getJSONArray("fpInfo");
|
||||
for (Object o1 : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) o1;
|
||||
String fplx = test1.getString("fplx");
|
||||
String invoiceCode = test1.getString("invoiceCode");
|
||||
String invoiceNum = test1.getString("invoiceNum");
|
||||
String issueDate = test1.getString("issueDate");
|
||||
String invoicingPartyName = test1.getString("invoicingPartyName");
|
||||
String payerPartyName = test1.getString("payerPartyName");
|
||||
String payerPartyCode = test1.getString("payerPartyCode");
|
||||
String totalAmount = test1.getString("totalAmount");
|
||||
String remark = test1.getString("remark");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CaiZhengFeiShuiFaPiao.add(fplx,invoiceCode,invoiceNum,issueDate,invoicingPartyName,payerPartyName,payerPartyCode,totalAmount,remark,staff_code);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.GongYingShangXinXiDangAns;
|
||||
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class GongYingShangXinXiDangAn {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void GongYingShangXinXiDangAna() {
|
||||
JSONArray add = GongYingShangXinXiDangAns.add();
|
||||
|
||||
|
||||
for (Object o : add){
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String supplier_name = test.getString("supplier_name");
|
||||
String taxpayer_id = test.getString("taxpayer_id");
|
||||
String basic_supplier_kind = test.getString("basic_supplier_kind");
|
||||
String enable_state = test.getString("enable_state");
|
||||
String supplier_simple = test.getString("supplier_simple");
|
||||
String remark = test.getString("remark");
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("name",supplier_name);
|
||||
head.put("taxpayerid",taxpayer_id);
|
||||
head.put("pk_supplierclass",basic_supplier_kind);
|
||||
head.put("enablestate",enable_state);
|
||||
head.put("shortname",supplier_simple);
|
||||
head.put("memo",remark);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString = head.toJSONString();
|
||||
log.info("参数 " +jsonString );
|
||||
|
||||
|
||||
String s = NcUtils.jysupplier(jsonString);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("message");
|
||||
|
||||
GongYingShangXinXiDangAns.updata(id,code,msg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.GongYingShangXinXiDangAns;
|
||||
import com.example.sso.newdao.GongYingShangYinHangZhangHus;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class GongYingShangYinHangZhangHu {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void GongYingShangYinHangZhangHua() {
|
||||
JSONArray add = GongYingShangYinHangZhangHus.add();
|
||||
|
||||
|
||||
for (Object o : add){
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String supplier_kind = test.getString("supplier_kind");
|
||||
String bank_account = test.getString("bank_account");
|
||||
String bank_name = test.getString("bank_name");
|
||||
String bank_open = test.getString("bank_open");
|
||||
String enable_state = test.getString("enable_state");
|
||||
String remark = test.getString("remark");
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("suppliername",supplier_kind);
|
||||
head.put("accnum",bank_account);
|
||||
head.put("accname",bank_name);
|
||||
head.put("pk_bankdoc",bank_open);
|
||||
head.put("enablestate",enable_state);
|
||||
head.put("memo",remark);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString = head.toJSONString();
|
||||
log.info("参数 " +jsonString );
|
||||
|
||||
|
||||
String s = NcUtils.jysuppbas(jsonString);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("message");
|
||||
|
||||
GongYingShangYinHangZhangHus.updata(id,code,msg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
65
src/main/java/com/example/sso/newschedule/HeTongDown.java
Normal file
65
src/main/java/com/example/sso/newschedule/HeTongDown.java
Normal file
@ -0,0 +1,65 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.HeTongDowns;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class HeTongDown {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void downhetong() {
|
||||
JSONArray add = HeTongDowns.add();
|
||||
|
||||
|
||||
for (Object o : add) {
|
||||
JSONObject test1 = (JSONObject) o;
|
||||
String id = test1.getString("_id");
|
||||
String reb_code = test1.getString("reb_code");
|
||||
JSONArray jsonArray1 = test1.getJSONArray("_widget_1739496817485");
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("orgCode", reb_code);
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
|
||||
|
||||
for (Object o1 : jsonArray1) {
|
||||
JSONObject test2 = (JSONObject) o1;
|
||||
|
||||
String jy_fphm = test2.getString("jy_fphm");
|
||||
String jy_fpdm = test2.getString("jy_fpdm");
|
||||
String jy_fplx = test2.getString("jy_fplx");
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("fphm", jy_fphm);
|
||||
jsonObject1.put("fpdm", jy_fpdm);
|
||||
jsonObject1.put("fplx", jy_fplx);
|
||||
jsonArray.add(jsonObject1);
|
||||
}
|
||||
|
||||
|
||||
jsonObject.put("data", jsonArray);
|
||||
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
|
||||
String hetong = NcUtils.hetong(jsonString);
|
||||
JSONObject jsonObject2 = JSON.parseObject(hetong);
|
||||
String code = jsonObject2.getString("code");
|
||||
String msg = jsonObject2.getString("msg");
|
||||
String viewUrl = jsonObject2.getString("viewUrl");
|
||||
if (code.equals("0")) {
|
||||
HeTongDowns.updata(id, code, msg, viewUrl);
|
||||
} else {
|
||||
HeTongDowns.updatas(id, code, msg);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.HuanKuanDanDels;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class HuanKuanDanDel {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void hkdel() {
|
||||
JSONArray shenpi = HuanKuanDanDels.shenpi();
|
||||
for (Object o : shenpi){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String report_ncid = test.getString("report_ncid");
|
||||
String id = test.getString("_id");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid",report_ncid);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.delHk(jsonString);
|
||||
log.info("删除 " +s );
|
||||
JSONObject jsonObject1 = JSON.parseObject(s);
|
||||
String code = jsonObject1.getString("code");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
HuanKuanDanDels.updata(id,code,msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.HkDown;
|
||||
import com.example.sso.newdao.HuanKuanDanTongGuos;
|
||||
import com.example.sso.newdao.HuanKuanDangAdds;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class HuanKuanDanTongGuo {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public String hktg () throws IOException {
|
||||
|
||||
JSONArray shenpi = HuanKuanDanTongGuos.shenpi();
|
||||
for (Object o : shenpi){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String report_ncid = test.getString("report_ncid");
|
||||
String still_id = test.getString("still_id");
|
||||
String id = test.getString("_id");
|
||||
String opinion_all = test.getString("opinion_all");
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid",report_ncid);
|
||||
jsonObject.put("spyj",opinion_all);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.approveBx(jsonString);
|
||||
log.info("还款单通过 " +s);
|
||||
|
||||
|
||||
String balance = "";
|
||||
String begindate = "";
|
||||
String canusedata = "";
|
||||
String ctrldata = "";
|
||||
String deptname = "";
|
||||
String enddate = "";
|
||||
String orgname = "";
|
||||
String plandata = "";
|
||||
String planname = "";
|
||||
String readydate = "";
|
||||
String rundata = "";
|
||||
String szxmname = "";
|
||||
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
balance = jsonObject4.getString("balance");
|
||||
begindate = jsonObject4.getString("begindate");
|
||||
canusedata = jsonObject4.getString("canusedata");
|
||||
ctrldata = jsonObject4.getString("ctrldata");
|
||||
deptname = jsonObject4.getString("deptname");
|
||||
enddate = jsonObject4.getString("enddate");
|
||||
orgname = jsonObject4.getString("orgname");
|
||||
plandata = jsonObject4.getString("plandata");
|
||||
planname = jsonObject4.getString("planname");
|
||||
readydate = jsonObject4.getString("readydate");
|
||||
rundata = jsonObject4.getString("rundata");
|
||||
szxmname = jsonObject4.getString("szxmname");
|
||||
|
||||
DanJuAdd.insert("还款单通过", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, still_id);
|
||||
|
||||
}
|
||||
HuanKuanDanTongGuos.updataalls(id, code, msg, ysmsg);
|
||||
HkDown.hk(id);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
HuanKuanDanTongGuos.updata(id, code, msg);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
145
src/main/java/com/example/sso/newschedule/HuanKuanDangAdd.java
Normal file
145
src/main/java/com/example/sso/newschedule/HuanKuanDangAdd.java
Normal file
@ -0,0 +1,145 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.HuanKuanDangAdds;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class HuanKuanDangAdd {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public String hkadd() {
|
||||
JSONArray add = HuanKuanDangAdds.add();
|
||||
|
||||
|
||||
for (Object o : add) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
System.out.println(" test" + test);
|
||||
String still_unit = test.getString("still_unit");
|
||||
String report_number = test.getString("report_number");
|
||||
String report_date = test.getString("report_date");
|
||||
String trade_num = test.getString("trade_num");
|
||||
String still_person = test.getString("still_person");
|
||||
String still_person_dep = test.getString("still_person_dep");
|
||||
String billing_method = test.getString("billing_method");
|
||||
String collect_right = test.getString("collect_right");
|
||||
|
||||
String unit_bank = test.getString("unit_bank");
|
||||
String sub_thing = test.getString("sub_thing");
|
||||
String still_id = test.getString("still_id");
|
||||
String sin_name = test.getString("sin_name");
|
||||
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
JSONArray jsonArray = test.getJSONArray("_widget_1735202262578");
|
||||
|
||||
|
||||
JSONArray jsonArray1 = test.getJSONArray("_widget_1736422847799");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("pk_org", still_unit);
|
||||
head.put("billno", report_number);
|
||||
head.put("djrq", report_date);
|
||||
head.put("djlxbm", trade_num);
|
||||
head.put("jkbxr", still_person);
|
||||
head.put("deptid", still_person_dep);
|
||||
head.put("jsfs", billing_method);
|
||||
head.put("paytarget", collect_right);
|
||||
head.put("fkyhzh", unit_bank);
|
||||
head.put("zy", sub_thing);
|
||||
head.put("zyx16", still_id);
|
||||
head.put("djxl", sin_name);
|
||||
|
||||
|
||||
|
||||
JSONArray files = new JSONArray();
|
||||
for (Object ooo : jsonArray1) {
|
||||
JSONObject ooo1 = (JSONObject) ooo;
|
||||
String sub_doc = ooo1.getString("sub_doc");
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("fileurl", sub_doc);
|
||||
files.add(jsonObject2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
JSONArray constrastitem = new JSONArray();
|
||||
for (Object oo : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) oo;
|
||||
String still_money = test1.getString("still_money");
|
||||
String jy_id = test1.getString("jy_id");
|
||||
String jy_one_id = test1.getString("jy_one_id");
|
||||
|
||||
|
||||
JSONObject jsonObject5 = new JSONObject();
|
||||
jsonObject5.put("cjkybje", still_money);
|
||||
jsonObject5.put("jkdhid", jy_id);
|
||||
jsonObject5.put("jkdbid", jy_one_id);
|
||||
constrastitem.add(jsonObject5);
|
||||
|
||||
}
|
||||
|
||||
|
||||
jsonObject.put("head", head);
|
||||
jsonObject.put("constrastitem", constrastitem);
|
||||
jsonObject.put("files", files);
|
||||
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
|
||||
|
||||
String s = NcUtils.addHk(jsonString);
|
||||
log.info("还款单新增 " + s);
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
String planname = jsonObject4.getString("planname");
|
||||
String begindate = jsonObject4.getString("begindate");
|
||||
String enddate = jsonObject4.getString("enddate");
|
||||
String orgname = jsonObject4.getString("orgname");
|
||||
String deptname = jsonObject4.getString("deptname");
|
||||
String szxmname = jsonObject4.getString("szxmname");
|
||||
String plandata = jsonObject4.getString("plandata");
|
||||
String ctrldata = jsonObject4.getString("ctrldata");
|
||||
String rundata = jsonObject4.getString("rundata");
|
||||
String readydate = jsonObject4.getString("readydate");
|
||||
String canusedata = jsonObject4.getString("canusedata");
|
||||
String balance = jsonObject4.getString("balance");
|
||||
DanJuAdd.insert("还款单新增", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, still_id);
|
||||
|
||||
}
|
||||
HuanKuanDangAdds.updataalls(id, code, msg, billid, ysmsg);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
HuanKuanDangAdds.updata(id, code, msg, billid);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
}
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
175
src/main/java/com/example/sso/newschedule/JieKuanDanAdd.java
Normal file
175
src/main/java/com/example/sso/newschedule/JieKuanDanAdd.java
Normal file
@ -0,0 +1,175 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.JieKuanDanAdds;
|
||||
import com.example.sso.newdao.JkDown;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class JieKuanDanAdd {
|
||||
@Scheduled(fixedRate = 10000)
|
||||
public String add() throws IOException {
|
||||
JSONArray add = JieKuanDanAdds.add();
|
||||
|
||||
|
||||
for (Object o : add) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
System.out.println(" test" + test);
|
||||
String borrow_person_org = test.getString("borrow_person_org");
|
||||
String doc_number = test.getString("doc_number");
|
||||
String doc_date = test.getString("doc_date");
|
||||
String trade_num = test.getString("trade_num");
|
||||
String borrower_person = test.getString("borrower_person");
|
||||
String borrower_person_dep = test.getString("borrower_person_dep");
|
||||
String pay_company = test.getString("pay_company");
|
||||
String pay_dept = test.getString("pay_dept");
|
||||
String billing_method = test.getString("billing_method");
|
||||
|
||||
String collect_right = test.getString("collect_right");
|
||||
String collect_person = test.getString("collect_person");
|
||||
String vendor = test.getString("vendor");
|
||||
String client = test.getString("client");
|
||||
String collection_bank = test.getString("collection_bank");
|
||||
String client_bank = test.getString("client_bank");
|
||||
String unit_bank = test.getString("unit_bank");
|
||||
String sub_thing = test.getString("sub_thing");
|
||||
String jy_loan_id = test.getString("jy_loan_id");
|
||||
String client_type = test.getString("client_type");
|
||||
String id = test.getString("_id");
|
||||
String sin_name = test.getString("sin_name");
|
||||
|
||||
|
||||
JSONArray jsonArray = test.getJSONArray("_widget_1733994690124");
|
||||
|
||||
|
||||
JSONArray jsonArray1 = test.getJSONArray("_widget_1736216155858");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("pk_org", borrow_person_org);
|
||||
head.put("djbh", doc_number);
|
||||
head.put("djrq", doc_date);
|
||||
head.put("djlxbm", trade_num);
|
||||
head.put("jkbxr", borrower_person);
|
||||
head.put("deptid", borrower_person_dep);
|
||||
head.put("fydwbm", pay_company);
|
||||
head.put("fydeptid", pay_dept);
|
||||
head.put("jsfs", billing_method);
|
||||
head.put("paytarget", collect_right);
|
||||
head.put("receiver", collect_person);
|
||||
head.put("hbbm", vendor);
|
||||
head.put("customer", client);
|
||||
head.put("skyhzh", collection_bank);
|
||||
head.put("custaccount", client_bank);
|
||||
head.put("fkyhzh", unit_bank);
|
||||
head.put("zy", sub_thing);
|
||||
head.put("zyx20", jy_loan_id);
|
||||
head.put("dgds", client_type);
|
||||
head.put("djxl", sin_name);
|
||||
|
||||
JSONArray busitem = new JSONArray();
|
||||
for (Object oo : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) oo;
|
||||
String item_code = test1.getString("item_code");
|
||||
String dep_expenses = test1.getString("dep_expenses");
|
||||
String taxes = test1.getString("taxes");
|
||||
String tax_rates = test1.getString("tax_rates");
|
||||
String invoice_type = test1.getString("invoice_type");
|
||||
String jy_forms_id = test1.getString("jy_forms_id");
|
||||
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("szxmid", item_code);
|
||||
jsonObject1.put("defitem50", dep_expenses);
|
||||
jsonObject1.put("defitem42", taxes);
|
||||
jsonObject1.put("defitem40", tax_rates);
|
||||
jsonObject1.put("defitem43", invoice_type);
|
||||
jsonObject1.put("defitem4", jy_forms_id);
|
||||
busitem.add(jsonObject1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
JSONArray files = new JSONArray();
|
||||
for (Object ooo : jsonArray1) {
|
||||
JSONObject ooo1 = (JSONObject) ooo;
|
||||
String sub_doc = ooo1.getString("sub_doc");
|
||||
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("fileurl", sub_doc);
|
||||
files.add(jsonObject2);
|
||||
}
|
||||
|
||||
|
||||
jsonObject.put("head", head);
|
||||
jsonObject.put("busitem", busitem);
|
||||
jsonObject.put("files", files);
|
||||
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
|
||||
|
||||
String s = NcUtils.addJk(jsonString);
|
||||
log.info("借款单新增 " +s);
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
String planname = jsonObject4.getString("planname");
|
||||
String begindate = jsonObject4.getString("begindate");
|
||||
String enddate = jsonObject4.getString("enddate");
|
||||
String orgname = jsonObject4.getString("orgname");
|
||||
String deptname = jsonObject4.getString("deptname");
|
||||
String szxmname = jsonObject4.getString("szxmname");
|
||||
String plandata = jsonObject4.getString("plandata");
|
||||
String ctrldata = jsonObject4.getString("ctrldata");
|
||||
String rundata = jsonObject4.getString("rundata");
|
||||
String readydate = jsonObject4.getString("readydate");
|
||||
String canusedata = jsonObject4.getString("canusedata");
|
||||
String balance = jsonObject4.getString("balance");
|
||||
DanJuAdd.insert("借款单新增", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, jy_loan_id);
|
||||
|
||||
}
|
||||
JieKuanDanAdds.updataal(id, code, msg, billid, ysmsg);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else if (s.contains("ysmsg")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JieKuanDanAdds.updataal(id, code, msg, billid, ysmsg);
|
||||
|
||||
return "olklkkk";
|
||||
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
JieKuanDanAdds.updata(id, code, msg, billid);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
}
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
33
src/main/java/com/example/sso/newschedule/JieKuanDanDel.java
Normal file
33
src/main/java/com/example/sso/newschedule/JieKuanDanDel.java
Normal file
@ -0,0 +1,33 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.JieKuanDanDels;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class JieKuanDanDel {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void jkd() {
|
||||
JSONArray shenpi = JieKuanDanDels.shenpi();
|
||||
for (Object o : shenpi){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String apply_ncid = test.getString("loan_ncid");
|
||||
String id = test.getString("_id");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid",apply_ncid);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.delJk(jsonString);
|
||||
log.info("删除 " +s );
|
||||
JSONObject jsonObject1 = JSON.parseObject(s);
|
||||
String code = jsonObject1.getString("code");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
JieKuanDanDels.updata(id,code,msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.JieKuanDanTongGuos;
|
||||
import com.example.sso.newdao.JkDown;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class JieKuanDanTongGuo {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public String jktg() throws IOException {
|
||||
|
||||
JSONArray shenpi = JieKuanDanTongGuos.shenpi();
|
||||
for (Object o : shenpi) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
String loan_ncid = test.getString("loan_ncid");
|
||||
String jy_loan_id = test.getString("jy_loan_id");
|
||||
String id = test.getString("_id");
|
||||
String opinion_all = test.getString("opinion_all");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid", loan_ncid);
|
||||
jsonObject.put("spyj",opinion_all);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.approveJk(jsonString);
|
||||
log.info("借款单通过 " + s);
|
||||
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
String balance = jsonObject4.getString("balance");
|
||||
String begindate = jsonObject4.getString("begindate");
|
||||
String canusedata = jsonObject4.getString("canusedata");
|
||||
String ctrldata = jsonObject4.getString("ctrldata");
|
||||
String deptname = jsonObject4.getString("deptname");
|
||||
String enddate = jsonObject4.getString("enddate");
|
||||
String orgname = jsonObject4.getString("orgname");
|
||||
String plandata = jsonObject4.getString("plandata");
|
||||
String planname = jsonObject4.getString("planname");
|
||||
String readydate = jsonObject4.getString("readydate");
|
||||
String rundata = jsonObject4.getString("rundata");
|
||||
String szxmname = jsonObject4.getString("szxmname");
|
||||
|
||||
DanJuAdd.insert("借款单通过", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, jy_loan_id);
|
||||
|
||||
}
|
||||
JieKuanDanTongGuos.updataal(id, code, msg, ysmsg);
|
||||
JkDown.jk(id);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else if (s.contains("ysmsg")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
|
||||
JieKuanDanTongGuos.updataal(id, code, msg, ysmsg);
|
||||
return "olklkkk";
|
||||
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
JieKuanDanTongGuos.updata(id, code, msg);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
71
src/main/java/com/example/sso/newschedule/KeHuDangAn.java
Normal file
71
src/main/java/com/example/sso/newschedule/KeHuDangAn.java
Normal file
@ -0,0 +1,71 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.GongYingShangYinHangZhangHus;
|
||||
import com.example.sso.newdao.KeHuDangAns;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class KeHuDangAn {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void KeHuDangAna() {
|
||||
JSONArray add = KeHuDangAns.add();
|
||||
|
||||
|
||||
for (Object o : add){
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String cli_name = test.getString("cli_name");
|
||||
String taxpayer_code = test.getString("taxpayer_code");
|
||||
String enable_state = test.getString("enable_state");
|
||||
String cli_code = test.getString("cli_code");
|
||||
String cli_type = test.getString("cli_type");
|
||||
String remark = test.getString("remark");
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("name",cli_name);
|
||||
head.put("taxpayerid",taxpayer_code);
|
||||
head.put("enablestate",enable_state);
|
||||
head.put("pk_customerclass",cli_code);
|
||||
head.put("custtype",cli_type);
|
||||
head.put("memo",remark);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString = head.toJSONString();
|
||||
log.info("参数 " +jsonString );
|
||||
|
||||
|
||||
String s = NcUtils.kehudangan(jsonString);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("message");
|
||||
|
||||
KeHuDangAns.updata(id,code,msg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.KeHuDangAns;
|
||||
import com.example.sso.newdao.KeShangYinHangZhangHus;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class KeShangYinHangZhangHu {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void KeShangYinHangZhangHua() {
|
||||
JSONArray add = KeShangYinHangZhangHus.add();
|
||||
|
||||
|
||||
for (Object o : add){
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String bank_account = test.getString("bank_account");
|
||||
String bank_name = test.getString("bank_name");
|
||||
String client_code = test.getString("client_code");
|
||||
String bank_open_code = test.getString("bank_open_code");
|
||||
String acc_gender = test.getString("acc_gender");
|
||||
String enable_state = test.getString("enable_state");
|
||||
String remark = test.getString("remark");
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("accnum",bank_account);
|
||||
head.put("accname",bank_name);
|
||||
head.put("customercode",client_code);
|
||||
head.put("pk_bankdoc",bank_open_code);
|
||||
head.put("accountproperty",acc_gender);
|
||||
head.put("enablestate",enable_state);
|
||||
head.put("memo",remark);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString = head.toJSONString();
|
||||
log.info("参数 " +jsonString );
|
||||
|
||||
|
||||
String s = NcUtils.keshangyinhang(jsonString);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("message");
|
||||
|
||||
KeShangYinHangZhangHus.updata(id,code,msg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.RenYuanXinXiDangAns;
|
||||
import com.example.sso.newdao.ShenQingAdds;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class RenYuanXinXiDangAn {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void dangan() {
|
||||
JSONArray add = RenYuanXinXiDangAns.add();
|
||||
|
||||
|
||||
for (Object o : add) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String staff_code = test.getString("staff_code");
|
||||
String staff_name = test.getString("staff_name");
|
||||
String staff_firm = test.getString("staff_firm");
|
||||
String staff_phone = test.getString("staff_phone");
|
||||
String enable_state = test.getString("enable_state");
|
||||
String remark = test.getString("remark");
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
JSONArray jsonArray = test.getJSONArray("_widget_1735884553996");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("code", staff_code);
|
||||
head.put("name", staff_name);
|
||||
head.put("pk_org", staff_firm);
|
||||
head.put("phone", staff_phone);
|
||||
head.put("enablestate", enable_state);
|
||||
head.put("memo", remark);
|
||||
|
||||
|
||||
JSONArray busitem = new JSONArray();
|
||||
for (Object oo : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) oo;
|
||||
String staff_company = test1.getString("staff_company");
|
||||
String staff_sort = test1.getString("staff_sort");
|
||||
String staff_dept = test1.getString("staff_dept");
|
||||
String is_main = test1.getString("is_main");
|
||||
|
||||
String begin_text = test1.getString("begin_text");
|
||||
String stop_text = test1.getString("stop_text");
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("pk_org", staff_company);
|
||||
jsonObject1.put("pk_psncl", staff_sort);
|
||||
jsonObject1.put("pk_dept", staff_dept);
|
||||
jsonObject1.put("mainjob", is_main);
|
||||
jsonObject1.put("startdate", begin_text);
|
||||
jsonObject1.put("enddate", stop_text);
|
||||
busitem.add(jsonObject1);
|
||||
}
|
||||
|
||||
|
||||
jsonObject.put("head", head);
|
||||
jsonObject.put("body", busitem);
|
||||
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
log.info("参数 " + jsonString);
|
||||
|
||||
|
||||
String s = NcUtils.jypsndoc(jsonString);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("message");
|
||||
|
||||
RenYuanXinXiDangAns.updata(id, code, msg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.RenYuanXinXiDangAns;
|
||||
import com.example.sso.newdao.RenYuanYinHangZhangHus;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class RenYuanYinHangZhangHu {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void zhaunghu() {
|
||||
JSONArray add = RenYuanYinHangZhangHus.add();
|
||||
|
||||
|
||||
for (Object o : add){
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
String staff_code = test.getString("staff_code");
|
||||
String bank_account = test.getString("bank_account");
|
||||
String bank_name = test.getString("bank_name");
|
||||
String bank_open = test.getString("bank_open");
|
||||
String enable_state = test.getString("enable_state");
|
||||
String remark = test.getString("remark");
|
||||
|
||||
String id = test.getString("_id");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("psncode",staff_code);
|
||||
head.put("accnum",bank_account);
|
||||
head.put("accname",bank_name);
|
||||
head.put("pk_bankdoc",bank_open);
|
||||
head.put("enablestate",enable_state);
|
||||
head.put("memo",remark);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String jsonString = head.toJSONString();
|
||||
log.info("参数 " +jsonString );
|
||||
|
||||
|
||||
String s = NcUtils.jypsnbankaccbasadd(jsonString);
|
||||
log.info("结果 " + s);
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("message");
|
||||
|
||||
RenYuanYinHangZhangHus.updata(id,code,msg);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
150
src/main/java/com/example/sso/newschedule/ShenQingAdd.java
Normal file
150
src/main/java/com/example/sso/newschedule/ShenQingAdd.java
Normal file
@ -0,0 +1,150 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.ShenQingAdds;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ShenQingAdd {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public String add() {
|
||||
JSONArray add = ShenQingAdds.add();
|
||||
|
||||
|
||||
for (Object o : add) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
System.out.println(" test" + test);
|
||||
String company_code = test.getString("company_code");
|
||||
String bill_num = test.getString("bill_num");
|
||||
String bill_datetext = test.getString("bill_datetext");
|
||||
String trade_num = test.getString("trade_num");
|
||||
String apply_per = test.getString("apply_per");
|
||||
String apply_dept = test.getString("apply_dept");
|
||||
String pay_company = test.getString("pay_company");
|
||||
String pay_dept = test.getString("pay_dept");
|
||||
String jy_id = test.getString("jy_id");
|
||||
String id = test.getString("_id");
|
||||
String sin_name = test.getString("sin_name");
|
||||
|
||||
|
||||
JSONArray jsonArray = test.getJSONArray("_widget_1733994690124");
|
||||
|
||||
|
||||
JSONArray jsonArray1 = test.getJSONArray("_widget_1735615117515");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("pk_org", company_code);
|
||||
head.put("billno", bill_num);
|
||||
head.put("billdate", bill_datetext);
|
||||
head.put("pk_tradetype", trade_num);
|
||||
head.put("billmaker", apply_per);
|
||||
head.put("apply_dept", apply_dept);
|
||||
head.put("assume_org", pay_company);
|
||||
head.put("assume_dept", pay_dept);
|
||||
head.put("defitem20", jy_id);
|
||||
head.put("djxl", sin_name);
|
||||
|
||||
JSONArray busitem = new JSONArray();
|
||||
|
||||
for (Object oo : jsonArray) {
|
||||
JSONObject test1 = (JSONObject) oo;
|
||||
String item_code = test1.getString("item_code");
|
||||
String sub_thing = test1.getString("sub_thing");
|
||||
Double sub_fee = test1.getDouble("sub_fee");
|
||||
String jy_subid = test1.getString("jy_subid");
|
||||
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("pk_iobsclass", item_code);
|
||||
jsonObject1.put("reason", sub_thing);
|
||||
jsonObject1.put("orig_amount", sub_fee);
|
||||
jsonObject1.put("defitem4", jy_subid);
|
||||
busitem.add(jsonObject1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
JSONArray files = new JSONArray();
|
||||
for (Object ooo : jsonArray1) {
|
||||
JSONObject ooo1 = (JSONObject) ooo;
|
||||
String sub_doc = ooo1.getString("sub_doc");
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("fileurl", sub_doc);
|
||||
files.add(jsonObject2);
|
||||
}
|
||||
|
||||
|
||||
jsonObject.put("head", head);
|
||||
jsonObject.put("busitem", busitem);
|
||||
jsonObject.put("files", files);
|
||||
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
|
||||
|
||||
String s = NcUtils.addMtapp(jsonString);
|
||||
log.info("申请单新增 " + s);
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
String balance = jsonObject4.getString("balance");
|
||||
String begindate = jsonObject4.getString("begindate");
|
||||
String canusedata = jsonObject4.getString("canusedata");
|
||||
String ctrldata = jsonObject4.getString("ctrldata");
|
||||
String deptname = jsonObject4.getString("deptname");
|
||||
String enddate = jsonObject4.getString("enddate");
|
||||
String orgname = jsonObject4.getString("orgname");
|
||||
String plandata = jsonObject4.getString("plandata");
|
||||
String planname = jsonObject4.getString("planname");
|
||||
String readydate = jsonObject4.getString("readydate");
|
||||
String rundata = jsonObject4.getString("rundata");
|
||||
String szxmname = jsonObject4.getString("szxmname");
|
||||
|
||||
DanJuAdd.insert("申请单新增", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, jy_id);
|
||||
|
||||
}
|
||||
ShenQingAdds.updataal(id, code, msg, billid, ysmsg);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else if (s.contains("ysmsg")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
|
||||
ShenQingAdds.updataal(id, code, msg, billid, ysmsg);
|
||||
return "olklkkk";
|
||||
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
String billid = jsonObject3.getString("billid");
|
||||
ShenQingAdds.updata(id, code, msg, billid);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
}
|
||||
return "无操作";
|
||||
}
|
||||
|
||||
}
|
||||
34
src/main/java/com/example/sso/newschedule/ShenQingDel.java
Normal file
34
src/main/java/com/example/sso/newschedule/ShenQingDel.java
Normal file
@ -0,0 +1,34 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.ShenQingDels;
|
||||
import com.example.sso.newdao.ShenQingTongGuos;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ShenQingDel {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void main() {
|
||||
JSONArray shenpi = ShenQingDels.shenpi();
|
||||
for (Object o : shenpi){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String apply_ncid = test.getString("apply_ncid");
|
||||
String id = test.getString("_id");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid",apply_ncid);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.delMtapp(jsonString);
|
||||
log.info("删除 " +s );
|
||||
JSONObject jsonObject1 = JSON.parseObject(s);
|
||||
String code = jsonObject1.getString("code");
|
||||
String msg = jsonObject1.getString("msg");
|
||||
ShenQingDels.updata(id,code,msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
107
src/main/java/com/example/sso/newschedule/ShenQingTongGuo.java
Normal file
107
src/main/java/com/example/sso/newschedule/ShenQingTongGuo.java
Normal file
@ -0,0 +1,107 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.DanJuAdd;
|
||||
import com.example.sso.newdao.ShenQingAdds;
|
||||
import com.example.sso.newdao.ShenQingTongGuos;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ShenQingTongGuo {
|
||||
@Scheduled(fixedRate = 3000)
|
||||
public String tongguo() {
|
||||
|
||||
JSONArray shenpi = ShenQingTongGuos.shenpi();
|
||||
for (Object o : shenpi){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String apply_ncid = test.getString("apply_ncid");
|
||||
String jy_id = test.getString("jy_id");
|
||||
String id = test.getString("_id");
|
||||
String opinion_all = test.getString("opinion_all");
|
||||
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid",apply_ncid);
|
||||
jsonObject.put("spyj",opinion_all);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String s = NcUtils.approveMtapp(jsonString);
|
||||
log.info("申请单通过 " + s);
|
||||
|
||||
|
||||
String balance = "";
|
||||
String begindate = "";
|
||||
String canusedata = "";
|
||||
String ctrldata = "";
|
||||
String deptname = "";
|
||||
String enddate = "";
|
||||
String orgname = "";
|
||||
String plandata = "";
|
||||
String planname = "";
|
||||
String readydate = "";
|
||||
String rundata = "";
|
||||
String szxmname = "";
|
||||
|
||||
JSONObject jsonObject3 = JSON.parseObject(s);
|
||||
|
||||
if (s.contains("ysdata")) {
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
JSONArray jsonArray2 = jsonObject3.getJSONArray("ysdata");
|
||||
for (Object object : jsonArray2) {
|
||||
JSONObject jsonObject4 = (JSONObject) object;
|
||||
balance = jsonObject4.getString("balance");
|
||||
begindate = jsonObject4.getString("begindate");
|
||||
canusedata = jsonObject4.getString("canusedata");
|
||||
ctrldata = jsonObject4.getString("ctrldata");
|
||||
deptname = jsonObject4.getString("deptname");
|
||||
enddate = jsonObject4.getString("enddate");
|
||||
orgname = jsonObject4.getString("orgname");
|
||||
plandata = jsonObject4.getString("plandata");
|
||||
planname = jsonObject4.getString("planname");
|
||||
readydate = jsonObject4.getString("readydate");
|
||||
rundata = jsonObject4.getString("rundata");
|
||||
szxmname = jsonObject4.getString("szxmname");
|
||||
DanJuAdd.insert("申请单通过", planname, begindate, enddate, orgname, deptname, szxmname, plandata,
|
||||
ctrldata, rundata, readydate, canusedata, balance, jy_id);
|
||||
|
||||
|
||||
}
|
||||
ShenQingTongGuos.updataal(id, code, msg, ysmsg);
|
||||
|
||||
|
||||
return "okkkkk";
|
||||
} else if (s.contains("ysmsg")){
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
String ysmsg = jsonObject3.getString("ysmsg");
|
||||
|
||||
ShenQingTongGuos.updataal(id, code, msg, ysmsg);
|
||||
return "olklkkk";
|
||||
|
||||
} else {
|
||||
|
||||
String code = jsonObject3.getString("code");
|
||||
String msg = jsonObject3.getString("msg");
|
||||
|
||||
ShenQingTongGuos.updata(id, code, msg);
|
||||
return "lklklkll";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return "无操作";
|
||||
}
|
||||
}
|
||||
68
src/main/java/com/example/sso/newschedule/ZhiHangTb.java
Normal file
68
src/main/java/com/example/sso/newschedule/ZhiHangTb.java
Normal file
@ -0,0 +1,68 @@
|
||||
package com.example.sso.newschedule;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.newdao.ZhiHang;
|
||||
import com.example.sso.util.NcUtils;
|
||||
import org.springframework.boot.configurationprocessor.json.JSONException;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ZhiHangTb {
|
||||
@Scheduled(fixedRate = 5000)
|
||||
public void zh() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONArray list = ZhiHang.list();
|
||||
for (Object o : list){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String zhhName = test.getString("zhhname");
|
||||
String zhhCode = test.getString("zhhcode");
|
||||
String yhCode = test.getString("yhcode");
|
||||
String id = test.getString("_id");
|
||||
String yhname = test.getString("yhname");
|
||||
String yhcode = test.getString("yhcode");
|
||||
|
||||
|
||||
JSONObject jsonObject12 = new JSONObject();
|
||||
jsonObject12.put("name", yhname);
|
||||
jsonObject12.put("code", yhcode);
|
||||
|
||||
String jsonString12 = jsonObject12.toJSONString();
|
||||
|
||||
NcUtils.yinhangdangan(jsonString12);
|
||||
|
||||
com.alibaba.fastjson.JSONObject jsonObject = new com.alibaba.fastjson.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);
|
||||
JSONObject jsonObject1 = JSON.parseObject(zhiahangdangan);
|
||||
String message = jsonObject1.getString("message");
|
||||
String code = jsonObject1.getString("code");
|
||||
ZhiHang.up(id,message,code);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user