From 8cdf2c4d1edba2cfa7d63c7b071f170354bdf691 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期一, 30 三月 2026 18:33:42 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 63 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
index f340c09..02cb400 100644
--- a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
@@ -19,6 +19,7 @@
 
         ClsSb_MouldRepairWorkBillMain omodel = new ClsSb_MouldRepairWorkBillMain();
         List<ClsSb_MouldRepairWorkBillSub> DetailColl = new List<ClsSb_MouldRepairWorkBillSub>();
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
         DataSet ds;
@@ -242,7 +243,7 @@
                  ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HBillStatus" +
                  ") " +
                  " values('" + BillType + "','" + BillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
-                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+                 ",YEAR(GETDATE()),month(GETDATE()),'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
                  "," + omodel.HEquipID.ToString() + "," + omodel.HRepairID.ToString() + ",'" + omodel.HRepairBeginDate + "','" + omodel.HRepairEndDate + "','" + omodel.HRepairContent + "'" +
                  ",'" + omodel.HCycleUnit + "'," + omodel.HPlanTimes.ToString() + "," + omodel.HTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() +
                  "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMouldID.ToString() +
@@ -309,9 +310,26 @@
                     return objJsonResult;
                 }
 
+                if (OperationType == 1)
+                {
+                    string sReturn = "";
+                    if (oSystemParameter.ShowBill(ref sReturn) == true)
+                    {
+                        if (oSystemParameter.omodel.Sc_MouldRepairSendWorkBill_AutoCheck.ToUpper() == "Y")
+                        {
+                            oCN.RunProc("Update Sc_MouldRepairSendWorkBill Set HChecker='" + omodel.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString());
+
+                            objJsonResult.code = "1";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鏂板骞跺鏍稿崟鎹垚鍔�!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = null;
+                objJsonResult.Message = "淇濆瓨鍗曟嵁鎴愬姛!";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -949,5 +967,48 @@
             }
         }
         #endregion
+
+        #region 鏍规嵁鍣ㄥ叿鏉$爜鏌ユ壘鍣ㄥ叿妗f淇℃伅PDA  鏌ヨ鏉$爜妗f鍒楄〃
+        [Route("Sc_PDA_MouldRepairCheckBill/txtHBarCode_KeyDown_List")]
+        [HttpGet]
+        public object txtHBarCode_KeyDown_List(string HBarCode)
+        {
+            try
+            {
+                if (HBarCode == null || HBarCode.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //寰楀埌淇℃伅
+                ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_MouldFileList  where 鏉$爜缂栧彿= '" + HBarCode + "'", "h_v_Gy_EquipFileMainList");
+                //鍐欏叆淇℃伅
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌妯″叿淇℃伅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1