|
@@ -374,7 +374,7 @@ public class ExcelUtil {
|
|
|
|
|
|
public List<EfastOrder> readCell(String filePath, String productName, String[] maps,
|
|
public List<EfastOrder> readCell(String filePath, String productName, String[] maps,
|
|
String[] infos, String tel, String name,String platformOrder, String num, String discount,String remark,
|
|
String[] infos, String tel, String name,String platformOrder, String num, String discount,String remark,
|
|
- Map<String, ProductColor> price, String postType, String orderStoreInfoSt, Integer isOtherStore,String[] storeArray)
|
|
|
|
|
|
+ Map<String, ProductColor> price, String postType, String orderStoreInfoSt, Integer isOtherStore,String[] storeArray,Integer selfOperated)
|
|
throws IOException {
|
|
throws IOException {
|
|
Map<String, String> map = new HashMap<>();
|
|
Map<String, String> map = new HashMap<>();
|
|
for (String t : maps) {
|
|
for (String t : maps) {
|
|
@@ -552,26 +552,32 @@ public class ExcelUtil {
|
|
}
|
|
}
|
|
order.setOrderRemark(orderRemark);
|
|
order.setOrderRemark(orderRemark);
|
|
|
|
|
|
- String colorDiscount = getValue(temp.getCell(discountColumnIndex)).trim();
|
|
|
|
- if(colorDiscount != null && !"".equals(colorDiscount)){
|
|
|
|
- colorDiscount = colorDiscount.replaceAll("\\r|\\r|\\n","");
|
|
|
|
- }
|
|
|
|
- if(colorDiscount == null || "".equals(colorDiscount) || Integer.valueOf(colorDiscount) == 0){
|
|
|
|
- order.setReturnStatus("error");
|
|
|
|
- order.setReturnMsg("价格不正确");
|
|
|
|
- // 读取购买数量
|
|
|
|
|
|
+ String colorDiscount = "0";
|
|
|
|
+ if(selfOperated == 1){
|
|
|
|
+ colorDiscount = getValue(temp.getCell(discountColumnIndex)).trim();
|
|
|
|
+ if(colorDiscount != null && !"".equals(colorDiscount)){
|
|
|
|
+ colorDiscount = colorDiscount.replaceAll("\\r|\\r|\\n","");
|
|
|
|
+ }
|
|
|
|
+ if(colorDiscount == null || "".equals(colorDiscount) || Integer.valueOf(colorDiscount) == 0){
|
|
|
|
+ order.setReturnStatus("error");
|
|
|
|
+ order.setReturnMsg("价格不正确");
|
|
|
|
+ // 读取购买数量
|
|
|
|
+ order.setOrderProductDiscount(0);
|
|
|
|
+ order.setOrderProductPrice(0);
|
|
|
|
+ }else{
|
|
|
|
+ // 读取购买数量
|
|
|
|
+ Double colorDiscountDou = Double.valueOf(colorDiscount);
|
|
|
|
+ colorDiscountDou = colorDiscountDou*100/orderNumByInt;
|
|
|
|
+ order.setOrderProductDiscount(colorDiscountDou.intValue());
|
|
|
|
+ order.setOrderProductPrice(colorDiscountDou.intValue());
|
|
|
|
+ Double orderTotal = Double.valueOf(colorDiscount);
|
|
|
|
+ orderTotal = orderTotal*100;
|
|
|
|
+ order.setOrderTotal(orderTotal.intValue());
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
order.setOrderProductDiscount(0);
|
|
order.setOrderProductDiscount(0);
|
|
order.setOrderProductPrice(0);
|
|
order.setOrderProductPrice(0);
|
|
- }else{
|
|
|
|
- // 读取购买数量
|
|
|
|
- Double colorDiscountDou = Double.valueOf(colorDiscount);
|
|
|
|
- colorDiscountDou = colorDiscountDou*100/orderNumByInt;
|
|
|
|
- order.setOrderProductDiscount(colorDiscountDou.intValue());
|
|
|
|
- order.setOrderProductPrice(colorDiscountDou.intValue());
|
|
|
|
-
|
|
|
|
- Double orderTotal = Double.valueOf(colorDiscount);
|
|
|
|
- orderTotal = orderTotal*100;
|
|
|
|
- order.setOrderTotal(orderTotal.intValue());
|
|
|
|
|
|
+ order.setOrderTotal(0);
|
|
}
|
|
}
|
|
|
|
|
|
try{
|
|
try{
|