From 0709c335d0a3692962ddac55c133de0d24126eba Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 25 四月 2024 16:15:54 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs |  107 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 105 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 347a03c..134f9dc 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1209,8 +1209,11 @@
                     //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
                     //oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
                     //oItemSub.HRelationMoney = 0;   //鍏宠仈閲戦 
-                    oBill.DetailColl.Add(oItemSub);
 
+                    if (oItemSub.HMaterID != 0)
+                    {
+                        oBill.DetailColl.Add(oItemSub);
+                    }
                 }
                 //淇濆瓨
                 //淇濆瓨瀹屾瘯鍚庡鐞�
@@ -1491,6 +1494,18 @@
                             objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
                             objJsonResult.data = null;
                             return objJsonResult;
+                        }
+
+                        foreach(Model.ClsXs_SeOrderBillSub oSub in oBill.DetailColl)
+                        {
+                            if (oSub.HCloseMan != "")
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍗曟嵁涓瓨鍦ㄨ鍏抽棴鐨勮褰�!鍙嶅鏍稿け璐ワ紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
                         }
                     }
                 }
@@ -2226,7 +2241,7 @@
                 }
                 else
                 {
-                    sWhere = " and HCusID in (select hcusid from Gy_UserCustomerRelation Where HUserID = '" + CurUserID + "') ";
+                    sWhere = " and HCusID in (select hcusid from Gy_UserCustomerRelation Where HUserID = '" + CurUserID + "' union all select 166351 hcusid)";
                 }
 
                 objJsonResult.code = "1";
@@ -2460,5 +2475,93 @@
             }
         }
         #endregion
+
+        #region 閿�鍞鍗� 鏍规嵁鑱屽憳鑾峰彇閮ㄩ棬銆佷富绠�
+        [Route("Xs_SeOrderBill/getEmpInfoByHEmpID")]
+        [HttpGet]
+        public object getEmpInfoByHEmpID(long HEmpID)
+        {
+            try
+            {
+                string sql = "select a.HItemID HEmpID,a.HName HEmpName,ISNULL(a.HDeptID,0) HDeptID,b.HName HDeptName,ISNULL(b.HEmpID,0) HManagerID,c.HName HManagerName " +
+                    " from Gy_Employee as a " +
+                    " left join Gy_Department as b on a.HDeptID = b.HItemID " +
+                    " left join Gy_Employee as c on b.HEmpID = c.HItemID " +
+                    " where a.HItemID = " + HEmpID;
+                ds = oCN.RunProcReturn(sql, "Gy_Employee");
+
+
+                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
+
+        #region 閿�鍞鍗� 鑾峰彇鎺掑簭鍚庣殑鏁版嵁
+        [Route("Xs_SeOrderBill/sortList")]
+        [HttpGet]
+        public object sortList(string sWhere, string user)
+        {
+            try
+            {
+                //鍒ゆ柇鏌ヨ鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 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_IF_SeOrderBillList order by hmainid desc", "h_v_IF_SeOrderBillList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_IF_SeOrderBillList where 1 = 1 ";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList");
+                }
+
+                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