From 5ef8aa1b6a44c788c8d89f6842eda7a6a7bb8e08 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期六, 02 七月 2022 09:48:54 +0800
Subject: [PATCH] 森楷扫描物料条码完善

---
 CLOUDWEB/WebService1.asmx.cs |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 58 insertions(+), 1 deletions(-)

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 8b57615..3333454 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -34309,6 +34309,11 @@
                             sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                             return null;
                         }
+                        else if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 2)
+                        {
+                            sErrMsg = "姝ゆā鍧椾笉鍏佽鍙嶅悜鎷嗙爜锛�";
+                            return null;
+                        }
                         else
                         {
                             if (HBillType == "1203")
@@ -36229,8 +36234,51 @@
                             sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                             return null;
                         }
+                        else if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 2)
+                        {
+                            sErrMsg = "姝ゆā鍧椾笉鍏佽鍙嶅悜鎷嗙爜锛�";
+                            return null;
+                        }
                         else
                         {
+                            if (HBillType == "1203")
+                            {
+                                HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]);
+                                HSourceBillType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillType"]);
+                                //oBar = get_SourceBarCode_OtherIn(HBillID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HOWNERID, ref sErrMsg);
+                                //if (oBar == null)
+                                //{
+                                //    return null;
+                                //}
+                                //SourceFlag = true;
+
+                                Int64 sMulSourceFlag = 0;   //澶氭簮鍗曟爣蹇楋紙0涓洪潪澶氭簮鍗曟ā寮忥紝1涓哄婧愬崟妯″紡锛�
+                                if (oSystemParameter.omodel.Kf_OtherInBill_MulSourceBill.ToUpper() == "Y") //绯荤粺鍙傛暟  鍏朵粬鍏ュ簱鍗�-澶氭簮鍗曟ā寮�
+                                {
+                                    sMulSourceFlag = 1;
+                                }
+
+                                //灏嗘簮鍗曚俊鎭瓨鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛�
+                                DataSet dsyd = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OtherIn " + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_OtherIn");
+                                if (dsyd == null || dsyd.Tables[0].Rows.Count == 0)
+                                {
+                                    sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涘皢鏉$爜瀵瑰簲婧愬崟淇℃伅瀛樺叆鏉$爜鍑哄叆搴撲复鏃惰〃澶辫触锛�";
+                                    return null;
+                                }
+                                else
+                                {
+                                    if (DBUtility.ClsPub.isLong(dsyd.Tables[0].Rows[0][0]) == 0)
+                                    {
+                                        SourceFlag = true;
+                                    }
+                                    else
+                                    {
+                                        sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛�" + DBUtility.ClsPub.isStrNull(dsyd.Tables[0].Rows[0]["HRemark"]);
+                                        return null;
+                                    }
+                                }
+                            }
+
                             for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                             {
                                 sBarCode_New = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]);
@@ -36242,7 +36290,6 @@
                                     oBar.HSupName = sHSupName;
                                     oBar.HDeptID = sHDeptID;
                                     oBar.HDeptName = sHDeptName;
-                                    SourceFlag = true;
                                 }
                                 else
                                 {
@@ -37029,6 +37076,16 @@
                                     sErrMsg = "鑾峰彇鏁存墭鏉$爜淇℃伅鍙戠敓閿欒锛�";
                                     return null;
                                 }
+                                if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
+                                {
+                                    sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
+                                    return null;
+                                }
+                                else if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 2)
+                                {
+                                    sErrMsg = "姝ゆā鍧椾笉鍏佽鍙嶅悜鎷嗙爜锛�";
+                                    return null;
+                                }
                                 else
                                 {
                                     for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)

--
Gitblit v1.9.1