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/WebAPIController.cs | 135 ++++++++++++++++++++++++++++++++++++--------
1 files changed, 109 insertions(+), 26 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 4f48329..c0c90bf 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -14803,7 +14803,7 @@
}
//鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
- ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_PreventErrMould");
+ //ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_PreventErrMould");
if (oItem.HNumber.Trim() == "")
{
objJsonResult.code = "0";
@@ -14812,21 +14812,32 @@
objJsonResult.data = 1;
return objJsonResult;
}
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+ ds = oCN.RunProcReturn("Select HItemID from Gy_PreventErrMould Where HItemID<>" + oItem.HItemID + " and HNumber='" + oItem.HNumber.Trim() + "' and HUSEORGID=" + oItem.HUSEORGID, "Gy_PreventErrMould");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
//鏂板鏃跺垽鏂�
if (oItem.HItemID == 0)
{
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
+ //if (ds == null || ds.Tables[0].Rows.Count == 0)
+ //{
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
- objJsonResult.data = 1;
- return objJsonResult;
- }
+ //}
+ //else
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ // objJsonResult.data = 1;
+ // return objJsonResult;
+ //}
//妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
string sParent;
sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
@@ -14852,6 +14863,18 @@
}
else//缂栬緫鏃跺垽鏂�
{
+ //宸插鏍镐笉鍏佽淇敼
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from Gy_PreventErrMould where HItemID=" + oItem.HItemID, "Gy_PreventErrMould");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ 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());
@@ -15441,7 +15464,7 @@
}
//鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
- ds = oCN.RunProcReturn("select * from Gy_CheckNoteItem where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CheckNoteItem");
+ //ds = oCN.RunProcReturn("select * from Gy_CheckNoteItem where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_CheckNoteItem");
if (oItem.HNumber.Trim() == "")
{
objJsonResult.code = "0";
@@ -15450,21 +15473,21 @@
objJsonResult.data = 1;
return objJsonResult;
}
+ //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+ ds = oCN.RunProcReturn("Select HItemID from Gy_CheckNoteItem Where HItemID<>" + oItem.HItemID + " and HNumber='" + oItem.HNumber.Trim() + "' and HUSEORGID=" + oItem.HUSEORGID, "Gy_CheckNoteItem");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
//鏂板鏃跺垽鏂�
if (oItem.HItemID == 0)
{
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
-
- }
- else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
- objJsonResult.data = 1;
- return objJsonResult;
- }
+
//妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
string sParent;
sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
@@ -15490,6 +15513,18 @@
}
else//缂栬緫鏃跺垽鏂�
{
+ //宸插鏍镐笉鍏佽淇敼
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from Gy_CheckNoteItem where HItemID=" + oItem.HItemID, "Gy_CheckNoteItem");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ 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());
@@ -18565,7 +18600,7 @@
ClsCN oCn = new ClsCN();
DataSet oDs = new DataSet();
//==========
- oDs = oCn.RunProcReturn("select HItemID ID,Hname Name,HStopflag Stopflag from Xt_ORGANIZATIONS", "Xt_ORGANIZATIONS");
+ oDs = oCn.RunProcReturn("select HItemID ID,Hname Name,HStopflag Stopflag from Xt_ORGANIZATIONS with(nolock)", "Xt_ORGANIZATIONS");
objjson.code = "1";
objjson.count = 1;
objjson.Message = "鑾峰彇鎴愬姛锛�";
@@ -19295,6 +19330,51 @@
+ }
+
+ /// <summary>
+ /// 鑾峰彇宸℃椤圭洰鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetPatrolCheckItemList_Json")]
+ [HttpGet]
+ public object GetPatrolCheckItemList_Json(string CheckItem)
+ {
+ DataSet ds;
+ try
+ {
+ sWhere = " Where HStopFlag=0 and HEndFlag=1";
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if(CheckItem != "" && CheckItem != null)
+ {
+ sWhere = sWhere + " and ( HNumber like '%" + CheckItem + "%' or HName like '%" + CheckItem + "%' ) ";
+ }
+ ds = oCN.RunProcReturn("Select HItemID,HNumber,HName from Gy_PatrolCheck " + sWhere + " Order by HItemID ", "Gy_DotCheck");
+ if(ds == null )
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch(Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
}
/// <summary>
@@ -20505,6 +20585,9 @@
case "QD":
HView = "h_v_Sb_EquipRepairSignBillList";
break;
+ case "XJ":
+ HView = "h_v_Sb_EquipPatrolCheckBillList";
+ break;
default:
objjson.code = "0";
objjson.count = 0;
--
Gitblit v1.9.1