From fc33c3cd8feabef8b44f2b54279ab0469b760802 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 25 七月 2024 15:21:52 +0800
Subject: [PATCH] 新增PDA三点照合扫码记录单扫码模块调用方法,网页版三点照合扫码记录单列表模块调用方法

---
 WebAPI/Controllers/仓存管理/三点照合扫码记录单/WMS_CusBarCodeCheckBillController.cs |  340 ++++++++++++++++++++++++++++++
 WebAPI/Controllers/条码管理/WEBSController.cs                              |  263 +++++++++++++++++++++++
 WebAPI/Web.config                                                      |    4 
 DAL/DAL.csproj                                                         |    1 
 WebAPI/WebAPI.csproj.user                                              |    2 
 Model/Model.csproj                                                     |    1 
 WebAPI/Properties/PublishProfiles/FolderProfile.pubxml                 |    2 
 WebAPI/WebAPI.csproj                                                   |    1 
 DAL/WMS/ClsWMS_CusBarCodeCheckBill.cs                                  |   30 ++
 Model/WMS/ClsWMS_CusBarCodeCheckBillMain.cs                            |   11 +
 10 files changed, 651 insertions(+), 4 deletions(-)

diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 8171c57..edf88b5 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -87,6 +87,7 @@
     <Compile Include="ClsPM_CustomerTaskBillMain.cs" />
     <Compile Include="ClsGy_MaterialMouldBillMain.cs" />
     <Compile Include="ClsPM_WorkPlanMonthBillMain.cs" />
+    <Compile Include="WMS\ClsWMS_CusBarCodeCheckBill.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_TakeSampleCheckBill.cs" />
     <Compile Include="MES\ClsSc_SourceLineRepairBill.cs" />
     <Compile Include="MES\ClsSc_MESMaterToSourceBill .cs" />
diff --git a/DAL/WMS/ClsWMS_CusBarCodeCheckBill.cs b/DAL/WMS/ClsWMS_CusBarCodeCheckBill.cs
new file mode 100644
index 0000000..639c5b6
--- /dev/null
+++ b/DAL/WMS/ClsWMS_CusBarCodeCheckBill.cs
@@ -0,0 +1,30 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public  class ClsWMS_CusBarCodeCheckBill:DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsWMS_CusBarCodeCheckBillMain omodel = new Model.ClsWMS_CusBarCodeCheckBillMain();
+
+        public ClsWMS_CusBarCodeCheckBill()
+        {
+            base.MvarItemKeySub = "WMS_CusBarCodeCheckBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey="WMS_CusBarCodeCheckBillMain";
+            base.MvarReportTitle= "涓夌偣鐓у悎鎵爜璁板綍鍗�";
+            base.BillType= "1282";
+            base.HBillSubType = "1282";
+
+        }
+
+
+       
+        
+    }
+
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index bf54238..6e61b2f 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -138,6 +138,7 @@
     <Compile Include="CRM\ClsSec_ProductRepairBillMain.cs" />
     <Compile Include="CRM\ClsSec_ProductRepairBillSub.cs" />
     <Compile Include="CRM\ClsSec_ProductRepairBillSub1.cs" />
