From 2f21e4d7ef8c407e67a2f9880a0a6af3ad2e354f Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 07 二月 2022 22:09:03 +0800
Subject: [PATCH] 班组职员清单

---
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 113 insertions(+), 5 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 0f1321a..380e2ec 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -46,7 +46,7 @@
             string refSav = sArray[2].ToString();
             DBUtility.ClsPub.CurUserName = UserName;
             //淇濆瓨鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log_second("OA_ErrMsgBackBill_Edit", 1, true, DBUtility.ClsPub.CurUserName))
+            if (!DBUtility.ClsPub.Security_Log_second("OA_ErrMsgBackBill_Edit", 1, false, DBUtility.ClsPub.CurUserName))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -140,14 +140,24 @@
                         objJsonResult.data = 1;
                         return objJsonResult;
                     }
-                    string[] arrStr = oItem.HCopyMan.Split(',');
-                   
-                    //鎺ユ敹浜鸿〃浣撴暟鎹�
+                    
+                    //string[] arrStr = oItem.HSendMan.Split(','); //鍙戦�佷汉
+                    //arrStr = oItem.HReceiveMan.Split(',');  //鎺ユ敹浜�
+                    string[] arrStr = oItem.HCopyMan.Split(',');  //鎶勯�佷汉
+                    List<string> b = new List<string>(arrStr);
+                    b.Add(oItem.HSendMan);
+                    b.Add(oItem.HReceiveMan);
+                    arrStr = b.ToArray();
+                    //鎶勯�佷汉琛ㄤ綋鏁版嵁
                     for (int i = 1; i <= arrStr.Length; i++)
                     {
                         Models.ClsOA_ErrMsgBackBillSub2 sb = new Models.ClsOA_ErrMsgBackBillSub2();
                         sb.HEntryID = i;
                         sb.HReceiveMan = arrStr[i - 1];
+                        if (arrStr[i-1].ToString() == oItem.HSendMan)
+                        {
+                            sb.HReadFlag = true;
+                        }
                         oBill.DetailColl2.Add(sb);
                     }
                     oBill.omodel = oItem;
@@ -231,7 +241,7 @@
             try
             {
                 //瀹℃牳鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -448,5 +458,103 @@
             return objJsonResult; ;
         }
         #endregion
+
+        #region [妯″叿鏀瑰埗鐢宠鍗曞垹闄ゅ姛鑳絔
+        /// <summary>
+        /// 妯″叿鏀瑰埗鐢宠鍗曞垹闄ゅ姛鑳�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sc_MESTransFerWorkBill/Get_DeleteTransFerBill")]
+        [HttpGet]
+        public object Get_DeleteTransFerBill(string HInterID,string HEntryID, string user)
+        {
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log_second("OA_ErrMsgBackBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            string s = "";
+            Int64 lngBillKey = 0;
+            try
+            {
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+                if (lngBillKey == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                DLL.ClsOA_ErrMsgBackBill oBill = new DLL.ClsOA_ErrMsgBackBill();
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                    if (oBill.omodel.HBillStatus > 1)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (!DBUtility.Xt_BaseBillFun.Fun_AllowDeleteBill(oBill, ref s))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = s;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    bool IsDete = oBill.DeleteBill(lngBillKey, HEntryID, ref DBUtility.ClsPub.sExeReturnInfo);
+                    if (IsDete)
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+        }
+
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1