From ae62b414caec3bcff3c67c2b0207857c9e768f7f Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 07 四月 2023 14:53:34 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/BarCodeController.cs |   72 +++++++----------------------------
 1 files changed, 15 insertions(+), 57 deletions(-)

diff --git a/WebAPI/Controllers/BarCodeController.cs b/WebAPI/Controllers/BarCodeController.cs
index 9665667..53f2a0a 100644
--- a/WebAPI/Controllers/BarCodeController.cs
+++ b/WebAPI/Controllers/BarCodeController.cs
@@ -525,14 +525,14 @@
 
                 foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls)
                 {
-                    if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false)
-                    {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 0;
-                        objJsonResult.Message = "宸插瓨鍦ㄦ潯鐮侊紝涓嶅厑璁搁噸澶嶇敓鎴愶紒";
-                        objJsonResult.data = null;
-                        return objJsonResult;
-                    }
+                    //if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false)
+                    //{
+                    //    objJsonResult.code = "0";
+                    //    objJsonResult.count = 0;
+                    //    objJsonResult.Message = "宸插瓨鍦ㄦ潯鐮侊紝涓嶅厑璁搁噸澶嶇敓鎴愶紒";
+                    //    objJsonResult.data = null;
+                    //    return objJsonResult;
+                    //}
                     if (msg2 != string.Empty)
                     {
                         if (oItemSub.HBQty == 0 || oItemSub.HMinQty == 0)
@@ -605,7 +605,7 @@
                             }
                             //TM = "B" + TM;
                             TM = "SRM" + "B" + TM;
-                          
+
                             if (HSumQty - HMinQty > 0)
                             {
                                 WeiShu = "";
@@ -899,7 +899,6 @@
 
                 List<Model.ClsGy_MaterialList_WMS_Model> ls = new List<Model.ClsGy_MaterialList_WMS_Model>();
                 List<Model.ClsGy_BarCodeBill_WMS_Model> ls2 = new List<Model.ClsGy_BarCodeBill_WMS_Model>();
-                List<Model.ClsGy_BarCodeBill_WMS_Model> ls3 = new List<Model.ClsGy_BarCodeBill_WMS_Model>();
                 ls = oListModels.getObjectByJson_MaterialList(msg3);
 
                 foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls)
@@ -1028,37 +1027,6 @@
                                     + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')";
                         oCn.RunProc(sql);
                         sql = "exec setLSH '" + DateTime.Today + "'";
-                        oCn.RunProc(sql);
-                    }
-                }
-                foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls3)
-                {
-                    //LogService.Write("寰幆绗笁娆�:" + oItemSub.HSupID);
-                    if (ClsPub.isLong(oItemSub.HMaterID) != 0)
-                    {
-                        HBarCode = oItemSub.HBarCode.ToString();
-                        HMTONO = ClsPub.isStrNull(oItemSub.HMTONO);
-                        HBarCodeType = "绠卞彿鍐呮潯鐮�";
-                        HMaterID = ClsPub.isLong(oItemSub.HMaterID);
-                        HUnitID = ClsPub.isLong(oItemSub.HUnitID);
-                        HQty2 = ClsPub.isDoule(oItemSub.HQty);
-                        HBatchNo = ClsPub.isStrNull(oItemSub.HBatchNo);
-                        HSupID = oItemSub.HSupID;
-                        HKFPeriod = ClsPub.isInt(oItemSub.HKFPeriod);
-                        HKFDate = ClsPub.isStrNull(oItemSub.HKFDate);
-                        HKFDQDate = ClsPub.isStrNull(oItemSub.HKFDQDate);
-                        HSourceInterID = ClsPub.isLong(oItemSub.HSourceInterID);
-                        HSourceEntryID = ClsPub.isLong(oItemSub.HSourceEntryID);
-                        HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo);
-                        HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType);
-                        HWei = ClsPub.isStrNull(oItemSub.HEndQty);
-                        string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" +
-                                    ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" +
-                                    ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " +
-                                    ") values ("
-                                    + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate
-                                    + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1"
-                                    + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')";
                         oCn.RunProc(sql);
                     }
                 }
@@ -1367,29 +1335,19 @@
         /// <param name="OnePage"></param>
         /// <returns></returns>
         [Route("GetBarCodeShowList")]
-        [HttpGet]
-        public object GetBarCodeShowList(string HSupNo, string sqlWhere)
+        [HttpPost]
+        public object GetBarCodeShowList([FromBody] JObject msg)
         {
-            string msg = "";
+            string HSupNo = msg["HSupNo"].ToString(); string sqlWhere = msg["sqlWhere"].ToString();
             try
             {
                 string VsWhere = "";
                 string PcWhere = "";
                 SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM();
                 DataSet ds;
-                //鍏朵粬杩囨护
-                if (msg.Trim() == "")
-                {
-                    msg = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 鐢ㄦ埛=''" + HSupNo.Trim() + "'') " + sqlWhere;
-                    // msg = " Where   hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)";
-                }
-                else
-                {
-                    msg = msg + " and   hsupid in (select HSupID from h_v_Gy_UserSupplierList where 鐢ㄦ埛=''" + HSupNo.Trim() + "'') " + sqlWhere;
-                    // msg = msg + " Where   hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)";
-                }
-                //杞崲鐗规畩瀛楃
-                if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false)
+                string sql = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 鐢ㄦ埛=''" + HSupNo.Trim() + "'') " + sqlWhere;
+
+                if (Common.SQLtoChange(sql, ref VsWhere, ref PcWhere) == false)
                 {
                     objjson.code = "0";
                     objjson.count = 0;

--
Gitblit v1.9.1