|
|
@@ -3,6 +3,7 @@ package restcontroller.sale.shoppingcart;
|
|
|
import beans.Item.Item;
|
|
|
import beans.customscheme.CustomScheme;
|
|
|
import beans.datacontrllog.DataContrlLog;
|
|
|
+import beans.enterprise.Enterprise;
|
|
|
import beans.itemprice.ItemPrice;
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
@@ -269,7 +270,7 @@ public class ShoppingCart extends Controller {
|
|
|
// String sql = sqlFactory.getSQL();
|
|
|
// Rows rows = dbConnect.runSqlQuery(sql);
|
|
|
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_shoppingcart", "sa_shoppingcartid", "sa_brandid", "itemid", "itemno", "sa_promotionid", "sa_promotion_itemsid", "qty", "length", "width", "cheek", "colors", "material", "", "", "");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_shoppingcart", "sa_shoppingcartid", "sa_brandid", "itemid", "itemno", "sa_promotionid", "sa_promotion_itemsid", "qty", "length", "width", "cheek", "colors", "material");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sa_brand", "t2", "t2.sa_brandid = t1.sa_brandid AND t2.siteid = t1.siteid", "brandname");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "plm_item", "t3", "t3.itemid = t1.itemid AND t3.siteid = t1.siteid", "topclassnum", "itemname", "model", "spec", "orderminqty", "orderaddqty", "orderminqty_auxunit", "orderaddqty_auxunit", "iscustomsize", "pricingmetod", "widthschemeid", "lengthschemeid", "materialschemeid", "colorschemeid", "cheekschemeid", "sa_customschemeid", "custamount");
|
|
|
@@ -303,15 +304,7 @@ public class ShoppingCart extends Controller {
|
|
|
//定制信息
|
|
|
CustomScheme customScheme = new CustomScheme(this);
|
|
|
|
|
|
- BigDecimal rwpricerate = new BigDecimal(1);
|
|
|
- Rows agentrows = dbConnect.runSqlQuery("select * from sa_agents where sys_enterpriseid=" + sys_enterpriseid + " and siteid='" + siteid + "'");
|
|
|
- if (!agentrows.isEmpty()) {
|
|
|
- int year = agentrows.get(0).getInteger("year");
|
|
|
- int quarter = agentrows.get(0).getInteger("quarter");
|
|
|
- if (getYear() == year && getQuarterOfYear() >= quarter && agentrows.get(0).getBigDecimal("pricerate").compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- rwpricerate = agentrows.get(0).getBigDecimal("pricerate");
|
|
|
- }
|
|
|
- }
|
|
|
+ BigDecimal rwpricerate = Enterprise.getRWPriceRate(this, Enterprise.getAgentsID(this, sys_enterpriseid));
|
|
|
for (Row row : rows) {
|
|
|
if ((attRowsMap.getOrDefault(row.getString("itemid"), new Rows())).isEmpty()) {
|
|
|
row.put("attinfos", defaultImageRows);
|