From 85170f9ab975d8e2dccbbf97f8f4dc7bbf4fafaa Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 24 五月 2024 15:50:34 +0800
Subject: [PATCH] 2.自动组托界面:  (已完成)初始化页面时,若当前托条码存在组托记录,则取第一个子条码中的物料获取组托数量。  同时记录条码中的源单主ID、子ID  (已完成)扫描子条码时,判断当前子条码是否是第一个,如果是的话,根据条码中的物料获取组托数量。   同时记录条码中的源单主ID、子ID  (已完成)自动组托时,组托完成后,将组托数量清空。         同时清空记录的源单主ID、子ID

---
 WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs |   94 +++++++++++++++++++++++++++--------------------
 1 files changed, 54 insertions(+), 40 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
index 03f0323..abc342f 100644
--- a/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_ReceivableBillController.cs
@@ -38,14 +38,14 @@
             {
                 List<object> columnNameList = new List<object>();
                 //鏌ョ湅鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
@@ -105,14 +105,14 @@
             try
             {
                 //缂栬緫鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log_second("Xs_ReceivableBill_Edit", 1, false, msg4))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log_second("Xs_ReceivableBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 DAL.ClsXs_ReceivableBill oBill = new DAL.ClsXs_ReceivableBill();
                 List<Model.ClsXs_ReceivableBillMain> lsmain = new List<Model.ClsXs_ReceivableBillMain>();
@@ -301,14 +301,14 @@
                 string s = "";
 
                 //鏌ョ湅鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Drop", 1, false, user))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log("Xs_ReceivableBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
                 if (HInterID == null || HInterID.Equals(""))
                 {
@@ -362,6 +362,20 @@
 
 
                 oCN.BeginTran();
+
+                ds = oCN.RunProcReturn("select * from h_v_Xs_ReceivableBillList_Query where hmainid=" + HInterID, "h_v_Xs_ReceivableBillList_Query");
+                string hSourceBillType = ds.Tables[0].Rows[0]["HSourceBillType"].ToString();
+                if (hSourceBillType == "1401")
+                {
+                    //搴旀敹鍗� 鍒犻櫎鍥炲~ 閿�鍞鍗� 鍏宠仈鏁伴噺
+                    oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToPOStockIn_Del " + HInterID);
+                }
+                else if (hSourceBillType == "1205")
+                {
+                    //搴旀敹鍗� 鍒犻櫎鍥炲~ 閿�鍞嚭搴撳崟 鍏宠仈鏁伴噺
+                    oCN.RunProc("exec h_p_Xs_UpDateRelation_ICStockoPOStockIn_Del	 " + HInterID);
+                }
+
 
                 oCN.RunProc("delete from Xs_ReceivableBillMain where HInterID = " + HInterID);
                 oCN.RunProc("delete from Xs_ReceivableBillSub where HInterID= " + HInterID);
@@ -427,14 +441,14 @@
             try
             {
                 //瀹℃牳鏉冮檺
-                //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 //HInterID鏁版嵁鍒ゆ柇
                 if (HInterID <= 0)
                 {
@@ -631,14 +645,14 @@
             try
             {
                 //妫�鏌ユ潈闄�
-                //if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
-                //{
-                //    objJsonResult.code = "0";
-                //    objJsonResult.count = 0;
-                //    objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�";
-                //    objJsonResult.data = null;
-                //    return objJsonResult;
-                //}
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 //HInterID鏁版嵁鍒ゆ柇
                 if (HInterID <= 0)
                 {

--
Gitblit v1.9.1