From d4f7212718f775586ffba74960d78dca5ee4aad2 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 19 九月 2024 09:03:37 +0800
Subject: [PATCH] 1.工艺参数点检:增加附件上传功能 2.设备工艺参数趋势图:根据流转卡的子表进站出站时间查询工艺参数(增加一个选择框 采集来源:(设备采集,手动输入)) 3.开工:增加设备启动点检,防错验证控制 .设备/模具:保养规程 表头增加 HErrWarDays int --预警天数 2.设备/模具:保养计划单增加HErrBeginTime datetime --预警开始时间点,审核时把子表 预警开始时间点, 填入 3.设备启动点检清单/启动点检清单:增加字段HDotCheckType varchar(50) --点检类型(设备,模具,作业指导书,检验指导书) HRelationID int --关联ID(设备内码或模具内码)

---
 WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs |   46 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs b/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
index 97d6272..2f2c7e7 100644
--- a/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
@@ -39,7 +39,7 @@
                 //鏇存柊涓昏〃
                 oCn.RunProc("UpDate Sb_EquipRepairCheckBillMain set  " +
                 " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
-                ",HDate='" + omodel.HDate + "'" +
+                //",HDate='" + omodel.HDate + "'" +
                 ",HYear='" + omodel.HYear.ToString() + "'" +
                 ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                 ",HRemark='" + omodel.HRemark + "'" +
@@ -51,9 +51,14 @@
                 ",HManagerID=" + omodel.HManagerID.ToString() +
                 ",HDeptID=" + omodel.HDeptID.ToString() +
                 ",HCheckBeginDate='" + omodel.HCheckBeginDate + "'" +
+                ",HMouldRepairWorkID='" + omodel.HMouldRepairWorkID + "'" +
                 ",HCheckResult='" + omodel.HCheckResult + "'" +
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+                ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" +
+                ",HMainSourceInterID=" + omodel.HMainSourceInterID + 
+                ",HMainSourceEntryID=" + omodel.HMainSourceEntryID + 
+                ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
                 " where HInterID=" + lngBillKey.ToString());                
                 //鍒犻櫎鍏宠仈
                 //DeleteRelation(ref sReturn, lngBillKey);
@@ -91,6 +96,22 @@
             {
                 //寰楀埌mainid
                 omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ,1", "h_p_Sb_EquipRepairCheckBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCn.BeginTran();
                 //涓昏〃
@@ -98,12 +119,14 @@
                  "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                 ",HEquipID,HExplanation,HInnerBillNo,HEmpID" +
-                ",HManagerID,HDeptID,HCheckResult,HCheckBeginDate" +
+                ",HManagerID,HDeptID,HCheckResult,HCheckBeginDate,HMouldRepairWorkID,HRepairCheckMainID,HRepairCheckMainContent" +
+                ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker+ "',getdate()" +
                 ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HEmpID.ToString() +
-                "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HCheckResult + "','" + omodel.HCheckBeginDate + "'" +
+                "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HCheckResult + "','" + omodel.HCheckBeginDate + "'," + omodel.HMouldRepairWorkID + "," + omodel.HRepairCheckMainID + ",'" + omodel.HRepairCheckMainContent + "','" + omodel.HMainSourceBillType + 
+                "'," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "'" +
                 ") ");
                 ////鎻掑叆瀛愯〃
                 foreach (Model.ClsSb_EquipRepairCheckBillSub oSub in DetailColl)
@@ -118,6 +141,23 @@
                       "," + oSub.HRepairCheckID.ToString() + "," + oSub.HManagerID.ToString() + ",'" + oSub.HRepairCheckContent + "'" +
                       ") ");
                 }
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote  + "',1,1 ", "h_p_Sb_EquipRepairCheckBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;

--
Gitblit v1.9.1