From 28f99afc92f67b372df91f1205a3dd8c2ff7be6e Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 06 九月 2021 16:38:15 +0800
Subject: [PATCH] nothing

---
 WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs |   98 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 96 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs b/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs
index 641a583..be96551 100644
--- a/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs
@@ -18,6 +18,8 @@
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
         DataSet ds;
+        //鑾峰彇绯荤粺鍙傛暟
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
 
 
         /// <summary>
@@ -68,8 +70,6 @@
             }
         }
 
-
-
         //
 
         #region  鎶ュ伐骞冲彴涓婃枡闃查敊鍗曞脊绐楁煡鎵炬暟鎹�
@@ -111,5 +111,99 @@
             return objJsonResult;
         }
         #endregion
+
+        #region 鎶ュ伐骞冲彴涓婃枡闃查敊涓�閿壂鐮佹柟娉�
+        [Route("Sc_MaterToSourceBill/get_CheckTypeByBarCode_Json")]
+        [HttpGet]
+        public object get_CheckTypeByBarCode_Json(string HBarCode,string HSourceID)
+        {
+            
+            //鏍规嵁閫掑叆鐨勬潯鐮佸墠涓変綅锛屽垽鏂潯鐮佺被鍨嬶紙鐢熶骇璧勬簮銆佺墿鏂欐潯鐮侊級
+            ds = oCN.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType where HSourceNumber= '" + HBarCode.Substring(0, 3) + "'", "Xt_BarCodeType");
+
+            //鏃犺繑鍥炴暟鎹垯涓虹墿鏂欐潯鐮�
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                 //1.鏌ヨ鏉″舰鐮佸湪鏉$爜妗f琛ㄤ腑鏄惁瀛樺湪
+                 //2.鍖归厤鐢ㄦ枡娓呭崟鐨勭墿鏂欑紪鐮佹槸鍚︿竴鑷�
+
+            }
+            else
+            {
+                string sBarBillName = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceName"]);
+                string sBarBillType = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["BarCodeType"]);
+
+                //鍒ゆ柇鏉$爜绫诲瀷涓� 鍩虹璧勬枡鏉$爜 鎴� 婧愬崟鏉$爜
+                if (sBarBillType == "鍩虹璧勬枡鏉$爜")
+                {
+        
+                    //閮ㄩ棬鏉$爜
+                    if (sBarBillName == "鐢熶骇璧勬簮")
+                    {
+                        DAL.ClsGy_Source_View dal = new DAL.ClsGy_Source_View();
+                        //灏嗛�掑叆鐨勬潯鐮佸幓鎺夊墠涓変綅鍚庤浆鍖栨垚鏁村舰
+                        int ID;
+                        if (int.TryParse(HBarCode.Remove(0, 3), out ID))
+                        {
+                            if (int.Parse(HSourceID)!= ID)
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鐢熶骇璧勬簮鏉$爜涓庣敓浜ц鍗曠粦瀹氳祫婧愪笉鍖归厤锛�";
+                                return objJsonResult;
+                            }
+                            else
+                            {
+                                if (dal.GetInfoByID(ID))
+                                {
+                                    objJsonResult.code = "1";
+                                    objJsonResult.count = 1;
+                                    objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�";
+                                    objJsonResult.Verify = "璧勬簮鏉$爜";
+                                    objJsonResult.data = dal;
+                                    return objJsonResult;
+                                }
+                                else
+                                {
+                                    objJsonResult.code = "0";
+                                    objJsonResult.count = 0;
+                                    objJsonResult.Message = "鏃犳晥璧勬簮鏉$爜锛�";
+                                    return objJsonResult;
+                                }
+                            }
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "閿欒鐨勯儴闂ㄦ潯鐮侊紒";
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鏃犳晥鍩虹璧勬枡鏉$爜锛�";
+                        return objJsonResult;
+                    }
+                }
+                //婧愬崟鏉$爜
+                else if (sBarBillType == "婧愬崟鏉$爜")
+                {
+                    
+                    
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳晥鏉$爜绫诲瀷锛�";
+                    return objJsonResult;
+                }
+            }
+            return objJsonResult;
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1