Commit 7ac351e9 authored by 张永's avatar 张永

需求 #15221

parent 39c6563c
...@@ -160,6 +160,7 @@ public class CommonController { ...@@ -160,6 +160,7 @@ public class CommonController {
Map<String, Object> fmap = jdbcTemplate.queryForMap("select sDesc,sValue1,sValue2,sValue3,sValue4,sValue5,sMemo from tSystemCtrl where sCode = 'IsAppShowStockQty'"); Map<String, Object> fmap = jdbcTemplate.queryForMap("select sDesc,sValue1,sValue2,sValue3,sValue4,sValue5,sMemo from tSystemCtrl where sCode = 'IsAppShowStockQty'");
Map<String, Object> gmap = jdbcTemplate.queryForMap("select sDesc,sValue1,sValue2,sValue3,sValue4,sValue5,sMemo from tSystemCtrl where sCode = 'IsShowSwitch'"); Map<String, Object> gmap = jdbcTemplate.queryForMap("select sDesc,sValue1,sValue2,sValue3,sValue4,sValue5,sMemo from tSystemCtrl where sCode = 'IsShowSwitch'");
Map<String, Object> hmap = jdbcTemplate.queryForMap("select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo, sValue4, sValue5 from tAgentSystemCtrl where sCode ='MinOrderAmountType' and nAgentID = "+agentID+" and nTag&1 = 0 "); Map<String, Object> hmap = jdbcTemplate.queryForMap("select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo, sValue4, sValue5 from tAgentSystemCtrl where sCode ='MinOrderAmountType' and nAgentID = "+agentID+" and nTag&1 = 0 ");
Map<String, Object> lmap = jdbcTemplate.queryForMap("select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo, sValue4, sValue5 from tAgentSystemCtrl where sCode ='AppSolrSortRule' and nAgentID = "+agentID+" and nTag&1 = 0 "); //排序字段
List<Map<String, Object>> payTypes = jdbcTemplate.queryForList("select sSalesOrderPayTypeID, sSalesOrderPayType from tOrgPayType where sOrgNO = ? and nTag&1=0 order by nSort desc", sOrgNO); List<Map<String, Object>> payTypes = jdbcTemplate.queryForList("select sSalesOrderPayTypeID, sSalesOrderPayType from tOrgPayType where sOrgNO = ? and nTag&1=0 order by nSort desc", sOrgNO);
List<Map<String, Object>> goodsTags = jdbcTemplate.queryForList("select sGoodsTagID, sGoodsTag from tOrgGoodsTag where sOrgNO = ? and nTag&1 = 0", sOrgNO); List<Map<String, Object>> goodsTags = jdbcTemplate.queryForList("select sGoodsTagID, sGoodsTag from tOrgGoodsTag where sOrgNO = ? and nTag&1 = 0", sOrgNO);
Map<String, Object> shareInfo = new HashMap<String, Object>(); Map<String, Object> shareInfo = new HashMap<String, Object>();
...@@ -190,7 +191,7 @@ public class CommonController { ...@@ -190,7 +191,7 @@ public class CommonController {
AppSystemInfo = jdbcTemplate.queryForMap(sql, sOrgNO, appId); AppSystemInfo = jdbcTemplate.queryForMap(sql, sOrgNO, appId);
} catch (EmptyResultDataAccessException e) {} } catch (EmptyResultDataAccessException e) {}
return Rjx.jsonOk().set("OrgInfo", map).set("PicInfo", omap).set("ExemptCheck", cmap).set("BusinessModel", bmap).set("BrandFilter", dmap).set("AliyunOssStyle", emap).set("ShowStockQty", fmap).set("IsShowSwitch", gmap).set("MinOrderAmountType", hmap) return Rjx.jsonOk().set("OrgInfo", map).set("PicInfo", omap).set("ExemptCheck", cmap).set("BusinessModel", bmap).set("BrandFilter", dmap).set("AliyunOssStyle", emap).set("ShowStockQty", fmap).set("IsShowSwitch", gmap).set("MinOrderAmountType", hmap)
.set("payTypes", payTypes).set("goodsTags", goodsTags).set("AppSystemInfo", AppSystemInfo).set("shareInfo", shareInfo).toJson(); .set("payTypes", payTypes).set("goodsTags", goodsTags).set("AppSystemInfo", AppSystemInfo).set("shareInfo", shareInfo).set("AppSolrSortRule", lmap).toJson();
} }
} }
...@@ -216,19 +216,23 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -216,19 +216,23 @@ public class GoodsServiceImpl implements GoodsService {
/* String promoSql = "select pm.* from tYWPromoMain pm, tYWPromoDtl pd, tPromoCustBWList bw ,tAgentContract ac" /* String promoSql = "select pm.* from tYWPromoMain pm, tYWPromoDtl pd, tPromoCustBWList bw ,tAgentContract ac"
+ " where pd.sAgentContractNO = ac.sAgentContractNO and ac.nTag&3 = 2 and pm.sPromoPaperNO = bw.sPromoPaperNO and bw.sShopNO = ? and pm.sPromoActionTypeID != '3' and pm.sOrgNO = ? and pm.sPromoPaperNO = pd.sPromoPaperNO and pm.nTag&3 = 2 and (pd.sAgentContractNO = ?) and (pd.nGoodsID = ?) "; + " where pd.sAgentContractNO = ac.sAgentContractNO and ac.nTag&3 = 2 and pm.sPromoPaperNO = bw.sPromoPaperNO and bw.sShopNO = ? and pm.sPromoActionTypeID != '3' and pm.sOrgNO = ? and pm.sPromoPaperNO = pd.sPromoPaperNO and pm.nTag&3 = 2 and (pd.sAgentContractNO = ?) and (pd.nGoodsID = ?) ";
*/ */
String promoSql = "select pm.* from tYWPromoMain pm, tYWPromoDtl pd, tPromoCustBWList bw, tAgentContract ac " + String promoSql = "select pm.* from tYWPromoMain pm, tYWPromoDtl pd, tPromoCustBWList bw, tAgentContract ac " +
"where pm.sPromoPaperNO = pd.sPromoPaperNO " + "where pm.sPromoPaperNO = pd.sPromoPaperNO " +
"and pm.sPromoPaperNO = bw.sPromoPaperNO " + "and pm.sPromoPaperNO = bw.sPromoPaperNO " +
"and pd.sAgentContractNO = ac.sAgentContractNO " + "and pd.sAgentContractNO = ac.sAgentContractNO " +
"and pm.sPromoPaperNORuleID = pd.sPromoPaperNO + isnull(convert(varchar, pd.nRuleID),'') " + "and pm.sPromoPaperNORuleID = pd.sPromoPaperNO + isnull(convert(varchar, pd.nRuleID),'') " +
"and pm.nTag&3 = 2 " + "and pm.nTag&3 = 2 " +
"and ac.nTag&3 = 2 " + "and ac.nTag&3 = 2 " +
"and pd.nTag&1 = 0 " + "and pd.nTag&1 = 0 " +
"and pm.sPromoActionTypeID != '3' " + "and pm.sPromoActionTypeID != '3' " +
"and bw.sShopNO = ? " + "and bw.sShopNO = ? " +
"and pm.sOrgNO = ? " + "and pm.sOrgNO = ? " +
"and (pd.sAgentContractNO = ?) " + "and (pd.sAgentContractNO = ?) " +
"and (pd.nGoodsID = ?) "; "and (pd.nGoodsID = ?) " +
"and convert(varchar(10),getdate(),120) between convert(varchar(10),pm.dPromoBeginDate,120) and convert(varchar(10),pm.dPromoEndDate,120) " +
"and ((pm.sPromoActionTypeID = '8' " +
" and convert(varchar(8),getdate(),108) between convert(varchar(8),pm.dPromoBeginDate,108) and convert(varchar(8),pm.dPromoEndDate,108)) " +
" or pm.sPromoActionTypeID <> '8') ";
Object[] args ; Object[] args ;
......
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