From 258ae0d26334c539f5eb75e785832ecec7d34524 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 26 五月 2025 09:17:11 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/BaseSet/Gy_UnitController.cs | 43 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_UnitController.cs b/WebAPI/Controllers/BaseSet/Gy_UnitController.cs
index bfffd0d..f0ac05c 100644
--- a/WebAPI/Controllers/BaseSet/Gy_UnitController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_UnitController.cs
@@ -283,7 +283,7 @@
Single msg_HRate = float.Parse(sArray[3]);
Int64 HItemID = 0;
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-
+ ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter();
//鑾峰彇鏈�澶D鍊艰祴鍊�
DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_Unit ", "Gy_Unit");
if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
@@ -388,6 +388,18 @@
}
else//缂栬緫鏃跺垽鏂�
{
+ //宸插鏍镐笉鍏佽淇敼
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from Gy_Unit where HItemID=" + oItem.HItemID, "Gy_Unit");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹姸鎬佸凡缁忓鏍革紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
string sParent;
sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
@@ -444,10 +456,37 @@
}
if (bResult)
{
+ //鑷姩瀹℃牳鍔熻兘
+ if(oBill.oModel.HItemID == 0)
+ {
+ ds = oCN.RunProcReturn("select * from Gy_Unit where HStopflag=0 and HNumber='" + oBill.oModel.HNumber.Trim() + "'", "Gy_Unit");
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛佽嚜鍔ㄥ鏍稿け璐ユ壘涓嶅埌瀵瑰簲鍗曟嵁";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ string sAutoCheck = oClsXt_SystemParameter.GetSingleSystemParameter("Gy_Unit_AutoCheck", ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.Verify = "N";
+ if (sAutoCheck == "Y")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛";
+ objJsonResult.data = ds.Tables[0].Rows[0]["HItemID"].ToString();
+ objJsonResult.Verify = "Y";
+ return objJsonResult;
+ }
+ }
+ }
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
objJsonResult.data = 1;
return objJsonResult;
}
--
Gitblit v1.9.1