| | |
| | | public WebServer webserver = new WebServer(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | private WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public Int64 HInterID = 0; //å
ç |
| | |
| | | string HSupNumber = ""; // ä¾åºåç¼ç |
| | | string HPOInStockBillNo = ""; // æ¶æéç¥åå· |
| | | |
| | | string HPOOrderBillNo = ""; // éè´è®¢åå· |
| | | |
| | | DataSet Ds; |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | |
| | | |
| | | HPOInStockBillNo = DBUtility.ClsPub.isStrNull(ordrlist[j].HBillNo); // æ¶æéç¥åå· å
´è¾¾æ¡ç |
| | | HSupNumber = DBUtility.ClsPub.isStrNull(ordrlist[j].HSupNumber);// ä¾åºåç¼å· å
´è¾¾æ¡ç |
| | | |
| | | HPOOrderBillNo = DBUtility.ClsPub.isStrNull(ordrlist[j].HBillNo); // éè´è®¢åå· å°å«çµå¨ |
| | | // |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | |
| | | Ds = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 3; // ä¸ä½æµæ°´å· |
| | | } |
| | | else if (CampanyName.Contains("å°å«")) |
| | | { |
| | | // å°å«çµå¨ |
| | | // æ¡ç åç¼ = åæ®å· + ç©æç¼ç + æ¹æ¬¡å· |
| | | sTMNumber = HPOOrderBillNo + "@" + HMaterNumber + "@" + HBatchNo; |
| | | Ds = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else //éç¨æ¹æ³ |
| | | { |
| | |
| | | #region [è·åæ ç¾æå°æä»¤ CPCLæä»¤] |
| | | [Route("Sc_BarCode/Get_BarCodePrintCode_CPCL")] |
| | | [HttpGet] |
| | | public object Get_BarCodePrintCode_CPCL(string HOrginationName, string HViewName, string HBillSubType, int HInterID, int HItemID) |
| | | public object Get_BarCodePrintCode_CPCL(string HOrginationName, string HBillSubType, int HInterID, int HItemID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_getHBarCodePrintCode_CPCL N'" + HOrginationName + "'" + |
| | | ",N'" + HViewName + "',N'" + HBillSubType + "'," + HInterID + "," + HItemID, "h_p_getHBarCodePrintCode_CPCL"); |
| | | ",N'" + HBillSubType + "'," + HInterID + "," + HItemID, "h_p_getHBarCodePrintCode_CPCL"); |
| | | if((int)ds.Tables[0].Rows[0]["resultType"] == 1) |
| | | { |
| | | string resultMesg = ds.Tables[0].Rows[0]["payload"].ToString().Replace("\\r\\n", "\r\n"); |
| | |
| | | #endregion |
| | | |
| | | #region [æ¡ç çææ¥å£_å°å«ééç ] |
| | | [Route("Sc_BarCode/GetSNByICMO_XW")] |
| | | [Route("Sc_BarCode/SaveSNByICMO_XW")] |
| | | [HttpGet] |
| | | public object GetSNByICMO(String HBillNo,int HSeq) |
| | | public object SaveSNByICMO_XW(String HBillNo,string HSN, int HBeginNo, int HEndNo, int HCount,string HMachineCode) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_WMS_GetSNByICMO_XW '" + HBillNo + "', "+ HSeq, "h_p_WMS_GetSNByICMO_XW"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | if(oWebs.GetWebAPIToLocal_ICMO(HBillNo, "3710", "admin", ref DBUtility.ClsPub.sErrInfo)==false) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-1-037]æ¡ç çææåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-020]åæ®åæ¥å¤±è´¥è¯·è系管çå,"+ DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-020]没æè¿åä»»ä½ç»æ,æ¡ç çæå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | ds = oCN.RunProcReturn("exec h_p_WMS_SaveSNByICMO_XW '" + @HBillNo + "', " + HSN +","+HBeginNo+","+HEndNo+","+HCount+",'"+HMachineCode+"'", "h_p_WMS_SaveSNByICMO_XW"); |
| | | |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-020]没æè¿åä»»ä½ç»æ,æ¡ç ä¿å失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-020]æ¡ç ç»å®å¤±è´¥ï¼"+ ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-1-037]æ¡ç çææåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |