From e11e9f587dd58f06df076b4b95141d50019e0ba0 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 18 十一月 2024 16:38:08 +0800
Subject: [PATCH] 钉钉OA导入异常工时单

---
 WebAPI/Controllers/SellOutController.cs |   80 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 73 insertions(+), 7 deletions(-)

diff --git a/WebAPI/Controllers/SellOutController.cs b/WebAPI/Controllers/SellOutController.cs
index 3e0e9a6..a4c8e17 100644
--- a/WebAPI/Controllers/SellOutController.cs
+++ b/WebAPI/Controllers/SellOutController.cs
@@ -146,7 +146,43 @@
                 return objJsonResult;
             }
         }
+        //宸蹭笂浼犳煡璇�
+        [Route("Web/QueryBillUpdateLoad_Json")]
+        [HttpGet]
+        public object QueryBillUpdateLoad_Json(string BillType, string HBillNo, string HSourceBillNo)
+        {
+            try
+            {
+                ds = webserver.GetQueryBillUpdateLoad_Json(BillType, HBillNo, HSourceBillNo);
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
 
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                    //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
 
 
         [Route("SellOut/GetMAXNum")]
@@ -341,11 +377,11 @@
         //閿�鍞嚭搴�/鎵潯鐮�/鐩存帴璋僿ebservice
         [Route("SellOut/get_CheckTypeByBarCode_Json")]
         [HttpGet]
-        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
+        public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID, string HScanStyle)
         {
             //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
             string sExpressNumber = "";
-            WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+            WebSoBar = oWebs.get_CheckTypeByBarCode_New(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
             if (WebSoBar == null)
             {
                 objJsonResult.code = "0";
@@ -359,10 +395,37 @@
                 objJsonResult.code = "0";
                 objJsonResult.count = 1;
                 objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                objJsonResult.data = oBar;
+                objJsonResult.data = WebSoBar;
                 return objJsonResult;
             }
         }
+
+        //public object get_CheckTypeByBarCode_Json(string sCode, long sInterID, string HBillType, string sBillNo, string sMaker, long WhID, long SPID, double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, long HOWNERID)
+        //{
+        //    string hexpressNumber = "";
+        //    this.WebSoBar = this.oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, hexpressNumber, ref ClsPub.sErrInfo);
+        //    bool flag = this.WebSoBar == null;
+        //    object result;
+        //    if (flag)
+        //    {
+        //        this.objJsonResult.code = "0";
+        //        this.objJsonResult.count = 0;
+        //        this.objJsonResult.Message = ClsPub.sErrInfo;
+        //        this.objJsonResult.data = null;
+        //        result = this.objJsonResult;
+        //    }
+        //    else
+        //    {
+        //        this.objJsonResult.code = "0";
+        //        this.objJsonResult.count = 1;
+        //        this.objJsonResult.Message = ClsPub.sErrInfo;
+        //        this.objJsonResult.data = this.oBar;
+        //        result = this.objJsonResult;
+        //    }
+        //    return result;
+        //}
+
+
         /// <summary>
         /// 杩斿洖鍑哄叆搴撴潯鐮佷复鏃惰〃     
         /// </summary>
@@ -521,8 +584,8 @@
                 List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>();
                 ListModels oListModels = new ListModels();
                 lsmain = oListModels.getSellOutBillMainByJson(msg1);
-                lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
-                lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+                //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                 lsmain[0].HRedBlueFlag = false;
                 string sSourceBillType = lsmain[0].HBillType;
 
@@ -535,12 +598,14 @@
                 websLsmain.HEmpID = lsmain[0].HEmpID;
                 websLsmain.HRemark = lsmain[0].HRemark;
                 websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HKeeperID= lsmain[0].HKeeperID;
+                websLsmain.HBillType = "1205";//鍥哄畾鍊�
 
                 if (webserver.set_SaveSellOutBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
-                    objJsonResult.Message = "鐢熸垚閿�鍞嚭搴撳崟鎴愬姛锛佸崟鎹彿涓猴細";
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -548,7 +613,8 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                    //objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
                     objJsonResult.data = null;
                     return objJsonResult;
                 }

--
Gitblit v1.9.1