| | |
| | | |
| | | } |
| | | |
| | | [Route("POStockInBillList/AuditPOInStockBillPost_TianKang")] |
| | | [HttpPost] |
| | | public object AuditPOInStockBill_TianKang([FromBody] JObject msg) |
| | | { |
| | | 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.Login(); |
| | | 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> |