From e4726b306b10dc68d01fdb5d2760e671be815129 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 26 二月 2026 08:45:31 +0800
Subject: [PATCH] 开工增加app消息通知

---
 WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
index 052e9e4..3b42e29 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -326,7 +326,7 @@
                 }
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
-                string sql = "select 淇濆吇椤圭洰ID HMaintainItemID,淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + "";
+                string sql = "select 淇濆吇椤圭洰ID HMaintainItemID,淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark, 淇濆吇缁撴灉 HStdMaintainResult from h_v_Sc_MouldMaintainRuleBillSub_Item where 1 = 1 " + Swhere + "";
                 ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillSub_Item");
                 //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
                 string sql1 = "select 閰嶄欢ID HMaterID,閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,璁¢噺鍗曚綅浠g爜 HUnitNumber,璁¢噺鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,瀛愬娉�1 HRemark from h_v_Sc_MouldMaintainRuleBillSub where 1 = 1 " + Swhere + "";
@@ -367,6 +367,7 @@
             string msg3 = sArray[1].ToString();
             string msg4 = sArray[2].ToString();
             string msg5 = sArray[3].ToString();
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
 
             ListModels oListModels = new ListModels();
             try
@@ -385,6 +386,8 @@
                 List<Model.ClsSc_MouldMaintainRuleBillMain> lsmain = new List<Model.ClsSc_MouldMaintainRuleBillMain>();
                 msg2 = msg2.Replace("\\", "");
                 msg2 = msg2.Replace("\n", "");  //\n
+
+                
                 //涓昏〃
                 lsmain = oListModels.getObjectByJson_Sc_MouldMaintainRuleBillMain(msg2);
                 foreach (Model.ClsSc_MouldMaintainRuleBillMain oItem in lsmain)
@@ -406,7 +409,23 @@
                         return objJsonResult;
                     }
                     oBill.omodel = oItem;
+                    
+                    if (oItem.HInterID == 0)
+                    {
+                        // 鍒ゆ柇鏂板鐨勮〃鍗曚笌琛ㄦ牸涓殑琛ㄥ崟鏄惁鏈夐噸澶�
+                        DataSet ds = oCN.RunProcReturn("select * from h_v_Sc_MouldMaintainRuleBillList where 鍗曟嵁鍙� = '" + oItem.HBillNo + "'", "h_v_Sc_MouldMaintainRuleBillList");
+                        if (ds.Tables[0].Rows.Count > 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佸崟鎹彿涓嶅緱鏈夐噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
                 }
+                
+
 
                 //淇濆吇椤硅〃浣撴暟鎹�
                 //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
@@ -419,7 +438,6 @@
                 int i = 0;
                 foreach (Model.ClsSc_MouldMaintainRuleBillSub_Item item in ls)
                 {
-
                     i++;
                     item.HEntryID = i;
                     item.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
@@ -462,7 +480,7 @@
                 //淇濆瓨瀹屾瘯鍚庡鐞�
                 bool bResult;
                 if (oBill.omodel.HInterID == 0)
-                {
+                {   
                     // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                     bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                 }

--
Gitblit v1.9.1