|
本帖最后由 李维强-15级 于 2019-11-7 12:30 编辑
报价书
测算表新增字段和编辑某个字段的公式
测算对比重新提取
测算加入 图纸量和实际量
生成刘总钉钉上的表格(用户前期测算)
流程图
BEGIN
SELECT * INTO #temp FROM
(
SELECT TypeL1 as Name,0 as BJTZNum,0 as BJSJNum,SUM(DesignQuantity) AS CSTZNum,SUM(Quantity) as CSSJNum FROM o_PEEquipFee
where PreEstType='用户工程前期测算' AND PreEstId=11 AND TabType='WX' AND TypeL1 is not NULL GROUP BY TypeL1,Quantity
UNION
SELECT TypeL1 as Name,SUM(DesignQuantity) AS BJTZNum,SUM(Quantity) as BJSJNum,0 as CSTZNum,0 as CSSJNum FROM o_PEEquipFee
where PreEstType='用户工程' AND PreEstId=9 AND TabType='WX' AND TypeL1 is not NULL GROUP BY TypeL1,Quantity
) as a
SELECT Name,SUM(BJTZNum) as BJTZNum, SUM(BJSJNum) as BJSJNum, SUM(CSTZNum) as CSTZNum, SUM(CSSJNum) as CSSJNum
FROM #temp GROUP BY Name
END |
|