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> |
| | |
| | | <Compile Include="åºç¡èµæ\InterFaceåºç¡èµæ\ClsIF_ORGANIZATIONS_View.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¬ç¨åºç¡èµæ\ClsGy_FactoryDayOff_Ctl.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¬ç¨åºç¡èµæ\ClsGy_FactoryDayOff_View.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_MateMould_Ctl.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_QCCheckProject_View.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_StdWorkTimes_Ctl.cs" /> |
| | | <Compile Include="æºå\ERPæºå\Cls_S_Sc_ABJJD.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class ClsGy_MateMould_Ctl : DBUtility.ClsGy_Base_Ctl |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | //å代ç ç¨äº æ¿æ¢åé¡¹ç® |
| | | public string HOldNumber; |
| | | public List<Model.ClsGy_MateMould_Model> DetailColl = new List<Model.ClsGy_MateMould_Model>(); |
| | | |
| | | //åå®¡æ ¸ |
| | | public bool AbandonCheck(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc(" Update Gy_MateMouldInfo set HChecker='',HCheckDate=null Where HItemID=" + lngBillKey.ToString()); |
| | | sReturn = ""; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //å®¡æ ¸ |
| | | public bool CheckBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | |
| | | try |
| | | { |
| | | oCn.RunProc(" Update Gy_MateMouldInfo set HUsed=0,HChecker='" + DBUtility.ClsPub.CurUserName + "',HCheckDate='" + DBUtility.ClsPub.GetServerDate(-1) + "' Where HItemID=" + lngBillKey.ToString()); |
| | | //å°å
¶ä» 工价设置为 åç¨ |
| | | oCn.RunProc(" exec h_p_Gy_MateMouldStopflag " + lngBillKey.ToString()); |
| | | // |
| | | sReturn = ""; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ°å¢ |
| | | public override bool AddNew() |
| | | { |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsGy_MateMould_Model oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Gy_MateMouldInfo " + |
| | | " (HMaterID,HRelationID,HUnitID" + |
| | | ",HBeginDate,HEndDate" + |
| | | ",HUsed,HRemark,HMaker,HMakeDate)" + |
| | | " values(" + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + "," + oSub.HUnitID.ToString() + |
| | | ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹ |
| | | public override bool ModifyByID(Int64 sItemID) |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | DeleteByID(sItemID); //å é¤è®°å½ |
| | | //æå
¥è¡¨ |
| | | foreach (Model.ClsGy_MateMould_Model oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Gy_MateMouldInfo " + |
| | | " (HMaterID,HRelationID,HUnitID" + |
| | | ",HBeginDate,HEndDate" + |
| | | ",HUsed,HRemark,HMaker,HMakeDate)" + |
| | | " values(" + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + "," + oSub.HUnitID.ToString() + |
| | | ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ® |
| | | public bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet DsSub = new DataSet(); |
| | | DsSub = oCn.RunProcReturn("Select * from Gy_MateMouldInfo Where HitemID=" + lngBillKey.ToString(), "Gy_MateMouldInfo"); |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsGy_MateMould_Model oSub = new Model.ClsGy_MateMould_Model(); |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HRelationID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HRelationID"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HBeginDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HBeginDate"]); |
| | | oSub.HEndDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEndDate"]); |
| | | oSub.HRemark = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HRemark"]); |
| | | oSub.HMaker = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMaker"]); |
| | | oSub.HMakeDate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMakeDate"]); |
| | | oSub.HChecker = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HChecker"]); |
| | | oSub.HCheckDate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCheckDate"]); |
| | | |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //æ¹æ¹åæ® |
| | | //public bool BatchModifyBill(Int64 lngBillKey, double sPrice, ref string sReturn) |
| | | //{ |
| | | // try |
| | | // { |
| | | // oCn.BeginTran(); |
| | | // oCn.RunProc(" Update Gy_MateMouldInfo set HPrice=" + sPrice.ToString() + " Where HItemID=" + lngBillKey.ToString()); |
| | | // sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | // oCn.Commit(); |
| | | // return true; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // sReturn = e.Message; |
| | | // oCn.RollBack(); |
| | | // return false; |
| | | // } |
| | | //} |
| | | |
| | | //æ ¹æ®ç©æåå·¥åºè¿å工价 //b å价为tureï¼å®é¢ä¸ºfalse |
| | | //public double LoadProcPrice(Int64 sMaterID, Int64 sProcID, Int64 sSourceID, bool b) |
| | | //{ |
| | | // double sPrice = 0; |
| | | // try |
| | | // { |
| | | // //æ¥è¯¢ä¸»è¡¨ |
| | | // DataSet DsSub = new DataSet(); |
| | | // DsSub = oCn.RunProcReturn("Select top 1 * from Gy_ProcPrice Where HStopflag=0 and HEndDate>=convert(varchar(10),Getdate(),120) and HChecker<>'' and HMaterID=" + sMaterID.ToString() + " and HProcID=" + sProcID.ToString() + " and HSourceID=" + sSourceID.ToString(), "Gy_ProcPrice"); |
| | | // if (DsSub == null) |
| | | // { |
| | | // return 0; |
| | | // } |
| | | // if (b) |
| | | // { |
| | | // sPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[0]["HPrice"]); |
| | | // } |
| | | // else |
| | | // { |
| | | // sPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[0]["HFixPrice"]); |
| | | // } |
| | | // return sPrice; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // return 0; |
| | | // } |
| | | //} |
| | | |
| | | //æé 彿° |
| | | public ClsGy_MateMould_Ctl() |
| | | { |
| | | MvarItemKey = "Gy_MateMouldInfo"; |
| | | MvarReportTitle = "模å
·å¯¹åºäº§åèµæ"; |
| | | } |
| | | } |
| | | } |
| | |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_CostCenterDeptRelation_Model.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_CostItemAccount_Model.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_MateMouldInfo_Model.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_MateMould_Model.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_MatePriceProperty_Model.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_QCCheckProjectMain.cs" /> |
| | | <Compile Include="åºç¡èµæ\å
¶ä»åºç¡èµæ\ClsGy_QCCheckProjectSub.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsGy_MateMould_Model : DBUtility.ClsGy_Base_Model |
| | | { |
| | | public long HItemID; |
| | | public long HMaterID; |
| | | public long HRelationID; |
| | | public long HUnitID; |
| | | public bool HUsed; //å½åæ£å¨å¯ç¨ |
| | | public DateTime HBeginDate; |
| | | public DateTime HEndDate; |
| | | public string HRemark; |
| | | public string HMaker; |
| | | public string HMakeDate; |
| | | public string HChecker; |
| | | public string HCheckDate; |
| | | public string HType; |
| | | public long HMouldQty; |
| | | } |
| | | } |
| | |
| | | { |
| | | omodel.Sc_ICMOReportBill_MESFlag = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | //æ¶æéç¥å(éè´§åãå°è´§ç¡®è®¤ï¼ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_BarCodeCtl") |
| | | { |
| | | omodel.Cg_POInStockBill_BarCodeCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_AutoCheck") |
| | | { |
| | | omodel.Cg_POInStockBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_ERPMode") |
| | | { |
| | | omodel.Cg_POInStockBill_ERPMode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //éè´å
¥åºå |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_POStockInBill_AutoCheck") |
| | | { |
| | |
| | | public string Sc_ICMOReportBill_UpdateSourceInterID; //ä¸ä¼ ååå¡«æ¡ç æ¡£æ¡æºåä¿¡æ¯ |
| | | public string Sc_ICMOReportBill_MESFlag; //çäº§æ±æ¥å忥MESæ è®°ï¼Yä¸ºåæ¥ |
| | | |
| | | //æ¶æéç¥å(éè´§åãå°è´§ç¡®è®¤ï¼ |
| | | public string Cg_POInStockBill_AutoCheck; //æ¯å¦èªå¨å®¡æ ¸ |
| | | public string Cg_POInStockBill_ERPMode; //WMSç³»ç»åæ¥è³ERPçç±»åï¼WISEãCLOUDï¼ |
| | | public string Cg_POInStockBill_BarCodeCtl; //å°è´§ç¡®è®¤å¿
é¡»æ«ç ç®±æ¡ç |
| | | |
| | | //éè´å
¥åº |
| | | public string Kf_POStockInBill_AutoCheck; //æ¯å¦èªå¨å®¡æ ¸ |
| | | public string Kf_POStockInBill_ERPMode; //WMSç³»ç»åæ¥è³ERPçç±»åï¼WISEãCLOUDï¼ |
| | |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 5; |
| | | if (sTMNumber.Length != 16) |
| | | LSHlen = 4; |
| | | if (sTMNumber.Length != 16 && sTMNumber.Length != 15) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤16ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼å¶é æ¬é¨1ä½:[0] + æºå代ç 5ä½:[" + HModelName + "] + å¹´ææ¥5ä½:["+ HBarCodeDate + "] + æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "]+ å缩æº1ä½:["+ HYasuoji + "]+00 ; "); |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤15æ16ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼å¶é æ¬é¨1ä½:[0] + æºå代ç 5ä½:[" + HModelName + "] + å¹´ææ¥4æ5ä½:["+ HBarCodeDate + "] + æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "]+ å缩æº1ä½:["+ HYasuoji + "]+00 ; "); |
| | | return; |
| | | } |
| | | } |
| | |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 5; |
| | | if (sTMNumber.Length != 18) |
| | | LSHlen = 4; |
| | | if (sTMNumber.Length != 18 && sTMNumber.Length != 17) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤18ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼ç©æä»£ç 11ä½:["+ HMaterNumber.Replace(".", "") + "]+å¹´ææ¥5ä½:["+ HBarCodeDate + "]+æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "];"); |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤17æ18ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼ç©æä»£ç 11ä½:["+ HMaterNumber.Replace(".", "") + "]+å¹´ææ¥4æ5ä½:["+ HBarCodeDate + "]+æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "];"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | HMinQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HMinQtyCol].Value); |
| | | HSumQty = ClsPub.isDoule(grdMain.Rows[j].Cells[HQtyCol].Value); |
| | | n = 0; |
| | | int nn = 0; |
| | | for (int i = k; i < HBQty; i++) |
| | | { |
| | | if (HSumQty - HMinQty > 0) |
| | |
| | | grdSub.Rows[i].Cells[HGiveAwayFlag2Col] = oCell; |
| | | k = k + 1; |
| | | n = n + 1; |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | nn = nn + 1; |
| | | } |
| | | //åå°æ¹éæ§è¡è¯å¥ |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "'," + nn.ToString() + " "); |
| | | } |
| | | } |
| | | string HWei = ""; //å°¾æ° |
| | |
| | | public string PrintQtyCtl = ""; //æ¡ç æå°æ¬¡æ°æ§å¶ |
| | | public string UpdatePrintQtyCtl = ""; //æ¡ç æå°æ¬¡æ°æ´æ° |
| | | public string SourceQtyCtl = ""; //è¶
æºåæ°éæ§å¶ |
| | | public string CampanyName = ""; //客æ·å®å¶ååç§° |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | |
| | | PrintQtyCtl = oSystemParameter.omodel.BarCode_PrintQtyCtl; |
| | | UpdatePrintQtyCtl = oSystemParameter.omodel.BarCode_UpdatePrintQtyCtl; |
| | | SourceQtyCtl = oSystemParameter.omodel.BarCode_SourceQtyCtl; |
| | | CampanyName = oSystemParameter.omodel.WMS_CampanyName; |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region ç»å®ææ¡ç |
| | | private void bdBarCode_Pack_Click(object sender, EventArgs e) |
| | | { |
| | | if (grdMain.CurrentRow == null) |
| | | { |
| | | MessageBox.Show("请å
éæ©éè¦ç»å®çæ¡ç ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | Int64 hmainid = 0; |
| | | string HItemID = ""; |
| | | string s = ""; |
| | | string HBarCode_Pack = ""; |
| | | for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++) |
| | | { |
| | | if (s.Length > 4500) |
| | | { |
| | | HItemID = HItemID + "#" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | | s = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | | } |
| | | else |
| | | { |
| | | HItemID = HItemID + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | | s = s + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | | } |
| | | |
| | | //è·åææ¡ç å·ï¼ææ¡ç =æéæ¡ç 䏿µæ°´å·æå¤§çæ¡ç +â-1â |
| | | if (hmainid<DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString())) |
| | | { |
| | | hmainid = DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()); |
| | | HBarCode_Pack = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("æ¡ç ç¼å·")].Value) + "-1"; |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | Int64 HFlag = 0; |
| | | HItemID = HItemID.Remove(0, 1); //廿å符串第ä¸ä¸ªå符 |
| | | string[] NewHItemID; |
| | | NewHItemID = HItemID.Split(Convert.ToChar("#")); |
| | | |
| | | for (int i = 0; i <= NewHItemID.Length - 1; i++) |
| | | { |
| | | if(i == NewHItemID.Length - 1) |
| | | { |
| | | HFlag = 1; |
| | | } |
| | | //ææ¡ç ç»å®å夿ï¼åå¡«ææ¡ç ä¿¡æ¯ï¼çæææ¡ç |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_BindPack '" + NewHItemID[i] + "','" + HBarCode_Pack + "','" + CampanyName + "'," + HFlag + ",'" + DBUtility.ClsPub.CurUserName + "'", "h_p_Gy_BarCodeBill_BindPack"); |
| | | if (DS == null || DS.Tables[0].Rows.Count <= 0) |
| | | { |
| | | oCn.CnClose(); |
| | | oCn.CnDispose(); |
| | | MessageBox.Show("ç»å®å¹¶çæææ¡ç 夿é误ï¼"); |
| | | return; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | oCn.CnClose(); |
| | | oCn.CnDispose(); |
| | | MessageBox.Show(DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"])); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | MessageBox.Show("ç»å®å¹¶çæææ¡ç æåï¼", "æç¤º"); |
| | | Display(); |
| | | oCn.Commit(); |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | oCn.RollBack(); |
| | | throw (e2); |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region è§£ç»ææ¡ç |
| | | private void jbBarCode_Pack_Click(object sender, EventArgs e) |
| | | { |
| | | if (grdMain.CurrentRow == null) |
| | | { |
| | | MessageBox.Show("请å
éæ©éè¦è§£ç»çæ¡ç ï¼", "æç¤º"); |
| | | return; |
| | | } |
| | | if (grdMain.SelectedRows.Count != 1) |
| | | { |
| | | MessageBox.Show("䏿¬¡åªå
许éä¸ä¸è¡æ¡ç è®°å½ï¼è¯·éæ°éæ©éè¦è§£ç»çæ¡ç ï¼"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | Int64 HItemID = 0; |
| | | HItemID = DBUtility.ClsPub.isLong(grdMain.SelectedRows[0].Cells[Fun_GetCol("hmainid")].Value); |
| | | |
| | | //ææ¡ç è§£ç»å夿ï¼åå¡«ææ¡ç ä¿¡æ¯ï¼å 餿æ¡ç |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_UnBindPack " + HItemID + ",'" + CampanyName + "'", "h_p_Gy_BarCodeBill_UnBindPack"); |
| | | if (DS == null || DS.Tables[0].Rows.Count <= 0) |
| | | { |
| | | MessageBox.Show("è§£ç»å¹¶å 餿æ¡ç 夿é误ï¼"); |
| | | return; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | MessageBox.Show(DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"])); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("è§£ç»å¹¶å 餿æ¡ç æåï¼", "æç¤º"); |
| | | Display(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | this.lbldj = new System.Windows.Forms.Label(); |
| | | this.lblCaption = new System.Windows.Forms.Label(); |
| | | this.Tool = new System.Windows.Forms.ToolStrip(); |
| | | this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); |
| | | this.eXCELToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
| | | this.cSVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
| | | this.dy = new System.Windows.Forms.ToolStripButton(); |
| | | this.yl = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); |
| | |
| | | this.timer2 = new System.Windows.Forms.Timer(this.components); |
| | | this.grdMain = new System.Windows.Forms.DataGridView(); |
| | | this.grdPrint = new System.Windows.Forms.DataGridView(); |
| | | this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); |
| | | this.eXCELToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
| | | this.cSVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
| | | this.bdBarCode_Pack = new System.Windows.Forms.ToolStripButton(); |
| | | this.jbBarCode_Pack = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.pPic.SuspendLayout(); |
| | | this.panel1.SuspendLayout(); |
| | | this.Tool.SuspendLayout(); |
| | |
| | | this.toolStripSeparator5, |
| | | this.zf, |
| | | this.fzf, |
| | | this.toolStripSeparator4, |
| | | this.bdBarCode_Pack, |
| | | this.jbBarCode_Pack, |
| | | this.toolStripSeparator6, |
| | | this.tc, |
| | | this.toolStripSeparator3, |
| | |
| | | this.Tool.Stretch = true; |
| | | this.Tool.TabIndex = 16; |
| | | this.Tool.Text = "toolStrip1"; |
| | | // |
| | | // toolStripDropDownButton1 |
| | | // |
| | | this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
| | | this.eXCELToolStripMenuItem, |
| | | this.cSVToolStripMenuItem}); |
| | | this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); |
| | | this.toolStripDropDownButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; |
| | | this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 47); |
| | | this.toolStripDropDownButton1.Text = "å¼åº"; |
| | | this.toolStripDropDownButton1.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.toolStripDropDownButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | // |
| | | // eXCELToolStripMenuItem |
| | | // |
| | | this.eXCELToolStripMenuItem.Name = "eXCELToolStripMenuItem"; |
| | | this.eXCELToolStripMenuItem.Size = new System.Drawing.Size(112, 22); |
| | | this.eXCELToolStripMenuItem.Text = "EXCEL"; |
| | | this.eXCELToolStripMenuItem.Click += new System.EventHandler(this.eXCELToolStripMenuItem_Click); |
| | | // |
| | | // cSVToolStripMenuItem |
| | | // |
| | | this.cSVToolStripMenuItem.Name = "cSVToolStripMenuItem"; |
| | | this.cSVToolStripMenuItem.Size = new System.Drawing.Size(112, 22); |
| | | this.cSVToolStripMenuItem.Text = "CSV"; |
| | | this.cSVToolStripMenuItem.Click += new System.EventHandler(this.cSVToolStripMenuItem_Click); |
| | | // |
| | | // dy |
| | | // |
| | |
| | | this.grdPrint.TabIndex = 8; |
| | | this.grdPrint.Visible = false; |
| | | // |
| | | // toolStripDropDownButton1 |
| | | // bdBarCode_Pack |
| | | // |
| | | this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { |
| | | this.eXCELToolStripMenuItem, |
| | | this.cSVToolStripMenuItem}); |
| | | this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); |
| | | this.toolStripDropDownButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; |
| | | this.toolStripDropDownButton1.Size = new System.Drawing.Size(45, 47); |
| | | this.toolStripDropDownButton1.Text = "å¼åº"; |
| | | this.toolStripDropDownButton1.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.toolStripDropDownButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.bdBarCode_Pack.AutoSize = false; |
| | | this.bdBarCode_Pack.Image = ((System.Drawing.Image)(resources.GetObject("bdBarCode_Pack.Image"))); |
| | | this.bdBarCode_Pack.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bdBarCode_Pack.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.bdBarCode_Pack.ImageTransparentColor = System.Drawing.Color.White; |
| | | this.bdBarCode_Pack.Name = "bdBarCode_Pack"; |
| | | this.bdBarCode_Pack.Size = new System.Drawing.Size(70, 47); |
| | | this.bdBarCode_Pack.Text = "ç»å®ææ¡ç "; |
| | | this.bdBarCode_Pack.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bdBarCode_Pack.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.bdBarCode_Pack.Click += new System.EventHandler(this.bdBarCode_Pack_Click); |
| | | // |
| | | // eXCELToolStripMenuItem |
| | | // jbBarCode_Pack |
| | | // |
| | | this.eXCELToolStripMenuItem.Name = "eXCELToolStripMenuItem"; |
| | | this.eXCELToolStripMenuItem.Size = new System.Drawing.Size(180, 22); |
| | | this.eXCELToolStripMenuItem.Text = "EXCEL"; |
| | | this.eXCELToolStripMenuItem.Click += new System.EventHandler(this.eXCELToolStripMenuItem_Click); |
| | | this.jbBarCode_Pack.AutoSize = false; |
| | | this.jbBarCode_Pack.Image = ((System.Drawing.Image)(resources.GetObject("jbBarCode_Pack.Image"))); |
| | | this.jbBarCode_Pack.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.jbBarCode_Pack.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.jbBarCode_Pack.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.jbBarCode_Pack.Name = "jbBarCode_Pack"; |
| | | this.jbBarCode_Pack.Size = new System.Drawing.Size(70, 47); |
| | | this.jbBarCode_Pack.Text = "è§£ç»ææ¡ç "; |
| | | this.jbBarCode_Pack.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.jbBarCode_Pack.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.jbBarCode_Pack.Click += new System.EventHandler(this.jbBarCode_Pack_Click); |
| | | // |
| | | // cSVToolStripMenuItem |
| | | // toolStripSeparator4 |
| | | // |
| | | this.cSVToolStripMenuItem.Name = "cSVToolStripMenuItem"; |
| | | this.cSVToolStripMenuItem.Size = new System.Drawing.Size(180, 22); |
| | | this.cSVToolStripMenuItem.Text = "CSV"; |
| | | this.cSVToolStripMenuItem.Click += new System.EventHandler(this.cSVToolStripMenuItem_Click); |
| | | this.toolStripSeparator4.Name = "toolStripSeparator4"; |
| | | this.toolStripSeparator4.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // Gy_BarCodeBillList |
| | | // |
| | |
| | | private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; |
| | | private System.Windows.Forms.ToolStripMenuItem eXCELToolStripMenuItem; |
| | | private System.Windows.Forms.ToolStripMenuItem cSVToolStripMenuItem; |
| | | private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; |
| | | private System.Windows.Forms.ToolStripButton bdBarCode_Pack; |
| | | private System.Windows.Forms.ToolStripButton jbBarCode_Pack; |
| | | } |
| | | } |
| | |
| | | 8iQ1XvVn58xU1WnxG1zAJmn61pmIPgBiIY95z/CSIgAAAABJRU5ErkJggg== |
| | | </value> |
| | | </data> |
| | | <data name="bdBarCode_Pack.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAG3SURBVDhPfVLdK0NhHH5LSXGn/QculCsfUbtRLl1JbhQh |
| | | taxNNPnOolY+yhjjQo12oRQ3bhWiZGULF3Kv5Nucbeacs4/HeX/HnJ289tRT7+/5/Z7nfc+vw+bXgvD4 |
| | | NuFZDojpC2DOvwX/1i6YCDPeDXEjDyu+C5oRhrgX1knMZrMQkfe83vNf45+QydlVEtKZDETkvaWlkMlk |
| | | Chn3LFOhptIQMQsgsHmElvYetHXYcHB4YgpjIzOLJMhKCiIqagoZLUVKJPEWlWg2UlOKs3KmB7ncC3RI |
| | | yioKMfc5Zc4IkhUMCAOXVgvY4OQsNeJJBYl/qKYM8/ZtQr9QCwlZtFf0j3lI+PiUIQmoaHvg/RJ7mMzX |
| | | KlDtv6NXUIBjeJoG3mNfiMbNlFXdXGy/MplZAGB1QeqxPtcUHV4lbUkxg7K2PK4XOW7+N3PYBiaoeI5+ |
| | | 4uXDINdWu1hhM0evc5SEx7c4nt4TRL51rvEAXLT+MR+fGn8m67YPUXH/IuH+NUbkNZnVB0C5opD8m3Me |
| | | QndfXpGHXECnlRF/ZILJ09zWhaqGJlTVG+R6ZW0jeAgNadjZ29f72iz36Cpj3yFNGCz1c9N0AAAAAElF |
| | | TkSuQmCC |
| | | </value> |
| | | </data> |
| | | <data name="jbBarCode_Pack.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADSSURBVDhPlZPRDYQgEERpxgaswlCGv/ZBSXwbC6AAC7AA |
| | | G9hj1huCuMS7SUYi8l4IqhvHUf5tHRWc59ntcRy3dgXrusq2baUppUf3fe8L3mD0J0EPZLsCC0Sdcw8B |
| | | 5hgV4HBaEIt14bIUCYUyTUViCmpYhqFICLM61wq41YcEbeDbDmqwbpEYMKICC0QhRhUwYMQUEGxhS6KC |
| | | EIJ472We51dYm8+DEr1Cgm8BkhijCeNe575vhZJLk8OdQMCvkhKM+FfwjBIdc4oAgaQtFlpzV0Q+Xg/P |
| | | E8pc2+4AAAAASUVORK5CYII= |
| | | </value> |
| | | </data> |
| | | <data name="tc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®ç¨æ·ç¼ç æ¥æ¾å·²åé
èåå表 |
| | | [Route("Xt_User/UserEmployeelistPlaylist")] |
| | | [HttpGet] |
| | | public object UserEmployeelistPlaylist(string HUserID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select HEmployeeID HItemID,èå代ç HNumber,èååç§° HName from h_v_Gy_UserEmployeeRelationList where HUserID='" + HUserID + "' ", "h_v_Gy_UserEmployeeRelationList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ èåä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¨æ·å
³èèåä¿å |
| | | [Route("Xt_User/SaveUserEmployee")] |
| | | [HttpPost] |
| | | public object SaveUserEmployee([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Models.Employee> lsmain = new List<Models.Employee>(); |
| | | msg2 = msg2.Substring(1, msg2.Length - 2); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Employee(msg2); |
| | | oCN.BeginTran(); |
| | | //å é¤å·²ç»å
³èçæ°æ® |
| | | oCN.RunProc("Delete From Gy_UserEmployeeRelation where HUserID='" + msg3.ToString() + "'"); |
| | | foreach (Models.Employee oItem in lsmain) |
| | | { |
| | | //éæ°åå
¥å
³èæ°æ® |
| | | oCN.RunProc("insert into Gy_UserEmployeeRelation (HEmployeeID,HUserID) values ('" + oItem.HItemID + "','" + msg3.ToString() + "')"); |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®ç¨æ·ç¼ç æ¥æ¾å·²åé
ç¨æ·å表 |
| | | [Route("Xt_User/UserPlaylist")] |
| | | [HttpGet] |
| | | public object UserPlaylist(string HUserID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select HUserID2,ç¨æ·ä»£ç HUserNumber2,ç¨æ·åç§° HUserName2 from h_v_Gy_UserUserList where HUserID='" + HUserID + "' ", "h_v_Gy_UserUserList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ç¨æ·ä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¨æ·å
³èç¨æ·ä¿å |
| | | [Route("Xt_User/SaveUserUser")] |
| | | [HttpPost] |
| | | public object SaveUserUser([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Models.Gy_UserUser> lsmain = new List<Models.Gy_UserUser>(); |
| | | msg2 = msg2.Substring(1, msg2.Length - 2); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Gy_UserUser(msg2); |
| | | oCN.BeginTran(); |
| | | //å é¤å·²ç»å
³èçæ°æ® |
| | | oCN.RunProc("Delete From Gy_UserByUserRelation where HUserID='" + msg3.ToString() + "'"); |
| | | foreach (Models.Gy_UserUser oItem in lsmain) |
| | | { |
| | | //éæ°åå
¥å
³èæ°æ® |
| | | oCN.RunProc("insert into Gy_UserByUserRelation (HUserID2,HUserID,HBillType,HUseFlag) values ('" + oItem.HUserID2 + "','" + msg3.ToString() + "','" + "" + "','" + "" + "')"); |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®ç¨æ·ç¼ç æ¥æ¾å·²åé
ç©æå表 |
| | | [Route("Xt_User/MaterPlaylist")] |
| | | [HttpGet] |
| | | public object MaterPlaylist(string HUserID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select HMaterID,ç©æä»£ç HMaterNumber,ç©æåç§° HMaterName from h_v_Gy_UserMaterList where HUserID='" + HUserID + "' ", "h_v_Gy_UserMaterList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ç©æä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¨æ·å
³èç©æä¿å |
| | | [Route("Xt_User/SaveUserMater")] |
| | | [HttpPost] |
| | | public object SaveUserMater([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Models.Gy_UserMater> lsmain = new List<Models.Gy_UserMater>(); |
| | | msg2 = msg2.Substring(1, msg2.Length - 2); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Gy_UserMater(msg2); |
| | | oCN.BeginTran(); |
| | | //å é¤å·²ç»å
³èçæ°æ® |
| | | oCN.RunProc("Delete From Gy_UserMaterRelation where HUserID='" + msg3.ToString() + "'"); |
| | | foreach (Models.Gy_UserMater oItem in lsmain) |
| | | { |
| | | //éæ°åå
¥å
³èæ°æ® |
| | | oCN.RunProc("insert into Gy_UserMaterRelation (HMaterID,HUserID) values ('" + oItem.HMaterID + "','" + msg3.ToString() + "')"); |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®ç¨æ·ç¼ç æ¥æ¾å·²åé
客æ·å表 |
| | | [Route("Xt_User/CustomerPlaylist")] |
| | | [HttpGet] |
| | | public object CustomerPlaylist(string HUserID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select HCusID,客æ·ä»£ç HCustomerNumber,客æ·åç§° HCustomerName from h_v_Gy_UserCustomerList where HUserID='" + HUserID + "' ", "h_v_Gy_UserCustomerList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ 客æ·ä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¨æ·å
³èç©æä¿å |
| | | [Route("Xt_User/SaveUserCustomer")] |
| | | [HttpPost] |
| | | public object SaveUserCustomer([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Models.Gy_UserCustomer> lsmain = new List<Models.Gy_UserCustomer>(); |
| | | msg2 = msg2.Substring(1, msg2.Length - 2); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Gy_UserCustomer(msg2); |
| | | oCN.BeginTran(); |
| | | //å é¤å·²ç»å
³èçæ°æ® |
| | | oCN.RunProc("Delete From Gy_UserCustomerRelation where HUserID='" + msg3.ToString() + "'"); |
| | | foreach (Models.Gy_UserCustomer oItem in lsmain) |
| | | { |
| | | //éæ°åå
¥å
³èæ°æ® |
| | | oCN.RunProc("insert into Gy_UserCustomerRelation (HCusID,HUserID) values ('" + oItem.HCusID + "','" + msg3.ToString() + "')"); |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | long HWorkCenterID = list[0].HWorkCenterID; //å·¥ä½ä¸å¿ |
| | | |
| | | long HBadWHID = list[0].HBadWHID; //ä¸è¯ä»åº |
| | | long HWasterWHID = list[0].HWasterWHID; //æ¥åºä»åº |
| | | long HBadCountDevelopWHID = list[0].HBadCountDevelopWHID; //ç åä¸è¯åä»åº |
| | | long HWWBadWHID = list[0].HWWBadWHID; //å§å¤ä¸è¯ä»åº |
| | | long HWWWasterWHID = list[0].HWWWasterWHID; //å§å¤æ¥åºä»åº |
| | | long HWHID = list[0].HWHID; //è¯åä»åº |
| | | |
| | | |
| | | //夿æé |
| | | //if (!ClsPub.Security_Log("Gy_Process_Edit", 1, false, msg3)) |
| | |
| | | ",HTypeFlow,HTypeCount,HDeptNumber,HSNo" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HBarCodeForBase,HProcessID_K3,HBillSubType,HAutoTrunFlag" + |
| | | ",HFixPrice,HOverFixPrice,HProcMulID,HProcCheckNote" + |
| | | ",HUSEORGID,HWorkCenterID) " + |
| | | ",HUSEORGID,HWorkCenterID,HBadWHID,HWasterWHID,HBadCountDevelopWHID,HWWBadWHID,HWWWasterWHID,HWHID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "','" + HSNo.ToString() + |
| | | "'," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID + |
| | | ",'" + HBarCode + "'," + HProcessID_K3 + ",'" +HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) + |
| | | ",'" + HFixPrice.ToString() + "'," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "'" + |
| | | ","+ HUSEORGID + "," + HWorkCenterID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ","+ HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | ",HOverFixPrice= " + HOverFixPrice + |
| | | ",HProcMulID= " + HProcMulID + |
| | | ",HWorkCenterID= " + HWorkCenterID + |
| | | ",HBadWHID= " + HBadWHID + |
| | | ",HWasterWHID= " + HWasterWHID + |
| | | ",HBadCountDevelopWHID= " + HBadCountDevelopWHID + |
| | | ",HWWBadWHID= " + HWWBadWHID + |
| | | ",HWWWasterWHID= " + HWWWasterWHID + |
| | | ",HWHID= " + HWHID + |
| | | ",HProcCheckNote='" + HProcCheckNote + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | public int HOrgID;//ç»ç» |
| | | public string HPZStatus;//å质确认 |
| | | public string HCKStatus;//ä»åºæ¥æ¶ |
| | | public string Arbitrarily;//ä»»æåæ° |
| | | } |
| | | |
| | | [Route("Cj_CallGoodsBillBack/CallGoodsBillBackMainList")] |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_JIT_CallGoodsBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_IF_JIT_CallGoodsBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_JIT_CallGoodsBillList where 1=1 " + sWhere + " and å¶å人='"+user+"' order by hmainid desc", "h_v_IF_JIT_CallGoodsBillList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | public string MaterialCode { get; set; } |
| | | public string MaterialName { get; set; } |
| | | public string MaterialModel { get; set; } |
| | | public string Arbitrarily { get; set; } |
| | | public string HBillStatus { get; set; } |
| | | public int? HOrgID; |
| | | } |
| | | |
| | |
| | | JIT_SendGoodsBill com = JsonConvert.DeserializeObject<JIT_SendGoodsBill>(sWhere.ToString()); |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_DeptCheckGoodsBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.HDeptName}'," + |
| | | $"'{com.MaterialCode}','{com.MaterialName}','{com.MaterialModel}','{com.HOrgID}'", "h_p_JIT_DeptCheckGoodsBillList_Query"); |
| | | $"'{com.MaterialCode}','{com.MaterialName}','{com.MaterialModel}','{com.HOrgID}','{com.HBillStatus}'", "h_p_JIT_DeptCheckGoodsBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è½¦é´æ¶æå表 æ¤éç¡®è®¤æ¶æ |
| | | [Route("Cj_SendGoodsBill/DeptCheckGoodsBillList_revoke")] |
| | | [HttpGet] |
| | | public object DeptCheckGoodsBillList_revoke(string HInterID, string HEntryID, string User) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("JIT_SendGoodsBill_Check", 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc($"update JIT_SendGoodsBillMain set HChecker='' ,HCheckDate=null,HBillStatus=1 where HInterID='{HInterID}'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "已宿æ¤é"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è½¦é´æ¶æå表 å é¤ |
| | | [Route("Cj_SendGoodsBill/DeleteBill")] |
| | | [HttpGet] |
| | | public object DeleteBill(string HInterID,string HEntryID, string User) |
| | | { |
| | | try |
| | | { |
| | | DataSet dataset = new DataSet(); |
| | | //è·å车é´é
éåæ®æ°æ® |
| | | dataset = oCN.RunProcReturn($"select * from JIT_SendGoodsBillMain a inner join JIT_SendGoodsBillSub b on a.HInterID = b.HInterID where a.HInterID={HInterID} and HEntryID={HEntryID} ", "JIT_SendGoodsBillMain"); |
| | | |
| | | var HQty = double.Parse(dataset.Tables[0].Rows[0]["HQty"].ToString()); |
| | | |
| | | //è·åæ£æé
éåçæ°æ® |
| | | ds = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillMain a inner join JIT_ComplementGoodsBillSub b on a.HInterID = b.HInterID where a.HInterID={(dataset.Tables[0].Rows[0]["HMainSourceInterID"].ToString())} and b.HMaterID={(dataset.Tables[0].Rows[0]["HMaterID"].ToString())} and b.HWHID={(dataset.Tables[0].Rows[0]["HWHID"].ToString())} ", "JIT_ComplementGoodsBillMain"); |
| | | |
| | | //è·åæ£æé
éå_LK表 æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillSub_LK where HInterID={(ds.Tables[0].Rows[0]["HInterID"].ToString())} and HSendQTY<>0 order by HSendQTY", "JIT_SendGoodsBillMain"); |
| | | |
| | | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | var HSendQTY = double.Parse(ds.Tables[0].Rows[i]["HSendQTY"].ToString()); |
| | | |
| | | //ä¿®æ¹è°æ¨æ°é |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY-{(HSendQTY > HQty ? HQty : HSendQTY)} where HInterID={ds.Tables[0].Rows[i]["HInterID"].ToString()} and HEntryID={ds.Tables[0].Rows[i]["HEntryID"].ToString()} "); |
| | | |
| | | HQty -= HSendQTY; |
| | | if (HQty <= 0) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | dataset = oCN.RunProcReturn($"select * from JIT_SendGoodsBillMain a inner join JIT_SendGoodsBillSub b on a.HInterID = b.HInterID where a.HInterID={HInterID} ", "JIT_SendGoodsBillMain"); |
| | | |
| | | //å 餿°æ® |
| | | if (dataset.Tables[0].Rows.Count != 1) |
| | | { |
| | | oCN.RunProc($"delete from JIT_SendGoodsBillSub where HInterID='{HInterID}' and HEntryID={HEntryID} "); |
| | | } |
| | | else |
| | | { |
| | | |
| | | oCN.RunProc($"delete from JIT_SendGoodsBillMain where HInterID='{HInterID}'"); |
| | | oCN.RunProc($"delete from JIT_SendGoodsBillSub where HInterID='{HInterID}' and HEntryID={HEntryID} "); |
| | | } |
| | | |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "已宿å é¤"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("MES_StationEntrustInBill_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_MES_StationEntrustInBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | //å¾å°ä¿¡æ¯ |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcExchBilltransRelationQty " + HProcExchHinteID + "", "h_p_Sc_ProcExchBilltransRelationQty"); |
| | | //åå
¥ä¿¡æ¯ |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | double HMoney = list[0].HMoney;//éé¢ |
| | | string HRemark = list[0].HRemark;//夿³¨ |
| | | double HTaxRate = list[0].HTaxRate;//ç¨ç |
| | | long HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | string HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | int HWWWorkOrderInterID = 0;//å§å¤å·¥åå·åå
ç |
| | | int HWWWorkOrderEntryID = 0;//å§å¤å·¥åå·ä¸»å
å |
| | |
| | | string HBarCode = list[0].HBarCode;//æ¡å½¢ç |
| | | string HAddr = ""; |
| | | string HBarCodeMaker = ""; |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | if (HProcNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPieceQty" + |
| | | ",HProcNo,HOrderProcNO,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID,HMainInterID" + |
| | | ",HProcNo,HOrderProcNO,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID,HMainInterID,HPRDOrgID" + |
| | | ") " + |
| | | " values('3792','3792'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillStatus.ToString() + "',getdate(),'" + HMaker + "',getdate()" + |
| | | ",'" + HYear.ToString() + "','" + HPeriod.ToString() + "','" + HRemark + "','" + HInnerBillNo + "'" + |
| | |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "'" + ",'" + HWWWorkOrderBillNo + "'" + "," + HWWWorkOrderInterID + "" + "," + HWWWorkOrderEntryID + "," + HMainInterID + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "'" + ",'" + HWWWorkOrderBillNo + "'" + "," + HWWWorkOrderInterID + "" + "," + HWWWorkOrderEntryID + "," + HMainInterID + "," + HPRDOrgID + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("MES_StationEntrustOutBill_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_MES_StationEntrustOutBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | |
| | | double HMoney = list[0].HMoney;//éé¢ |
| | | string HRemark = list[0].HRemark;//夿³¨ |
| | | double HTaxRate = list[0].HTaxRate;//ç¨ç |
| | | long HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | string HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | int HWWWorkOrderInterID = 0;//å§å¤å·¥åå·åå
ç |
| | | int HWWWorkOrderEntryID = 0;//å§å¤å·¥åå·ä¸»å
å |
| | |
| | | double HMainSourceInterID = 0; |
| | | string HMainSourceBillNo = ""; |
| | | string HMainSourceBillType = "3792"; |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | if (HProcNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationOutTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HTaxRate,HQty,HPrice,HMoney,HPrice_BHS,HMoney_BHS,HBadCount" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HProcNo,HOrderProcNO,HLastSubProc,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID,HMainInterID" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HProcNo,HOrderProcNO,HLastSubProc,HWWWorkOrderBillNo,HWWWorkOrderInterID,HWWWorkOrderEntryID,HMainInterID,HPRDOrgID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HInnerBillNo + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HTaxRate + "," + HQty + "," + HPrice + "," + HMoney + "," + HPrice_BHS + "," + HMoney_BHS + "," + HBadCount + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + HProcNo + ",'" + HOrderProcNO + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + ",'" + HWWWorkOrderBillNo + "'," + HWWWorkOrderInterID + "," + HWWWorkOrderEntryID + "," + HMainInterID + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + HProcNo + ",'" + HOrderProcNO + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + ",'" + HWWWorkOrderBillNo + "'," + HWWWorkOrderInterID + "," + HWWWorkOrderEntryID + "," + HMainInterID + "," + HPRDOrgID + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | long HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | if (HProcNo <= 0) |
| | | string HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | if (HProcNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string HSourceName = list[0].HSourceName;//çäº§èµæºåç§° |
| | | long HCenterID = list[0].HCenterID;//å·¥ä½ä¸å¿ID |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | //忮宿´æ§å¤æ |
| | | if (HMaterID <= 0) |
| | | { |
| | |
| | | ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HStationInTime,HSourceID" + |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + |
| | | ",HSupID,HQty,HPrice,HMoney,HPieceQty,HSourceName,HCenterID" + |
| | | ",HProcNo,HOrderProcNO,HMainInterID" + |
| | | ",HProcNo,HOrderProcNO,HMainInterID,HPRDOrgID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "'" + |
| | |
| | | ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HPieceQty + ",'" + HSourceName + "'," + HCenterID + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "'," + HMainInterID + |
| | | ",'" + HProcNo + "','" + HOrderProcNO + "','" + HMainInterID + "'," + HPRDOrgID + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationInBill_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_MES_StationInBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | double HMoney = 0; |
| | | double HBadCount = list[0].HBadCount;//ä¸è¯æ°é |
| | | long HCenterID = list[0].HCenterID;//å·¥ä½ä¸å¿ID |
| | | long HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | string HProcNo = list[0].HProcNo;//æµæ°´å· |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | string HSourceNameList = list[0].HSourceNameList;//è®¾å¤æ¸
å |
| | | long HMainSourceInterID = list[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | |
| | | double HPriceRate = list[0].HPriceRate;//ç³»æ° |
| | | double HWorkTimes = list[0].HWorkTimes;//å·¥æ¶ |
| | | long HQCCheckID = list[0].HQCCheckID;//æ£éªåID |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | //忮宿´æ§å¤æ |
| | | if (HProcExchInterID <= 0) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProcNo <= 0) |
| | | if (HProcNo == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HSourceID2,HSourceID3,HSourceID4,HSourceID5" + |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + "," + HSourceID2 + "," + HSourceID3 + "," + HSourceID4 + "," + HSourceID5 + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID + |
| | | ") "); |
| | | } |
| | | else if ("Modify".Equals(eventType)) |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.CJGL |
| | | { |
| | | public class Mes_OrderProcFlowAllReportController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region 车é´å·¥åºå
¨ç¨è·è¸ªæ¥è¡¨ æ¥è¯¢ |
| | | [Route("Mes_OrderProcFlowAllReport/OrderProcFlowAllReportList")] |
| | | [HttpGet] |
| | | public object OrderProcFlowAllReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //ååºååä¼ éçå¼ |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_Mes_OrderProcFlowAllReport " +sWhere+"", "h_p_Mes_OrderProcFlowAllReport"); |
| | | |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºå¨å¶åæ¥è¡¨(纵å) æ¥è¯¢ |
| | | [Route("Mes_OrderProcFlowAllReport/WIPProcReportList")] |
| | | [HttpGet] |
| | | public object WIPProcReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //ååºååä¼ éçå¼ |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_MES_WIPProcReport_New " + sWhere + "", "h_p_MES_WIPProcReport_New"); |
| | | |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯æç»è¯çæ¥è¡¨ æ¥è¯¢ |
| | | [Route("Mes_OrderProcFlowAllReport/DefectiveDetailedYieldReportList")] |
| | | [HttpGet] |
| | | public object DefectiveDetailedYieldReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //ååºååä¼ éçå¼ |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_DefectiveDetailedYieldReport where 1=1 "+sWhere+" order by HProcID", "h_v_DefectiveDetailedYieldReport"); |
| | | |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯æç»è¯çæ¥è¡¨ æ¥è¯¢ |
| | | [Route("Mes_OrderProcFlowAllReport/StationOutSumReportList")] |
| | | [HttpGet] |
| | | public object StationOutSumReportList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //ååºååä¼ éçå¼ |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_StationOutSumReport_New " + sWhere + "", "h_p_Sc_StationOutSumReport_New"); |
| | | |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_MateMouldController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | /// <summary> |
| | | /// è¿å产åä¸å¨å
·æ¸
åå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_MateMould/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Gy_MateMould", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | string sql1 = string.Format(@"select * from h_v_Gy_MateMouldInfoList where 1 =1 ");//where ç»ç»åç§°='" + Organization + "' |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_MateMouldInfoList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by HItemID"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_MateMouldInfoList"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_MateMould/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_MateMouldInfoList where HitemID=" + HInterID, "h_v_Gy_MateMouldInfoList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region 产åä¸å¨å
·æ¸
åä¿å |
| | | [Route("Gy_MateMould/set_SaveBill")] |
| | | [HttpPost] |
| | | public object set_SaveBill([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | //ä¿ååæ® |
| | | return objJsonResult = AddBillMain(msg1); |
| | | } |
| | | |
| | | public json AddBillMain(string msg1) |
| | | { |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string OperationType = sArray[2].ToString().Trim(); |
| | | string msg4 = sArray[3].ToString(); |
| | | bool bResult; |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProcPriceList_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<ClsGy_MateMould> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_MateMould>>(msg2); |
| | | List<ClsGy_MateMould> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_MateMould>>(msg3); |
| | | DAL.ClsGy_MateMould_Ctl BillNew = new DAL.ClsGy_MateMould_Ctl(); |
| | | BillNew.DetailColl = new List<Model.ClsGy_MateMould_Model>(); |
| | | Model.ClsGy_MateMould_Model BillOld = new Model.ClsGy_MateMould_Model(); |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | | { |
| | | if (i >= 0)//HQty |
| | | { |
| | | Model.ClsGy_MateMould_Model oSub = new Model.ClsGy_MateMould_Model(); |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(subList[i].HMaterIDCol); |
| | | oSub.HRelationID = DBUtility.ClsPub.isLong(subList[i].HRelationIDCol); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(subList[i].HUnitIDCol); |
| | | oSub.HBeginDate = DBUtility.ClsPub.isDate(subList[i].HBeginDateCol); |
| | | oSub.HEndDate = DBUtility.ClsPub.isDate(subList[i].HEndDateCol); |
| | | oSub.HUsed = false; |
| | | oSub.HMaker = DBUtility.ClsPub.isStrNull(mainList[0].HMaker); |
| | | oSub.HMakeDate = DateTime.Today.ToString(); |
| | | oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[i].HRemarkCol); |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æç»è¡ä¿¡æ¯!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //ä¿å宿¯åå¤ç |
| | | if (OperationType.Equals("1.1") || OperationType.Equals("1.2") || OperationType.Equals("2")) |
| | | { |
| | | bResult = BillNew.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | bResult = BillNew.ModifyByID(DBUtility.ClsPub.isLong(mainList[0].HItemID)); |
| | | } |
| | | //æç¤º |
| | | if (bResult == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | //objJsonResult.Message = "ä¿å失败!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç¼è¾æ¶è¿å产åä¸å¨å
·æ¸
åä¿¡æ¯ |
| | | [Route("Gy_MateMould/GetMateMouldValue")] |
| | | [HttpGet] |
| | | public object GetMateMouldValue(int HItemID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select " + |
| | | "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HRelationID) 模å
·äº§å对åºè¡¨ä»£ç ,a.HUnitID,b.HName HRelationNameCol" + |
| | | ",b.HNumber HRelationNumberCol,a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" + |
| | | ",a.HRelationID HRelationIDCol,d.HNumber HUnitNumberCol,d.HName HUnitNameCol" + |
| | | ",a.HUnitID HUnitIDCol" + |
| | | ",a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" + |
| | | ",a.HRemark HRemarkCol " + |
| | | " from Gy_MateMouldInfo a " + |
| | | " left join h_v_Gy_Mould b on a.HRelationID = b.HItemID " + |
| | | " left join Gy_Material c on a.HMaterID = c.HItemID " + |
| | | " left join Gy_Unit d on a.HUnitID = d.HItemID where a.HItemID = " + HItemID, "Gy_MateMouldInfo"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route("LEMS/MES_Sc_ProcessExchangeIssue")] |
| | | [HttpGet] |
| | | public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HEntryId) |
| | | public object MES_Sc_ProcessExchangeIssue(string HGroupID, string HSourceID, string HSourceSub1ID, string HSourceSub2ID, string HSourceSub3ID, string HEntryId) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn($"exec REALESE_Sc_ProcessExchangeIssue '{HGroupID}','{HSourceID}','{HEntryId}' ", "REALESE_Sc_ProcessExchangeIssue"); |
| | | ds = oCN.RunProcReturn($"exec REALESE_Sc_ProcessExchangeIssue '{HGroupID}','{HSourceID}','{HSourceSub1ID}','{HSourceSub2ID}','{HSourceSub3ID}','{HEntryId}' ", "REALESE_Sc_ProcessExchangeIssue"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å·¥åºæµè½¬å¡ææ´¾æ¥æ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("LEMS/MES_Sc_ProcessExchangePlanDate")] |
| | | [HttpGet] |
| | | public object MES_Sc_ProcessExchangePlanDate(string HPlanBeginDate, string HPlanEndDate, string HEntryId) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@" |
| | | update Sc_ProcessExchangeBillSub set |
| | | HPlanBeginDate = '{0}', |
| | | HPlanEndDate = '{1}' |
| | | where cast(HInterID as varchar(20)) +'-'+ cast(HEntryID as varchar(20)) in |
| | | ( |
| | | select * from fn_Split('{2}',',') |
| | | )", HPlanBeginDate, HPlanEndDate, HEntryId); |
| | | oCN.RunProc(sql); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å¼å¸¸ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å·¥åºæµè½¬å¡åä¸è¾¾ |
| | | /// </summary> |
| | |
| | | { |
| | | return YqnQbService.DeleteProcess(hItemId); |
| | | } |
| | | /// <summary> |
| | | /// è·åä¸è¯ä»åº |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("api/newBill/getBadWHList")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetBadWHList(string sWhere) |
| | | { |
| | | return YqnQbService.GetBadWHList(sWhere); |
| | | } |
| | | /// <summary> |
| | | /// è·åæ¥åºä»åº |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("api/newBill/getWasterWHList")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetWasterWHList(string sWhere) |
| | | { |
| | | return YqnQbService.GetWasterWHList(sWhere); |
| | | } |
| | | /// <summary> |
| | | /// è·åç åä¸è¯åä»åº |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("api/newBill/getBadCountDevelopWHList")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetBadCountDevelopWHList(string sWhere) |
| | | { |
| | | return YqnQbService.GetBadCountDevelopWHList(sWhere); |
| | | } |
| | | /// <summary> |
| | | /// è·åå§å¤ä¸è¯ä»åº |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("api/newBill/getWWBadWHList")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetWWBadWHList(string sWhere) |
| | | { |
| | | return YqnQbService.GetWWBadWHList(sWhere); |
| | | } |
| | | /// <summary> |
| | | /// è·åå§å¤æ¥åºä»åº |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("api/newBill/getWWWasterWHList")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetWWWasterWHList(string sWhere) |
| | | { |
| | | return YqnQbService.GetWWWasterWHList(sWhere); |
| | | } |
| | | /// <summary> |
| | | /// è·åè¯åä»åº |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("api/newBill/getWHList")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetWHList(string sWhere) |
| | | { |
| | | return YqnQbService.GetWHList(sWhere); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | /// <summary> |
| | | /// å·¥èµæ¥è¡¨èå忍¡åæ¥å£ |
| | | /// </summary> |
| | | public class Pay_ReportController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | |
| | | #region [èåæç»å表] |
| | | [Route("Pay_EmpDet/list")] |
| | | [HttpGet] |
| | | public object PayEmpDetList(string HBDate, string HEDate, string HBENumber, string HEENumber, string HBMNumber, string HEMNumber, string HBPNumber, string HEPNumber) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_EmpWorkQtyEntryReport '" + HBDate + "','" + HEDate + "','" + HBENumber + "','" + HEENumber + "','" + HBMNumber + "','" + HEMNumber + "','" + HBPNumber + "','" + HEPNumber + "'", "h_p_Pay_EmpWorkQtyEntryReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //foreach (DataColumn col in ds.Tables[1].Columns) |
| | | //{ |
| | | |
| | | // Type dataType = col.DataType; |
| | | // string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | // columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | //} |
| | | |
| | | //if (ds.Tables[1].Rows.Count > 0) |
| | | //{ |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = ds.Tables[0].Rows.Count; |
| | | // objJsonResult.Message = "è·åèµæºç»å®æ°æ®æåï¼"; |
| | | // objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //åºååDataSetä¸çæ¶é´æ ¼å¼ï¼ç¶ååååºåå忥 |
| | | // objJsonResult.list = columnNameList; |
| | | // return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ°æ®ï¼"; |
| | | // objJsonResult.data = null; |
| | | // objJsonResult.list = columnNameList; |
| | | // return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [é¨é¨åæ¾æ¸
å] |
| | | [Route("Pay_Department/list")] |
| | | [HttpGet] |
| | | public object PayDepartment(int HYear,int HPeriod,int DeptID) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_PayMentDeptSendList '" + HYear + "','" + HPeriod + "','" + DeptID + "'", "h_p_Pay_PayMentDeptSendList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [é¨é¨å¹´åº¦åæ] |
| | | [Route("Pay_DepYearAnalyze/list")] |
| | | [HttpGet] |
| | | public object PayDepYearAnalyze(string DeptID,string EDeptID,int Year) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_PayMentDeptYearReport '" + DeptID + "','" + EDeptID + "','" + Year + "'", "h_p_PayMentDeptYearReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [å·¥èµåæ¾æ¸
å] |
| | | [Route("Pay_Wages/list")] |
| | | [HttpGet] |
| | | public object PayWages(int HYear, int HPeriod, int DeptID) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_PayMentSendList '" + HYear + "','" + HPeriod + "','" + DeptID + "'", "h_p_Pay_PayMentSendList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [å·¥èµå¹´æ¥è¡¨] |
| | | [Route("Pay_YearReport/list")] |
| | | [HttpGet] |
| | | public object PayYearReport(string DeptID, string EDeptID, int Year) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_PayMentYearReport '" + DeptID + "','" + EDeptID + "','" + Year + "'", "h_p_PayMentYearReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [è夿±æ»è¡¨] |
| | | [Route("Pay_Attendance/list")] |
| | | [HttpGet] |
| | | public object PayAttendance(int HYear,int HPeriod, int DeptID, string HStatus,string HType) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesList '" + HYear + "','" + HPeriod + "','" + DeptID + "','" + HStatus + "','" + HType+ "'", "h_p_Pay_WorkTimesList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [è®¡ä»¶å·¥èµæ±æ»åæ] |
| | | [Route("Pay_ByThePiece_SumAna/list")] |
| | | [HttpGet] |
| | | public object PayByThePieceSum(int HYear,int HPeriod,string DeptNumber, string DeptNumber2, string GroupNumber, string GroupNumber2) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_EmpPayMentSumReport '" + HYear + "','" + HPeriod + "','" + DeptNumber + "','" + DeptNumber2 + "','" + GroupNumber + "','" + GroupNumber2 + "'", "h_p_Pay_EmpPayMentSumReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [计æ¶å·¥èµæç»è¡¨] |
| | | [Route("Pay_ByTheTime_Detail/list")] |
| | | [HttpGet] |
| | | public object PayByTheTimeDetail(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesPayMentEntryReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_WorkTimesPayMentEntryReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [计æ¶å·¥èµæ±æ»è¡¨] |
| | | [Route("Pay_ByTheTime_Sum/list")] |
| | | [HttpGet] |
| | | public object PayByTheTimeSum(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesPayMentSumReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_WorkTimesPayMentSumReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [è®¡ä»¶å·¥èµæç»è¡¨] |
| | | [Route("Pay_ByThePiece_Detail/list")] |
| | | [HttpGet] |
| | | public object PayByThePieceDetail(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_SingleBalBillEntryReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_SingleBalBillEntryReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [è®¡ä»¶å·¥èµæ±æ»è¡¨] |
| | | [Route("Pay_ByThePiece_Sum/list")] |
| | | [HttpGet] |
| | | public object PayByThePieceSum(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Pay_SingleBalBillSumReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_SingleBalBillSumReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region[æ ¹æ®æ¡ç è¿å设å¤ä¿¡æ¯] |
| | | [Route("Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo")] |
| | | [HttpGet] |
| | | public object Gy_MouldFileBillBarCodeInfo(string HBarCode) |
| | | { |
| | | DataTable ds; |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //è·åé
件项ç®ç¼è¾æ°æ® |
| | | string sql1 = string.Format($"exec h_p_Gy_EquipFileGetInfoByBarCode {HBarCode}"); |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_EquipFileGetInfoByBarCode").Tables[0]; |
| | | |
| | | list.Add(ds);//è®¾å¤æ¡£æ¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·å设å¤ä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼è¯·æ£æ¥æ¡å½¢ç ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | public DateTime HEndDate { get; set; }//ç»ææ¶é´ |
| | | public string ProcMul { get; set; }//工段 |
| | | public string Hmaker { get; set; }//å½åç»å½äºº |
| | | public string Arbitrarily { get; set; }//ä»»æåæ° |
| | | } |
| | | |
| | | [Route("Sc_CallGoodsBackRequestBill/JIT_CallGoodsBackRequestBillList")] |
| | |
| | | CallGoodsBackRequest com = JsonConvert.DeserializeObject<CallGoodsBackRequest>(sWhere.ToString()); |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsRequestBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.MaterialNumber}'," + |
| | | $"'{com.MaterialName}','{com.MaterialModel}','{com.HDeptName}','{com.ProcMul}','{com.Hmaker}','{com.HOrgID}'", "h_p_JIT_BackGoodsRequestBillList_Query"); |
| | | $"'{com.MaterialName}','{com.MaterialModel}','{com.HDeptName}','{com.ProcMul}','{com.Hmaker}','{com.HOrgID}'", "h_p_JIT_BackGoodsRequestBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | for (int i = 0; i < listCa.Count; i++) |
| | | { |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoods_WHReceive {listCa[i].hmainid},{listCa[i].Hsubid}," + |
| | | $"{listCa[i].HSPID},{user}", "h_p_JIT_BackGoods_WHReceive"); |
| | | $"{listCa[i].HSPID},'{user}'", "h_p_JIT_BackGoods_WHReceive"); |
| | | |
| | | if (ds.Tables[0].Rows[0][0].ToString() == "1") |
| | | { |
| | |
| | | public DateTime HEndDate { get; set; }//ç»ææ¶é´ |
| | | public int ps { get; set; }//ä»
æ¾ç¤ºæªå®å
¨é
é |
| | | public string user { get; set; }//å½åç»å½äºº |
| | | public string Arbitrarily { get; set; }//ä»»æåæ° |
| | | } |
| | | |
| | | [Route("Sc_ComplementGoodBill/ComplementGoodBillList")] |
| | |
| | | //ååºååä¼ éçå¼ |
| | | ComplementGoodBill com = JsonConvert.DeserializeObject<ComplementGoodBill>(sWhere.ToString()); |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," + |
| | | $"'{com.MaterialModel}','{com.HICMOBillNo}','{com.CPNumber}','{com.CPName}','{com.CPModel}','{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}'," + |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," + |
| | | $"'{com.MaterialModel}','{com.HICMOBillNo}','{com.CPNumber}','{com.CPName}','{com.CPModel}'," + |
| | | $"{com.ps},{com.Organization},'{com.user}' ", "h_p_JIT_CallGoodsPlatForm_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | public long HSTOCKID = 0;//HSTOCKID |
| | | public string éæåå { get; set; }//éæåå |
| | | public int HMaterialID = 0; //HMaterialIDCol |
| | | public string ç©æä»£ç = ""; |
| | | public string HSourceBillNo { get; set; }//HSourceBillNoCol |
| | | public int è°åºä»åºå¯ç¨åºåæ°é = 0;//HKFQtyKYCol |
| | | public int è°åºä»åºåºåæ°é = 0;//HKFQtySCol |
| | |
| | | { |
| | | if (listCa[i].HMaterialID != 0 && listCa[i].嫿æ°é > 0) |
| | | { |
| | | var Hqty = 0.0; |
| | | var TuiHqty = 0.0; |
| | | //å½å忮已嫿 å 已鿿°é |
| | | ds = oCN.RunProcReturn($@" |
| | | select isnull(a.HQty,0) 已嫿æ°é,isnull(b.HQty,0) å·²éæç³è¯·æ°é from ( |
| | | select sum(b.HQty) HQty,c.HNumber ,b.HSourceBillNo |
| | | from JIT_CallGoodsBillMain a |
| | | join JIT_CallGoodsBillSub b on a.HInterID=b.HInterID |
| | | left join Gy_Material c on b.HMaterID=c.HItemID |
| | | where b.HSourceBillNo='{listCa[i].HSourceBillNo}' |
| | | group by c.HNumber,b.HSourceBillNo |
| | | ) a |
| | | left join ( |
| | | select sum(b.HQty) HQty,c.HNumber,b.HSourceBillNo |
| | | from JIT_CallGoodsBackRequestBillMain a |
| | | inner join JIT_CallGoodsBackRequestBillSub b on a.HInterID=b.HInterID |
| | | left join Gy_Material c on b.HMaterID=c.HItemID |
| | | where b.HSourceBillNo='{listCa[i].HSourceBillNo}' |
| | | group by c.HNumber,b.HSourceBillNo |
| | | ) b on a.HNumber=b.HNumber and a.HSourceBillNo=b.HSourceBillNo where a.HNumber='{listCa[i].ç©æä»£ç }'", "JIT_CallGoodsBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | Hqty = double.Parse(ds.Tables[0].Rows[0]["已嫿æ°é"].ToString()); |
| | | TuiHqty = double.Parse(ds.Tables[0].Rows[0]["å·²éæç³è¯·æ°é"].ToString()); |
| | | } |
| | | |
| | | if (listCa[i].嫿æ°é > listCa[i].计ååææ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa[i].åºåæ°é == 0 && listCa[i].嫿æ°é > 0) |
| | | if((listCa[i].嫿æ°é + Hqty - TuiHqty)> listCa[i].计ååææ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å«ææ»æ°é大äºè®¡ååææ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_WarehouseList where ä»åºID=" + listCa[i].è°åºä»åºid + " and ç©æç¼ç = '" + listCa[i].ç©æä»£ç + "' and åºåç»ç»=" + listCa[i].HOutOrgID, "h_v_JIT_WarehouseList"); |
| | | |
| | | var HSCWHIDCount= double.Parse(ds.Tables[0].Rows[0]["è°åºä»åºå¯ç¨åºåæ°é"].ToString()); |
| | | |
| | | if (HSCWHIDCount == 0 && listCa[i].嫿æ°é > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa[i].嫿æ°é > listCa[i].åºåæ°é) |
| | | if (listCa[i].嫿æ°é > HSCWHIDCount) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //if (listCa[i].è°åºä»åºå¯ç¨åºåæ°é == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "è°åºä»åºå¯ç¨åºåæ°é为0!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (listCa[i].è°åºä»åºid == listCa[i].è°å
¥ä»åºid) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è°åºä»åºåè°å
¥ä»åºä¸è½ä¸æ ·!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | j = 1; |
| | | |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | DBUtility.ClsPub.CurUserName = sArray[1].ToString(); |
| | | string HOrgID = sArray[2].ToString(); |
| | | bool flag = false; |
| | | json flag =new json(); |
| | | |
| | | try |
| | | { |
| | |
| | | { |
| | | if (listCa[i].éææ°é > 0) |
| | | { |
| | | if (listCa[i].éææ°é > listCa[i].å·²é
éæ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éææ°é大äºå·²é
éæ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString()==""?"0": ds.Tables[0].Rows[0][0].ToString()) +listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa[i].è°å
¥ä»åºid == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯·éæ©è°å
¥ä»åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa[i].è°åºä»åºid == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯·éæ©è°åºä»åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | flag = AddICStockTuiBill(listCa[i], "666601", "ä¸è¯åéæ", HOrgID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | flag = (json)AddICStockTuiBill(listCa[i], "666601", "ä¸è¯åéæ", HOrgID); |
| | | j = 1; |
| | | |
| | | if (flag.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | if (j == 0) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (flag) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¸è¯åéææå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸è¯åéæå¤±è´¥!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¸è¯åéææå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | |
| | | //æ°å¢ |
| | | public bool AddICStockTuiBill(CallGoodsBill listCa,string HBillType,string HBackType,string HOrgID, ref string sReturn) |
| | | public object AddICStockTuiBill(CallGoodsBill listCa,string HBillType,string HBackType,string HOrgID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | |
| | | if (listCa.éææ°é > listCa.å·²é
éæ°é && listCa.å·²é
éæ°é > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éææ°é大äºå·²é
éæ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa.è°å
¥ä»åºid == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯·éæ©è°å
¥ä»åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa.è°åºä»åºid == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯·éæ©è°åºä»åº!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | var THqty = 0.0; |
| | | ds = oCN.RunProcReturn($@" |
| | | select sum(b.HQty) HQty,c.HNumber,b.HSourceBillNo |
| | | from JIT_CallGoodsBackRequestBillMain a |
| | | inner join JIT_CallGoodsBackRequestBillSub b on a.HInterID=b.HInterID |
| | | left join Gy_Material c on b.HMaterID=c.HItemID |
| | | where c.HNumber='{listCa.ç©æä»£ç }' and b.HSourceBillNo='{listCa.HSourceBillNo}' |
| | | group by c.HNumber,b.HSourceBillNo |
| | | ", "JIT_CallGoodsBackRequestBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | THqty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()); |
| | | } |
| | | |
| | | if ((listCa.éææ°é + THqty) > listCa.å·²é
éæ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç´¯è®¡éææ°é大äºå·²é
éæ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 lngBillKey = listCa.HSouceInterID == 0 ? 0 : listCa.HSouceInterID; |
| | | Int64 lngBillKeyEntry = listCa.HSourceEntryID == 0 ? 0 : listCa.HSourceEntryID; |
| | | double HQty = (double)(listCa.éææ°é == 0 ? 0 : listCa.éææ°é); |
| | |
| | | $" '{HBillType}','{DateTime.Now}','{HBillNo}',{HOrgID},'{ DBUtility.ClsPub.CurUserName}','{DateTime.Now}','','',0,0,0,''," + |
| | | $" 0, 0, {listCa.HOutOrgID}, {HOrgID}, 0,'{HBackType}')"); |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCN.Commit(); |
| | | return true; |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message = "æ°å¢åæ®æåï¼"; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.Message = e.Message; ; |
| | | return objJsonResult; |
| | | throw (e); |
| | | } |
| | | } |
| | |
| | | List<CallGoodsBill> listCa = new List<CallGoodsBill>(); |
| | | //è·åè¡¨æ ¼æ°æ®éå |
| | | listCa = JsonConvert.DeserializeObject<List<CallGoodsBill>>(msg2.ToString()); |
| | | bool flag = false; |
| | | json flag = new json(); |
| | | |
| | | int j = 0; |
| | | for (int i = 0; i < listCa.Count; i++) |
| | | { |
| | | if (listCa[i].éææ°é > 0) |
| | | { |
| | | if (listCa[i].éææ°é > listCa[i].å·²é
éæ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éææ°é大äºå·²é
éæ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | flag = AddICStockTuiBill(listCa[i], "666602", " ä½ééæ", HOrgID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | flag =(json)AddICStockTuiBill(listCa[i], "666602", " ä½ééæ", HOrgID); |
| | | j = 1; |
| | | if (flag.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | if (j == 0) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (flag) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½ééææå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä½ééæå¤±è´¥!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½ééææå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | //è·åè¡¨æ ¼æ°æ®éå |
| | | listCa = JsonConvert.DeserializeObject<List<CallGoodsBill>>(msg2.ToString()); |
| | | |
| | | bool flag = false; |
| | | json flag = new json(); |
| | | int j = 0; |
| | | for (int i = 0; i < listCa.Count; i++) |
| | | { |
| | | if (listCa[i].éææ°é > 0) |
| | | { |
| | | if (listCa[i].éææ°é > listCa[i].å·²é
éæ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éææ°é大äºå·²é
éæ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select sum(d.HQty) HQty from JIT_CallGoodsBackRequestBillSub c inner join JIT_CallGoodsBackBillSub d on c.HInterID = d.HSourceInterID and c.HEntryID = d.HSourceEntryID and c.HMaterID = d.HMaterID " + |
| | | $"where c.HSourceInterID={listCa[i].HSouceInterID} and c.HSourceEntryID ={listCa[i].HSourceEntryID} and c.HSourceBillNo = '{listCa[i].HSourceBillNo}' and c.HMaterID={listCa[i].HMaterialID}", "JIT_CallGoodsBackRequestBillSub"); |
| | | |
| | | if ((double.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()) + listCa[i].éææ°é) > listCa[i].已嫿æ°é) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"å·²ç»éææ°é:{double.Parse(ds.Tables[0].Rows[0][0].ToString())},å¯éææ°é为:{(listCa[i].已嫿æ°é - double.Parse(ds.Tables[0].Rows[0][0].ToString()))}!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | flag = AddICStockTuiBill(listCa[i], "666603", "æ¥åºéæ", HOrgID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | flag =(json) AddICStockTuiBill(listCa[i], "666603", "æ¥åºéæ", HOrgID); |
| | | j = 1; |
| | | if (flag.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | if (j == 0) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (flag) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ¥åºéææå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥åºéæå¤±è´¥!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ¥åºéææå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region çäº§å«æå¹³å° ä»åºåºåå表 |
| | | |
| | | [Route("Sc_ComplementGoodBill/GetWarehouseList_JIT")] |
| | | [HttpGet] |
| | | public object GetWarehouseList_JIT(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_WarehouseList where 1=1 "+ sWhere, "h_v_JIT_WarehouseList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region çäº§å«æå¹³å° æªçææ£æç³è¯·å æªçæéæå |
| | | [Route("Sc_ComplementGoodBill/NotGeneratedMaterialList")] |
| | | [HttpGet] |
| | | public object NotGeneratedMaterialList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢å«æå æªçæ æ£æå çæ¡æ° |
| | | //æ¥è¯¢éæç³è¯·å æªçæ éæåç æ¡æ° |
| | | ds = oCN.RunProcReturn($@"select count(*) æªçæ from JIT_CallGoodsBackRequestBillMain as a |
| | | inner join JIT_CallGoodsBackRequestBillSub as b on a.HInterID=b.HInterID |
| | | where a.HISCheck =0 and a.HOrgID={sWhere} |
| | | and a.HMaker = '{user}' |
| | | union all |
| | | select count(*) æªçæ from JIT_CallGoodsBillMain a |
| | | join JIT_CallGoodsBillSub b on a.HInterID=b.HInterID |
| | | where b.HPSQty=0 and a.HOrgID={sWhere} |
| | | and a.HMaker = '{user}'", "JIT_CallGoodsBackRequestBillMain"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | public string HDeptName { get; set; }//é¨é¨ |
| | | public string HJLStatus { get; set; }//æ£æç¶æ |
| | | public string user { get; set; }//å¶å人 |
| | | public string Arbitrarily { get; set; }//ä»»æåæ° |
| | | } |
| | | |
| | | [Route("Sc_ComplementGoods/ComplementGoodsList")] |
| | |
| | | //ååºååä¼ éçå¼ |
| | | ComplementGoods com = JsonConvert.DeserializeObject<ComplementGoods>(sWhere.ToString()); |
| | | |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_Query '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," + |
| | | $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query"); |
| | | $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | DataSet dsTable = new DataSet(); |
| | | //æ¥è¯¢JIT_ComplementGoodsBillSub_LK |
| | | dsTable = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID} and HInterID={SourceInterID} order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK"); |
| | | dsTable = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID} and HInterID={SourceInterID} and HCallQTY<>HSendQTY order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK"); |
| | | |
| | | var HqtyCount = double.Parse(listCa[i].æ¬æ¬¡æ£ææ°é.ToString()); |
| | | for (int j = 0; j < dsTable.Tables[0].Rows.Count; j++) |
| | | { |
| | | if (double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) != double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString())) |
| | | { |
| | | if (double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()) + listCa[i].æ¬æ¬¡æ£ææ°é > double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString())) |
| | | { |
| | | var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()); |
| | | //ä¿®æ¹è°æ¨æ°é è¶
åºé¨åç»äºä¸ä¸åæ°æ® |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{HCallQTY} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} "); |
| | | var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()); |
| | | |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(listCa[i].æ¬æ¬¡æ£ææ°é - HCallQTY)} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={dsTable.Tables[0].Rows[j + 1]["HSourceInterID"].ToString()} and HInterID={SourceInterID} "); |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | //ä¿®æ¹è°æ¨æ°é |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{listCa[i].æ¬æ¬¡æ£ææ°é} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString()} and HInterID={SourceInterID} "); |
| | | break; |
| | | } |
| | | //ä¿®æ¹è°æ¨æ°é |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(HCallQTY < HqtyCount ? HCallQTY : HqtyCount)} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} "); |
| | | |
| | | HqtyCount -= HCallQTY; |
| | | if (HqtyCount <= 0) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //忥éè¶ç´æ¥è°æ¨å |
| | | objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo); |
| | | ////忥éè¶ç´æ¥è°æ¨å |
| | | //objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo); |
| | | |
| | | oCN.Commit(); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | return objJsonResult; |
| | | throw (e); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = result; |
| | |
| | | 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; |
| | |
| | | { |
| | | if (num == 1) |
| | | { |
| | | ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20)),0) DayNum from Sc_WorkBillSortBillSub where HInterID in ({sWhere}) and HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub"); |
| | | ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20))+1,0) DayNum from Sc_WorkBillSortBillSub where HInterID in ({sWhere}) and HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub"); |
| | | } |
| | | else if (num == 2) |
| | | { |
| | |
| | | var HOrderLev = list[i]["订åç级"].ToString(); |
| | | var HMainSourceInterID = list[i]["æºå主å
ç "].ToString(); |
| | | var HMainSourceEntryID = list[i]["æºååå
ç "].ToString(); |
| | | var HPlanQty = list[i]["è®¡åæ°é"].ToString(); |
| | | |
| | | if (HSourceID == "") |
| | | if (HSourceID == ""|| HSourceID == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceEntryID={HMainSourceEntryID}" + |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | " 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})"); |
| | | } |
| | | else |
| | | { |
| | | var HMainSourceInterID = list[i]["æºå主å
ç "].ToString(); |
| | | var HMainSourceEntryID = list[i]["æºååå
ç "].ToString(); |
| | | var HICMOBillNo = list[i]["ç产订åå·"].ToString(); |
| | | var HICMOEntrySEQ = list[i]["ç产订åæç»è¡å·"].ToString(); |
| | | var HSourceID = list[i]["HSourceID"].ToString(); |
| | | var HYX = list[i]["ä¼å
级"].ToString(); |
| | | |
| | | if (HSourceID == "" || HSourceID == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | var str = 0; |
| | | if (!int.TryParse(HYX, out str)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡ä¼å
级:{HYX},请è¾å
¥æ°å!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºæéå¤,请修æ¹!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)},HYX={HYX} where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["åæ®å·"].ToString()}'"); |
| | | } |
| | | |
| | | 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)}'"); |
| | |
| | | /// ä»åºç¼ç |
| | | /// </summary> |
| | | public string FStockNumber { get; set; } |
| | | /// <summary> |
| | | /// æ¹å· |
| | | /// </summary> |
| | | public string HLOT { get; set; } |
| | | /// <summary> |
| | | /// id |
| | | /// </summary> |
| | | public string HInventoryFID { get; set; } |
| | | } |
| | | #endregion |
| | | |
| | |
| | | public string FStock { get; set; } |
| | | //è½¦é´ |
| | | public string FWorkShop { get; set; } |
| | | //æ¹å· |
| | | public string HLOT { get; set; } |
| | | public string HInventoryFID { get; set; } |
| | | |
| | | } |
| | | #endregion |
| | |
| | | |
| | | //è·åå½å峿¶åºå åºåæ°é+åºåç»ç»+ç©æ+货主+ä»åº |
| | | ds = oCN.RunProcReturn(@" |
| | | select distinct isnull(a.FBASEQTY,0) FBASEQTY,b.FNumber,a.FOwnerTypeId,a.FOwnerId,c.FNUMBER as FOwnerNumber,a.FSTOCKID,d.FNUMBER as FStockNumber from |
| | | select distinct isnull(a.FBASEQTY,0) FBASEQTY,b.FNumber,a.FOwnerTypeId,a.FOwnerId,c.FNUMBER as FOwnerNumber,a.FSTOCKID,d.FNUMBER as FStockNumber ,a.FLOT HLOT,a.FID HInventoryFID |
| | | from |
| | | ( |
| | | select distinct a.HProdORGID FStockOrgId,T2.FMATERIALID,FNumber from SC_WORKBILLSORTBILLMAIN a |
| | | join SC_WORKBILLSORTBILLSub b on a.HInterID = b.HInterID |
| | | select distinct a.HProdORGID FStockOrgId,T2.FMATERIALID,FNumber from Sc_WorkBillSortBillMain a |
| | | join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID |
| | | join AIS20210811135644..T_PRD_PPBOM T1 on a.HICMOInterID_Sec = t1.FMoId and a.HICMOEntryID_Sec = t1.FMOENTRYID |
| | | LEFT JOIN AIS20210811135644..T_PRD_PPBOMENTRY T2 on T1.FID = t2.FID |
| | | join AIS20210811135644..T_BD_MATERIAL T3 on T2.FMATERIALID = T3.FMATERIALID |
| | |
| | | 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 |
| | |
| | | FComPlete = jskcQty >= need ? "é½å¥" : "æªé½å¥", |
| | | FPlanDate = item.HMasterDate, // æ¥è®¡åæ¥æ |
| | | FStock = Inventory.FSTOCKID,//ä»åº |
| | | FWorkShop = _item.HWorkShopID //è½¦é´ |
| | | FWorkShop = _item.HWorkShopID, //è½¦é´ |
| | | HLOT = Inventory.HLOT, //æ¹å· |
| | | HInventoryFID = Inventory.HInventoryFID //id |
| | | }); |
| | | //æ£åæ»åºåæ°é |
| | | jskcQty = jskcQty >= fCompleteCount ? jskcQty - fCompleteCount : 0; |
| | |
| | | insertDT.Columns.Add("FWORKSHOPID", typeof(long)); |
| | | insertDT.Columns.Add("FSTOCKID", typeof(long)); |
| | | insertDT.Columns.Add("FOCCUPYPICKEDCOUNT", typeof(decimal)); |
| | | insertDT.Columns.Add("HLOT", typeof(long)); |
| | | insertDT.Columns.Add("HInventoryFID", typeof(string)); |
| | | int jdtmmm = 1; |
| | | ds = oCN.RunProcReturn("select max(HInterID)FID FROM JIT_MOMaterReadysBill", "JIT_MOMaterReadysBill"); |
| | | int maxFid = int.Parse(ds.Tables[0].Rows[0][0].ToString() == "" ? "0" : ds.Tables[0].Rows[0][0].ToString()); |
| | |
| | | dr["FWORKSHOPID"] = item.FWorkShop == null ? "0" : item.FWorkShop; |
| | | dr["FSTOCKID"] = item.FStock == null ? "0" : item.FStock; |
| | | dr["FOCCUPYPICKEDCOUNT"] = item.FOccupyPickedCount; |
| | | dr["HLOT"] = item.HLOT == null? "0" : item.HLOT; |
| | | dr["HInventoryFID"] = item.HInventoryFID == null ? "0" : item.HInventoryFID; |
| | | insertDT.Rows.Add(dr); |
| | | jdtmmm++; |
| | | } |
| | |
| | | ", HICMOEntryID, HMaterID, HStockORGID, HStockQty, HLeftQty" + |
| | | ", HProdORGID, HUnitDosage, HSumPlanQty, HICMOBillNo, HOwnerID" + |
| | | ", HOwnerTypeID, HPlanDate, HComplete, HLackQty, HOccupyQty" + |
| | | ", HCompleteQty1, HErpClsID, HWorkShopID, HWHID, HOccupyPickedQTY,HMainICMOBillNo)values" + |
| | | ", HCompleteQty1, HErpClsID, HWorkShopID, HWHID, HOccupyPickedQTY,HMainICMOBillNo" + |
| | | ",HLOT,HInventoryFID)values" + |
| | | $"({item["FID"].ToString()}, 1, {item["FHMAINICMOINTERIDR"].ToString()}, {item["FHMAINICMOENTRYID"].ToString()}, {item["FHICMOINTERID"].ToString()}" + |
| | | $", {item["FHICMOENTRYID"].ToString()}, {item["FHMATERID"].ToString()}, {item["FHSTOCKORGID"].ToString()}, {item["FHSTOCKQTY"].ToString()}, {item["FHLEFTQTY"].ToString()}" + |
| | | $" , {item["FHPRDORGID"].ToString()}, {item["FUNITDOSAGE"].ToString()}, {item["FSUMPLANCOUNT"].ToString()}, '{item["FPRDBILLNO"].ToString()}', {item["FOWNERID"].ToString()}" + |
| | | $", '{item["FOWNERTYPEID"].ToString()}', '{item["FPLANDATE"].ToString()}','{item["FCOMPLETE"].ToString()}', {item["FLACKCOUNT"].ToString()}, {item["FOCCUPYCOUNT"].ToString()}" + |
| | | $", {item["FCOMPLETECOUNT1"].ToString()}, {item["FERPCLSID"].ToString()}, {item["FWORKSHOPID"].ToString()}, {item["FSTOCKID"].ToString()}, {item["FOCCUPYPICKEDCOUNT"].ToString()}, '{item["HMainICMOBillNo"].ToString()}')"); |
| | | $", {item["FCOMPLETECOUNT1"].ToString()}, {item["FERPCLSID"].ToString()}, {item["FWORKSHOPID"].ToString()}, {item["FSTOCKID"].ToString()}, {item["FOCCUPYPICKEDCOUNT"].ToString()}, '{item["HMainICMOBillNo"].ToString()}'" + |
| | | $",{item["HLOT"].ToString()},'{item["HInventoryFID"].ToString()}')"); |
| | | } |
| | | LogService.Write("æ¹éæå
¥å°æ°æ®åºç¨æ¶ï¼" + sw.Elapsed); |
| | | //æ§è¡å®æå æ´æ°æ¥è®¡åå·¥åç¶æ |
| | |
| | | #region ç产æ¥è®¡åå¹³å° éå® |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHLockedDay")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHLockedDay(string sWhere, int HLockedDay) |
| | | public object JIT_DayPlanPlatFormBillHLockedDay(int HLockedDay,int HWorkShopID) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere != null && sWhere != "") |
| | | { |
| | | oCN.RunProc("update Sc_WorkBillSortBillSub set HLockedSub=1" + |
| | | $" where HInterID in ({sWhere}) and HMasterDate between DATEADD(day, -1, getdate()) and DATEADD(day,{(HLockedDay - 1)},getdate()) "); |
| | | } |
| | | oCN.RunProc("update b set HLockedSub=0 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " + |
| | | $" where a.HWorkShopID={HWorkShopID}"); |
| | | |
| | | oCN.RunProc("update b set HLockedSub=1 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " + |
| | | $" where HMasterDate between DATEADD(day, -1, getdate()) " + |
| | | $"and DATEADD(day,{(HLockedDay - 1)},getdate()) and a.HWorkShopID={HWorkShopID}"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | #region ç产æ¥è®¡åå¹³å° è§£é |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHUnlockDay")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHUnlockDay(string sWhere, int HLockedDay) |
| | | public object JIT_DayPlanPlatFormBillHUnlockDay(int HWorkShopID) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere != null && sWhere != "") |
| | | { |
| | | oCN.RunProc("update Sc_WorkBillSortBillSub set HLockedSub=0" + |
| | | $" where HInterID in ({sWhere}) and HMasterDate between DATEADD(day, -1, getdate()) and DATEADD(day,{(HLockedDay - 1)},getdate()) "); |
| | | } |
| | | oCN.RunProc("update b set HLockedSub=0 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " + |
| | | $" where a.HWorkShopID={HWorkShopID}"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | { |
| | | 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ï¼"; |
| | |
| | | HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//è·å¾ä¸ä¸ªæ°çid |
| | | var HICMOBillNo = list[i]["ç产订åå·*"].ToString(); |
| | | var HICMOEntrySEQ = list[i]["ç产订åæç»è¡å·*"].ToString(); |
| | | var HProdORGID = list[i]["ç»ç»ç¼ç *"].ToString(); |
| | | var HWorkShopID = list[i]["HWorkShopID"].ToString(); |
| | | var HSourceID = list[i]["HSourceID"].ToString(); |
| | | var HYX = list[i]["ä¼å
级"].ToString(); |
| | |
| | | "HICMOEntrySEQ,HWorkShopID,HSourceID, HYX, HEmpID," + |
| | | " HMaterID, HMaterName, HMaterModel, HUnitID, HBatchNo," + |
| | | " HSeOrderBillQty, HPlanQty, HCompleteQty,HPreparatDate," + |
| | | "HMainSourceInterID,HMainSourceEntryID)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})"); |
| | | $" {HMainSourceInterID},{HMainSourceEntryID},{HProdORGID}, {HMainSourceInterID},{HMainSourceEntryID})"); |
| | | } |
| | | |
| | | int SumDay = 31; //卿䏤æä¹å·® DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days; |
| | |
| | | { |
| | | try |
| | | { |
| | | oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToShortDateString() + "'," + HStatus.ToString() + ",'" + user + "'"); |
| | | oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'," + HStatus.ToString() + ",'" + user + "'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡å è½¦é´æ§è¡ç¡®è®¤ æ¤éè½¦é´æ§è¡ç¡®è®¤ |
| | | [Route("JIT_ICMOSortBill/JIT_ICMOSortBillWorkShopTure")] |
| | | [HttpGet] |
| | | public object JIT_ICMOSortBillWorkShopTure(string HSourceID, string HICMOInterID, DateTime HDate, int HStatus, string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn($"select * from Sc_ICMOBillStatus_Tmp_Extend where HSourceID = {HSourceID} and HSourceInterID = {HICMOInterID} and HDate = '{HDate.ToString("yyyy-MM-dd HH:mm:ss.fff")}' ", "Sc_ICMOBillStatus_Tmp_Extend"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä»åºæªç¡®è®¤,ä¸è½è¿è¡è½¦é´ç¡®è®¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyStart " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'," + HStatus.ToString() + ",'" + user + "'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åç©æå表 |
| | | /// <summary> |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Web/GetMaterList_Json")] |
| | | [HttpGet] |
| | | public object GetMaterList_Json(string sWhere) |
| | | { |
| | | DataSet ds; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("Select HItemID,HNumber ç©æä»£ç ,HName ç©æ,HModel è§æ ¼åå· from Gy_Material where HStopflag=0 " + sWhere + " Order by HItemID ", "Gy_Material"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å模å
·å表 |
| | | /// <summary> |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Web/GetRelationList_Json")] |
| | | [HttpGet] |
| | | public object GetRelationList_Json(string sWhere) |
| | | { |
| | | DataSet ds; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("Select HItemID,HNumber 模å
·ä»£ç ,HName 模å
·,HModel è§æ ¼åå· from h_v_Gy_Mould where HStopflag=0 " + sWhere + " Order by HItemID ", "h_v_Gy_Mould"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åå½åæ°æ®åºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// è·åæµæ°´å·å表 |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | [Route("Web/GetProcNoList")] |
| | | [HttpGet] |
| | | public object GetProcNoList(int HInterID,string sWhere) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcNoList '" + HInterID + "','" + sWhere + "'", "h_p_Sc_ProcNoList"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Pay_PurchaseWallclothBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Pay_PurchaseWallclothBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Pay_PurchaseWallclothBillSub where HInterID = " + HInterID); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·-ç¨æ·å
³ç³»ä¿¡æ¯è¡¨çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.Gy_UserUser> getObjectByJson_Gy_UserUser(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.Gy_UserUser> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.Gy_UserUser>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·ç©æå
³ç³»ä¿¡æ¯è¡¨çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.Gy_UserMater> getObjectByJson_Gy_UserMater(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.Gy_UserMater> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.Gy_UserMater>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·å®¢æ·å
³ç³»ä¿¡æ¯è¡¨çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.Gy_UserCustomer> getObjectByJson_Gy_UserCustomer(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.Gy_UserCustomer> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.Gy_UserCustomer>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·ç»ç»å
³ç³»ä¿¡æ¯è¡¨çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¨æ·èåå
³ç³»ä¿¡æ¯è¡¨çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.Employee> getObjectByJson_Employee(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.Employee> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.Employee>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¬åå表主表çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsGy_MateMould |
| | | { |
| | | public long HMaterIDCol { get; set; } |
| | | public long HRelationIDCol { get; set; } |
| | | public long HUnitIDCol { get; set; } |
| | | |
| | | public DateTime HBeginDateCol { get; set; } |
| | | |
| | | public DateTime HEndDateCol { get; set; } |
| | | |
| | | public string HMaker { get; set; } |
| | | |
| | | public string HRemarkCol { get; set; } |
| | | public long HItemID { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | public Int64 HMaterID; //ç©æå
ç ï¼gy_materialï¼ |
| | | |
| | | public int HOrgID; //ç»ç»ID |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class Employee |
| | | { |
| | | public long HItemID { get; set; } |
| | | public string HNumber { get; set; } |
| | | public string HName { get; set; } |
| | | public string HShortNumber { get; set; } |
| | | public string HRemark { get; set; } |
| | | public string HUseFlag { get; set; } |
| | | public long HParentID { get; set; } |
| | | public string HBarCode { get; set; } |
| | | public long HSecManagerID { get; set; } |
| | | public long HCreateOrgID { get; set; } |
| | | public long HUseOrgID { get; set; } |
| | | public string HHelpCode { get; set; } |
| | | public string HCreator { get; set; } |
| | | public bool HStopflag { get; set; } |
| | | public Int64 HDeptID { get; set; } |
| | | public string HDeptName { get; set; } |
| | | public string HUpDater { get; set; } |
| | | public string HChecker { get; set; } |
| | | public string HDeleteMan { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class Gy_UserCustomer |
| | | { |
| | | public int HCusID { get; set; } |
| | | public string HCustomerNumber { get; set; } |
| | | public string HCustomerName { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class Gy_UserMater |
| | | { |
| | | public int HMaterID { get; set; } |
| | | public string HMaterNumber { get; set; } |
| | | public string HMaterName { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class Gy_UserUser |
| | | { |
| | | public int HUserID2 { get; set; } |
| | | public string HUserNumber2 { get; set; } |
| | | public string HUserName2 { get; set; } |
| | | } |
| | | } |
| | |
| | | public double HMoney { get; set; } |
| | | public string HRemark { get; set; } |
| | | public double HTaxRate { get; set; } |
| | | public long HProcNo { get; set; } |
| | | public string HProcNo { get; set; } |
| | | public string HOrderProcNO { get; set; } |
| | | public long HWWWorkOrderInterID { get; set; } |
| | | public long HWWWorkOrderEntryID { get; set; } |
| | |
| | | public long HProcPlanEntryID { get; set; } |
| | | public string eventType { get; set; } |
| | | public long HMainInterID { get; set; } |
| | | |
| | | public long HPRDOrgID { get; set; } |
| | | } |
| | | } |
| | |
| | | public string HBarCodeForBase { get; set; } |
| | | |
| | | public long HWorkCenterID { get; set; } |
| | | public long HBadWHID { get; set; } |
| | | public long HWasterWHID { get; set; } |
| | | public long HBadCountDevelopWHID { get; set; } |
| | | public long HWWBadWHID { get; set; } |
| | | public long HWWWasterWHID { get; set; } |
| | | public long HWHID { get; set; } |
| | | } |
| | | } |
| | |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åä¸è¯ä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<DataSet> GetBadWHList(string sWhere) |
| | | { |
| | | var dataSet = GetBadWH(sWhere); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "æªæ¥è¯¢å°ä¸è¯ä»åº" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åæ¥åºä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<DataSet> GetWasterWHList(string sWhere) |
| | | { |
| | | var dataSet = GetWasterWH(sWhere); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "æªæ¥è¯¢å°æ¥åºä»åº" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åç åä¸è¯åä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<DataSet> GetBadCountDevelopWHList(string sWhere) |
| | | { |
| | | var dataSet = GetBadCountDevelopWH(sWhere); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "æªæ¥è¯¢å°ç åä¸è¯åä»åº" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åå§å¤ä¸è¯ä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<DataSet> GetWWBadWHList(string sWhere) |
| | | { |
| | | var dataSet = GetWWBadWH(sWhere); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "æªæ¥è¯¢å°å§å¤ä¸è¯ä»åº" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åå§å¤æ¥åºä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<DataSet> GetWWWasterWHList(string sWhere) |
| | | { |
| | | var dataSet = GetWWWasterWH(sWhere); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "æªæ¥è¯¢å°å§å¤æ¥åºä»åº" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åè¯åä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | public static ApiResult<DataSet> GetWHList(string sWhere) |
| | | { |
| | | var dataSet = GetWH(sWhere); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "æªæ¥è¯¢å°è¯åä»åº" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | /// <summary> |
| | | /// è·åæµè½¬å¡å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | |
| | | if (list?.Count == 0) |
| | | return new ApiResult<List<M_Process>> { code = -1, msg = "æ¥è¯¢ä¸ºç©º" }; |
| | | return new ApiResult<List<M_Process>> { code = 0, msg = "æ¥è¯¢æå", data = list, count = pageCount }; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å é¤ä¸æ¡å·¥åº |
| | | /// </summary> |
| | |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetBadWH(string sWhere) |
| | | { |
| | | var sql = "Select * from h_v_Sc_GetBadWH Where 1=1 " + sWhere; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_Sc_GetBadWH"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetWasterWH(string sWhere) |
| | | { |
| | | var sql = "Select * from h_v_Sc_GetWasterWH Where 1=1 " + sWhere; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_Sc_GetWasterWH"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetBadCountDevelopWH(string sWhere) |
| | | { |
| | | var sql = "Select * from h_v_Sc_GetBadCountDevelopWH Where 1=1 " + sWhere; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_Sc_GetBadCountDevelopWH"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetWWBadWH(string sWhere) |
| | | { |
| | | var sql = "Select * from h_v_Sc_GetWWBadWH Where 1=1 " + sWhere; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_Sc_GetWWBadWH"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetWWWasterWH(string sWhere) |
| | | { |
| | | var sql = "Select * from h_v_Sc_GetWWWasterWH Where 1=1 " + sWhere; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_Sc_GetWWWasterWH"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetWH(string sWhere) |
| | | { |
| | | var sql = "Select * from h_v_Sc_GetWH Where 1=1 " + sWhere; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn(sql, "h_v_Sc_GetWH"); |
| | | return dataSet; |
| | | } |
| | | public static DataSet GetStationInBill(string strWhere) |
| | | { |
| | | var sql = "Select top 5000 * from h_v_MES_StationInBillList Where 1=1 " + strWhere; |
| | |
| | | <Compile Include="App_Start\WebApiConfig.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_BarCodeBillController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_RoutingGroupController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_TechnologyController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_TechnologyParUnitController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_TechParamByProcController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Pay_PeriodInfoSetController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_OrderBackInfoController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_OrderLevController.cs" /> |
| | |
| | | <Compile Include="Controllers\CJGL\Cj_ComplementGoodsBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Cj_NoPassProcController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Cj_SendGoodsBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Mes_OrderProcFlowAllReportController.cs" /> |
| | | <Compile Include="Controllers\CJGL\ProductionPlanReportController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Sc_ProcessExchangeBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Cj_StationOutBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" /> |
| | | <Compile Include="Controllers\CJGL\Sc_WorkBillAutoSortBillMainController.cs" /> |
| | | <Compile Include="Controllers\Gy_MateMouldController.cs" /> |
| | | <Compile Include="Controllers\Pay_ReportController.cs" /> |
| | | <Compile Include="Controllers\SCGL\æ¥è®¡å管ç\DataHelper.cs" /> |
| | | <Compile Include="Controllers\SCGL\æ¥è®¡å管ç\JIT_Cg_PODemandPlanBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\Sc_CallGoodsBackRequestBillController.cs" /> |
| | |
| | | <Compile Include="HttpClient.cs" /> |
| | | <Compile Include="InvokeHelper.cs" /> |
| | | <Compile Include="Log.cs" /> |
| | | <Compile Include="Models\ClsGy_MateMould.cs" /> |
| | | <Compile Include="Models\ClsSc_AssemblyBillMain.cs" /> |
| | | <Compile Include="Models\ClsSc_AssemblyBillSub.cs" /> |
| | | <Compile Include="Models\Employee.cs" /> |
| | | <Compile Include="Models\Gy_UserCustomer.cs" /> |
| | | <Compile Include="Models\Gy_UserMater.cs" /> |
| | | <Compile Include="Models\Gy_UserUser.cs" /> |
| | | <Compile Include="Models\JIT_Cg_PODemandPlanBillMain.cs" /> |
| | | <Compile Include="Models\JIT_Cg_PODemandPlanBillSub.cs" /> |
| | | <Compile Include="Models\Cg_PODemandPlanConfigBillSub.cs" /> |
| | |
| | | <Compile Include="Models\Sc_WorkBillSortBillSub.cs" /> |
| | | <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" /> |
| | | <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" /> |
| | | <Compile Include="Models\TechnologyParameter.cs" /> |
| | | <Compile Include="Models\TechnologyParameterUnit.cs" /> |
| | | <Compile Include="Models\TechParamByProc.cs" /> |
| | | <Compile Include="Models\å
¶å®\ReciveBill_FastModel.cs" /> |
| | | <Compile Include="Models\卿å\OptionListModel.cs" /> |
| | | <Compile Include="Models\åºç¡èµæ\Gy_ClassTimePrj.cs" /> |
| | |
| | | <Folder Include="Views\Cj_SendGoodsBill\" /> |
| | | <Folder Include="Views\Gy_EquipType\" /> |
| | | <Folder Include="Views\Gy_ICBomBill\" /> |
| | | <Folder Include="Views\Gy_MateMould\" /> |
| | | <Folder Include="Views\Gy_RoutingGroup\" /> |
| | | <Folder Include="Views\Gy_WorkStation\" /> |
| | | <Folder Include="Views\JIT_DayPlanPlatFormBill\" /> |
| | |
| | | <Folder Include="Views\KF_PonderationBill\" /> |
| | | <Folder Include="Views\kf_StepFoldinBill\" /> |
| | | <Folder Include="Views\Kf_StepFoldOutBill\" /> |
| | | <Folder Include="Views\Mes_OrderProcFlowAllReport\" /> |
| | | <Folder Include="Views\MoveStockBill\" /> |
| | | <Folder Include="Views\Pay_Report\" /> |
| | | <Folder Include="Views\ProductionPlanReport\" /> |
| | | <Folder Include="Views\ProductionReturnBill\" /> |
| | | <Folder Include="Views\QC_Management\" /> |
| | |
| | | <IISExpressUseClassicPipelineMode /> |
| | | <UseGlobalApplicationHostFile /> |
| | | <ProjectView>ShowAllFiles</ProjectView> |
| | | <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath> |
| | | <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath> |
| | | </PropertyGroup> |
| | | <ProjectExtensions> |
| | | <VisualStudio> |