王 垚
2021-02-03 8f8bf1c2419cd76bcc2be603132336c25138b96b
src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
@@ -17,6 +17,9 @@
    public class ProCompleteAnalysisDetail : AbstractDynamicFormPlugIn
    {
        bool did = false;
        string FHMainICMOInterIDr = "";
        string FHMainICMOEntryID = "";
        string FHICMOInterID = "";
        public override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
@@ -29,9 +32,9 @@
            {
                if (did)
                    return;
                string FHMainICMOInterIDr = this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID").ToString();//主生产订单主内码
                string FHMainICMOEntryID = this.View.OpenParameter.GetCustomParameter("FHMainICMOEntryID").ToString();// 主生产订单子内码
                string FHICMOInterID = this.View.OpenParameter.GetCustomParameter("FHICMOInterID").ToString();//日计划订单主内码
                  FHMainICMOInterIDr = this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID").ToString();//主生产订单主内码
                  FHMainICMOEntryID = this.View.OpenParameter.GetCustomParameter("FHMainICMOEntryID").ToString();// 主生产订单子内码
                  FHICMOInterID = this.View.OpenParameter.GetCustomParameter("FHICMOInterID").ToString();//日计划订单主内码
                string sql = string.Format(@"/*dialect*/select * from JIT_MOMaterReadysBill where FHMainICMOInterIDr ='{0}' and FHMainICMOEntryID ='{1}' and FHICMOInterID='{2}' order by FPlanDate, FHStockQty desc ,FHMaterID ", FHMainICMOInterIDr, FHMainICMOEntryID, FHICMOInterID);
                DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0];
                if (dt.Rows.Count > 0)
@@ -112,8 +115,8 @@
        /// </summary>
        public void SearchList()
        {
            string sqlwhere = " where 1=1";
            string sql = string.Format(@"/*dialect*/select * from JIT_MOMaterReadysBill ");
            string sqlwhere = $" where FHMainICMOInterIDr ='{FHMainICMOInterIDr}' and FHMainICMOEntryID ='{FHMainICMOEntryID}' and FHICMOInterID='{FHICMOInterID}'";
            string sql = string.Format(@"/*dialect*/select * from JIT_MOMaterReadysBill  ");
            //物料
            if ((this.Model.GetValue("FMateralId") as DynamicObject) != null)
            {
@@ -135,6 +138,7 @@
            string PRDBillNo = Convert.ToString(this.Model.GetValue("FScOrderNo"));
            if (!string.IsNullOrEmpty(PRDBillNo))
                sqlwhere += $" and FPRDBillNo='{PRDBillNo}'";
            sql += sqlwhere;
            sql += "order by FPlanDate, FHStockQty desc ,FHMaterID";
            DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0];