|
@@ -15,6 +15,9 @@ import restcontroller.R;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.time.Year;
|
|
|
|
|
+import java.time.YearMonth;
|
|
|
|
|
+import java.time.temporal.IsoFields;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
@@ -322,6 +325,18 @@ public class ShoppingCart extends Controller {
|
|
|
//定制信息
|
|
//定制信息
|
|
|
CustomScheme customScheme = new CustomScheme(this);
|
|
CustomScheme customScheme = new CustomScheme(this);
|
|
|
|
|
|
|
|
|
|
+ int year = Year.now().getValue();
|
|
|
|
|
+ int quarter = YearMonth.now().get(IsoFields.QUARTER_OF_YEAR);
|
|
|
|
|
+ BigDecimal rwpricerate = new BigDecimal(1);
|
|
|
|
|
+ Rows custamountrows = dbConnect.runSqlQuery("select * from sa_agents where sys_enterpriseid=" + sys_enterpriseid + " and siteid='" + siteid + "'");
|
|
|
|
|
+ if (!custamountrows.isEmpty()) {
|
|
|
|
|
+
|
|
|
|
|
+ if (custamountrows.get(0).getInteger("year") == year && custamountrows.get(0).getInteger("quarter") == quarter) {
|
|
|
|
|
+ if (custamountrows.get(0).getBigDecimal("pricerate").compareTo(BigDecimal.ZERO) > 0) {
|
|
|
|
|
+ rwpricerate = custamountrows.get(0).getBigDecimal("pricerate");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
for (Row row : rows) {
|
|
for (Row row : rows) {
|
|
|
if ((attRowsMap.getOrDefault(row.getString("itemid"), new Rows())).isEmpty()) {
|
|
if ((attRowsMap.getOrDefault(row.getString("itemid"), new Rows())).isEmpty()) {
|
|
|
row.put("attinfos", defaultImageRows);
|
|
row.put("attinfos", defaultImageRows);
|
|
@@ -352,6 +367,8 @@ public class ShoppingCart extends Controller {
|
|
|
row.put("gradeprice", itemPrice.getContractprice());
|
|
row.put("gradeprice", itemPrice.getContractprice());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ row.put("gradeprice", row.getBigDecimal("gradeprice").multiply(rwpricerate).add(row.getBigDecimal("custamount")));
|
|
|
|
|
+ row.put("defaultprice", row.getBigDecimal("gradeprice").multiply(rwpricerate));
|
|
|
|
|
|
|
|
// row.put("gradeprice", istool == 0 ?itemPrice.getContractprice():itemPrice.getMarketprice());
|
|
// row.put("gradeprice", istool == 0 ?itemPrice.getContractprice():itemPrice.getMarketprice());
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|