Commit 46d566c3 authored by 张永's avatar 张永

1

parent 5ee66e11
...@@ -477,7 +477,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -477,7 +477,7 @@ public class GoodsServiceImpl implements GoodsService {
if(IsGoodsUnit == 1) { if(IsGoodsUnit == 1) {
//查询多单位 //查询多单位
String GoodsUnitSql = " select sUnitTypeID = 'SaleMin', sUnitType = '销售小单位', nConvertRate = 1, " + String GoodsUnitSql = " select t.nGoodsID, sUnitTypeID = 'SaleMin', sUnitType = '销售小单位', nConvertRate = 1, " +
" t.sUnit, t.nRealSalePrice, t.nSalePrice, " " t.sUnit, t.nRealSalePrice, t.nSalePrice, "
+ " t.sSpec, t.nMinSaleQty, t.nSaleUnits, t.nStockQty, t.sStockTag, " + + " t.sSpec, t.nMinSaleQty, t.nSaleUnits, t.nStockQty, t.sStockTag, " +
" sShowUnit = convert(varchar,convert(numeric(12,2),t.nRealSalePrice)) + '元/' + t.sUnit + ' (1' + t.sUnit + ')' " + " sShowUnit = convert(varchar,convert(numeric(12,2),t.nRealSalePrice)) + '元/' + t.sUnit + ' (1' + t.sUnit + ')' " +
...@@ -487,7 +487,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -487,7 +487,7 @@ public class GoodsServiceImpl implements GoodsService {
" and t.nGoodsID = ?" + " and t.nGoodsID = ?" +
" and t.nAgentID = ?" + " and t.nAgentID = ?" +
" union " + " union " +
" select gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, " + " select t.nGoodsID, gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, " +
" gu.sUnit, nRealSalePrice = gu.nSalePrice, gu.nSalePrice, " " gu.sUnit, nRealSalePrice = gu.nSalePrice, gu.nSalePrice, "
+ " t.sSpec + '*' + dbo.fn_GetConvertDec(gu.nConvertRate), nMinSaleQty = 1, nSaleUnits = 1, nStockQty = cast(t.nStockQty/gu.nConvertRate as int), t.sStockTag, " + + " t.sSpec + '*' + dbo.fn_GetConvertDec(gu.nConvertRate), nMinSaleQty = 1, nSaleUnits = 1, nStockQty = cast(t.nStockQty/gu.nConvertRate as int), t.sStockTag, " +
" sShowUnit = convert(varchar,gu.nSalePrice) + '元/' + gu.sUnit + ' (' + dbo.fn_GetConvertDec(gu.nConvertRate) + t.sUnit + ')' " + " sShowUnit = convert(varchar,gu.nSalePrice) + '元/' + gu.sUnit + ' (' + dbo.fn_GetConvertDec(gu.nConvertRate) + t.sUnit + ')' " +
......
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