From 849e974e20d9894f3da95ebf504d97ce9f14c9ed Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 十二月 2024 15:03:25 +0800
Subject: [PATCH] 工艺路线撤回,出站汇报单修改时间功能能
---
WebAPI/Controllers/POStockInBillController.cs | 80 +++++++++++++++++++++++++++++++++++++++
1 files changed, 79 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 8c671f1..f9cb83b 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -5317,6 +5317,82 @@
}
+ [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("鏀舵枡閫氱煡鍗曟彁浜ゅけ璐sonRoot:" + 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("鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot:" + json.ToString());
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot" + _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>
@@ -5335,9 +5411,11 @@
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";
--
Gitblit v1.9.1