Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | { |
| | | if (sLeftQty > 0) |
| | | { |
| | | if (DBUtility.ClsPub.isDate(ds.Tables[0].Rows[i]["æ¥æ"]) == DBUtility.ClsPub.isDate(grd.Columns[j].Tag)) |
| | | if (DBUtility.ClsPub.isDate(ds.Tables[0].Rows[i]["æ¥æ"]) == DBUtility.ClsPub.isDate(grd.Columns[j].Tag)) //è¡¨æ ¼çæ é¢ä¸ ä¿åäºæ¥æï¼ |
| | | { |
| | | //妿æ¶é´è¢« ä¸éä½éå ç¨ å è·³è¿ |
| | | b = false; |
| | |
| | | oClsGridValues.Add(oSub); |
| | | } |
| | | } |
| | | else |
| | | else //ååä¸éè¦èèå çï¼ä¸é¢çè¿ä¸æ®µä¸éè¦ |
| | | { |
| | | if (sLeftQty > sWorkQty * DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["æå¤§å©ä½å·¥æ¶"])) |
| | | { |
| | |
| | | //å¤æèµæºå©ä½å·¥æ¶ï¼æ¯å¦å¤§äº çäº§å¨æ |
| | | if (DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[j]["å©ä½å·¥æ¶"]) > sLeftProdTimes) |
| | | { |
| | | if (iLeftQty > 0) |
| | | if (iLeftQty > 0) // ç产订åå©ä½æ°é |
| | | { |
| | | //卿¬èµæºä¸ç产 |
| | | //è·å该çäº§èµæºçå©ä½å·¥æ¶è¿è¡æç¨ã |
| | |
| | | dsSub = Sc_ICMOSortBillFun.GetWorkSourceTimeBySource(oCn, lSourceID); |
| | | if (dsSub == null || dsSub.Tables[0].Rows.Count == 0) |
| | | { |
| | | continue; |
| | | continue;//å¦ææ²¡æå©ä½å æ§è¡ä¸ä¸ä¸ªç产订å |
| | | } |
| | | if (dsSub != null )//ä¸å çæç¨ |
| | | { |
| | |
| | | this.Tool.SuspendLayout(); |
| | | this.pPic.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.spc1)).BeginInit(); |
| | | this.spc1.Panel1.SuspendLayout(); |
| | | this.spc1.Panel2.SuspendLayout(); |
| | | this.spc1.SuspendLayout(); |
| | |
| | | this.grdSourceBill.Margin = new System.Windows.Forms.Padding(4); |
| | | this.grdSourceBill.Name = "grdSourceBill"; |
| | | this.grdSourceBill.ReadOnly = true; |
| | | this.grdSourceBill.RowHeadersWidth = 51; |
| | | this.grdSourceBill.RowTemplate.Height = 23; |
| | | this.grdSourceBill.Size = new System.Drawing.Size(1571, 745); |
| | | this.grdSourceBill.TabIndex = 20; |
| | | this.grdSourceBill.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.grdSourceBill_CellBeginEdit); |
| | | this.grdSourceBill.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSourceBill_CellEndEdit); |
| | | this.grdSourceBill.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSourceBill_CellClick); |
| | | this.grdSourceBill.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSourceBill_CellEndEdit); |
| | | this.grdSourceBill.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.grdSourceBill_EditingControlShowing); |
| | | this.grdSourceBill.KeyDown += new System.Windows.Forms.KeyEventHandler(this.grdSourceBill_KeyDown); |
| | | // |
| | |
| | | this.grdMain.Margin = new System.Windows.Forms.Padding(4); |
| | | this.grdMain.Name = "grdMain"; |
| | | this.grdMain.ReadOnly = true; |
| | | this.grdMain.RowHeadersWidth = 51; |
| | | this.grdMain.RowTemplate.Height = 23; |
| | | this.grdMain.Size = new System.Drawing.Size(1571, 745); |
| | | this.grdMain.TabIndex = 21; |
| | |
| | | this.grdSource.Margin = new System.Windows.Forms.Padding(4); |
| | | this.grdSource.Name = "grdSource"; |
| | | this.grdSource.ReadOnly = true; |
| | | this.grdSource.RowHeadersWidth = 51; |
| | | this.grdSource.RowTemplate.Height = 23; |
| | | this.grdSource.Size = new System.Drawing.Size(1571, 0); |
| | | this.grdSource.TabIndex = 0; |
| | |
| | | this.grdICMO.Margin = new System.Windows.Forms.Padding(4); |
| | | this.grdICMO.Name = "grdICMO"; |
| | | this.grdICMO.ReadOnly = true; |
| | | this.grdICMO.RowHeadersWidth = 51; |
| | | this.grdICMO.RowTemplate.Height = 23; |
| | | this.grdICMO.Size = new System.Drawing.Size(1571, 0); |
| | | this.grdICMO.TabIndex = 1; |
| | |
| | | this.grdProcFlow.Margin = new System.Windows.Forms.Padding(4); |
| | | this.grdProcFlow.Name = "grdProcFlow"; |
| | | this.grdProcFlow.ReadOnly = true; |
| | | this.grdProcFlow.RowHeadersWidth = 51; |
| | | this.grdProcFlow.RowTemplate.Height = 23; |
| | | this.grdProcFlow.Size = new System.Drawing.Size(1579, 7); |
| | | this.grdProcFlow.TabIndex = 2; |
| | |
| | | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); |
| | | this.spc1.Panel1.ResumeLayout(false); |
| | | this.spc1.Panel2.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)(this.spc1)).EndInit(); |
| | | this.spc1.ResumeLayout(false); |
| | | this.tabControl1.ResumeLayout(false); |
| | | this.tabPage3.ResumeLayout(false); |
| | |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <metadata name="Tool.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <metadata name="Tool.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
| | | <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
| | | <data name="Tool.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | /9j/4AAQSkZJRgABAQEASABIAAD/4QSARXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAAB |
| | |
| | | //////////////////////////////////////////////////////////////////////8A |
| | | </value> |
| | | </data> |
| | | <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>95, 17</value> |
| | | </metadata> |
| | | <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
| | | <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
| | | <value>25</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | omdelMian = JsonConvert.DeserializeObject<Sc_WorkBillSortBillMain>(sWhere); |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_Sc_WorkBillSortBill_Query '{omdelMian.HPlanBeginDate}',{(omdelMian.HProdORGID == null ? 0 : omdelMian.HProdORGID)},'{omdelMian.HSeOrderBillNo}'" + |
| | | $",'{omdelMian.HPlanEndDate.AddDays(1).AddSeconds(-1)}',{omdelMian.HMaterID},'{omdelMian.HICMOBillNo}',{omdelMian.HWorkShopID}", "h_p_JIT_Sc_WorkBillSortBill_Query"); |
| | | $",'{omdelMian.HPlanEndDate.AddDays(1)}',{omdelMian.HMaterID},'{omdelMian.HICMOBillNo}',{omdelMian.HWorkShopID}", "h_p_JIT_Sc_WorkBillSortBill_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | var HOrderLev = list[i]["订åç级"].ToString(); |
| | | var HMainSourceInterID = list[i]["æºå主å
ç "].ToString(); |
| | | var HMainSourceEntryID = list[i]["æºååå
ç "].ToString(); |
| | | var HPlanQty = list[i]["è®¡åæ°é"].ToString(); |
| | | |
| | | if (HSourceID == "") |
| | | { |
| | |
| | | " HMaterID, HMaterName, HMaterModel, HUnitID, HSeOrderBillQty," + |
| | | " HOrderNeedQty, HSplitQty, HDayPlanSumQty,HPlanBeginDate," + |
| | | "HSeOrderBillNo,HICMOBillType,HSourceStockInQty,HLeftPlanQty,HOrderLev,HPreparatDate," + |
| | | "HMainSourceInterID,HMainSourceEntryID)values" + |
| | | "HMainSourceInterID,HMainSourceEntryID,HICMOInterID_Sec,HICMOEntryID_Sec,HPlanQty)values" + |
| | | $"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," + |
| | | $"'{BillType}',GETDATE(),1,'{user}',getdate(),'{HICMOBillNo}','{HOrderType}'," + |
| | | $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HProdORGID == "" ? 0.ToString() : HProdORGID)}," + |
| | | $" {(HMaterID == "" ? 0.ToString() : HMaterID)}, '{HMaterName}', '{HMaterModel}', {(HUnitID == "" ? 0.ToString() : HUnitID)}, {(HSeOrderBillQty == "" ? 0.ToString() : HSeOrderBillQty)}," + |
| | | $" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," + |
| | | $"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," + |
| | | $"{HMainSourceInterID},{HMainSourceEntryID})"); |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty})"); |
| | | } |
| | | |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HDayPlanSumQty={list[i]["æ¥è®¡åæ°éæ»é"].ToString()} where HInterID={(HInterID==0?int.Parse(list[i]["hmainid"].ToString()):HInterID)} and HBillNo='{(HBillNo==""?list[i]["åæ®å·"].ToString(): HBillNo)}'"); |
| | |
| | | from |
| | | ( |
| | | select sum(HSourceStockInQty)FCXStockInQty,HICMOEntryID_Sec FPRDMOENTYID from SC_WORKBILLSORTBILLMAIN a |
| | | --where a.HInterID IN ({0}) |
| | | where a.HInterID IN ({0}) |
| | | group by HICMOEntryID_Sec |
| | | ) a |
| | | join AIS20210811135644..T_PRD_PPBOM T1 on a.FPRDMOENTYID = t1.FMOENTRYID |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | DataSet dt = new DataSet(); |
| | | oCN.RunProc("exec h_p_ICMOBillList_PrimarySubTable"); |
| | | ds = oCN.RunProcReturn($"select * from ##ICMOBillList where æºå主å
ç in({hmainid}) and æºååå
ç in({HEntryID})", "##ICMOBillList"); |
| | | |
| | | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | dt = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where æºå主å
ç in({ds.Tables[0].Rows[i]["æºå主å
ç "].ToString()}) and æºååå
ç in({ds.Tables[0].Rows[i]["æºååå
ç "].ToString()})", "h_v_JIT_Sc_WorkBillSortBillList"); |
| | | if (dt.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç产æç»è¡éå¤,éå¤çç产订åå·:"+ ds.Tables[0].Rows[i]["ç产订åå·"].ToString()+",æç»è¡å·:"+ ds.Tables[0].Rows[i]["ç产订åæç»è¡å·"].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | "HICMOEntrySEQ,HWorkShopID,HSourceID, HYX, HEmpID," + |
| | | " HMaterID, HMaterName, HMaterModel, HUnitID, HBatchNo," + |
| | | " HSeOrderBillQty, HPlanQty, HCompleteQty,HPreparatDate," + |
| | | "HMainSourceInterID,HMainSourceEntryID,HProdORGID)values" + |
| | | "HMainSourceInterID,HMainSourceEntryID,HProdORGID,HICMOInterID_Sec,HICMOEntryID_Sec)values" + |
| | | $"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," + |
| | | $"'{BillType}',GETDATE(),1,'{user}','{HDate}','{HICMOBillNo}','{HOrderType}'," + |
| | | $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HEmpID == "" ? 0.ToString() : HEmpID)}," + |
| | | $" {(HMaterID == "" ? 0.ToString() : HMaterID)}, '{HMaterName}', '{HMaterModel}', {(HUnitID == "" ? 0.ToString() : HUnitID)}, '{HBatchNo}'," + |
| | | $" {(HSeOrderBillQty == "" ? 0.ToString() : HSeOrderBillQty)}, {(HPlanQty == "" ? 0.ToString() : HPlanQty)}, {(HCompleteQty == "" ? 0.ToString() : HCompleteQty)},getdate()," + |
| | | $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID})"); |
| | | $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID}, {HMainSourceInterID},{HMainSourceEntryID})"); |
| | | } |
| | | |
| | | int SumDay = 31; //卿䏤æä¹å·® DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days; |