From 9445c4660740dc8a544b5c2440fe365a218bab12 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期四, 26 十月 2023 17:26:39 +0800
Subject: [PATCH] 1.修改仓位信息列表接口 2.新增仓库库位基础资料接口 3.修改模具出入库提交接口(增加库位) 、模具清单增加库位 4.新增模具上下机记录报表、模具借还记录报表
---
VueWebCoreApi/Controllers/BasicSettingController.cs | 5
VueWebCoreApi/DLL/BLL/GeneralBasicDataBLL.cs | 14 +
VueWebCoreApi/DLL/BLL/MouldManagerBLL.cs | 38 ++
VueWebCoreApi/Controllers/GeneralBasicDataController.cs | 29 ++
VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs | 4
VueWebCoreApi/Controllers/MouldManagerController.cs | 131 ++++++++++
VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs | 45 ++
VueWebCoreApi/DLL/DAL/GeneralBasicDataDAL.cs | 71 +++++
VueWebCoreApi/Startup.cs | 7
VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs | 327 ++++++++++++++++++++++++--
VueWebCoreApi/Models/WareHouseLocation.cs | 19 +
11 files changed, 635 insertions(+), 55 deletions(-)
diff --git a/VueWebCoreApi/Controllers/BasicSettingController.cs b/VueWebCoreApi/Controllers/BasicSettingController.cs
index 53dc6bf..a1fc254 100644
--- a/VueWebCoreApi/Controllers/BasicSettingController.cs
+++ b/VueWebCoreApi/Controllers/BasicSettingController.cs
@@ -694,6 +694,7 @@
/// <summary>
/// 浠撲綅淇℃伅鍒楄〃
/// </summary>
+ /// <param name="flag">閫変腑宸︿晶鏍戝瀷鏄惁浠撳簱(Y/N)</param>
/// <param name="stckcode">浠撳簱缂栫爜瀛楃涓查泦</param>
/// <param name="locacode">浠撲綅缂栫爜</param>
/// <param name="locaname">浠撲綅鍚嶇О</param>
@@ -704,13 +705,13 @@
/// <returns></returns>
[Route(template: "TSecLocaData")]
[HttpGet]
- public JsonResult TSecLocaData(string stckcode, string locacode, string locaname, int page = 0, int rows = 0, string prop = null, string order = null)
+ public JsonResult TSecLocaData(string flag, string stckcode, string locacode, string locaname, int page = 0, int rows = 0, string prop = null, string order = null)
{
var token = HttpContext.Request.Headers["Token"].ToString();
User us = JwtTools.Denocode(token.ToString());
int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
int endNum = rows * page; //缁撴潫璁板綍 rowNum
- mes = BasicSettingBLL.TSecLocaData(stckcode, locacode, locaname, startNum, endNum, prop, order);
+ mes = BasicSettingBLL.TSecLocaData(flag,stckcode, locacode, locaname, startNum, endNum, prop, order);
return Json(mes);
}
#endregion
diff --git a/VueWebCoreApi/Controllers/GeneralBasicDataController.cs b/VueWebCoreApi/Controllers/GeneralBasicDataController.cs
index 2c48bd0..7e89081 100644
--- a/VueWebCoreApi/Controllers/GeneralBasicDataController.cs
+++ b/VueWebCoreApi/Controllers/GeneralBasicDataController.cs
@@ -183,6 +183,35 @@
}
#endregion
+ #region[浠撳簱搴撲綅鍩虹璧勬枡]
+ /// <summary>
+ /// 浠撳簱搴撲綅鍩虹璧勬枡
+ /// </summary>
+ /// <returns></returns>
+ [Route(template: "WareHouseLocation")]
+ [HttpGet]
+ public JsonResult WareHouseLocation()
+ {
+ mes = GeneralBasicDataBLL.WareHouseLocation();
+ return Json(mes);
+ }
+ #endregion
+
+ #region[浠撳簱鏌ユ壘浠撲綅淇℃伅]
+ /// <summary>
+ /// 浠撳簱鏌ユ壘浠撲綅淇℃伅
+ /// </summary>
+ /// <param name="warhousecode">浠撳簱缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "WareHouseSelectLocation")]
+ [HttpGet]
+ public JsonResult WareHouseSelectLocation(string warhousecode)
+ {
+ mes = GeneralBasicDataBLL.WareHouseSelectLocation(warhousecode);
+ return Json(mes);
+ }
+ #endregion
+
#region[宸ュ簭鍩虹璧勬枡]
/// <summary>
/// 宸ュ簭鍩虹璧勬枡
diff --git a/VueWebCoreApi/Controllers/MouldManagerController.cs b/VueWebCoreApi/Controllers/MouldManagerController.cs
index beb8e42..f130a31 100644
--- a/VueWebCoreApi/Controllers/MouldManagerController.cs
+++ b/VueWebCoreApi/Controllers/MouldManagerController.cs
@@ -945,8 +945,9 @@
User us = JwtTools.Denocode(token.ToString());
string mouldcode = obj["mouldcode"].ToString(); //妯″叿缂栫爜
string warehousecode = obj["warehousecode"].ToString(); //浠撳簱缂栫爜
+ string locationcode = obj["locationcode"].ToString(); //搴撲綅缂栫爜
string description = obj["description"].ToString(); //鍏ュ簱鎻忚堪
- mes = MouldManagerBLL.MouldInWareHouseSave(mouldcode, warehousecode,description, us);
+ mes = MouldManagerBLL.MouldInWareHouseSave(mouldcode, warehousecode, locationcode, description, us);
return Json(mes);
}
#endregion
@@ -981,8 +982,9 @@
User us = JwtTools.Denocode(token.ToString());
string mouldcode = obj["mouldcode"].ToString(); //妯″叿缂栫爜
string warehousecode = obj["warehousecode"].ToString(); //浠撳簱缂栫爜
+ string locationcode = obj["locationcode"].ToString(); //搴撲綅缂栫爜
string description = obj["description"].ToString(); //鍑哄簱鎻忚堪
- mes = MouldManagerBLL.MouldOutWareHouseSave(mouldcode, warehousecode, description, us);
+ mes = MouldManagerBLL.MouldOutWareHouseSave(mouldcode, warehousecode, locationcode, description, us);
return Json(mes);
}
#endregion
@@ -1256,5 +1258,130 @@
return Json(mes);
}
#endregion
+
+
+ #region[妯″叿涓婁笅鏈鸿褰曟煡璇
+ /// <summary>
+ /// 妯″叿涓婁笅鏈鸿褰曟煡璇�
+ /// </summary>
+ /// <param name="mouldcode">妯″叿缂栫爜</param>
+ /// <param name="mouldname">妯″叿鍚嶇О</param>
+ /// <param name="mouldspec">瑙勬牸鍨嬪彿</param>
+ /// <param name="type">鎿嶄綔绫诲瀷(涓婃満:UP 涓嬫満:DOWN)</param>
+ /// <param name="devicecode">璁惧缂栫爜</param>
+ /// <param name="operuser">鎿嶄綔浜哄憳</param>
+ /// <param name="operdate">鎿嶄綔鏃堕棿</param>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勬牸</param>
+ /// <returns></returns>
+ [Route(template: "MouldUpDownMachinesSearch")]
+ [HttpGet]
+ public JsonResult MouldUpDownMachinesSearch(int page, int rows, string prop, string order, string mouldcode = null, string mouldname = null, string mouldspec = null, string type = null,string devicecode=null,string operuser=null, string operdate = null)
+ {
+ string opendate = ""; //寮�濮嬫椂闂�
+ string closedate = ""; //缁撴潫鏃堕棿
+ if (operdate != "" && operdate != null)
+ {
+ opendate = operdate.Split('~')[0].ToString();
+ closedate = operdate.Split('~')[1].ToString();
+ }
+ int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
+ int endNum = rows * page; //缁撴潫璁板綍 rowNum
+ mes = MouldManagerBLL.MouldUpDownMachinesSearch(mouldcode, mouldname, mouldspec,type,devicecode,operuser,opendate,closedate, startNum, endNum, prop, order);
+ return Json(mes);
+ }
+ #endregion
+
+ #region[妯″叿涓婁笅鏈鸿瀵煎嚭]
+ /// <summary>
+ /// 妯″叿涓婁笅鏈鸿瀵煎嚭
+ /// </summary>
+ /// <param name="mouldcode">妯″叿缂栫爜</param>
+ /// <param name="mouldname">妯″叿鍚嶇О</param>
+ /// <param name="mouldspec">瑙勬牸鍨嬪彿</param>
+ /// <param name="type">鎿嶄綔绫诲瀷(涓婃満:UP 涓嬫満:DOWN)</param>
+ /// <param name="devicecode">璁惧缂栫爜</param>
+ /// <param name="operuser">鎿嶄綔浜哄憳</param>
+ /// <param name="operdate">鎿嶄綔鏃堕棿</param>
+ /// <returns></returns>
+ [Route(template: "MouldUpDownMachinesOutExcel")]
+ [HttpGet]
+ public JsonResult MouldUpDownMachinesOutExcel(string mouldcode = null, string mouldname = null, string mouldspec = null, string type = null, string devicecode = null, string operuser = null, string operdate = null)
+ {
+ string opendate = ""; //寮�濮嬫椂闂�
+ string closedate = ""; //缁撴潫鏃堕棿
+ if (operdate != "" && operdate != null)
+ {
+ opendate = operdate.Split('~')[0].ToString();
+ closedate = operdate.Split('~')[1].ToString();
+ }
+ mes = MouldManagerBLL.MouldUpDownMachinesOutExcel(mouldcode, mouldname, mouldspec, type, devicecode, operuser, opendate, closedate);
+ return Json(mes);
+ }
+ #endregion
+
+
+ #region[妯″叿鍊熻繕璁板綍鏌ヨ]
+ /// <summary>
+ /// 妯″叿鍊熻繕璁板綍鏌ヨ
+ /// </summary>
+ /// <param name="mouldcode">妯″叿缂栫爜</param>
+ /// <param name="mouldname">妯″叿鍚嶇О</param>
+ /// <param name="mouldspec">瑙勬牸鍨嬪彿</param>
+ /// <param name="type">鎿嶄綔绫诲瀷</param>
+ /// <param name="operuser">鎿嶄綔浜哄憳</param>
+ /// <param name="operdate">鎿嶄綔鏃堕棿</param>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勬牸</param>
+ /// <returns></returns>
+ [Route(template: "MouldCirculateMachinesSearch")]
+ [HttpGet]
+ public JsonResult MouldCirculateMachinesSearch(int page, int rows, string prop, string order, string mouldcode = null, string mouldname = null, string mouldspec = null, string type = null, string operuser = null, string operdate = null)
+ {
+ string opendate = ""; //寮�濮嬫椂闂�
+ string closedate = ""; //缁撴潫鏃堕棿
+ if (operdate != "" && operdate != null)
+ {
+ opendate = operdate.Split('~')[0].ToString();
+ closedate = operdate.Split('~')[1].ToString();
+ }
+ int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
+ int endNum = rows * page; //缁撴潫璁板綍 rowNum
+ mes = MouldManagerBLL.MouldCirculateMachinesSearch(mouldcode, mouldname, mouldspec, type, operuser, opendate, closedate, startNum, endNum, prop, order);
+ return Json(mes);
+ }
+ #endregion
+
+ #region[妯″叿鍊熻繕璁板綍瀵煎嚭]
+ /// <summary>
+ /// 妯″叿鍊熻繕璁板綍瀵煎嚭
+ /// </summary>
+ /// <param name="mouldcode">妯″叿缂栫爜</param>
+ /// <param name="mouldname">妯″叿鍚嶇О</param>
+ /// <param name="mouldspec">瑙勬牸鍨嬪彿</param>
+ /// <param name="type">鎿嶄綔绫诲瀷</param>
+ /// <param name="operuser">鎿嶄綔浜哄憳</param>
+ /// <param name="operdate">鎿嶄綔鏃堕棿</param>
+ /// <returns></returns>
+ [Route(template: "MouldCirculateMachinesOutExcel")]
+ [HttpGet]
+ public JsonResult MouldCirculateMachinesOutExcel(string mouldcode = null, string mouldname = null, string mouldspec = null, string type = null, string operuser = null, string operdate = null)
+ {
+ string opendate = ""; //寮�濮嬫椂闂�
+ string closedate = ""; //缁撴潫鏃堕棿
+ if (operdate != "" && operdate != null)
+ {
+ opendate = operdate.Split('~')[0].ToString();
+ closedate = operdate.Split('~')[1].ToString();
+ }
+ mes = MouldManagerBLL.MouldCirculateMachinesOutExcel(mouldcode, mouldname, mouldspec, type, operuser, opendate, closedate);
+ return Json(mes);
+ }
+ #endregion
+
}
}
diff --git a/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs b/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs
index 93db190..67e3b20 100644
--- a/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs
+++ b/VueWebCoreApi/DLL/BLL/BasicSettingBLL.cs
@@ -352,9 +352,9 @@
#endregion
#region[浠撲綅淇℃伅鍒楄〃]
- public static ToMessage TSecLocaData(string stckcode, string locacode, string locaname, int startNum, int endNum, string prop, string order)
+ public static ToMessage TSecLocaData(string flag, string stckcode, string locacode, string locaname, int startNum, int endNum, string prop, string order)
{
- return BasicSettingDAL.TSecLocaData(stckcode, locacode, locaname, startNum, endNum, prop, order);
+ return BasicSettingDAL.TSecLocaData(flag,stckcode, locacode, locaname, startNum, endNum, prop, order);
}
#endregion
diff --git a/VueWebCoreApi/DLL/BLL/GeneralBasicDataBLL.cs b/VueWebCoreApi/DLL/BLL/GeneralBasicDataBLL.cs
index 3b007d2..502cbc7 100644
--- a/VueWebCoreApi/DLL/BLL/GeneralBasicDataBLL.cs
+++ b/VueWebCoreApi/DLL/BLL/GeneralBasicDataBLL.cs
@@ -95,6 +95,20 @@
}
#endregion
+ #region[浠撳簱搴撲綅鍩虹璧勬枡]
+ public static ToMessage WareHouseLocation()
+ {
+ return GeneralBasicDataDAL.WareHouseLocation();
+ }
+ #endregion
+
+ #region[浠撳簱鏌ユ壘浠撲綅淇℃伅]
+ public static ToMessage WareHouseSelectLocation(string warhousecode)
+ {
+ return GeneralBasicDataDAL.WareHouseSelectLocation(warhousecode);
+ }
+ #endregion
+
#region[宸ュ簭鍩虹璧勬枡]
public static ToMessage StepData()
{
diff --git a/VueWebCoreApi/DLL/BLL/MouldManagerBLL.cs b/VueWebCoreApi/DLL/BLL/MouldManagerBLL.cs
index aca0636..ca3d908 100644
--- a/VueWebCoreApi/DLL/BLL/MouldManagerBLL.cs
+++ b/VueWebCoreApi/DLL/BLL/MouldManagerBLL.cs
@@ -370,9 +370,9 @@
#endregion
#region[妯″叿鍏ュ簱鎻愪氦]
- public static ToMessage MouldInWareHouseSave(string mouldcode, string warehousecode, string description, User us)
+ public static ToMessage MouldInWareHouseSave(string mouldcode, string warehousecode,string locationcode, string description, User us)
{
- return MouldManagerDAL.MouldInWareHouseSave(mouldcode, warehousecode, description, us);
+ return MouldManagerDAL.MouldInWareHouseSave(mouldcode, warehousecode, locationcode, description, us);
}
#endregion
@@ -385,9 +385,9 @@
#endregion
#region[妯″叿鍑哄簱鎻愪氦]
- public static ToMessage MouldOutWareHouseSave(string mouldcode, string warehousecode, string description, User us)
+ public static ToMessage MouldOutWareHouseSave(string mouldcode, string warehousecode,string locationcode, string description, User us)
{
- return MouldManagerDAL.MouldOutWareHouseSave(mouldcode, warehousecode, description, us);
+ return MouldManagerDAL.MouldOutWareHouseSave(mouldcode, warehousecode, locationcode, description, us);
}
#endregion
@@ -456,5 +456,35 @@
return MouldManagerDAL.MouldUpdateSearch(mouldcode, mouldname, mouldspec, reportuser, repairuser, vrifcatuser, reportopendate, reportclosedate, repairopendate, repairclosedate, vrifcatopendate, vrifcatclosedate);
}
#endregion
+
+
+ #region[妯″叿涓婁笅鏈鸿褰曟煡璇
+ public static ToMessage MouldUpDownMachinesSearch(string mouldcode, string mouldname, string mouldspec, string type, string devicecode, string operuser, string opendate, string closedate, int startNum, int endNum, string prop, string order)
+ {
+ return MouldManagerDAL.MouldUpDownMachinesSearch(mouldcode, mouldname, mouldspec, type, devicecode, operuser, opendate, closedate, startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[妯″叿涓婁笅鏈鸿瀵煎嚭Excel]
+ public static ToMessage MouldUpDownMachinesOutExcel(string mouldcode, string mouldname, string mouldspec, string type, string devicecode, string operuser, string opendate, string closedate)
+ {
+ return MouldManagerDAL.MouldUpDownMachinesOutExcel(mouldcode, mouldname, mouldspec, type, devicecode, operuser, opendate, closedate);
+ }
+ #endregion
+
+
+ #region[妯″叿鍊熻繕璁板綍鏌ヨ]
+ public static ToMessage MouldCirculateMachinesSearch(string mouldcode, string mouldname, string mouldspec, string type, string operuser, string opendate, string closedate, int startNum, int endNum, string prop, string order)
+ {
+ return MouldManagerDAL.MouldCirculateMachinesSearch(mouldcode, mouldname, mouldspec, type, operuser, opendate, closedate, startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[妯″叿鍊熻繕璁板綍瀵煎嚭]
+ public static ToMessage MouldCirculateMachinesOutExcel(string mouldcode, string mouldname, string mouldspec, string type, string operuser, string opendate, string closedate)
+ {
+ return MouldManagerDAL.MouldCirculateMachinesOutExcel(mouldcode, mouldname, mouldspec, type, operuser, opendate, closedate);
+ }
+ #endregion
}
}
diff --git a/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs b/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
index 2c934bc..4b0931d 100644
--- a/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/BasicSettingDAL.cs
@@ -3011,10 +3011,10 @@
try
{
//鑾峰彇寮�鍚粨浣嶇鎺х殑浠撳簱淇℃伅
- sql = @"select S.code,S.name,'-1' as idparent from TSecStck S where S.ishasPosition='1'
- union all
- select L.code,L.name,case when L.idparent is NULL or L.idparent='' then L.idwarehouse else L.idparent end as idparent
- from TSecLoca L ";
+ sql = @"select S.code,S.name,'-1' as idparent,S.code as warhouse from TSecStck S where S.ishasPosition='1'
+ union all
+ select L.code,L.name,case when L.idparent is NULL or L.idparent='' then L.idwarehouse else L.idparent end as idparent,L.idwarehouse as warhouse
+ from TSecLoca L ";
var data = DapperHelper.selecttable(sql);
mes.code = "200";
mes.Message = "鏌ヨ鎴愬姛!";
@@ -3032,18 +3032,32 @@
#endregion
#region[浠撲綅淇℃伅鍒楄〃]
- public static ToMessage TSecLocaData(string stckcode, string locacode, string locaname, int startNum, int endNum, string prop, string order)
+ public static ToMessage TSecLocaData(string flag, string stckcode, string locacode, string locaname, int startNum, int endNum, string prop, string order)
{
var dynamicParams = new DynamicParameters();
string search = "", sql = "";
IEnumerable<object> data;
try
{
- if (stckcode != "" && stckcode != null)
+ if (flag == "Y")
{
- string[] classcode = Array.ConvertAll<string, string>(stckcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
- search += "and C.idparent in @classcode ";
- dynamicParams.Add("@classcode", classcode);
+ if (stckcode != "" && stckcode != null)
+ {
+ string[] classcode = Array.ConvertAll<string, string>(stckcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
+ search += "and C.idparent in @classcode ";
+ dynamicParams.Add("@classcode", classcode);
+ }
+
+ }
+ if (flag == "N")
+ {
+ if (stckcode != "" && stckcode != null)
+ {
+ string[] classcode = Array.ConvertAll<string, string>(stckcode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries), s => s.ToString()); //string鍒嗗壊杞瑂tring[]
+ search += "and C.idparent in @classcode and C.endpnt=@endpnt";
+ dynamicParams.Add("@classcode", classcode);
+ dynamicParams.Add("@endpnt", classcode);
+ }
}
if (locacode != "" && locacode != null)
{
@@ -3055,10 +3069,10 @@
search += "and C.name like '%'+@locaname+'%' ";
dynamicParams.Add("@locaname", locaname);
}
- sql = @"select C.code,C.name,C.status,C.description,C.idwarehouse as stckcode,T.name as stckname,C.idparent as parentcode,L.name as parentname,
+ sql = @"select C.code,C.name,C.status,C.description,C.idwarehouse as stckcode,T.name as stckname,C.idparent as parentcode,L.name as parentname,C.endpnt,
C.lm_user as usercode,U.username,C.lm_date,C.data_sources
from (
- select L.code,L.name,L.idwarehouse,L.status,L.description,L.lm_user,L.lm_date,L.data_sources,case when L.idparent is NULL or L.idparent='' then L.idwarehouse else L.idparent end as idparent
+ select L.code,L.name,L.idwarehouse,L.status,L.description,L.lm_user,L.lm_date,L.data_sources,case when L.idparent is NULL or L.idparent='' then L.idwarehouse else L.idparent end as idparent,L.idparent as endpnt
from TSecLoca L
) as C
left join TSecStck T on C.idwarehouse=T.code
@@ -3157,6 +3171,15 @@
}
if (OperType == "Update")
{
+ //鍒ゆ柇涓婄骇璐т綅缂栫爜鏄惁绛変簬璐т綅缂栫爜
+ if (locacode == parentlocacode)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "涓婄骇璐т綅涓嶈兘鏄簱浣嶆湰韬紒";
+ mes.data = null;
+ return mes;
+ }
//鍒ゆ柇寰�鏉ュ崟浣嶅悕绉版槸鍚﹂噸澶�
sql = @"select * from TSecLoca where code<>@code and name=@name";
dynamicParams.Add("@code", locacode);
diff --git a/VueWebCoreApi/DLL/DAL/GeneralBasicDataDAL.cs b/VueWebCoreApi/DLL/DAL/GeneralBasicDataDAL.cs
index 1d48bc2..558029b 100644
--- a/VueWebCoreApi/DLL/DAL/GeneralBasicDataDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/GeneralBasicDataDAL.cs
@@ -5,6 +5,7 @@
using System.Data.SqlClient;
using System.Linq;
using System.Threading.Tasks;
+using VueWebCoreApi.Models;
using VueWebCoreApi.Models.UnitMaterial;
using VueWebCoreApi.Tools;
@@ -363,6 +364,76 @@
}
#endregion
+ #region[浠撳簱搴撲綅鍩虹璧勬枡]
+ public static ToMessage WareHouseLocation()
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ List<WareHouseLocation> list = new List<WareHouseLocation>();
+ try
+ {
+ //鑾峰彇浠撳簱鏁版嵁
+ sql = @"select code,name from TSecStck where status='0'";
+ var data = DapperHelper.selecttable(sql);
+ for (int i = 0; i < data.Rows.Count; i++)
+ {
+ WareHouseLocation warhouse = new WareHouseLocation();
+ warhouse.value = data.Rows[i]["code"].ToString();
+ warhouse.text = data.Rows[i]["name"].ToString();
+ warhouse.children = new List<LocationData>();
+ //鑾峰彇搴撲綅
+ sql = @"select code,name from TSecLoca where status='0' and idwarehouse=@idwarehouse";
+ dynamicParams.Add("@idwarehouse", data.Rows[i]["code"].ToString());
+ var data0 = DapperHelper.selectdata(sql, dynamicParams);
+ for (int j = 0; j < data0.Rows.Count; j++)
+ {
+ LocationData locat = new LocationData();
+ locat.value = data0.Rows[j]["code"].ToString();
+ locat.text = data0.Rows[j]["name"].ToString();
+ warhouse.children.Add(locat);
+ }
+ list.Add(warhouse);
+ }
+ 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 WareHouseSelectLocation(string warhousecode)
+ {
+ var sql = "";
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ sql = @"select code,name from TSecLoca where status='0' and idwarehouse=@idwarehouse";
+ dynamicParams.Add("@idwarehouse", warhousecode);
+ 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 StepData()
{
diff --git a/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs b/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs
index 148d517..7d86f8e 100644
--- a/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs
+++ b/VueWebCoreApi/DLL/DAL/MouldManagerDAL.cs
@@ -68,7 +68,7 @@
}
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
var total = 0; //鎬绘潯鏁�
- var sql = @"select A.status,A.usestatus,A.code,A.name,A.spec,A.warehousecode,S.name as warehousename,
+ var sql = @"select A.status,A.usestatus,A.code,A.name,A.spec,A.warehousecode,S.name as warehousename,A.location_code,L.name as location_name,
A.surp_life,(select isnull(sum(usecount_life),0) from TMould_UpDownReord R where R.mould_code=A.code) as serlife,
A.resi_life,(case when isnull(M.mouldcode,'')='' then 'N' else 'Y' end) as is_part,
STUFF((SELECT ',' + B.partcode
@@ -78,6 +78,7 @@
A.lm_user as usercode,U.username,A.lm_date
from TMouldInfo A
left join TSecStck S on A.warehousecode=S.code
+ left join TSecLoca L on A.location_code=L.code
left join (
select distinct mouldcode from TMouldInfoPart
) M on A.code=M.mouldcode
@@ -3252,7 +3253,7 @@
#endregion
#region[妯″叿鍏ュ簱鎻愪氦]
- public static ToMessage MouldInWareHouseSave(string mouldcode, string warehousecode, string description, User us)
+ public static ToMessage MouldInWareHouseSave(string mouldcode, string warehousecode,string locationcode, string description, User us)
{
var sql = "";
List<object> list = new List<object>();
@@ -3261,8 +3262,8 @@
{
list.Clear();
//鍐欏叆妯″叿鍑哄叆搴撹褰曡〃(鍏ュ簱鎿嶄綔)
- sql = @"insert into TMould_InOutReord(mould_code,type,warehouse_code,description,lm_user,lm_date)
- values(@mould_code,@type,@warehouse_code,@description,@lm_user,@lm_date)";
+ sql = @"insert into TMould_InOutReord(mould_code,type,warehouse_code,location_code,description,lm_user,lm_date)
+ values(@mould_code,@type,@warehouse_code,@location_code,@description,@lm_user,@lm_date)";
list.Add(new
{
str = sql,
@@ -3271,6 +3272,7 @@
mould_code = mouldcode,
type = "IN",
warehouse_code = warehousecode,
+ location_code = locationcode,
description = description,
lm_user = us.usercode,
lm_date = DateTime.Now.ToString()
@@ -3278,8 +3280,8 @@
});
//鍥炲啓妯″叿娓呭崟,浣跨敤鐘舵��(鍏ュ簱),浠撳簱缂栫爜
- sql = @"update TMouldInfo set usestatus='0',warehousecode=@warehousecode where code=@mouldcode";
- list.Add(new { str = sql, parm = new { mouldcode = mouldcode, warehousecode = warehousecode } });
+ sql = @"update TMouldInfo set usestatus='0',warehousecode=@warehousecode,location_code=@location_code where code=@mouldcode";
+ list.Add(new { str = sql, parm = new { mouldcode = mouldcode, warehousecode = warehousecode, location_code = locationcode } });
bool aa = DapperHelper.DoTransaction(list);
if (aa)
@@ -3329,9 +3331,10 @@
{
//鍒ゆ柇褰撳墠妯″叿鏄惁鍦ㄥ鍊熺姸鎬�
sql = @"select M.code as mould_code,M.name as mould_name,M.spec as mould_spec,
- M.surp_life,M.resi_life,M.warehousecode,C.name as warehousename
+ M.surp_life,M.resi_life,M.warehousecode,C.name as warehousename,M.location_code,L.name as location_name
from TMouldInfo M
left join TSecStck C on M.warehousecode=C.code
+ left join TSecLoca L on M.location_code=L.code
where M.code=@mouldcode and M.usestatus='0'";
dynamicParams.Add("@mouldcode", mouldcode);
var data = DapperHelper.selectdata(sql, dynamicParams);
@@ -3379,7 +3382,7 @@
#endregion
#region[妯″叿鍑哄簱鎻愪氦]
- public static ToMessage MouldOutWareHouseSave(string mouldcode, string warehousecode, string description, User us)
+ public static ToMessage MouldOutWareHouseSave(string mouldcode, string warehousecode,string locationcode, string description, User us)
{
var sql = "";
List<object> list = new List<object>();
@@ -3388,8 +3391,8 @@
{
list.Clear();
//鍐欏叆妯″叿鍑哄叆搴撹褰曡〃(鍑哄簱鎿嶄綔)
- sql = @"insert into TMould_InOutReord(mould_code,type,warehouse_code,description,lm_user,lm_date)
- values(@mould_code,@type,@warehouse_code,@description,@lm_user,@lm_date)";
+ sql = @"insert into TMould_InOutReord(mould_code,type,warehouse_code,location_code,description,lm_user,lm_date)
+ values(@mould_code,@type,@warehouse_code,@location_code,@description,@lm_user,@lm_date)";
list.Add(new
{
str = sql,
@@ -3398,6 +3401,7 @@
mould_code = mouldcode,
type = "OUT",
warehouse_code = warehousecode,
+ location_code= locationcode,
description = description,
lm_user = us.usercode,
lm_date = DateTime.Now.ToString()
@@ -3405,8 +3409,8 @@
});
//鍥炲啓妯″叿娓呭崟,浣跨敤鐘舵��(鍑哄簱),娓呴櫎浠撳簱缂栫爜
- sql = @"update TMouldInfo set usestatus='1',warehousecode=@warehousecode where code=@mouldcode";
- list.Add(new { str = sql, parm = new { mouldcode = mouldcode, warehousecode ="" } });
+ sql = @"update TMouldInfo set usestatus='1',warehousecode=@warehousecode,location_code=@location_code where code=@mouldcode";
+ list.Add(new { str = sql, parm = new { mouldcode = mouldcode, warehousecode ="", location_code="" } });
bool aa = DapperHelper.DoTransaction(list);
if (aa)
@@ -3695,14 +3699,9 @@
search += "and A.maint_result=@repairresult ";
dynamicParams.Add("@repairresult", repairresult);
}
- if (search == "")
- {
- search = "and 1=1 ";
- }
- //search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
var total = 0; //鎬绘潯鏁�
- var sql = @"select A.bywo,A.mould_code,E.name as mould_name,E.spec as mould_spec,M.code as stanedcode,M.name as stanedname,
+ var sql = @"select A.id,A.bywo,A.mould_code,E.name as mould_name,E.spec as mould_spec,M.code as stanedcode,M.name as stanedname,
U.username as maint_user,A.maint_result,A.maint_date
from TMouldmaint_Proc_Main A
left join TMouldInfo E on A.mould_code=E.code
@@ -3802,10 +3801,6 @@
{
search += "and A.maint_result=@repairresult ";
dynamicParams.Add("@repairresult", repairresult);
- }
- if (search == "")
- {
- search = "and 1=1 ";
}
//search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
@@ -3920,11 +3915,6 @@
search += "and A.verify_date between @vrifcatopendate and @vrifcatclosedate ";
dynamicParams.Add("@vrifcatopendate", vrifcatopendate + " 00:00:00");
dynamicParams.Add("@vrifcatclosedate", vrifcatclosedate + " 23:59:59");
- }
-
- if (search == "")
- {
- search = "and 1=1 ";
}
//search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
@@ -4080,11 +4070,6 @@
dynamicParams.Add("@vrifcatopendate", vrifcatopendate + " 00:00:00");
dynamicParams.Add("@vrifcatclosedate", vrifcatclosedate + " 23:59:59");
}
-
- if (search == "")
- {
- search = "and 1=1 ";
- }
//search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
var total = 0; //鎬绘潯鏁�
@@ -4117,5 +4102,283 @@
return mes;
}
#endregion
+
+
+ #region[妯″叿涓婁笅鏈鸿褰曟煡璇
+ public static ToMessage MouldUpDownMachinesSearch(string mouldcode, string mouldname, string mouldspec, string type, string devicecode, string operuser, string opendate, string closedate, int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (mouldcode != "" && mouldcode != null)
+ {
+ search += "and A.mould_code like '%'+@mouldcode+'%' ";
+ dynamicParams.Add("@mouldcode", mouldcode);
+ }
+ if (mouldname != "" && mouldname != null)
+ {
+ search += "and M.name like '%'+@mouldname+'%' ";
+ dynamicParams.Add("@mouldname", mouldname);
+ }
+ if (mouldspec != "" && mouldspec != null)
+ {
+ search += "and M.spec like '%'+@mouldspec+'%' ";
+ dynamicParams.Add("@mouldspec", mouldspec);
+ }
+ if (type != "" && type != null)
+ {
+ search += "and A.type=@type ";
+ dynamicParams.Add("@type", type);
+ }
+ if (devicecode != "" && devicecode != null)
+ {
+ search += "and A.eqp_code=@devicecode ";
+ dynamicParams.Add("@devicecode", devicecode);
+ }
+ if (operuser != "" && operuser != null)
+ {
+ search += "and U.username like '%'+@operuser+'%' ";
+ dynamicParams.Add("@operuser", operuser);
+ }
+ if (opendate != "" && opendate != null)
+ {
+ search += "and A.lm_date between @opendate and @closedate ";
+ dynamicParams.Add("@opendate", opendate + " 00:00:00");
+ dynamicParams.Add("@closedate", closedate + " 23:59:59");
+ }
+ //search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.mould_code,M.name as mould_name,M.spec as mould_spec,
+ (case when A.type='UP' then '涓婃満' else '涓嬫満' end) as type,A.usecount_life,
+ A.eqp_code,E.name as eqp_name,U.username as lm_user,A.lm_date
+ from TMould_UpDownReord A
+ left join TMouldInfo M on A.mould_code=M.code
+ left join TEqpInfo E on A.eqp_code=E.code
+ left join TUser U on A.lm_user=U.usercode
+ where 1=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[妯″叿涓婁笅鏈鸿瀵煎嚭Excel]
+ public static ToMessage MouldUpDownMachinesOutExcel(string mouldcode, string mouldname, string mouldspec, string type, string devicecode, string operuser, string opendate, string closedate)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (mouldcode != "" && mouldcode != null)
+ {
+ search += "and A.mould_code like '%'+@mouldcode+'%' ";
+ dynamicParams.Add("@mouldcode", mouldcode);
+ }
+ if (mouldname != "" && mouldname != null)
+ {
+ search += "and M.name like '%'+@mouldname+'%' ";
+ dynamicParams.Add("@mouldname", mouldname);
+ }
+ if (mouldspec != "" && mouldspec != null)
+ {
+ search += "and M.spec like '%'+@mouldspec+'%' ";
+ dynamicParams.Add("@mouldspec", mouldspec);
+ }
+ if (type != "" && type != null)
+ {
+ search += "and A.type=@type ";
+ dynamicParams.Add("@type", type);
+ }
+ if (devicecode != "" && devicecode != null)
+ {
+ search += "and A.eqp_code=@devicecode ";
+ dynamicParams.Add("@devicecode", devicecode);
+ }
+ if (operuser != "" && operuser != null)
+ {
+ search += "and U.username like '%'+@operuser+'%' ";
+ dynamicParams.Add("@operuser", operuser);
+ }
+ if (opendate != "" && opendate != null)
+ {
+ search += "and A.lm_date between @opendate and @closedate ";
+ dynamicParams.Add("@opendate", opendate + " 00:00:00");
+ dynamicParams.Add("@closedate", closedate + " 23:59:59");
+ }
+ //search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.mould_code as '妯″叿缂栫爜',M.name as '妯″叿鍚嶇О',M.spec as '妯″叿瑙勬牸',
+ (case when A.type='UP' then '涓婃満' else '涓嬫満' end) as '鎿嶄綔绫诲瀷',A.usecount_life as '鏈浣跨敤',
+ A.eqp_code as '璁惧缂栫爜',E.name as '璁惧鍚嶇О',U.username as '鎿嶄綔浜哄憳',A.lm_date as '鎿嶄綔鏃堕棿'
+ from TMould_UpDownReord A
+ left join TMouldInfo M on A.mould_code=M.code
+ left join TEqpInfo E on A.eqp_code=E.code
+ left join TUser U on A.lm_user=U.usercode
+ where 1=1 " + search;
+ DataTable data = DapperHelper.selectdata(sql, dynamicParams);
+ data.TableName = "Table"; //璁剧疆DataTable鐨勫悕绉�
+ string msg = DownLoad.DataTableToExcel(data, "妯″叿涓婁笅鏈鸿褰曟姤琛�");
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.count = total;
+ mes.data = msg;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
+
+
+ #region[妯″叿鍊熻繕璁板綍鏌ヨ]
+ public static ToMessage MouldCirculateMachinesSearch(string mouldcode, string mouldname, string mouldspec, string type, string operuser, string opendate, string closedate, int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (mouldcode != "" && mouldcode != null)
+ {
+ search += "and A.mould_code like '%'+@mouldcode+'%' ";
+ dynamicParams.Add("@mouldcode", mouldcode);
+ }
+ if (mouldname != "" && mouldname != null)
+ {
+ search += "and M.name like '%'+@mouldname+'%' ";
+ dynamicParams.Add("@mouldname", mouldname);
+ }
+ if (mouldspec != "" && mouldspec != null)
+ {
+ search += "and M.spec like '%'+@mouldspec+'%' ";
+ dynamicParams.Add("@mouldspec", mouldspec);
+ }
+ if (type != "" && type != null)
+ {
+ search += "and A.type=@type ";
+ dynamicParams.Add("@type", type);
+ }
+ if (operuser != "" && operuser != null)
+ {
+ search += "and U.username like '%'+@operuser+'%' ";
+ dynamicParams.Add("@operuser", operuser);
+ }
+ if (opendate != "" && opendate != null)
+ {
+ search += "and A.lm_date between @opendate and @closedate ";
+ dynamicParams.Add("@opendate", opendate + " 00:00:00");
+ dynamicParams.Add("@closedate", closedate + " 23:59:59");
+ }
+ //search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.mould_code,M.name as mould_name,M.spec as mould_spec,
+ (case when A.type='OUT' then '澶栧��' else '褰掕繕' end) as type,
+ A.description,U.username as lm_user,A.lm_date
+ from TMould_LendOutReord A
+ left join TMouldInfo M on A.mould_code=M.code
+ left join TUser U on A.lm_user=U.usercode
+ where 1=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[妯″叿鍊熻繕璁板綍瀵煎嚭]
+ public static ToMessage MouldCirculateMachinesOutExcel(string mouldcode, string mouldname, string mouldspec, string type, string operuser, string opendate, string closedate)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (mouldcode != "" && mouldcode != null)
+ {
+ search += "and A.mould_code like '%'+@mouldcode+'%' ";
+ dynamicParams.Add("@mouldcode", mouldcode);
+ }
+ if (mouldname != "" && mouldname != null)
+ {
+ search += "and M.name like '%'+@mouldname+'%' ";
+ dynamicParams.Add("@mouldname", mouldname);
+ }
+ if (mouldspec != "" && mouldspec != null)
+ {
+ search += "and M.spec like '%'+@mouldspec+'%' ";
+ dynamicParams.Add("@mouldspec", mouldspec);
+ }
+ if (type != "" && type != null)
+ {
+ search += "and A.type=@type ";
+ dynamicParams.Add("@type", type);
+ }
+ if (operuser != "" && operuser != null)
+ {
+ search += "and U.username like '%'+@operuser+'%' ";
+ dynamicParams.Add("@operuser", operuser);
+ }
+ if (opendate != "" && opendate != null)
+ {
+ search += "and A.lm_date between @opendate and @closedate ";
+ dynamicParams.Add("@opendate", opendate + " 00:00:00");
+ dynamicParams.Add("@closedate", closedate + " 23:59:59");
+ }
+ //search = search.Substring(3);//鎴彇绱㈠紩2鍚庨潰鐨勫瓧绗�
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.mould_code as '妯″叿缂栫爜',M.name as '妯″叿鍚嶇О',M.spec as '瑙勬牸鍨嬪彿',
+ (case when A.type='OUT' then '澶栧��' else '褰掕繕' end) as '鎿嶄綔绫诲瀷',
+ A.description as '鎻忚堪',U.username as '鎿嶄綔浜哄憳',A.lm_date as '鎿嶄綔鏃堕棿'
+ from TMould_LendOutReord A
+ left join TMouldInfo M on A.mould_code=M.code
+ left join TUser U on A.lm_user=U.usercode
+ where 1=1 " + search;
+ DataTable data = DapperHelper.selectdata(sql, dynamicParams);
+ data.TableName = "Table"; //璁剧疆DataTable鐨勫悕绉�
+ string msg = DownLoad.DataTableToExcel(data, "妯″叿鍊熻繕璁板綍鎶ヨ〃");
+ mes.code = "200";
+ mes.Message = "鏌ヨ鎴愬姛!";
+ mes.count = total;
+ mes.data = msg;
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = e.Message;
+ mes.data = null;
+ }
+ return mes;
+ }
+ #endregion
}
}
diff --git a/VueWebCoreApi/Models/WareHouseLocation.cs b/VueWebCoreApi/Models/WareHouseLocation.cs
new file mode 100644
index 0000000..c5bcba1
--- /dev/null
+++ b/VueWebCoreApi/Models/WareHouseLocation.cs
@@ -0,0 +1,19 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace VueWebCoreApi.Models
+{
+ public class WareHouseLocation
+ {
+ public string text { get; set; }
+ public string value { get; set; }
+ public List<LocationData> children { get; set; }
+ }
+ public class LocationData
+ {
+ public string text { get; set; }
+ public string value { get; set; }
+ }
+}
diff --git a/VueWebCoreApi/Startup.cs b/VueWebCoreApi/Startup.cs
index c149a4c..748a1a7 100644
--- a/VueWebCoreApi/Startup.cs
+++ b/VueWebCoreApi/Startup.cs
@@ -20,6 +20,7 @@
using Quartz;
using Quartz.Impl;
using Quartz.Spi;
+using Swashbuckle.AspNetCore.SwaggerUI;
using System;
using System.Collections.Generic;
using System.IO;
@@ -60,19 +61,20 @@
{
typeof(OpenApiGroup).GetEnumNames().ToList().ForEach(version =>
{
-
c.SwaggerDoc(version, new OpenApiInfo()
{
Title = $"新凯迪MesApi文档:{version}",
Version = version,
- Description = $"Panda.Sewerage : {version} "
+ Description = $"Panda.Sewerage : {version} ",
});
});
+
string basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
string xmlPath = Path.Combine(basePath, "VueWebCoreApi.xml");
c.IncludeXmlComments(xmlPath, true);
});
#endregion
+
// 设置配置
AppSetting.SetAppSetting(Configuration.GetSection("ConnectionStrings"));
//log4net配置
@@ -134,6 +136,7 @@
{
c.SwaggerEndpoint($"/swagger/{version}/swagger.json", $"{version}");
});
+
});
#endregion
app.UseHttpsRedirection();
--
Gitblit v1.9.3