|
@@ -274,11 +274,10 @@ public class LSALogistics extends Controller {
|
|
|
JSONObject jsonObject = wzwlDocking.queryWzwlOrderAmountExtendList(row.getString("billno"));
|
|
|
if(jsonObject.getString("success").equals("true")){
|
|
|
JSONArray data = jsonObject.getJSONArray("data");
|
|
|
- dbConnect.runSqlUpdate("update sa_logistics set logisticsamount="+((JSONObject)data.get(0)).getBigDecimalValue("transportFee")+",volume='"+((JSONObject)data.get(0)).getBigDecimalValue("volume")+"',weight='"+((JSONObject)data.get(0)).getBigDecimalValue("weight")+"',packageqty='"+((JSONObject)data.get(0)).getIntValue("quantity")+"' where sa_logisticsid="+sa_logisticsid);
|
|
|
+ dbConnect.runSqlUpdate("update sa_logistics set logisticsamount="+((JSONObject)data.get(0)).getBigDecimalValue("transportFee")+",volume='"+(((JSONObject)data.get(0)).getBigDecimalValue("volume").compareTo(BigDecimal.ZERO)>0?((JSONObject)data.get(0)).getBigDecimalValue("volume"):row.getDouble("volume"))+"',weight='"+(((JSONObject)data.get(0)).getBigDecimalValue("weight").compareTo(BigDecimal.ZERO)>0?((JSONObject)data.get(0)).getBigDecimalValue("weight"):row.getDouble("weight"))+"' where sa_logisticsid="+sa_logisticsid);
|
|
|
row.put("logisticsamount",((JSONObject)data.get(0)).getBigDecimalValue("transportFee"));
|
|
|
- row.put("volume",((JSONObject)data.get(0)).getBigDecimalValue("volume"));
|
|
|
- row.put("weight",((JSONObject)data.get(0)).getBigDecimalValue("weight"));
|
|
|
- row.put("packageqty",((JSONObject)data.get(0)).getBigDecimalValue("quantity"));
|
|
|
+ row.put("volume",(((JSONObject)data.get(0)).getBigDecimalValue("volume").compareTo(BigDecimal.ZERO)>0?((JSONObject)data.get(0)).getBigDecimalValue("volume"):row.getDouble("volume")));
|
|
|
+ row.put("weight",(((JSONObject)data.get(0)).getBigDecimalValue("weight").compareTo(BigDecimal.ZERO)>0?((JSONObject)data.get(0)).getBigDecimalValue("weight"):row.getDouble("weight")));
|
|
|
}
|
|
|
|
|
|
JSONObject wzwlOrder = wzwlDocking.queryWzwlOrder(row.getString("billno"));
|