Commit a1cd49a2 authored by 张永's avatar 张永

需求 #14400

parent 63a0363b
......@@ -86,7 +86,7 @@ public class CartQueryServiceImpl implements CartQueryService {
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",
"sGoodsDesc:goodsName", "nSaleQty:saleQty", "sPromoPaperNO:promoNo",
......@@ -769,10 +769,19 @@ public class CartQueryServiceImpl implements CartQueryService {
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;
List<Map<String, Object>> wmsList = new ArrayList<Map<String, Object>>();
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()) {
Set<String> pids = new HashSet<String>();
List<Map<String, Object>> GoodsList = temp.get(key);
......@@ -826,7 +835,7 @@ public class CartQueryServiceImpl implements CartQueryService {
zoneGoods.put("nOrderMeetAmountFree", nOrderMeetAmountFree);
zoneGoods.put("nMinTranAmount", nMinTranAmount);
zoneGoods.put("nMinTranCase", nMinTranCase);
zoneGoods.put("minOrderAmt", MinOrderAmt);
zoneGoods.put("minOrderAmt", countCheckSql > 0 ? 0: MinOrderAmt);
zoneGoods.put("totalAmount", TotalAmount);
zoneGoods.put("orgNo", sOrgNO);
zoneGoods.put("goodsIdList", pidlist);
......
......@@ -136,7 +136,7 @@ public class OrderServiceImpl implements OrderService {
}else{
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) {
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