王 垚
2021-02-28 156e06ad46f0e4cb61c5f74553f6c2bc51e21a04
src/BLL/Demo.BillView/PRD/Pro_SCLLFSH.cs
@@ -33,6 +33,7 @@
            e.FieldKeys.Add("FBaseJoinQty");
            e.FieldKeys.Add("FDayPlanBillNo");
            e.FieldKeys.Add("FDayPlanFentryId");
            e.FieldKeys.Add("FisFX");
        }
        /// <summary>
        ///反审核 反更新日计划用料清单调拨数量
@@ -52,12 +53,14 @@
                foreach (var entryRow in entryRows)
                {
                    //生产用料清单为空时
                    if (Convert.ToString(entryRow["FDayPlanBillNo"]) == "")
                    if (Convert.ToString(entryRow["FDayPlanBillNo"]) == "" || !Convert.ToBoolean(entryRow["FisFX"]))
                        continue;
                    string fentryId = entryRow["FDayPlanFentryId"].ToString();
                    decimal FBaseQty = Convert.ToDecimal(entryRow["BaseActualQty"]);
                    sql = string.Format($"/*dialect*/update Sc_DayPlanPPBomBillSub set  FPickedQty -= {FBaseQty} where FEntryID = { fentryId} ");
                    sqlList.Add(sql);
                    sql = string.Format($"/*dialect*/update T_PRD_PICKMTRLDATA set  FisFX =  0 where FentryId = {entryRow["Id"]}");
                    sqlList.Add(sql);
                }
            }
            DBServiceHelper.ExecuteBatch(Context, sqlList);