Map<String,Object>cmap=jdbcTemplate.queryForMap("select sDesc,sValue1 from tSystemCtrl where sCode = 'ExemptCheck'");
List<Map<String,Object>>payTypes=jdbcTemplate.queryForList("select sSalesOrderPayTypeID, sSalesOrderPayType from tOrgPayType where sOrgNO = ? and nTag&1=0",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);
@@ -172,7 +173,7 @@ public class GoodsServiceImpl implements GoodsService {
}catch(EmptyResultDataAccessExceptione){
thrownewXException("商品已下架");
}
Stringsql="select t.nGoodsID, t.sSubCode, t.nParentID, t.sSpecName, t.sSpec, isnull(ap.nRealSalePrice, og.nRealSalePrice) nRealSalePrice, og.nStockQty, og.nLockedQty from tGoodsSubCode t left join V_OrgGoods og on og.sOrgNO = ? and og.sAgentContractNO = ? and og.nGoodsID = t.nGoodsID left join tAgentCustTypePrice ap on ap.sCustTypeID = ? and ap.sAgentContractNO = og.sAgentContractNO and ap.nGoodsID = og.nGoodsID where t.nParentID = ? and t.nTag&1 = 0";
Stringsql="select t.nGoodsID, t.sSubCode, t.nParentID, t.sSpecName, t.sSpec, isnull(ap.nRealSalePrice, og.nRealSalePrice) nRealSalePrice, nStockQty = og.nRealStockQty, og.nLockedQty from tGoodsSubCode t left join V_OrgGoods og on og.sOrgNO = ? and og.sAgentContractNO = ? and og.nGoodsID = t.nGoodsID left join tAgentCustTypePrice ap on ap.sCustTypeID = ? and ap.sAgentContractNO = og.sAgentContractNO and ap.nGoodsID = og.nGoodsID where t.nParentID = ? and t.nTag&1 = 0";
@@ -274,7 +275,7 @@ public class GoodsServiceImpl implements GoodsService {
}catch(Exceptione){
//shopNo为空,没有登陆
}
Stringsql="select t.sAgentContractNO, t.nGoodsID, t.nStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '"+sCustTypeID+"' and t.sAgentContractNO = ap.sAgentContractNO and t.nGoodsID = ap.nGoodsID where t.sOrgNO = '"+orgNo+"' "+StringUtil.join(" OR "," and (",")"," and (1 = 0) ",args);
Stringsql="select t.sAgentContractNO, t.nGoodsID, nStockQty = t.nRealStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '"+sCustTypeID+"' and t.sAgentContractNO = ap.sAgentContractNO and t.nGoodsID = ap.nGoodsID where t.sOrgNO = '"+orgNo+"' "+StringUtil.join(" OR "," and (",")"," and (1 = 0) ",args);
@@ -287,15 +288,10 @@ public class GoodsServiceImpl implements GoodsService {
returnmm;
}
publicstaticvoidmain(String[]arg){
StringorgNo="1001";
List<String>args=newArrayList<String>();
args.add("(t.sAgentContractNO = '600001001' and t.nGoodsID = 519)");
Stringsql1="select t.sAgentContractNO, t.nGoodsID, p.sPromoTheme, p.sPromoName, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO sPromoGroupNO from tYWPromoDtl t, tYWPromoMain p where p.sPromoActionTypeID != '3' and t.sPromoPaperNO = p.sPromoPaperNO and p.nTag&3 = 2 and p.sOrgNO = '"+orgNo+"' "+StringUtil.join(" OR "," and (",")"," and (1 = 0) ",args)+" group by t.sAgentContractNO, t.nGoodsID, p.sPromoTheme, p.sPromoName, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO";