From 8aad6ba8e082d1fb63bfdd947f7e9da1bc133611 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期五, 24 六月 2022 23:47:19 +0800
Subject: [PATCH] 工序定义接口开发、节拍工价接口开发

---
 VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache |    2 
 VueWebApi/obj/Release/VueWebApi.pdb                            |    0 
 VueWebApi/bin/VueWebApi.dll.config                             |    2 
 VueWebApi/DLL/DAL/ProductModelDAL.cs                           |  305 +++++++++++++++++++++++++++
 VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache   |    2 
 VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user |    6 
 .vs/VueWebApi/v16/.suo                                         |    0 
 VueWebApi/Web.config                                           |    2 
 VueWebApi/bin/VueWebApi.xml                                    |   59 +++++
 VueWebApi/VueWebApi.csproj                                     |    1 
 VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb     |    0 
 VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt      |    2 
 VueWebApi/obj/Debug/VueWebApi.pdb                              |    0 
 VueWebApi/Logs/2022-06-24.TXT                                  |    0 
 VueWebApi/Models/StepDefect.cs                                 |   14 +
 VueWebApi/bin/VueWebApi.pdb                                    |    0 
 VueWebApi/DLL/BLL/ProductModelBLL.cs                           |   53 ++++
 VueWebApi/Controllers/ProductModelController.cs                |  164 ++++++++++++++
 VueWebApi/DLL/DAL/DeviceManagerDAL.cs                          |    4 
 19 files changed, 597 insertions(+), 19 deletions(-)

diff --git a/.vs/VueWebApi/v16/.suo b/.vs/VueWebApi/v16/.suo
index 0c97248..a95ad7b 100644
--- a/.vs/VueWebApi/v16/.suo
+++ b/.vs/VueWebApi/v16/.suo
Binary files differ
diff --git a/VueWebApi/Controllers/ProductModelController.cs b/VueWebApi/Controllers/ProductModelController.cs
index ab052a6..55b428e 100644
--- a/VueWebApi/Controllers/ProductModelController.cs
+++ b/VueWebApi/Controllers/ProductModelController.cs
@@ -82,7 +82,7 @@
             string stocktypecode = obj["stocktypecode"].ToString(); //瀛樿揣绫诲瀷缂栫爜
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             string OperType = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
-            mes = ProductModelBLL.AddUpdateMaterialType(materialtypeid,materialtypecode, materialtypename, stocktypecode, username, OperType);
+            mes = ProductModelBLL.AddUpdateMaterialType(materialtypeid, materialtypecode, materialtypename, stocktypecode, username, OperType);
             return TJson.toJson(mes);
         }
         #endregion
@@ -137,7 +137,7 @@
         public HttpResponseMessage UomAdd(List<Uom> json)
         {
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductModelBLL.UomAdd(username,json);
+            mes = ProductModelBLL.UomAdd(username, json);
             return TJson.toJson(mes);
         }
         #endregion
@@ -197,7 +197,7 @@
         /// <returns></returns>
         [Route(template: "InventoryFileSelect")]
         [HttpGet]
-        public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null,string partspec=null,string stocktypecode = null,string materialtypecode=null,string storehousecode=null, int page = 0, int rows = 0, string prop = null, string order = null)
+        public HttpResponseMessage InventoryFileSelect(string partcode = null, string partname = null, string partspec = null, string stocktypecode = null, string materialtypecode = null, string storehousecode = null, int page = 0, int rows = 0, string prop = null, string order = null)
         {
             int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
             int endNum = rows * page;   //缁撴潫璁板綍 rowNum
@@ -228,7 +228,7 @@
             string maxstockqty = obj["maxstockqty"].ToString(); //鏈�澶у簱瀛�
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             string OperType = obj["OperType"].ToString();  //鎿嶄綔绫诲瀷
-            mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty,username, OperType);
+            mes = ProductModelBLL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty, username, OperType);
             return TJson.toJson(mes);
         }
         #endregion
@@ -275,7 +275,7 @@
         public HttpResponseMessage SaveInventoryFile(string partcode, List<ObjectData> json)
         {
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
-            mes = ProductModelBLL.SaveInventoryFile(partcode, username,json);
+            mes = ProductModelBLL.SaveInventoryFile(partcode, username, json);
             return TJson.toJson(mes);
         }
         #endregion
@@ -332,7 +332,7 @@
         /// <returns></returns>
         [Route(template: "AddUpdateRoute")]
         [HttpPost]
