| | |
| | | } |
| | | } |
| | | |
| | | //å é¤åæ®ä¿¡æ¯ |
| | | public bool DeleteBill(Int64 sHInterID,string HBillNo,string HBillType,string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from " + MvarItemKey + " where HInterID=" + sHInterID.ToString() + " and HBillNo='" + HBillNo.ToString() + "'and HBillType='" + HBillType + "'and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ°å¢ |
| | | public bool AddNew_sQty_FIFO(string sQty, ref string sReturn) |
| | | { |
| | |
| | | string HModelName = ""; //æºå |
| | | string HICMOBillNo = ""; //æºåå· |
| | | string HBarCodeBatchNo = ""; //æ¡ç æ¹æ¬¡å· |
| | | string HBarCodeDate = ""; //æ¡ç æ¥æ |
| | | int k = 0; |
| | | int n = 0; //å䏿¹çææ¡ç ä¸çç¬¬å æ¡ |
| | | string sTMNumber = ""; //æ¡ç èªå®ä¹åç¼ |
| | |
| | | //æ¥æè·åæ¹å¼ |
| | | sDate = dtpHDate.Value.ToShortDateString(); |
| | | // |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å") //åæ®æ¥æ(æ¶æéç¥å) |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") //åæ®æ¥æ(æ¶æéç¥å) |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HDateCol].Value); |
| | | } |
| | |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HEndDateCol].Value); |
| | | } |
| | | else if (CompanyName=="å¤å®çµå¨")// æ¥æï¼çäº§è®¢å æ¡ç æ¥æ |
| | | else if (CampanyName == "å¤å®çµå¨")// æ¥æï¼çäº§è®¢å æ¡ç æ¥æ |
| | | { |
| | | sDate = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HDateCol].Value); |
| | | } |
| | | HYasuoji= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanCol].Value); //å缩æºä»£ç ï¼å¤å®çµå¨ï¼ |
| | | HModelName= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HMaterModelCol].Value); //æºåï¼å¤å®çµå¨ï¼ |
| | | HModelName= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HCusTypeCol].Value); //æºåï¼å¤å®çµå¨ï¼ |
| | | HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSourceBillNoCol].Value); //ç产订åå·ï¼å¤å®çµå¨ï¼ |
| | | HBarCodeBatchNo= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HPinfanBarCodeCol].Value); //æ¡ç æ¹æ¬¡å·ï¼å¤å®çµå¨ï¼ |
| | | HBarCodeDate= DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[HSupNumberCol].Value); //æ¡ç æ¥æï¼å¤å®çµå¨ï¼ |
| | | // |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | |
| | | { |
| | | TM = HOrgNumber + HNumber + HBatchNo; |
| | | }//åæ¥ç¹æ®å¤ç |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å") |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | //ç©æç¼ç +åæ®æ¥æï¼YYMMDDï¼+æµæ°´4ä½ |
| | | sTMNumber = HMaterNumber + sYear + sPeriod + sDay; |
| | |
| | | } |
| | | 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]); |
| | |
| | | { |
| | | //å¶é æ¬é¨1ä½ï¼é»è®¤1ï¼+æºå代ç 5ä½ï¼ï¼+å¹´2ä½+æ1ä½ï¼AãBãC代æ¿10æä»½ï¼ |
| | | //+æ¥2ä½+æ¡ç æ¹æ¬¡ç 2ä½+å缩æºä»£ç 1ä½+00+æµæ°´å·4ä½+æ ¡éªç ï¼é»è®¤0ï¼ |
| | | sTMNumber = "1" + HModelName + sYear + Sub_PeriodChange(sPeriod) + sDay + HBarCodeBatchNo + HYasuoji + "00" ; |
| | | sTMNumber = "1" + HModelName + HBarCodeDate + HBarCodeBatchNo + 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; |
| | | if (sTMNumber.Length != 16) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤16ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼å¶é æ¬é¨1ä½:[0] + æºå代ç 5ä½:[" + HModelName + "] + å¹´ææ¥5ä½:["+ HBarCodeDate + "] + æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "]+ å缩æº1ä½:["+ HYasuoji + "]+00 ; "); |
| | | return; |
| | | } |
| | | } |
| | | else if (cmbHBarCodeType.Text == "å¤éæºæ¡ç ") |
| | | { |
| | | //ç©æä»£ç 11ä½+å¹´2ä½+æ1ä½ï¼AãBãC代æ¿10æä»½ï¼+æ¥2ä½+æ¹æ¬¡2ä½+æµæ°´å·4ä½ |
| | | sTMNumber = HMaterNumber + sYear + Sub_PeriodChange(sPeriod) + sDay + HBarCodeBatchNo ; |
| | | //sTMNumber = HMaterNumber.Replace(Convert.ToChar("."),Convert.ToChar("")) + HBarCodeDate + HBarCodeBatchNo; |
| | | sTMNumber = HMaterNumber.Replace( "." , "" ) + HBarCodeDate + 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; |
| | | if (sTMNumber.Length != 18) |
| | | { |
| | | MessageBox.Show("æ¡ç é¿åº¦ä¸å¤18ä½ï¼æ¯å¦æ°æ®ä¸å
¨ï¼ç©æä»£ç 11ä½:["+ HMaterNumber.Replace(".", "") + "]+å¹´ææ¥5ä½:["+ HBarCodeDate + "]+æ¹æ¬¡å·2ä½:[" + HBarCodeBatchNo + "];"); |
| | | return; |
| | | } |
| | | } |
| | | else if (cmbHBarCodeType.Text == "åæåæ¡ç ") |
| | | { |
| | |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | TM = sTMNumber + LSH2; |
| | | } |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å" |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å" || cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å" |
| | | || cmbHBarCodeType.Text == "åæåæ¡ç " || cmbHBarCodeType.Text == "å¤éæºæ¡ç ") |
| | | { |
| | | TM = sTMNumber + LSH2; |
| | | |
| | | } |
| | | else if (cmbHBarCodeType.Text == "å
éæºæ¡ç ") |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | //æä»½è½¬å |
| | | private string Sub_PeriodChange(string sPeriod) |
| | | { |
| | | if(sPeriod=="10") |
| | | { |
| | | return "A"; |
| | | } |
| | | else if (sPeriod == "11") |
| | | { |
| | | return "B"; |
| | | } |
| | | else if (sPeriod == "12") |
| | | { |
| | | return "C"; |
| | | } |
| | | else |
| | | { |
| | | return sPeriod.Substring(2, 1); |
| | | } |
| | | } |
| | | ////æä»½è½¬å |
| | | //private string Sub_PeriodChange(string sPeriod) |
| | | //{ |
| | | // if(sPeriod=="10") |
| | | // { |
| | | // return "A"; |
| | | // } |
| | | // else if (sPeriod == "11") |
| | | // { |
| | | // return "B"; |
| | | // } |
| | | // else if (sPeriod == "12") |
| | | // { |
| | | // return "C"; |
| | | // } |
| | | // else |
| | | // { |
| | | // return sPeriod.Substring(1, 1); |
| | | // } |
| | | //} |
| | | |
| | | |
| | | //çææ¡ç 忥 |
| | |
| | | //if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") |
| | | //{ |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | TM = HMaterNumber + LSH2 + sYear + sPeriod + sDay ; |
| | | //T/*M*/ = HMaterNumber + LSH2 + sYear + sPeriod + sDay; |
| | | TM = LSH2 + sYear + sPeriod + sDay; |
| | | //} |
| | | |
| | | if (i + 1 > grdSub.Rows.Count) |
| | |
| | | grdMain.Rows[i].Cells[HMainIDCol].Value = oTable.Rows[0]["hmainid"].ToString(); |
| | | grdMain.Rows[i].Cells[HSubIDCol].Value = oTable.Rows[0]["hsubid"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillNoCol].Value = oTable.Rows[0]["åæ®å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HSourceBillNoCol].Value = oTable.Rows[0]["åæ®å·"].ToString(); |
| | | grdMain.Rows[i].Cells[HBillTypeCol].Value = oTable.Rows[0]["HBillType"].ToString(); |
| | | grdMain.Rows[i].Cells[HDateCol].Value = oTable.Rows[0]["æ¥æ"].ToString(); //忥 æ¶æåæ®æ¥æ |
| | | grdMain.Rows[i].Cells[HShowDateCol].Value = dtpHDate.Value.ToShortDateString(); |
| | |
| | | grdMain.Rows[i].Cells[HCusNumberCol].Value = oTable.Rows[0]["客æ·ä»£ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HCusNameCol].Value = oTable.Rows[0]["客æ·"].ToString(); |
| | | grdMain.Rows[i].Cells[HCusTypeCol].Value = oTable.Rows[0]["客æ·åå·"].ToString(); |
| | | grdMain.Rows[i].Cells[HPinfanBarCodeCol].Value = oTable.Rows[0]["HPinfanBarCode"].ToString(); |
| | | grdMain.Rows[i].Cells[HPinfanCol].Value = oTable.Rows[0]["HPinfan"].ToString(); |
| | | //grdMain.Rows[i].Cells[HSourceIDCol].Value = oTable.Rows[0]["HSourceID"].ToString(); |
| | | //grdMain.Rows[i].Cells[HSourceNumberCol].Value = oTable.Rows[0]["ç产线代ç "].ToString(); |
| | | grdMain.Rows[i].Cells[HSourceNameCol].Value = oTable.Rows[0]["ç产线"].ToString(); |
| | | grdMain.Rows[i].Cells[HEndDateCol].Value = oTable.Rows[0]["计åå®å·¥æ¥æ"].ToString();//忥 ç产订å å¤±ææ¥æ |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å" && CampanyName == "åæ¥ç§æ") |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å" ) |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" && CampanyName == "åæ¥ç§æ") |
| | | else if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" |
| | | || cmbHBarCodeType.Text == "ä»ªå¨æåæ¡ç è§å" |
| | | || cmbHBarCodeType.Text == "è¯åæåæ¡ç è§å") |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = "1"; |
| | | } |
| | |
| | | grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["计éåä½"].ToString(); |
| | | grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["夿³¨"].ToString(); |
| | | grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["计åè·è¸ªå·"].ToString(); |
| | | if (cmbHBarCodeType.Text == "æ¹æ¬¡æ¡ç " && CampanyName == "åæ¥ç§æ") |
| | | if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["æªçææ¡ç æ°é"]); |
| | | } |
| | | else if (cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å") |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = "1"; |
| | | } |
| | | else |
| | | { |
| | | grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["æå°å
è£
æ°"].ToString(); |
| | |
| | | ",HMaterID,HMaterNumber,HMouldType,HUnitID" + |
| | | ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" + |
| | | ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" + |
| | | ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" + |
| | | ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" + |
| | | ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | |
| | | "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID + |
| | | ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" + |
| | | "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+ |
| | | "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + |
| | | "','" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+ |
| | | "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID+"','"+ HNowSupTypeID+"'"+ |
| | | ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+ |
| | | ") "); |
| | | |
| | | |
| | |
| | | ",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+ |
| | | ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() + |
| | | ",HMouldOWNER='" + HMouldOWNER + "'" + |
| | | ",HNowSupID="+HNowSupID.ToString()+ |
| | | ",HNowSupTypeID="+HNowSupTypeID.ToString()+ |
| | | ",HProdWeight=" + HProdWeight.ToString() + |
| | | " where HInterID=" + HInterID.ToString()); |
| | | |
| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_PurchaseReturnList " + sWhere, "h_v_Kf_PurchaseReturnList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_PurchaseReturnList " , "h_v_Kf_PurchaseReturnList"); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// ç¼è¾é¡µé¢è¿å产åå
¥åºæ¡ç 临æ¶è¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetHBarCodeShowBillSub")] |
| | | [HttpGet] |
| | | public object GetHBarCodeShowBillSub(long HInterID, long HMaterID, Int64 HAuxPropID, string HMTONo, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, string HBatchNo, Int64 HSourceInterID, Int64 HSourceEntryID, string sBillType, string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = webserver.GetBarCode_Temp(HInterID, HMaterID, HAuxPropID, HMTONo, HWhID, HSPID, HSCWhID, HSCSPID, HBatchNo, HSourceInterID, HSourceEntryID, sBillType, sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | //ç¹å»ç¼è¾ å
¬ç¨çªä½å 餿¹æ³ |
| | | [Route("Kf_BarCodeEditDlg/DeltetBill")] |
| | | [HttpGet] |
| | | public object DeltetBill(long HInterID,string HBarCode,string HBillType) |
| | | { |
| | | string sErrMsg = string.Empty; |
| | | try |
| | | { |
| | | if (webserver.set_DelPonderationBillMain_Temp_BarCode(HInterID,HBarCode, HBillType, ref sErrMsg)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è¿å产åå
¥åºæ«ç æç» |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | |
| | | [Route("ProductIn/Delete_Json")] |
| | | [HttpGet] |
| | | public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType) |
| | | public object Delete_Json(long HInterID,string HBillNo,string HBillType,string HBarCode) |
| | | { |
| | | string sErrMsg = string.Empty; |
| | | try |
| | | { |
| | | if (webserver.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, sHBillType, ref sErrMsg)) |
| | | if (webserver.DeleteBill(HInterID, HBillNo, HBillType, HBarCode, ref sErrMsg)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼"; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception) |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼"; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = Sc_GetProductInBill(sWhere); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductionReturnList where 1=1 order by æ¥æ desc", "h_v_IF_ProductionReturnList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by æ¥æ desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetProductInBill(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProductionReturnList order by æ¥æ desc", "h_v_IF_ProductionReturnList"); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by æ¥æ desc", "h_v_Kf_OtherOutBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Kf_OtherOutBillList where 1 = 1 " + sWhere+ " order by æ¥æ desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherOutBillList"); |
| | | } |
| | | |
| | | ds = Sc_GetOtherOutBillList(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetOtherOutBillList(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_OtherOutBillList order by æ¥æ desc", "h_v_Kf_OtherOutBillList"); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | |
| | | ds = Sc_GetProductInBill(sWhere); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by æ¥æ desc", "h_v_IF_ProductInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by æ¥æ desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///产åå
¥åºåå é¤åè½ |
| | | /// </summary> |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetProductInBill(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_ProductInBillList order by æ¥æ desc", "h_v_IF_ProductInBillList"); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | |
| | | ds = Sc_GetOtherInBill(sWhere); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by æ¥æ desc", "h_v_Kf_OtherInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by æ¥æ desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherInBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetOtherInBill(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_OtherInBillList order by æ¥æ desc ", "h_v_Kf_OtherInBillList"); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// å§å¤å
¥åºåå表 |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = Sc_GetEntrustInBill(sWhere); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_EntrustInBillList where 1=1", "h_v_Kf_EntrustInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Kf_EntrustInBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetEntrustInBill(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Kf_EntrustInBillList ", "h_v_Kf_EntrustInBillList"); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | //æµè¯ä¸ç¨æ¥å£ |
| | | [Route("LookingFor/Test")] |
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 |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by æ¥æ desc", "h_v_IF_MateOutBackBillList"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by æ¥æ desc", "h_v_IF_MateOutBackBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_MateOutBackBillList " + sWhere+ " order by æ¥æ desc"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_IF_MateOutBackBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
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 |
| | | { |
| | | } |
| | | } |
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_StepFoldinBillController : 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_StepFoldinBill/GetStepFoldinBillList")] |
| | | [HttpGet] |
| | | public object GetStepFoldinBillList(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | | //夿æé(ç¥) |
| | | |
| | | string sql1 = string.Format("select * from h_v_Kf_MoveStockStepInBillList where (è°å
¥ç»ç»='" + Organization + "')"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCn.RunProcReturn(sql1 + " order by æ¥æ desc", "h_v_Kf_MoveStockStepInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by æ¥æ desc"; |
| | | ds = oCn.RunProcReturn(sql, "h_v_Kf_MoveStockStepInBillList"); |
| | | } |
| | | 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 |
| | | } |
| | | } |
| | |
| | | ScanLineCode list = js.Deserialize<ScanLineCode>(msg.ToString()); //å°jsonæ°æ®è½¬å为对象类åå¹¶èµå¼ç»list |
| | | if (list.billno != "" && list.billno != null) //ä»»å¡åå·ï¼éå¿
é¡»ï¼éç©ºåæ ¡éªbarcodesébarcodeæ¯å¦ç±æ¤ä»»å¡åå¶ä½çæç |
| | | { |
| | | ds = oCN.RunProcReturn("Select HBarCode barcode from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"' Order by HItemID ", "Gy_BarCodeBill"); |
| | | ds = oCN.RunProcReturn("Select HBarCode barcode,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType from Gy_BarCodeBill where HSourceBillNo='" + list.billno.ToString().Trim()+"' Order by HItemID ", "Gy_BarCodeBill"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.status = -1; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill"); |
| | | //夿æ¯å¦å
¥åº |
| | | ds = oCN.RunProcReturn("select * from Sc_ScanLineInStock where HBarCode_Pack='" + packagebarcode + "'", "Sc_ScanLineInStock"); |
| | | if (ds!= null && ds.Tables[0].Rows.Count>0) |
| | | { |
| | | objJsonResult.status = -1; |
| | | objJsonResult.msg = "该箱æ¡ç å·²å
¥åºä¸å
è®¸åæ¶!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("Select 1 from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "'", "Gy_BarCodeBill"); |
| | | if (ds == null && ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.status = -1; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("Select * from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill"); |
| | | ds = oCN.RunProcReturn("Select 1 from Gy_BarCodeBill where HBarCode='" + packagebarcode.ToString().Trim() + "' and HStopflag='1'", "Gy_BarCodeBill"); |
| | | if (ds != null && ds.Tables[0].Rows.Count>0) |
| | | { |
| | | objJsonResult.status = -1; |
| | |
| | | |
| | | // |
| | | oCN.BeginTran(); |
| | | //å é¤SUM主表 |
| | | oCN.RunProc("Delete From Sc_PackUnionBillSub_Sum where HBarCode_Pack='" + packagebarcode.ToString() + "'"); |
| | | //å é¤å表 |
| | | oCN.RunProc("Delete From Sc_PackUnionBillSub where HBarCode_Pack='"+ packagebarcode.ToString() + "'"); |
| | | //å é¤ä¸»è¡¨ |
| | | oCN.RunProc("Delete From Sc_PackUnionBillMain where HBarCode_Pack='" + packagebarcode.ToString() + "'"); |
| | | //ä½åºæ¡ç æ¡£æ¡è¡¨ |
| | | oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode .ToString()+ "'"); |
| | | oCN.RunProc("Update Gy_BarCodeBill set HStopflag='1' where HBarCode='"+ packagebarcode.ToString()+ "'"); |
| | | |
| | | oCN.Commit(); |
| | | |
| | |
| | | left join Gy_Customer c1 on m.HNowSupID=c1.HItemID |
| | | left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID |
| | | left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID |
| | | where k.HBillType='3822' and " + sWhere); |
| | | where " + sWhere); |
| | | } |
| | | else |
| | | { |
| | |
| | | left join Gy_Customer c1 on m.HNowSupID=c1.HItemID |
| | | left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID |
| | | left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID |
| | | where k.HBillType='3822' and " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")"); |
| | | where " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")"); |
| | | } |
| | | ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp"); |
| | | list.Add(ds.Tables[0]); |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region çç¹è®°å½å表 |
| | | [Route("Gy_StockCheckItemBill/Get_MouldStockBillMainTemp")] |
| | | [HttpGet] |
| | | public object Get_MouldStockBillMainTemp(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = MouldStockBillMainTemp(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 MouldStockBillMainTemp(string sWhere) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Gy_MouldStockBillMainTempList where 1=1 "); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by å¶åæ¥æ desc", "h_v_Gy_MouldStockBillMainTempList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by å¶åæ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Gy_MouldStockBillMainTempList"); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [çç¹æ¹æ¡å é¤åè½] |
| | | [Route("Gy_StockCheckItemBill/set_DeleteBill_Temp")] |
| | | [HttpGet] |
| | | public object set_DeleteBill_Temp(string HItemID) |
| | | { |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HItemID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCn.RunProcReturn("select * from Sc_MouldStockBillMain_Temp where HItemID=" + lngBillKey, "Sc_MouldStockBillMain_Temp"); |
| | | if (ds != null) |
| | | { |
| | | oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HItemID=" + lngBillKey); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®ä¸åå¨ï¼è¯·æ¥çæ¯å¦éå¤å é¤"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region çç¹åæå®¡æ ¸ |
| | | #region è°æ¨âç´æ¥è°æ¨ |
| | | [Route("Gy_StockCheckItemBill/MakeProdMove")] |
| | | [Route("Gy_StockCheckItemBill/MakeProdMove")] |
| | | [HttpGet] |
| | | public object MakeProdMove(string HBarCode, string user, string userID) |
| | | { |
| | |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | string ww = ""; |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | |
| | | " values(" + omodel.HYear + "," + omodel.HPeriod + ",'" + this.BillType + "'," + omodel.HInterID + "" + |
| | | ",'" + omodel.HDate + "','" + omodel.HBillNo.ToString() + "'," + omodel.HBillStatus + ",'" + omodel.HRemark + "'," + omodel.HICMOInterID + "" + |
| | | ",'" + omodel.HICMOBillNo.ToString() + "','" + omodel.HBarCode_Pack.ToString() + "'," + omodel.HMaterID + "," + omodel.HUnitID + "" + |
| | | ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'" + |
| | | ",'Admin','" + DBUtility.ClsPub.GetServerDate(-1) + "'" + |
| | | ") "); |
| | | ////æå
¥å表 |
| | | string HSourceInterID = "0"; |
| | |
| | | //Int64 ZHInterID = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("insert into Gy_BarCodeBill(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HBatchNo,HMakeDate " + |
| | | ",HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HUseFlag, HStopflag, HSupID, HGroupID, HPrintQty)" + |
| | | "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', 'ç®±å·æ¡ç ', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" + |
| | | "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', 'æçæ¡ç ', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" + |
| | | ", '" + HSourceInterID + "', '" + HSourceEntryID + "', '" + HSourceBillNo + "', '" + HSourceBillType + "', 1, 0, 0, 0, 0)"); |
| | | oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_SumSubBill2 " + omodel.HInterID + ",'"+ omodel.HBillNo.ToString() + "','"+ this.BillType + "','Admin'", "h_p_JIT_MESBeginWorkBill_SaveCtrl"); |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | <Compile Include="Controllers\SCGL\Sc_ProductionReturnBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" /> |
| | | <Compile Include="Controllers\Sc_ProcessMangementController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\å§å¤ç¨æ\WW_PPBomBillController.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" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Gy_ClassTimePrjBillController.cs" /> |
| | |
| | | <Compile Include="DLL\ClsSc_MouldOtherInBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_MouldMoveStockStepOutBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_PackUnionBill.cs" /> |
| | | <Compile Include="DLL\ClsWW_PPBomBill.cs" /> |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsPay_GroupBalBill.cs" /> |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsGy_GroupEmpBill.cs" /> |
| | | <Compile Include="DLL\å·¥èµç®¡ç\ClsPay_WorkTimesBill.cs" /> |
| | |
| | | <Compile Include="Models\ClsSc_PackUnionBillSub.cs" /> |
| | | <Compile Include="Models\ClsSc_ProcessReportMain.cs" /> |
| | | <Compile Include="Models\ClsSc_ProcessReportSub.cs" /> |
| | | <Compile Include="Models\ClsWW_PPBomBillMain.cs" /> |
| | | <Compile Include="Models\ClsWW_PPBomBillSub.cs" /> |
| | | <Compile Include="Models\GetWeekList.cs" /> |
| | | <Compile Include="Models\jsonScanline.cs" /> |
| | | <Compile Include="Models\ScanLineCode.cs" /> |
| | |
| | | <Folder Include="Views\Cg_PurchaseReturn\" /> |
| | | <Folder Include="Views\Gy_EquipType\" /> |
| | | <Folder Include="Views\Kf_ICStockBillMain\" /> |
| | | <Folder Include="Views\Kf_MoveStockRequestBill\" /> |
| | | <Folder Include="Views\kf_StepFoldinBill\" /> |
| | | <Folder Include="Views\Kf_StepFoldOutBill\" /> |
| | | <Folder Include="Views\MoveStockBill\" /> |
| | | <Folder Include="Views\ProductionReturnBill\" /> |
| | | <Folder Include="Views\QC_Management\" /> |
| | |
| | | return false; |
| | | } |
| | | } |
| | | //å é¤åæ®ä¸´æ¶è¡¨ä¿¡æ¯ |
| | | public bool DeleteBill(Int64 sHInterID,string HBillNo,string HBillType,string HBarCode, ref string sErrMsg) |
| | | { |
| | | DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | | if (dal.DeleteBill(sHInterID, HBillNo, HBillType, HBarCode)) |
| | | { |
| | | sErrMsg = "å 餿åï¼"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "å é¤å¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //public Model.ClsGy_BarCodeBill_WMS_Model_View get_InfoByBarCode_Source(string sBarCode, Int64 sInterID, ref bool sBool, ref string sErrMsg) |
| | | //{ |
| | | // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | |
| | | // return null; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region å¤è´å
¥åº |
| | |
| | | } |
| | | #endregion |
| | | |
| | | //è¿åæ¡ç 临æ¶è¡¨ |
| | | /// <summary> |
| | | /// è¿åæ¡ç 临æ¶è¡¨ |
| | | /// </summary> |
| | | public DataSet GetBarCode_Temp(long HInterID, long HMaterID, Int64 HAuxPropID, string HMTONo, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, string HBatchNo, Int64 HSourceInterID, Int64 HSourceEntryID, string sBillType, string sWhere) |
| | | { |
| | | DAL.ClsKF_PonderationBillMain_Temp_View dal = new DAL.ClsKF_PonderationBillMain_Temp_View(); |
| | | return dal.GetBarCodeByID_View(HInterID, sBillType, HMaterID, HAuxPropID, HMTONo, HWhID, HSPID, HSCWhID, HSCSPID, HBatchNo, HSourceInterID, HSourceEntryID, sWhere); |
| | | } |
| | | |
| | | //å é¤åºå
¥åºæ¡ç 临æ¶è¡¨(æ ¹æ®æ¡ç ) |
| | | public bool set_DelPonderationBillMain_Temp_BarCode(long HInterID, string sBarCode, string sHBillType, ref string sErrMsg) |
| | | { |
| | | DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | | if (dal.DeleteByBarCode(HInterID, sBarCode, sHBillType)) |
| | | { |
| | | sErrMsg = "å 餿åï¼"; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "å é¤å¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è¿åæ«ç æç»ä¿¡æ¯ |
| | | /// </summary> |