Commit d9d0a42a authored by 张永's avatar 张永

需求 #15246

parent d522661c
...@@ -265,9 +265,25 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -265,9 +265,25 @@ public class GoodsServiceImpl implements GoodsService {
//商品详情再增加一个集合输出多单位信息 需求 #15246 //商品详情再增加一个集合输出多单位信息 需求 #15246
if(IsGoodsUnit == 1) { if(IsGoodsUnit == 1) {
String GoodsUnitSql = " select gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, gu.sUnit, nRealSalePrice = gu.nSalePrice, sShowUnit = convert(varchar,gu.nSalePrice) + '元/' + gu.sUnit + ' (' + dbo.fn_GetConvertDec(gu.nConvertRate) + t.sUnit + ')' " String GoodsUnitSql = "select sUnitTypeID = 'SaleMin', sUnitType = '销售小单位', nConvertRate = 1, " +
+ " from V_OrgGoods t join tAgentGoodsUnit gu on gu.nAgentID = t.nAgentID and gu.nGoodsID = t.nGoodsID " " t.sUnit, t.nRealSalePrice, " +
+ " where t.sOrgNO = ? and t.sAgentContractNO = ? and t.nGoodsID = ? and t.nAgentID = ? order by nConvertRate "; " sShowUnit = convert(varchar,convert(numeric(12,2),t.nRealSalePrice)) + '元/' + t.sUnit + ' (1' + t.sUnit + ')'" +
" from V_OrgGoods t " +
" where t.sOrgNO = ?" +
" and t.sAgentContractNO = ?" +
" and t.nGoodsID = ?" +
" and t.nAgentID = ?" +
" union " +
" select gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, " +
" gu.sUnit, nRealSalePrice = gu.nSalePrice, " +
" sShowUnit = convert(varchar,gu.nSalePrice) + '元/' + gu.sUnit + ' (' + dbo.fn_GetConvertDec(gu.nConvertRate) + t.sUnit + ')'" +
" from V_OrgGoods t join tAgentGoodsUnit gu on gu.nAgentID = t.nAgentID " +
" and gu.nGoodsID = t.nGoodsID " +
" where t.sOrgNO = ?" +
" and t.sAgentContractNO = ?" +
" and t.nGoodsID = ?" +
" and t.nAgentID = ? " +
" order by nConvertRate";
List<Map<String,Object>> goodsUnitList = jdbcTemplate.queryForList(GoodsUnitSql,orgNo,contractNo,goodsId,agentID); List<Map<String,Object>> goodsUnitList = jdbcTemplate.queryForList(GoodsUnitSql,orgNo,contractNo,goodsId,agentID);
rjx.set("goodsUnitList", goodsUnitList); rjx.set("goodsUnitList", goodsUnitList);
......
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