| | |
| | | public 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(); |
| | | DBUtility.ClsXt_BaseBill oBaseBill = new DBUtility.ClsXt_BaseBill(); |
| | | string ComputerName = SystemInformation.ComputerName; //设å¤åç§° |
| | | |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetEquipList_Json")] |
| | | [HttpGet] |
| | | public object GetEquipList_Json(string Equip) |
| | | public object GetEquipList_Json(string Equip,int HCenterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName from h_v_Gy_EquipFileBill where HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%'", "h_v_Gy_EquipFileBill"); |
| | | if (HCenterID !=0) |
| | | { |
| | | ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName,HCenterID from h_v_Gy_EquipFileBill where HCenterID='"+HCenterID+"' and ( HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%')", "h_v_Gy_EquipFileBill"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName from h_v_Gy_EquipFileBill where HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%'", "h_v_Gy_EquipFileBill"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_TempList_New(HBillType, HMaker, HStockOrgID); |
| | | 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 = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·ååæ®ç¼åå表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç¼åå表çé¢ï¼è¿åç¼ååè¡¨ä¿¡æ¯ 20250513 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_PonderationBillMain_TempList_Other_Json")] |
| | | [HttpGet] |
| | | public object GetKf_PonderationBillMain_TempList_Other_Json(string HBillType, string HMaker, Int64 HStockOrgID, string HSubBillType) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_Other '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + HSubBillType + "'", "h_p_KF_GetPonderationBillMain_TempList_Other"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ç´æ¥è°æ¨ æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// ç´æ¥è°æ¨æ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveMoveStockBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMoveStockBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getMoveStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1207"; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveMoveStockBill_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 |
| | | |
| | | #region æ¢æè°æ¨å |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region éå®éè´§ ä¸ä¼ çå |
| | | |
| | | #region éå®éè´§ æ°å¢æ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// éå®éè´§æ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveSellOutBackBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveSellOutBackBill_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); |
| | | WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | string sSourceType = lsmain[0].HMainSourceBillType; |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = lsmain[0].HBillType; |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | websLsmain.HWHID = lsmain[0].HWHID; |
| | | websLsmain.HSCWHID = lsmain[0].HSCWHID; |
| | | websLsmain.HSupID = lsmain[0].HSupID; |
| | | websLsmain.HKeeperID = lsmain[0].HKeeperID; |
| | | websLsmain.HSecManagerID = lsmain[0].HSecManagerID; |
| | | websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HManagerID = lsmain[0].HManagerID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HExplanation = lsmain[0].HExplanation; |
| | | websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo; |
| | | websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag; |
| | | websLsmain.HBillSubType = lsmain[0].HBillSubType; |
| | | if (lsmain[0].HMainSourceBillType == "1403") |
| | | { |
| | | websLsmain.HMainSourceBillType = "éè´§éç¥å"; |
| | | } |
| | | else if (lsmain[0].HMainSourceBillType == "1401") |
| | | { |
| | | websLsmain.HMainSourceBillType = "éå®è®¢å"; |
| | | } |
| | | else |
| | | { |
| | | websLsmain.HMainSourceBillType = "æå·¥å½å
¥"; |
| | | } |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HBillerID = lsmain[0].HBillerID; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveSellOutBackBill_New(websLsmain, sSourceType, 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> |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "䏿é²éåä¸ä¼ 失败ï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 车é´ä¸æ¶å ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | | /// 车é´ä¸æ¶åæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveMaterialUpperBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMaterialUpperBill_Json([FromBody] JObject oMain) |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | string sMainStr = "[" + msg1.ToString() + "]"; |
| | | List<Model.ClsKf_WorkShopICStockBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_WorkShopICStockBillMain>>(sMainStr); |
| | | |
| | | //忮巿¯å¦éå¤ |
| | | if (oBaseBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCn.BeginTran(); |
| | | //çæåæ® |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_WorkShopICStockBillMain " + |
| | | "(HInterID,HBillNo,HBillType,HBillSubType,HDate,HRemark" + |
| | | ",HYear,HPeriod,HMaker,HMakeDate,HStockOrgID" + |
| | | ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" + |
| | | ",HMangerID,HSecManagerID,HKeeperID,HDeptID" + |
| | | ") " + |
| | | " values(" + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillNo + "','" + mainList[0].HBillType + "','" + mainList[0].HBillSubType + "','" + mainList[0].HDate.ToShortDateString() + "','" + mainList[0].HRemark + "'" + |
| | | ", " + sYear.ToString() + "," + sPeriod.ToString() + ",'" + mainList[0].HMaker + "',getdate()," + mainList[0].HSTOCKORGID.ToString() + |
| | | ",'" + mainList[0].HMainSourceBillType + "'," + mainList[0].HMainSourceInterID.ToString() + "," + mainList[0].HMainSourceEntryID.ToString() + ",'" + mainList[0].HMainSourceBillNo + "'" + |
| | | ", " + mainList[0].HMangerID.ToString() + "," + mainList[0].HSecManagerID.ToString() + "," + mainList[0].HKeeperID.ToString() + "," + mainList[0].HDeptID.ToString() + |
| | | ") "); |
| | | //æå
¥å表 |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_MaterialUpperBillSub_Insert " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillNo + "'", "h_p_Kf_MaterialUpperBillSub_Insert"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¿å失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["s"]) != "OK") |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["s"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //æ´æ°è½¦é´ç©æåºå |
| | | oCn.RunProc("EXEC h_p_WMS_UPDateICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "'"); |
| | | //æ´æ°è½¦é´æ¡ç åºå |
| | | oCn.RunProc("EXEC h_p_WMS_UPDateBarCodeICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "',1"); |
| | | oCn.Commit(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + mainList[0].HBillNo + " æ°å¢æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "车é´ä¸æ¶åä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 车é´ä¸æ¶å ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | | /// 车é´ä¸æ¶åæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveMaterialLowerBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMaterialLowerBill_Json([FromBody] JObject oMain) |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | string sMainStr = "[" + msg1.ToString() + "]"; |
| | | List<Model.ClsKf_WorkShopICStockBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_WorkShopICStockBillMain>>(sMainStr); |
| | | |
| | | //忮巿¯å¦éå¤ |
| | | if (oBaseBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCn.BeginTran(); |
| | | //çæåæ® |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_WorkShopICStockBillMain " + |
| | | "(HInterID,HBillNo,HBillType,HBillSubType,HDate,HRemark" + |
| | | ",HYear,HPeriod,HMaker,HMakeDate,HStockOrgID" + |
| | | ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" + |
| | | ",HMangerID,HSecManagerID,HKeeperID,HDeptID" + |
| | | ") " + |
| | | " values(" + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillNo + "','" + mainList[0].HBillType + "','" + mainList[0].HBillSubType + "','" + mainList[0].HDate.ToShortDateString() + "','" + mainList[0].HRemark + "'" + |
| | | ", " + sYear.ToString() + "," + sPeriod.ToString() + ",'" + mainList[0].HMaker + "',getdate()," + mainList[0].HSTOCKORGID.ToString() + |
| | | ",'" + mainList[0].HMainSourceBillType + "'," + mainList[0].HMainSourceInterID.ToString() + "," + mainList[0].HMainSourceEntryID.ToString() + ",'" + mainList[0].HMainSourceBillNo + "'" + |
| | | ", " + mainList[0].HMangerID.ToString() + "," + mainList[0].HSecManagerID.ToString() + "," + mainList[0].HKeeperID.ToString() + "," + mainList[0].HDeptID.ToString() + |
| | | ") "); |
| | | //æå
¥å表 |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_MaterialLowerBillSub_Insert " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillNo + "'", "h_p_Kf_MaterialLowerBillSub_Insert"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¿å失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["s"]) != "OK") |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["s"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //æ´æ°è½¦é´ç©æåºå |
| | | oCn.RunProc("EXEC h_p_WMS_UPDateICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "'"); |
| | | //æ´æ°è½¦é´æ¡ç åºå |
| | | oCn.RunProc("EXEC h_p_WMS_UPDateBarCodeICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "',-1"); |
| | | oCn.Commit(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®å·ï¼" + mainList[0].HBillNo + " æ°å¢æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "车é´ä¸æ¶åä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤å®ä¸ç¨è°æ¨ æ«ææºåæ¡ç 20250513 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_SourceBarCode_MoveStock_XiaBao_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MoveStock_XiaBao_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MoveStock_XiaBao(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 忥å¼è°åº æ«ææºåæ¡ç |
| | |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MateOutBack(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region éå®éè´§ æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// éå®éè´§ æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_SellOutBack_Json")] |
| | | [HttpGet] |
| | | public object Get_SourceBarCode_SellOutBack_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_SellOutBack(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç ææ¬æ¡ è°æ¨æ«ç è°ç¨ å¤å® æ«æç©ææ¡ç èªå¨å¸¦åºæºåä¿¡æ¯ 20250506 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_BarCode_MoveStock_AddSource_Json")] |
| | | [HttpGet] |
| | | public Object get_BarCode_MoveStock_AddSource_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle, string HCustom1, string HCustom2) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_BarCode_MoveStock_AddSource(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region 䏿¶ã䏿¶å模åè°ç¨æ¹æ³ 20250520 |
| | | |
| | | #region 䏿¶åæ«ç æ¨¡å æ«ææºåæ¡ç è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_SourceBarCode_MaterialLower_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MaterialLower_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MaterialLower " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSourceBarCode_MaterialLower"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç ï¼åå
¥æºå临æ¶è¡¨å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | 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 = ds.Tables[0]; |
| | | 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> |
| | | /// æ«æç©ææ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/Get_BarCode_WorkShop_Json")] |
| | | [HttpGet] |
| | | public object Get_BarCode_WorkShop_Json(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool SourceFlag, string HSourceBillType, string HCarBarCode, Int64 HStockOrgID) |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true) |
| | | { |
| | | string sBatchNoCtl = "N"; //æ¯å¦è¿è¡æ¹å·æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹æ¹å·ï¼ |
| | | string sMustQtyCtl = "å°äºçäºåºæ¶"; //åºæ¶æ°éæ§å¶ï¼å°äºçäºåºæ¶ãå®å
¨çäºåºæ¶ã䏿§å¶ï¼ |
| | | |
| | | //䏿¶å |
| | | if (HBillType == "1252") |
| | | { |
| | | //æ¯å¦è¿è¡æ¹å·æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹æ¹å·ï¼ |
| | | if (oSystemParameter.omodel.Kf_MaterialLowerBill_BatchNoCtl.ToUpper() == "Y") |
| | | { |
| | | sBatchNoCtl = "Y"; |
| | | } |
| | | //æ«ç æ°éè½å¦å¯è¶
åæ®æ°éæ§å¶ï¼å°äºçäºåºæ¶ãå®å
¨çäºåºæ¶ã䏿§å¶ï¼ |
| | | if (oSystemParameter.omodel.Kf_MaterialLowerBill_MustQtyCtl == "å°äºçäºåºæ¶") |
| | | { |
| | | sMustQtyCtl = "å°äºçäºåºæ¶"; |
| | | } |
| | | else if (oSystemParameter.omodel.Kf_MaterialLowerBill_MustQtyCtl == "å®å
¨çäºåºæ¶") |
| | | { |
| | | sMustQtyCtl = "å®å
¨çäºåºæ¶"; |
| | | } |
| | | else |
| | | { |
| | | sMustQtyCtl = "䏿§å¶"; |
| | | } |
| | | } |
| | | |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_WorkShop " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "'," + HQty.ToString() + ",'" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "'," + HStockOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + sBatchNoCtl + "','" + sMustQtyCtl + "'", "h_p_WMS_AddBarCode_WorkShop"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æç©ææ¡ç ï¼åå
¥ä¸´æ¶è¡¨å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 车é´ç©æåºåæ¥è¯¢è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// è·å车é´ç©ææå¨ä½ç½® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetICInventory_WorkShop_Json")] |
| | | [HttpGet] |
| | | public object GetICInventory_WorkShop_Json(string HBillType, Int64 HMaterID, Int64 HAuxPropID, string HBatchNo, Int64 HProcessExchangeInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_KF_ICInventory_WorkShop '" + HBillType + "'," + HMaterID.ToString() + "," + HAuxPropID.ToString() + ",'" + HBatchNo + "'," + HProcessExchangeInterID.ToString(), "h_p_KF_ICInventory_WorkShop"); |
| | | 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 = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢è½¦é´ç©æåºå失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ç©ææ¡ç æ¥è¯¢è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// è·åæ¡ç ä¿¡æ¯ |
| | |
| | | HSourceBillNo_TB = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | HSourceInterID = DBUtility.ClsPub.isInt(ds.Tables[0].Rows[0]["HSourceInterID"]); |
| | | //æ ¹æ®å
¥åºç³è¯·ååå·å¤æåæ®ä¿¡æ¯æ¯å¦å·²ç»åæ¥å°éè¶ |
| | | sql = string.Format(@"select FID,FBILLNO from {0}..TFKO_t_Cust100009 with(nolock) where FBILLNO = '" + HSourceBillNo_TB + "'", HDataBaseName); |
| | | sql = string.Format(@"select FID,FBILLNO,FDOCUMENTSTATUS from {0}..TFKO_t_Cust100009 with(nolock) where FBILLNO = '" + HSourceBillNo_TB + "'", HDataBaseName); |
| | | |
| | | ds = oCn.RunProcReturn(sql, "TFKO_t_Cust100009"); |
| | | //å
¥åºç³è¯·å没æåæ¥å°éè¶åè¿è¡åæ¥ |
| | |
| | | LogService.Write("åçå¼å¸¸ï¼å
¥åºç³è¯·å忥è·åç»å½è´¦å·å¯ç 失败ï¼ï¼" + sBarCode + "," + HSourceBillNo_TB + "," + HSourceInterID); |
| | | return "åçå¼å¸¸ï¼å
¥åºç³è¯·å忥è·åç»å½è´¦å·å¯ç 失败ï¼"; |
| | | } |
| | | LogService.Write("å
¶ä»å
¥åº,å³å°ç»å½éè¶"); |
| | | var loginRet = InvokeHelper.Login(); |
| | | LogService.Write("å
¶ä»å
¥åº,ç»å½éè¶ç»æ1ï¼" + loginRet); |
| | | LogService.Write("å
¶ä»å
¥åº,ç»å½éè¶ç»æ2ï¼" + JObject.Parse(loginRet)["LoginResultType"].Value<int>()); |
| | | |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | |
| | | } |
| | | |
| | | //æ´æ°æ¡ç æºåidä¿¡æ¯ |
| | | sql = string.Format($@"update a set HSourceInterID = isnull(b.FID,0),HSourceEntryID = isnull(c.FEntryID,0) from Gy_BarCodeBill a left join AIS20220609121235..TFKO_t_Cust100009 b on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'"); |
| | | sql = string.Format($@"update a set HSourceInterID = isnull(b.FID,0),HSourceEntryID = isnull(c.FEntryID,0) from Gy_BarCodeBill a with(nolock) left join AIS20220609121235..TFKO_t_Cust100009 b with(nolock) on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c with(nolock) on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'"); |
| | | //æ§è¡æ´æ°è¯å¥ |
| | | oCn.RunProc(sql); |
| | | |
| | | } |
| | | //夿ç产å
¥åºç³è¯·åæ¯å¦æ¯å®¡æ ¸ç¶æï¼è¥æªå®¡æ ¸åæ§è¡æäº¤å®¡æ ¸æ¹æ³ |
| | | else |
| | | { |
| | | //--Z æåï¼A å建ï¼B å®¡æ ¸ä¸ï¼C å·²å®¡æ ¸ï¼D éæ°å®¡æ ¸ |
| | | |
| | | //è·åå
¥åºç³è¯·ååæ®å· |
| | | string HBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FBILLNO"]); |
| | | //å
è£
线çæçç产å
¥åºç³è¯·ååä¸èªå¨å®¡æ ¸ |
| | | if (HBillNo.Substring(0,2) == "RK" ) |
| | | { |
| | | //è·åå
¥åºç³è¯·ååæ®ç¶æ |
| | | string HBillStatus = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FDOCUMENTSTATUS"]); |
| | | //è·åå
¥åºç³è¯·åID |
| | | var json = new |
| | | { |
| | | Ids = ds.Tables[0].Rows[0]["FID"].ToString(), |
| | | }; |
| | | LogService.Write("æäº¤å®¡æ ¸IDï¼" + DBUtility.ClsPub.isInt(ds.Tables[0].Rows[0]["FID"])); |
| | | |
| | | //ä»é
ç½®æä»¶è·å CLOUDç½åãè´¦å¥ä¿¡æ¯ãç»å½ç¨æ·ãç»å½å¯ç |
| | | if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo)) |
| | | { |
| | | LogService.Write("åçå¼å¸¸ï¼å
¥åºç³è¯·å忥è·åç»å½è´¦å·å¯ç 失败ï¼ï¼" + sBarCode + "," + HSourceBillNo_TB + "," + HSourceInterID); |
| | | return "åçå¼å¸¸ï¼å
¥åºç³è¯·å忥è·åç»å½è´¦å·å¯ç 失败ï¼"; |
| | | } |
| | | |
| | | //ç»å½éè¶ |
| | | var loginRet = InvokeHelper.Login(); |
| | | //夿æ¯å¦ç»å½æå |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | | { |
| | | LogService.Write("å
¶ä»å
¥åº,ç»å½éè¶å¤±è´¥ï¼" + sBarCode + "," + HSourceBillNo_TB + "," + HSourceInterID); |
| | | return "åçå¼å¸¸ï¼ç»å½éè¶å¤±è´¥ï¼"; |
| | | } |
| | | |
| | | //æäº¤å®¡æ ¸ |
| | | string result1 = string.Empty; |
| | | string result2 = string.Empty; |
| | | //å建ï¼éæ°å®¡æ ¸ç¶æè°ç¨æäº¤ï¼å®¡æ ¸æé® |
| | | if (HBillStatus == "A" || HBillStatus == "D") |
| | | { |
| | | LogService.Write("ç产å
¥åºç³è¯·åå·ï¼" + HBillNo + ",éæ°è¿è¡æäº¤å®¡æ ¸"); |
| | | result1 = InvokeHelper.Submit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//æäº¤ |
| | | result2 = InvokeHelper.Audit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//å®¡æ ¸ |
| | | |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("å
¥åºç³è¯·ååå·:" + ",æäº¤å¤±è´¥" + result1); |
| | | return "åçå¼å¸¸ï¼å
¥åºç³è¯·ååå·:" + ",æäº¤å¤±è´¥" + result1; |
| | | } |
| | | |
| | | if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("å
¥åºç³è¯·ååå·:" + ",å®¡æ ¸å¤±è´¥" + result2); |
| | | return "åçå¼å¸¸ï¼å
¥åºç³è¯·ååå·:" + ",å®¡æ ¸å¤±è´¥" + result2; |
| | | } |
| | | } |
| | | //å®¡æ ¸ä¸ç¶æè°ç¨å®¡æ ¸æé® |
| | | else if (HBillStatus == "B") |
| | | { |
| | | LogService.Write("ç产å
¥åºç³è¯·åå·ï¼" + HBillNo + ",éæ°è¿è¡å®¡æ ¸"); |
| | | result2 = InvokeHelper.Audit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//å®¡æ ¸ |
| | | if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("å
¥åºç³è¯·ååå·:" + ",å®¡æ ¸å¤±è´¥" + result2); |
| | | return "åçå¼å¸¸ï¼å
¥åºç³è¯·ååå·:" + ",å®¡æ ¸å¤±è´¥" + result2; |
| | | } |
| | | } |
| | | |
| | | //æ´æ°æ¡ç æºåidä¿¡æ¯ |
| | | sql = string.Format($@"update a set HSourceInterID = isnull(b.FID,0),HSourceEntryID = isnull(c.FEntryID,0) from Gy_BarCodeBill a with(nolock) left join AIS20220609121235..TFKO_t_Cust100009 b with(nolock) on a.HSourceBillNo = b.FBillNo left join AIS20220609121235..TFKO_t_Cust_Entry100065 c with(nolock) on b.FID = C.FID and a.HBarcodeNo = c.FSEQ where HSourceBillNo = '{HSourceBillNo_TB}'"); |
| | | //æ§è¡æ´æ°è¯å¥ |
| | | oCn.RunProc(sql); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | HReturnResult = sBarCode; |