-        public HttpResponseMessage AddUpdateRoute(string id,string opertype, RoutEdit json)
+        public HttpResponseMessage AddUpdateRoute(string id, string opertype, RoutEdit json)
         {
             var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
             mes = ProductModelBLL.AddUpdateRoute(id, opertype, username, json);
@@ -373,11 +373,11 @@
         /// <returns></returns>
         [Route(template: "StepSearch")]
         [HttpGet]
-        public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null,string steptypecode=null, string createuser = null, int page = 0, int rows = 0, string prop = null, string order = null)
+        public HttpResponseMessage StepSearch(string stepcode = null, string stepname = null, string enable = null, string steptypecode = null, string createuser = null, int page = 0, int rows = 0, string prop = null, string order = null)
         {
             int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
             int endNum = rows * page;   //缁撴潫璁板綍 rowNum
-            mes = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode,createuser, startNum, endNum, prop, order);
+            mes = ProductModelBLL.StepSearch(stepcode, stepname, enable, steptypecode, createuser, startNum, endNum, prop, order);
             return TJson.toJson(mes);
         }
         #endregion
@@ -451,5 +451,153 @@
             return TJson.toJson(mes);
         }
         #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鏌ヨ]
+        /// <summary>
+        /// 宸ュ簭鍏宠仈缂洪櫡鏌ヨ
+        /// </summary>
+        /// <param name="stepcode">宸ュ簭缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "StepAssociationDefect")]
+        [HttpGet]
+        public HttpResponseMessage StepAssociationDefect(string stepcode)
+        {
+            mes = ProductModelBLL.StepAssociationDefect(stepcode);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鎻愪氦]
+        [Route(template: "SaveStepAssociationDefect")]
+        [HttpPost]
+        public HttpResponseMessage SaveStepAssociationDefect(string stepcode, List<ObjectData> json)
+        {
+            var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+            mes = ProductModelBLL.SaveStepAssociationDefect(stepcode, username, json);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+
+
+        #region[浜у搧淇℃伅涓嬫媺妗嗘煡璇
+        /// <summary>
+        /// 浜у搧淇℃伅涓嬫媺妗嗘煡璇�
+        /// </summary>
+        /// <returns></returns>
+        [Route(template: "PartSelect")]
+        [HttpGet]
+        public HttpResponseMessage PartSelect()
+        {
+            try
+            {
+                mes = ProductModelBLL.PartSelect();
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗哴
+        /// <summary>
+        /// 浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗�
+        /// </summary>
+        /// <param name="partcode">浜у搧缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "PartSelectRpute")]
+        [HttpGet]
+        public HttpResponseMessage PartSelectRpute(string partcode)
+        {
+            try
+            {
+                mes = ProductModelBLL.PartSelectRpute(partcode);
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎]
+        /// <summary>
+        /// 鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎
+        /// </summary>
+        /// <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+        /// <returns></returns>
+        [Route(template: "RouteSelectStep")]
+        [HttpGet]
+        public HttpResponseMessage RouteSelectStep(string routecode)
+        {
+            try
+            {
+                mes = ProductModelBLL.RouteSelectStep(routecode);
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.Message = e.Message;
+            }
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚圿
+        /// <summary>
+        /// 鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚�
+        /// </summary>
+        /// <param name="partcode">浜у搧缂栫爜</param>
+        ///  <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+        /// <param name="stepcode">宸ュ簭缂栫爜</param>
+        /// <param name="page">椤电爜</param>
+        /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+        /// <param name="prop">鎺掑簭瀛楁</param>
+        /// <param name="order">鎺掑簭瑙勫垯</param>
+        /// <returns></returns>
+        [Route(template: "StepSelectEqp")]
+        [HttpGet]
+        public HttpResponseMessage StepSelectEqp(string partcode, string routecode, string stepcode, int page = 0, int rows = 0, string prop = null, string order = null)
+        {
+
+            int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
+            int endNum = rows * page;   //缁撴潫璁板綍 rowNum
+            mes = ProductModelBLL.StepSelectEqp(partcode, routecode, stepcode, startNum, endNum, prop, order);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
+        #region[鑺傛媿宸ヤ环鏌ヨ]
+        /// <summary>
+        /// 鑺傛媿宸ヤ环鏌ヨ
+        /// </summary>
+        /// <param name="partcode">浜у搧缂栫爜</param>
+        /// <param name="partname">浜у搧鍚嶇О</param>
+        /// <param name="partspec">浜у搧瑙勬牸</param>
+        /// <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+        /// <param name="stepcode">宸ュ簭缂栫爜</param>
+        /// <param name="eqpcode">璁惧缂栫爜</param>
+        /// <param name="eqpname">璁惧鍚嶇О</param>
+        /// <param name="page">椤电爜</param>
+        /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+        /// <param name="prop">鎺掑簭瀛楁</param>
+        /// <param name="order">鎺掑簭瑙勫垯</param>
+        /// <returns></returns>
+        [Route(template: "BeatRateSearch")]
+        [HttpGet]
+        public HttpResponseMessage BeatRateSearch(string partcode = null, string partname = null, string partspec = null, string routecode = null, string stepcode = null, string eqpcode = null, string eqpname = null, int page = 0, int rows = 0, string prop = null, string order = null)
+        {
+            int startNum = rows * (page - 1) + 1;  //璧峰璁板綍rowNum
+            int endNum = rows * page;   //缁撴潫璁板綍 rowNum
+            mes = ProductModelBLL.BeatRateSearch(partcode, partname, partspec, routecode, stepcode, eqpcode, eqpname, startNum, endNum, prop, order);
+            return TJson.toJson(mes);
+        }
+        #endregion
+
     }
 }
diff --git a/VueWebApi/DLL/BLL/ProductModelBLL.cs b/VueWebApi/DLL/BLL/ProductModelBLL.cs
index 05d4a3c..a599697 100644
--- a/VueWebApi/DLL/BLL/ProductModelBLL.cs
+++ b/VueWebApi/DLL/BLL/ProductModelBLL.cs
@@ -172,5 +172,58 @@
             return ProductModelDAL.SaveStepAssociationEqp(stepcode,username,json);
         }
         #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鏌ヨ]
+        public static ToMessage StepAssociationDefect(string stepcode)
+        {
+            return ProductModelDAL.StepAssociationDefect(stepcode);
+        }
+        #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鎻愪氦]
+        public static ToMessage SaveStepAssociationDefect(string stepcode, string username, List<ObjectData> json)
+        {
+            return ProductModelDAL.SaveStepAssociationDefect(stepcode,username,json);
+        }
+        #endregion
+
+
+
+
+
+        #region[浜у搧淇℃伅涓嬫媺妗嗘煡璇
+        public static ToMessage PartSelect()
+        {
+            return ProductModelDAL.PartSelect();
+        }
+        #endregion
+
+        #region[浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗哴
+        public static ToMessage PartSelectRpute(string partcode)
+        {
+            return ProductModelDAL.PartSelectRpute(partcode);
+        }
+        #endregion
+
+        #region[鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎]
+        public static ToMessage RouteSelectStep(string routecode)
+        {
+            return ProductModelDAL.RouteSelectStep(routecode);
+        }
+        #endregion
+
+        #region[鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚圿
+        public static ToMessage StepSelectEqp(string partcode, string routecode, string stepcode, int startNum, int endNum, string prop, string order)
+        {
+            return ProductModelDAL.StepSelectEqp(partcode, routecode, stepcode, startNum, endNum, prop, order);
+        }
+        #endregion
+
+        #region[鑺傛媿宸ヤ环鏌ヨ]
+        public static ToMessage BeatRateSearch(string partcode, string partname, string partspec, string routecode, string stepcode, string eqpcode, string eqpname, int startNum, int endNum, string prop, string order)
+        {
+            return ProductModelDAL.BeatRateSearch(partcode, partname, partspec, routecode, stepcode, eqpcode, eqpname, startNum, endNum, prop, order);
+        }
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/VueWebApi/DLL/DAL/DeviceManagerDAL.cs b/VueWebApi/DLL/DAL/DeviceManagerDAL.cs
index 8dde061..4e5559c 100644
--- a/VueWebApi/DLL/DAL/DeviceManagerDAL.cs
+++ b/VueWebApi/DLL/DAL/DeviceManagerDAL.cs
@@ -453,7 +453,7 @@
                 //search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
                 // --------------鏌ヨ鎸囧畾鏁版嵁--------------
                 var total = 0; //鎬绘潯鏁�
-                var sql = @"select A.code,A.name,A.eqptype_code,B.name as eqptype_name,A.eqpgroup_code,G.name as eqpgroup_name,A.enable,
+                var sql = @"select A.id,A.code,A.name,A.eqptype_code,B.name as eqptype_name,A.eqpgroup_code,G.name as eqpgroup_name,A.enable,
                             A.input_date,A.wksp_code,T.org_name as wksp_name,A.Line_code,L.org_name as Line_name,A.opc_uom,A.operation_ration,A.lm_user,A.lm_date
                             from TEqpInfo A
                             left join TEqpType B on A.eqptype_code=B.code
@@ -519,7 +519,7 @@
                 if (operType == "Update")
                 {
                     var sql = @"update TEqpInfo set name=@devicename,eqptype_code=@devicetype,eqpgroup_code=@devicegroup,input_date=@importdate,
-                                wksp_code=@workshop,line_code=@linecode,enable=@status,operation_ration=@ratio,lm_user=@usercode,lm_date=@CreateDate,
+                                wksp_code=@workshop,line_code=@linecode,enable=@status,operation_ration=@ratio,lm_user=@usercode,lm_date=@CreateDate
                                 where id=@deviceid";
                     dynamicParams.Add("@deviceid", deviceid);
                     dynamicParams.Add("@devicename", devicename);
diff --git a/VueWebApi/DLL/DAL/ProductModelDAL.cs b/VueWebApi/DLL/DAL/ProductModelDAL.cs
index f92eef6..1ec9a72 100644
--- a/VueWebApi/DLL/DAL/ProductModelDAL.cs
+++ b/VueWebApi/DLL/DAL/ProductModelDAL.cs
@@ -1341,5 +1341,310 @@
             return mes;
         }
         #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鏌ヨ]
+        public static ToMessage StepAssociationDefect(string stepcode)
+        {
+            string sql = "";
+            var dynamicParams = new DynamicParameters();
+            List<StepDefect> list = new List<StepDefect>();
+            try
+            {
+                //鑾峰彇宸ュ簭鍏宠仈缂洪櫡鏁版嵁(鍖呭惈鍏宠仈鏍囪瘑)
+                sql = @"select A.code,A.name,(case when B.defect_code is null then 'N' else 'Y' end) flag from TDefect A
+                        left join(
+                        select distinct defect_code  from TDefect_Step where step_code='' and is_delete<>'1'
+                        ) B on A.code=B.defect_code";
+                dynamicParams.Add("@stepcode", stepcode);
+                var data = DapperHelper.selectdata(sql, dynamicParams);
+                for (int i = 0; i < data.Rows.Count; i++)
+                {
+                    StepDefect dft = new StepDefect();
+                    dft.code = data.Rows[i]["CODE"].ToString();
+                    dft.name = data.Rows[i]["NAME"].ToString();
+                    dft.flag = data.Rows[i]["FLAG"].ToString();
+                    list.Add(dft);
+                }
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.data = list;
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+        #region[宸ュ簭鍏宠仈缂洪櫡鎻愪氦]
+        public static ToMessage SaveStepAssociationDefect(string stepcode, string username, List<ObjectData> json)
+        {
+            var sql = "";
+            List<object> list = new List<object>();
+            try
+            {
+                list.Clear();
+                if (json == null || json.Count <= 0)
+                {
+                    //娓呴櫎宸ュ簭鍏宠仈缂洪櫡琛ㄦ暟鎹�
+                    sql = @"delete TDefect_Step where step_code=@stepcode";
+                    list.Add(new { str = sql, parm = new { stepcode = stepcode } });
+                    //鏍囪宸ュ簭琛ㄥ叧鑱斿伐浣滅珯鏍囪瘑
+                    sql = @"update TStep is_defect='N' where stepcode=@stepcode";
+                    list.Add(new { str = sql, parm = new { stepcode = stepcode } });
+                }
+                else
+                {
+                    //娓呴櫎宸ュ簭鍏宠仈缂洪櫡琛ㄦ暟鎹�
+                    sql = @"delete TDefect_Step where step_code=@stepcode";
+                    list.Add(new { str = sql, parm = new { stepcode = stepcode } });
+                    //寰幆鍐欏叆鐢ㄦ埛鍏宠仈瑙掕壊琛�
+                    for (int i = 0; i < json.Count; i++)
+                    {
+                        sql = @"insert into TDefect_Step(defect_code,step_code,lm_user,lm_date) values(@defect_code,@stepcode,@lm_user,@lm_date)";
+                        list.Add(new
+                        {
+                            str = sql,
+                            parm = new
+                            {
+                                defect_code = json[i].code,
+                                stepcode = stepcode,
+                                lm_user = username,
+                                lm_date = DateTime.Now.ToString()
+                            }
+                        });
+                    }
+                    //鏍囪鐗╂枡琛ㄥ叧鑱斿伐鑹鸿矾绾挎爣璇�
+                    sql = @"update TStep set is_defect='Y' where stepcode=@stepcode";
+                    list.Add(new { str = sql, parm = new { stepcode = stepcode } });
+                }
+                bool aa = DapperHelper.DoTransaction(list);
+                if (aa)
+                {
+                    mes.code = "200";
+                    mes.count = 0;
+                    mes.Message = "鎿嶄綔鎴愬姛!";
+                    mes.data = null;
+                }
+                else
+                {
+                    mes.code = "300";
+                    mes.count = 0;
+                    mes.Message = "鎿嶄綔澶辫触!";
+                    mes.data = null;
+                }
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+
+
+
+        #region[浜у搧淇℃伅涓嬫媺妗嗘煡璇
+        public static ToMessage PartSelect()
+        {
+            string sql = "";
+            try
+            {
+                //鑾峰彇璁惧绫诲瀷鏁版嵁
+                sql = @"select partcode,partname,partspec from TMateriel_Info where is_delete<>'1' ";
+                var data = DapperHelper.selecttable(sql);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.data = data;
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+        #region[浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗哴
+        public static ToMessage PartSelectRpute(string partcode)
+        {
+            string sql = "";
+            var dynamicParams = new DynamicParameters();
+            try
+            {
+                //閫氳繃浜у搧缂栫爜鏌ユ壘鍏宠仈鐨勫伐鑹鸿矾绾夸俊鎭�
+                sql = @"select A.route_code,B.name as route_name   
+                        from TMateriel_Route A
+                        inner join TFlw_Rout B on A.route_code=B.code 
+                        where A.materiel_code=@partcode and B.is_delete<>'1' and A.is_delete<>'1'";
+                dynamicParams.Add("@partcode", partcode);
+                var data = DapperHelper.selectdata(sql, dynamicParams);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.data = data;
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+        #region[鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎]
+        public static ToMessage RouteSelectStep(string routecode)
+        {
+            string sql = "";
+            var dynamicParams = new DynamicParameters();
+            try
+            {
+                //閫氳繃浜у搧缂栫爜鏌ユ壘鍏宠仈鐨勫伐鑹鸿矾绾夸俊鎭�
+                sql = @"select B.stepcode as code,B.stepname as name   
+                        from TFlw_Rtdt A
+                        inner join TStep B on A.step_code=B.stepcode
+                        where A.rout_code=@routecode and B.is_delete<>'1' and A.is_delete<>'1';";
+                dynamicParams.Add("@routecode", routecode);
+                var data = DapperHelper.select<ObjectData>(sql, dynamicParams);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.data = data;
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+        #region[鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚圿
+        public static ToMessage StepSelectEqp(string partcode, string routecode, string stepcode, int startNum, int endNum, string prop, string order)
+        {
+            var dynamicParams = new DynamicParameters();
+            string search = "";
+            try
+            {
+                // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+                var total = 0; //鎬绘潯鏁�
+                var sql = @"select C.partcode,C.partname,B.wksp_code,T.org_name as wksp_name,A.eqp_value,A.stand_value,A.cavity_qty,A.unprice  
+                            from (
+                            select materiel_code, eqp_code,eqp_value,stand_value,cavity_qty,unprice   from TPrteEqp_Stad
+                            where materiel_code=@partcode  and route_code=@routecode and step_code=@stepcode 
+                            union all
+                            select @partcode as materiel_code,eqp_code,'0' as eqp_value,'0' as stand_value,'0' as cavity_qty,'0' as unprice
+                            from TFlw_Rteqp where step_code=@stepcode and style='E' and @partcode+eqp_code+step_code not in(select materiel_code+eqp_code+step_code  from TPrteEqp_Stad)
+                            ) A
+                            left join TEqpInfo B on A.eqp_code=B.code 
+                            left join TOrganization T on B.wksp_code=T.org_code 
+                            left join TMateriel_Info C on A.materiel_code=C.partcode
+                            where B.is_delete<>'1' and  T.is_delete<>'1' and C.is_delete<>'1' ";
+                dynamicParams.Add("@partcode", partcode);
+                dynamicParams.Add("@routecode", routecode);
+                dynamicParams.Add("@stepcode", stepcode);
+                var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.count = total;
+                mes.data = data.ToList();
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+        #region[鑺傛媿宸ヤ环鏌ヨ]
+        public static ToMessage BeatRateSearch(string partcode, string partname, string partspec, string routecode, string stepcode, string eqpcode, string eqpname, int startNum, int endNum, string prop, string order)
+        {
+            var dynamicParams = new DynamicParameters();
+            string search = "";
+            try
+            {
+                if (partcode != "" && partcode != null)
+                {
+                    search += "and partcode like '%'+@partcode+'%' ";
+                    dynamicParams.Add("@stepcode", partcode);
+                }
+                if (partname != "" && partname != null)
+                {
+                    search += "and stepname like '%'+@partname+'%' ";
+                    dynamicParams.Add("@partname", partname);
+                }
+                if (partspec != "" && partspec != null)
+                {
+                    search += "and stepname like '%'+@partspec+'%' ";
+                    dynamicParams.Add("@partspec", partspec);
+                }
+                if (routecode != "" && routecode != null)
+                {
+                    search += "and enable=@routecode ";
+                    dynamicParams.Add("@routecode", routecode);
+                }
+                if (stepcode != "" && stepcode != null)
+                {
+                    search += "and flwtype=@stepcode ";
+                    dynamicParams.Add("@stepcode", stepcode);
+                }
+                if (eqpcode != "" && eqpcode != null)
+                {
+                    search += "and stepname like '%'+@eqpcode+'%' ";
+                    dynamicParams.Add("@eqpcode", eqpcode);
+                }
+                if (eqpname != "" && eqpname != null)
+                {
+                    search += "and stepname like '%'+@eqpname+'%' ";
+                    dynamicParams.Add("@eqpname", eqpname);
+                }
+                if (search == "")
+                {
+                    search = "and 1=1 ";
+                }
+                // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+                var total = 0; //鎬绘潯鏁�
+                var sql = @"select stepcode,stepname,flwtype,enable,descr,lm_user,lm_date,is_eqp,is_defect  
+                            from TStep
+                            where is_delete<>'1' " + search;
+                var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
+                mes.code = "200";
+                mes.Message = "鏌ヨ鎴愬姛!";
+                mes.count = total;
+                mes.data = data.ToList();
+            }
+            catch (Exception e)
+            {
+                mes.code = "300";
+                mes.count = 0;
+                mes.Message = e.Message;
+                mes.data = null;
+            }
+            return mes;
+        }
+        #endregion
+
+        #region[鑺傛媿宸ヤ环鏂板缂栬緫]
+
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/VueWebApi/Logs/2022-06-24.TXT b/VueWebApi/Logs/2022-06-24.TXT
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/VueWebApi/Logs/2022-06-24.TXT
diff --git a/VueWebApi/Models/StepDefect.cs b/VueWebApi/Models/StepDefect.cs
new file mode 100644
index 0000000..8fa0855
--- /dev/null
+++ b/VueWebApi/Models/StepDefect.cs
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace VueWebApi.Models
+{
+    public class StepDefect
+    {
+        public string code { get; set; }
+        public string name { get; set; }
+        public string flag { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user b/VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
index 892adbc..036a81d 100644
--- a/VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -5,7 +5,7 @@
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <_PublishTargetUrl>D:\缃戠珯鍙戝竷\XKDMesApi</_PublishTargetUrl>
-    <History>True|2022-06-17T05:23:15.1455451Z;True|2022-06-17T13:22:18.5517557+08:00;True|2022-06-17T13:19:27.7323818+08:00;True|2022-06-17T13:12:24.1252779+08:00;True|2022-06-17T13:09:20.4234258+08:00;True|2022-06-17T13:06:49.9869509+08:00;True|2022-06-17T12:58:54.6964621+08:00;False|2022-06-17T12:58:10.6767711+08:00;False|2022-06-17T12:57:08.9747950+08:00;False|2022-06-17T12:56:18.4650121+08:00;False|2022-06-17T12:55:57.9981927+08:00;True|2022-06-13T14:21:36.5610928+08:00;True|2022-06-13T11:41:39.4210151+08:00;True|2022-06-11T02:35:03.4727934+08:00;True|2022-06-11T02:31:13.7362660+08:00;True|2022-06-11T02:30:58.3616790+08:00;True|2022-06-11T01:57:04.4951468+08:00;True|2022-06-10T13:27:13.2097124+08:00;</History>
+    <History>True|2022-06-24T08:39:01.1080301Z;True|2022-06-17T13:23:15.1455451+08:00;True|2022-06-17T13:22:18.5517557+08:00;True|2022-06-17T13:19:27.7323818+08:00;True|2022-06-17T13:12:24.1252779+08:00;True|2022-06-17T13:09:20.4234258+08:00;True|2022-06-17T13:06:49.9869509+08:00;True|2022-06-17T12:58:54.6964621+08:00;False|2022-06-17T12:58:10.6767711+08:00;False|2022-06-17T12:57:08.9747950+08:00;False|2022-06-17T12:56:18.4650121+08:00;False|2022-06-17T12:55:57.9981927+08:00;True|2022-06-13T14:21:36.5610928+08:00;True|2022-06-13T11:41:39.4210151+08:00;True|2022-06-11T02:35:03.4727934+08:00;True|2022-06-11T02:31:13.7362660+08:00;True|2022-06-11T02:30:58.3616790+08:00;True|2022-06-11T01:57:04.4951468+08:00;True|2022-06-10T13:27:13.2097124+08:00;</History>
   </PropertyGroup>
   <ItemGroup>
     <File Include="Areas/HelpPage/HelpPage.css">
@@ -372,13 +372,13 @@
       <publishTime>11/28/2018 13:04:24</publishTime>
     </File>
     <File Include="bin/VueWebApi.dll">
-      <publishTime>06/23/2022 17:26:46</publishTime>
+      <publishTime>06/24/2022 16:42:15</publishTime>
     </File>
     <File Include="bin/VueWebApi.dll.config">
       <publishTime>06/15/2022 15:31:43</publishTime>
     </File>
     <File Include="bin/VueWebApi.pdb">
-      <publishTime>06/23/2022 17:26:46</publishTime>
+      <publishTime>06/24/2022 16:42:15</publishTime>
     </File>
     <File Include="bin/VueWebApi.xml">
       <publishTime>06/16/2022 14:26:01</publishTime>
diff --git a/VueWebApi/VueWebApi.csproj b/VueWebApi/VueWebApi.csproj
index bdd1c55..e20c2a8 100644
--- a/VueWebApi/VueWebApi.csproj
+++ b/VueWebApi/VueWebApi.csproj
@@ -284,6 +284,7 @@
     <Compile Include="Models\ObjectDataCont.cs" />
     <Compile Include="Models\RoleUserSubmit.cs" />
     <Compile Include="Models\RoutEdit.cs" />
+    <Compile Include="Models\StepDefect.cs" />
     <Compile Include="Models\StepEqp.cs" />
     <Compile Include="Models\TreeDG.cs" />
     <Compile Include="Models\TreeDM.cs" />
diff --git a/VueWebApi/Web.config b/VueWebApi/Web.config
index 0b14d31..d5f88f4 100644
--- a/VueWebApi/Web.config
+++ b/VueWebApi/Web.config
@@ -15,7 +15,7 @@
 		<!--鏈湴鐜-->
 		<!--<add key="DBServer" value="Data Source=.;Initial Catalog=vmes;Integrated Security=True" />-->
 		<!--鏈嶅姟鍣ㄧ幆澧�-->
-		<add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
+		<add key="DBServer" value="Data Source=121.196.36.24,1533;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
 		<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
 		<add key="RedisConnIp" value="127.0.0.1" />
 		<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
diff --git a/VueWebApi/bin/VueWebApi.dll.config b/VueWebApi/bin/VueWebApi.dll.config
index 0b14d31..d5f88f4 100644
--- a/VueWebApi/bin/VueWebApi.dll.config
+++ b/VueWebApi/bin/VueWebApi.dll.config
@@ -15,7 +15,7 @@
 		<!--鏈湴鐜-->
 		<!--<add key="DBServer" value="Data Source=.;Initial Catalog=vmes;Integrated Security=True" />-->
 		<!--鏈嶅姟鍣ㄧ幆澧�-->
-		<add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
+		<add key="DBServer" value="Data Source=121.196.36.24,1533;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
 		<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
 		<add key="RedisConnIp" value="127.0.0.1" />
 		<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
diff --git a/VueWebApi/bin/VueWebApi.pdb b/VueWebApi/bin/VueWebApi.pdb
index 04e3a93..71deec8 100644
--- a/VueWebApi/bin/VueWebApi.pdb
+++ b/VueWebApi/bin/VueWebApi.pdb
Binary files differ
diff --git a/VueWebApi/bin/VueWebApi.xml b/VueWebApi/bin/VueWebApi.xml
index 751c647..0741fab 100644
--- a/VueWebApi/bin/VueWebApi.xml
+++ b/VueWebApi/bin/VueWebApi.xml
@@ -1174,7 +1174,64 @@
             宸ュ簭瀹氫箟鍏宠仈宸ヤ綔绔欐彁浜�
             </summary>
             <param name="stepcode">宸ュ簭缂栫爜</param>
-            <param name="json"></param>
+            <param name="json">鎻愪氦鏁版嵁</param>
+            <returns></returns>
+        </member>
+        <member name="M:VueWebApi.Controllers.ProductModelController.StepAssociationDefect(System.String)">
+            <summary>
+            宸ュ簭鍏宠仈缂洪櫡鏌ヨ
+            </summary>
+            <param name="stepcode">宸ュ簭缂栫爜</param>
+            <returns></returns>
+        </member>
+        <member name="M:VueWebApi.Controllers.ProductModelController.PartSelect">
+            <summary>
+            浜у搧淇℃伅涓嬫媺妗嗘煡璇�
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:VueWebApi.Controllers.ProductModelController.PartSelectRpute(System.String)">
+            <summary>
+            浜у搧缂栫爜鏌ユ壘宸ヨ壓璺嚎涓嬫媺妗�
+            </summary>
+            <param name="partcode">浜у搧缂栫爜</param>
+            <returns></returns>
+        </member>
+        <member name="M:VueWebApi.Controllers.ProductModelController.RouteSelectStep(System.String)">
+            <summary>
+            鏍规嵁宸ヨ壓璺嚎缂栫爜鏌ユ壘鍏宠仈宸ュ簭闆嗗悎
+            </summary>
+            <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+            <returns></returns>
+        </member>
+        <member name="M:VueWebApi.Controllers.ProductModelController.StepSelectEqp(System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
+            <summary>
+            鏍规嵁宸ュ簭绾跨紪鐮佹煡鎵惧叧鑱旇澶囬泦鍚�
+            </summary>
+            <param name="partcode">浜у搧缂栫爜</param>
+             <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+            <param name="stepcode">宸ュ簭缂栫爜</param>
+            <param name="page">椤电爜</param>
+            <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+            <param name="prop">鎺掑簭瀛楁</param>
+            <param name="order">鎺掑簭瑙勫垯</param>
+            <returns></returns>
+        </member>
+        <member name="M:VueWebApi.Controllers.ProductModelController.BeatRateSearch(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
+            <summary>
+            鑺傛媿宸ヤ环鏌ヨ
+            </summary>
+            <param name="partcode">浜у搧缂栫爜</param>
+            <param name="partname">浜у搧鍚嶇О</param>
+            <param name="partspec">浜у搧瑙勬牸</param>
+            <param name="routecode">宸ヨ壓璺嚎缂栫爜</param>
+            <param name="stepcode">宸ュ簭缂栫爜</param>
+            <param name="eqpcode">璁惧缂栫爜</param>
+            <param name="eqpname">璁惧鍚嶇О</param>
+            <param name="page">椤电爜</param>
+            <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+            <param name="prop">鎺掑簭瀛楁</param>
+            <param name="order">鎺掑簭瑙勫垯</param>
             <returns></returns>
         </member>
         <member name="M:VueWebApi.Controllers.SystemSettingController.EncodingRules(System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
diff --git a/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache b/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache
index a214495..654c0bb 100644
--- a/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache
+++ b/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-4c18228ccc6ec1b0f1e055955b46344b14f533de
+ead7cf2282d587d6d640ba9024111a7417c9f938
diff --git a/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt b/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt
index f9e4547..89d6004 100644
--- a/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt
+++ b/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt
@@ -149,8 +149,8 @@
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.resources.dll
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.Deployment.resources.dll
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\zh-Hans\System.Web.WebPages.Razor.resources.dll
-D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\obj\Debug\VueWebApi.csproj.AssemblyReference.cache
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\obj\Debug\VueWebApi.csproj.CoreCompileInputs.cache
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\obj\Debug\VueWebApi.csproj.CopyComplete
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\obj\Debug\VueWebApi.dll
 D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\obj\Debug\VueWebApi.pdb
+D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\obj\Debug\VueWebApi.csproj.AssemblyReference.cache
diff --git a/VueWebApi/obj/Debug/VueWebApi.pdb b/VueWebApi/obj/Debug/VueWebApi.pdb
index 04e3a93..71deec8 100644
--- a/VueWebApi/obj/Debug/VueWebApi.pdb
+++ b/VueWebApi/obj/Debug/VueWebApi.pdb
Binary files differ
diff --git a/VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb b/VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb
index dc24f8c..8eb0410 100644
--- a/VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb
+++ b/VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb
Binary files differ
diff --git a/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache b/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache
index f4168a8..d7bf93a 100644
--- a/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache
+++ b/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-8846817bef2faf361bb1dae0ba7c58c4d14cfba8
+b66fb695daf003212f22fc5e10c6694251fb7628
diff --git a/VueWebApi/obj/Release/VueWebApi.pdb b/VueWebApi/obj/Release/VueWebApi.pdb
index dc24f8c..8eb0410 100644
--- a/VueWebApi/obj/Release/VueWebApi.pdb
+++ b/VueWebApi/obj/Release/VueWebApi.pdb
Binary files differ

--
Gitblit v1.9.3