From 90ee7578f4b40ba142b183f9cb3765d2669e8aeb Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 15 九月 2023 10:10:52 +0800
Subject: [PATCH] 生产领料单:增加审核、反审核、作废、反作废、关闭、反关闭功能
---
WebAPI/Controllers/WebAPIController.cs | 124 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 120 insertions(+), 4 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 02166d4..aab08d2 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -342,6 +342,122 @@
}
+ #region 鐢ㄦ埛璁剧疆
+ #region 鑾峰彇鐢ㄦ埛淇℃伅
+ [Route("Gy_USERSet_PDA/GetGy_Czygl_Info")]
+ [HttpGet]
+ public object GetGy_Czygl_Info(string Czybm, string user)
+ {
+ try
+ {
+ //鏌ョ湅鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ string sql = @"select Czybm, Czymc, HWhID, HWhName, HSecManagerID, HSecManager, HKeeperID, HKeeper, HDeptID, HDept, HCloudUserName, HCloudUserPsd from Gy_Czygl where Czybm = '" + Czybm + "'";
+ ds = oCN.RunProcReturn(sql, "Gy_Czygl");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈壘鍒扮浉鍏虫暟鎹紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ #region 淇濆瓨鐢ㄦ埛淇℃伅
+ [Route("Gy_USERSet_PDA/SaveGy_Czygl_Info")]
+ [HttpPost]
+ public object SaveGy_Czygl_Info([FromBody] JObject sMainSub)
+ {
+ try
+ {
+ //鑾峰彇鍙傛暟
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+
+ Int64 HWhID = Int64.Parse(sArray[0].ToString());
+ string HWhName = sArray[1].ToString();
+ Int64 HSecManagerID = Int64.Parse(sArray[2].ToString());
+ string HSecManager = sArray[3].ToString();
+ Int64 HKeeperID = Int64.Parse(sArray[4].ToString());
+ string HKeeper = sArray[5].ToString();
+ Int64 HDeptID = Int64.Parse(sArray[6].ToString());
+ string HDept = sArray[7].ToString();
+ string HCloudUserName = sArray[8].ToString().Trim();
+ string HCloudUserPsd = sArray[9].ToString().Trim();
+
+ string Czybm = sArray[10].ToString();
+ string user = sArray[11].ToString(); //鎿嶄綔鐢ㄦ埛鐨勭敤鎴峰悕
+
+ ////鍒ゆ柇鏄惁鏈夋柊澧炴潈闄�
+ //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳柊澧炴潈闄�!";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ string sql = "update Gy_Czygl set " +
+ "HWhID = " + HWhID +
+ ", HWhName = '" + HWhName +
+ "', HSecManagerID = " + HSecManagerID +
+ ", HSecManager = '" + HSecManager +
+ "', HKeeperID = " + HKeeperID +
+ ", HKeeper = '" + HKeeper +
+ "', HDeptID = " + HDeptID +
+ ", HDept = '" + HDept +
+ "', HCloudUserName = '" + HCloudUserName +
+ "', HCloudUserPsd = '" + HCloudUserPsd +
+ "' where Czybm = '" + Czybm + "'";
+
+ oCN.RunProc(sql);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ #endregion
+
+
//鎾ら攢缂撳瓨鍒楄〃璁板綍
[Route("Web/Rescind_Json")]
@@ -2663,7 +2779,7 @@
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID";
+ string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬浠g爜,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID";
if (sWhere == null || sWhere.Equals(""))
{
ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup");
@@ -3552,7 +3668,7 @@
/// <returns></returns>
[Route("Web/GetCheckItemByCheckProjectID")]
[HttpGet]
- public object GetCheckItemByCheckProjectID(int CheckProjectID)
+ public object GetCheckItemByCheckProjectID(int CheckProjectID,int HBatchQty)
{
if (CheckProjectID <= 0)
{
@@ -3565,8 +3681,8 @@
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- string sql = "select c.HItemID HQCCheckItemID,c.HName 妫�楠岄」鐩�,b.HQCStd,b.HQCUnit HUnit,b.HAnalysisMethod,b.HStatus HResult from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID;
- ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain");
+ string sql = "exec h_p_Gy_GetQCCheckItemByProject " + CheckProjectID + "," + HBatchQty;
+ ds = oCN.RunProcReturn(sql, "h_p_Gy_GetQCCheckItemByProject");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objjson.code = "0";
--
Gitblit v1.9.1