From 2f695e7c0982d0de5c0cec5c16c5a3d574286773 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 19 八月 2025 16:14:19 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs |  136 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 132 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 2a02b58..871a794 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -23,6 +23,7 @@
         public DBUtility.ClsPub.Enum_BillStatus BillStatus;
         Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
         public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill();
+        public WebS.WebService1 oWebs = new WebS.WebService1();
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
         DataSet ds;
@@ -153,7 +154,9 @@
                 double HBackWorkByMaterQty = list[0].HBackWorkByMaterQty;//閬楀け鏁伴噺
                 int HMouldID = list[0].HMouldID;//妯″叿id
                 double HMachineWorkTimes = list[0].HMachineWorkTimes;//璁惧宸ユ椂
-                int HIsTimeFlag = list[0].HIsTimeFlag;
+                int HIsTimeFlag = list[0].HIsTimeFlag;//鏄惁璁℃椂
+                string HRelBeginTime = list[0].HRelBeginTime;//寮�宸ユ椂闂�
+                string HRelEndTime = list[0].HRelEndTime;//瀹屽伐鏃堕棿
                 LogService.Write($"1.瀛楁璧嬪�硷紝鐢ㄦ椂" + sw.Elapsed );
 
                 //鍗曟嵁瀹屾暣鎬у垽鏂�
@@ -414,7 +417,7 @@
                     ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" +
                     ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" +
                     ",HmaterOutqty,HProcPriceRate,HTemporaryAreaID,HWasterQty_Work,HWasterQty_Mater,HBackWorkQty,HShiftsID" +
-                    ",HToCheckQty,HLossQty,HBackWorkByMaterQty,HMouldID,HMachineWorkTimes,HIsTimeFlag " +
+                    ",HToCheckQty,HLossQty,HBackWorkByMaterQty,HMouldID,HMachineWorkTimes,HIsTimeFlag,HRelBeginTime,HRelEndTime " +
                     ") " +
                     " values('" + BillType + "','" + (OperationType == "5" ? "SUB" : HBillSubType)  + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",'"+ HDate + "','" + HMaker + "',getdate(),'" + HMouldNum + "'" +
                     "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL +
@@ -425,7 +428,7 @@
                     "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) +
                     "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID +
                     "," + HmaterOutqty + "," + HProcPriceRate + "," + HTemporaryAreaID + "," + HWasterQty_Work + "," + HWasterQty_Mater + "," + HBackWorkQty +
-                    "," + HShiftsID + "," + HToCheckQty + "," + HLossQty + ","+ HBackWorkByMaterQty + "," + HMouldID + ",'" + HMachineWorkTimes + "',"+ HIsTimeFlag + ") ");
+                    "," + HShiftsID + "," + HToCheckQty + "," + HLossQty + ","+ HBackWorkByMaterQty + "," + HMouldID + ",'" + HMachineWorkTimes + "',"+ HIsTimeFlag + ",'" + HRelBeginTime + "','" + HRelEndTime +  "') ");
 
                     LogService.Write($"4.鏂板缁撴潫锛岀敤鏃�" + sw.Elapsed);
                     LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板宸ュ簭鍑虹珯鍗曟嵁:" + HBillNo);
@@ -473,7 +476,9 @@
                     ",HBackWorkByMaterQty=" + HBackWorkByMaterQty +
                     ",HMouldID=" + HMouldID +
                     ",HMachineWorkTimes=" + HMachineWorkTimes +
-                    ",HIsTimeFlag=" + HIsTimeFlag +
+                    //",HIsTimeFlag=" + HIsTimeFlag +
+                    //",HRelBeginTime='" + HRelBeginTime + "'" +
+                    //",HRelEndTime='" + HRelEndTime + "'" +
                     " where HInterID=" + HInterID);
 
                     LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",淇敼宸ュ簭鍑虹珯鍗曟嵁:" + HBillNo);
@@ -3259,7 +3264,86 @@
         }
         #endregion
 
+        #region 宸ュ簭姹囨姤鍗曟祦姘村彿鍥炶溅鑾峰彇宸ュ簭淇℃伅(甯﹀瓙搴忓垪)
+        [Route("Cj_StationOutBill/txtHProcNo_KeyDown")]
+        [HttpGet]
+        public object txtHProcNo_KeyDown(string sBillNo, string sProcNo,string HSEQNumber)
+        {
+            try
+            {
+                if (sBillNo.Equals("") || sProcNo.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "[0000-2-019]鏉″舰鐮佷笉鑳戒负绌猴紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
+                //寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃讹級
+                ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList_Sec  where 鍗曟嵁鍙�= '" + sBillNo + "' and 涓嬮亾娴佽浆宸ュ簭<>'杞�' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1  and 宸ュ簭鍙�='" + sProcNo + "' and 搴忓垪鍙�='"+ HSEQNumber+"'", "h_v_Sc_ProcessExchangeBillList_Sec");
+                //Ds = oCn.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where 鍗曟嵁鍙�= '" + sBillNo + "' and 宸ュ簭鍙�='" + sProcNo + "' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 ", "h_v_Sc_ProcessExchangeBillList");
+                //鍐欏叆淇℃伅
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "[3790-2-013]宸ュ簭鍙烽敊璇垨鑰呭綋鍓嶅伐搴忓彿涓嶅厑璁歌繘绔欙紝璇烽噸鏂拌緭鍏ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "[0000-1-037]Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宸ュ簭姹囨姤鍗曡幏鍙栧搴旀墍浠ュ簭鍒�
+        [Route("Cj_StationOutBill/getAllHSEQ")]
+        [HttpGet]
+        public object getAllHSEQ(string HInterID)
+        {
+            try
+            {
+                //寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃�
+                ds = oCN.RunProcReturn("select * from Sc_ProcessExchangeBillSEQ  where HInterID= " + HInterID, "Sc_ProcessExchangeBillSEQ");
+                
+                //鍐欏叆淇℃伅
+                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 = "[0000-1-037]Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "[0000-1-038]Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
 
         #region //鏄惁琚叧鑱�
         public bool Cj_StationInBillisUse(Int64 lngBillKey, ref string sReturn)
@@ -4237,5 +4321,49 @@
             }
         }
         #endregion
+
+
+        #region 宸ュ簭姹囨姤鍗曞悓姝ヨ嚦閲戣澏浜�
+
+        /// <summary>
+        /// 宸ュ簭姹囨姤鍗曞悓姝ヨ嚦閲戣澏浜�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Cj_StationOutBill/set_SaveStationOutBill_CLD_Json")]
+        [HttpGet]
+        public object set_SaveStationOutBill_CLD_Json(Int64 HInterID, string HBillNo, string HMaker)
+        {
+            try
+            {
+                if (oWebs.set_SaveStationOutBill_CLD(HInterID, HBillNo, HMaker, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍚屾鑷抽噾铦朵簯澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1