From 4f23c4da3c004c530fda95bf21294b786918f12b Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 28 七月 2023 18:06:40 +0800
Subject: [PATCH] 工资计算模块
---
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index 9fc4410..23c5438 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -128,6 +128,7 @@
//int hentryid = int.Parse(sArray[2].ToString());//瀛愯〃鐨勯『搴廼d
int OperationType = int.Parse(sArray[2].ToString());//鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
string user = sArray[3].ToString();//鐢ㄦ埛鍚�
+ string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
user_LongShan = sArray[3].ToString();//鐢ㄦ埛鍚�
try
{
@@ -209,6 +210,9 @@
"," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
"," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ") ");
+
+ LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板宸ヨ壓璺嚎鍗曟嵁:" + HBillNo);
+ oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "鏂板宸ヨ壓璺嚎鍗曟嵁锛�" + HBillNo + "','LMES-宸ヨ壓璺嚎妯″潡','" + DBUtility.ClsPub.IPAddress + "','鏂板鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
}
else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
{ //淇敼
@@ -224,7 +228,10 @@
",HProductNum='" + HProductNum + "',HVerNum='" + HVerNum + "' where HInterID='" + HInterID + "'");
//鍒犻櫎瀛愯〃
- oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'");
+ oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'");
+
+ LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",淇敼宸ヨ壓璺嚎鍗曟嵁:" + HBillNo);
+ oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "淇敼宸ヨ壓璺嚎鍗曟嵁锛�" + HBillNo + "','LMES-宸ヨ壓璺嚎妯″潡','" + DBUtility.ClsPub.IPAddress + "','淇敼鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
}
//淇濆瓨瀛愯〃
objJsonResult = AddBillSub(msg3, HInterID, OperationType);
@@ -336,13 +343,16 @@
foreach (Gy_RoutingBillSub oSub in DetailColl)
{
i++;
- if (oSub.HWorkQty <= 0)
+ if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "绗�" + i + "琛岋紝鍔犲伐鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
- objJsonResult.data = null;
- return objJsonResult;
+ if (oSub.HWorkQty <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绗�" + i + "琛岋紝鍔犲伐鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
//濡傛灉宸ヤ环涓�0锛屽垯宸ヤ环瀛楁涓嶅仛涓哄繀濉瓧娈�
@@ -432,20 +442,13 @@
{
try
{
- string flag = "flase";
string sErrMsg = "";
- if (oSystemParameter.ShowBill(ref sErrMsg))
- {
- if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y")
- {
- flag = "true";
- }
- }
-
+ oSystemParameter.ShowBill(ref sErrMsg);
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "";
- objJsonResult.data = flag;
+ objJsonResult.data = oSystemParameter.omodel;
return objJsonResult;
}
catch (Exception e)
--
Gitblit v1.9.1