| | |
| | | string ComputerName = SystemInformation.ComputerName; //设å¤åç§° |
| | | |
| | | |
| | | WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain(); |
| | | |
| | | |
| | | #region å
¬ç¨æ¹æ³ |
| | | |
| | | #region è´¦å·ç»å
¥ |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region å
¶ä»å
¥åº æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// å
¶ä»å
¥åºæ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveOtherInBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveOtherInBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string sMainStr = sArray[0].ToString(); //åæ®æ°æ® |
| | | string HSourceBarCodeCtl = sArray[1].ToString(); //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getOtherInBillMainByJson(sMainStr); |
| | | |
| | | WebAPI.WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1203"; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | //ååæ®ä¸ºæ«ç çæï¼å¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ |
| | | if (HSourceBarCodeCtl == "Y") |
| | | { |
| | | if (oWebs.set_SaveOtherInBill_CLD_BillCheck_Verify(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; |
| | | } |
| | | } |
| | | //å忮鿫ç çæ |
| | | else |
| | | { |
| | | if (oWebs.set_SaveOtherInBill_CLD_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 颿åºåº ä¸ä¼ çå |
| | |
| | | FentityModel.Add("F_paez_BaseQty", item["å®åæ°é"].ToString()); //å®åæ°é |
| | | FentityModel.Add("F_paez_Qty1", item["宿¶æ°é"].ToString()); //宿¶æ°é |
| | | FentityModel.Add("F_paez_Text2", item["ç®±å·"].ToString()); //ç®±å· ???ä¸è½ä¸ºæ°å |
| | | FentityModel.Add("FLOT", new JObject() { ["FNumber"] = item["æ¹å·"].ToString() }); // è¾
计éåä½ä»£ç |
| | | |
| | | |
| | | //JArray Fentity2 = new JArray(); |
| | |
| | | //ä»é
ç½®æä»¶è·å CLOUDç½åãè´¦å¥ä¿¡æ¯ãç»å½ç¨æ·ãç»å½å¯ç |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | oCn.RollBack(); |
| | | //oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
¥åºç³è¯·å忥è·åç»å½è´¦å·å¯ç 失败ï¼"; |
| | |
| | | if (isSuccess == 0) |
| | | { |
| | | LogService.Write("å
¶ä»å
¥åº,ç»å½éè¶å¤±è´¥ï¼"); |
| | | oCn.RollBack(); |
| | | //oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç»å½éè¶å¤±è´¥ï¼"; |
| | |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("å
¥åºç³è¯·å忥éè¶äºå¤±è´¥ï¼" + JsonConvert.SerializeObject(jsonRoot)); |
| | | oCn.RollBack(); |
| | | //oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
¥åºç³è¯·å忥éè¶äºå¤±è´¥ï¼åå·:" + HSourceBillNo_TB + result + jsonRoot; |
| | |
| | | |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCn.RollBack(); |
| | | //oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
¥åºç³è¯·ååå·:" + ",æäº¤å¤±è´¥" + result1; |
| | |
| | | |
| | | if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCn.RollBack(); |
| | | //oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
¥åºç³è¯·ååå·:" + ",å®¡æ ¸å¤±è´¥" + result2; |
| | |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | string sSourceBarCodeCtl = "N"; //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y") |
| | | |
| | | #region ç³»ç»åæ°è·å |
| | | //éè´å
¥åºå |
| | | if (HBillType == "1201") |
| | | { |
| | | //éå®åºåºå |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç产å
¥åºå |
| | | if (HBillType == "1202") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //å
¶ä»å
¥åºå |
| | | if (HBillType == "1203") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //颿åºåºå |
| | | else if (HBillType == "1204") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //éå®åºåºå |
| | | else if (HBillType == "1205") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //å
¶ä»åºåºå |
| | | else if (HBillType == "1206") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //å§å¤é¢æå |
| | | else if (HBillType == "1211") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç产补æå |
| | | else if (HBillType == "1254") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //å§å¤è¡¥æå |
| | | else if (HBillType == "1255") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç´æ¥è°æ¨å |
| | | else if (HBillType == "1207") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region è¿ååæ®åè¡¨ä¿¡æ¯ 20241114 |
| | | |
| | | /// <summary> |
| | | /// è¿ååæ®åè¡¨ä¿¡æ¯ æ ¡éªæ¨¡å¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_New_Json")] |
| | | [HttpGet] |
| | | public object GetKf_PonderationBillMain_Temp_BillCheck_New_Json(long HInterID, string HBillType, string sWhere, string HSourceBarCodeCtl) |
| | | { |
| | | try |
| | | { |
| | | //ååæ®ä¸ºæ«ç çæï¼å¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ |
| | | if (HSourceBarCodeCtl == "Y") |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_Verify " + HInterID.ToString() + ",'" + HBillType + "','" + sWhere + "'", "h_p_KF_PonderationBillMain_TempList_Verify"); |
| | | } |
| | | //å忮鿫ç çæ |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_BillCheck " + HInterID.ToString() + ",'" + HBillType + "','" + sWhere + "'", "h_p_KF_PonderationBillMain_TempList_BillCheck"); |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = new |
| | | { |
| | | Materlist = ds.Tables[0], //è¿åç©ææç»å表信æ¯ï¼0ï¼ |
| | | BarCodeDetailslist = ds.Tables[1], //è¿åå½åææ«ææ¡ç æç»ä¿¡æ¯ï¼5ï¼ |
| | | }; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åå表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region è¿ååæ®åè¡¨ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region æ ¡éªæ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ 20241114 |
| | | |
| | | /// <summary> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DeleteBarCodeByEntryID_BillCheck_New_Json")] |
| | | [HttpGet] |
| | | public object set_DeleteBarCodeByEntryID_BillCheck_New_Json(long HInterID, string HBillType, long HSourceInterID, long HSourceEntryID, string HSourceBarCodeCtl) |
| | | { |
| | | //ååæ®ä¸ºæ«ç çæï¼å¯¹åæ«æçæ¡ç è¿è¡æ ¸å¯¹ |
| | | if (HSourceBarCodeCtl == "Y") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ¡éªæ¡ç ï¼æ éå é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å忮鿫ç çæ |
| | | else |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å 餿éè¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |