南歧nc65对接

This commit is contained in:
hjx
2025-12-05 18:21:36 +08:00
parent 73a2d7f1c9
commit 7efbe3d404
49 changed files with 2117 additions and 44 deletions
@@ -11,7 +11,10 @@ import java.util.Date;
public class Test {
public static void main(String[] args) {
Date date = new Date();
//ys();
//sk();
}
/* public static void ys(){Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = sdf.format(date);
Ysitem item=new Ysitem();
@@ -35,8 +38,8 @@ public class Test {
billhead.setPk_org("NG0401");
billhead.setSett_org("NG0401");
billhead.setCreationtime(dateString);
billhead.setCreator("xiangna");
billhead.setPk_billtype("F0");
billhead.setCreator("xiangna");
billhead.setPk_tradetype("D0");
billhead.setBillclass("ys");
billhead.setIsinit("N");
@@ -83,6 +86,78 @@ public class Test {
} catch (JAXBException e) {
e.printStackTrace();
}
};
}
public static void sk(){Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = sdf.format(date);
SKitem item=new SKitem();
item.setSo_deptid("NG040104");
item.setPk_deptid("NG040104");
item.setCheckdirection("ar");
item.setPk_psndoc("111");
item.setCustomer("25849");
item.setPurchaseorder("sk96321");
item.setObjtype("0");
item.setDirection("1");
item.setScomment("新永鸿工业气体有限公司");
item.setPk_currtype("CMY");
item.setMoney_cr("1000.00");
item.setMoney_bal("1000.00");
SKbodys bodys=new SKbodys();
bodys.setItem(item);
SKbillhead billhead=new SKbillhead();
billhead.setPk_group("CNK");
billhead.setPk_org("NG0401");
billhead.setSett_org("NG0401");
billhead.setCreationtime(dateString);
billhead.setPk_billtype("F2");
billhead.setCreator("zhanghongming");
billhead.setPk_tradetype("D2");
billhead.setBillclass("sk");
billhead.setBilldate(dateString);
billhead.setSyscode("0");
billhead.setBillno("");
billhead.setDef59("1111111");
billhead.setSrc_syscode("0");
billhead.setBillstatus("0");
billhead.setBillmaker("zhanghongming");
billhead.setPk_busitype("");
billhead.setBillyear("2025");
billhead.setBillperiod("12");
billhead.setEffectstatus("0");
billhead.setDef28("nqyw");
billhead.setDef29("11111111");
billhead.setBodys(bodys);
SKbill bill=new SKbill();
bill.setId("1111");
bill.setBillhead(billhead);
SKufinterface ufinterface=new SKufinterface();
ufinterface.setAccount("NKNC");
ufinterface.setBilltype("F2");
ufinterface.setBusinessunitcode("");
ufinterface.setFilename("");
ufinterface.setIsexchange("Y");
ufinterface.setOrgcode("NG0401");
ufinterface.setReceiver("NG0401");
ufinterface.setReplace("Y");
ufinterface.setRoottag("");
ufinterface.setSender("nqyw");
ufinterface.setBill(bill);
JAXBContext jaxbContext = null;
//String xmlString ="<ufinterface account=\"NKNC\" billtype=\"F0\" businessunitcode=\"\" filename=\"\" groupcode=\"CNK\" isexchange=\"Y\" orgcode=\"NG10\" receiver=\"NG10\" replace=\"Y\" roottag=\"\" sender=\"NKT_MY\">";
try {
jaxbContext = JAXBContext.newInstance(SKufinterface.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选
StringWriter sw = new StringWriter();
marshaller.marshal(ufinterface, sw);
String xmlString = sw.toString(); // 这是要发送的XML字符串
System.out.println(xmlString);
} catch (JAXBException e) {
e.printStackTrace();
}
};*/
}