@@ -186,16 +187,22 @@ public class GoodsServiceImpl implements GoodsService {
e1.printStackTrace();
}
StringgSql="select t.*, ap.nRealSalePrice nApSalePrice from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = ? and ap.sAgentContractNO = t.sAgentContractNO and ap.nGoodsID = t.nGoodsID where t.sOrgNO = ? and t.sAgentContractNO = ? and t.nGoodsID = ? ";
StringgSql="select t.*, ap.nRealSalePrice nApSalePrice from V_OrgGoods t "+
" left join tAgentCustTypePrice ap on ap.sCustTypeID = ? "+
" and ap.sShopTypeID = ? "+
" and ap.sUnitTypeID = '' "+
" and ap.sAgentContractNO = t.sAgentContractNO "+
" and ap.nGoodsID = t.nGoodsID "+
"where t.sOrgNO = ? and t.sAgentContractNO = ? and t.nGoodsID = ? ";
@@ -206,13 +213,23 @@ 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, 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 ";