Commit a1cd49a2 authored by 张永's avatar 张永

需求 #14400

parent 63a0363b
...@@ -86,7 +86,7 @@ public class CartQueryServiceImpl implements CartQueryService { ...@@ -86,7 +86,7 @@ public class CartQueryServiceImpl implements CartQueryService {
chooseGroups.add(groupKey); chooseGroups.add(groupKey);
} }
} }
List<Map<String, Object>> wmsList = getWmsList(datas); List<Map<String, Object>> wmsList = getWmsList(datas,shopNo);
Util.replaceKey(datas, ":", false, "sShopNO:shopNo", "sAgentContractNO:contractNo", "nGoodsID:goodsId", Util.replaceKey(datas, ":", false, "sShopNO:shopNo", "sAgentContractNO:contractNo", "nGoodsID:goodsId",
"sGoodsDesc:goodsName", "nSaleQty:saleQty", "sPromoPaperNO:promoNo", "sGoodsDesc:goodsName", "nSaleQty:saleQty", "sPromoPaperNO:promoNo",
...@@ -769,10 +769,19 @@ public class CartQueryServiceImpl implements CartQueryService { ...@@ -769,10 +769,19 @@ public class CartQueryServiceImpl implements CartQueryService {
return promos; return promos;
} }
private List<Map<String, Object>> getWmsList(List<Map<String, Object>> datas) { private List<Map<String, Object>> getWmsList(List<Map<String, Object>> datas,String shopNo) {
Integer TotalCount = 0; Integer TotalCount = 0;
List<Map<String, Object>> wmsList = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> wmsList = new ArrayList<Map<String, Object>>();
Map<String, List<Map<String, Object>>> temp = Util.listToML(datas, "sWarehouseName"); Map<String, List<Map<String, Object>>> temp = Util.listToML(datas, "sWarehouseName");
/*需求 #14400*/
int countCheckSql = 0;
try {
String checkSql = "select 1 from tSalesOrder where sShopNO = ? and dOrderDate = convert(date,getdate()) and nOrderStatus&1=0";
countCheckSql = jdbcTemplate.queryForInt(checkSql, shopNo);
} catch (Exception e) {
}
for (String key : temp.keySet()) { for (String key : temp.keySet()) {
Set<String> pids = new HashSet<String>(); Set<String> pids = new HashSet<String>();
List<Map<String, Object>> GoodsList = temp.get(key); List<Map<String, Object>> GoodsList = temp.get(key);
...@@ -826,7 +835,7 @@ public class CartQueryServiceImpl implements CartQueryService { ...@@ -826,7 +835,7 @@ public class CartQueryServiceImpl implements CartQueryService {
zoneGoods.put("nOrderMeetAmountFree", nOrderMeetAmountFree); zoneGoods.put("nOrderMeetAmountFree", nOrderMeetAmountFree);
zoneGoods.put("nMinTranAmount", nMinTranAmount); zoneGoods.put("nMinTranAmount", nMinTranAmount);
zoneGoods.put("nMinTranCase", nMinTranCase); zoneGoods.put("nMinTranCase", nMinTranCase);
zoneGoods.put("minOrderAmt", MinOrderAmt); zoneGoods.put("minOrderAmt", countCheckSql > 0 ? 0: MinOrderAmt);
zoneGoods.put("totalAmount", TotalAmount); zoneGoods.put("totalAmount", TotalAmount);
zoneGoods.put("orgNo", sOrgNO); zoneGoods.put("orgNo", sOrgNO);
zoneGoods.put("goodsIdList", pidlist); zoneGoods.put("goodsIdList", pidlist);
......
...@@ -136,7 +136,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -136,7 +136,7 @@ public class OrderServiceImpl implements OrderService {
}else{ }else{
errorMsg = (String)commitMap.get(0).get("StatusName"); errorMsg = (String)commitMap.get(0).get("StatusName");
} }
return Rjx.jsonErr().setMessage(I18NUtils.getMessage(LangID, "Msg_Submit_Order_failure")).set("errorMsg", errorMsg).setData(commitMap).toJson(); return Rjx.jsonErr().setMessage(errorMsg).set("errorMsg", errorMsg).setData(commitMap).toJson();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment