+"pn.nTag&2 != 2 OR pn.nTag&1 = 1 OR GETDATE() < pn.dPromoBeginDate OR GETDATE() >= pn.dPromoEndDate";
StringsqlClear=""+"DELETE mmm FROM tCart mmm WHERE mmm.sShopNO = '"+shopNo
+"' AND EXISTS ( SELECT NULL FROM tAgentContractGoods nnn WHERE nnn.nGoodsID = mmm.nGoodsID AND nnn.sAgentContractNO = mmm.sAgentContractNO AND (nnn.nTag & 16 = 0 or nnn.nTag & 1 = 1) AND mmm.sShopNO = '"
+"LEFT JOIN tYWPromoMain p ON p.sPromoPaperNO = c.sPromoPaperNO "
+"WHERE "
+"c.sShopNO = '"+shopNo+"'";
StringsqlClearPromoNo=
"SELECT "
+"pn.sPromoPaperNO "
+"FROM "
+"("+sqlPromoTag+") pn "
+"WHERE pn.nTag&2 != 2 OR pn.nTag&1 = 1 OR GETDATE() < pn.dPromoBeginDate OR GETDATE() >= pn.dPromoEndDate";
StringsqlClear=""
+"DELETE mmm FROM tCart mmm WHERE mmm.sShopNO = '"+shopNo+"' AND EXISTS ( SELECT NULL FROM tAgentContractGoods nnn WHERE nnn.nGoodsID = mmm.nGoodsID AND nnn.sAgentContractNO = mmm.sAgentContractNO AND (nnn.nTag & 16 = 0 or nnn.nTag & 1 = 1) AND mmm.sShopNO = '"+shopNo+"' )"+Util.LINE_SEPARATOR
+"DELETE tCart WHERE sShopNO = '"+shopNo+"' AND nTag = 1 AND sPromoPaperNO IN ("+sqlClearPromoNo+")"+Util.LINE_SEPARATOR
+"UPDATE tCart SET sPromoGroupNO = NULL, sPromoPaperNO = NULL WHERE sShopNO = '"+shopNo+"' AND sPromoPaperNO IN ("+sqlClearPromoNo+")";
StringsqlACart="select * from V_Cart where sOrgNO = '"+orgNo+"' and sShopNO = '"+shopNo+"' order by nIdx";