Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | ",HEndDate='" + omodel.HEndDate + "'" + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | |
| | | ",HMouldMaintainRuleInterID="+omodel.HMouldMaintainRuleInterID.ToString()+ |
| | | //",HDeptID=" + omodel.HDeptID.ToString() + |
| | | //",HDeptNumber='" + omodel.HDeptNumber +"'"+ |
| | | //",HEmpID=" + omodel.HEmpID.ToString() + |
| | |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate"+ |
| | | ",HEndDate"+ |
| | | ",HInnerBillNo,HExplanation" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ |
| | | ",'" + omodel.HPlanNo + "'," + omodel.HPlanInterID.ToString() + "," + omodel.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" + |
| | | ",'" + omodel.HEndDate + "'"+ |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," +omodel.HMouldMaintainRuleInterID.ToString()+ |
| | | ") "); |
| | | |
| | | if (DetailCol.Count > 0) |
| | |
| | | ",HPlanNo='" + omodel.HPlanNo + "'" + |
| | | ",HExplanation='" + omodel.HExplanation+"'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo+"'" + |
| | | ",HEquipDotCheckRuleInterID="+omodel.HEquipDotCheckRuleInterID+ |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sb_EquipDotCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HEquipID" + |
| | | ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" + |
| | | ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipDotCheckRuleInterID" + |
| | | ") "+ |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + |
| | | ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipDotCheckRuleInterID.ToString()+ |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl) |
| | |
| | | ",HPlanNo='" + omodel.HPlanNo + "'" + |
| | | ",HExplanation='" + omodel.HExplanation+"'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo+"'" + |
| | | ",HEquipMaintainRuleInterID="+omodel.HEquipMaintainRuleInterID.ToString()+ |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sb_EquipMaintainBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HEquipID" + |
| | | ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" + |
| | | ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipMaintainRuleInterID" + |
| | | ") "+ |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + |
| | | ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipMaintainRuleInterID.ToString()+ |
| | | ") "); |
| | | //æå
¥é
ä»¶å表 |
| | | foreach (Model.ClsSb_EquipMaintainBillSub oSub in DetailColl) |
| | |
| | | public string HEndDate;// --ä¿å
»ç»ææ¥æ |
| | | public string HExplanation;// --ÕªÒª |
| | | public string HInnerBillNo;// --å
é¨åæ®å· |
| | | public int HMouldMaintainRuleInterID; |
| | | } |
| | | } |
| | |
| | | public string HExplanation; |
| | | public string HInnerBillNo; |
| | | public Int64 HDeptID; |
| | | |
| | | public int HEquipMaintainRuleInterID; |
| | | public int HEquipDotCheckRuleInterID; |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | public string HExplanation; |
| | | public string HInnerBillNo; |
| | | public Int64 HDeptID; |
| | | |
| | | |
| | | public int HEquipMaintainRuleInterID; |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | case 0: |
| | | switch (Glida) |
| | | { |
| | | case 0: |
| | | case 0://çº¯æµæ°´å· |
| | | Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "'", "Gy_MaxNum"); |
| | | if (Ds.Tables[0].Rows.Count != 0) |
| | | { |
| | |
| | | } |
| | | return sBillNo; |
| | | |
| | | case 1: |
| | | case 1://æ ¹æ® YYå¹´+MMæ + æµæ°´å· çæåæ®å· |
| | | sKjYear = sKjYear.Substring(2, 2); |
| | | sPeriod = "0" + sPeriod; |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | | sDay = ""; |
| | | Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum"); |
| | | if (Ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length); |
| | | sBillNo = Profix.Trim() + sKjYear + sPeriod + sDay + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim(); |
| | | } |
| | | else //æå
¥æ°è®°å½ |
| | | { |
| | | sStr = new string(c, CodeLen - 1); |
| | | oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber) values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)"); |
| | | sBillNo = Profix.Trim() + sKjYear + sPeriod + sDay + sStr + "1"; |
| | | } |
| | | if (Add == true) |
| | | { |
| | | oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'"); |
| | | } |
| | | return sBillNo; |
| | | |
| | | case 2: //å½åå¹´å½åæé´ çæåæ®å· |
| | | Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear=" + sKjYear + " and Period=" + sPeriod + " and Day=" + sDay, "Gy_MaxNum"); |
| | | case 2: //æ ¹æ®å¹´+æ+æ¥ çæåæ®å· |
| | | Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum"); |
| | | if (Ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length); |
| | |
| | | else //æå
¥æ°è®°å½ |
| | | { |
| | | sStr = new string(c, CodeLen - 1); |
| | | oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,Day,NowNumber) values('" + BillCode.Trim() + "'," + sKjYear + "," + sPeriod + "," + sDay + ",1)"); |
| | | oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber) values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)"); |
| | | sBillNo = Profix.Trim() + sKjYear + ClsPub.isStrNull(("0" + sPeriod)).Substring(ClsPub.isStrNull(("0" + sPeriod)).Length - 2, 2) + ClsPub.isStrNull(("0" + sDay)).Substring(ClsPub.isStrNull(("0" + sDay)).Length - 2, 2) + sStr + 1; |
| | | } |
| | | if (Add == true) |
| | | { |
| | | oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear=" + sKjYear + " and Period=" + sPeriod + " and Day=" + sDay); |
| | | oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'"); |
| | | } |
| | | return sBillNo; |
| | | default: |
| | |
| | | { |
| | | this.Sub_SaveBill(); |
| | | Display(); |
| | | |
| | | } |
| | | |
| | | //éç½®æçº½ |
| | |
| | | } |
| | | else if (cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å") |
| | | { |
| | | //ç©æç¼ç +ç产æ¹å·+å¤±ææ¥æï¼YYMMDDï¼+æµæ°´å·6ä½- |
| | | sTMNumber = HMaterNumber + HBatchNo + sYear + sPeriod + sDay; |
| | | //ç©æç¼ç +ç产æ¹å·+æµæ°´å·6ä½- |
| | | sTMNumber = HMaterNumber + HBatchNo ; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | LSHlen = 5; |
| | | if (sTMNumber.Length != 16) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤16ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼å¶é æ¬é¨1ä½:[0] + æºå代ç 5ä½:[" + HModelName + "] + å¹´ææ¥5ä½:["+ HBarCodeDate + "] + æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "]+ å缩æº1ä½:["+ HYasuoji + "]+00 ; "); |
| | |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | LSHlen = 5; |
| | | if (sTMNumber.Length != 18) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤18ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼ç©æä»£ç 11ä½:["+ HMaterNumber.Replace(".", "") + "]+å¹´ææ¥5ä½:["+ HBarCodeDate + "]+æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "];"); |
| | |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 4; |
| | | LSHlen = 5; |
| | | } |
| | | //else if (cmbHBarCodeType.Text == "æçæ¡ç ") |
| | | //{ |
| | |
| | | Thread.Sleep(1000); |
| | | } |
| | | } |
| | | |
| | | //çæå¤ç®±ç |
| | | private void wxm_Click(object sender, EventArgs e) |
| | | { |
| | | //å¿
é¡»æ¡ç çææé®æ¯ç°åº¦æå¯ä»¥çæç®±æ¡ç |
| | | if(bc.Enabled != false) |
| | | { |
| | | MessageBox.Show("请å
çææ¡å½¢ç ï¼åçæç®±æ¡ç "); |
| | | return; |
| | | } |
| | | //-------------------æ ¹æ®HINTERIDçæç®±æ¡ç |
| | | |
| | | //çæå夿ï¼å¾ªç¯ç©æç½æ ¼ï¼å¤æ æ¯å¦è®¾ç½®äºåçç å¤ç®±æ°éã å¤ç®±æ°é å¿
é¡»æ¯ æå°å
è£
æ°ç åæ° å¹¶å¿
须大äº0å大äºçäºæå°å
è£
æ°éã |
| | | |
| | | |
| | | |
| | | //ä»0è¡è¿è¡å¾ªç¯ ç©æç½æ ¼ï¼è·åå¤ç®±æ°é |
| | | |
| | | //åå¾ªç¯ æ¡ç ç½æ ¼ |
| | | |
| | | //æ ¹æ®å¤ç®±æ°é æ£åï¼ç´å° å¤ç®±æ°éæ£åå®ï¼çæ å¤ç®±æ¡ç åç»æå |
| | | |
| | | |
| | | //ç»æå¾ªç¯ |
| | | |
| | | //å·æ°æå°é¡µç¾ï¼-S ç èææ¡ç 䏿¾ç¤º ï¼ |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Gy_BarCodeBill)); |
| | | this.Tool = new System.Windows.Forms.ToolStrip(); |
| | | this.dy = new System.Windows.Forms.ToolStripButton(); |
| | | this.sdy = new System.Windows.Forms.ToolStripButton(); |
| | | this.yl = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.AddRow = new System.Windows.Forms.ToolStripButton(); |
| | |
| | | this.grdSub = new System.Windows.Forms.DataGridView(); |
| | | this.tabPage3 = new System.Windows.Forms.TabPage(); |
| | | this.grdList = new System.Windows.Forms.DataGridView(); |
| | | this.sdy = new System.Windows.Forms.ToolStripButton(); |
| | | this.wxm = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.Tool.SuspendLayout(); |
| | | this.P1.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit(); |
| | |
| | | this.DelRow, |
| | | this.toolStripSeparator4, |
| | | this.bc, |
| | | this.toolStripSeparator8, |
| | | this.wxm, |
| | | this.toolStripSeparator9, |
| | | this.cz, |
| | | this.toolStripSeparator5, |
| | | this.kc, |
| | |
| | | this.dy.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.dy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.dy.Click += new System.EventHandler(this.dy_Click); |
| | | // |
| | | // sdy |
| | | // |
| | | this.sdy.AutoSize = false; |
| | | this.sdy.Image = ((System.Drawing.Image)(resources.GetObject("sdy.Image"))); |
| | | this.sdy.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.sdy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.sdy.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.sdy.Name = "sdy"; |
| | | this.sdy.Size = new System.Drawing.Size(35, 47); |
| | | this.sdy.Text = "æµè§"; |
| | | this.sdy.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.sdy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.sdy.Click += new System.EventHandler(this.sdy_Click); |
| | | // |
| | | // yl |
| | | // |
| | |
| | | this.grdList.Size = new System.Drawing.Size(1241, 347); |
| | | this.grdList.TabIndex = 46; |
| | | // |
| | | // sdy |
| | | // wxm |
| | | // |
| | | this.sdy.AutoSize = false; |
| | | this.sdy.Image = ((System.Drawing.Image)(resources.GetObject("sdy.Image"))); |
| | | this.sdy.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.sdy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.sdy.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.sdy.Name = "sdy"; |
| | | this.sdy.Size = new System.Drawing.Size(35, 47); |
| | | this.sdy.Text = "æµè§"; |
| | | this.sdy.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.sdy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.sdy.Click += new System.EventHandler(this.sdy_Click); |
| | | this.wxm.AutoSize = false; |
| | | this.wxm.Image = ((System.Drawing.Image)(resources.GetObject("wxm.Image"))); |
| | | this.wxm.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.wxm.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.wxm.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.wxm.Name = "wxm"; |
| | | this.wxm.Size = new System.Drawing.Size(50, 47); |
| | | this.wxm.Text = "å¤ç®±ç "; |
| | | this.wxm.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.wxm.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.wxm.Click += new System.EventHandler(this.wxm_Click); |
| | | // |
| | | // toolStripSeparator8 |
| | | // |
| | | this.toolStripSeparator8.Name = "toolStripSeparator8"; |
| | | this.toolStripSeparator8.Size = new System.Drawing.Size(6, 62); |
| | | // |
| | | // toolStripSeparator9 |
| | | // |
| | | this.toolStripSeparator9.Name = "toolStripSeparator9"; |
| | | this.toolStripSeparator9.Size = new System.Drawing.Size(6, 62); |
| | | // |
| | | // Gy_BarCodeBill |
| | | // |
| | |
| | | private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; |
| | | private System.Windows.Forms.ToolStripButton BatchNo; |
| | | private System.Windows.Forms.ToolStripButton sdy; |
| | | private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; |
| | | private System.Windows.Forms.ToolStripButton wxm; |
| | | private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; |
| | | } |
| | | } |
| | |
| | | SUVORK5CYII= |
| | | </value> |
| | | </data> |
| | | <data name="wxm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | | YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAH1SURBVDhPjZPNSxRxGMcfI+jQLTxYIKLoQQsjvEadEoRO |
| | | /gO+awReIiGty97sRQtbPSmoB8FFMSwKDx3VXdvcfGErt9YlpWUJF/dFV2d0v36fHc0XdPALX2bmme/z |
| | | mec38xuRBi+kahqRVmD5yfmsWe3J9ErtDD6tAQkAv85pzWqP9oo0foVcbWcJMEwDpmnaWjMqyWlHplfq |
| | | ZlD2IVPD5CTgnra3ZlTN3oMJaj24NWYVk6kUNrbsrRlV+QQBNZ7jgKkpPsVtb82oCl06wQnAv1gCa/Gk |
| | | rTWjutBHQN0+oOxgCbE4NuIJW2tGJc4jgNvvgUu9LLzYhHRuQ96Yp1vvdWwjt2UR0mVA6vdf4h1+hSv9 |
| | | BDxfh1R+huS/ghR0Hnd+Bxu+QKrdcEwkmY2dAAwQ8DScGe8sSRUbqj0Y+c5zR+QUwOOQFbz2EtKyij+/ |
| | | rTc/69tFKLjzH+DyM9O2wq3MiXSsux8JGGSx+YcFKHpNQBD+b8Dc/C78Pw2E/3L9RwGPAhYg654LeY4l |
| | | ZA+x2DiH9CaPeZygaQEBBrU5sJxCNJo6BOgSHi4wrz8TdbF8GJefBUn0IRYBQktAmKtZXeExsoPouoF0 |
| | | eosbh3u/3ot3QQKafJAHsxZAlVUxCinthlx3QkreHrqY1+oS+maP5Rs8L6Xvj2MPx8IASe80O9sAAAAA |
| | | SUVORK5CYII= |
| | | </value> |
| | | </data> |
| | | <data name="cz.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 |
| | |
| | | <value>93, 17</value> |
| | | </metadata> |
| | | <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
| | | <value>42</value> |
| | | <value>25</value> |
| | | </metadata> |
| | | </root> |
New file |
| | |
| | | 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.BaseSet |
| | | { |
| | | public class Gy_RoutingGroupController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | |
| | | #region å·¥èºè·¯çº¿å¤§ç±»å表æ¥è¯¢ |
| | | [Route("Gy_RoutingGroup/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Gy_RoutingGroup where 1=1", "Gy_RoutingGroup"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from Gy_RoutingGroup where 1 = 1 " + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "Gy_RoutingGroup"); |
| | | } |
| | | 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 |
| | | } |
| | | } |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | int hentryid = int.Parse(sArray[2].ToString());//å表ç顺åºid |
| | | int OperationType = int.Parse(sArray[3].ToString());//æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ |
| | | try |
| | | { |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | |
| | | long HInterID = mainList[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | | string HBillNo = mainList[0].HBillNo;//éå
¥typeå¾å°çåæ®å· |
| | | DateTime HDate = mainList[0].HDate;//æ¥æ |
| | | int HYear = 2021; |
| | | int HYear = DateTime.Now.Year; |
| | | double HPeriod = 1; |
| | | string HRemark = mainList[0].HRemark;//夿³¨ |
| | | string HMaker = mainList[0].HMaker;//å¶å人 |
| | |
| | | double HDelSourceRate = mainList[0].HDelSourceRate;//åèµæºåé |
| | | int HPRDORGID = mainList[0].HPRDORGID; //ç»ç» |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_RoutingBillMain " + |
| | | "(HBillType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + |
| | | ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + |
| | | ") " + |
| | | " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID + |
| | | "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) + |
| | | "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty + |
| | | "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate + |
| | | ") "); |
| | | if (OperationType == 1)//æ°å¢ |
| | | { |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_RoutingBillMain " + |
| | | "(HBillType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + |
| | | ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + |
| | | ") " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID + |
| | | "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) + |
| | | "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty + |
| | | "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate + |
| | | ") "); |
| | | } |
| | | else if (OperationType == 3) |
| | | { //ä¿®æ¹ |
| | | oCN.RunProc("update Gy_RoutingBillMain set " + |
| | | "HDate='" + HDate + |
| | | "',HYear='" + HYear + "',HPeriod='" + HPeriod + "',HRemark='" + HRemark + "',HMaker='" + HMaker + |
| | | "',Hmakedate=getdate(),HMaterID='" + HMaterID + "',HName='" + HName + "',HMaterTypeID='" + HMaterTypeID + |
| | | "',HRoutingGroupID='" + HRoutingGroupID + "',HUnitID='" + HUnitID + "',HMaterNumber='" + HMaterNumber + "',HUnitNumber='" + HUnitNumber + |
| | | "',HStandard='" + Convert.ToString(HStandard ? 1 : 0) + "',HMainGroupID='" + HMainGroupID + "',HMainProcID='" + HMainProcID + "',HMainCenterID='" + HMainCenterID + |
| | | "',HMainTimeUnit='" + HMainTimeUnit + "',HMainUnitTime='" + HMainUnitTime + "',HMainWorkQty='" + HMainWorkQty + "',HMainPrice='" + HMainPrice + |
| | | "',HStdSourceQty='" + HStdSourceQty + "',HAddSourceRate='" + HAddSourceRate + "',HDelSourceRate='" + HDelSourceRate + |
| | | "' where HInterID='" + HInterID + "'"); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "' and HEntryID='" + hentryid + "'"); |
| | | } |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub(msg3, HInterID); |
| | | objJsonResult = AddBillSub(msg3, HInterID, hentryid); |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | oCN.RunProc("exec h_p_Gy_RoutingBillCheck " + HInterID); //设置é»è®¤å·¥èºè·¯çº¿ |
| | | //夿æ¯å¦éå¤å·¥åºå· |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingCtrl " + HInterID, "h_p_Gy_RoutingCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | |
| | | if (OperationType == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "夿éå¤å·¥åºå·å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "2") |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0][1]); |
| | | objJsonResult.Message = "夿éå¤å·¥åºå·å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "2") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ClsPub.isStrNull(ds.Tables[0].Rows[0][1]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | objJsonResult.code = "1"; |
| | |
| | | } |
| | | } |
| | | |
| | | public json AddBillSub(string msg3,long HInterID) { |
| | | public json AddBillSub(string msg3, long HInterID, int hentryid) |
| | | { |
| | | List<Gy_RoutingBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_RoutingBillSub>>(msg3); |
| | | for (int i=0;i< subList.ToArray().Length;i++) |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | | { |
| | | if (subList[i].HWorkQty <= 0) |
| | | { |
| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ") values(" |
| | | + HInterID + "," + i + "," + subList[i].HProcID + "," + subList[i].HProcNo + "," + subList[i].HSupID + "," + Convert.ToString(subList[i].HSupFlag ? 1 : 0) + "" + |
| | | + HInterID + "," + (hentryid == -1 ? i : hentryid) + "," + subList[i].HProcID + ",'" + subList[i].HProcNo + "'," + subList[i].HSupID + "," + Convert.ToString(subList[i].HSupFlag ? 1 : 0) + "" + |
| | | "," + subList[i].HWorkQty + "," + HCenterID + ",'" + HTimeUnit + "'," + HUnitTime + |
| | | "," + HReadyTime + "," + HQueueTime + "," + HMoveTime + |
| | | ",'" + HCloseMan + "'," + Convert.ToString(HCloseType ? 1 : 0) + ",'" + subList[i].HRemark + "','" + HProcType + "'," + Convert.ToString(HNextProcFlag ? 1 : 0) + "," + Convert.ToString(HFlowProc ? 1 : 0) + |
| | |
| | | ",'" + HPackStd + "','" + HPack + "','" + HPutArea + "'," + HMyWorkDays + "," + HMyFixWorkDays + "," + subList[i].HPassRate + |
| | | ") "); |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = Sc_GetMoveStockBillList(sWhere); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by æ¥æ desc", "h_v_IF_MoveStockBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by æ¥æ desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetMoveStockBillList(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by æ¥æ desc", "h_v_IF_MoveStockBillList"); |
| | | } |
| | | #endregion |
| | | /// <summary> |
| | | /// éå®åºåºåå表 |
| | | /// </summary> |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ ¹æ®å¨å
·ä¸»å
ç è·åå¨å
·ä¿å
»æ£éªé¡¹ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetMouldMaintainItemtemByMaintainRuleID")] |
| | | [HttpGet] |
| | | public object GetMouldMaintainItemtemByMaintainRuleID(int MouldMaintainRuleID) |
| | | { |
| | | |
| | | if (MouldMaintainRuleID <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "å¨å
·ä¿å
»è§ç¨æªéæ©"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | List<object> list = new List<object>(); |
| | | DataSet ds2; |
| | | DataSet ds1; |
| | | string sql1 = string.Format(@"select t.HMaintainItemID ,m.HNumber HMaintainItemNumber,t.HMaintainItem,t.HMaintainPart,t.HClaim,t.HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark |
| | | from Sc_MouldMaintainRuleBillMain a left join Sc_MouldMaintainRuleBillSub_Item t on a.HInterID=t.HInterID |
| | | left join Gy_Maintain m on m.HItemID=t.HMaintainItemID |
| | | left join Gy_Employee e on e.HItemID=t.HManagerID |
| | | where a.HInterID=" + MouldMaintainRuleID); |
| | | |
| | | string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName, m.HModel HMaterSpec,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark from Sc_MouldMaintainRuleBillMain a |
| | | left join Sc_MouldMaintainRuleBillSub b on a.HInterID=b.HInterID |
| | | left join h_v_IF_Material m on b.HMaterID=m.HItemID |
| | | left join h_v_IF_Unit u on b.HUnitID=u.HItemID |
| | | where a.HInterID=" + MouldMaintainRuleID); |
| | | ds1 = oCN.RunProcReturn(sql1, "Sc_MouldMaintainRuleBillMain");//ä¿å
» |
| | | ds2 = oCN.RunProcReturn(sql2, "Sc_MouldMaintainRuleBillMain");//é
ä»¶ |
| | | list.Add(ds1.Tables[0]); |
| | | list.Add(ds2.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤ä¿å
»è§ç¨æ¾ç¤ºè®¾å¤ä¿å
»è§ç¨é¡¹ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetMaintainItemtemByMaintainRuleID")] |
| | | [HttpGet] |
| | | public object GetMaintainItemtemByMaintainRuleID(int EquipProjectID) |
| | | { |
| | | if (EquipProjectID <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "设å¤ä¿å
»è§ç¨æªéæ©"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | List<object> list = new List<object>(); |
| | | DataSet ds2; |
| | | DataSet ds1; |
| | | string sql1 = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark |
| | | from Sb_EquipMaintainRuleBillMain a left join Sb_EquipMaintainRuleBillSub_Item t on a.HInterID=t.HInterID |
| | | left join Gy_Maintain m on m.HItemID=t.HMaintainItemID |
| | | left join Gy_Employee e on e.HItemID=t.HManagerID |
| | | where a.HInterID=" + EquipProjectID ); |
| | | string sql2 = string.Format(@"select b.HMaterID,m.HNumber HMaterNumber,m.HName HMaterName,b.HUnitID,u.HNumber HUnitNumber,u.HName HUnitName,b.HQty,b.HRemark from Sb_EquipMaintainRuleBillMain a |
| | | left join Sb_EquipMaintainRuleBillSub b on a.HInterID=b.HInterID |
| | | left join h_v_IF_Material m on b.HMaterID=m.HItemID |
| | | left join h_v_IF_Unit u on b.HUnitID=u.HItemID |
| | | where a.HInterID=" + EquipProjectID); |
| | | |
| | | ds1 = oCN.RunProcReturn(sql1, "Sb_EquipMaintainRuleBillMain");//ä¿å
» |
| | | ds2 = oCN.RunProcReturn(sql2, "Sc_MouldMaintainRuleBillMain");//é
ä»¶ |
| | | list.Add(ds1.Tables[0]); |
| | | list.Add(ds2.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤æ¾ç¤ºè®¾å¤ç¹æ£ç¨é¡¹ç® |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤ç¹æ£è§ç¨æ¾ç¤ºè®¾å¤ç¹æ£ç¨é¡¹ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetDotCheckRuleItemByDotCheckRuleID")] |
| | | [HttpGet] |
| | | public object GetDotCheckRuleItemByDotCheckRuleID(int HDotCheckRuleInterID) |
| | | { |
| | | if (HDotCheckRuleInterID <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "设å¤ç¹æ£è§ç¨æªéæ©"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim, |
| | | b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain a |
| | | left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID |
| | | left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID |
| | | left join Gy_Employee e on e.HItemID=b.HManagerID |
| | | where a.HInterID=" + HDotCheckRuleInterID); |
| | | ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·å维修项ç®å表 |
| | | /// </summary> |
New file |
| | |
| | | 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.ä»å管ç.å§å¤ç¨æ |
| | | { |
| | | public class WW_PPBomBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | public DLL.ClsWW_PPBomBill BillNew0 = new DLL.ClsWW_PPBomBill(); |
| | | public DLL.ClsWW_PPBomBill BillOld0 = new DLL.ClsWW_PPBomBill(); |
| | | |
| | | #region 模å
·éè´å
¥åºåå表 |
| | | |
| | | [Route("WW_PPBomBillController/Get_WW_PPBomBillList")] |
| | | [HttpGet] |
| | | public object Get_WW_PPBomBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = WW_PPBomBillList(sWhere); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | public static DataSet WW_PPBomBillList(string sWhere) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_WW_PPBomBillList"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + "order by æ¥æ desc", "h_v_WW_PPBomBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_WW_PPBomBillList"); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | 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 KF_PonderationBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | #region æ«ç å¼å¸¸è®°å½æ¥è¯¢ |
| | | [Route("KF_PonderationBill/PonderationBillList")] |
| | | [HttpGet] |
| | | public object PonderationBillList(string HbarCode) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_WMS_BarCodeStatusQuery '" + HbarCode + "'", "h_p_WMS_BarCodeStatusQuery"); |
| | | |
| | | 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) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = ds.Tables[0].Rows.Count; |
| | | objJsonResult.Message = "è·åèµæºç»å®æ°æ®æåï¼"; |
| | | objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], 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 |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | 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 Kf_ICStockInOutBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | //åå¨è¿ç¨ æ°æ® ç±» |
| | | public class Data |
| | | { |
| | | public Data() |
| | | { |
| | | HStartDate = DateTime.Now.AddMonths(-1); |
| | | HEndDate = DateTime.Now; |
| | | BillType = "å
¨é¨"; |
| | | } |
| | | public DateTime HStartDate;//å¼å§æ¥æ |
| | | public DateTime HEndDate;//ç»ææ¥æ |
| | | public string MaterialName;//ç©æ |
| | | public string sWH;//ä»åº |
| | | public string sSP;//ä»ä½ |
| | | public string sBatchNo;//æ¹å· |
| | | public string HBarCode;//æ¡å½¢ç |
| | | public string BillType;//åæ®ç±»å |
| | | public string BillNo;//åæ®å· |
| | | public string SeOrderBillNo;//(éå®è®¢åå·) |
| | | } |
| | | |
| | | #region åºå
¥åºè®°å½æ¥è¯¢ |
| | | [Route("Kf_ICStockInOutBill/StockInOutBillList")] |
| | | [HttpGet] |
| | | public object StockInOutBillList(string sWhere) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | var data = JsonConvert.DeserializeObject<Data>(sWhere); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_BarCodeOutInReport '" + |
| | | data.HStartDate + "','" + data.HEndDate + "','" + data.MaterialName + "','" + data.sWH + "','" + data.sSP + "','" + data.sBatchNo + "','" + data.HBarCode + "','" + data.BillType + "','" + data.BillNo + "','" + data.SeOrderBillNo |
| | | + "'", "h_p_Kf_BarCodeOutInReport"); |
| | | |
| | | 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) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = ds.Tables[0].Rows.Count; |
| | | objJsonResult.Message = "è·åèµæºç»å®æ°æ®æåï¼"; |
| | | objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], 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 |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | 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 KF_ICInventoryList_WMSBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | #region æ¡ç åºåæ¥è¯¢å表 |
| | | [Route("KF_ICInventoryList_WMSBill/GetWMSBillList")] |
| | | [HttpGet] |
| | | public object GetWMSBillList(int page, int limit,string sWhere) |
| | | { |
| | | //page é¡µæ° |
| | | //limit 页颿¾ç¤ºçè¡æ° |
| | | //sWhereæ¨¡ç³æ¥è¯¢ æ¡ä»¶ |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | //å页SQLè¯å¥ |
| | | string sql = "select top "+limit+ " (select count(*) from h_v_KF_ICInventoryList_WMS) æ»æ°, * from (select row_number() over(order by HMaterID asc)" + |
| | | " as rownumber, * from h_v_KF_ICInventoryList_WMS) temp_row where rownumber >"+((page-1)*limit)+" "; |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql, "h_v_KF_ICInventoryList_WMS"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn(sql + sWhere, "h_v_KF_ICInventoryList_WMS"); |
| | | } |
| | | |
| | | //è·åè¡¨å¤´åæ®µåç§° |
| | | 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) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count =int.Parse(ds.Tables[0].Rows[0]["æ»æ°"].ToString()); |
| | | objJsonResult.Message = "è·åèµæºç»å®æ°æ®æåï¼"; |
| | | objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], 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 |
| | | } |
| | | } |
New file |
| | |
| | | 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 Kf_MoveStockRequestBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | #region è°æ¨åå表 |
| | | [Route("Kf_MoveStockRequestBill/GetMoveStockRequestBillList")] |
| | | [HttpGet] |
| | | public object GetMoveStockRequestBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | //夿æé(ç¥) |
| | | |
| | | string sql1 = string.Format("select * from h_v_IF_MoveStockRequestBillList_Litee where 1=1 "); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCn.RunProcReturn(sql1 + " order by æ¥æ desc", "h_v_IF_MoveStockRequestBillList_Litee"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere ; |
| | | ds = oCn.RunProcReturn(sql, "h_v_IF_MoveStockRequestBillList_Litee"); |
| | | } |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
New file |
| | |
| | | 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 Kf_StepFoldOutBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | #region 忥å¼è°åºå æ¥è¯¢ |
| | | |
| | | [Route("Kf_StepFoldOutBill/GetStepFoldOutBillList")] |
| | | [HttpGet] |
| | | public object GetStepFoldOutBillList(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | | //夿æé(ç¥) |
| | | |
| | | string sql1 = string.Format("select * from h_v_Kf_MoveStockStepOutBillList where (è°å
¥ç»ç»='" + Organization + "')"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCn.RunProcReturn(sql1 + " order by æ¥æ desc", "h_v_Kf_MoveStockStepOutBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by æ¥æ desc"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepOutBillList"); |
| | | } |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
New file |
| | |
| | | namespace WebAPI.Controllers.ä»å管ç.颿åè´§ |
| | | { |
| | | public class apiController |
| | | { |
| | | } |
| | | } |
| | |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | #region å§å¤å å·¥åºåºå |
| | | #region 忥å¼è°å
¥å æ¥è¯¢ |
| | | |
| | | [Route("Kf_StepFoldinBill/GetStepFoldinBillList")] |
| | | [HttpGet] |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsWW_PPBomBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Models.ClsWW_PPBomBillMain omodel = new Models.ClsWW_PPBomBillMain(); |
| | | public List<Models.ClsWW_PPBomBillSub> DetailColl = new List<Models.ClsWW_PPBomBillSub>(); |
| | | |
| | | public ClsWW_PPBomBill() |
| | | { |
| | | base.MvarItemKeySub = "WW_PPBomBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey = "WW_PPBomBillMain"; |
| | | base.MvarReportTitle = "å§å¤ç¨æå"; |
| | | base.BillType = "1604"; |
| | | base.HBillSubType = "1604"; |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsWW_PPBomBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | string sql = "Insert Into WW_PPBomBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HRemark,HMaker,HMakeDate" + /*"HYear, HPeriod,"*/ |
| | | ",HDeptID,HMaterID,HUnitID,HQty,HType" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", '" + omodel.HRemark.ToString() + "','" + omodel.HMaker + "',getdate()" + /*omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" +*/ |
| | | ","+ omodel.HDeptID.ToString() +","+ omodel.HMaterID.ToString() + ","+ omodel.HUnitID.ToString() +","+ omodel.HQty.ToString()+",'"+ omodel.HQty+ |
| | | "') "; |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | //æå
¥å表 |
| | | foreach (Models.ClsWW_PPBomBillSub oSub in DetailColl) |
| | | { |
| | | |
| | | oCn.RunProc("Insert into WW_PPBomBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HMaterNumber,HUnitID,HUnitNumber,HQtyMust,HQty" + |
| | | ",HWHID,HQtyScrap,HSendDate,HSPID" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber+ "'," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HQtyScrap.ToString() + ",'" + oSub.HSendDate + "'," + oSub.HSPID.ToString() + |
| | | ") "); |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate WW_PPBomBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + omodel.HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HMaterID=" + omodel.HMaterID.ToString() + |
| | | ",HUnitID=" + omodel.HUnitID.ToString() + |
| | | ",HQty=" + omodel.HQty.ToString() + |
| | | ",HType=" + omodel.HType.ToString() + |
| | | |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | foreach (Models.ClsWW_PPBomBillSub oSub in DetailColl) |
| | | { |
| | | |
| | | oCn.RunProc("Insert into WW_PPBomBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HMaterNumber,HUnitID,HUnitNumber,HQtyMust,HQty" + |
| | | ",HWHID,HQtyScrap,HSendDate,HSPID" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HQtyScrap.ToString() + ",'" + oSub.HSendDate + "'," + oSub.HSPID.ToString() + |
| | | ") "); |
| | | } |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsWW_PPBomBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public int HDeptID;// int --é¨é¨ |
| | | public int HICMOInterI;// D int |
| | | public int HSeOrderInterID;// int |
| | | public int HSeOrderEntryID;// int |
| | | public string HSeOrderBillNo;// varchar(50) |
| | | public int HMaterID;// int |
| | | public int HUnitID;// int |
| | | public int HQty;// dec(18,8) |
| | | public string HType;// varchar(10) ç±»å(å¯è½æ¯ å§å¤åç产) |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsWW_PPBomBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public int HMaterID;// int //ç©æID |
| | | public string HMaterNumber;// |
| | | public int HUnitID;// int //åä½ID |
| | | public string HUnitNumber;// |
| | | public float HQtyMust;// |
| | | public float HQty;// dec(18,8) --æ°é |
| | | public int HWHID;// int --ä»åº |
| | | public float HQtyScrap;// dec(18,8) --æèç |
| | | public DateTime HSendDate;// datetime --åææ¥æ |
| | | public int HSPID;// int --ä»ä½ |
| | | public int HBomInterID;// int --BOM |
| | | public int HICMOInterID;// int ä»»å¡åID |
| | | public string HICMOBillNo;// varchar(100) ä»»å¡åå· |
| | | public string HSeOrderBillNo;// varchar(50) //(éå®è®¢åå·) |
| | | public int HSeOrderInterID;// int //(éå®è®¢å主å
ç ) |
| | | public int HSeOrderEntryID;// int //(éå®è®¢ååå
ç ) |
| | | public int HChangeTimes;// int //åæ´æ¬¡æ° |
| | | } |
| | | } |
| | |
| | | <Compile Include="App_Start\SwaggerConfig.cs" /> |
| | | <Compile Include="App_Start\WebApiConfig.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_BarCodeBillController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_RoutingGroupController.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\SCGL\Sc_ProductionReturnBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" /> |
| | | <Compile Include="Controllers\Sc_ProcessMangementController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\æ«ç å¼å¸¸è®°å½\KF_PonderationBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\æ¡ç åºå
¥åºè®°å½\Kf_ICStockInOutBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\æ¡ç åºå\KF_ICInventoryList_WMSBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\è°æ¨çç¹\Kf_MoveStockRequestBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\颿åè´§\apiController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\颿åè´§\Kf_StepFoldOutBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\éªæ¶å
¥åº\Kf_StepFoldinBillController.cs" /> |
| | | <Compile Include="Controllers\忥èªå¨æ«ç 线\ScanlineAPIController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_StockCheckItemBillController.cs" /> |
| | |
| | | <Folder Include="App_Data\" /> |
| | | <Folder Include="Views\Cg_PurchaseReturn\" /> |
| | | <Folder Include="Views\Gy_EquipType\" /> |
| | | <Folder Include="Views\Gy_RoutingGroup\" /> |
| | | <Folder Include="Views\KF_ICInventoryList_WMSBill\" /> |
| | | <Folder Include="Views\Kf_ICStockBillMain\" /> |
| | | <Folder Include="Views\Kf_ICStockInOutBill\" /> |
| | | <Folder Include="Views\Kf_MoveStockRequestBill\" /> |
| | | <Folder Include="Views\KF_PonderationBill\" /> |
| | | <Folder Include="Views\kf_StepFoldinBill\" /> |
| | | <Folder Include="Views\Kf_StepFoldOutBill\" /> |
| | | <Folder Include="Views\MoveStockBill\" /> |
| | | <Folder Include="Views\ProductionReturnBill\" /> |
| | | <Folder Include="Views\QC_Management\" /> |
| | |
| | | <IISExpressUseClassicPipelineMode /> |
| | | <UseGlobalApplicationHostFile /> |
| | | <ProjectView>ProjectFiles</ProjectView> |
| | | <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath> |
| | | <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath> |
| | | </PropertyGroup> |
| | | <ProjectExtensions> |
| | | <VisualStudio> |