|
@@ -925,6 +925,13 @@ public class itemgroup extends Controller {
|
|
|
/**
|
|
|
* 查询商品明细
|
|
|
*/
|
|
|
+
|
|
|
+ SQLFactory priceSqlFactory = new SQLFactory(this, "查询商品原价");
|
|
|
+ priceSqlFactory.addParameter("sa_itemgroupid", content.getString("sa_itemgroupid"));
|
|
|
+ priceSqlFactory.addParameter("siteid", siteid);
|
|
|
+ Rows pricerows = dbConnect.runSqlQuery(priceSqlFactory);
|
|
|
+ RowsMap pricerowsMap = pricerows.toRowsMap("itemid");
|
|
|
+
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "查询商品详情", pageSize, pageNumber, pageSorting);
|
|
|
sqlFactory.addParameter_SQL("where", "t2.itemno='" + itemno + "' ");
|
|
|
sqlFactory.addParameter("itemno", itemno);
|
|
@@ -936,7 +943,15 @@ public class itemgroup extends Controller {
|
|
|
if (sys_enterpriseid > 0 || (usertype == 21 || usertype == 22)) {
|
|
|
row.put("gradeprice", itemPrice.getContractprice());
|
|
|
} else {
|
|
|
- row.put("gradeprice", itemPrice.getMarketprice());
|
|
|
+ if(pricerowsMap.containsKey(row.getString("itemid"))){
|
|
|
+ if(pricerowsMap.get(row.getString("itemid")).isNotEmpty()){
|
|
|
+ row.put("gradeprice", pricerowsMap.get(row.getString("itemid")).get(0).getBigDecimal("price"));
|
|
|
+ }else{
|
|
|
+ row.put("gradeprice",0);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ row.put("gradeprice", 0);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|