| | |
| | | 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) |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | //生产订单号 |
| | | 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) |