diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs new file mode 100644 index 0000000..b28d5a4 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto +{ + class DeviceView + { + private int id; + + //设备名称 + private String devName; + + //设备编号 + private String devCode; + + //设备类型 + private String devTypeId; + //设备类型 + private String devTypeName; + + //设备型号 + private String devModel; + + //注册时间 + private String regTime; + + //客户姓名 + private String customerName; + + //客户单位 + private String customerDev; + + //设备状态 + private String statusId; + + //设备状态名称 + private String statusName; + //通道 + private String channel; + + //逻辑位 + private int active; + + private String startTime; + + private String endTime; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string DevName + { + get + { + return devName; + } + + set + { + devName = value; + } + } + + public string DevCode + { + get + { + return devCode; + } + + set + { + devCode = value; + } + } + + public string DevTypeId + { + get + { + return devTypeId; + } + + set + { + devTypeId = value; + } + } + + public string DevTypeName + { + get + { + return devTypeName; + } + + set + { + devTypeName = value; + } + } + + public string DevModel + { + get + { + return devModel; + } + + set + { + devModel = value; + } + } + + public string RegTime + { + get + { + return regTime; + } + + set + { + regTime = value; + } + } + + public string CustomerName + { + get + { + return customerName; + } + + set + { + customerName = value; + } + } + + public string CustomerDev + { + get + { + return customerDev; + } + + set + { + customerDev = value; + } + } + + public string StatusId + { + get + { + return statusId; + } + + set + { + statusId = value; + } + } + + public string StatusName + { + get + { + return statusName; + } + + set + { + statusName = value; + } + } + + public string Channel + { + get + { + return channel; + } + + set + { + channel = value; + } + } + + public int Active + { + get + { + return active; + } + + set + { + active = value; + } + } + + public string StartTime + { + get + { + return startTime; + } + + set + { + startTime = value; + } + } + + public string EndTime + { + get + { + return endTime; + } + + set + { + endTime = value; + } + } + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs new file mode 100644 index 0000000..b28d5a4 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto +{ + class DeviceView + { + private int id; + + //设备名称 + private String devName; + + //设备编号 + private String devCode; + + //设备类型 + private String devTypeId; + //设备类型 + private String devTypeName; + + //设备型号 + private String devModel; + + //注册时间 + private String regTime; + + //客户姓名 + private String customerName; + + //客户单位 + private String customerDev; + + //设备状态 + private String statusId; + + //设备状态名称 + private String statusName; + //通道 + private String channel; + + //逻辑位 + private int active; + + private String startTime; + + private String endTime; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string DevName + { + get + { + return devName; + } + + set + { + devName = value; + } + } + + public string DevCode + { + get + { + return devCode; + } + + set + { + devCode = value; + } + } + + public string DevTypeId + { + get + { + return devTypeId; + } + + set + { + devTypeId = value; + } + } + + public string DevTypeName + { + get + { + return devTypeName; + } + + set + { + devTypeName = value; + } + } + + public string DevModel + { + get + { + return devModel; + } + + set + { + devModel = value; + } + } + + public string RegTime + { + get + { + return regTime; + } + + set + { + regTime = value; + } + } + + public string CustomerName + { + get + { + return customerName; + } + + set + { + customerName = value; + } + } + + public string CustomerDev + { + get + { + return customerDev; + } + + set + { + customerDev = value; + } + } + + public string StatusId + { + get + { + return statusId; + } + + set + { + statusId = value; + } + } + + public string StatusName + { + get + { + return statusName; + } + + set + { + statusName = value; + } + } + + public string Channel + { + get + { + return channel; + } + + set + { + channel = value; + } + } + + public int Active + { + get + { + return active; + } + + set + { + active = value; + } + } + + public string StartTime + { + get + { + return startTime; + } + + set + { + startTime = value; + } + } + + public string EndTime + { + get + { + return endTime; + } + + set + { + endTime = value; + } + } + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 274cc10..f62e122 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -15,12 +15,17 @@ int delete(int id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); + List searchPage(string devName, string devCode, string devModel, string customDev, string customName, string statusId, int page, int limit); + int getTotalCount(string devName, string devCode, string devModel, string customDev, string customerName, string statusId); + List getDeviceByChannel(); + + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs new file mode 100644 index 0000000..b28d5a4 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto +{ + class DeviceView + { + private int id; + + //设备名称 + private String devName; + + //设备编号 + private String devCode; + + //设备类型 + private String devTypeId; + //设备类型 + private String devTypeName; + + //设备型号 + private String devModel; + + //注册时间 + private String regTime; + + //客户姓名 + private String customerName; + + //客户单位 + private String customerDev; + + //设备状态 + private String statusId; + + //设备状态名称 + private String statusName; + //通道 + private String channel; + + //逻辑位 + private int active; + + private String startTime; + + private String endTime; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string DevName + { + get + { + return devName; + } + + set + { + devName = value; + } + } + + public string DevCode + { + get + { + return devCode; + } + + set + { + devCode = value; + } + } + + public string DevTypeId + { + get + { + return devTypeId; + } + + set + { + devTypeId = value; + } + } + + public string DevTypeName + { + get + { + return devTypeName; + } + + set + { + devTypeName = value; + } + } + + public string DevModel + { + get + { + return devModel; + } + + set + { + devModel = value; + } + } + + public string RegTime + { + get + { + return regTime; + } + + set + { + regTime = value; + } + } + + public string CustomerName + { + get + { + return customerName; + } + + set + { + customerName = value; + } + } + + public string CustomerDev + { + get + { + return customerDev; + } + + set + { + customerDev = value; + } + } + + public string StatusId + { + get + { + return statusId; + } + + set + { + statusId = value; + } + } + + public string StatusName + { + get + { + return statusName; + } + + set + { + statusName = value; + } + } + + public string Channel + { + get + { + return channel; + } + + set + { + channel = value; + } + } + + public int Active + { + get + { + return active; + } + + set + { + active = value; + } + } + + public string StartTime + { + get + { + return startTime; + } + + set + { + startTime = value; + } + } + + public string EndTime + { + get + { + return endTime; + } + + set + { + endTime = value; + } + } + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 274cc10..f62e122 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -15,12 +15,17 @@ int delete(int id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); + List searchPage(string devName, string devCode, string devModel, string customDev, string customName, string statusId, int page, int limit); + int getTotalCount(string devName, string devCode, string devModel, string customDev, string customerName, string statusId); + List getDeviceByChannel(); + + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index d2b96d8..4305f56 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -242,8 +242,8 @@ if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); // devModel if (!aReader.IsDBNull(5)) { - //DateTime reg = aReader.GetDateTime(5); // regTime - //deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); + DateTime reg = aReader.GetDateTime(5); // regTime + deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); } if (!aReader.IsDBNull(6)) deviceDto.CustomerName = aReader.GetString(6); // customName if (!aReader.IsDBNull(7)) deviceDto.CustomerDev = aReader.GetString(7); // customDev @@ -331,5 +331,77 @@ return totalCount; } + + public List getDeviceByChannel() + { + List deviceViewList = new List(); + DictService dictService = new DictServiceImpl(); + MySqlConnection conn = null; + + try + { + conn = DbConnectService.getConnection(); + + string sQry = "SELECT * FROM r_device where active = 0 and STATUSID = 2 "; + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceView deviceView = new DeviceView(); + + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(1)) deviceView.DevName = aReader.GetString(1); // devName + if (!aReader.IsDBNull(2)) deviceView.DevCode = aReader.GetString(2); // devCode + if (!aReader.IsDBNull(3)) + { + deviceView.DevTypeId = aReader.GetString(3); // devType + deviceView.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceView.DevModel = aReader.GetString(4); // devModel + if (!aReader.IsDBNull(5)) + { + DateTime reg = aReader.GetDateTime(5); // regTime + deviceView.RegTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName + if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev + if (!aReader.IsDBNull(8)) deviceView.Channel = aReader.GetString(8); + if (!aReader.IsDBNull(9)) deviceView.Active = Convert.ToInt32(aReader.GetString(9)); + if (!aReader.IsDBNull(10)) + { + DateTime reg = aReader.GetDateTime(10); // regTime + deviceView.StartTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(11)) + { + DateTime reg = aReader.GetDateTime(11); // regTime + deviceView.EndTime = reg.ToString("yyyy-MM-dd"); + } + + deviceViewList.Add(deviceView); + + aCommand.Dispose(); + } + } + } + catch (Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "getDeviceByChannel: " + ex.Message); + deviceViewList = null; + } + finally + { + if (null != conn) + { + conn.Close(); + conn.Dispose(); //用完即关闭连接 + } + } + return deviceViewList; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs new file mode 100644 index 0000000..b28d5a4 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto +{ + class DeviceView + { + private int id; + + //设备名称 + private String devName; + + //设备编号 + private String devCode; + + //设备类型 + private String devTypeId; + //设备类型 + private String devTypeName; + + //设备型号 + private String devModel; + + //注册时间 + private String regTime; + + //客户姓名 + private String customerName; + + //客户单位 + private String customerDev; + + //设备状态 + private String statusId; + + //设备状态名称 + private String statusName; + //通道 + private String channel; + + //逻辑位 + private int active; + + private String startTime; + + private String endTime; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string DevName + { + get + { + return devName; + } + + set + { + devName = value; + } + } + + public string DevCode + { + get + { + return devCode; + } + + set + { + devCode = value; + } + } + + public string DevTypeId + { + get + { + return devTypeId; + } + + set + { + devTypeId = value; + } + } + + public string DevTypeName + { + get + { + return devTypeName; + } + + set + { + devTypeName = value; + } + } + + public string DevModel + { + get + { + return devModel; + } + + set + { + devModel = value; + } + } + + public string RegTime + { + get + { + return regTime; + } + + set + { + regTime = value; + } + } + + public string CustomerName + { + get + { + return customerName; + } + + set + { + customerName = value; + } + } + + public string CustomerDev + { + get + { + return customerDev; + } + + set + { + customerDev = value; + } + } + + public string StatusId + { + get + { + return statusId; + } + + set + { + statusId = value; + } + } + + public string StatusName + { + get + { + return statusName; + } + + set + { + statusName = value; + } + } + + public string Channel + { + get + { + return channel; + } + + set + { + channel = value; + } + } + + public int Active + { + get + { + return active; + } + + set + { + active = value; + } + } + + public string StartTime + { + get + { + return startTime; + } + + set + { + startTime = value; + } + } + + public string EndTime + { + get + { + return endTime; + } + + set + { + endTime = value; + } + } + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 274cc10..f62e122 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -15,12 +15,17 @@ int delete(int id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); + List searchPage(string devName, string devCode, string devModel, string customDev, string customName, string statusId, int page, int limit); + int getTotalCount(string devName, string devCode, string devModel, string customDev, string customerName, string statusId); + List getDeviceByChannel(); + + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index d2b96d8..4305f56 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -242,8 +242,8 @@ if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); // devModel if (!aReader.IsDBNull(5)) { - //DateTime reg = aReader.GetDateTime(5); // regTime - //deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); + DateTime reg = aReader.GetDateTime(5); // regTime + deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); } if (!aReader.IsDBNull(6)) deviceDto.CustomerName = aReader.GetString(6); // customName if (!aReader.IsDBNull(7)) deviceDto.CustomerDev = aReader.GetString(7); // customDev @@ -331,5 +331,77 @@ return totalCount; } + + public List getDeviceByChannel() + { + List deviceViewList = new List(); + DictService dictService = new DictServiceImpl(); + MySqlConnection conn = null; + + try + { + conn = DbConnectService.getConnection(); + + string sQry = "SELECT * FROM r_device where active = 0 and STATUSID = 2 "; + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceView deviceView = new DeviceView(); + + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(1)) deviceView.DevName = aReader.GetString(1); // devName + if (!aReader.IsDBNull(2)) deviceView.DevCode = aReader.GetString(2); // devCode + if (!aReader.IsDBNull(3)) + { + deviceView.DevTypeId = aReader.GetString(3); // devType + deviceView.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceView.DevModel = aReader.GetString(4); // devModel + if (!aReader.IsDBNull(5)) + { + DateTime reg = aReader.GetDateTime(5); // regTime + deviceView.RegTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName + if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev + if (!aReader.IsDBNull(8)) deviceView.Channel = aReader.GetString(8); + if (!aReader.IsDBNull(9)) deviceView.Active = Convert.ToInt32(aReader.GetString(9)); + if (!aReader.IsDBNull(10)) + { + DateTime reg = aReader.GetDateTime(10); // regTime + deviceView.StartTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(11)) + { + DateTime reg = aReader.GetDateTime(11); // regTime + deviceView.EndTime = reg.ToString("yyyy-MM-dd"); + } + + deviceViewList.Add(deviceView); + + aCommand.Dispose(); + } + } + } + catch (Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "getDeviceByChannel: " + ex.Message); + deviceViewList = null; + } + finally + { + if (null != conn) + { + conn.Close(); + conn.Dispose(); //用完即关闭连接 + } + } + return deviceViewList; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs b/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs index 5da2518..a7f0cc2 100644 --- a/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs +++ b/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs @@ -7,6 +7,22 @@ { class SensitivityServiceImpl:SensitivityService { + public int setSensitivityParams(String signalSource, String measureModel, String frequency, + String electricFrequency, bool measureError) + { + int iRetval = -1; + try + { + + + iRetval = 0; + } + catch(Exception ex) + { + iRetval = 0; + } + return iRetval; + } } } diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs new file mode 100644 index 0000000..b28d5a4 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto +{ + class DeviceView + { + private int id; + + //设备名称 + private String devName; + + //设备编号 + private String devCode; + + //设备类型 + private String devTypeId; + //设备类型 + private String devTypeName; + + //设备型号 + private String devModel; + + //注册时间 + private String regTime; + + //客户姓名 + private String customerName; + + //客户单位 + private String customerDev; + + //设备状态 + private String statusId; + + //设备状态名称 + private String statusName; + //通道 + private String channel; + + //逻辑位 + private int active; + + private String startTime; + + private String endTime; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string DevName + { + get + { + return devName; + } + + set + { + devName = value; + } + } + + public string DevCode + { + get + { + return devCode; + } + + set + { + devCode = value; + } + } + + public string DevTypeId + { + get + { + return devTypeId; + } + + set + { + devTypeId = value; + } + } + + public string DevTypeName + { + get + { + return devTypeName; + } + + set + { + devTypeName = value; + } + } + + public string DevModel + { + get + { + return devModel; + } + + set + { + devModel = value; + } + } + + public string RegTime + { + get + { + return regTime; + } + + set + { + regTime = value; + } + } + + public string CustomerName + { + get + { + return customerName; + } + + set + { + customerName = value; + } + } + + public string CustomerDev + { + get + { + return customerDev; + } + + set + { + customerDev = value; + } + } + + public string StatusId + { + get + { + return statusId; + } + + set + { + statusId = value; + } + } + + public string StatusName + { + get + { + return statusName; + } + + set + { + statusName = value; + } + } + + public string Channel + { + get + { + return channel; + } + + set + { + channel = value; + } + } + + public int Active + { + get + { + return active; + } + + set + { + active = value; + } + } + + public string StartTime + { + get + { + return startTime; + } + + set + { + startTime = value; + } + } + + public string EndTime + { + get + { + return endTime; + } + + set + { + endTime = value; + } + } + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 274cc10..f62e122 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -15,12 +15,17 @@ int delete(int id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); + List searchPage(string devName, string devCode, string devModel, string customDev, string customName, string statusId, int page, int limit); + int getTotalCount(string devName, string devCode, string devModel, string customDev, string customerName, string statusId); + List getDeviceByChannel(); + + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index d2b96d8..4305f56 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -242,8 +242,8 @@ if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); // devModel if (!aReader.IsDBNull(5)) { - //DateTime reg = aReader.GetDateTime(5); // regTime - //deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); + DateTime reg = aReader.GetDateTime(5); // regTime + deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); } if (!aReader.IsDBNull(6)) deviceDto.CustomerName = aReader.GetString(6); // customName if (!aReader.IsDBNull(7)) deviceDto.CustomerDev = aReader.GetString(7); // customDev @@ -331,5 +331,77 @@ return totalCount; } + + public List getDeviceByChannel() + { + List deviceViewList = new List(); + DictService dictService = new DictServiceImpl(); + MySqlConnection conn = null; + + try + { + conn = DbConnectService.getConnection(); + + string sQry = "SELECT * FROM r_device where active = 0 and STATUSID = 2 "; + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceView deviceView = new DeviceView(); + + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(1)) deviceView.DevName = aReader.GetString(1); // devName + if (!aReader.IsDBNull(2)) deviceView.DevCode = aReader.GetString(2); // devCode + if (!aReader.IsDBNull(3)) + { + deviceView.DevTypeId = aReader.GetString(3); // devType + deviceView.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceView.DevModel = aReader.GetString(4); // devModel + if (!aReader.IsDBNull(5)) + { + DateTime reg = aReader.GetDateTime(5); // regTime + deviceView.RegTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName + if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev + if (!aReader.IsDBNull(8)) deviceView.Channel = aReader.GetString(8); + if (!aReader.IsDBNull(9)) deviceView.Active = Convert.ToInt32(aReader.GetString(9)); + if (!aReader.IsDBNull(10)) + { + DateTime reg = aReader.GetDateTime(10); // regTime + deviceView.StartTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(11)) + { + DateTime reg = aReader.GetDateTime(11); // regTime + deviceView.EndTime = reg.ToString("yyyy-MM-dd"); + } + + deviceViewList.Add(deviceView); + + aCommand.Dispose(); + } + } + } + catch (Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "getDeviceByChannel: " + ex.Message); + deviceViewList = null; + } + finally + { + if (null != conn) + { + conn.Close(); + conn.Dispose(); //用完即关闭连接 + } + } + return deviceViewList; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs b/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs index 5da2518..a7f0cc2 100644 --- a/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs +++ b/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs @@ -7,6 +7,22 @@ { class SensitivityServiceImpl:SensitivityService { + public int setSensitivityParams(String signalSource, String measureModel, String frequency, + String electricFrequency, bool measureError) + { + int iRetval = -1; + try + { + + + iRetval = 0; + } + catch(Exception ex) + { + iRetval = 0; + } + return iRetval; + } } } diff --git a/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs b/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs index 3632dfa..638616d 100644 --- a/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs +++ b/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs @@ -7,6 +7,7 @@ { interface SensitivityService { + int setSensitivityParams(String signalSource,String measureModel,String frequency, String electricFrequency,bool measureError); diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs new file mode 100644 index 0000000..b28d5a4 --- /dev/null +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto +{ + class DeviceView + { + private int id; + + //设备名称 + private String devName; + + //设备编号 + private String devCode; + + //设备类型 + private String devTypeId; + //设备类型 + private String devTypeName; + + //设备型号 + private String devModel; + + //注册时间 + private String regTime; + + //客户姓名 + private String customerName; + + //客户单位 + private String customerDev; + + //设备状态 + private String statusId; + + //设备状态名称 + private String statusName; + //通道 + private String channel; + + //逻辑位 + private int active; + + private String startTime; + + private String endTime; + + public int Id + { + get + { + return id; + } + + set + { + id = value; + } + } + + public string DevName + { + get + { + return devName; + } + + set + { + devName = value; + } + } + + public string DevCode + { + get + { + return devCode; + } + + set + { + devCode = value; + } + } + + public string DevTypeId + { + get + { + return devTypeId; + } + + set + { + devTypeId = value; + } + } + + public string DevTypeName + { + get + { + return devTypeName; + } + + set + { + devTypeName = value; + } + } + + public string DevModel + { + get + { + return devModel; + } + + set + { + devModel = value; + } + } + + public string RegTime + { + get + { + return regTime; + } + + set + { + regTime = value; + } + } + + public string CustomerName + { + get + { + return customerName; + } + + set + { + customerName = value; + } + } + + public string CustomerDev + { + get + { + return customerDev; + } + + set + { + customerDev = value; + } + } + + public string StatusId + { + get + { + return statusId; + } + + set + { + statusId = value; + } + } + + public string StatusName + { + get + { + return statusName; + } + + set + { + statusName = value; + } + } + + public string Channel + { + get + { + return channel; + } + + set + { + channel = value; + } + } + + public int Active + { + get + { + return active; + } + + set + { + active = value; + } + } + + public string StartTime + { + get + { + return startTime; + } + + set + { + startTime = value; + } + } + + public string EndTime + { + get + { + return endTime; + } + + set + { + endTime = value; + } + } + + } +} diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index 274cc10..f62e122 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -15,12 +15,17 @@ int delete(int id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); + List searchPage(string devName, string devCode, string devModel, string customDev, string customName, string statusId, int page, int limit); + int getTotalCount(string devName, string devCode, string devModel, string customDev, string customerName, string statusId); + List getDeviceByChannel(); + + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index d2b96d8..4305f56 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -242,8 +242,8 @@ if (!aReader.IsDBNull(4)) deviceDto.DevModel = aReader.GetString(4); // devModel if (!aReader.IsDBNull(5)) { - //DateTime reg = aReader.GetDateTime(5); // regTime - //deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); + DateTime reg = aReader.GetDateTime(5); // regTime + deviceDto.RegTime = reg.ToString("yyyy-MM-dd"); } if (!aReader.IsDBNull(6)) deviceDto.CustomerName = aReader.GetString(6); // customName if (!aReader.IsDBNull(7)) deviceDto.CustomerDev = aReader.GetString(7); // customDev @@ -331,5 +331,77 @@ return totalCount; } + + public List getDeviceByChannel() + { + List deviceViewList = new List(); + DictService dictService = new DictServiceImpl(); + MySqlConnection conn = null; + + try + { + conn = DbConnectService.getConnection(); + + string sQry = "SELECT * FROM r_device where active = 0 and STATUSID = 2 "; + + MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); + + using (MySqlDataReader aReader = aCommand.ExecuteReader()) + { + while (aReader.Read()) + { + DeviceView deviceView = new DeviceView(); + + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(1)) deviceView.DevName = aReader.GetString(1); // devName + if (!aReader.IsDBNull(2)) deviceView.DevCode = aReader.GetString(2); // devCode + if (!aReader.IsDBNull(3)) + { + deviceView.DevTypeId = aReader.GetString(3); // devType + deviceView.DevTypeName = dictService.getNameByCode("devType", aReader.GetString(3)); + } + if (!aReader.IsDBNull(4)) deviceView.DevModel = aReader.GetString(4); // devModel + if (!aReader.IsDBNull(5)) + { + DateTime reg = aReader.GetDateTime(5); // regTime + deviceView.RegTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(6)) deviceView.CustomerName = aReader.GetString(6); // customName + if (!aReader.IsDBNull(7)) deviceView.CustomerDev = aReader.GetString(7); // customDev + if (!aReader.IsDBNull(8)) deviceView.Channel = aReader.GetString(8); + if (!aReader.IsDBNull(9)) deviceView.Active = Convert.ToInt32(aReader.GetString(9)); + if (!aReader.IsDBNull(10)) + { + DateTime reg = aReader.GetDateTime(10); // regTime + deviceView.StartTime = reg.ToString("yyyy-MM-dd"); + } + if (!aReader.IsDBNull(11)) + { + DateTime reg = aReader.GetDateTime(11); // regTime + deviceView.EndTime = reg.ToString("yyyy-MM-dd"); + } + + deviceViewList.Add(deviceView); + + aCommand.Dispose(); + } + } + } + catch (Exception ex) + { + LogHelper.WriteErrorLog(MethodBase.GetCurrentMethod().DeclaringType, "getDeviceByChannel: " + ex.Message); + deviceViewList = null; + } + finally + { + if (null != conn) + { + conn.Close(); + conn.Dispose(); //用完即关闭连接 + } + } + return deviceViewList; + } + } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs b/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs index 5da2518..a7f0cc2 100644 --- a/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs +++ b/RbFreqStandMeasure/R_DevService/Service/Impl/SensitivityServiceImpl.cs @@ -7,6 +7,22 @@ { class SensitivityServiceImpl:SensitivityService { + public int setSensitivityParams(String signalSource, String measureModel, String frequency, + String electricFrequency, bool measureError) + { + int iRetval = -1; + try + { + + + iRetval = 0; + } + catch(Exception ex) + { + iRetval = 0; + } + return iRetval; + } } } diff --git a/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs b/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs index 3632dfa..638616d 100644 --- a/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs +++ b/RbFreqStandMeasure/R_DevService/Service/SensitivityService.cs @@ -7,6 +7,7 @@ { interface SensitivityService { + int setSensitivityParams(String signalSource,String measureModel,String frequency, String electricFrequency,bool measureError); diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 193b2ef..ccd1497 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -166,6 +166,7 @@ + @@ -262,6 +263,8 @@ + + UserControl