|
@@ -2090,10 +2090,10 @@ stuff((SELECT ';' + CAST(B.ITM AS VARCHAR(500)) FROM View_aa B WHERE A.OS_NO=B.O
|
|
|
# OS_NO.append(i[5])
|
|
|
# 增量已完工未完工,现存量
|
|
|
sql_qty = """SELECT ISNULL(SUM(A.BAT_QTY),0) AS BAT_QTY,ISNULL(CAST(SUM(ISNULL(B.QTY_FIN,0)) AS FLOAT),0) AS QTY_FIN FROM
|
|
|
- (SELECT CAST(SUM(ISNULL(QTY_IN,0)-ISNULL(QTY_OUT,0)) AS FLOAT) AS BAT_QTY,PRD_NO,WH FROM BAT_REC1 GROUP BY PRD_NO,WH)A
|
|
|
- left join MF_MO B ON A.PRD_NO=B.MRP_NO
|
|
|
- WHERE A.PRD_NO='{0}' AND B.SO_NO='{1}' AND A.WH='{2}'""".format(i[4],i[3],i[20])
|
|
|
- # print(sql_qty)
|
|
|
+ (SELECT CAST(SUM(ISNULL(QTY_IN,0)-ISNULL(QTY_OUT,0)) AS FLOAT) AS BAT_QTY,PRD_NO,WH FROM BAT_REC1 WHERE PRD_NO='{0}' AND
|
|
|
+ WH='{1}' GROUP BY PRD_NO,WH)A
|
|
|
+ left join MF_MO B ON A.PRD_NO=B.MRP_NO AND B.SO_NO='{2}'""".format(i[4],i[20],i[3])
|
|
|
+ print(sql_qty)
|
|
|
try:
|
|
|
result = executeQuery(sql_qty)[0]
|
|
|
except Exception:
|