WarM/条码打印/Kf_WeighToBarCode.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_SourceController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/LMESController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode.cs
@@ -523,6 +523,17 @@ //æ¡ç çæå夿 private bool Sub_AllowSave() { //夿å½ååæ®IDæ¯å¦å·²ä¸ä¼ çæåæ® DataSet Ds = oCn.RunProcReturn("select top 1 1 from KF_WeighSource_Temp with(nolock) where HInterID=" + HInterID.ToString() + " and HRelationInterID=1 ", "KF_WeighSource_Temp", ref DBUtility.ClsPub.sExeReturnInfo); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { } else { MessageBox.Show("å½åæ¡ç è®°å½å·²æ¢çä¸ä¼ çæåæ®ï¼è¯·éåºåéæ°è¿å ¥è¯¥æ¨¡åè¿è¡æ¡ç çææä½ï¼", "æç¤º"); return false; } if (HInterID==0 || HBillNo=="") { MessageBox.Show("è·åæ¡ç 对åºåæ®IDæåæ®å·å¤±è´¥ï¼è¯·éæ°å·æ°çé¢ï¼", "æç¤º"); WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode_StationOutBill.cs
@@ -35,6 +35,7 @@ public Int64 HProcessExchangeEntryID = 0; public Int64 HSupID = 0; public double HSourceQty = 0; public double HMaterWeight = 0; //ç©æå é public string HCusMaterName = ""; //客æ·ç©æåç§° public string HCusModel = ""; //客æ·è§æ ¼åå· public string HMaker = DBUtility.ClsPub.CurUserName; @@ -522,7 +523,7 @@ if (chkHDYFlag.Checked == true) { //æå°æ¡ç Sub_SetReport("ç©ææ¡ç "); Sub_SetReport("åæåæ¡ç "); Report.Print(false); Thread.Sleep(1000); } @@ -542,6 +543,8 @@ } txtHQty.Text = ""; txtHWeightQyt.Text = ""; txtHBarcodeNo.Text = ""; txtHQty.Focus(); } @@ -574,12 +577,37 @@ MessageBox.Show("请è¾å ¥æ£ç¡®ç±³æ°ï¼", "æç¤º"); return false; } else if (DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) == 0) { MessageBox.Show("请è¾å ¥æ£ç¡®ééï¼", "æç¤º"); return false; } else if (DBUtility.ClsPub.isInt(txtHBarcodeNo.Text) == 0) { MessageBox.Show("请è¾å ¥å å·ï¼", "æç¤º"); return false; } else if (DBUtility.ClsPub.isDoule(txtHProcID.Tag) == 0) { MessageBox.Show("请å 鿩工åºï¼", "æç¤º"); return false; } //å®é å é=éé/ç±³æ°*1000ï¼å®é å éè¶ åºç©æç»´æ¤å éçç¾åä¹äºåæä¸è¶³ç©æç»´æ¤å éçç¾åä¹å «åï¼é¢è¦æç¤º double sQty = 0; //å®é å é sQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) / DBUtility.ClsPub.isDoule(txtHQty.Text) * 1000; if (sQty > HMaterWeight * 1.2 || sQty < HMaterWeight * 0.8) { if (MessageBox.Show("ç©æç»´æ¤å é为ï¼" + HMaterWeight.ToString() + "ï¼å®é å é为ï¼" + sQty.ToString() + "ï¼æè¾å ¥å®é å éè¶ åºç©æç»´æ¤å éçç¾åä¹äºåæä¸è¶³ç©æç»´æ¤å éçç¾åä¹å «åï¼è¯·æ£æ¥è¾å ¥çæ°æ®æ¯å¦æ£ç¡®ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { return true; } else { return false; } } return true; } @@ -641,9 +669,11 @@ string HBarCodeType = ""; Int64 HMaterID2 = 0; double HQty = 0; //ç±³æ° double HMaterialJQty = 0; //éé Int64 HGroupID = 0; Int64 HDeptID = 0; string HProcessExchangeBillNo = ""; Int64 HBarcodeNo = 0; //å æ° string HMaterName = ""; string HMaterModel = ""; Int64 HProcID = 0; @@ -655,9 +685,11 @@ HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text); HMaterID2 = DBUtility.ClsPub.isLong(txtHMaterNumber.Tag); HQty = DBUtility.ClsPub.isDoule(txtHQty.Text); HMaterialJQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text); HGroupID = DBUtility.ClsPub.isLong(txtHGroupID.Tag); HDeptID = DBUtility.ClsPub.isLong(txtHDeptName.Tag); HProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text); HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text); HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text); HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text); HProcID = DBUtility.ClsPub.isLong(txtHProcID.Tag); @@ -683,8 +715,8 @@ + " '" + HBarCode + "','" + HBarCodeType + "'," + HMaterID2.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString() + ",'" + HBatchNo + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + HMaker + "',getdate(),0," + HQty.ToString() + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''" + ", 1,1," + HDeptID.ToString() + ",0,0,''" + ", 0,'',getdate(),'','" + sDate + "',0,0" + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + ",0,0,''" + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + ",0" + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" + ", " + HProcessExchangeInterID.ToString() + "," + HProcessExchangeEntryID.ToString() + ",'" + HProcessExchangeBillNo + "',0,'" + HCusMaterName + "','" + HCusModel + "'" + ", " + HProcID.ToString() + "," + HCenterID.ToString() + "," + HSourceID.ToString() + "," + HProcNo.ToString() + "," + HSourceQty.ToString() @@ -727,6 +759,7 @@ HSourceQty = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("æ°é")].Value); HProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HProcessExchangeInterID")].Value); HSupID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSupID")].Value); HMaterWeight = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterWeight")].Value); HCusMaterName = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusMaterName")].Value); HCusModel = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusModel")].Value); } @@ -928,6 +961,50 @@ #endregion #region //æµæ°´å·æ«æ private void txtHProcNo_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Return) { if (txtHProcNo.Text == "") { MessageBox.Show("æµæ°´å·ä¸ºç©ºï¼è¯·è¾å ¥æµæ°´å·ï¼"); return; } //æ ¹æ®è½¬å¡ä¸»IDãæµæ°´å·å¸¦åºæµè½¬å¡ä¸ç¸åºå·¥åºãçç»ãå·¥ä½ä¸å¿ãçäº§èµæº DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetBCPWeighSource_HProcNo " + HProcessExchangeInterID.ToString() + "," + txtHProcNo.Text, "h_p_KF_GetBCPWeighSource_HProcNo"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { txtHProcNo.Text = ""; txtHProcID.Tag = 0; txtHProcID.Text = ""; txtHCenterID.Tag = 0; txtHCenterID.Text = ""; txtHGroupID.Tag = 0; txtHGroupID.Text = ""; txtHSourceID.Tag = 0; txtHSourceID.Text = ""; MessageBox.Show("æè¾å ¥æµæ°´å·ä¸å¨å½åå·¥åºæµè½¬å¡ä¸ï¼è¯·éæ°è¾å ¥æµæ°´å·ï¼"); return; } else { HProcessExchangeEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceEntryID"]); txtHProcNo.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcNo"]); txtHProcID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcID"]); txtHProcID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcName"]); txtHCenterID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCenterID"]); txtHCenterID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCenterName"]); txtHGroupID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]); txtHGroupID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HGroupName"]); txtHSourceID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]); txtHSourceID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSourceName"]); } } } #endregion #region //å·¥åºéæ© private void cmdHProcID_Click(object sender, EventArgs e) @@ -970,5 +1047,106 @@ } #endregion #region //çäº§èµæºéæ© private void txtHSourceID_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return) { if (DBUtility.ClsPub.isStrNull(txtHSourceID.Text) != "") { DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); if (oSource.GetInfoByID(DBUtility.ClsPub.isLong(txtHSourceID.Text.Replace("HCX", "")))) { txtHSourceID.Text = oSource.omodel.HName; txtHSourceID.Tag = oSource.omodel.HItemID; } else { txtHSourceID.Text = ""; txtHSourceID.Tag = 0; } } else { txtHSourceID.Text = ""; txtHSourceID.Tag = 0; } } } private void txtHSourceID_Click(object sender, EventArgs e) { txtHSourceID.SelectAll(); } private void txtHSourceID_TextChanged(object sender, EventArgs e) { BLL.ClsPub_BLL.Sub_ClearText(txtHSourceID); } private void cmdHSourceID_Click(object sender, EventArgs e) { DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); if (oSource.RefreshView()) { txtHSourceID.Text = oSource.oModel.HName; txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); } else { txtHSourceID.Text = ""; } } #endregion #region //ç产çç»éæ© private void cmdHGroupID_Click(object sender, EventArgs e) { DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View(); if (oGroup.RefreshView()) { txtHGroupID.Text = oGroup.oModel.HName; txtHGroupID.Tag = oGroup.oModel.HItemID.ToString(); } else { txtHGroupID.Text = ""; } } private void txtHGroupID_TextChanged(object sender, EventArgs e) { BLL.ClsPub_BLL.Sub_ClearText(txtHGroupID); } #endregion #region //å·¥ä½ä¸å¿éæ© private void cmdHCenterID_Click(object sender, EventArgs e) { DAL.ClsGy_WorkCenter_View oWorkCenter = new DAL.ClsGy_WorkCenter_View(); if (oWorkCenter.RefreshView()) { txtHCenterID.Text = oWorkCenter.oModel.HName; txtHCenterID.Tag = oWorkCenter.oModel.HItemID.ToString(); } else { txtHCenterID.Text = ""; } } private void txtHCenterID_TextChanged(object sender, EventArgs e) { BLL.ClsPub_BLL.Sub_ClearText(txtHCenterID); } #endregion } } WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode_StationOutBill.designer.cs
@@ -30,8 +30,8 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Kf_WeighToBarCode_StationOutBill)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.Tool = new System.Windows.Forms.ToolStrip(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.mrlk = new System.Windows.Forms.ToolStripButton(); @@ -55,6 +55,13 @@ this.label4 = new System.Windows.Forms.Label(); this.txtHMaterNumber = new System.Windows.Forms.TextBox(); this.gbUp = new System.Windows.Forms.GroupBox(); this.cmdHCenterID = new System.Windows.Forms.Button(); this.cmdHGroupID = new System.Windows.Forms.Button(); this.cmdHSourceID = new System.Windows.Forms.Button(); this.label15 = new System.Windows.Forms.Label(); this.txtHBarcodeNo = new System.Windows.Forms.TextBox(); this.label18 = new System.Windows.Forms.Label(); this.txtHWeightQyt = new System.Windows.Forms.TextBox(); this.label17 = new System.Windows.Forms.Label(); this.txtHProcNo = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); @@ -270,14 +277,14 @@ this.grdMain.AllowUserToDeleteRows = false; this.grdMain.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle1.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.grdMain.DefaultCellStyle = dataGridViewCellStyle1; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle3.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.grdMain.DefaultCellStyle = dataGridViewCellStyle3; this.grdMain.Dock = System.Windows.Forms.DockStyle.Fill; this.grdMain.Location = new System.Drawing.Point(3, 3); this.grdMain.Margin = new System.Windows.Forms.Padding(0); @@ -315,7 +322,7 @@ this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label3.ForeColor = System.Drawing.Color.Black; this.label3.Location = new System.Drawing.Point(272, 88); this.label3.Location = new System.Drawing.Point(662, 116); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(29, 12); this.label3.TabIndex = 52; @@ -325,10 +332,10 @@ // this.txtHProcID.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHProcID.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHProcID.Location = new System.Drawing.Point(303, 84); this.txtHProcID.Location = new System.Drawing.Point(693, 112); this.txtHProcID.Name = "txtHProcID"; this.txtHProcID.ReadOnly = true; this.txtHProcID.Size = new System.Drawing.Size(112, 21); this.txtHProcID.Size = new System.Drawing.Size(108, 21); this.txtHProcID.TabIndex = 53; this.txtHProcID.TextChanged += new System.EventHandler(this.txtHProcID_TextChanged); // @@ -356,6 +363,13 @@ // gbUp // this.gbUp.BackColor = System.Drawing.Color.Transparent; this.gbUp.Controls.Add(this.cmdHCenterID); this.gbUp.Controls.Add(this.cmdHGroupID); this.gbUp.Controls.Add(this.cmdHSourceID); this.gbUp.Controls.Add(this.label15); this.gbUp.Controls.Add(this.txtHBarcodeNo); this.gbUp.Controls.Add(this.label18); this.gbUp.Controls.Add(this.txtHWeightQyt); this.gbUp.Controls.Add(this.label17); this.gbUp.Controls.Add(this.txtHProcNo); this.gbUp.Controls.Add(this.label16); @@ -399,12 +413,88 @@ this.gbUp.TabIndex = 58; this.gbUp.TabStop = false; // // cmdHCenterID // this.cmdHCenterID.BackColor = System.Drawing.Color.Transparent; this.cmdHCenterID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHCenterID.Image"))); this.cmdHCenterID.ImageAlign = System.Drawing.ContentAlignment.TopRight; this.cmdHCenterID.Location = new System.Drawing.Point(409, 111); this.cmdHCenterID.Name = "cmdHCenterID"; this.cmdHCenterID.Size = new System.Drawing.Size(22, 22); this.cmdHCenterID.TabIndex = 332; this.cmdHCenterID.UseVisualStyleBackColor = false; this.cmdHCenterID.Click += new System.EventHandler(this.cmdHCenterID_Click); // // cmdHGroupID // this.cmdHGroupID.BackColor = System.Drawing.Color.Transparent; this.cmdHGroupID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHGroupID.Image"))); this.cmdHGroupID.ImageAlign = System.Drawing.ContentAlignment.TopRight; this.cmdHGroupID.Location = new System.Drawing.Point(201, 111); this.cmdHGroupID.Name = "cmdHGroupID"; this.cmdHGroupID.Size = new System.Drawing.Size(22, 22); this.cmdHGroupID.TabIndex = 331; this.cmdHGroupID.UseVisualStyleBackColor = false; this.cmdHGroupID.Click += new System.EventHandler(this.cmdHGroupID_Click); // // cmdHSourceID // this.cmdHSourceID.BackColor = System.Drawing.Color.Transparent; this.cmdHSourceID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHSourceID.Image"))); this.cmdHSourceID.ImageAlign = System.Drawing.ContentAlignment.TopRight; this.cmdHSourceID.Location = new System.Drawing.Point(604, 111); this.cmdHSourceID.Name = "cmdHSourceID"; this.cmdHSourceID.Size = new System.Drawing.Size(22, 22); this.cmdHSourceID.TabIndex = 330; this.cmdHSourceID.UseVisualStyleBackColor = false; this.cmdHSourceID.Click += new System.EventHandler(this.cmdHSourceID_Click); // // label15 // this.label15.AutoSize = true; this.label15.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label15.ForeColor = System.Drawing.Color.Black; this.label15.Location = new System.Drawing.Point(466, 88); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(29, 12); this.label15.TabIndex = 328; this.label15.Text = "å å·"; // // txtHBarcodeNo // this.txtHBarcodeNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHBarcodeNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHBarcodeNo.Location = new System.Drawing.Point(498, 84); this.txtHBarcodeNo.Name = "txtHBarcodeNo"; this.txtHBarcodeNo.Size = new System.Drawing.Size(128, 21); this.txtHBarcodeNo.TabIndex = 329; // // label18 // this.label18.AutoSize = true; this.label18.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label18.ForeColor = System.Drawing.Color.Black; this.label18.Location = new System.Drawing.Point(272, 88); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(29, 12); this.label18.TabIndex = 326; this.label18.Text = "éé"; // // txtHWeightQyt // this.txtHWeightQyt.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHWeightQyt.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHWeightQyt.Location = new System.Drawing.Point(303, 84); this.txtHWeightQyt.Name = "txtHWeightQyt"; this.txtHWeightQyt.Size = new System.Drawing.Size(128, 21); this.txtHWeightQyt.TabIndex = 327; // // label17 // this.label17.AutoSize = true; this.label17.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label17.ForeColor = System.Drawing.Color.Black; this.label17.Location = new System.Drawing.Point(454, 88); this.label17.Location = new System.Drawing.Point(650, 88); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(41, 12); this.label17.TabIndex = 324; @@ -414,18 +504,18 @@ // this.txtHProcNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHProcNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHProcNo.Location = new System.Drawing.Point(498, 84); this.txtHProcNo.Location = new System.Drawing.Point(693, 84); this.txtHProcNo.Name = "txtHProcNo"; this.txtHProcNo.ReadOnly = true; this.txtHProcNo.Size = new System.Drawing.Size(128, 21); this.txtHProcNo.TabIndex = 325; this.txtHProcNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHProcNo_KeyDown); // // label16 // this.label16.AutoSize = true; this.label16.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label16.ForeColor = System.Drawing.Color.Black; this.label16.Location = new System.Drawing.Point(626, 88); this.label16.Location = new System.Drawing.Point(27, 144); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(65, 12); this.label16.TabIndex = 320; @@ -435,7 +525,7 @@ // this.txtHICMOBillNo.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.txtHICMOBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHICMOBillNo.Location = new System.Drawing.Point(693, 84); this.txtHICMOBillNo.Location = new System.Drawing.Point(95, 140); this.txtHICMOBillNo.Name = "txtHICMOBillNo"; this.txtHICMOBillNo.ReadOnly = true; this.txtHICMOBillNo.Size = new System.Drawing.Size(128, 21); @@ -459,15 +549,17 @@ this.txtHCenterID.Location = new System.Drawing.Point(303, 112); this.txtHCenterID.Name = "txtHCenterID"; this.txtHCenterID.ReadOnly = true; this.txtHCenterID.Size = new System.Drawing.Size(128, 21); this.txtHCenterID.Size = new System.Drawing.Size(108, 21); this.txtHCenterID.TabIndex = 319; this.txtHCenterID.TextChanged += new System.EventHandler(this.txtHCenterID_TextChanged); // // cmdHProcID // this.cmdHProcID.BackColor = System.Drawing.Color.Transparent; this.cmdHProcID.Enabled = false; this.cmdHProcID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHProcID.Image"))); this.cmdHProcID.ImageAlign = System.Drawing.ContentAlignment.TopRight; this.cmdHProcID.Location = new System.Drawing.Point(409, 83); this.cmdHProcID.Location = new System.Drawing.Point(799, 111); this.cmdHProcID.Name = "cmdHProcID"; this.cmdHProcID.Size = new System.Drawing.Size(22, 22); this.cmdHProcID.TabIndex = 317; @@ -570,9 +662,11 @@ this.txtHSourceID.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.txtHSourceID.Location = new System.Drawing.Point(498, 112); this.txtHSourceID.Name = "txtHSourceID"; this.txtHSourceID.ReadOnly = true; this.txtHSourceID.Size = new System.Drawing.Size(128, 21); this.txtHSourceID.Size = new System.Drawing.Size(108, 21); this.txtHSourceID.TabIndex = 151; this.txtHSourceID.Click += new System.EventHandler(this.txtHSourceID_Click); this.txtHSourceID.TextChanged += new System.EventHandler(this.txtHSourceID_TextChanged); this.txtHSourceID.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHSourceID_KeyPress); // // label9 // @@ -592,8 +686,9 @@ this.txtHGroupID.Location = new System.Drawing.Point(95, 112); this.txtHGroupID.Name = "txtHGroupID"; this.txtHGroupID.ReadOnly = true; this.txtHGroupID.Size = new System.Drawing.Size(128, 21); this.txtHGroupID.Size = new System.Drawing.Size(108, 21); this.txtHGroupID.TabIndex = 149; this.txtHGroupID.TextChanged += new System.EventHandler(this.txtHGroupID_TextChanged); // // label7 // @@ -733,14 +828,14 @@ this.grdSub.AllowUserToDeleteRows = false; this.grdSub.BackgroundColor = System.Drawing.SystemColors.ControlLightLight; this.grdSub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle2.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.grdSub.DefaultCellStyle = dataGridViewCellStyle2; dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle4.Font = new System.Drawing.Font("å®ä½", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; this.grdSub.DefaultCellStyle = dataGridViewCellStyle4; this.grdSub.Dock = System.Windows.Forms.DockStyle.Fill; this.grdSub.Location = new System.Drawing.Point(0, 73); this.grdSub.Margin = new System.Windows.Forms.Padding(0); @@ -973,5 +1068,12 @@ private System.Windows.Forms.TextBox txtHICMOBillNo; private System.Windows.Forms.Label label17; private System.Windows.Forms.TextBox txtHProcNo; private System.Windows.Forms.Label label15; private System.Windows.Forms.TextBox txtHBarcodeNo; private System.Windows.Forms.Label label18; private System.Windows.Forms.TextBox txtHWeightQyt; private System.Windows.Forms.Button cmdHSourceID; private System.Windows.Forms.Button cmdHCenterID; private System.Windows.Forms.Button cmdHGroupID; } } WarM/ÌõÂë´òÓ¡/Kf_WeighToBarCode_StationOutBill.resx
@@ -435,6 +435,51 @@ <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>102, 16</value> </metadata> <data name="cmdHCenterID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH FIYcEAA7 </value> </data> <data name="cmdHGroupID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH FIYcEAA7 </value> </data> <data name="cmdHSourceID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH FIYcEAA7 </value> </data> <data name="cmdHProcID.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> R0lGODlhEAAQAIZBAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp WebAPI/Controllers/BaseSet/Gy_SourceController.cs
@@ -307,6 +307,87 @@ return model; } #region çäº§èµæº æ å½¢å¾ public class TreeModel { public string id { get; set; } public string title { get; set; } public List<TreeModel> children = new List<TreeModel>(); } [Route("Gy_Source/Gy_SourceTreeList")] [HttpGet] public object Gy_SourceTreeList() { try { string sql1 = string.Format("select hitemid,hnumber,hname from Gy_Source order by hnumber"); ds = oCN.RunProcReturn(sql1, "Gy_Source"); List<TreeModel> treeModels = new List<TreeModel>(); TreeModel first = new TreeModel(); first.id = "0"; first.title = "çäº§èµæºè®¾ç½®"; treeModels.Add(first); foreach (DataRow row in ds.Tables[0].Rows) { var strLen = row["hitemid"].ToString().Split('.'); if (strLen.Length == 1) { TreeModel tree = new TreeModel(); tree.id = row["hitemid"].ToString(); tree.title = row["hname"].ToString(); treeModels[0].children.Add(tree); } } digui(ds.Tables[0], treeModels[0].children, 2); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = Newtonsoft.Json.JsonConvert.SerializeObject(treeModels); return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> /// éå½å½æ° /// </summary> public void digui(DataTable dt, List<TreeModel> tree, int num) { for (int m = 0; m < tree.Count; m++) { tree[m].children = new List<TreeModel>(); for (int i = 0; i < dt.Rows.Count; i++)//ç¬¬ä¸æ¬¡å¾ªç¯ï¼å¾å°æææ ¹èç¹çåé { var strLen = dt.Rows[i]["hnumber"].ToString().Split('.'); if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + ".")) { TreeModel tbjson = new TreeModel(); tbjson.id = dt.Rows[i]["hitemid"].ToString(); tbjson.title = dt.Rows[i]["hname"].ToString(); tree[m].children.Add(tbjson); } } var strLens = tree[m].id.Split('.'); for (int i = 0; i < tree[m].children.Count; i++) { digui(dt, tree[m].children, strLens.Length + 2);//忬¡ç¨åéå»å¾ªç¯ï¼æ¿åºåéçåé } } } #endregion /// <summary> /// çäº§èµæºå é¤åè½ /// </summary> WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -69,6 +69,7 @@ oItem.HBillSubType = OperationType=="5"?"SUB":"3772"; oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); oItem.HDate = OperationType == "5" ? DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")) : oItem.HDate; if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -149,7 +149,7 @@ long HInterID = mainList[0].HInterID;//éå ¥typeå¾å°çåæ®ID string HBillNo = mainList[0].HBillNo;//éå ¥typeå¾å°çåæ®å· DateTime HDate = mainList[0].HDate;//æ¥æ DateTime HDate = OperationType == 4 ? DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")) : mainList[0].HDate;//æ¥æ int HYear = DateTime.Now.Year; double HPeriod = DateTime.Now.Month; string HRemark = mainList[0].HRemark;//夿³¨ WebAPI/Controllers/LMESController.cs
@@ -117,6 +117,274 @@ } } /// <summary> /// å·¥åºæµè½¬å¡åªæ¾ç¤ºå·¥åºæåçæ°æ® /// </summary> /// <param name="sWhere"></param> /// <param name="user"></param> /// <returns></returns> [Route("LEMS/MES_ProcessExchangeBillList_Json")] [HttpGet] public object MES_ProcessExchangeBillList_Json(string sWhere, string user,int OperationType) { DataSet ds; try { List<object> columnNameList = new List<object>(); //夿æ¯å¦ææ¥è¯¢æé if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æ¥è¯¢æé!"; objJsonResult.data = null; return objJsonResult; } if (OperationType == 1) { //è·åç³»ç»åæ° string Ret = ""; if (oSystemParameter.ShowBill(ref Ret)) { //夿客æ·ä¸ºä¹ä¸ if (oSystemParameter.omodel.WMS_CampanyName == "ä¹ä¸") { sWhere += " and å·¥åº='æå' "; } else { sWhere += " and å·¥åº='ç²ç£¨' "; } } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillList"); } else { //è·åç³»ç»åæ° string Ret = ""; if (oSystemParameter.ShowBill(ref Ret)) { //夿客æ·ä¸ºé¾å±±æ±½é if (oSystemParameter.omodel.WMS_CampanyName == "ä¹ä¸") { } } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeArrangementList where 1 = 1 " + sWhere , "h_v_Sc_ProcessExch_v_Sc_ProcessExchangeArrangementListhangeBillList"); } //æ·»å åå 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.list = columnNameList; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å¼å¸¸ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #region æç¼¸åè½ [Route("LEMS/ProcessExchangeArrangement_Add")] [HttpGet] public object ProcessExchangeArrangement_Add(string HInterID_S, int HSourceID,long HOrgID,string user) { DataSet ds; DataSet ds1; try { var HNum = HInterID_S.Split(','); oCN.BeginTran(); for (int j = 0; j < HNum.Length; j++) { long HInterID = long.Parse(HNum[j].Split('|')[0]); long HEntryID = long.Parse(HNum[j].Split('|')[1]); ds = oCN.RunProcReturn(@"select a.HMaterID,b.HProcID,a.HBillNo from Sc_ProcessExchangeBillMain a inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID where a.HInterID=" + HInterID + " and b.HEntryID=" + HEntryID, "Sc_ProcessExchangeBillMain"); if (ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¥æ æ¤å·¥åºæµè½¬å¡ï¼"; objJsonResult.data = null; return objJsonResult; } //æ¥è¯¢åå·¥èºè·¯çº¿ç©æ å·¥åº string HMaterID = ds.Tables[0].Rows[0]["HMaterID"].ToString(); string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString(); ds1 = oCN.RunProcReturn(@"select a.HMaterID,a.HMainProcID,b.* from Gy_RoutingBillMain a inner join Gy_RoutingBillSub b on a.HInterID=b.HInterID where a.HMaterID=" + HMaterID + " and a.HMainProcID=" + HProcID + " and a.HBillSubType='SUB'", "Gy_RoutingBillMain"); if (ds1.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æç¸å¯¹åºçé»è®¤å·¥èºè·¯çº¿,请å 设置工èºè·¯çº¿ï¼"; objJsonResult.data = null; return objJsonResult; } DAL.ClsSc_ProcessExchangeBill oBill = new DAL.ClsSc_ProcessExchangeBill(); string sReturn = ""; DBUtility.ClsPub.HOrgID = HOrgID; oBill.ShowBill(HInterID, ref sReturn); long HInterID1 = DBUtility.ClsPub.CreateBillID(oBill.omodel.HBillType, ref DBUtility.ClsPub.sExeReturnInfo); string HBillNo = DBUtility.ClsPub.CreateBillCode(oBill.omodel.HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true); oBill.omodel.HInterID = HInterID1; oBill.omodel.HBillNo = HBillNo; oBill.omodel.HBillSubType = "SUB"; oBill.omodel.HDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")); oBill.omodel.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oBill.omodel.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); oBill.omodel.HMaker = user; oBill.omodel.HMakeDate = DateTime.Now.ToString(); oBill.omodel.HMainSourceInterID = HInterID; oBill.omodel.HMainSourceEntryID = HEntryID; oBill.omodel.HMainSourceBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); oBill.DetailColl.Clear(); for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { Model.ClsSc_ProcessExchangeBillSub oSub = new Model.ClsSc_ProcessExchangeBillSub(); oSub.HInterID = HInterID1; oSub.HEntryID = (i + 1); oSub.HProcNo = long.Parse(ds1.Tables[0].Rows[i]["HProcNo"].ToString()); oSub.HProcID = long.Parse(ds1.Tables[0].Rows[i]["HProcID"].ToString()); oSub.HWorkRemark = ds1.Tables[0].Rows[i]["HRemark"].ToString(); oSub.HCenterID = long.Parse(ds1.Tables[0].Rows[i]["HCenterID"].ToString()); oSub.HSupID = long.Parse(ds1.Tables[0].Rows[i]["HSupID"].ToString()); oSub.HSupFlag = ds1.Tables[0].Rows[i]["HSupFlag"].ToString() == "1" ? true : false; oSub.HQty = oBill.omodel.HQty; oSub.HTechnologyParameter = ""; oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oBill.DetailColl.Add(oSub); } bool bResult = false; bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + HSourceID + " where HInterID=" + HInterID + " and HEntryID=" + HEntryID); if (!bResult) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "派工失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } } oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "派工æåï¼"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å¼å¸¸ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region åæ¶æç¼¸åè½ [Route("LEMS/ProcessExchangeArrangementDel")] [HttpGet] public object ProcessExchangeArrangementDel(string HInterID_S, int HSourceID, long HOrgID, string user) { DataSet ds; DataSet ds1; try { var HNum = HInterID_S.Split(','); oCN.BeginTran(); for (int j = 0; j < HNum.Length; j++) { ds = oCN.RunProcReturn(@"select * from Sc_ProcessExchangeBillMain a where a.HInterID=" + HNum[j], "Sc_ProcessExchangeBillMain"); if (ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¥æ æ¤åå·¥åºæµè½¬å¡ï¼"; objJsonResult.data = null; return objJsonResult; } string HMainSourceInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"].ToString(); string HMainSourceEntryID = ds.Tables[0].Rows[0]["HMainSourceEntryID"].ToString(); ds1 = oCN.RunProcReturn(@"select * from Sc_ProcessExchangeBillMain where HInterID=" + HMainSourceInterID, "Sc_ProcessExchangeBillMain"); if (ds1.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ¥æ æ¤åå·¥åºæµè½¬å¡å¯¹åºçä¸»å·¥åºæµè½¬å¡ï¼"; objJsonResult.data = null; return objJsonResult; } oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=0 where HInterID=" + HMainSourceInterID + " and HEntryID=" + HMainSourceEntryID); oCN.RunProc("delete from Sc_ProcessExchangeBillMain where HInterID=" + HNum[j]); oCN.RunProc("delete from Sc_ProcessExchangeBillSub where HInterID=" + HNum[j]); } oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å·²åæ¶æ´¾å·¥ï¼"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å¼å¸¸ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion /// <summary> /// è¿åå·¥åºæµè½¬å¡ç»´æ¤å表ä»è¡¨ ///åæ°ï¼string sqlã