From 7a0d98456b4ecaf1867cd62ecb7c8169ec15d042 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期三, 22 六月 2022 18:20:34 +0800
Subject: [PATCH] 设备清单查询、新增、编辑、删除接口开发 设备类型(新增、删除)、设备组(新增、删除)接口开发 仓库定义(新增、编辑、删除)、库位定义(新增、编辑、删除) 存货类型、存货档案接口开发
---
VueWebApi/obj/Release/VueWebApi.pdb | 0
VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache | 2
VueWebApi/DLL/DAL/BasicSettingDAL.cs | 95
VueWebApi/Models/MaterialRout.cs | 16
VueWebApi/DLL/BLL/DeviceManagerBLL.cs | 59
.vs/VueWebApi/v16/.suo | 0
VueWebApi/obj/Release/TransformWebConfig/original/Web.config | 8
VueWebApi/Logs/2022-06-22.TXT | 50
VueWebApi/VueWebApi.csproj | 9
VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb | 0
VueWebApi/Controllers/DeviceManagerController.cs | 148 ++
VueWebApi/DLL/DAL/MaterialManagerDAL.cs | 394 +++++++
VueWebApi/obj/Release/Package/PackageTmp/Web.config | 8
VueWebApi/bin/VueWebApi.pdb | 0
VueWebApi/DLL/BLL/ProductModelBLL.cs | 100 +
VueWebApi/Controllers/MaterialManagerController.cs | 168 +++
VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache | 2
VueWebApi/Logs/2022-06-21.TXT | 0
VueWebApi/bin/VueWebApi.dll.config | 8
VueWebApi/obj/Release/TransformWebConfig/transformed/Web.config | 8
VueWebApi/DLL/DAL/ProductModelDAL.cs | 668 ++++++++++++
VueWebApi/DLL/BLL/MaterialManagerBLL.cs | 63 +
VueWebApi/Tools/RedisHelper.cs | 7
VueWebApi/Global.asax.cs | 4
VueWebApi/DLL/BLL/BasicSettingBLL.cs | 11
VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user | 6
VueWebApi/Tools/SeachEncode.cs | 18
VueWebApi/Web.config | 8
VueWebApi/bin/VueWebApi.xml | 223 ++++
VueWebApi/Models/ObjectDataCont.cs | 15
VueWebApi/Models/Uom.cs | 15
VueWebApi/obj/Debug/VueWebApi.csproj.AssemblyReference.cache | 0
VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt | 7
VueWebApi/obj/Debug/VueWebApi.pdb | 0
VueWebApi/Controllers/BasicSettingController.cs | 36
VueWebApi/Tools/DapperHelper.cs | 202 ++-
VueWebApi/Controllers/ProductModelController.cs | 271 +++++
VueWebApi/Controllers/LoginController.cs | 2
VueWebApi/DLL/DAL/DeviceManagerDAL.cs | 587 ++++++++++
39 files changed, 3,005 insertions(+), 213 deletions(-)
diff --git a/.vs/VueWebApi/v16/.suo b/.vs/VueWebApi/v16/.suo
index 7b13b4b..1aafff2 100644
--- a/.vs/VueWebApi/v16/.suo
+++ b/.vs/VueWebApi/v16/.suo
Binary files differ
diff --git a/VueWebApi/Controllers/BasicSettingController.cs b/VueWebApi/Controllers/BasicSettingController.cs
index e466f9c..e796224 100644
--- a/VueWebApi/Controllers/BasicSettingController.cs
+++ b/VueWebApi/Controllers/BasicSettingController.cs
@@ -281,9 +281,9 @@
- #region[瑙掕壊绫诲瀷鏌ヨ]
+ #region[瑙掕壊绫诲瀷鍒楄〃鏌ヨ]
/// <summary>
- /// 瑙掕壊绫诲瀷鏌ヨ
+ /// 瑙掕壊绫诲瀷鍒楄〃鏌ヨ
/// </summary>
/// <param name="page">椤电爜</param>
/// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
@@ -327,6 +327,28 @@
public HttpResponseMessage RoleTypeDelete(string RoleTypeCode)
{
mes = BasicSettingBLL.RoleTypeDelete(RoleTypeCode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瑙掕壊绫诲瀷涓嬫媺鎺ュ彛]
+ /// <summary>
+ /// 瑙掕壊绫诲瀷涓嬫媺鎺ュ彛
+ /// </summary>
+ /// <returns></returns>
+ [Route(template: "RoleTypeSelect")]
+ [HttpGet]
+ public HttpResponseMessage RoleTypeSelect()
+ {
+ try
+ {
+ mes = BasicSettingBLL.RoleTypeSelect();
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.Message = e.Message;
+ }
return TJson.toJson(mes);
}
#endregion
@@ -461,7 +483,7 @@
/// <returns></returns>
[Route(template: "RoleAssociationRight")]
[HttpGet]
- public HttpResponseMessage RoleAssociationRight(string rolecode,string type)
+ public HttpResponseMessage RoleAssociationRight(string rolecode,string type=null)
{
mes = BasicSettingBLL.RoleAssociationRight(rolecode,type);
return TJson.toJson(mes);
@@ -524,13 +546,15 @@
string unitid = obj["id"].ToString(); //寰�鏉ュ崟浣峣d(涓婚敭)
string unitcode = obj["unitcode"].ToString(); //寰�鏉ュ崟浣嶇紪鐮佺紪鐮�
string unitname = obj["unitname"].ToString(); //寰�鏉ュ崟浣嶅悕绉�
- string unitattr = obj["unitattr"].ToString(); //寰�鏉ュ崟灞炴��
+ string mtypecode = obj["mtypecode"].ToString(); //澶栬喘渚涙柟缂栫爜
+ string btypecode = obj["btypecode"].ToString(); //澶栧崗渚涙柟缂栫爜
+ string htypecode = obj["htypecode"].ToString(); //瀹㈡埛缂栫爜
string person = obj["person"].ToString(); //鑱旂郴浜�
string contact = obj["contact"].ToString(); //鑱旂郴鏂瑰紡
string description = obj["description"].ToString(); //琛ュ厖鎻忚堪
- var usercode = HttpContext.Current.Request.Cookies["navTabId"].Value.ToString();
+ var usercode = "Admin";//HttpContext.Current.Request.Cookies["admin"].Value.ToString();
string OperType = obj["OperType"].ToString(); //鎿嶄綔绫诲瀷
- mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, unitattr, person, contact, description, usercode, OperType);
+ mes = BasicSettingBLL.AddUpdateCurrentUnit(unitid, unitcode, unitname, mtypecode, btypecode,htypecode, person, contact, description, usercode, OperType);
return TJson.toJson(mes);
}
#endregion
diff --git a/VueWebApi/Controllers/DeviceManagerController.cs b/VueWebApi/Controllers/DeviceManagerController.cs
index bd92ed0..263c74c 100644
--- a/VueWebApi/Controllers/DeviceManagerController.cs
+++ b/VueWebApi/Controllers/DeviceManagerController.cs
@@ -7,6 +7,7 @@
using System.Web;
using System.Web.Http;
using VueWebApi.DLL.BLL;
+using VueWebApi.Models;
using VueWebApi.Tools;
namespace VueWebApi.Controllers
@@ -43,18 +44,14 @@
/// <summary>
/// 璁惧绫诲瀷鏂板
/// </summary>
- /// <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ /// <param name="json">鎻愪氦鏁版嵁瀵硅薄</param>
/// <returns></returns>
[Route(template: "AddUpdateDeviceType")]
[HttpPost]
- public HttpResponseMessage AddUpdateDeviceType([FromBody] JObject obj)
+ public HttpResponseMessage AddUpdateDeviceType(List<ObjectDataCont> json)
{
- //string deviceid = obj["id"].ToString(); //璁惧绫诲瀷id(涓婚敭)
- string devicetypecode = obj["devicetypecode"].ToString(); //璁惧绫诲瀷缂栫爜
- string devicetypename = obj["devicetypename"].ToString(); //璁惧绫诲瀷鍚嶇О
- string devicetypedescipt = obj["devicetypedescipt"].ToString(); //璁惧绫诲瀷鎻忚堪
- var usercode = HttpContext.Current.Request.Cookies["navTabId"].Value.ToString();
- mes = DeviceManagerBLL.AddUpdateDeviceType(devicetypecode, devicetypename, devicetypedescipt, usercode);
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
+ mes = DeviceManagerBLL.AddUpdateDeviceType(json, username);
return TJson.toJson(mes);
}
#endregion
@@ -63,18 +60,129 @@
/// <summary>
/// 璁惧绫诲瀷鍒犻櫎
/// </summary>
- /// <param name="devicetypeid">璁惧绫诲瀷ID</param>
+ /// <param name="devicetypecode">璁惧绫诲瀷缂栫爜</param>
/// <returns></returns>
[Route(template: "DeleteDeviceType")]
[HttpPost]
- public HttpResponseMessage DeleteDeviceType(string devicetypeid)
+ public HttpResponseMessage DeleteDeviceType(string devicetypecode)
{
- mes = DeviceManagerBLL.DeleteDeviceType(devicetypeid);
+ mes = DeviceManagerBLL.DeleteDeviceType(devicetypecode);
return TJson.toJson(mes);
}
#endregion
+ #region[璁惧绫诲瀷涓嬫媺妗嗘帴鍙
+ /// <summary>
+ /// 璁惧绫诲瀷涓嬫媺妗嗘帴鍙�
+ /// </summary>
+ /// <returns></returns>
+ [Route(template: "DeviceTypeSelect")]
+ [HttpGet]
+ public HttpResponseMessage DeviceTypeSelect()
+ {
+ try
+ {
+ mes = DeviceManagerBLL.DeviceTypeSelect();
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.Message = e.Message;
+ }
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璁惧缁勬煡璇
+ /// <summary>
+ /// 璁惧缁勬煡璇�
+ /// </summary>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <returns></returns>
+ [Route(template: "DeviceGroupSearch")]
+ [HttpGet]
+ public HttpResponseMessage DeviceGroupSearch(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 = DeviceManagerBLL.DeviceGroupSearch(startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璁惧缁勬柊澧瀅
+ /// <summary>
+ /// 璁惧缁勬柊澧�
+ /// </summary>
+ /// <param name="json">鎻愪氦鏁版嵁瀵硅薄</param>
+ /// <returns></returns>
+ [Route(template: "AddUpdateDeviceGroup")]
+ [HttpPost]
+ public HttpResponseMessage AddUpdateDeviceGroup(List<ObjectDataCont> json)
+ {
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
+ mes = DeviceManagerBLL.AddUpdateDeviceGroup(json, username);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[璁惧缁勫垹闄
+ /// <summary>
+ /// 璁惧缁勫垹闄�
+ /// </summary>
+ /// <param name="devicegroupcode">璁惧缁勭紪鐮�</param>
+ /// <returns></returns>
+ [Route(template: "DeleteDeviceGroup")]
+ [HttpPost]
+ public HttpResponseMessage DeleteDeviceGroup(string devicegroupcode)
+ {
+ mes = DeviceManagerBLL.DeleteDeviceGroup(devicegroupcode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+
+ #region[璁惧绫诲瀷鏌ユ壘璁惧缁刔
+ /// <summary>
+ /// 璁惧绫诲瀷鏌ユ壘璁惧缁�
+ /// </summary>
+ /// <param name="eqptypecode">璁惧绫诲瀷缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "DeviceTypeSelectGroup")]
+ [HttpGet]
+ public HttpResponseMessage DeviceTypeSelectGroup(string eqptypecode)
+ {
+ try
+ {
+ mes = DeviceManagerBLL.DeviceTypeSelectGroup(eqptypecode);
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.Message = e.Message;
+ }
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[鎵�灞炶溅闂翠笅鎷夋帴鍙
+ /// <summary>
+ /// 鎵�灞炶溅闂翠笅鎷夋帴鍙�
+ /// </summary>
+ /// <returns></returns>
+
+ [Route(template: "WorkShopSelect")]
+ [HttpGet]
+ public HttpResponseMessage WorkShopSelect()
+ {
+ mes = DeviceManagerBLL.WorkShopSelect();
+ return TJson.toJson(mes);
+ }
+ #endregion
#region[璁惧娓呭崟鏌ヨ]
/// <summary>
@@ -115,15 +223,16 @@
string deviceid = obj["id"].ToString(); //璁惧娓呭崟id(涓婚敭)
string devicecode = obj["devicecode"].ToString(); //璁惧缂栫爜
string devicename = obj["devicename"].ToString(); //璁惧鍚嶇О
- string devicetype = obj["devicetype"].ToString(); //璁惧绫诲瀷
- string devicegroup = obj["devicegroup"].ToString(); //璁惧缁�
+ string devicetype = obj["devicetypecode"].ToString(); //璁惧绫诲瀷缂栫爜
+ string devicegroup = obj["devicegroupcode"].ToString(); //璁惧缁勭紪鐮�
string importdate = obj["importdate"].ToString(); //鎶曞叆鏃ユ湡
- string workshop = obj["workshop"].ToString(); //鎵�灞炶溅闂�
+ string workshop = obj["workshopcode"].ToString(); //鎵�灞炶溅闂寸紪鐮�
+ string linecode = obj["linecode"].ToString(); //鎵�灞炰骇绾跨紪鐮�
string status = obj["status"].ToString(); //浣跨敤鐘舵��
string ratio = obj["ratio"].ToString(); //绋煎姩鐜�
- var usercode = HttpContext.Current.Request.Cookies["navTabId"].Value.ToString();
+ var usercode = HttpContext.Current.Request.Cookies["admin"].Value.ToString();
string OperType = obj["OperType"].ToString(); //鎿嶄綔绫诲瀷
- mes = DeviceManagerBLL.AddUpdateDeviceManger(deviceid, devicecode, devicename, devicetype, devicegroup, importdate, workshop, status, ratio, usercode, OperType);
+ mes = DeviceManagerBLL.AddUpdateDeviceManger(deviceid, devicecode, devicename, devicetype, devicegroup, importdate, workshop, linecode, status, ratio, usercode, OperType);
return TJson.toJson(mes);
}
#endregion
@@ -132,15 +241,16 @@
/// <summary>
/// 璁惧娓呭崟鍒犻櫎
/// </summary>
- /// <param name="deviceid">璁惧ID</param>
+ /// <param name="devicecode">璁惧缂栫爜</param>
/// <returns></returns>
[Route(template: "DeleteDeviceManger")]
[HttpPost]
- public HttpResponseMessage DeleteDeviceManger(string deviceid)
+ public HttpResponseMessage DeleteDeviceManger(string devicecode)
{
- mes = DeviceManagerBLL.DeleteDeviceManger(deviceid);
+ mes = DeviceManagerBLL.DeleteDeviceManger(devicecode);
return TJson.toJson(mes);
}
#endregion
+
}
}
diff --git a/VueWebApi/Controllers/LoginController.cs b/VueWebApi/Controllers/LoginController.cs
index 52588ed..f8e7f58 100644
--- a/VueWebApi/Controllers/LoginController.cs
+++ b/VueWebApi/Controllers/LoginController.cs
@@ -160,7 +160,7 @@
/// <param name="username">鐢ㄦ埛鍚�</param>
/// <param name="usertype">鎿嶄綔绔疨C/APP</param>
/// <returns></returns>
- [ChannelActionFilter, Route(template: "LoginOut")]
+ [Route(template: "LoginOut")]
[HttpPost]
public HttpResponseMessage LoginOut(int userid, string usercode, string username,string usertype)
{
diff --git a/VueWebApi/Controllers/MaterialManagerController.cs b/VueWebApi/Controllers/MaterialManagerController.cs
new file mode 100644
index 0000000..c81e07a
--- /dev/null
+++ b/VueWebApi/Controllers/MaterialManagerController.cs
@@ -0,0 +1,168 @@
+锘縰sing Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web;
+using System.Web.Http;
+using VueWebApi.DLL.BLL;
+using VueWebApi.Tools;
+
+namespace VueWebApi.Controllers
+{
+ [RoutePrefix(prefix: "api/BasicSetting")]
+ [ControllerGroup("鐗╂枡绠$悊", "鍦ㄧ嚎鎺ュ彛")]
+ public class MaterialManagerController : ApiController
+ {
+ //瀹氫箟鍏ㄥ眬淇℃伅杩斿洖鍙橀噺
+ ToMessage mes = new ToMessage();
+ RedisHelper redis = new RedisHelper();
+
+ #region[浠撳簱瀹氫箟鏌ヨ]
+ /// <summary>
+ /// 浠撳簱瀹氫箟鏌ヨ
+ /// </summary>
+ /// <param name="warehousecode">浠撳簱缂栫爜</param>
+ /// <param name="warehousename">浠撳簱鍚嶇О</param>
+ /// <param name="description">浠撳簱鎻忚堪</param>
+ /// <param name="createuser">鍒涘缓浜哄憳</param>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <returns></returns>
+ [Route(template: "WareHouseDefSearch")]
+ [HttpGet]
+ public HttpResponseMessage WareHouseDefSearch(string warehousecode = null, string warehousename = null, string description = 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 = MaterialManagerBLL.WareHouseDefSearch(warehousecode, warehousename, description, createuser, startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[浠撳簱瀹氫箟鏂板缂栬緫]
+ /// <summary>
+ /// 浠撳簱瀹氫箟鏂板缂栬緫
+ /// </summary>
+ /// <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ /// <returns></returns>
+ [Route(template: "AddUpdateWareHouseDef")]
+ [HttpPost]
+ public HttpResponseMessage AddUpdateWareHouseDef([FromBody] JObject obj)
+ {
+ string warehouseid = obj["id"].ToString(); //浠撳簱id(涓婚敭)
+ string warehousecode = obj["warehousecode"].ToString(); //浠撳簱缂栫爜
+ string warehousename = obj["warehousename"].ToString(); //浠撳簱鍚嶇О
+ string description = obj["description"].ToString(); //浠撳簱鎻忚堪
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ string OperType = obj["OperType"].ToString(); //鎿嶄綔绫诲瀷
+ mes = MaterialManagerBLL.AddUpdateWareHouseDef(warehouseid, warehousecode, warehousename, description, username,OperType);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[浠撳簱鍒犻櫎]
+ /// <summary>
+ /// 浠撳簱鍒犻櫎
+ /// </summary>
+ /// <param name="warehousecode">浠撳簱缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "DeleteWareHouseDef")]
+ [HttpPost]
+ public HttpResponseMessage DeleteWareHouseDef(string warehousecode)
+ {
+ mes = MaterialManagerBLL.DeleteWareHouseDef(warehousecode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+
+
+ #region[鎵�灞炰粨搴撴帴鍙
+ /// <summary>
+ /// 鎵�灞炰粨搴撴帴鍙�
+ /// </summary>
+ /// <returns></returns>
+ [Route(template: "WareHouseSelect")]
+ [HttpGet]
+ public HttpResponseMessage WareHouseSelect()
+ {
+ try
+ {
+ mes = MaterialManagerBLL.WareHouseSelect();
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.Message = e.Message;
+ }
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[搴撲綅瀹氫箟鏌ヨ]
+ /// <summary>
+ /// 搴撲綅瀹氫箟鏌ヨ
+ /// </summary>
+ /// <param name="storagecode">搴撲綅缂栫爜</param>
+ /// <param name="storagename">搴撲綅鍚嶇О</param>
+ /// <param name="description">浠撳簱鎻忚堪</param>
+ /// <param name="createuser">鍒涘缓浜哄憳</param>
+ /// <param name="stockcode">鎵�灞炰粨搴撶紪鐮�</param>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <returns></returns>
+ [Route(template: "StorageDefSearch")]
+ [HttpGet]
+ public HttpResponseMessage StorageDefSearch(string storagecode = null, string storagename = null, string description = null, string createuser = null,string stockcode=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 = MaterialManagerBLL.StorageDefSearch(storagecode, storagename, description, createuser, stockcode, startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[搴撲綅瀹氫箟鏂板缂栬緫]
+ /// <summary>
+ /// 搴撲綅瀹氫箟鏂板缂栬緫
+ /// </summary>
+ /// <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ /// <returns></returns>
+ [Route(template: "AddUpdateStorageDef")]
+ [HttpPost]
+ public HttpResponseMessage AddUpdateStorageDef([FromBody] JObject obj)
+ {
+ string storageid = obj["id"].ToString(); //搴撲綅id(涓婚敭)
+ string storagecode = obj["storagecode"].ToString(); //搴撲綅缂栫爜
+ string storagename = obj["storagename"].ToString(); //搴撲綅鍚嶇О
+ string description = obj["description"].ToString(); //浠撲綅鎻忚堪
+ string stockcode = obj["stockcode"].ToString(); //鎵�灞炰粨搴撶紪鐮�
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ string OperType = obj["OperType"].ToString(); //鎿嶄綔绫诲瀷
+ mes = MaterialManagerBLL.AddUpdateStorageDef(storageid, storagecode, storagename, description, stockcode, username, OperType);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[搴撲綅鍒犻櫎]
+ /// <summary>
+ /// 搴撲綅鍒犻櫎
+ /// </summary>
+ /// <param name="storagecode">搴撲綅缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "DeleteStorageDef")]
+ [HttpPost]
+ public HttpResponseMessage DeleteStorageDef(string storagecode)
+ {
+ mes = MaterialManagerBLL.DeleteStorageDef(storagecode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+ }
+}
diff --git a/VueWebApi/Controllers/ProductModelController.cs b/VueWebApi/Controllers/ProductModelController.cs
new file mode 100644
index 0000000..fd161db
--- /dev/null
+++ b/VueWebApi/Controllers/ProductModelController.cs
@@ -0,0 +1,271 @@
+锘縰sing Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web;
+using System.Web.Http;
+using VueWebApi.DLL.BLL;
+using VueWebApi.Models;
+using VueWebApi.Tools;
+
+namespace VueWebApi.Controllers
+{
+
+ [RoutePrefix(prefix: "api/BasicSetting")]
+ [ControllerGroup("鍒堕�犳ā鍨�", "鍦ㄧ嚎鎺ュ彛")]
+ public class ProductModelController : ApiController
+ {
+ //瀹氫箟鍏ㄥ眬淇℃伅杩斿洖鍙橀噺
+ ToMessage mes = new ToMessage();
+ RedisHelper redis = new RedisHelper();
+
+ #region[瀛樿揣绫诲瀷鎺ュ彛]
+ /// <summary>
+ /// 瀛樿揣绫诲瀷鎺ュ彛
+ /// </summary>
+ /// <returns></returns>
+ [Route(template: "StockTypeSelect")]
+ [HttpGet]
+ public HttpResponseMessage StockTypeSelect()
+ {
+ try
+ {
+ mes = ProductModelBLL.StockTypeSelect();
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.Message = e.Message;
+ }
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[鐗╂枡绫诲瀷鏌ヨ]
+ /// <summary>
+ /// 鐗╂枡绫诲瀷鏌ヨ
+ /// </summary>
+ /// <param name="materialtypecode">鐗╂枡绫诲瀷缂栫爜</param>
+ /// <param name="materialtypename">鐗╂枡绫诲瀷鍚嶇О</param>
+ /// <param name="stocktypecode">瀛樿揣绫诲瀷缂栫爜</param>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <returns></returns>
+ [Route(template: "MaterialTypeSearch")]
+ [HttpGet]
+ public HttpResponseMessage MaterialTypeSearch(string materialtypecode = null, string materialtypename = null, string stocktypecode = 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.MaterialTypeSearch(materialtypecode, materialtypename, stocktypecode, startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[鐗╂枡绫诲瀷鏂板缂栬緫]
+ /// <summary>
+ /// 鐗╂枡绫诲瀷鏂板缂栬緫
+ /// </summary>
+ /// <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ /// <returns></returns>
+ [Route(template: "AddUpdateMaterialType")]
+ [HttpPost]
+ public HttpResponseMessage AddUpdateMaterialType([FromBody] JObject obj)
+ {
+ string materialtypeid = obj["id"].ToString(); //鐗╂枡绫诲瀷id(涓婚敭)
+ string materialtypecode = obj["materialtypecode"].ToString(); //鐗╂枡绫诲瀷缂栫爜
+ string materialtypename = obj["materialtypename"].ToString(); //鐗╂枡绫诲瀷鍚嶇О
+ 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);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[鐗╂枡绫诲瀷鍒犻櫎]
+ /// <summary>
+ /// 鐗╂枡绫诲瀷鍒犻櫎
+ /// </summary>
+ /// <param name="materialtypecode">鐗╂枡绫诲瀷缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "DeleteMaterialType")]
+ [HttpPost]
+ public HttpResponseMessage DeleteMaterialType(string materialtypecode)
+ {
+ mes = ProductModelBLL.DeleteMaterialType(materialtypecode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+
+
+
+
+ #region[鍗曚綅鍒楄〃鏌ヨ]
+ /// <summary>
+ /// 鍗曚綅鍒楄〃鏌ヨ
+ /// </summary>
+ /// <param name="page">椤电爜</param>
+ /// <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ /// <param name="prop">鎺掑簭瀛楁</param>
+ /// <param name="order">鎺掑簭瑙勫垯</param>
+ /// <returns></returns>
+ [Route(template: "UomSearch")]
+ [HttpGet]
+ public HttpResponseMessage UomSearch(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.UomSearch(startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[鍗曚綅鏂板]
+ /// <summary>
+ /// 鍗曚綅鏂板
+ /// </summary>
+ /// <param name="json">鍗曚綅鎻愪氦鏁版嵁</param>
+ /// <returns></returns>
+ [Route(template: "UomAdd")]
+ [HttpPost]
+ public HttpResponseMessage UomAdd(List<Uom> json)
+ {
+ var username = HttpContext.Current.Request.Cookies["admin"].Value.ToString(); //鎿嶄綔浜哄憳
+ mes = ProductModelBLL.UomAdd(username,json);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[鍗曚綅鍒犻櫎]
+ /// <summary>
+ /// 鍗曚綅鍒犻櫎
+ /// </summary>
+ /// <param name="uomcode">鍗曚綅缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "UomDelete")]
+ [HttpPost]
+ public HttpResponseMessage UomDelete(string uomcode)
+ {
+ mes = ProductModelBLL.UomDelete(uomcode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瀛樼被鍨嬫煡鎵剧墿鏂欑被鍨媇
+ /// <summary>
+ /// 瀛樼被鍨嬫煡鎵剧墿鏂欑被鍨�
+ /// </summary>
+ /// <param name="stocktypecode">瀛樿揣绫诲瀷缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "StockTypeSelectMaterialType")]
+ [HttpGet]
+ public HttpResponseMessage StockTypeSelectMaterialType(string stocktypecode)
+ {
+ try
+ {
+ mes = ProductModelBLL.StockTypeSelectMaterialType(stocktypecode);
+ }
+ catch (Exception e)
+ {
+ mes.code = "300";
+ mes.Message = e.Message;
+ }
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鏌ヨ]
+ /// <summary>
+ /// 瀛樿揣妗f鏌ヨ
+ /// </summary>
+ /// <param name="partcode"></param>
+ /// <param name="partname"></param>
+ /// <param name="partspec"></param>
+ /// <param name="stocktypecode"></param>
+ /// <param name="materialtypecode"></param>
+ /// <param name="storehousecode"></param>
+ /// <param name="page"></param>
+ /// <param name="rows"></param>
+ /// <param name="prop"></param>
+ /// <param name="order"></param>
+ /// <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)
+ {
+ int startNum = rows * (page - 1) + 1; //璧峰璁板綍rowNum
+ int endNum = rows * page; //缁撴潫璁板綍 rowNum
+ mes = ProductModelBLL.InventoryFileSelect(partcode, partname, partspec, stocktypecode, materialtypecode, storehousecode, startNum, endNum, prop, order);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鏂板缂栬緫]
+ /// <summary>
+ /// 瀛樿揣妗f鏂板缂栬緫
+ /// </summary>
+ /// <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ /// <returns></returns>
+ [Route(template: "AddUpdateInventoryFile")]
+ [HttpPost]
+ public HttpResponseMessage AddUpdateInventoryFile([FromBody] JObject obj)
+ {
+ string materialid = obj["id"].ToString(); //鐗╂枡id(涓婚敭)
+ string materialcode = obj["materialcode"].ToString(); //鐗╂枡缂栫爜
+ string materialname = obj["materialname"].ToString(); //鐗╂枡鍚嶇О
+ string materialspec = obj["materialspec"].ToString(); //鐗╂枡瑙勬牸
+ string uomcode = obj["uomcode"].ToString(); //鍗曚綅缂栫爜
+ string warehousecode = obj["warehousecode"].ToString(); //鎵�灞炰粨搴撶紪鐮�
+ string stocktypecode = obj["stocktypecode"].ToString(); //瀛樿揣绫诲瀷缂栫爜
+ string materialtypecode = obj["materialtypecode"].ToString(); //鐗╂枡绫诲瀷缂栫爜
+ string minstockqty = obj["minstockqty"].ToString(); //鏈�灏忓簱瀛�
+ 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);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鍒犻櫎]
+ /// <summary>
+ /// 瀛樿揣妗f鍒犻櫎
+ /// </summary>
+ /// <param name="materialcode">鐗╂枡缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "DeleteInventoryFile")]
+ [HttpPost]
+ public HttpResponseMessage DeleteInventoryFile(string materialcode)
+ {
+ mes = ProductModelBLL.DeleteInventoryFile(materialcode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鏌ヨ]
+ /// <summary>
+ /// 瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鏌ヨ
+ /// </summary>
+ /// <param name="partcode">鐗╂枡缂栫爜</param>
+ /// <returns></returns>
+ [Route(template: "InventoryFileAssociationRoute")]
+ [HttpGet]
+ public HttpResponseMessage InventoryFileAssociationRoute(string partcode)
+ {
+ mes = ProductModelBLL.InventoryFileAssociationRoute(partcode);
+ return TJson.toJson(mes);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鎻愪氦]
+
+ #endregion
+
+ }
+}
diff --git a/VueWebApi/DLL/BLL/BasicSettingBLL.cs b/VueWebApi/DLL/BLL/BasicSettingBLL.cs
index d14a1b7..a8dba0c 100644
--- a/VueWebApi/DLL/BLL/BasicSettingBLL.cs
+++ b/VueWebApi/DLL/BLL/BasicSettingBLL.cs
@@ -113,6 +113,13 @@
}
#endregion
+ #region[瑙掕壊绫诲瀷涓嬫媺鎺ュ彛]
+ public static ToMessage RoleTypeSelect()
+ {
+ return BasicSettingDAL.RoleTypeSelect();
+ }
+ #endregion
+
#region[瑙掕壊娓呭崟鏌ヨ]
public static ToMessage RoleSearch(string RoleCode, string RoleName, string RoleTypeCode, string CreateUser, int startNum, int endNum, string prop, string order)
{
@@ -179,9 +186,9 @@
#endregion
#region[寰�鏉ュ崟浣嶆柊澧炵紪杈慮
- public static ToMessage AddUpdateCurrentUnit(string unitid, string unitcode, string unitname, string unitattr, string person, string contact, string description, string usercode,string OperType)
+ public static ToMessage AddUpdateCurrentUnit(string unitid, string unitcode, string unitname, string mtypecode,string btypecode,string htypecode, string person, string contact, string description, string usercode,string OperType)
{
- return BasicSettingDAL.AddUpdateCurrentUnit(unitid, unitcode, unitname, unitattr, person, contact, description, usercode, OperType);
+ return BasicSettingDAL.AddUpdateCurrentUnit(unitid, unitcode, unitname, mtypecode, btypecode, htypecode, person, contact, description, usercode, OperType);
}
#endregion
diff --git a/VueWebApi/DLL/BLL/DeviceManagerBLL.cs b/VueWebApi/DLL/BLL/DeviceManagerBLL.cs
index 75fd244..ae4eab9 100644
--- a/VueWebApi/DLL/BLL/DeviceManagerBLL.cs
+++ b/VueWebApi/DLL/BLL/DeviceManagerBLL.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Web;
using VueWebApi.DLL.DAL;
+using VueWebApi.Models;
using VueWebApi.Tools;
namespace VueWebApi.DLL.BLL
@@ -17,20 +18,62 @@
#endregion
#region[璁惧绫诲瀷鏂板]
- public static ToMessage AddUpdateDeviceType(string devicetypecode, string devicetypename, string devicetypedescipt, string usercode)
+ public static ToMessage AddUpdateDeviceType(List<ObjectDataCont> json,string username)
{
- return DeviceManagerDAL.AddUpdateDeviceType(devicetypecode, devicetypename, devicetypedescipt, usercode);
+ return DeviceManagerDAL.AddUpdateDeviceType(json, username);
}
#endregion
#region[璁惧绫诲瀷鍒犻櫎]
- public static ToMessage DeleteDeviceType(string devicetypeid)
+ public static ToMessage DeleteDeviceType(string devicetypecode)
{
- return DeviceManagerDAL.DeleteDeviceType(devicetypeid);
+ return DeviceManagerDAL.DeleteDeviceType(devicetypecode);
}
#endregion
+ #region[璁惧绫诲瀷涓嬫媺妗嗘帴鍙
+ public static ToMessage DeviceTypeSelect()
+ {
+ return DeviceManagerDAL.DeviceTypeSelect();
+ }
+ #endregion
+
+ #region[璁惧缁勬煡璇
+ public static ToMessage DeviceGroupSearch(int startNum, int endNum, string prop, string order)
+ {
+ return DeviceManagerDAL.DeviceGroupSearch(startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[璁惧缁勬柊澧瀅
+ public static ToMessage AddUpdateDeviceGroup(List<ObjectDataCont> json, string username)
+ {
+ return DeviceManagerDAL.AddUpdateDeviceGroup(json, username);
+ }
+ #endregion
+
+ #region[璁惧缁勫垹闄
+ public static ToMessage DeleteDeviceGroup(string devicegroupcode)
+ {
+ return DeviceManagerDAL.DeleteDeviceGroup(devicegroupcode);
+ }
+ #endregion
+
+
+ #region[璁惧绫诲瀷鏌ユ壘璁惧缁刔
+ public static ToMessage DeviceTypeSelectGroup(string eqptypecode)
+ {
+ return DeviceManagerDAL.DeviceTypeSelectGroup(eqptypecode);
+ }
+ #endregion
+
+ #region[鎵�灞炶溅闂翠笅鎷夋帴鍙
+ public static ToMessage WorkShopSelect()
+ {
+ return DeviceManagerDAL.WorkShopSelect();
+ }
+ #endregion
#region [璁惧娓呭崟鏌ヨ]
public static ToMessage DeviceMangerSearch(string deviceCode, string deviceName, string status, string workShop, string deviceType, string deviceGroup, int startNum, int endNum, string prop, string order)
@@ -40,16 +83,16 @@
#endregion
#region[璁惧娓呭崟鏂板缂栬緫]
- public static ToMessage AddUpdateDeviceManger(string deviceid, string devicecode, string devicename, string devicetype, string devicegroup, string importdate, string workshop, string status, string ratio, string usercode, string operType)
+ public static ToMessage AddUpdateDeviceManger(string deviceid, string devicecode, string devicename, string devicetype, string devicegroup, string importdate, string workshop,string linecode, string status, string ratio, string usercode, string operType)
{
- return DeviceManagerDAL.AddUpdateDeviceManger(deviceid, devicecode, devicename, devicetype, devicegroup, importdate, workshop, status, ratio, usercode, operType);
+ return DeviceManagerDAL.AddUpdateDeviceManger(deviceid, devicecode, devicename, devicetype, devicegroup, importdate, workshop, linecode, status, ratio, usercode, operType);
}
#endregion
#region[璁惧娓呭崟鍒犻櫎]
- public static ToMessage DeleteDeviceManger(string deviceid)
+ public static ToMessage DeleteDeviceManger(string devicecode)
{
- return DeviceManagerDAL.DeleteDeviceManger(deviceid);
+ return DeviceManagerDAL.DeleteDeviceManger(devicecode);
}
#endregion
}
diff --git a/VueWebApi/DLL/BLL/MaterialManagerBLL.cs b/VueWebApi/DLL/BLL/MaterialManagerBLL.cs
new file mode 100644
index 0000000..f35c75c
--- /dev/null
+++ b/VueWebApi/DLL/BLL/MaterialManagerBLL.cs
@@ -0,0 +1,63 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using VueWebApi.DLL.DAL;
+using VueWebApi.Tools;
+
+namespace VueWebApi.DLL.BLL
+{
+ public class MaterialManagerBLL
+ {
+ #region[浠撳簱鏌ヨ]
+ public static ToMessage WareHouseDefSearch(string warehousecode, string warehousename, string description, string createuser, int startNum, int endNum, string prop, string order)
+ {
+ return MaterialManagerDAL.WareHouseDefSearch(warehousecode, warehousename, description, createuser, startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[浠撳簱鏂板缂栬緫]
+ public static ToMessage AddUpdateWareHouseDef(string warehouseid, string warehousecode, string warehousename, string description, string username, string operType)
+ {
+ return MaterialManagerDAL.AddUpdateWareHouseDef(warehouseid, warehousecode, warehousename, description, username, operType);
+ }
+ #endregion
+
+ #region[浠撳簱鍒犻櫎]
+ public static ToMessage DeleteWareHouseDef(string warehousecode)
+ {
+ return MaterialManagerDAL.DeleteWareHouseDef(warehousecode);
+ }
+ #endregion
+
+
+
+ #region[鎵�灞炰粨搴撴帴鍙
+ public static ToMessage WareHouseSelect()
+ {
+ return MaterialManagerDAL.WareHouseSelect();
+ }
+ #endregion
+
+ #region[浠撳簱瀹氫箟鏌ヨ]
+ public static ToMessage StorageDefSearch(string storagecode, string storagename, string description, string createuser, string stockcode, int startNum, int endNum, string prop, string order)
+ {
+ return MaterialManagerDAL.StorageDefSearch(storagecode, storagename, description, createuser, stockcode, startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[浠撳簱瀹氫箟鏂板銆佷慨鏀筣
+ public static ToMessage AddUpdateStorageDef(string storageid, string storagecode, string storagename, string description, string stockcode, string username, string operType)
+ {
+ return MaterialManagerDAL.AddUpdateStorageDef(storageid, storagecode, storagename, description, stockcode, username, operType);
+ }
+ #endregion
+
+ #region[浠撳簱鍒犻櫎]
+ public static ToMessage DeleteStorageDef(string storagecode)
+ {
+ return MaterialManagerDAL.DeleteStorageDef(storagecode);
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/VueWebApi/DLL/BLL/ProductModelBLL.cs b/VueWebApi/DLL/BLL/ProductModelBLL.cs
new file mode 100644
index 0000000..b6b3763
--- /dev/null
+++ b/VueWebApi/DLL/BLL/ProductModelBLL.cs
@@ -0,0 +1,100 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using VueWebApi.DLL.DAL;
+using VueWebApi.Models;
+using VueWebApi.Tools;
+
+namespace VueWebApi.DLL.BLL
+{
+ public class ProductModelBLL
+ {
+ #region [瀛樿揣绫诲瀷]
+ public static ToMessage StockTypeSelect()
+ {
+ return ProductModelDAL.StockTypeSelect();
+ }
+ #endregion
+
+ #region[鐗╂枡绫诲瀷鏌ヨ]
+ public static ToMessage MaterialTypeSearch(string materialtypecode, string materialtypename, string stocktypecode, int startNum, int endNum, string prop, string order)
+ {
+ return ProductModelDAL.MaterialTypeSearch(materialtypecode, materialtypename, stocktypecode, startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[鐗╂枡绫诲瀷鏂板缂栬緫]
+ public static ToMessage AddUpdateMaterialType(string materialtypeid, string materialtypecode, string materialtypename, string stocktypecode, string username, string operType)
+ {
+ return ProductModelDAL.AddUpdateMaterialType(materialtypeid,materialtypecode, materialtypename, stocktypecode, username, operType);
+ }
+ #endregion
+
+ #region[鐗╂枡绫诲瀷鍒犻櫎]
+ public static ToMessage DeleteMaterialType(string materialtypecode)
+ {
+ return ProductModelDAL.DeleteMaterialType(materialtypecode);
+ }
+ #endregion
+
+
+
+
+ #region[鍗曚綅鍒楄〃鏌ヨ]
+ public static ToMessage UomSearch(int startNum, int endNum, string prop, string order)
+ {
+ return ProductModelDAL.UomSearch(startNum,endNum,prop,order);
+ }
+ #endregion
+
+ #region[鍗曚綅鏂板]
+ public static ToMessage UomAdd(string username, List<Uom> json)
+ {
+ return ProductModelDAL.UomAdd(username,json);
+ }
+ #endregion
+
+ #region[鍗曚綅鍒犻櫎]
+ public static ToMessage UomDelete(string uomcode)
+ {
+ return ProductModelDAL.UomDelete(uomcode);
+ }
+ #endregion
+
+ #region[瀛樼被鍨嬫煡鎵剧墿鏂欑被鍨媇
+ public static ToMessage StockTypeSelectMaterialType(string stocktypecode)
+ {
+ return ProductModelDAL.StockTypeSelectMaterialType(stocktypecode);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鏌ヨ]
+ public static ToMessage InventoryFileSelect(string partcode, string partname, string partspec, string stocktypecode, string materialtypecode, string storehousecode, int startNum, int endNum, string prop, string order)
+ {
+ return ProductModelDAL.InventoryFileSelect(partcode, partname, partspec, stocktypecode, materialtypecode, storehousecode, startNum, endNum, prop, order);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鏂板缂栬緫]
+ public static ToMessage AddUpdateInventoryFile(string materialid, string materialcode, string materialname, string materialspec, string uomcode, string warehousecode, string stocktypecode, string materialtypecode, string minstockqty, string maxstockqty, string username, string operType)
+ {
+ return ProductModelDAL.AddUpdateInventoryFile(materialid, materialcode, materialname, materialspec, uomcode, warehousecode, stocktypecode, materialtypecode, minstockqty, maxstockqty, username, operType);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鍒犻櫎]
+ public static ToMessage DeleteInventoryFile(string materialcode)
+ {
+ return ProductModelDAL.DeleteInventoryFile(materialcode);
+ }
+ #endregion
+
+ #region[瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鏌ヨ]
+ public static ToMessage InventoryFileAssociationRoute(string partcode)
+ {
+ return ProductModelDAL.InventoryFileAssociationRoute(partcode);
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/VueWebApi/DLL/DAL/BasicSettingDAL.cs b/VueWebApi/DLL/DAL/BasicSettingDAL.cs
index a66ec5a..4a2f631 100644
--- a/VueWebApi/DLL/DAL/BasicSettingDAL.cs
+++ b/VueWebApi/DLL/DAL/BasicSettingDAL.cs
@@ -807,6 +807,30 @@
}
#endregion
+ #region[瑙掕壊绫诲瀷涓嬫媺鎺ュ彛]
+ public static ToMessage RoleTypeSelect()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select roletype_code,roletype_name from TRoleType 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 RoleSearch(string RoleCode, string RoleName, string RoleTypeCode, string CreateUser, int startNum, int endNum, string prop, string order)
{
@@ -1041,39 +1065,6 @@
#region[鐢ㄦ埛娓呭崟鍏宠仈瑙掕壊鏌ヨ1]
public static ToMessage RoleAssociationUserTwo(string rolecode)
{
- var dynamicParams = new DynamicParameters();
- string sql = "";
- try
- {
- List<TreeDG> list = new List<TreeDG>();
- sql = @"select id,parent_id,org_code,org_name,description
- FROM TOrganization ";
- var dt = DapperHelper.selectdata(sql, dynamicParams);
- for (int i = 0; i < dt.Rows.Count; i++) //杩欓噷鏄惊鐜墍鏈�
- {
- if (string.IsNullOrEmpty(dt.Rows[i]["PARENT_ID"].ToString()) || dt.Rows[i]["PARENT_ID"].ToString() == "0") //鍒ゆ柇鏄惁鏈�澶栧眰鏍硅妭鐐�
- {
- TreeDG tbj = new TreeDG();
- tbj.id = dt.Rows[i]["ID"].ToString();
- tbj.code = dt.Rows[i]["ORG_CODE"].ToString();
- tbj.name = dt.Rows[i]["ORG_NAME"].ToString();
- list.Add(tbj);
- }
- }
- digui(dt, list);
- mes.code = "200";
- mes.Message = "鍔犺浇瀹屾垚";
- mes.data = list;
- }
- catch (Exception e)
- {
- mes.code = "300";
- mes.count = 0;
- mes.data = e.Message;
- mes.data = null;
- }
- return mes;
-
string sql = "";
var dynamicParams = new DynamicParameters();
List<TreeObejct> list = new List<TreeObejct>();
@@ -1160,8 +1151,6 @@
#region[瑙掕壊娓呭崟鍏宠仈鍔熻兘鏌ヨ]
public static ToMessage RoleAssociationRight(string rolecode,string type)
{
-
- Dictionary<object, object> dList = new Dictionary<object, object>();
List<object> list=new List<object>();
try
{
@@ -1178,6 +1167,7 @@
list.Add(SeachEncode.RightLocation(rolecode, type));
}
mes.code = "200";
+ mes.count = list.Count;
mes.Message = "鏌ヨ鎴愬姛!";
mes.data = list;
}
@@ -1282,8 +1272,21 @@
}
if (unitAttr != "" && unitAttr != null)
{
- search += "and unitattribute=@unitAttr ";
- dynamicParams.Add("@unitAttr", unitAttr);
+ switch (unitAttr)
+ {
+ case "WG": //澶栬喘
+ search += "and mtype=@unitAttr ";
+ dynamicParams.Add("@unitAttr", unitAttr);
+ break;
+ case "WX": //澶栧崗
+ search += "and btype=@unitAttr ";
+ dynamicParams.Add("@unitAttr", unitAttr);
+ break;
+ default: //瀹㈡埛
+ search += "and htype=@unitAttr ";
+ dynamicParams.Add("@unitAttr", unitAttr);
+ break;
+ }
}
if (createUser != "" && createUser != null)
{
@@ -1296,7 +1299,7 @@
}
// --------------鏌ヨ鎸囧畾鏁版嵁--------------
var total = 0; //鎬绘潯鏁�
- var sql = @"select id,code,name,unitattribute,conttacts,addr,lm_user,lm_date from TCustomer
+ var sql = @"select id,code,name,mtype,btype,htype,conttacts,conttphone,addr,lm_user,lm_date from TCustomer
where is_delete<>'1' " + search;
var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
mes.code = "200";
@@ -1316,18 +1319,20 @@
#endregion
#region[寰�鏉ュ崟浣嶆柊澧炵紪杈慮
- public static ToMessage AddUpdateCurrentUnit(string unitid, string unitcode, string unitname, string unitattr, string person, string contact, string description, string usercode,string OperType)
+ public static ToMessage AddUpdateCurrentUnit(string unitid, string unitcode, string unitname, string mtypecode, string btypecode, string htypecode, string person, string contact, string description, string usercode,string OperType)
{
var dynamicParams = new DynamicParameters();
try
{
if (OperType == "Add")
{
- var sql = @"insert into TCustomer(code,name,unitattribute,conttacts,conttphone,addr,lm_user,lm_date)
- values(@unitcode,@unitname,@unitattr,@person,@contact,@description,@usercode,@CreateDate)";
+ var sql = @"insert into TCustomer(code,name,mtype,btype,htype,conttacts,conttphone,addr,lm_user,lm_date)
+ values(@unitcode,@unitname,@mtypecode,@btypecode,@htypecode,@person,@contact,@description,@usercode,@CreateDate)";
dynamicParams.Add("@unitcode", unitcode);
dynamicParams.Add("@unitname", unitname);
- dynamicParams.Add("@unitattr", unitattr);
+ dynamicParams.Add("@mtypecode", mtypecode);
+ dynamicParams.Add("@btypecode", btypecode);
+ dynamicParams.Add("@htypecode", htypecode);
dynamicParams.Add("@person", person);
dynamicParams.Add("@contact", contact);
dynamicParams.Add("@description", description);
@@ -1351,10 +1356,12 @@
}
if (OperType == "Update")
{
- var sql = @"update TCustomer set name=@unitname,unitattribute=@unitattr,conttacts=@person,conttphone=@contact,addr=@description,lm_user=@usercode,lm_date=@CreateDate where id=@RoleId";
+ var sql = @"update TCustomer set name=@unitname,mtype=@mtypecode,btype=@btypecode,htype=@htypecode,conttacts=@person,conttphone=@contact,addr=@description,lm_user=@usercode,lm_date=@CreateDate where id=@unitid";
dynamicParams.Add("@unitid", unitid);
dynamicParams.Add("@unitname", unitname);
- dynamicParams.Add("@unitattr", unitattr);
+ dynamicParams.Add("@mtypecode", mtypecode);
+ dynamicParams.Add("@btypecode", btypecode);
+ dynamicParams.Add("@htypecode", htypecode);
dynamicParams.Add("@person", person);
dynamicParams.Add("@contact", contact);
dynamicParams.Add("@description", description);
diff --git a/VueWebApi/DLL/DAL/DeviceManagerDAL.cs b/VueWebApi/DLL/DAL/DeviceManagerDAL.cs
index 2dce225..1745424 100644
--- a/VueWebApi/DLL/DAL/DeviceManagerDAL.cs
+++ b/VueWebApi/DLL/DAL/DeviceManagerDAL.cs
@@ -1,54 +1,619 @@
-锘縰sing System;
+锘縰sing Dapper;
+using System;
using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
using System.Linq;
using System.Web;
+using VueWebApi.Models;
using VueWebApi.Tools;
namespace VueWebApi.DLL.DAL
{
public class DeviceManagerDAL
{
+ public static DataTable dt; //瀹氫箟鍏ㄥ眬鍙橀噺dt
+ public static bool res; //瀹氫箟鍏ㄥ眬鍙橀噺dt
+ public static ToMessage mes = new ToMessage(); //瀹氫箟鍏ㄥ眬杩斿洖淇℃伅瀵硅薄
+ public static string strProcName = ""; //瀹氫箟鍏ㄥ眬sql鍙橀噺
+ public static List<SqlParameter> listStr = new List<SqlParameter>(); //瀹氫箟鍏ㄥ眬鍙傛暟闆嗗悎
+ public static SqlParameter[] parameters; //瀹氫箟鍏ㄥ眬SqlParameter鍙傛暟鏁扮粍
+
#region[璁惧绫诲瀷鏌ヨ]
public static ToMessage DeviceTypeSearch(int startNum, int endNum, string prop, string order)
{
- throw new NotImplementedException();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select id, code,name,remark
+ from TEqpType
+ where is_delete<>'1' ";
+ 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 AddUpdateDeviceType(string devicetypecode, string devicetypename, string devicetypedescipt, string usercode)
+ public static ToMessage AddUpdateDeviceType(List<ObjectDataCont> json, string username)
{
- throw new NotImplementedException();
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //寰幆鍐欏叆璁惧绫诲瀷琛�
+ for (int i = 0; i < json.Count; i++)
+ {
+ sql = @"insert into TRoleType(code,name,lm_user,lm_date,remark) values(@code,@name,@username,@createdate,@description)";
+ list.Add(new
+ {
+ str = sql,
+ parm = new
+ {
+ code = json[i].code,
+ name = json[i].name,
+ username = username,
+ createdate = DateTime.Now.ToString(),
+ description = json[i].description
+ }
+ });
+ }
+ 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 DeleteDeviceType(string devicetypeid)
+ public static ToMessage DeleteDeviceType(string devicetypecode)
{
- throw new NotImplementedException();
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //鍒ゆ柇璁惧绫诲瀷涓嬫槸鍚﹀叧鑱旇澶囩粍
+ sql = @"select * from TEqpGroup where eqptype_code=@devicetypecode and is_delete<>'1'";
+ dynamicParams.Add("@devicetypecode", devicetypecode);
+ var data = DapperHelper.select<TreeObejct>(sql, dynamicParams);
+ if (data.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠璁惧绫诲瀷宸叉湁鍏宠仈璁惧缁�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ }
+ else
+ {
+ //鍒ゆ柇璁惧鏈夋棤鍏宠仈璁惧绫诲瀷
+ sql = @"select * from TEqpInfo where eqptype_code=@devicetypecode and is_delete<>'1'";
+ dynamicParams.Add("@devicetypecode", devicetypecode);
+ var data0 = DapperHelper.select<TreeObejct>(sql, dynamicParams);
+ if (data0.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠璁惧绫诲瀷宸叉湁鍏宠仈璁惧缁�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ }
+ else
+ {
+ sql = @"delete TEqpType where code=@devicetypecode";
+ list.Add(new { str = sql, parm = new { devicetypecode = devicetypecode } });
+ 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 DeviceTypeSelect()
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ List<TreeObejct> list = new List<TreeObejct>();
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select code,name from TEqpType 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 DeviceGroupSearch(int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.code,A.name,A.eqptype_code,B.name as eqptype_name,A.remark
+ from TEqpGroup A
+ inner join TEqpType B on A.eqptype_code=B.code
+ where A.is_delete<>'1' ";
+ 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 AddUpdateDeviceGroup(List<ObjectDataCont> json, string username)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //寰幆鍐欏叆璁惧绫诲瀷琛�
+ for (int i = 0; i < json.Count; i++)
+ {
+ sql = @"insert into TEqpGroup(code,name,lm_user,lm_date,remark,eqptype_code) values(@code,@name,@username,@createdate,@description,@eqptype_code)";
+ list.Add(new
+ {
+ str = sql,
+ parm = new
+ {
+ code = json[i].code,
+ name = json[i].name,
+ username = username,
+ createdate = DateTime.Now.ToString(),
+ description = json[i].description,
+ eqptype_code = json[i].group
+ }
+ });
+ }
+ 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 DeleteDeviceGroup(string devicegroupcode)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //鍒ゆ柇璁惧缁勪笅鏄惁鍏宠仈璁惧
+ sql = @"select * from TEqpInfo where eqpgroup_code=@devicegroupcode and is_delete<>'1'";
+ dynamicParams.Add("@devicegroupcode", devicegroupcode);
+ var data = DapperHelper.select<TreeObejct>(sql, dynamicParams);
+ if (data.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠璁惧缁勫凡鏈夊叧鑱旇澶囩粍,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ }
+ else
+ {
+ //鍒犻櫎璁惧缁�
+ sql = @"delete TEqpGroup where code=@devicegroupcode";
+ list.Add(new { str = sql, parm = new { devicegroupcode = devicegroupcode } });
+ 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 DeviceTypeSelectGroup(string eqptypecode)
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ List<TreeObejct> list = new List<TreeObejct>();
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select code,name from TEqpGroup where eqptype_code=@eqptypecode and is_delete<>'1'";
+ dynamicParams.Add("@eqptypecode", eqptypecode);
+ 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 WorkShopSelect()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select org_code as code,org_name as name from TOrganization where description='W' and 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 DeviceMangerSearch(string deviceCode, string deviceName, string status, string workShop, string deviceType, string deviceGroup, int startNum, int endNum, string prop, string order)
{
- throw new NotImplementedException();
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (deviceCode != "" && deviceCode != null)
+ {
+ search += "and A.code like '%'+@deviceCode+'%' ";
+ dynamicParams.Add("@deviceCode", deviceCode);
+ }
+ if (deviceName != "" && deviceName != null)
+ {
+ search += "and A.name like '%'+@deviceName+'%' ";
+ dynamicParams.Add("@deviceName", deviceName);
+ }
+ if (status != "" && status != null)
+ {
+ search += "and A.status=@status ";
+ dynamicParams.Add("@status", status);
+ }
+ if (workShop != "" && workShop != null)
+ {
+ search += "and A.wksp_code=@workShop ";
+ dynamicParams.Add("@workShop", workShop);
+ }
+ if (deviceType != "" && deviceType != null)
+ {
+ search += "and A.eqptype_code=@deviceType ";
+ dynamicParams.Add("@deviceType", deviceType);
+ }
+ if (deviceGroup != "" && deviceGroup != null)
+ {
+ search += "and A.eqpgroup_code=@deviceGroup ";
+ dynamicParams.Add("@deviceGroup", deviceGroup);
+ }
+ if (search == "")
+ {
+ search = "and 1=1 ";
+ }
+ //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,
+ 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
+ left join TEqpGroup G on A.eqpgroup_code=G.code
+ left join TOrganization T on A.wksp_code=T.org_code
+ left join TOrganization L on A.Line_code=L.org_code
+ where A.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[璁惧娓呭崟鏂板缂栬緫]
- public static ToMessage AddUpdateDeviceManger(string deviceid, string devicecode, string devicename, string devicetype, string devicegroup, string importdate, string workshop, string status, string ratio, string usercode, string operType)
+ public static ToMessage AddUpdateDeviceManger(string deviceid, string devicecode, string devicename, string devicetype, string devicegroup, string importdate, string workshop, string linecode, string status, string ratio, string usercode, string operType)
{
- throw new NotImplementedException();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ if (operType == "Add")
+ {
+ var sql = @"insert into TEqpInfo(code,name,eqptype_code,eqpgroup_code,wksp_code,line_code,input_date,operation_ration,enable,opc_uom,lm_user,lm_date)
+ values(@devicecode,@devicename,@devicetype,@devicegroup,@workshop,@linecode,@importdate,@ratio,@status,@uom,@usercode,@CreateDate)";
+ dynamicParams.Add("@devicecode", devicecode);
+ dynamicParams.Add("@devicename", devicename);
+ dynamicParams.Add("@devicetype", devicetype);
+ dynamicParams.Add("@devicegroup", devicegroup);
+ dynamicParams.Add("@workshop", workshop);
+ dynamicParams.Add("@linecode", linecode);
+ dynamicParams.Add("@importdate", importdate);
+ dynamicParams.Add("@ratio", ratio);
+ dynamicParams.Add("@status", status);
+ dynamicParams.Add("@uom", "鍙�");
+ dynamicParams.Add("@usercode", usercode);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔鎴愬姛!";
+ mes.data = null;
+ }
+ else
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔澶辫触!";
+ mes.data = null;
+ }
+ }
+ 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,
+ where id=@deviceid";
+ dynamicParams.Add("@deviceid", deviceid);
+ dynamicParams.Add("@devicename", devicename);
+ dynamicParams.Add("@devicetype", devicetype);
+ dynamicParams.Add("@devicegroup", devicegroup);
+ dynamicParams.Add("@workshop", workshop);
+ dynamicParams.Add("@linecode", linecode);
+ dynamicParams.Add("@importdate", importdate);
+ dynamicParams.Add("@ratio", ratio);
+ dynamicParams.Add("@status", status);
+ dynamicParams.Add("@usercode", usercode);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ 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 DeleteDeviceManger(string deviceid)
+ public static ToMessage DeleteDeviceManger(string devicecode)
{
- throw new NotImplementedException();
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //鍒ゆ柇璁惧鏄惁鏈夊叧鑱斿伐鑹鸿矾绾跨殑鐢熶骇璁㈠崟(鏈叧闂�),涓嶅厑璁稿垹闄�
+ sql = @"select A.code,M.wo_code,R.name from TEqpInfo A
+ inner join TFlw_Rteqp B on A.code=B.eqp_code
+ inner join TStep C on B.step_code=C.stepcode
+ inner join TFlw_Rtdt D on C.stepcode=D.step_code
+ inner join TFlw_Rout R on D.rout_code=R.code
+ inner join TK_Wrk_Man M on R.code=M.route_code
+ where A.code=@devicecode";
+ dynamicParams.Add("@devicecode", devicecode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ if (data.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠璁惧琚伐鍗曞紩鐢�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ //鍒ゆ柇璁惧鏄惁鏈夊叧鑱斿伐鑹鸿矾绾垮伐搴�,涓嶅厑璁稿垹闄�
+ sql = @"select * from TFlw_Rteqp
+ where eqp_code=@devicecode";
+ dynamicParams.Add("@devicecode", devicecode);
+ var data0 = DapperHelper.selectdata(sql, dynamicParams);
+ if (data.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠璁惧宸插叧鑱斿伐搴�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ //鍒ゆ柇璁惧鏄惁鎸囧畾鑺傛媿宸ヤ环,涓嶅厑璁稿垹闄�
+ sql = @"select * from TPrteEqp_Stad
+ where eqp_code=@devicecode";
+ dynamicParams.Add("@devicecode", devicecode);
+ var data1 = DapperHelper.selectdata(sql, dynamicParams);
+ if (data.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠璁惧宸叉寚瀹氳妭鎷嶅伐浠�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ //鍒犻櫎璁惧
+ sql = @"update TEqpInfo set is_delete='1' where code=@devicecode";
+ list.Add(new { str = sql, parm = new { devicecode = devicecode } });
+ 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
}
diff --git a/VueWebApi/DLL/DAL/MaterialManagerDAL.cs b/VueWebApi/DLL/DAL/MaterialManagerDAL.cs
new file mode 100644
index 0000000..4f11bcc
--- /dev/null
+++ b/VueWebApi/DLL/DAL/MaterialManagerDAL.cs
@@ -0,0 +1,394 @@
+锘縰sing Dapper;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Web;
+using VueWebApi.Tools;
+
+namespace VueWebApi.DLL.DAL
+{
+ public class MaterialManagerDAL
+ {
+ public static DataTable dt; //瀹氫箟鍏ㄥ眬鍙橀噺dt
+ public static bool res; //瀹氫箟鍏ㄥ眬鍙橀噺dt
+ public static ToMessage mes = new ToMessage(); //瀹氫箟鍏ㄥ眬杩斿洖淇℃伅瀵硅薄
+ public static string strProcName = ""; //瀹氫箟鍏ㄥ眬sql鍙橀噺
+ public static List<SqlParameter> listStr = new List<SqlParameter>(); //瀹氫箟鍏ㄥ眬鍙傛暟闆嗗悎
+ public static SqlParameter[] parameters; //瀹氫箟鍏ㄥ眬SqlParameter鍙傛暟鏁扮粍
+
+
+ #region[浠撳簱鏌ヨ]
+ public static ToMessage WareHouseDefSearch(string warehousecode, string warehousename, string description, string createuser, int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (warehousecode != "" && warehousecode != null)
+ {
+ search += "and code like '%'+@warehousecode+'%' ";
+ dynamicParams.Add("@warehousecode", warehousecode);
+ }
+ if (warehousename != "" && warehousename != null)
+ {
+ search += "and name like '%'+@warehousename+'%' ";
+ dynamicParams.Add("@warehousename", warehousename);
+ }
+ if (description != "" && description != null)
+ {
+ search += "and description like '%'+@description+'%' ";
+ dynamicParams.Add("@description", description);
+ }
+ if (createuser != "" && createuser != null)
+ {
+ search += "and lm_user like '%'+@createuser+'%' ";
+ dynamicParams.Add("@createuser", createuser);
+ }
+ if (search == "")
+ {
+ search = "and 1=1 ";
+ }
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select id,code,name,description,lm_user,lm_date from T_Sec_Stck
+ 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[浠撳簱鏂板缂栬緫]
+ public static ToMessage AddUpdateWareHouseDef(string warehouseid, string warehousecode, string warehousename, string description, string username, string operType)
+ {
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ if (operType == "Add")
+ {
+ var sql = @"insert into T_Sec_Stck(code,name,description,lm_user,lm_date)
+ values(@warehousecode,@warehousename,@description,@username,@CreateDate)";
+ dynamicParams.Add("@warehousecode", warehousecode);
+ dynamicParams.Add("@warehousename", warehousename);
+ dynamicParams.Add("@description", description);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔鎴愬姛!";
+ mes.data = null;
+ }
+ else
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔澶辫触!";
+ mes.data = null;
+ }
+ }
+ if (operType == "Update")
+ {
+ var sql = @"update T_Sec_Stck set name=@warehousename,description=@description,lm_user=@username,lm_date=@CreateDate where id=@warehouseid";
+ dynamicParams.Add("@warehouseid", warehouseid);
+ dynamicParams.Add("@warehousename", warehousename);
+ dynamicParams.Add("@description", description);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ 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 DeleteWareHouseDef(string warehousecode)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //鍒ゆ柇浠撳簱涓嬫槸鍚︽湁鍏宠仈搴撲綅
+ sql = @"select B.code,B.name from T_Sec_Stck A
+ inner join T_Sec_Loca B on A.code=B.stock_code and B.is_delete<>'1'
+ where A.code=@warehousecode and A.is_delete<>'1'";
+ dynamicParams.Add("@warehousecode", warehousecode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ if (data.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "褰撳墠浠撳簱涓嬫湁鍏宠仈搴撲綅,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ }
+ else
+ {
+ //鍒犻櫎浠撳簱
+ sql = @"delete T_Sec_Stck where code=@warehousecode";
+ list.Add(new { str = sql, parm = new { warehousecode = warehousecode } });
+ 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 WareHouseSelect()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select code,name from T_Sec_Stck 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 StorageDefSearch(string storagecode, string storagename, string description, string createuser, string stockcode, int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (storagecode != "" && storagecode != null)
+ {
+ search += "and A.code like '%'+@storagecode+'%' ";
+ dynamicParams.Add("@storagecode", storagecode);
+ }
+ if (storagename != "" && storagename != null)
+ {
+ search += "and A.name like '%'+@storagename+'%' ";
+ dynamicParams.Add("@storagename", storagename);
+ }
+ if (description != "" && description != null)
+ {
+ search += "and A.description like '%'+@description+'%' ";
+ dynamicParams.Add("@description", description);
+ }
+ if (createuser != "" && createuser != null)
+ {
+ search += "and A.lm_user like '%'+@createuser+'%' ";
+ dynamicParams.Add("@createuser", createuser);
+ }
+ if (stockcode != "" && stockcode != null)
+ {
+ search += "and A.stock_code=@stockcode ";
+ dynamicParams.Add("@stockcode", stockcode);
+ }
+ if (search == "")
+ {
+ search = "and 1=1 ";
+ }
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.code,A.name,A.description,A.stock_code,B.name as stock_name,A.lm_user,A.lm_date
+ from T_Sec_Loca A
+ left join T_Sec_Stck B on A.stock_code=B.code
+ where A.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[搴撲綅瀹氫箟鏂板缂栬緫]
+ public static ToMessage AddUpdateStorageDef(string storageid, string storagecode, string storagename, string description, string stockcode, string username, string operType)
+ {
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ if (operType == "Add")
+ {
+ var sql = @"insert into T_Sec_Loca(code,name,description,stock_code,lm_user,lm_date)
+ values(@storagecode,@storagename,@description,@username,@CreateDate)";
+ dynamicParams.Add("@storagecode", storagecode);
+ dynamicParams.Add("@storagename", storagename);
+ dynamicParams.Add("@description", description);
+ dynamicParams.Add("@stockcode", stockcode);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔鎴愬姛!";
+ mes.data = null;
+ }
+ else
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔澶辫触!";
+ mes.data = null;
+ }
+ }
+ if (operType == "Update")
+ {
+ var sql = @"update T_Sec_Loca set name=@storagename,description=@description,stock_code=@stockcode,lm_user=@username,lm_date=@CreateDate where id=@storageid";
+ dynamicParams.Add("@storageid", storageid);
+ dynamicParams.Add("@storagename", storagename);
+ dynamicParams.Add("@description", description);
+ dynamicParams.Add("@stockcode", stockcode);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ 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 DeleteStorageDef(string storagecode)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //鍒犻櫎浠撲綅
+ sql = @"delete T_Sec_Loca where code=@storagecode";
+ list.Add(new { str = sql, parm = new { storagecode = storagecode } });
+ 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
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/VueWebApi/DLL/DAL/ProductModelDAL.cs b/VueWebApi/DLL/DAL/ProductModelDAL.cs
new file mode 100644
index 0000000..336984c
--- /dev/null
+++ b/VueWebApi/DLL/DAL/ProductModelDAL.cs
@@ -0,0 +1,668 @@
+锘縰sing Dapper;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Web;
+using VueWebApi.Models;
+using VueWebApi.Tools;
+
+namespace VueWebApi.DLL.DAL
+{
+ public class ProductModelDAL
+ {
+ public static DataTable dt; //瀹氫箟鍏ㄥ眬鍙橀噺dt
+ public static bool res; //瀹氫箟鍏ㄥ眬鍙橀噺dt
+ public static ToMessage mes = new ToMessage(); //瀹氫箟鍏ㄥ眬杩斿洖淇℃伅瀵硅薄
+ public static string strProcName = ""; //瀹氫箟鍏ㄥ眬sql鍙橀噺
+ public static List<SqlParameter> listStr = new List<SqlParameter>(); //瀹氫箟鍏ㄥ眬鍙傛暟闆嗗悎
+ public static SqlParameter[] parameters; //瀹氫箟鍏ㄥ眬SqlParameter鍙傛暟鏁扮粍
+
+
+ #region [瀛樿揣绫诲瀷]
+ public static ToMessage StockTypeSelect()
+ {
+ string sql = "";
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select code,name from T_Dict where dict_group='CHLX' ";
+ 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 MaterialTypeSearch(string materialtypecode, string materialtypename, string stocktypecode, int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (materialtypecode != "" && materialtypecode != null)
+ {
+ search += "and A.code like '%'+@materialtypecode+'%' ";
+ dynamicParams.Add("@materialtypecode", materialtypecode);
+ }
+ if (materialtypename != "" && materialtypename != null)
+ {
+ search += "and A.name like '%'+@warehousename+'%' ";
+ dynamicParams.Add("@materialtypename", materialtypename);
+ }
+ if (stocktypecode != "" && stocktypecode != null)
+ {
+ search += "and A.dict_code=@stocktypecode ";
+ dynamicParams.Add("@stocktypecode", stocktypecode);
+ }
+ if (search == "")
+ {
+ search = "and 1=1 ";
+ }
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.id,A.code,A.name,A.dict_code as stockcode,B.name as stockname,A.lm_user,A.lm_date
+ from TMateriel_Type A
+ left join T_Dict B on A.dict_code=B.code and B.dict_group='CHLX'
+ where A.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 [鐗╂枡绫诲瀷鏂板缂栬緫]
+ public static ToMessage AddUpdateMaterialType(string materialtypeid, string materialtypecode, string materialtypename, string stocktypecode, string username, string operType)
+ {
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ if (operType == "Add")
+ {
+ var sql = @"insert into TMateriel_Type(dict_code,code,name,lm_user,lm_date)
+ values(@stocktypecode,@materialtypecode,@materialtypename,@username,@CreateDate)";
+ dynamicParams.Add("@stocktypecode", stocktypecode);
+ dynamicParams.Add("@materialtypecode", materialtypecode);
+ dynamicParams.Add("@materialtypename", materialtypename);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔鎴愬姛!";
+ mes.data = null;
+ }
+ else
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔澶辫触!";
+ mes.data = null;
+ }
+ }
+ if (operType == "Update")
+ {
+ var sql = @"update TMateriel_Type set name=@materialtypename,dict_code=@stocktypecode,lm_user=@username,lm_date=@CreateDate where id=@materialtypeid";
+ dynamicParams.Add("@materialtypeid", materialtypeid);
+ dynamicParams.Add("@materialtypename", materialtypename);
+ dynamicParams.Add("@stocktypecode", stocktypecode);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ 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 DeleteMaterialType(string materialtypecode)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //鍒ゆ柇鐗╂枡绫诲瀷鏄惁鏈夊叧鑱旂墿鏂�
+ sql = @"select B.partcode,B.partname from TMateriel_Type A
+ inner join TMateriel_Info B on A.code=B.materieltype_code and B.is_delete<>'1'
+ where A.is_delete<>'1' and A.code=@materialtypecode";
+ dynamicParams.Add("@materialtypecode", materialtypecode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ if (data.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鐗╂枡绫诲瀷鏈夊叧鑱旂墿鏂�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ }
+ else
+ {
+ //鍒犻櫎浠撳簱
+ sql = @"delete TMateriel_Type where code=@materialtypecode";
+ list.Add(new { str = sql, parm = new { materialtypecode = materialtypecode } });
+ 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 UomSearch(int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select code,name,digdect,r_ule
+ from TUom
+ where is_delete<>'1' ";
+ 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 UomAdd(string username, List<Uom> json)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //寰幆鍐欏叆鍗曚綅琛�
+ for (int i = 0; i < json.Count; i++)
+ {
+ sql = @"insert into TUom(code,name,digdect,r_ule,lm_user,lm_date) values(@code,@name,@digdect,@r_ule,@username,@CreateDate)";
+ list.Add(new
+ {
+ str = sql,
+ parm = new
+ {
+ code = json[i].code,
+ name = json[i].name,
+ digdect=json[i].digdect,
+ r_ule=json[i].r_ule,
+ username= username,
+ CreateDate= DateTime.Now.ToString()
+ }
+ });
+ }
+ 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 UomDelete(string uomcode)
+ {
+ var sql = "";
+ var cont = 0;
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ sql = @"select * from TMateriel_Info where uom_code=@uomcode";
+ dynamicParams.Add(@"uomcode", uomcode);
+ cont = DapperHelper.selectcount(sql, dynamicParams);
+ if (cont <= 0)
+ {
+ mes.code = "300";
+ mes.Message = "鍗曚綅宸插叧鑱旂墿鏂�,涓嶈兘鍒犻櫎!";
+ }
+ else
+ {
+ sql = @"update TUom set is_delete='1' where code=@uomcode";
+ dynamicParams.Add(@"uomcode", uomcode);
+ cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ 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 StockTypeSelectMaterialType(string stocktypecode)
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ //鑾峰彇璁惧绫诲瀷鏁版嵁
+ sql = @"select code,name from TMateriel_Type where dict_code=@stocktypecode and is_delete<>'1'";
+ dynamicParams.Add("@stocktypecode", stocktypecode);
+ 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[瀛樿揣妗f鏌ヨ]
+ public static ToMessage InventoryFileSelect(string partcode, string partname, string partspec, string stocktypecode, string materialtypecode, string storehousecode, int startNum, int endNum, string prop, string order)
+ {
+ var dynamicParams = new DynamicParameters();
+ string search = "";
+ try
+ {
+ if (partcode != "" && partcode != null)
+ {
+ search += "and A.partcode like '%'+@partcode+'%' ";
+ dynamicParams.Add("@partcode", partcode);
+ }
+ if (partname != "" && partname != null)
+ {
+ search += "and A.partname like '%'+@partname+'%' ";
+ dynamicParams.Add("@partname", partname);
+ }
+ if (partspec != "" && partspec != null)
+ {
+ search += "and A.partspec like '%'+@partspec+'%' ";
+ dynamicParams.Add("@partspec", partspec);
+ }
+ if (stocktypecode != "" && stocktypecode != null)
+ {
+ search += "and D.code=@stocktypecode ";
+ dynamicParams.Add("@stocktypecode", stocktypecode);
+ }
+ if (materialtypecode != "" && materialtypecode != null)
+ {
+ search += "and C.code=@materialtypecode ";
+ dynamicParams.Add("@materialtypecode", materialtypecode);
+ }
+ if (storehousecode != "" && storehousecode != null)
+ {
+ search += "and A.stck_code=@storehousecode ";
+ dynamicParams.Add("@storehousecode", storehousecode);
+ }
+ if (search == "")
+ {
+ search = "and 1=1 ";
+ }
+ // --------------鏌ヨ鎸囧畾鏁版嵁--------------
+ var total = 0; //鎬绘潯鏁�
+ var sql = @"select A.partcode,A.partname,A.partspec,A.uom_code,B.name as uom_name,D.code as stocktypecode,D.name as stocktypename,
+ C.code as materialtypecode,C.name as materialtypename,A.stck_code,T.name as stck_name,A.maxqty,A.minqty,A.lm_user,
+ A.lm_date,A.proute_id
+ from TMateriel_Info A
+ left join TUom B on A.uom_code=B.code
+ left join TMateriel_Type C on A.materieltype_code=C.code
+ left join T_Dict D on C.dict_code=D.code and D.dict_type='CHLX'
+ left join T_Sec_Stck T on A.stck_code=T.code
+ where A.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[瀛樿揣妗f鏂板缂栬緫]
+ public static ToMessage AddUpdateInventoryFile(string materialid, string materialcode, string materialname, string materialspec, string uomcode, string warehousecode, string stocktypecode, string materialtypecode, string minstockqty, string maxstockqty, string username, string operType)
+ {
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ if (operType == "Add")
+ {
+ var sql = @"insert into TMateriel_Info(partcode,partname,partspec,uom_code,materialtypecode,stck_code,proute_id,maxqty,minqty,lm_user,lm_date)
+ values(@stocktypecode,@materialtypecode,@materialtypename,@username,@CreateDate)";
+ dynamicParams.Add("@materialcode", materialcode);
+ dynamicParams.Add("@materialname", materialname);
+ dynamicParams.Add("@materialspec", materialspec);
+ dynamicParams.Add("@uomcode", uomcode);
+ dynamicParams.Add("@warehousecode", warehousecode);
+ dynamicParams.Add("@materialtypecode", materialtypecode);
+ dynamicParams.Add("@minstockqty", minstockqty);
+ dynamicParams.Add("@maxstockqty", maxstockqty);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔鎴愬姛!";
+ mes.data = null;
+ }
+ else
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鏂板鎿嶄綔澶辫触!";
+ mes.data = null;
+ }
+ }
+ if (operType == "Update")
+ {
+ var sql = @"update TMateriel_Type set partname=@materialname,partspec=@materialspec,uom_code=@uomcode,materialtypecode=@materialtypecode,stck_code=@warehousecode,
+ maxqty=@maxstockqty,minqty=@minstockqty lm_user=@username,lm_date=@CreateDate where id=@materialid";
+ dynamicParams.Add("@materialid", materialid);
+ dynamicParams.Add("@materialname", materialname);
+ dynamicParams.Add("@materialspec", materialspec);
+ dynamicParams.Add("@uomcode", uomcode);
+ dynamicParams.Add("@warehousecode", warehousecode);
+ dynamicParams.Add("@materialtypecode", materialtypecode);
+ dynamicParams.Add("@minstockqty", minstockqty);
+ dynamicParams.Add("@maxstockqty", maxstockqty);
+ dynamicParams.Add("@username", username);
+ dynamicParams.Add("@CreateDate", DateTime.Now.ToString());
+ int cont = DapperHelper.SQL(sql, dynamicParams);
+ if (cont > 0)
+ {
+ 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[瀛樿揣妗f鍒犻櫎]
+ public static ToMessage DeleteInventoryFile(string materialcode)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+ try
+ {
+ list.Clear();
+ //褰撳墠鐗╂枡鏄惁鍏宠仈宸ヨ壓璺嚎
+ sql = @"select B.route_code,C.name as route_name from TMateriel_Info A
+ inner join TMateriel_Route B on A.partcode=B.materiel_code
+ inner join TFlw_Rout C on B.route_code=C.code
+ where A.partcode=@materialcode";
+ dynamicParams.Add("@materialcode", materialcode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ if (data.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鐗╂枡宸插叧鑱斿伐鑹鸿矾绾�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ //褰撳墠鐗╂枡鏄惁鍏宠仈鑺傛媿宸ヤ环
+ sql = @"select * from TPrteEqp_Stad
+ where materiel_code=@materialcode";
+ dynamicParams.Add("@materialcode", materialcode);
+ var data0 = DapperHelper.selectdata(sql, dynamicParams);
+ if (data0.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鐗╂枡宸插叧鑱旇妭鎷嶅伐浠�,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ //褰撳墠鐗╂枡鏄惁璁剧疆Bom娓呭崟
+ sql = @"select * from TBom_Main
+ where materiel_code=@materialcode";
+ dynamicParams.Add("@materialcode", materialcode);
+ var data1 = DapperHelper.selectdata(sql, dynamicParams);
+ if (data1.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鐗╂枡宸插叧鑱擝OM娓呭崟銆愪富鏂欍��,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ sql = @"select * from TBom_Deta
+ where smateriel_code=@materialcode";
+ dynamicParams.Add("@materialcode", materialcode);
+ var data2 = DapperHelper.selectdata(sql, dynamicParams);
+ if (data2.Rows.Count > 0)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鐗╂枡宸插叧鑱擝OM娓呭崟銆愬瓙鏂欍��,涓嶅厑璁稿垹闄�!";
+ mes.data = null;
+ return mes;
+ }
+ //褰撳墠鐗╂枡鏄惁鐢熸垚鍑哄叆搴撹褰�
+ //鏈夋病鏈夎宸ュ崟寮曠敤
+
+ //鍒犻櫎鐗╂枡
+ sql = @"update TMateriel_Info set is_delete='1' where partcode=@materialcode";
+ list.Add(new { str = sql, parm = new { materialcode = materialcode } });
+ 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[瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鏌ヨ]
+ public static ToMessage InventoryFileAssociationRoute(string partcode)
+ {
+ string sql = "";
+ var dynamicParams = new DynamicParameters();
+ List<MaterialRout> list = new List<MaterialRout>();
+ try
+ {
+ //鑾峰彇宸ヨ壓璺嚎闆嗗悎(鍖呭惈鐗╂枡缁戝畾宸ヨ壓璺嚎鏍囪瘑)
+ sql = @"select distinct A.code as routecode,A.name as routename,(case when B.route_code is null then 'N' else 'Y' end) flag from TFlw_Rout A
+ left join (
+ select distinct route_code from TMateriel_Route where materiel_code=@partcode and is_delete<>'1'
+ ) B
+ on A.code=B.route_code
+ where A.is_delete='0'";
+ dynamicParams.Add("@partcode", partcode);
+ var data = DapperHelper.selectdata(sql, dynamicParams);
+ for (int i = 0; i < data.Rows.Count; i++)
+ {
+ MaterialRout rout = new MaterialRout();
+ rout.code = data.Rows[i]["CODE"].ToString();
+ rout.name = data.Rows[i]["NAME"].ToString();
+ rout.flag = data.Rows[i]["FLAG"].ToString();
+
+ //鏍规嵁宸ヨ壓璺嚎缂栫爜鑾峰彇鍏宠仈鐨勫伐搴忎俊鎭�
+ sql = @"select A.seq,B.stepcode,B.stepname,B.enable from TFlw_Rtdt A
+ inner join TStep B on A.step_code=B.stepcode
+ where A.rout_code=@route_code and B.is_delete<>'1' order by A.seq asc";
+ dynamicParams.Add("@route_code", rout.code);
+ var data0 = DapperHelper.selectdata(sql, dynamicParams);
+ rout.Data = data0;
+ list.Add(rout);
+
+ }
+ 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
+
+ }
+}
\ No newline at end of file
diff --git a/VueWebApi/Global.asax.cs b/VueWebApi/Global.asax.cs
index d73a7fa..e3bedd6 100644
--- a/VueWebApi/Global.asax.cs
+++ b/VueWebApi/Global.asax.cs
@@ -23,6 +23,10 @@
this.PostAuthenticateRequest += (sender, e) => HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required);
base.Init();
}
+ void Session_Start(object sender, EventArgs e)
+ {
+ string sessionId = Session.SessionID;
+ }
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
diff --git a/VueWebApi/Logs/2022-06-21.TXT b/VueWebApi/Logs/2022-06-21.TXT
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/VueWebApi/Logs/2022-06-21.TXT
diff --git a/VueWebApi/Logs/2022-06-22.TXT b/VueWebApi/Logs/2022-06-22.TXT
new file mode 100644
index 0000000..74aa1af
--- /dev/null
+++ b/VueWebApi/Logs/2022-06-22.TXT
@@ -0,0 +1,50 @@
+ 【时间】:2022-06-22 09:12:26,134
+ 【级别】:ERROR
+ 【类名】:日志记录
+ 【线程ID】: 13
+ 【文件地址】: 第0行
+ 【日志内容】:
+消息类型:SqlException
+消息内容:必须声明标量变量 "@unitattr"。
+引发异常路径:/api/BasicSetting/AddUpdateCurrentUnit
+引发异常的方法:OnError
+引发异常源:.Net SqlClient Data Provider 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
+ 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
+ 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
+ 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
+ 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
+ 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
+ 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
+ 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
+ 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
+ 在 Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
+ 在 Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
+ 在 Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
+ 在 VueWebApi.Tools.DapperHelper.SQL(String sql, Object parametere)
+ 【日记详细】:
+---------------------------------------------------------------------------------------------------------------
+ 【时间】:2022-06-22 15:48:56,142
+ 【级别】:ERROR
+ 【类名】:日志记录
+ 【线程ID】: 21
+ 【文件地址】: 第0行
+ 【日志内容】:
+消息类型:SqlException
+消息内容:“,”附近有语法错误。
+引发异常路径:/api/BasicSetting/AddUpdateCurrentUnit
+引发异常的方法:OnError
+引发异常源:.Net SqlClient Data Provider 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
+ 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
+ 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
+ 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
+ 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
+ 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
+ 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
+ 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
+ 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
+ 在 Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
+ 在 Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
+ 在 Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
+ 在 VueWebApi.Tools.DapperHelper.SQL(String sql, Object parametere)
+ 【日记详细】:
+---------------------------------------------------------------------------------------------------------------
diff --git a/VueWebApi/Models/MaterialRout.cs b/VueWebApi/Models/MaterialRout.cs
new file mode 100644
index 0000000..e635154
--- /dev/null
+++ b/VueWebApi/Models/MaterialRout.cs
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+
+namespace VueWebApi.Models
+{
+ public class MaterialRout
+ {
+ public string code { get; set; }
+ public string name { get; set; }
+ public string flag { get; set; }
+ public DataTable Data { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/VueWebApi/Models/ObjectDataCont.cs b/VueWebApi/Models/ObjectDataCont.cs
new file mode 100644
index 0000000..c59efad
--- /dev/null
+++ b/VueWebApi/Models/ObjectDataCont.cs
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace VueWebApi.Models
+{
+ public class ObjectDataCont
+ {
+ public string code { get; set; }
+ public string name { get; set; }
+ public string group { get; set; }
+ public string description { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/VueWebApi/Models/Uom.cs b/VueWebApi/Models/Uom.cs
new file mode 100644
index 0000000..e749eef
--- /dev/null
+++ b/VueWebApi/Models/Uom.cs
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace VueWebApi.Models
+{
+ public class Uom
+ {
+ public string code { get; set; }
+ public string name { get; set; }
+ public string digdect { get; set; }
+ public string r_ule { 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 3145ad2..6450730 100644
--- a/VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/VueWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -372,13 +372,13 @@
<publishTime>11/28/2018 13:04:24</publishTime>
</File>
<File Include="bin/VueWebApi.dll">
- <publishTime>06/20/2022 21:38:42</publishTime>
+ <publishTime>06/22/2022 18:15:29</publishTime>
</File>
<File Include="bin/VueWebApi.dll.config">
<publishTime>06/15/2022 15:31:43</publishTime>
</File>
<File Include="bin/VueWebApi.pdb">
- <publishTime>06/20/2022 21:38:42</publishTime>
+ <publishTime>06/22/2022 18:15:29</publishTime>
</File>
<File Include="bin/VueWebApi.xml">
<publishTime>06/16/2022 14:26:01</publishTime>
@@ -519,7 +519,7 @@
<publishTime>06/10/2022 08:20:24</publishTime>
</File>
<File Include="Web.config">
- <publishTime>06/20/2022 18:40:27</publishTime>
+ <publishTime>06/21/2022 16:19:30</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/VueWebApi/Tools/DapperHelper.cs b/VueWebApi/Tools/DapperHelper.cs
index 55616c7..132be16 100644
--- a/VueWebApi/Tools/DapperHelper.cs
+++ b/VueWebApi/Tools/DapperHelper.cs
@@ -52,7 +52,12 @@
LogHelper.WriteLog(ex);
throw ex;
}
-
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
+
}
return list;
}
@@ -81,6 +86,11 @@
LogHelper.WriteLog(ex);
throw ex;
}
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
return result;
}
@@ -108,6 +118,11 @@
LogHelper.WriteLog(ex);
throw ex;
}
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
return t;
}
@@ -122,25 +137,24 @@
/// <param name="pageSize">褰撳墠椤垫樉绀烘潯鏁�</param>
/// <param name="total">缁撴灉闆嗘�绘暟</param>
/// <returns></returns>
- public static IEnumerable<T> GetPageList<T>(string sql,Object parm, string orderBy,string sort, int pageIndex, int pageSize, out int total)
+ public static IEnumerable<T> GetPageList<T>(string sql, Object parm, string orderBy, string sort, int pageIndex, int pageSize, out int total)
{
- try
- {
- //int skip = 1;
- //if (pageIndex > 0)
- //{
- // skip = (pageIndex - 1) * pageSize + 1;
- //}
-
- StringBuilder sb = new StringBuilder();
- sb.AppendFormat("SELECT COUNT(1) FROM ({0}) AS Result;", sql);
- sb.AppendFormat(@"SELECT *
+ //int skip = 1;
+ //if (pageIndex > 0)
+ //{
+ // skip = (pageIndex - 1) * pageSize + 1;
+ //}
+ StringBuilder sb = new StringBuilder();
+ sb.AppendFormat("SELECT COUNT(1) FROM ({0}) AS Result;", sql);
+ sb.AppendFormat(@"SELECT *
FROM(SELECT *,ROW_NUMBER() OVER(ORDER BY {1} {2}) AS RowNum
FROM ({0}) AS Temp) AS Result
WHERE RowNum >= {3} AND RowNum <= {4}
ORDER BY {1} {2}", sql, orderBy, sort, pageIndex, pageSize); //skip, pageIndex * pageSize
- using (IDbConnection conn = sqlConnection())
+ using (IDbConnection conn = sqlConnection())
+ {
+ try
{
using (var reader = conn.QueryMultiple(sb.ToString(), parm))
{
@@ -148,14 +162,19 @@
return reader.Read<T>();
}
}
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
+
}
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
- }
-
}
/// <summary>
@@ -167,23 +186,27 @@
public static DataTable selectdata(string sql, Object parm)
{
//sql璇彞
- try
+ using (IDbConnection conn = sqlConnection())
{
- using (IDbConnection conn = sqlConnection())
+ try
{
DataTable table = new DataTable();
var data = conn.ExecuteReader(sql, parm);
table.Load(data);
return table;
}
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
- }
-
}
/// <summary>
@@ -194,23 +217,27 @@
public static DataTable selecttable(string sql)
{
//sql璇彞
- try
+ using (IDbConnection conn = sqlConnection())
{
- using (IDbConnection conn = sqlConnection())
+ try
{
DataTable table = new DataTable();
var data = conn.ExecuteReader(sql);
table.Load(data);
return table;
}
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
- }
-
}
/// <summary>
@@ -222,9 +249,9 @@
public static DataTable selectProcedure(string sql, Object parm)
{
//sql璇彞
- try
+ using (IDbConnection conn = sqlConnection())
{
- using (IDbConnection conn = sqlConnection())
+ try
{
DataTable table = new DataTable();
//var data = conn.ExecuteReader(sql, parm);
@@ -232,12 +259,17 @@
table.Load(res);
return table;
}
- }
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
}
@@ -252,19 +284,24 @@
{
//sql璇彞
int result = 0;
- try
+ using (IDbConnection conn = sqlConnection())
{
- using (IDbConnection conn = sqlConnection())
+ try
{
result = conn.Query(sql, parm).Count();
}
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
return result;
- }
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
}
}
@@ -274,24 +311,29 @@
/// <param name="sql"></param>
/// <param name="parametere"></param>
/// <returns></returns>
- public static int SQL(string sql,Object parametere)
+ public static int SQL(string sql, Object parametere)
{
//sql璇彞
int result = 0;
- try
+ using (IDbConnection conn = sqlConnection())
{
- using (IDbConnection conn = sqlConnection())
+ try
{
result = conn.Execute(sql, parametere);
}
- return result;
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
- }
+ return result;
}
/// <summary>
@@ -310,7 +352,7 @@
tranction = conn.BeginTransaction();
for (int i = 0; i < sqlList.Count; i++)
{
- conn.Execute(sqlList[i].GetType().GetProperty("str").GetValue(sqlList[i], null).ToString(), sqlList[i].GetType().GetProperty("parm").GetValue(sqlList[i], null),tranction);
+ conn.Execute(sqlList[i].GetType().GetProperty("str").GetValue(sqlList[i], null).ToString(), sqlList[i].GetType().GetProperty("parm").GetValue(sqlList[i], null), tranction);
}
tranction.Commit();
result = true;
@@ -322,6 +364,11 @@
result = false;
tranction.Rollback();
throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
}
return result;
}
@@ -339,9 +386,9 @@
{
int result = 0;
- try
+ using (IDbConnection conn = sqlConnection())
{
- using (IDbConnection conn = sqlConnection())
+ try
{
result = conn.Execute(sql, parameter);
if (result != 0)
@@ -349,14 +396,19 @@
result = conn.Query<int>("select ident_current(@table)", new { table = tableName }).Single<int>();
}
}
- return result;
+ catch (Exception ex)
+ {
+ //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
+ LogHelper.WriteLog(ex);
+ throw ex;
+ }
+ finally
+ {
+ conn.Dispose();
+ conn.Close();
+ }
}
- catch (Exception ex)
- {
- //鍒涘缓鏃ュ織璁板綍缁勪欢瀹炰緥
- LogHelper.WriteLog(ex);
- throw ex;
- }
+ return result;
}
}
}
\ No newline at end of file
diff --git a/VueWebApi/Tools/RedisHelper.cs b/VueWebApi/Tools/RedisHelper.cs
index 1254b21..1eac064 100644
--- a/VueWebApi/Tools/RedisHelper.cs
+++ b/VueWebApi/Tools/RedisHelper.cs
@@ -121,6 +121,7 @@
public bool Remove(string key, int db = 0)
{
Redis = (RedisClient)ChooseRedisInstance(db).GetClient();
+ Redis.Dispose();
return Redis.Remove(key);
}
@@ -164,6 +165,7 @@
var redisList = iredisClient.Lists[listId];
redisList.AddRange(values);
iredisClient.Save();
+ Redis.Dispose();
}
/// <summary>
/// 娣诲姞鍗曚釜瀹炰綋鍒伴摼琛ㄤ腑
@@ -187,6 +189,7 @@
var redisList = iredisClient.Lists[listId];
redisList.Add(Item);
iredisClient.Save();
+ Redis.Dispose();
}
/// <summary>
/// 鑾峰彇閾捐〃
@@ -198,6 +201,7 @@
{
Redis = (RedisClient)ChooseRedisInstance(db).GetClient();
IRedisTypedClient<T> iredisClient = Redis.As<T>();
+ Redis.Dispose();
return iredisClient.Lists[listId];
}
/// <summary>
@@ -213,6 +217,7 @@
var redisList = iredisClient.Lists[listId];
redisList.RemoveValue(t);
iredisClient.Save();
+ Redis.Dispose();
}
/// <summary>
/// 鏍规嵁lambada琛ㄨ揪寮忓垹闄ょ鍚堟潯浠剁殑瀹炰綋
@@ -240,7 +245,7 @@
T value = redisList.Where(func).FirstOrDefault();
redisList.RemoveValue(value);
iredisClient.Save();
-
+ Redis.Dispose();
}
public void test()
diff --git a/VueWebApi/Tools/SeachEncode.cs b/VueWebApi/Tools/SeachEncode.cs
index 0e7485b..4fb3855 100644
--- a/VueWebApi/Tools/SeachEncode.cs
+++ b/VueWebApi/Tools/SeachEncode.cs
@@ -369,7 +369,7 @@
//绗竴灞�
sql = @"select distinct A.parent_id from TRight A
inner join TRoleRightRelation B on A.right_code=B.right_code
- where B.role_code='S001' and A.Type='PC' ";
+ where B.role_code=@rolecode and A.Type='PC' ";
dynamicParams.Add("@rolecode", rolecode);
dynamicParams.Add("@type", type);
var data1 = DapperHelper.selectdata(sql, dynamicParams);
@@ -412,10 +412,11 @@
from TRight A
left join (
select B.right_code from TRight A
- inner join TRoleRightRelation B on A.right_code=B.right_code where A.parent_id=@right_code
+ inner join TRoleRightRelation B on A.right_code=B.right_code where A.parent_id=@right_code and B.role_code=@rolecode
) C on A.right_code=C.right_code
where A.parent_id=@right_code";
dynamicParams.Add("@right_code", data2.Rows[i]["RIGHT_CODE"].ToString());
+ dynamicParams.Add("@rolecode", rolecode);
var data3 = DapperHelper.selectdata(sql, dynamicParams);
for (int j = 0; j < data3.Rows.Count; j++)
{
@@ -432,22 +433,22 @@
//绗竴灞�
sql = @"select distinct A.parent_id from TRight A
inner join TRoleRightRelation B on A.right_code=B.right_code
- where B.role_code='S001' and A.Type='PC' ";
+ where B.role_code=@rolecode and A.Type='APP' ";
dynamicParams.Add("@rolecode", rolecode);
dynamicParams.Add("@type", type);
var date1 = DapperHelper.selectdata(sql, dynamicParams);
TreeDM cmt = new TreeDM();
if (date1.Rows.Count > 0)
{
- cmt.code = "PC";
- cmt.name = "PC";
+ cmt.code = "APP";
+ cmt.name = "APP";
cmt.flag = "Y";
}
else
{
- cmt.code = "PC";
- cmt.name = "PC";
+ cmt.code = "APP";
+ cmt.name = "APP";
cmt.flag = "N";
}
cmt.children = new List<TreeDMOne>();
@@ -475,10 +476,11 @@
from TRight A
left join (
select B.right_code from TRight A
- inner join TRoleRightRelation B on A.right_code=B.right_code where A.parent_id=@right_code
+ inner join TRoleRightRelation B on A.right_code=B.right_code where A.parent_id=@right_code and B.role_code=@rolecode
) C on A.right_code=C.right_code
where A.parent_id=@right_code";
dynamicParams.Add("@right_code", date2.Rows[i]["RIGHT_CODE"].ToString());
+ dynamicParams.Add("@rolecode", rolecode);
var date3 = DapperHelper.selectdata(sql, dynamicParams);
for (int j = 0; j < date3.Rows.Count; j++)
{
diff --git a/VueWebApi/VueWebApi.csproj b/VueWebApi/VueWebApi.csproj
index 607c912..c65ba00 100644
--- a/VueWebApi/VueWebApi.csproj
+++ b/VueWebApi/VueWebApi.csproj
@@ -255,29 +255,38 @@
<Compile Include="Controllers\DeviceManagerController.cs" />
<Compile Include="Controllers\ImportExcelController.cs" />
<Compile Include="Controllers\LoginController.cs" />
+ <Compile Include="Controllers\MaterialManagerController.cs" />
+ <Compile Include="Controllers\ProductModelController.cs" />
<Compile Include="Controllers\SystemSettingController.cs" />
<Compile Include="Controllers\ValuesController.cs" />
<Compile Include="DLL\BLL\BasicSettingBLL.cs" />
<Compile Include="DLL\BLL\DeviceManagerBLL.cs" />
<Compile Include="DLL\BLL\ExcelCheckBLL.cs" />
<Compile Include="DLL\BLL\LoginBLL.cs" />
+ <Compile Include="DLL\BLL\MaterialManagerBLL.cs" />
+ <Compile Include="DLL\BLL\ProductModelBLL.cs" />
<Compile Include="DLL\BLL\SystemSettingBLL.cs" />
<Compile Include="DLL\BLL\UserDataBLL.cs" />
<Compile Include="DLL\DAL\BasicSettingDAL.cs" />
<Compile Include="DLL\DAL\DeviceManagerDAL.cs" />
<Compile Include="DLL\DAL\ExcelCheckDAL.cs" />
<Compile Include="DLL\DAL\LoginDAL.cs" />
+ <Compile Include="DLL\DAL\MaterialManagerDAL.cs" />
+ <Compile Include="DLL\DAL\ProductModelDAL.cs" />
<Compile Include="DLL\DAL\SystemSettingDAL.cs" />
<Compile Include="DLL\DAL\UserDataDAL.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\ExcelErro.cs" />
+ <Compile Include="Models\MaterialRout.cs" />
<Compile Include="Models\ObjectData.cs" />
+ <Compile Include="Models\ObjectDataCont.cs" />
<Compile Include="Models\RoleUserSubmit.cs" />
<Compile Include="Models\TreeDG.cs" />
<Compile Include="Models\TreeDM.cs" />
<Compile Include="Models\TreeObejct.cs" />
+ <Compile Include="Models\Uom.cs" />
<Compile Include="Models\User.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tools\ChannelActionFilterAttribute.cs" />
diff --git a/VueWebApi/Web.config b/VueWebApi/Web.config
index 3dc4a63..0b14d31 100644
--- a/VueWebApi/Web.config
+++ b/VueWebApi/Web.config
@@ -15,13 +15,13 @@
<!--鏈湴鐜-->
<!--<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" />
+ <add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
<add key="RedisConnIp" value="127.0.0.1" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
<add key="RedisConnPort" value="6379" />
<!--key澶辨晥鏃堕棿30绉�-->
- <add key="RedisKeyTimeCont" value="120" />
+ <add key="RedisKeyTimeCont" value="30" />
<!--Excel瀵煎嚭妯℃澘閰嶇疆IP-->
<add key="FileIP" value="http://121.196.36.24:8001/" />
<add key="webpages:Version" value="3.0.0.0" />
@@ -35,9 +35,7 @@
<httpRuntime targetFramework="4.6.1" />
<!--session澶辨晥鏃堕棿-->
<sessionState mode="InProc" timeout="240">
- <providers>
- <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/>
- </providers>
+ <!--<sessionState mode="Off">-->
</sessionState>
</system.web>
<system.webServer>
diff --git a/VueWebApi/bin/VueWebApi.dll.config b/VueWebApi/bin/VueWebApi.dll.config
index 3dc4a63..0b14d31 100644
--- a/VueWebApi/bin/VueWebApi.dll.config
+++ b/VueWebApi/bin/VueWebApi.dll.config
@@ -15,13 +15,13 @@
<!--鏈湴鐜-->
<!--<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" />
+ <add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
<add key="RedisConnIp" value="127.0.0.1" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
<add key="RedisConnPort" value="6379" />
<!--key澶辨晥鏃堕棿30绉�-->
- <add key="RedisKeyTimeCont" value="120" />
+ <add key="RedisKeyTimeCont" value="30" />
<!--Excel瀵煎嚭妯℃澘閰嶇疆IP-->
<add key="FileIP" value="http://121.196.36.24:8001/" />
<add key="webpages:Version" value="3.0.0.0" />
@@ -35,9 +35,7 @@
<httpRuntime targetFramework="4.6.1" />
<!--session澶辨晥鏃堕棿-->
<sessionState mode="InProc" timeout="240">
- <providers>
- <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/>
- </providers>
+ <!--<sessionState mode="Off">-->
</sessionState>
</system.web>
<system.webServer>
diff --git a/VueWebApi/bin/VueWebApi.pdb b/VueWebApi/bin/VueWebApi.pdb
index be43e11..0082e0b 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 41f39bc..1b9dbaf 100644
--- a/VueWebApi/bin/VueWebApi.xml
+++ b/VueWebApi/bin/VueWebApi.xml
@@ -600,7 +600,7 @@
</member>
<member name="M:VueWebApi.Controllers.BasicSettingController.RoleTypeSearch(System.Int32,System.Int32,System.String,System.String)">
<summary>
- 瑙掕壊绫诲瀷鏌ヨ
+ 瑙掕壊绫诲瀷鍒楄〃鏌ヨ
</summary>
<param name="page">椤电爜</param>
<param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
@@ -620,6 +620,12 @@
瑙掕壊绫诲瀷鍒犻櫎
</summary>
<param name="RoleTypeCode">瑙掕壊绫诲瀷缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.BasicSettingController.RoleTypeSelect">
+ <summary>
+ 瑙掕壊绫诲瀷涓嬫媺鎺ュ彛
+ </summary>
<returns></returns>
</member>
<member name="M:VueWebApi.Controllers.BasicSettingController.RoleSearch(System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
@@ -735,18 +741,61 @@
<param name="order">鎺掑簭瑙勫垯</param>
<returns></returns>
</member>
- <member name="M:VueWebApi.Controllers.DeviceManagerController.AddUpdateDeviceType(Newtonsoft.Json.Linq.JObject)">
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.AddUpdateDeviceType(System.Collections.Generic.List{VueWebApi.Models.ObjectDataCont})">
<summary>
璁惧绫诲瀷鏂板
</summary>
- <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ <param name="json">鎻愪氦鏁版嵁瀵硅薄</param>
<returns></returns>
</member>
<member name="M:VueWebApi.Controllers.DeviceManagerController.DeleteDeviceType(System.String)">
<summary>
璁惧绫诲瀷鍒犻櫎
</summary>
- <param name="devicetypeid">璁惧绫诲瀷ID</param>
+ <param name="devicetypecode">璁惧绫诲瀷缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.DeviceTypeSelect">
+ <summary>
+ 璁惧绫诲瀷涓嬫媺妗嗘帴鍙�
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.DeviceGroupSearch(System.Int32,System.Int32,System.String,System.String)">
+ <summary>
+ 璁惧缁勬煡璇�
+ </summary>
+ <param name="page">椤电爜</param>
+ <param name="rows">姣忛〉鏄剧ず鏉℃暟</param>
+ <param name="prop">鎺掑簭瀛楁</param>
+ <param name="order">鎺掑簭瑙勫垯</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.AddUpdateDeviceGroup(System.Collections.Generic.List{VueWebApi.Models.ObjectDataCont})">
+ <summary>
+ 璁惧缁勬柊澧�
+ </summary>
+ <param name="json">鎻愪氦鏁版嵁瀵硅薄</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.DeleteDeviceGroup(System.String)">
+ <summary>
+ 璁惧缁勫垹闄�
+ </summary>
+ <param name="devicegroupcode">璁惧缁勭紪鐮�</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.DeviceTypeSelectGroup(System.String)">
+ <summary>
+ 璁惧绫诲瀷鏌ユ壘璁惧缁�
+ </summary>
+ <param name="eqptypecode">璁惧绫诲瀷缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.DeviceManagerController.WorkShopSelect">
+ <summary>
+ 鎵�灞炶溅闂翠笅鎷夋帴鍙�
+ </summary>
<returns></returns>
</member>
<member name="M:VueWebApi.Controllers.DeviceManagerController.DeviceMangerSearch(System.String,System.String,System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
@@ -776,7 +825,7 @@
<summary>
璁惧娓呭崟鍒犻櫎
</summary>
- <param name="deviceid">璁惧ID</param>
+ <param name="devicecode">璁惧缂栫爜</param>
<returns></returns>
</member>
<member name="M:VueWebApi.Controllers.ImportExcelController.DownLoadExcel(System.String)">
@@ -868,6 +917,170 @@
<param name="usertype">鎿嶄綔绔疨C/APP</param>
<returns></returns>
</member>
+ <member name="M:VueWebApi.Controllers.MaterialManagerController.WareHouseDefSearch(System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
+ <summary>
+ 浠撳簱瀹氫箟鏌ヨ
+ </summary>
+ <param name="warehousecode">浠撳簱缂栫爜</param>
+ <param name="warehousename">浠撳簱鍚嶇О</param>
+ <param name="description">浠撳簱鎻忚堪</param>
+ <param name="createuser">鍒涘缓浜哄憳</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.MaterialManagerController.AddUpdateWareHouseDef(Newtonsoft.Json.Linq.JObject)">
+ <summary>
+ 浠撳簱瀹氫箟鏂板缂栬緫
+ </summary>
+ <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.MaterialManagerController.DeleteWareHouseDef(System.String)">
+ <summary>
+ 浠撳簱鍒犻櫎
+ </summary>
+ <param name="warehousecode">浠撳簱缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.MaterialManagerController.WareHouseSelect">
+ <summary>
+ 鎵�灞炰粨搴撴帴鍙�
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.MaterialManagerController.StorageDefSearch(System.String,System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
+ <summary>
+ 搴撲綅瀹氫箟鏌ヨ
+ </summary>
+ <param name="storagecode">搴撲綅缂栫爜</param>
+ <param name="storagename">搴撲綅鍚嶇О</param>
+ <param name="description">浠撳簱鎻忚堪</param>
+ <param name="createuser">鍒涘缓浜哄憳</param>
+ <param name="stockcode">鎵�灞炰粨搴撶紪鐮�</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.MaterialManagerController.AddUpdateStorageDef(Newtonsoft.Json.Linq.JObject)">
+ <summary>
+ 搴撲綅瀹氫箟鏂板缂栬緫
+ </summary>
+ <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.MaterialManagerController.DeleteStorageDef(System.String)">
+ <summary>
+ 搴撲綅鍒犻櫎
+ </summary>
+ <param name="storagecode">搴撲綅缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.StockTypeSelect">
+ <summary>
+ 瀛樿揣绫诲瀷鎺ュ彛
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.MaterialTypeSearch(System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
+ <summary>
+ 鐗╂枡绫诲瀷鏌ヨ
+ </summary>
+ <param name="materialtypecode">鐗╂枡绫诲瀷缂栫爜</param>
+ <param name="materialtypename">鐗╂枡绫诲瀷鍚嶇О</param>
+ <param name="stocktypecode">瀛樿揣绫诲瀷缂栫爜</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.AddUpdateMaterialType(Newtonsoft.Json.Linq.JObject)">
+ <summary>
+ 鐗╂枡绫诲瀷鏂板缂栬緫
+ </summary>
+ <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.DeleteMaterialType(System.String)">
+ <summary>
+ 鐗╂枡绫诲瀷鍒犻櫎
+ </summary>
+ <param name="materialtypecode">鐗╂枡绫诲瀷缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.UomSearch(System.Int32,System.Int32,System.String,System.String)">
+ <summary>
+ 鍗曚綅鍒楄〃鏌ヨ
+ </summary>
+ <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.UomAdd(System.Collections.Generic.List{VueWebApi.Models.Uom})">
+ <summary>
+ 鍗曚綅鏂板
+ </summary>
+ <param name="json">鍗曚綅鎻愪氦鏁版嵁</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.UomDelete(System.String)">
+ <summary>
+ 鍗曚綅鍒犻櫎
+ </summary>
+ <param name="uomcode">鍗曚綅缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.StockTypeSelectMaterialType(System.String)">
+ <summary>
+ 瀛樼被鍨嬫煡鎵剧墿鏂欑被鍨�
+ </summary>
+ <param name="stocktypecode">瀛樿揣绫诲瀷缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.InventoryFileSelect(System.String,System.String,System.String,System.String,System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
+ <summary>
+ 瀛樿揣妗f鏌ヨ
+ </summary>
+ <param name="partcode"></param>
+ <param name="partname"></param>
+ <param name="partspec"></param>
+ <param name="stocktypecode"></param>
+ <param name="materialtypecode"></param>
+ <param name="storehousecode"></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.AddUpdateInventoryFile(Newtonsoft.Json.Linq.JObject)">
+ <summary>
+ 瀛樿揣妗f鏂板缂栬緫
+ </summary>
+ <param name="obj">鎻愪氦鏁版嵁瀵硅薄</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.DeleteInventoryFile(System.String)">
+ <summary>
+ 瀛樿揣妗f鍒犻櫎
+ </summary>
+ <param name="materialcode">鐗╂枡缂栫爜</param>
+ <returns></returns>
+ </member>
+ <member name="M:VueWebApi.Controllers.ProductModelController.InventoryFileAssociationRoute(System.String)">
+ <summary>
+ 瀛樿揣妗f鍏宠仈宸ヨ壓璺嚎鏌ヨ
+ </summary>
+ <param name="partcode">鐗╂枡缂栫爜</param>
+ <returns></returns>
+ </member>
<member name="M:VueWebApi.Controllers.SystemSettingController.EncodingRules(System.String,System.String,System.Int32,System.Int32,System.String,System.String)">
<summary>
缂栫爜瑙勫垯鏌ヨ
diff --git a/VueWebApi/obj/Debug/VueWebApi.csproj.AssemblyReference.cache b/VueWebApi/obj/Debug/VueWebApi.csproj.AssemblyReference.cache
new file mode 100644
index 0000000..d56c6eb
--- /dev/null
+++ b/VueWebApi/obj/Debug/VueWebApi.csproj.AssemblyReference.cache
Binary files differ
diff --git a/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache b/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache
index d55495f..0dd1ba0 100644
--- a/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache
+++ b/VueWebApi/obj/Debug/VueWebApi.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-a8d5377e259202f5d8af99199b3a5c31575ca216
+35bd76ae72fd355c9137f72fe96aec389f85212c
diff --git a/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt b/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt
index 5bc209e..d0db3af 100644
--- a/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt
+++ b/VueWebApi/obj/Debug/VueWebApi.csproj.FileListAbsolute.txt
@@ -1,3 +1,6 @@
+D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OOXML.xml
+D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OpenXml4Net.pdb
+D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OpenXmlFormats.pdb
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\VueWebApi.dll.config
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\VueWebApi.xml
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\VueWebApi.dll
@@ -108,10 +111,7 @@
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.pdb
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.xml
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OOXML.pdb
-D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OOXML.xml
-D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OpenXml4Net.pdb
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OpenXml4Net.xml
-D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\NPOI.OpenXmlFormats.pdb
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\Pipelines.Sockets.Unofficial.xml
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\ServiceStack.Common.xml
D:\鏂板嚡杩狹ES\VueWebApi\VueWebApi\bin\ServiceStack.Interfaces.xml
@@ -149,6 +149,7 @@
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
diff --git a/VueWebApi/obj/Debug/VueWebApi.pdb b/VueWebApi/obj/Debug/VueWebApi.pdb
index 6014da5..b9da3c9 100644
--- a/VueWebApi/obj/Debug/VueWebApi.pdb
+++ b/VueWebApi/obj/Debug/VueWebApi.pdb
Binary files differ
diff --git a/VueWebApi/obj/Release/Package/PackageTmp/Web.config b/VueWebApi/obj/Release/Package/PackageTmp/Web.config
index 9ee226a..f9e0494 100644
--- a/VueWebApi/obj/Release/Package/PackageTmp/Web.config
+++ b/VueWebApi/obj/Release/Package/PackageTmp/Web.config
@@ -15,13 +15,13 @@
<!--鏈湴鐜-->
<!--<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" />
+ <add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
<add key="RedisConnIp" value="127.0.0.1" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
<add key="RedisConnPort" value="6379" />
<!--key澶辨晥鏃堕棿30绉�-->
- <add key="RedisKeyTimeCont" value="120" />
+ <add key="RedisKeyTimeCont" value="30" />
<!--Excel瀵煎嚭妯℃澘閰嶇疆IP-->
<add key="FileIP" value="http://121.196.36.24:8001/" />
<add key="webpages:Version" value="3.0.0.0" />
@@ -35,9 +35,7 @@
<httpRuntime targetFramework="4.6.1" />
<!--session澶辨晥鏃堕棿-->
<sessionState mode="InProc" timeout="240">
- <providers>
- <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
- </providers>
+ <!--<sessionState mode="Off">-->
</sessionState>
</system.web>
<system.webServer>
diff --git a/VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb b/VueWebApi/obj/Release/Package/PackageTmp/bin/VueWebApi.pdb
index be43e11..0082e0b 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/TransformWebConfig/original/Web.config b/VueWebApi/obj/Release/TransformWebConfig/original/Web.config
index 3dc4a63..0b14d31 100644
--- a/VueWebApi/obj/Release/TransformWebConfig/original/Web.config
+++ b/VueWebApi/obj/Release/TransformWebConfig/original/Web.config
@@ -15,13 +15,13 @@
<!--鏈湴鐜-->
<!--<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" />
+ <add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
<add key="RedisConnIp" value="127.0.0.1" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
<add key="RedisConnPort" value="6379" />
<!--key澶辨晥鏃堕棿30绉�-->
- <add key="RedisKeyTimeCont" value="120" />
+ <add key="RedisKeyTimeCont" value="30" />
<!--Excel瀵煎嚭妯℃澘閰嶇疆IP-->
<add key="FileIP" value="http://121.196.36.24:8001/" />
<add key="webpages:Version" value="3.0.0.0" />
@@ -35,9 +35,7 @@
<httpRuntime targetFramework="4.6.1" />
<!--session澶辨晥鏃堕棿-->
<sessionState mode="InProc" timeout="240">
- <providers>
- <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/>
- </providers>
+ <!--<sessionState mode="Off">-->
</sessionState>
</system.web>
<system.webServer>
diff --git a/VueWebApi/obj/Release/TransformWebConfig/transformed/Web.config b/VueWebApi/obj/Release/TransformWebConfig/transformed/Web.config
index 9ee226a..f9e0494 100644
--- a/VueWebApi/obj/Release/TransformWebConfig/transformed/Web.config
+++ b/VueWebApi/obj/Release/TransformWebConfig/transformed/Web.config
@@ -15,13 +15,13 @@
<!--鏈湴鐜-->
<!--<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" />
+ <add key="DBServer" value="Data Source=121.196.36.24;Initial Catalog=vmes;User ID=sa;Password=xkd@20220602;pooling=false" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃甶p-->
<add key="RedisConnIp" value="127.0.0.1" />
<!--redis鏁版嵁搴撻摼鎺ラ厤缃鍙e彿-->
<add key="RedisConnPort" value="6379" />
<!--key澶辨晥鏃堕棿30绉�-->
- <add key="RedisKeyTimeCont" value="120" />
+ <add key="RedisKeyTimeCont" value="30" />
<!--Excel瀵煎嚭妯℃澘閰嶇疆IP-->
<add key="FileIP" value="http://121.196.36.24:8001/" />
<add key="webpages:Version" value="3.0.0.0" />
@@ -35,9 +35,7 @@
<httpRuntime targetFramework="4.6.1" />
<!--session澶辨晥鏃堕棿-->
<sessionState mode="InProc" timeout="240">
- <providers>
- <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
- </providers>
+ <!--<sessionState mode="Off">-->
</sessionState>
</system.web>
<system.webServer>
diff --git a/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache b/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache
index 25da425..2f30b1d 100644
--- a/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache
+++ b/VueWebApi/obj/Release/VueWebApi.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-c5c47174d1dabbc2afee4529f910c97bce066463
+facf67c0e99c52b4a568e4dc312c32889b04f076
diff --git a/VueWebApi/obj/Release/VueWebApi.pdb b/VueWebApi/obj/Release/VueWebApi.pdb
index be43e11..0082e0b 100644
--- a/VueWebApi/obj/Release/VueWebApi.pdb
+++ b/VueWebApi/obj/Release/VueWebApi.pdb
Binary files differ
--
Gitblit v1.9.3