|  |  | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         [Route("POStockInBillList/AuditPOInStockBillPost_TianKang")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object AuditPOInStockBill_TianKang(long FID,string user) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //string _msg = msg["msg"].ToString(); | 
 |  |  |                 //_msg = _msg.Replace("\\", ""); | 
 |  |  |                 //_msg = _msg.Replace("\n", ""); | 
 |  |  |                 //List<Models.ReciveBill_FastModel> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ReciveBill_FastModel>>(_msg); | 
 |  |  |                 //DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill(); | 
 |  |  |                 //var hinterID = list[0].HInterID; | 
 |  |  |                 //var FID = list[0].FID; | 
 |  |  |                 //string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);//客户名称                | 
 |  |  |                 //var kdTbaleName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName"); | 
 |  |  |                 //string sql = string.Empty; | 
 |  |  |                                                | 
 |  |  |                 var json = new | 
 |  |  |                 { | 
 |  |  |                     Ids = FID, | 
 |  |  |                 }; | 
 |  |  |                 //LogService.Write(json); | 
 |  |  |                 //登录 | 
 |  |  |                 var loginRet = InvokeHelper.LoginUser(user); | 
 |  |  |                 var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); | 
 |  |  |                 if (isSuccess <= 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = loginRet; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 //提交 | 
 |  |  |                 var _result = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); | 
 |  |  |                 var _saveObj = JObject.Parse(_result); | 
 |  |  |                 if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") | 
 |  |  |                 { | 
 |  |  |                     LogService.Write("收料通知单提交失败jsonRoot:" + json.ToString()); | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "金蝶收料通知单提交失败" + _result; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |  | 
 |  |  |                 } | 
 |  |  |                 //审核 | 
 |  |  |                 _result = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); | 
 |  |  |                 _saveObj = JObject.Parse(_result); | 
 |  |  |                 if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") | 
 |  |  |                 { | 
 |  |  |                     LogService.Write("收料通知单审核失败jsonRoot:" + json.ToString()); | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + _result; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |  | 
 |  |  |                 } | 
 |  |  |                 objJsonResult.code = "1"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "操作成功!"; | 
 |  |  |                 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> | 
 |  |  |         /// 到货确认 扫条码 校验 | 
 |  |  |         /// </summary> | 
 |  |  | 
 |  |  |                 string sql = string.Empty; | 
 |  |  |                 if (FCusName.Contains("安瑞")) | 
 |  |  |                     sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID =(select distinct HSourceInterID from Cg_POInStockBillSub where HInterID ={HInterID}) and HBarCode = '{HBarcode}' and HBarCodeType ='箱号内条码'"; | 
 |  |  |                 else if(FCusName.Contains("添康科技")) | 
 |  |  |                     sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID,HMaterID,HBatchNo,HProduceDate,HExpiryDate from  Gy_BarCodeBill where HSourceInterID = {HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='箱号内条码'"; | 
 |  |  |                 else | 
 |  |  |                     sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}"; | 
 |  |  |                 DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); | 
 |  |  |                 DataSet ds = oCn.RunProcReturn(sql, "Gy_BarCodeBill"); | 
 |  |  |                 if (ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; |