From d5d18d1308a426b0215e62388101aaf1fae276ca Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 20 七月 2023 10:41:46 +0800
Subject: [PATCH] 工资结算单(其它):添加审核、反审核、关闭、反关闭、作废、反作废功能
---
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 34 ++--
WebAPI/Controllers/工资管理/Pay_OtherBalBillController.cs | 327 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 344 insertions(+), 17 deletions(-)
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
index a4c0f83..76bf4f8 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
@@ -7,6 +7,7 @@
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
+using Newtonsoft.Json;
namespace WebAPI.Controllers
{
@@ -19,6 +20,7 @@
public DataSet ds = new DataSet();
public WebServer webserver = new WebServer();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill();
//DataSet ds;
public DLL.ClsPay_OtherBalBill BillNew0 = new DLL.ClsPay_OtherBalBill(); //
public DLL.ClsPay_OtherBalBill BillOld0 = new DLL.ClsPay_OtherBalBill(); //
@@ -381,5 +383,330 @@
}
}
//
+
+
+ #region 宸ヨ祫缁撶畻鍗�(鍏跺畠) 瀹℃牳/鍙嶅鏍�
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Pay_OtherBalBill/AuditPay_OtherBalBill")]
+ [HttpGet]
+ public object AuditPay_OtherBalBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pay_OtherBalBill_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Pay_OtherBalBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶉渶瑕佸啀瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //瀹℃牳鍗曟嵁
+ if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插弽瀹℃牳!涓嶉渶瑕佸啀鍙嶅鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //鍙嶅鏍稿崟鎹�
+ if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ #region 宸ヨ祫缁撶畻鍗�(鍏跺畠) 鍏抽棴/鍙嶅叧闂姛鑳�
+ [Route("Pay_OtherBalBill/ClosePay_OtherBalBill")]
+ [HttpGet]
+ public object ClosePay_OtherBalBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pay_OtherBalBill_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Pay_OtherBalBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 鍏抽棴 2 鍙嶅叧闂�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶉渶瑕佸啀鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //鍏抽棴鍗曟嵁
+ if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCloseMan"] == null || ds.Tables[0].Rows[0]["HCloseMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插弽鍏抽棴!涓嶉渶瑕佸啀鍙嶅叧闂�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //鍙嶅叧闂崟鎹�
+ if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ #region 宸ヨ祫缁撶畻鍗�(鍏跺畠) 浣滃簾/鍙嶄綔搴熷姛鑳�
+ [Route("Pay_OtherBalBill/DropPay_OtherBalBill")]
+ [HttpGet]
+ public object DropPay_OtherBalBill(string HInterID, int Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈変綔搴熸潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pay_OtherBalBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愪綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "Pay_OtherBalBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ //Type 1 浣滃簾 2 鍙嶄綔搴�
+ if (Type == 1)
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //浣滃簾鍗曟嵁
+ if (!BillOld.Cancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HDeleteMan"] == null || ds.Tables[0].Rows[0]["HDeleteMan"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插弽浣滃簾!涓嶉渶瑕佸啀鍙嶄綔搴�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //鍙嶄綔搴熷崟鎹�
+ if (!BillOld.AbandonCancelltion(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ 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
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index 880d056..f8df59a 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -20,12 +20,12 @@
<File Include="bin/BLL.dll">
<publishTime>11/09/2022 16:02:08</publishTime>
<publishTime>11/02/2022 22:03:01</publishTime>
- <publishTime>07/20/2023 09:57:00</publishTime>
+ <publishTime>07/20/2023 10:38:39</publishTime>
</File>
<File Include="bin/BLL.pdb">
<publishTime>11/09/2022 16:02:08</publishTime>
<publishTime>11/02/2022 22:03:01</publishTime>
- <publishTime>07/20/2023 09:57:00</publishTime>
+ <publishTime>07/20/2023 10:38:39</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime>
@@ -33,12 +33,12 @@
<File Include="bin/DAL.dll">
<publishTime>11/09/2022 16:02:06</publishTime>
<publishTime>11/02/2022 22:02:58</publishTime>
- <publishTime>07/20/2023 09:56:58</publishTime>
+ <publishTime>07/20/2023 10:38:37</publishTime>
</File>
<File Include="bin/DAL.pdb">
<publishTime>11/09/2022 16:02:06</publishTime>
<publishTime>11/02/2022 22:02:58</publishTime>
- <publishTime>07/20/2023 09:56:58</publishTime>
+ <publishTime>07/20/2023 10:38:37</publishTime>
</File>
<File Include="bin/Dapper.dll">
<publishTime>07/22/2016 22:52:40</publishTime>
@@ -46,12 +46,12 @@
<File Include="bin/DBUtility.dll">
<publishTime>11/02/2022 22:02:56</publishTime>
<publishTime>11/15/2022 13:55:23</publishTime>
- <publishTime>07/20/2023 09:56:55</publishTime>
+ <publishTime>07/20/2023 10:38:34</publishTime>
</File>
<File Include="bin/DBUtility.pdb">
<publishTime>11/09/2022 16:01:58</publishTime>
<publishTime>11/02/2022 22:02:56</publishTime>
- <publishTime>07/20/2023 09:56:55</publishTime>
+ <publishTime>07/20/2023 10:38:34</publishTime>
</File>
<File Include="bin/Grpc.Core.Api.dll">
<publishTime>03/22/2022 13:17:26</publishTime>
@@ -107,12 +107,12 @@
<File Include="bin/Model.dll">
<publishTime>11/09/2022 16:02:01</publishTime>
<publishTime>11/02/2022 22:02:56</publishTime>
- <publishTime>07/20/2023 09:56:56</publishTime>
+ <publishTime>07/20/2023 10:38:35</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>11/09/2022 16:02:01</publishTime>
<publishTime>11/02/2022 22:02:56</publishTime>
- <publishTime>07/20/2023 09:56:56</publishTime>
+ <publishTime>07/20/2023 10:38:35</publishTime>
</File>
<File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
<publishTime>04/06/2023 15:57:02</publishTime>
@@ -147,33 +147,33 @@
<File Include="bin/Pub_Class.dll">
<publishTime>11/09/2022 16:01:56</publishTime>
<publishTime>11/02/2022 22:02:54</publishTime>
- <publishTime>07/20/2023 09:56:54</publishTime>
+ <publishTime>07/20/2023 10:38:33</publishTime>
</File>
<File Include="bin/Pub_Class.pdb">
<publishTime>11/09/2022 16:01:56</publishTime>
<publishTime>11/02/2022 22:02:54</publishTime>
- <publishTime>07/20/2023 09:56:54</publishTime>
+ <publishTime>07/20/2023 10:38:33</publishTime>
</File>
<File Include="bin/Pub_Control.dll">
<publishTime>11/09/2022 16:01:57</publishTime>
<publishTime>11/02/2022 22:02:55</publishTime>
- <publishTime>07/20/2023 09:56:54</publishTime>
+ <publishTime>07/20/2023 10:38:33</publishTime>
</File>
<File Include="bin/Pub_Control.pdb">
<publishTime>11/09/2022 16:01:57</publishTime>
<publishTime>11/02/2022 22:02:55</publishTime>
- <publishTime>07/20/2023 09:56:54</publishTime>
+ <publishTime>07/20/2023 10:38:33</publishTime>
</File>
<File Include="bin/RestSharp.dll">
<publishTime>08/31/2012 06:22:50</publishTime>
</File>
<File Include="bin/SQLHelper.dll">
- <publishTime>07/20/2023 09:56:55</publishTime>
+ <publishTime>07/20/2023 10:38:34</publishTime>
</File>
<File Include="bin/SQLHelper.pdb">
<publishTime>11/09/2022 16:01:57</publishTime>
<publishTime>11/02/2022 22:02:55</publishTime>
- <publishTime>07/20/2023 09:56:55</publishTime>
+ <publishTime>07/20/2023 10:38:34</publishTime>
</File>
<File Include="bin/stdole.dll">
<publishTime>05/09/2021 13:35:37</publishTime>
@@ -286,7 +286,7 @@
<File Include="bin/WebAPI.dll">
<publishTime>11/14/2022 11:23:59</publishTime>
<publishTime>11/02/2022 22:03:04</publishTime>
- <publishTime>07/20/2023 09:57:06</publishTime>
+ <publishTime>07/20/2023 10:38:44</publishTime>
</File>
<File Include="bin/WebAPI.dll.config">
<publishTime>12/15/2021 17:59:43</publishTime>
@@ -294,7 +294,7 @@
<File Include="bin/WebAPI.pdb">
<publishTime>11/14/2022 11:23:59</publishTime>
<publishTime>11/02/2022 22:03:04</publishTime>
- <publishTime>07/20/2023 09:57:06</publishTime>
+ <publishTime>07/20/2023 10:38:44</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>07/18/2013 01:03:52</publishTime>
@@ -503,7 +503,7 @@
<File Include="Web.config">
<publishTime>11/14/2022 11:24:08</publishTime>
<publishTime>11/02/2022 22:03:20</publishTime>
- <publishTime>07/20/2023 09:57:09</publishTime>
+ <publishTime>07/20/2023 10:38:48</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
--
Gitblit v1.9.1