From cda55038d421fa8d8ea9e38484643d52eda3671c Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 10 三月 2026 11:21:24 +0800
Subject: [PATCH] 华舟 新增 获取 设备绑定职员信息(带出模具职员信息)  接口

---
 WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs |   49 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
index 0406334..c907c0b 100644
--- a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs
@@ -220,7 +220,7 @@
                 string BillType = "3843";
 
 
-                if (OperationType == 1)//鏂板
+                if (OperationType == 1 || OperationType == 2)//鏂板
                 {
                     //淇濆瓨鍓嶆帶鍒�
                     objJsonResult = BeforeSave_MouldRepairSendWorkBill(omodel.HInterID, omodel.HBillNo, 1);
@@ -242,12 +242,11 @@
                  ",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() +
                   ", " + omodel.HSupID.ToString() + ",'" + omodel.HRepairType + "','" + omodel.HNewModel + "'," + omodel.HNewDesignLife.ToString() + ",'" + omodel.HMainSourceBillType + "'," + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() +
-
                  ",1) ");
                 }
                 else if (OperationType == 3)
@@ -294,6 +293,7 @@
                 ",HMainSourceEntryID=" + omodel.HMainSourceEntryID.ToString() +
                 ",HNewDesignLife=" + omodel.HNewDesignLife.ToString() +
                 " where HInterID=" + omodel.HInterID.ToString());
+
 
                     //鍒犻櫎瀛愯〃
                     oCN.RunProc("delete from Sc_MouldRepairSendWorkBillSub where HInterID='" + omodel.HInterID.ToString() + "'");
@@ -949,5 +949,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