| | |
| | | |
| | | #endregion |
| | | |
| | | #region å§å¤éæ ä¸ä¼ çå |
| | | |
| | | #region å§å¤éæ æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// å§å¤éææ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveEntrustOutBackBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveEntrustOutBackBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1238"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveEntrustOutBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å§å¤éææ ¡éªå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region çäº§ç»æå ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region æ ¹æ®snç 寻æ¾å¯¹åºçä¸ç®±ç |
| | | [Route("WEBSController/getMiddleCodeBySn")] |
| | | [HttpGet] |
| | | public object getMiddleCodeBySn(string HBarCode,int HStockOrgID) |
| | | { |
| | | DataSet dss = oCn.RunProcReturn("select * from Gy_CaseCodeRelation where HBarCode='"+ HBarCode + "'", "Gy_CaseCodeRelation"); |
| | | |
| | | if (dss.Tables[0].Rows[0]["HCaseCode"].ToString() == "" || dss == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¾å°snç æå¯¹åºçä¸ç®±ç "; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = dss.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | |
| | | { |
| | | try |
| | | { |
| | | string sErrMsg = ""; |
| | | oSystemParameter.ShowBill(ref sErrMsg); |
| | | // åèå®¢æ· |
| | | if(oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | HBarCode = HBarCode.Split('-')[0]; |
| | | } |
| | | |
| | | // Mode = 1 表示 æ«ç æ¨¡å¼ Mode = 2 表示 é忍¡å¼ |
| | | if(Mode == 1) |
| | | if (Mode == 1) |
| | | { |
| | | //æ«ç 模å¼éè¦è§£ææ¡ç è·åHInterIDåHEntryID |
| | | ds = oCn.RunProcReturn($@" |
| | | exec h_p_CheckBillBarCode_AnalysisBarcode |
| | | @HBillType={HBillType}, |
| | | @HSourceBillType={HSourceBillType}, |
| | | @HBarCode={HBarCode}, |
| | | @HBarCode='{HBarCode}', |
| | | @user = '{user}' |
| | | ", "h_p_CheckBillBarCode_AnalysisBarcode"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | if (ds is null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where å°è½¦='" + CarBarCode.ToString() + "'" , "GetMaterMesByCarBarCode"); |
| | | ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where HQty>=0 and å°è½¦='" + CarBarCode.ToString() + "'" , "GetMaterMesByCarBarCode"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [åæ ·å] è·åæªä¸æ¨ææ£éªåçåæ ·åå表 |
| | | [Route("WEBSController/AwaitCheckSampleBillList")] |
| | | [HttpGet] |
| | | public Object AwaitCheckSampleBillList(string user) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn($@" |
| | | exec h_p_AwaitCheckSampleBillList @user={user} |
| | | ", "h_p_CheckBillBarCode_CheckItem"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "successï¼"; |
| | | objJsonResult.data = ds.Tables; |
| | | objJsonResult.list = columnNameList; |
| | | |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æåæ®æ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |