From 2d48ef89adb68d4f1da724c5e721a6431476df3f Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 06 九月 2022 16:28:10 +0800
Subject: [PATCH] noting

---
 WebAPI/Controllers/POStockInBillController.cs |   53 +++++++++++++++++++++++++++++------------------------
 1 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index da59411..fec76fe 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -709,6 +709,7 @@
                 websLsmain.HDeptID = lsmain[0].HDeptID;
                 websLsmain.HWHID = lsmain[0].HWHID;
                 websLsmain.HSCWHID = 0;
+                //websLsmain.HSPID = lsmain[0].HSPID;
                 websLsmain.HSupID = lsmain[0].HSupID;
                 websLsmain.HKeeperID = lsmain[0].HKeeperID;
                 websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
@@ -716,11 +717,13 @@
                 websLsmain.HManagerID = 0;
                 websLsmain.HBillerID = lsmain[0].HBillerID;
                 websLsmain.HRemark = "";
+                websLsmain.HExplanation = lsmain[0].HExplanation;
                 websLsmain.HInnerBillNo = "";
                 websLsmain.HRedBlueFlag = false;//false钃濆瓧 true绾㈠瓧
                 websLsmain.HMainSourceBillType = lsmain[0].HBillType;
-                websLsmain.HExplanation = lsmain[0].HExplanation;
-
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
 
                 if (webserver.set_SavePOStockInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                 {
@@ -1000,25 +1003,27 @@
         {
             try
             {
-                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
-                string sql = $"select * from H_v_SRM_POInStockBillList where 鍗曟嵁鍙� ='{HBillno}'";
-                ds = oCn.RunProcReturn(sql, "H_v_SRM_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;
-                }
+                json result = Get_ReciveBillCheckDate(HBillno);
+                return result;
+                //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+                //string sql = $"select * from H_v_SRM_POInStockBillList where 鍗曟嵁鍙� ='{HBillno}'";
+                //ds = oCn.RunProcReturn(sql, "H_v_SRM_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)
             {
@@ -1172,7 +1177,7 @@
                                 };
                                 var loginRet = InvokeHelper.Login();
                                 var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
-                                if (isSuccess == 0)
+                                if (isSuccess <= 0)
                                 {
                                     objjson.code = "0";
                                     objjson.count = 0;
@@ -1328,7 +1333,7 @@
                                 };
                                 var loginRet = InvokeHelper.Login();
                                 var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
-                                if (isSuccess == 0)
+                                if (isSuccess < 0)
                                 {
                                     objjson.code = "0";
                                     objjson.count = 0;
@@ -1336,7 +1341,7 @@
                                     objjson.data = null;
                                     return objjson;
                                 }
-                                LogService.Write("jsonRoot:" + jsonRoot.ToString());
+                                //LogService.Write("jsonRoot:" + jsonRoot.ToString());
                                 var result = InvokeHelper.Save("PUR_ReceiveBill", jsonRoot.ToString());
                                 //LogService.Write(result);
                                 if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE")

--
Gitblit v1.9.1