+    <Compile Include="WMS\ClsWMS_CusBarCodeCheckBillMain.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_RestDay_Model.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_TakeSampleCheckBillMain.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_TakeSampleCheckBillSub.cs" />
diff --git a/Model/WMS/ClsWMS_CusBarCodeCheckBillMain.cs b/Model/WMS/ClsWMS_CusBarCodeCheckBillMain.cs
new file mode 100644
index 0000000..6ea7f0e
--- /dev/null
+++ b/Model/WMS/ClsWMS_CusBarCodeCheckBillMain.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsWMS_CusBarCodeCheckBillMain : DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HDeptID;//     int     		--部门
+    }
+}
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\344\270\211\347\202\271\347\205\247\345\220\210\346\211\253\347\240\201\350\256\260\345\275\225\345\215\225/WMS_CusBarCodeCheckBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\344\270\211\347\202\271\347\205\247\345\220\210\346\211\253\347\240\201\350\256\260\345\275\225\345\215\225/WMS_CusBarCodeCheckBillController.cs"
new file mode 100644
index 0000000..a659136
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\344\270\211\347\202\271\347\205\247\345\220\210\346\211\253\347\240\201\350\256\260\345\275\225\345\215\225/WMS_CusBarCodeCheckBillController.cs"
@@ -0,0 +1,340 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+using System.Windows.Forms;
+
+namespace WebAPI.Controllers
+{
+    public class WMS_CusBarCodeCheckBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        public const string ModName = "1282";                   //鍗曟嵁绫诲瀷
+        public const string ModCaption = "涓夌偣鐓у悎鎵爜璁板綍鍗�";          //鍗曟嵁鍚嶇О
+        public const string ModRightName = "WMS_CusBarCodeCheckBill";
+        public const string ModRightNameList = ModRightName + "List";       //鍒楄〃
+        public const string ModRightNameEdit = ModRightName + "_Edit";      //缂栬緫
+        public const string ModRightNameCheck = ModRightName + "_Check";    //瀹℃牳
+        public const string ModRightNameClose = ModRightName + "_Close";    //鍏抽棴
+        public const string ModRightNameDelete = ModRightName + "_Delete";  //浣滃簾
+        public const string ModRightNameDrop = ModRightName + "_Drop";      //鍒犻櫎
+        public const string ModRightNameMoney = ModRightName + "_Money";    //閲戦
+        public const string ModRightNameQty = ModRightName + "_Qty";        //鏁伴噺
+        public DataSet ds = new DataSet();
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        public DAL.ClsWMS_CusBarCodeCheckBill oBill = new DAL.ClsWMS_CusBarCodeCheckBill();
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗曞垪琛�
+        /// <summary>
+        /// 鑾峰彇涓夌偣鐓у悎鎵爜璁板綍鍗曞垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WMS_CusBarCodeCheckBillController/GetWMS_CusBarCodeCheckBillList_Json")]
+        [HttpGet]
+        public object GetWMS_CusBarCodeCheckBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏉冮檺
+                if (OperationType == "1")
+                {
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                //杩斿洖鍒楄〃淇℃伅
+                ds = oCn.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName);
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗� 鍒犻櫎
+        /// <summary>
+        /// 鍒犻櫎涓夌偣鐓у悎鎵爜璁板綍鍗�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WMS_CusBarCodeCheckBillController/GetWMS_CusBarCodeCheckBill_Delete_Json")]
+        [HttpGet]
+        public object GetWMS_CusBarCodeCheckBill_Delete_Json(Int64 HInterID, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameDrop, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鍒犻櫎鍔熻兘鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒ゆ柇瀛樺湪鎬�
+                ds = oCn.RunProcReturn("select HBillNo from WMS_CusBarCodeCheckBillMain with(nolock) where HInterID=" + HInterID.ToString(), "WMS_CusBarCodeCheckBillMain");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ヤ笁鐐圭収鍚堟壂鐮佽褰曞崟锛岃鍒锋柊鏁版嵁鍚庨噸鏂伴�夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    //鍒犻櫎鍓嶆帶鍒�
+                    DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_WMS_CusBarCodeCheckBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_WMS_CusBarCodeCheckBill_BeforeDelCtrl");
+                    if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    //鍒犻櫎鍗曟嵁锛堝寘鍚垹闄ゅ悗鎺у埗銆佸啓鍏ユ棩蹇楋級
+                    if (!oBill.DeleteBill(HInterID, DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]), "h_p_WMS_CusBarCodeCheckBill_AfterDelCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍒犻櫎涓夌偣鐓у悎鎵爜璁板綍鍗曟垚鍔燂紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎涓夌偣鐓у悎鎵爜璁板綍鍗曞け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗� 瀹℃牳/鍙嶅鏍�
+        /// <summary>
+        /// 瀹℃牳/鍙嶅鏍镐笁鐐圭収鍚堟壂鐮佽褰曞崟
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="Type">瀹℃牳(1),鍙嶅鏍�(2)</param>
+        /// <param name="HMaker">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("WMS_CusBarCodeCheckBillController/GetWMS_CusBarCodeCheckBill_Check_Json")]
+        [HttpGet]
+        public object GetWMS_CusBarCodeCheckBill_Check_Json(Int64 HInterID, int Type, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡瀹℃牳/鍙嶅鏍稿姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒ゆ柇瀛樺湪鎬�
+                ds = oCn.RunProcReturn("select HBillNo,HChecker,HCloseMan,HDeleteMan from WMS_CusBarCodeCheckBillMain with(nolock) where HInterID=" + HInterID.ToString(), "WMS_CusBarCodeCheckBillMain");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ヤ笁鐐圭収鍚堟壂鐮佽褰曞崟锛岃鍒锋柊鏁版嵁鍚庨噸鏂伴�夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    //Type 1 瀹℃牳  2  鍙嶅鏍�
+                    if (Type == 1)
+                    {
+                        if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]).Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍革紝涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCloseMan"]).Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插叧闂紝涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HDeleteMan"]).Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸蹭綔搴燂紝涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //瀹℃牳鍓嶆帶鍒�
+                        DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_WMS_CusBarCodeCheckBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_WMS_CusBarCodeCheckBill_BeforeCheckCtrl");
+                        if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                        //瀹℃牳鍗曟嵁
+                        if (!oBill.CheckBill(HInterID, DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]), "h_p_WMS_CusBarCodeCheckBill_AfterCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍗曟嵁鍙凤細" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]) + " 瀹℃牳鎴愬姛锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                    else
+                    {
+                        if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HChecker"]).Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍革紝涓嶉渶瑕佸弽瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //鍙嶅鏍稿墠鎺у埗
+                        DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_WMS_CusBarCodeCheckBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_WMS_CusBarCodeCheckBill_BeforeUnCheckCtrl");
+                        if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+
+                        //鍙嶅鏍稿崟鎹�
+                        if (!oBill.AbandonCheck(HInterID, DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]), "h_p_WMS_CusBarCodeCheckBill_AfterUnCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍗曟嵁鍙凤細" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]) + " 鍙嶅鏍告垚鍔燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳鎴栧弽瀹℃牳涓夌偣鐓у悎鎵爜璁板綍鍗曞け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
+
+    }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 6d9b83c..943febe 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -6569,6 +6569,269 @@
         #endregion
 
 
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗曟ā鍧楄皟鐢ㄦ柟娉�     20240723
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗曟壂鐮佹ā鍧�  鎵弿瀹㈡埛鏉$爜璋冪敤鏂规硶
+        /// <summary>
+        /// 鎵弿瀹㈡埛鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_CusBarCode_CusBarCodeCheck_Json")]
+        [HttpGet]
+        public object Get_CusBarCode_CusBarCodeCheck_Json(string HCusBarCode_Y, string HCusBarCode_N)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_CheckCusBarCode_CusBarCodeCheck '" + HCusBarCode_Y + "','" + HCusBarCode_N + "'", "h_p_WMS_CheckCusBarCode_CusBarCodeCheck");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿瀹㈡埛鏉$爜鍒ゆ柇閿欒锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                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;
+            }
+        }
+
+        #endregion
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗曟壂鐮佹ā鍧�  鎵弿鐗╂枡鏉$爜璋冪敤鏂规硶
+        /// <summary>
+        /// 鎵弿鐗╂枡鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_BarCode_CusBarCodeCheck_Json")]
+        [HttpGet]
+        public object Get_BarCode_CusBarCodeCheck_Json(string HBarCode, string HCusBarCode_Y, string HCusBarCode_N, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_CusBarCodeCheck " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "','" + HCusBarCode_Y + "','" + HCusBarCode_N + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_CusBarCodeCheck");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鐗╂枡鏉$爜锛屽啓鍏ヤ复鏃惰〃澶辫触锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                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;
+            }
+        }
+
+        #endregion
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗曟壂鐮佹ā鍧�  鑾峰彇鎵爜妯″潡鍒楄〃淇℃伅璋冪敤鏂规硶
+        /// <summary>
+        /// 鑾峰彇鎵爜妯″潡鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetCusBarCodeCheckBillTmpList_Json")]
+        [HttpGet]
+        public object GetCusBarCodeCheckBillTmpList_Json(Int64 HInterID, string HBillNo, string HBillType)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_CusBarCodeCheckBillTmpList " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_CusBarCodeCheckBillTmpList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗曟壂鐮佹ā鍧�    鍒犻櫎鍔熻兘鎸夐挳璋冪敤  鍒犻櫎閫変腑琛屼复鏃惰〃璁板綍
+
+        /// <summary>
+        /// 鍒犻櫎閫変腑琛屼复鏃惰〃璁板綍
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelCusBarCodeCheckBill_temp_Json")]
+        [HttpGet]
+        public object set_DelCusBarCodeCheckBill_temp_Json(Int64 HInterID, string HBillType, Int64 HItemID)
+        {
+            try
+            {
+                oCn.RunProc("Delete from WMS_CusBarCodeCheckBill_temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + " and HItemID=" + HItemID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎鎵爜璁板綍澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 涓夌偣鐓у悎鎵爜璁板綍鍗�     涓婁紶鐢熷崟
+
+        /// <summary>
+        /// 涓夌偣鐓у悎鎵爜璁板綍鍗曟柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveCusBarCodeCheckBill_Json")]
+        [HttpPost]
+        public object set_SaveCusBarCodeCheckBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                string sMainStr = "[" + msg1.ToString() + "]";
+                List<Model.ClsWMS_CusBarCodeCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsWMS_CusBarCodeCheckBillMain>>(sMainStr);
+                Model.ClsWMS_CusBarCodeCheckBillMain omodel = new Model.ClsWMS_CusBarCodeCheckBillMain();
+                omodel.HInterID = mainList[0].HInterID;
+                omodel.HBillNo = mainList[0].HBillNo;
+                omodel.HBillType = mainList[0].HBillType;
+                omodel.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
+                omodel.HRemark = mainList[0].HRemark;
+                omodel.HMaker = mainList[0].HMaker;
+                omodel.HSTOCKORGID = mainList[0].HSTOCKORGID;
+                omodel.HDeptID = mainList[0].HDeptID;
+
+                //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                string s = "";
+                int sYear = 0;
+                int sPeriod = 0;
+                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Today, ref sYear, ref sPeriod, ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = s;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    omodel.HYear = sYear;
+                    omodel.HPeriod = sPeriod;
+                }
+
+                oCn.BeginTran();
+                //鐢熸垚涓夌偣鐓у悎鎵爜璁板綍鍗�
+                //鎻掑叆瀛愯〃
+                oCn.RunProc("EXEC h_p_WMS_CusBarCodeCheckBillSub_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'");
+                //鎻掑叆涓昏〃
+                oCn.RunProc("Insert Into WMS_CusBarCodeCheckBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+                ",HDeptID,HStockOrgID" +
+                ") " +
+                " values('" + omodel.HBillType + "','" + omodel.HBillType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" +
+                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
+                ", " + omodel.HDeptID.ToString() + "," + omodel.HSTOCKORGID.ToString() +
+                ") ");
+
+                oCn.Commit();
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鐢熸垚涓夌偣鐓у悎鎵爜璁板綍鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�" + omodel.HBillNo;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "涓夌偣鐓у悎鎵爜璁板綍鍗曚笂浼犲け璐ワ紒" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #endregion
+
+
         #region 鐗╂枡鏉$爜鏌ヨ璋冪敤鏂规硶
         /// <summary>
         /// 鑾峰彇鏉$爜淇℃伅
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
index 2403f43..9250916 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,7 +10,7 @@
     <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
     <LastUsedPlatform>x86</LastUsedPlatform>
     <PublishProvider>FileSystem</PublishProvider>
-    <PublishUrl>G:\issWeb\缃戠珯鍙戝竷\API</PublishUrl>
+    <PublishUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</PublishUrl>
     <WebPublishMethod>FileSystem</WebPublishMethod>
     <SiteUrlToLaunchAfterPublish />
   </PropertyGroup>
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 15af6f6..62e9402 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,7 +22,7 @@
 		<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
 		<!--<add key="FileIP" value="http://localhost:8080/" />-->
 		<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
-		<!--<add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/> --><!--棰滃彴寮忔満-->
+		<add key="sUrl" value="http://192.168.0.81/WEBS-WMS/WebService1.asmx"/><!--棰滃彴寮忔満-->
 		<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
 		<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
 		<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    鍗氭棩绉戞妧-->
@@ -35,7 +35,7 @@
 		<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> -->	<!--娴嬭瘯鏈嶅姟鍣�-->
 		<!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/>    鏈湴-->
 		<!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>-->	<!--闄堥洴闈欐湰鍦伴厤缃�-->
-		<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>	<!--缈佹稕娑涙湰鍦伴厤缃�-->
+		<!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>-->	<!--缈佹稕娑涙湰鍦伴厤缃�-->
 		<!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>涔濊彵-->
 		<!--<add key="sUrl" value="http://61.130.182.102:18181/WEBSCS/WebService1.asmx"/>--><!--鏂帿灏�-->
 		
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index a1fd20d..910a2cd 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -516,6 +516,7 @@
     <Compile Include="Controllers\浜轰簨绠$悊\寮傚父鍙嶉鍗昞OA_ErrMsgBackBillController.cs" />
     <Compile Include="Controllers\浜轰簨绠$悊\绂昏亴鐢宠\HR_EmpDimissionBillController.cs" />
     <Compile Include="Controllers\浜轰簨绠$悊\鑱屽憳寮傚姩鍗昞HR_EmpChangeBillController.cs" />
+    <Compile Include="Controllers\浠撳瓨绠$悊\涓夌偣鐓у悎鎵爜璁板綍鍗昞WMS_CusBarCodeCheckBillController.cs" />
     <Compile Include="Controllers\浠撳瓨绠$悊\濮斿鐢ㄦ枡\WW_PPBomBillController.cs" />
     <Compile Include="Controllers\浠撳瓨绠$悊\鎵爜寮傚父璁板綍\KF_PonderationBillController.cs" />
     <Compile Include="Controllers\浠撳瓨绠$悊\鏉$爜鍑哄叆搴撹褰昞Kf_ICStockInOutBillController.cs" />
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index 048da48..2b9ac2c 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -9,7 +9,7 @@
     <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
     <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
     <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
-    <NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+    <NameOfLastUsedPublishProfile>D:\GIT浠撳簱\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
     <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
     <UseIISExpress>true</UseIISExpress>
     <Use64BitIISExpress />

--
Gitblit v1.9.1