From 481c3fdeda9ee782807ae770a4d78e1eb0b73ce6 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 04 二月 2026 10:17:07 +0800
Subject: [PATCH] 小卫组托缓存列表,小卫组托修复,app小卫拆箱

---
 WebAPI/Controllers/CJGL/Cj_SingleStationController.cs |  116 +++++++++++++++++++++++++++++
 WebAPI/Controllers/条码管理/WEBSController.cs             |   23 +++++
 WebAPI/Controllers/CJGL/Cj_CheckBarcodeController.cs  |   57 ++++++++++++++
 3 files changed, 196 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_CheckBarcodeController.cs b/WebAPI/Controllers/CJGL/Cj_CheckBarcodeController.cs
index 37b8e55..66a42cd 100644
--- a/WebAPI/Controllers/CJGL/Cj_CheckBarcodeController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_CheckBarcodeController.cs
@@ -122,5 +122,62 @@
         }
 
         #endregion
+
+        #region 鎷嗙灏忓崼
+        [Route("CheckBarcodeController/UnpackMiddleBox")]
+        [HttpGet]
+        public object UnpackMiddleBox(string HBarCode_Middle,int signal,string HMaker,string HDate)
+        {
+            try
+            {
+                if(signal==1)//鎵爜
+                {
+                    DataSet ds = oCn.RunProcReturn("select a.HCaseCode 涓鐮�,a.HBarCode 瀵瑰簲鐨凷N鐮�,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О from Gy_CaseCodeRelation a left join Gy_Material b on a.HMaterID=b.HItemID where HCaseCode='" + HBarCode_Middle + "'", "Gy_CaseCodeRelation");
+                    if (ds.Tables[0].Rows[0]["涓鐮�"].ToString() =="" || ds == null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鏉$爜涓嶅瓨鍦紒璇锋鏌ユ槸鍚﹁绠�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+
+                }
+                else
+                {
+                    oCn.BeginTran();
+                    oCn.RunProc("delete from Gy_CaseCodeRelation where HCaseCode='"+ HBarCode_Middle+"'");
+                    DataSet dss = oCn.RunProcReturn("select * from Gy_BarCodeBill where HBarCode=' "+ HBarCode_Middle + "'", "Gy_BarCodeBill");
+                    if(dss!=null&&dss.Tables.Count>0)
+                    {
+                        oCn.RunProc("delete from Gy_BarCodeBill where HBarCode='"+ HBarCode_Middle + "'");
+                    }
+                    oCn.RunProc("insert into System_log VALUES('"+ HDate + "','"+HMaker+"','',"+ "'灏忓崼鎷嗙鏉$爜"+ HBarCode_Middle + "',"+ "'APP-涓鐮佹媶绠�'"+",'',"+ "'鍒犻櫎鏉$爜')");
+                    oCn.Commit();
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+               
+                
+            }
+            catch (Exception)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "閿欒璇疯仈绯荤鐞嗗憳";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 538830e..88a8f8f 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -3777,6 +3777,122 @@
         }
         #endregion
 
+        #region 灏忓崼缁勬墭缂撳瓨 鏌ヨ
+        [Route("Cj_SingleStation/xiaoweizutuo_CacheList")]
+        [HttpGet]
+        public object xiaoweizutuo_CacheList(string sWhere, string user, string gnsy)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (gnsy != "" && gnsy != null)
+                {
+                    //鏌ョ湅鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(gnsy, 1, false, user))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sc_PackUnionBill_Temp" +
+                        " order by 鏍堟澘鐮� desc,涓鐮�,SN鐮�", "h_v_Sc_PackUnionBill_Temp");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sc_PackUnionBill_Temp where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鏍堟澘鐮� desc,涓鐮�,SN鐮�";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sc_PackUnionBill_Temp");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 灏忓崼缁勬墭缂撳瓨 鍒犻櫎
+        /// <summary>
+        ///鍙傛暟锛歴tring HInterID銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Cj_SingleStation/deleteBill")]
+        [HttpGet]
+        public object deleteBill(string HInterID, string user,string gnsy)
+        {
+            try
+            {
+                if (gnsy != "" && gnsy != null)
+                {
+                    //鏌ョ湅鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(gnsy, 1, false, user))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                if (HInterID == null || HInterID.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                oCN.RunProc("delete from Sc_PackUnionBill_Temp where HInterID = " + HInterID);
+                
+
+                oCN.Commit();
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #endregion
 
     }
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index ed05dcf..a7dd296 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -9068,6 +9068,29 @@
 
         #endregion
 
+        #region 鏍规嵁sn鐮佸鎵惧搴旂殑涓鐮�
+        [Route("WEBSController/getMiddleCodeBySn")]
+        [HttpGet]
+        public object getMiddleCodeBySn(string HBarCode,int HStockOrgID)
+        {
+            DataSet dss = oCn.RunProcReturn("select * from Gy_CaseCodeRelation where HBarCode='"+ HBarCode + "'", "Gy_CaseCodeRelation");
+
+            if (dss.Tables[0].Rows[0]["HCaseCode"].ToString() == "" || dss == null)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏈壘鍒皊n鐮佹墍瀵瑰簲鐨勪腑绠辩爜";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            objJsonResult.code = "1";
+            objJsonResult.count = 1;
+            objJsonResult.Message = "鎴愬姛";
+            objJsonResult.data = dss.Tables[0];
+            return objJsonResult;
+        }
+        #endregion
+
         #endregion
 
 

--
Gitblit v1.9.1