From 099c78d289f33f38faceeecaeb86d92f1e6c9945 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 02 七月 2025 16:20:58 +0800
Subject: [PATCH] 新增PDA装箱、组托、拆箱、拆托模块相关调用方法,凯贝超聚变客户条码生成规则变更

---
 WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs |   77 +++++++++++++++++++++++++++++++-------
 1 files changed, 63 insertions(+), 14 deletions(-)

diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index fd066c8..efaf9ba 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -38,7 +38,7 @@
             try
             {
 
-                ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList where hmainid=" + HInterID, "h_v_IF_POInStockBillList");
+                ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillEdit where hmainid=" + HInterID, "h_v_IF_POInStockBillList");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
@@ -646,10 +646,22 @@
                     }
 
                     string sql= $@"update Cg_POInStockBillMain  set " +
-                                "HRemark='" + HRemark + "', HUpDater ='" + HMaker + "', HUpDateDate=getdate()"+ ",HBillNo='" + HBillNo + "'" +
-                                ",HSupID=" + HSupID + ",HCurID=" + HCurID
-                                 + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
-                                 + ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "',HProjectID="+ HProjectID + ",HInvoiceBillNo='"+ HInvoiceBillNo + "' where HInterID=" + HInterID;
+                                "HRemark='" + HRemark + "'" +
+                                ", HUpDater ='" + HMaker + "'" +
+                                ", HUpDateDate=getdate()"+ "" +
+                                ",HBillNo='" + HBillNo + "'" +
+                                ",HWHID=" + HWHID + "" +
+                                ",HSupID=" + HSupID + "" +
+                                ",HCurID=" + HCurID + "" +
+                                ",HExRate=" + HExRate + "" +
+                                ",HEmpID=" + HEmpID + "" +
+                                ",HManagerID=" + HManagerID + "" +
+                                ",HDeptID=" + HDeptID + "" +
+                                ",HAddress='" + HAddress + "'" +
+                                ",HInnerBillNo='" + HInnerBillNo + "'" +
+                                ",HProjectID="+ HProjectID + "" +
+                                ",HInvoiceBillNo='"+ HInvoiceBillNo + "' " +
+                                " where HInterID=" + HInterID;
 
                     oCN.RunProc(sql);
 
@@ -775,14 +787,14 @@
             foreach (ClsCg_POInStockBillSub oSub in DetailColl)
             {
                 i++;
-                if (oSub.HQty <= 0 || oSub.HQty == null)
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "绗�" + i + "琛岋紝鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
+                //if (oSub.HQty <= 0 || oSub.HQty == null)
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "绗�" + i + "琛岋紝鏁伴噺涓嶈兘涓�0鎴栬�呭皬浜�0";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
 
                 if (oSub.HMaterID == 0)
                 {
@@ -2689,7 +2701,7 @@
                 }
                 string sql = "select * from h_v_Cg_POInStockBillQuerySub where hmainid =  " + hmainid;
 
-                ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Cg_POInStockBillQuerySub");
+                ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_Cg_POInStockBillQuerySub");
 
 
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -2716,5 +2728,42 @@
             }
         }
         #endregion
+
+        #region 鏀舵枡閫氱煡鍗昣PDA 鏍规嵁鍗曟嵁鍙锋潯鐮佹壂鎻忚幏鍙栦富瀛愯〃鏁版嵁
+        [Route("Cg_POInStockBill/GetCg_POInStockBill_PDA")]
+        [HttpGet]
+        public object GetCg_POInStockBill_PDA(string HBillNo)
+        {
+            try
+            {
+
+                ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList where 鍗曟嵁鍙� ='"+ HBillNo+"'" , "h_v_IF_POInStockBillList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌婧愬崟淇℃伅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    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