+" acg.nSaleUnits SaleUnit, acg.nMarketPrice MarketPrice, sum(a.nSaleQty) SaleQty from tAgentGoodsDailyOnline a join tGoods g on a.nGoodsID = g.nGoodsID "
+" acg.nSaleUnits SaleUnit, acg.nMarketPrice MarketPrice, sum(a.nSaleQty) SaleQty from tAgentGoodsDailyOnline a join tGoods g on a.nGoodsID = g.nGoodsID "
+" join tAgentContractGoods acg on a.sAgentContractNO = acg.sAgentContractNO and a.nGoodsID = acg.nGoodsID ";
+" join tAgentContractGoods acg on a.sAgentContractNO = acg.sAgentContractNO and a.nGoodsID = acg.nGoodsID ";
@@ -44,8 +44,7 @@ public class GoodsServiceImpl implements GoodsService {
...
@@ -44,8 +44,7 @@ public class GoodsServiceImpl implements GoodsService {
}else{
}else{
sql+=" where acg.sOrgNO = '"+orgNO+"' and a.dTradeDate >= '"+beginDate+"' and a.dTradeDate < '"+endDate+"'";
sql+=" where acg.sOrgNO = '"+orgNO+"' and a.dTradeDate >= '"+beginDate+"' and a.dTradeDate < '"+endDate+"'";
}
}
sql+=" group by a.nGoodsID, g.sGoodsNO, g.sGoodsDesc, acg.nSalePrice, acg.sSpec, acg.sUnit, acg.nMinSaleQty, acg.nSaleUnits, acg.nMarketPrice, acg.sMarketUnit order by "
sql+=" group by a.nGoodsID, g.sGoodsNO, g.sGoodsDesc, acg.nSalePrice, acg.sSpec, acg.sUnit, acg.nMinSaleQty, acg.nSaleUnits, acg.nMarketPrice, acg.sMarketUnit";