|
@@ -514,13 +514,42 @@ public class ERPServiceImpl implements ERPService {
|
|
|
//asnMain.setSUPPLIER_CODE("108207");
|
|
//asnMain.setSUPPLIER_CODE("108207");
|
|
|
data.put("data", asnBoxMain);
|
|
data.put("data", asnBoxMain);
|
|
|
EDIX5JsonHttpClient edix5JsonHttpClient = new EDIX5JsonHttpClient(xmediConfiguration.getX5appid(), xmediConfiguration.getX5appkey(), xmediConfiguration.getX5createAsnBoxUrl());
|
|
EDIX5JsonHttpClient edix5JsonHttpClient = new EDIX5JsonHttpClient(xmediConfiguration.getX5appid(), xmediConfiguration.getX5appkey(), xmediConfiguration.getX5createAsnBoxUrl());
|
|
|
- X5Response<Object> createAsn = edix5JsonHttpClient.post(data, xmediConfiguration, baseDao, "CreateAsn");
|
|
|
|
|
|
|
+ X5Response<Object> createAsn = edix5JsonHttpClient.post(data, xmediConfiguration, baseDao, "CreateAsnBox");
|
|
|
result.put("header", createAsn.getHeader());
|
|
result.put("header", createAsn.getHeader());
|
|
|
result.put("body", createAsn.getBody());
|
|
result.put("body", createAsn.getBody());
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Map<String, Object> purchasePrint(String id) {
|
|
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
|
|
+ Map<String, Object> data = new HashMap<>();
|
|
|
|
|
+ UUID uuid = UUID.randomUUID();
|
|
|
|
|
+ PurchasePrint purchasePrint = new PurchasePrint();
|
|
|
|
|
+ purchasePrint.setSYSTEMID("SRM");
|
|
|
|
|
+ purchasePrint.setGUID(uuid.toString().replaceAll("-", "").toUpperCase());
|
|
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select pu_code from purchase where pu_id=" + id);
|
|
|
|
|
+ // 获取当前日期
|
|
|
|
|
+ Date currentDate = new Date();
|
|
|
|
|
+ // 创建SimpleDateFormat对象,指定格式
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
+ SimpleDateFormat hhmmss = new SimpleDateFormat("yyyyMMddHHMMSS");
|
|
|
|
|
+ if (rs.next()){
|
|
|
|
|
+ String pu_code = rs.getGeneralString("pu_code");
|
|
|
|
|
+ purchasePrint.setPURORD_NUM("4531697393");
|
|
|
|
|
+ purchasePrint.setSUPPLIER_CODE("108207");
|
|
|
|
|
+ purchasePrint.setSUPPLIER_NAME("联合无线(香港)有限公司");
|
|
|
|
|
+ purchasePrint.setOPERATE_TIME(hhmmss.format(currentDate));
|
|
|
|
|
+ data.put("data", purchasePrint);
|
|
|
|
|
+ EDIX5JsonHttpClient edix5JsonHttpClient = new EDIX5JsonHttpClient(xmediConfiguration.getX5appid(), xmediConfiguration.getX5appkey(), xmediConfiguration.getX5PurchasePrintUrl());
|
|
|
|
|
+ X5Response<Object> purchasePrint_result = edix5JsonHttpClient.post(data, xmediConfiguration, baseDao, "PurchasePrint");
|
|
|
|
|
+ result.put("header", purchasePrint_result.getHeader());
|
|
|
|
|
+ result.put("body", purchasePrint_result.getBody());
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public static String unescapeJsonWithJackson(String jsonString) {
|
|
public static String unescapeJsonWithJackson(String jsonString) {
|
|
|
try {
|
|
try {
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
ObjectMapper mapper = new ObjectMapper();
|