|
|
@@ -228,6 +228,9 @@ public class Item extends Controller {
|
|
|
if (pricingmetod == 1 && !specalnote.contains("此商品单价为平方价")) {
|
|
|
specalnote = "此商品单价为平方价;" + specalnote;
|
|
|
}
|
|
|
+ if (pricingmetod == 0 && specalnote.contains("此商品单价为平方价")) {
|
|
|
+ specalnote = specalnote.replace("此商品单价为平方价;", "");
|
|
|
+ }
|
|
|
sqlFactory.addParameter("specalnote", specalnote);
|
|
|
sqlFactory.addParameter("prodline", content.getStringValue("prodline"));
|
|
|
sqlFactory.addParameter("device", content.getStringValue("device"));
|
|
|
@@ -382,13 +385,13 @@ public class Item extends Controller {
|
|
|
Long itemid = content.getLong("itemid");
|
|
|
Rows rows = dbConnect.runSqlQuery("select itemno from plm_item where siteid='" + siteid + "' and itemid=" + itemid);
|
|
|
|
|
|
- if(siteid.equalsIgnoreCase("lsa")){
|
|
|
+ if (siteid.equalsIgnoreCase("lsa")) {
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("classname", "getIcinvbal");
|
|
|
object.put("method", "getMsg");
|
|
|
|
|
|
JSONObject content = new JSONObject();
|
|
|
- content.put("fitemnos", rows.toJsonArray("itemno"));
|
|
|
+ content.put("fitemnos", rows.toJsonArray("itemno"));
|
|
|
object.put("content", content);
|
|
|
|
|
|
WebRequest request = new WebRequest();
|
|
|
@@ -396,16 +399,16 @@ public class Item extends Controller {
|
|
|
"http://60.190.151.198:8089/BYESB/jaxrs/webclientrest");
|
|
|
for (Row row : rows) {
|
|
|
JSONArray jsonArrayResult = new JSONArray();
|
|
|
- if(isJSONArray(result)){
|
|
|
+ if (isJSONArray(result)) {
|
|
|
jsonArrayResult = JSONArray.parseArray(result);
|
|
|
}
|
|
|
- if(!jsonArrayResult.isEmpty()){
|
|
|
- row.put("invbal_qty",((JSONObject)jsonArrayResult.get(0)).getBigDecimal("FQty"));
|
|
|
- }else{
|
|
|
- row.put("invbal_qty",0);
|
|
|
+ if (!jsonArrayResult.isEmpty()) {
|
|
|
+ row.put("invbal_qty", ((JSONObject) jsonArrayResult.get(0)).getBigDecimal("FQty"));
|
|
|
+ } else {
|
|
|
+ row.put("invbal_qty", 0);
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
ERPDocking erpDocking = new ERPDocking(siteid);
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
if (Parameter.get("system.ccerp_dockswitch").equalsIgnoreCase("true")) {
|
|
|
@@ -427,7 +430,6 @@ public class Item extends Controller {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
return getSucReturnObject().setData(rows.isNotEmpty() ? rows.get(0) : new Row()).toString();
|
|
|
}
|
|
|
|