物料优化
This commit is contained in:
parent
38438e7742
commit
197432459e
|
|
@ -187,14 +187,16 @@ public class MaterialToGyMesListener implements IBusinessListener {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
if (!dataArr.isEmpty()) {
|
if (!dataArr.isEmpty()) {
|
||||||
pushData(dataArr);
|
JSONObject jsonObj = new JSONObject();
|
||||||
|
jsonObj.put("list", dataArr);
|
||||||
|
pushData(jsonObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送同步数据
|
* 推送同步数据
|
||||||
*/
|
*/
|
||||||
private void pushData(JSONArray param) throws BusinessException {
|
private void pushData(JSONObject param) throws BusinessException {
|
||||||
// String jsonString = param.toJSONString();
|
// String jsonString = param.toJSONString();
|
||||||
// 转json字符串的时候保留null值
|
// 转json字符串的时候保留null值
|
||||||
String jsonStr = JSON.toJSONString(param,
|
String jsonStr = JSON.toJSONString(param,
|
||||||
|
|
@ -203,7 +205,7 @@ public class MaterialToGyMesListener implements IBusinessListener {
|
||||||
);
|
);
|
||||||
logger.error("gymes-Material-param = " + jsonStr);
|
logger.error("gymes-Material-param = " + jsonStr);
|
||||||
// NCCForUAPLogger.debug("gymes-Material-param = " + jsonStr);
|
// NCCForUAPLogger.debug("gymes-Material-param = " + jsonStr);
|
||||||
String baseUrl = configParams.get("gymesBaseUrl");
|
String baseUrl = configParams.get("mesBaseUrl");
|
||||||
String requestUrl = baseUrl + addUrl;
|
String requestUrl = baseUrl + addUrl;
|
||||||
logger.error("gymes-Material-url = " + requestUrl);
|
logger.error("gymes-Material-url = " + requestUrl);
|
||||||
String result = ThirdPartyPostRequestUtil.sendPostRequest(requestUrl, jsonStr);
|
String result = ThirdPartyPostRequestUtil.sendPostRequest(requestUrl, jsonStr);
|
||||||
|
|
@ -230,8 +232,8 @@ public class MaterialToGyMesListener implements IBusinessListener {
|
||||||
|
|
||||||
private Map getStockInfo(String pkMaterial) throws BusinessException {
|
private Map getStockInfo(String pkMaterial) throws BusinessException {
|
||||||
String sql = " select martype, wholemanaflag, outpriority, pk_stordoc, remain" +
|
String sql = " select martype, wholemanaflag, outpriority, pk_stordoc, remain" +
|
||||||
"from bd_materialstock" +
|
" from bd_materialstock " +
|
||||||
"where pk_material = '" + pkMaterial + "' ";
|
" where pk_material = '" + pkMaterial + "' ";
|
||||||
Map map = (Map) new BaseDAO().executeQuery(sql, new MapProcessor());
|
Map map = (Map) new BaseDAO().executeQuery(sql, new MapProcessor());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
@ -241,8 +243,8 @@ public class MaterialToGyMesListener implements IBusinessListener {
|
||||||
" pk_materialprod " +
|
" pk_materialprod " +
|
||||||
"FROM " +
|
"FROM " +
|
||||||
" bd_materialprod a" +
|
" bd_materialprod a" +
|
||||||
"left join org_dept b on a.pk_prodeptdoc = b.pk_dept " +
|
" left join org_dept b on a.pk_prodeptdoc = b.pk_dept " +
|
||||||
"where a.pk_material = '" + pkMaterial + "' ";
|
" where a.pk_material = '" + pkMaterial + "' ";
|
||||||
Map map = (Map) new BaseDAO().executeQuery(sql, new MapProcessor());
|
Map map = (Map) new BaseDAO().executeQuery(sql, new MapProcessor());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue