|
|
|
@ -23,11 +23,18 @@ public class TmdMc {
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void callErpWebService() throws RemoteException {
|
|
|
|
|
String shopOrder = "SO20210714";
|
|
|
|
|
String stepId = "OP001";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//请求参数
|
|
|
|
|
ZprodordconfStruIn [] ins = new ZprodordconfStruIn[1];
|
|
|
|
|
|
|
|
|
|
ZprodordconfStruIn struIn = new ZprodordconfStruIn();
|
|
|
|
|
//生产订单
|
|
|
|
|
struIn.setAufnr("SO20210714");
|
|
|
|
|
struIn.setAufnr(shopOrder);
|
|
|
|
|
//步骤标示
|
|
|
|
|
struIn.setVornr("OP001");
|
|
|
|
|
struIn.setVornr(stepId);
|
|
|
|
|
struIn.setAueru("1");
|
|
|
|
|
//良品数量
|
|
|
|
|
struIn.setLmnga(new BigDecimal(10));
|
|
|
|
@ -41,15 +48,23 @@ public class TmdMc {
|
|
|
|
|
struIn.setIsm04(new BigDecimal(1));
|
|
|
|
|
struIn.setIsm05(new BigDecimal(1));
|
|
|
|
|
struIn.setIsm06(new BigDecimal(1));
|
|
|
|
|
|
|
|
|
|
ZprodordconfStruIn [] ins = new ZprodordconfStruIn[0];
|
|
|
|
|
ins[0] = struIn;
|
|
|
|
|
TableOfZprodordconfStruInHolder inHolder = new TableOfZprodordconfStruInHolder(ins);
|
|
|
|
|
|
|
|
|
|
//返回对象
|
|
|
|
|
ZprodordconfStruOut[] outs = new ZprodordconfStruOut[0];
|
|
|
|
|
outs[0] = new ZprodordconfStruOut();
|
|
|
|
|
ZprodordconfStruOut[] outs = new ZprodordconfStruOut[1];
|
|
|
|
|
|
|
|
|
|
ZprodordconfStruOut struOut = new ZprodordconfStruOut();
|
|
|
|
|
struOut.setAufnr(shopOrder);
|
|
|
|
|
struOut.setVornr(stepId);
|
|
|
|
|
struOut.setAueru("1");
|
|
|
|
|
struOut.setLmnga(new BigDecimal(1));
|
|
|
|
|
struOut.setRet("");
|
|
|
|
|
struOut.setMsg("");
|
|
|
|
|
outs[0] = struOut;
|
|
|
|
|
TableOfZprodordconfStruOutHolder outHolder = new TableOfZprodordconfStruOutHolder(outs);
|
|
|
|
|
|
|
|
|
|
//调用WS
|
|
|
|
|
String erpJson = ERPAPI.erpWebService().zmesProdordconf(inHolder, outHolder);
|
|
|
|
|
System.out.println("ERP接口返回:" + erpJson);
|
|
|
|
|
}
|
|
|
|
|