导入工具
This commit is contained in:
@@ -143,7 +143,7 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
|
||||
ELSE '其它'
|
||||
END AS std,dtyl.dtty, ma.Qty qty1, ma.IssQty issqty,(ma.Qty-ma.IssQty) as wll,mdsss.mdqty,shwl.shwl,sdwl.sdwl
|
||||
,mas.wqty wqty, ISNULL(cs.qty, 0) cqty, ISNULL(misss.issqty, 0) issqtyxc,ISNULL(ds.qty, 0) dqty,isnull(prd.Rqty, 0) rqty,
|
||||
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(momq.momqty, 0) AS momqty, ISNULL(MX.MQTY, 0) MQTY, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
|
||||
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(MX.MQTY, 0) momqty, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
|
||||
- ISNULL(omm.RQTY1, 0) - ISNULL(MX.MQTY, 0)- ISNULL(pu_App.RQTY3, 0)) AS q, motype.description,
|
||||
CASE WHEN md.Status = 2 THEN '锁定' WHEN md.Status = 4 THEN '关闭' WHEN md.Status = 3 THEN '审核' ELSE '新建' END AS st, md.Status
|
||||
FROM mom_order m WITH (NOLOCK) INNER JOIN
|
||||
@@ -184,11 +184,11 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
|
||||
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
|
||||
|
||||
|
||||
(SELECT mom.MoCode, ma.invcode,SUM(isnull(ma.qty, 0)) dtty
|
||||
(SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0))/md.Qty,3) dtty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join
|
||||
mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId
|
||||
GROUP BY ma.InvCode,mom.MoCode ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
|
||||
GROUP BY ma.InvCode,mom.MoCode,md.Qty ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
|
||||
|
||||
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
@@ -261,7 +261,7 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
|
||||
ELSE '其它'
|
||||
END AS std,dtyl.dtty, ma.Qty qty1, ma.IssQty issqty,(ma.Qty-ma.IssQty) as wll,mdsss.mdqty,shwl.shwl,sdwl.sdwl
|
||||
,mas.wqty wqty, ISNULL(cs.qty, 0) cqty, ISNULL(misss.issqty, 0) issqtyxc,ISNULL(ds.qty, 0) dqty,isnull(prd.Rqty, 0) rqty,
|
||||
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(momq.momqty, 0) AS momqty, ISNULL(MX.MQTY, 0) MQTY, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
|
||||
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(MX.MQTY, 0) momqty, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
|
||||
- ISNULL(omm.RQTY1, 0) - ISNULL(MX.MQTY, 0)- ISNULL(pu_App.RQTY3, 0)) AS q, motype.description,
|
||||
CASE WHEN md.Status = 2 THEN '锁定' WHEN md.Status = 4 THEN '关闭' WHEN md.Status = 3 THEN '审核' ELSE '新建' END AS st, md.Status
|
||||
FROM mom_order m WITH (NOLOCK) INNER JOIN
|
||||
@@ -303,11 +303,11 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
|
||||
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
|
||||
|
||||
|
||||
(SELECT mom.MoCode, ma.invcode,SUM(isnull(ma.qty, 0)) dtty
|
||||
(SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0))/md.Qty,3) dtty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join
|
||||
mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId
|
||||
GROUP BY ma.InvCode,mom.MoCode ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
|
||||
GROUP BY ma.InvCode,mom.MoCode,md.Qty ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
|
||||
|
||||
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
|
||||
Reference in New Issue
Block a user