From 4bf3ca7fc8e3cceba62d6617724cac3cbc919746 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期一, 15 八月 2022 21:53:14 +0800
Subject: [PATCH] 工资系统部署测试
---
WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs | 144 ++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 126 insertions(+), 18 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs b/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs
index f4ee717..851f08f 100644
--- a/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs
+++ b/WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs
@@ -22,10 +22,56 @@
DataSet ds1;
+ #region[缂栬緫鏃惰幏鍙栬〃澶存暟鎹甝
+ [Route("QC_LastPieceCheckBill/QC_LastPieceCheckBillListCheckDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> QC_LastPieceCheckBillListCheckDetail(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_LastPieceCheckBillListDetail where hmainid= " + HID + " ", "h_v_QC_LastPieceCheckBillListDetail");
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄧ粨绠楀崟鍙�" };
+
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+ #endregion
+
+ #region[缂栬緫鏃惰幏鍙栬〃浣撴暟鎹甝
+ [Route("QC_LastPieceCheckBill/QC_LastPieceCheckBillListProjectDetai")]
+ [HttpGet]
+ public object QC_LastPieceCheckBillListProjectDetai(string sqlWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql1 = "SELECT 鏃ユ湡,鍗曟嵁鍙�,澶囨敞,浜у搧鍐呯爜, 浜у搧鍚嶇О" +
+ ", 浜у搧鍨嬪彿, 妫�楠屽憳浠g爜, 妫�楠屽憳鍚嶇О, 鍒跺崟浜�, 鍒跺崟鏃ユ湡" +
+ ", 瀹℃牳浜�, 瀹℃牳鏃ユ湡, 淇敼浜�, 淇敼鏃ユ湡, 鍏抽棴浜�, 鍏抽棴鏃ユ湡 FROM h_v_QC_LastPieceCheckBillListDetail where 1 = 1 ";
+ string sql = sql1 + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_QC_LastPieceCheckBillListDetail");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
/// <summary>
/// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ /// 浜у搧鍏ュ簱妫�楠屽崟鍒楄〃
///鍙傛暟锛歴tring sql銆�
///杩斿洖鍊硷細object銆�
/// </summary>
@@ -59,8 +105,19 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
+ string user = sArray[2].ToString();
try
{
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
msg2 = "[" + msg2.ToString() + "]";
List<QC_LastPieceCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_LastPieceCheckBillMain>>(msg2);
string BillType = "7507";
@@ -196,7 +253,47 @@
objJsonResult.data = null;
return objJsonResult;
}
+ /// <summary>
+ ///鍒犻櫎鍔熻兘
+ ///浜у搧鍏ュ簱妫�楠屽崟
+ /// </summary>
+ /// <returns></returns>
+ [Route("QC_LastPieceCheckBill/DeltetLastPieceCheckBill")]
+ [HttpGet]
+ public object DeltetLastPieceCheckBill(string HInterID,string user)
+ {
+ try
+ {
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();
+ oCN.RunProc("Delete From QC_LastPieceCheckBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From QC_LastPieceCheckBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ 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 = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
/// <summary>
/// 杩斿洖浜у搧鍏ュ簱妫�楠屽崟鍒楄〃
///鍙傛暟锛歴tring sql銆�
@@ -204,36 +301,47 @@
/// </summary>
[Route("QC_LastPieceCheckBill/GetLastPieceCheckBillList")]
[HttpGet]
- public object GetLastPieceCheckBillList(string sWhere)
+ public object GetLastPieceCheckBillList(string sWhere,string user)
{
try
{
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("select * from [h_v_QC_LastPieceCheckBillList] " + sWhere, "[h_v_QC_LastPieceCheckBillList]");
- }
- else
- {
- string sql1 = "select * from [h_v_QC_LastPieceCheckBillList] where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "[h_v_QC_LastPieceCheckBillList]");
- }
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Query", 1, false, user))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
objJsonResult.data = null;
return objJsonResult;
}
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_QC_LastPieceCheckBillListDetail order by hmainid desc ", "h_v_QC_LastPieceCheckBillListDetail");
+ }
else
{
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
+ string sql1 = "select * from h_v_QC_LastPieceCheckBillListDetail where 1 = 1 ";
+ string sql = sql1 + sWhere+ " order by hmainid desc ";
+ ds = oCN.RunProcReturn(sql, "h_v_QC_LastPieceCheckBillListDetail");
}
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ 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 = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
}
catch (Exception e)
{
--
Gitblit v1.9.1