王 垚
2020-12-22 25c5ea9d524cc7ba92b676bbd85a05889c335796
src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
@@ -35,7 +35,7 @@
                string FHMainICMOInterIDr = this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID").ToString();//主生产订单主内码
                string FHMainICMOEntryID = this.View.OpenParameter.GetCustomParameter("FHMainICMOEntryID").ToString();// 主生产订单子内码
                string 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}' ", FHMainICMOInterIDr, FHMainICMOEntryID, FHICMOInterID);
                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)
                {
@@ -95,16 +95,7 @@
        public void SearchList()
        {
            string sqlwhere = " where 1=1";
            string sql = @"
/*dialect*/
select * from (
select FSumPlanCount*FUNITDOSAGE as FPlanIssueCountS,FCompleteCount*FUNITDOSAGE FCompleteCountS,(FSumPlanCount-FCompleteCount)*FUNITDOSAGE FLackCountS,case when FSumPlanCount>FCompleteCount then '未齐套' else '齐套' end CompleteStatus,
t2.FBillNo PRDBillNo,
t1.* from JIT_MOMaterReadysBill T1
JOIN T_PRD_MO t2 on t1.FHMainICMOInterIDr=t2.FID
)AS T
";
            sql = string.Format(@"/*dialect*/select * from JIT_MOMaterReadysBill");
            string sql = string.Format(@"/*dialect*/select * from JIT_MOMaterReadysBill ");
            //物料
            if ((this.Model.GetValue("FMateralId") as DynamicObject) != null)
            {
@@ -125,8 +116,9 @@
            //生产订单号
            string PRDBillNo = Convert.ToString(this.Model.GetValue("FScOrderNo"));
            if (!string.IsNullOrEmpty(PRDBillNo))
                sqlwhere += $" and PRDBillNo='{PRDBillNo}'";
                sqlwhere += $" and FPRDBillNo='{PRDBillNo}'";
            sql += sqlwhere;
            sql += "order by FPlanDate, FHStockQty desc ,FHMaterID";
            DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0];
            this.Model.DeleteEntryData("FEntity");
            if (dt.Rows.Count > 0)