From 08665ff78fbc131fd647fad4ba48742faec53529 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期二, 12 七月 2022 11:27:51 +0800
Subject: [PATCH] 修改了 夏宝 车间看板 采购看板 缺料看板 根据系统设置默认车间过滤功能
---
WebAPI/Controllers/POStockInBillController.cs | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 150 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 8391864..e180af3 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -1,5 +1,6 @@
锘縰sing DBUtility;
using Model;
+using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SQLHelper;
using System;
@@ -1030,6 +1031,7 @@
}
+
//[Route("POStockInBillList/confirm")]
//public object confirm(string hmainid)
//{
@@ -1064,7 +1066,7 @@
// FentityModel.Add("FSRCENTRYID", item["FHPOOrderEntryID"].ToString());//婧愬崟鍒嗗綍鍐呯爜
// FentityModel.Add("FORDERBILLNO", item["FHPOOrderBillNo"].ToString());//婧愬崟鍗曞彿
// FentityModel.Add("FPOORDERENTRYID", item["FHPOOrderEntryID"].ToString());//婧愬崟鍒嗗綍鍐呯爜
-
+
// JArray Fentity2 = new JArray();
// JObject FentityModel2 = new JObject();
@@ -1109,5 +1111,152 @@
//}
#endregion
+
+ #region [鏀舵枡閫氱煡鍗曞鏍竇
+ //鏀舵枡閫氱煡鍗曞鏍� 鎵潯鐮�
+ [Route("POStockInBillList/Get_ReciveBillCheckDate")]
+ [HttpGet]
+ public object Get_ReciveBillCheckDate(string HBarCode)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ DataSet Ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_Temp_Add_POInStockCheck2 '" + HBarCode + "'", "h_p_KF_PonderationBillMain_Temp_Add_POInStockCheck2");
+ 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][0]) == 0)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = Ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ //鏀舵枡閫氱煡鍗曞鏍� 瀹℃牳鎻愪氦
+ [Route("POStockInBillList/Exec_ReciveBillCheck")]
+ [HttpGet]
+ public object Exec_ReciveBillCheck(string HBarCode)
+ {
+ try
+ {
+ //淇敼閲戣澏鐢熶骇鍗曠殑鐘舵��
+ //璁块棶閲戣澏
+ 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 json = new
+ {
+ //CreateOrgId = 0,
+ Numbers = HBarCode,
+ //Ids = (EntyID).Split('-')[0],
+ //PkEntryIds = (EntyID).Split('-')[1]
+ };
+ string result1 = string.Empty;
+ string result2 = string.Empty;
+ DataSet Ds = oCn.RunProcReturn("select FDOCUMENTSTATUS,FID from AIS20210811135644..T_PUR_RECEIVE where FBILLNO='" + HBarCode+"'", "AIS20210811135644..T_PUR_RECEIVE");
+ //鍒ゆ柇褰撳墠鏀舵枡閫氱煡鍗曠姸鎬佲�斺�斿凡鍒涘缓鍒欏厛鎻愪氦鍐嶅鏍搞�佷互鎻愪氦鍒欏彧瀹℃牳
+ if (Ds.Tables[0].Rows[0][0].ToString() == "A"|| Ds.Tables[0].Rows[0][0].ToString() == "D")
+ {
+ result1 = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject(json));
+ result2 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject(json));
+ }
+ if (Ds.Tables[0].Rows[0][0].ToString() == "B")
+ {
+ result2 = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject(json));
+ }
+ //鍒ゆ柇瀹℃牳鏄惁鎴愬姛
+ if (JObject.Parse(result2)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鏀舵枡閫氱煡鍗曞け璐ワ紒鍗曟嵁鍙凤細" + HBarCode;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ #endregion
+
+ #region PDA閿�鍞嚭搴�
+ //PDA閿�鍞嚭搴撴暣鎵樺垹闄�
+ [Route("POStockInBillList/SellOutBillSDeleCode")]
+ [HttpGet]
+ public object SellOutBillSDeleCode(string HBarCode,string HInterID)
+ {
+ try
+ {
+ //鏍规嵁鏉$爜鍦ㄦ潯鐮佹。妗堜腑鎵惧埌瀵瑰簲鐨勬墭鏉$爜锛屽啀鍦ㄤ复鏃惰〃涓垹闄よ鎵樻潯鐮佺殑鍏ㄩ儴璁板綍
+ string sql = string.Format(@"delete from KF_PonderationBillMain_Temp where HBillType=1205 and HInterID=" + HInterID + " and HBarCode" +
+ " in (select HBarCode from Gy_BarCodeBill where HBarCode_Pack = (select HBarCode_Pack from Gy_BarCodeBill where HBarCode = '"+ HBarCode + "'))");
+ oCn.RunProc(sql);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏁存墭鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1