diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 6d1bbef..cc0218d 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -498,9 +498,6 @@ - - - diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 6d1bbef..cc0218d 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -498,9 +498,6 @@ - - - diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index c14c9e0..b9840ae 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -189,7 +189,7 @@ totalCount = deviceService.getTotalCount("", "", "", "", "", "1"); // 获取当前页的数据 - List queryList = deviceService.searchPage("", "", "", "", "", "1", currentPage, limitCount); + List queryList = deviceService.searchPage("", "", "", "", "", "4", currentPage, limitCount); if (null != queryList && queryList.Count > 0) { // 重新计算页码数据 diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 6d1bbef..cc0218d 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -498,9 +498,6 @@ - - - diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index c14c9e0..b9840ae 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -189,7 +189,7 @@ totalCount = deviceService.getTotalCount("", "", "", "", "", "1"); // 获取当前页的数据 - List queryList = deviceService.searchPage("", "", "", "", "", "1", currentPage, limitCount); + List queryList = deviceService.searchPage("", "", "", "", "", "4", currentPage, limitCount); if (null != queryList && queryList.Count > 0) { // 重新计算页码数据 diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.cs index 861fcff..c3d35a6 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.cs @@ -26,7 +26,7 @@ } #endregion - public int deviceId = -1; + public long deviceId = -1; DeviceService deviceService = new DeviceServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 6d1bbef..cc0218d 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -498,9 +498,6 @@ - - - diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index c14c9e0..b9840ae 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -189,7 +189,7 @@ totalCount = deviceService.getTotalCount("", "", "", "", "", "1"); // 获取当前页的数据 - List queryList = deviceService.searchPage("", "", "", "", "", "1", currentPage, limitCount); + List queryList = deviceService.searchPage("", "", "", "", "", "4", currentPage, limitCount); if (null != queryList && queryList.Count > 0) { // 重新计算页码数据 diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.cs index 861fcff..c3d35a6 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.cs @@ -26,7 +26,7 @@ } #endregion - public int deviceId = -1; + public long deviceId = -1; DeviceService deviceService = new DeviceServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index eeded9f..cd2d36c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,10 +29,10 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); - this.btnExitDev = new System.Windows.Forms.Button(); + this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.channel1 = new DevComponents.Editors.ComboItem(); this.channel2 = new DevComponents.Editors.ComboItem(); @@ -40,6 +40,7 @@ this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.button1 = new System.Windows.Forms.Button(); this.btn_ageRate = new System.Windows.Forms.Button(); this.btn_bootFeature = new System.Windows.Forms.Button(); this.btn_accurary = new System.Windows.Forms.Button(); @@ -57,21 +58,22 @@ this.groupBox3 = new System.Windows.Forms.GroupBox(); this.panel2 = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.button1 = new System.Windows.Forms.Button(); + this.dataGridView_times = new System.Windows.Forms.DataGridView(); + this.label_noData = new System.Windows.Forms.Label(); + this.label_noTimes = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.btnClose); this.panel1.Controls.Add(this.labelTitle); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; @@ -79,21 +81,21 @@ this.panel1.TabIndex = 18; this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); // - // btnExitDev + // btnClose // - this.btnExitDev.BackColor = System.Drawing.Color.Transparent; - this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; - this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnExitDev.FlatAppearance.BorderSize = 0; - this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btnExitDev.Location = new System.Drawing.Point(869, 5); - this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); - this.btnExitDev.Name = "btnExitDev"; - this.btnExitDev.Size = new System.Drawing.Size(20, 20); - this.btnExitDev.TabIndex = 2; - this.btnExitDev.UseVisualStyleBackColor = false; - this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + this.btnClose.BackColor = System.Drawing.Color.Transparent; + this.btnClose.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnClose.FlatAppearance.BorderSize = 0; + this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClose.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnClose.Location = new System.Drawing.Point(869, 5); + this.btnClose.Margin = new System.Windows.Forms.Padding(0); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(20, 20); + this.btnClose.TabIndex = 2; + this.btnClose.UseVisualStyleBackColor = false; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // labelTitle // @@ -104,7 +106,7 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "送检仪器详情"; + this.labelTitle.Text = "仪器检测详情"; // // channel1 // @@ -133,6 +135,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.label_noData); this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.btn_ageRate); this.groupBox1.Controls.Add(this.btn_bootFeature); @@ -145,6 +148,16 @@ this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // button1 + // + this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(314, 446); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(125, 31); + this.button1.TabIndex = 8; + this.button1.Text = "计数器范围及灵敏度"; + this.button1.UseVisualStyleBackColor = true; + // // btn_ageRate // this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -191,14 +204,15 @@ this.dataGridView_Data.AllowUserToDeleteRows = false; this.dataGridView_Data.AllowUserToResizeColumns = false; this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; @@ -210,15 +224,15 @@ this.dataGridView_Data.ReadOnly = true; this.dataGridView_Data.RowHeadersVisible = false; this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle8.NullValue = "-"; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle4.NullValue = "-"; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; this.dataGridView_Data.RowTemplate.Height = 44; this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); @@ -354,7 +368,8 @@ // // groupBox4 // - this.groupBox4.Controls.Add(this.dataGridView1); + this.groupBox4.Controls.Add(this.label_noTimes); + this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Location = new System.Drawing.Point(453, 150); this.groupBox4.Name = "groupBox4"; @@ -363,26 +378,43 @@ this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView1 + // dataGridView_times // - this.dataGridView1.BackgroundColor = System.Drawing.Color.White; - this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(12, 24); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(407, 101); - this.dataGridView1.TabIndex = 0; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView_times.Location = new System.Drawing.Point(12, 24); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.Size = new System.Drawing.Size(407, 101); + this.dataGridView_times.TabIndex = 0; // - // button1 + // label_noData // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.Location = new System.Drawing.Point(6, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(425, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // label_noTimes + // + this.label_noTimes.BackColor = System.Drawing.Color.White; + this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.Location = new System.Drawing.Point(15, 56); + this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); + this.label_noTimes.Name = "label_noTimes"; + this.label_noTimes.Size = new System.Drawing.Size(403, 27); + this.label_noTimes.TabIndex = 74; + this.label_noTimes.Text = "无检测记录"; + this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noTimes.Visible = false; // // DetailDlg // @@ -405,14 +437,14 @@ this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Button btnClose; private System.Windows.Forms.Label labelTitle; private DevComponents.Editors.ComboItem channel1; private DevComponents.Editors.ComboItem channel2; @@ -437,7 +469,9 @@ private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Button btn_stability; private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridView dataGridView_times; private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label_noData; + private System.Windows.Forms.Label label_noTimes; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 6d1bbef..cc0218d 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -498,9 +498,6 @@ - - - diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index c14c9e0..b9840ae 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -189,7 +189,7 @@ totalCount = deviceService.getTotalCount("", "", "", "", "", "1"); // 获取当前页的数据 - List queryList = deviceService.searchPage("", "", "", "", "", "1", currentPage, limitCount); + List queryList = deviceService.searchPage("", "", "", "", "", "4", currentPage, limitCount); if (null != queryList && queryList.Count > 0) { // 重新计算页码数据 diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.cs index 861fcff..c3d35a6 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.cs @@ -26,7 +26,7 @@ } #endregion - public int deviceId = -1; + public long deviceId = -1; DeviceService deviceService = new DeviceServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index eeded9f..cd2d36c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,10 +29,10 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); - this.btnExitDev = new System.Windows.Forms.Button(); + this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.channel1 = new DevComponents.Editors.ComboItem(); this.channel2 = new DevComponents.Editors.ComboItem(); @@ -40,6 +40,7 @@ this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.button1 = new System.Windows.Forms.Button(); this.btn_ageRate = new System.Windows.Forms.Button(); this.btn_bootFeature = new System.Windows.Forms.Button(); this.btn_accurary = new System.Windows.Forms.Button(); @@ -57,21 +58,22 @@ this.groupBox3 = new System.Windows.Forms.GroupBox(); this.panel2 = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.button1 = new System.Windows.Forms.Button(); + this.dataGridView_times = new System.Windows.Forms.DataGridView(); + this.label_noData = new System.Windows.Forms.Label(); + this.label_noTimes = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.btnClose); this.panel1.Controls.Add(this.labelTitle); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; @@ -79,21 +81,21 @@ this.panel1.TabIndex = 18; this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); // - // btnExitDev + // btnClose // - this.btnExitDev.BackColor = System.Drawing.Color.Transparent; - this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; - this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnExitDev.FlatAppearance.BorderSize = 0; - this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btnExitDev.Location = new System.Drawing.Point(869, 5); - this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); - this.btnExitDev.Name = "btnExitDev"; - this.btnExitDev.Size = new System.Drawing.Size(20, 20); - this.btnExitDev.TabIndex = 2; - this.btnExitDev.UseVisualStyleBackColor = false; - this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + this.btnClose.BackColor = System.Drawing.Color.Transparent; + this.btnClose.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnClose.FlatAppearance.BorderSize = 0; + this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClose.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnClose.Location = new System.Drawing.Point(869, 5); + this.btnClose.Margin = new System.Windows.Forms.Padding(0); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(20, 20); + this.btnClose.TabIndex = 2; + this.btnClose.UseVisualStyleBackColor = false; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // labelTitle // @@ -104,7 +106,7 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "送检仪器详情"; + this.labelTitle.Text = "仪器检测详情"; // // channel1 // @@ -133,6 +135,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.label_noData); this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.btn_ageRate); this.groupBox1.Controls.Add(this.btn_bootFeature); @@ -145,6 +148,16 @@ this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // button1 + // + this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(314, 446); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(125, 31); + this.button1.TabIndex = 8; + this.button1.Text = "计数器范围及灵敏度"; + this.button1.UseVisualStyleBackColor = true; + // // btn_ageRate // this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -191,14 +204,15 @@ this.dataGridView_Data.AllowUserToDeleteRows = false; this.dataGridView_Data.AllowUserToResizeColumns = false; this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; @@ -210,15 +224,15 @@ this.dataGridView_Data.ReadOnly = true; this.dataGridView_Data.RowHeadersVisible = false; this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle8.NullValue = "-"; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle4.NullValue = "-"; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; this.dataGridView_Data.RowTemplate.Height = 44; this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); @@ -354,7 +368,8 @@ // // groupBox4 // - this.groupBox4.Controls.Add(this.dataGridView1); + this.groupBox4.Controls.Add(this.label_noTimes); + this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Location = new System.Drawing.Point(453, 150); this.groupBox4.Name = "groupBox4"; @@ -363,26 +378,43 @@ this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView1 + // dataGridView_times // - this.dataGridView1.BackgroundColor = System.Drawing.Color.White; - this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(12, 24); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(407, 101); - this.dataGridView1.TabIndex = 0; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView_times.Location = new System.Drawing.Point(12, 24); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.Size = new System.Drawing.Size(407, 101); + this.dataGridView_times.TabIndex = 0; // - // button1 + // label_noData // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.Location = new System.Drawing.Point(6, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(425, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // label_noTimes + // + this.label_noTimes.BackColor = System.Drawing.Color.White; + this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.Location = new System.Drawing.Point(15, 56); + this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); + this.label_noTimes.Name = "label_noTimes"; + this.label_noTimes.Size = new System.Drawing.Size(403, 27); + this.label_noTimes.TabIndex = 74; + this.label_noTimes.Text = "无检测记录"; + this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noTimes.Visible = false; // // DetailDlg // @@ -405,14 +437,14 @@ this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Button btnClose; private System.Windows.Forms.Label labelTitle; private DevComponents.Editors.ComboItem channel1; private DevComponents.Editors.ComboItem channel2; @@ -437,7 +469,9 @@ private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Button btn_stability; private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridView dataGridView_times; private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label_noData; + private System.Windows.Forms.Label label_noTimes; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index e2df41e..7ef668c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -1,9 +1,14 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -27,50 +32,140 @@ } #endregion + #region 样式常量定义 + private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 + private readonly Color tableForeColor = Color.White; + private readonly Font titleFont = new Font("微软雅黑", 14F, FontStyle.Regular, GraphicsUnit.Pixel, 134); + + private readonly Color inputBlack = Color.FromArgb(51, 51, 51); // #333333 + private readonly Color inputDefault = Color.FromArgb(204, 204, 204); // #CCCCCC + #endregion + + + DataTable tableOriginData = new DataTable(); + DataTable tableTimes = new DataTable(); + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public Action HideMaskAction { get; set; } - public DetailDlg() + public DetailDlg(long deviceId) { InitializeComponent(); - //((ComboBoxEx)this.Controls.Find("channelFree", true)[0]).SelectedIndex = 0; + InitDataGridView_times(); + LoadTimes(deviceId); } // 关闭对话框 - private void btnAddDevCancel_Click(object sender, EventArgs e) + private void btnClose_Click(object sender, EventArgs e) { this.HideMaskAction(); } - // 添加并开始检测 - private void btnSave_Click(object sender, EventArgs e) + + // 数据列表 + private void InitDataGridView_Data() { - // 取得输入框的参数 - string devName = ((TextBoxX) this.Controls.Find("inputDevName", true)[0]).Text; - string devCode = ((TextBoxX) this.Controls.Find("inputDevCode", true)[0]).Text; - string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; - string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; - string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + dataGridView_Data.Columns.Clear(); + dataGridView_Data.Rows.Clear(); + + } - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) + { + tableOriginData = new DataTable(); - // 初始化数据访问接口 - DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + // 设置表格的列 + tableOriginData.Columns.Add("序号", Type.GetType("System.String")); + tableOriginData.Columns.Add("时间", Type.GetType("System.String")); + tableOriginData.Columns.Add("相对频率偏差", Type.GetType("System.String")); + + // 获取当前页的数据 + List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); + if (null != queryList && queryList.Count > 0) { - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); + + int index = 1; + foreach (DetectionDto detection in queryList) + { + tableOriginData.Rows.Add(index, detection.LogTime, detection.Frequency); + index++; + } + + label_noData.Visible = false; } else { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + label_noData.Visible = true; } + + dataGridView_Data.DataSource = tableOriginData; + + // width=964px + dataGridView_Data.Columns[0].Width = 80; + dataGridView_Data.Columns[1].Width = 164; + dataGridView_Data.Columns[2].Width = 120; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + } + + // 检测记录列表 + private void InitDataGridView_times() + { + dataGridView_times.Columns.Clear(); + dataGridView_times.Rows.Clear(); + + } + + private void LoadTimes(long deviceId) + { + tableTimes = new DataTable(); + + // 设置表格的列 + tableTimes.Columns.Add("序号", Type.GetType("System.String")); + tableTimes.Columns.Add("开始时间", Type.GetType("System.String")); + tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); + + // 获取当前页的数据 + List queryList = detectionItemService.serach(deviceId); + if (null != queryList && queryList.Count > 0) + { + + int index = 1; + foreach (DetectionItem detection in queryList) + { + tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + index++; + } + + label_noTimes.Visible = false; + } + else + { + label_noTimes.Visible = true; + } + + dataGridView_times.DataSource = tableTimes; + + // width=964px + dataGridView_Data.Columns[0].Width = 80; + dataGridView_Data.Columns[1].Width = 164; + dataGridView_Data.Columns[2].Width = 120; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + } } } diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs index fc4fe82..220d14d 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DetectionDto.cs @@ -7,17 +7,17 @@ { class DetectionDto { - int id; + long id; //设备ID - int deviceId; + long deviceId; //记录时间 String logTime; //频率 String frequency; - public int Id + public long Id { get { @@ -30,7 +30,7 @@ } } - public int DeviceId + public long DeviceId { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs index 06d0598..496775c 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceDto.cs @@ -7,7 +7,7 @@ { class DeviceDto { - private int id; + private long id; //设备名称 private String devName; @@ -43,7 +43,7 @@ //逻辑位 private int active; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs index 0019b94..ec02ee3 100644 --- a/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs +++ b/RbFreqStandMeasure/R_DataBase/Dto/DeviceView.cs @@ -7,7 +7,7 @@ { class DeviceView { - private int id; + private long id; //设备名称 private String devName; @@ -52,7 +52,7 @@ private String bootFeature; private String ageRate; - public int Id + public long Id { get { diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs index a33322b..84676e2 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionItemService.cs @@ -11,11 +11,11 @@ int add(long deviceId,DateTime startTime,DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate,String interval, string channelNo); - int update(int deviceId, DateTime startTime, DateTime endTime, string stability, + int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval); - List serach(int deviceId); + List serach(long deviceId); - int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); + int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs index cedbce7..072757f 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DetectionService.cs @@ -9,9 +9,9 @@ { interface DetectionService { - int add(int deviceId, DateTime logTime, String frequency); + int add(long deviceId, DateTime logTime, String frequency); - List search(int deviceId); + List search(long deviceId, string detectionType, string startTime, string endTime); } } diff --git a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs index f62e122..c4c33f4 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/DeviceService.cs @@ -10,9 +10,9 @@ { int add(string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int update(int id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); + int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel); - int delete(int id); + int delete(long id); List search(string devName, string devCode, string devModel, string suctomerDev, string customerName, string statusId); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs index a8280fe..f8c6f6d 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionItemServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) + public int update(long deviceId, DateTime startTime, DateTime endTime, string stability, string accuracy, string bootFeature, string ageRate, String interval) { int iRetval = -1; try @@ -90,7 +90,7 @@ return iRetval; } - public int stopDetection(int deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) + public int stopDetection(long deviceId, DateTime startTime, DateTime endTime, bool isDeleteData) { int iRetval = -1; try @@ -128,7 +128,7 @@ return iRetval; } - public List serach(int deviceId) + public List serach(long deviceId) { List detectionItemList = new List(); try diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs index 2630797..3f1b8bc 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DetectionServiceImpl.cs @@ -13,7 +13,7 @@ { class DetectionServiceImpl : DetectionService { - public int add(int deviceId, DateTime logTime,String frequency) + public int add(long deviceId, DateTime logTime,String frequency) { int iRetval = -1; try @@ -46,7 +46,7 @@ return iRetval; } - public List search(int deviceId) + public List search(long deviceId, string detectionType, string startTime, string endTime) { List detectionDtoList = new List(); try @@ -57,7 +57,7 @@ return null; } - string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId; + string sQry = "SELECT DEVICE_ID,LOG_TIME,FREQUENCY FROM r_detection where DEVICE_ID = " + deviceId +"and DETECTION_ITEM=" + detectionType + "and LOG_TIME BETWEEN " + startTime + " and "+ endTime + "order by LOG_TIME"; MySqlCommand aCommand = new MySqlCommand(sQry, DbConnectService.mySqlConnect); using (MySqlDataReader aReader = aCommand.ExecuteReader()) @@ -66,7 +66,7 @@ { DetectionDto detectionDto = new DetectionDto(); //姓名 - if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) detectionDto.DeviceId = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) detectionDto.LogTime = aReader.GetString(1); if (!aReader.IsDBNull(2)) detectionDto.Frequency = aReader.GetString(2); diff --git a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs index 1373775..068a9e1 100644 --- a/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs +++ b/RbFreqStandMeasure/R_DataBase/Service/Impl/DeviceServiceImpl.cs @@ -55,7 +55,7 @@ return iRetval; } - public int update(int id, string devName, string devCode, string devTypeId, string devModel, + public int update(long id, string devName, string devCode, string devTypeId, string devModel, string custometDev, string customerName, string channel) { int iRetval = -1; @@ -93,7 +93,7 @@ return iRetval; } - public int delete(int id) + public int delete(long id) { int iRetval = -1; @@ -160,7 +160,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); if (!aReader.IsDBNull(3)) @@ -219,7 +219,10 @@ if (customerName != "" && customerName != null) sQry += " and CUSTOMER_NAME like '%" + customerName + "%'"; if (statusId != "" && statusId != null) - sQry += " and STATUSID = " + statusId; + { + if(statusId.Equals("4")) sQry += " and STATUSID != 2"; + else sQry += " and STATUSID = " + statusId; + } sQry += " limit " + limit + " offset " + (page - 1) * limit; @@ -231,7 +234,7 @@ { DeviceDto deviceDto = new DeviceDto(); - if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceDto.Id = Convert.ToInt64(aReader.GetString(0)); // id if (!aReader.IsDBNull(1)) deviceDto.DevName = aReader.GetString(1); // devName if (!aReader.IsDBNull(2)) deviceDto.DevCode = aReader.GetString(2); // devCode if (!aReader.IsDBNull(3)) @@ -352,7 +355,7 @@ { DeviceView deviceView = new DeviceView(); - if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt32(aReader.GetString(0)); // id + if (!aReader.IsDBNull(0)) deviceView.Id = Convert.ToInt64(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)) diff --git a/RbFreqStandMeasure/RbFreqStandMeasure.csproj b/RbFreqStandMeasure/RbFreqStandMeasure.csproj index 6d1bbef..cc0218d 100644 --- a/RbFreqStandMeasure/RbFreqStandMeasure.csproj +++ b/RbFreqStandMeasure/RbFreqStandMeasure.csproj @@ -498,9 +498,6 @@ - - - diff --git a/RbFreqStandMeasure/home/HomeCtrlForm.cs b/RbFreqStandMeasure/home/HomeCtrlForm.cs index c14c9e0..b9840ae 100644 --- a/RbFreqStandMeasure/home/HomeCtrlForm.cs +++ b/RbFreqStandMeasure/home/HomeCtrlForm.cs @@ -189,7 +189,7 @@ totalCount = deviceService.getTotalCount("", "", "", "", "", "1"); // 获取当前页的数据 - List queryList = deviceService.searchPage("", "", "", "", "", "1", currentPage, limitCount); + List queryList = deviceService.searchPage("", "", "", "", "", "4", currentPage, limitCount); if (null != queryList && queryList.Count > 0) { // 重新计算页码数据 diff --git a/RbFreqStandMeasure/home/SetDevChannelDlg.cs b/RbFreqStandMeasure/home/SetDevChannelDlg.cs index 861fcff..c3d35a6 100644 --- a/RbFreqStandMeasure/home/SetDevChannelDlg.cs +++ b/RbFreqStandMeasure/home/SetDevChannelDlg.cs @@ -26,7 +26,7 @@ } #endregion - public int deviceId = -1; + public long deviceId = -1; DeviceService deviceService = new DeviceServiceImpl(); DetectionItemService detectionItemService = new DetectionItemServiceImpl(); diff --git a/RbFreqStandMeasure/info/DetailDlg.Designer.cs b/RbFreqStandMeasure/info/DetailDlg.Designer.cs index eeded9f..cd2d36c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.Designer.cs +++ b/RbFreqStandMeasure/info/DetailDlg.Designer.cs @@ -29,10 +29,10 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); - this.btnExitDev = new System.Windows.Forms.Button(); + this.btnClose = new System.Windows.Forms.Button(); this.labelTitle = new System.Windows.Forms.Label(); this.channel1 = new DevComponents.Editors.ComboItem(); this.channel2 = new DevComponents.Editors.ComboItem(); @@ -40,6 +40,7 @@ this.channel4 = new DevComponents.Editors.ComboItem(); this.channel5 = new DevComponents.Editors.ComboItem(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.button1 = new System.Windows.Forms.Button(); this.btn_ageRate = new System.Windows.Forms.Button(); this.btn_bootFeature = new System.Windows.Forms.Button(); this.btn_accurary = new System.Windows.Forms.Button(); @@ -57,21 +58,22 @@ this.groupBox3 = new System.Windows.Forms.GroupBox(); this.panel2 = new System.Windows.Forms.Panel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.button1 = new System.Windows.Forms.Button(); + this.dataGridView_times = new System.Windows.Forms.DataGridView(); + this.label_noData = new System.Windows.Forms.Label(); + this.label_noTimes = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Data)).BeginInit(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); this.groupBox4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).BeginInit(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(132)))), ((int)(((byte)(215))))); - this.panel1.Controls.Add(this.btnExitDev); + this.panel1.Controls.Add(this.btnClose); this.panel1.Controls.Add(this.labelTitle); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; @@ -79,21 +81,21 @@ this.panel1.TabIndex = 18; this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); // - // btnExitDev + // btnClose // - this.btnExitDev.BackColor = System.Drawing.Color.Transparent; - this.btnExitDev.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; - this.btnExitDev.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnExitDev.FlatAppearance.BorderSize = 0; - this.btnExitDev.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnExitDev.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.btnExitDev.Location = new System.Drawing.Point(869, 5); - this.btnExitDev.Margin = new System.Windows.Forms.Padding(0); - this.btnExitDev.Name = "btnExitDev"; - this.btnExitDev.Size = new System.Drawing.Size(20, 20); - this.btnExitDev.TabIndex = 2; - this.btnExitDev.UseVisualStyleBackColor = false; - this.btnExitDev.Click += new System.EventHandler(this.btnAddDevCancel_Click); + this.btnClose.BackColor = System.Drawing.Color.Transparent; + this.btnClose.BackgroundImage = global::Casic.Birmm.RbFreqStandMeasure.Properties.Resources.icon_exit; + this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnClose.FlatAppearance.BorderSize = 0; + this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnClose.ForeColor = System.Drawing.SystemColors.ControlDarkDark; + this.btnClose.Location = new System.Drawing.Point(869, 5); + this.btnClose.Margin = new System.Windows.Forms.Padding(0); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(20, 20); + this.btnClose.TabIndex = 2; + this.btnClose.UseVisualStyleBackColor = false; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); // // labelTitle // @@ -104,7 +106,7 @@ this.labelTitle.Name = "labelTitle"; this.labelTitle.Size = new System.Drawing.Size(155, 23); this.labelTitle.TabIndex = 0; - this.labelTitle.Text = "送检仪器详情"; + this.labelTitle.Text = "仪器检测详情"; // // channel1 // @@ -133,6 +135,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.label_noData); this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.btn_ageRate); this.groupBox1.Controls.Add(this.btn_bootFeature); @@ -145,6 +148,16 @@ this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // + // button1 + // + this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(314, 446); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(125, 31); + this.button1.TabIndex = 8; + this.button1.Text = "计数器范围及灵敏度"; + this.button1.UseVisualStyleBackColor = true; + // // btn_ageRate // this.btn_ageRate.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -191,14 +204,15 @@ this.dataGridView_Data.AllowUserToDeleteRows = false; this.dataGridView_Data.AllowUserToResizeColumns = false; this.dataGridView_Data.AllowUserToResizeRows = false; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); - dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(234)))), ((int)(((byte)(238))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(201)))), ((int)(((byte)(203)))), ((int)(((byte)(208))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dataGridView_Data.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_Data.BackgroundColor = System.Drawing.Color.White; this.dataGridView_Data.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dataGridView_Data.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; @@ -210,15 +224,15 @@ this.dataGridView_Data.ReadOnly = true; this.dataGridView_Data.RowHeadersVisible = false; this.dataGridView_Data.RowHeadersWidth = 30; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.White; - dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle8.NullValue = "-"; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle4.NullValue = "-"; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(86)))), ((int)(((byte)(163)))), ((int)(((byte)(242))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView_Data.RowsDefaultCellStyle = dataGridViewCellStyle4; this.dataGridView_Data.RowTemplate.Height = 44; this.dataGridView_Data.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView_Data.Size = new System.Drawing.Size(425, 429); @@ -354,7 +368,8 @@ // // groupBox4 // - this.groupBox4.Controls.Add(this.dataGridView1); + this.groupBox4.Controls.Add(this.label_noTimes); + this.groupBox4.Controls.Add(this.dataGridView_times); this.groupBox4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox4.Location = new System.Drawing.Point(453, 150); this.groupBox4.Name = "groupBox4"; @@ -363,26 +378,43 @@ this.groupBox4.TabStop = false; this.groupBox4.Text = "检测记录"; // - // dataGridView1 + // dataGridView_times // - this.dataGridView1.BackgroundColor = System.Drawing.Color.White; - this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(12, 24); - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(407, 101); - this.dataGridView1.TabIndex = 0; + this.dataGridView_times.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridView_times.BackgroundColor = System.Drawing.Color.White; + this.dataGridView_times.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dataGridView_times.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView_times.Location = new System.Drawing.Point(12, 24); + this.dataGridView_times.Name = "dataGridView_times"; + this.dataGridView_times.RowTemplate.Height = 23; + this.dataGridView_times.Size = new System.Drawing.Size(407, 101); + this.dataGridView_times.TabIndex = 0; // - // button1 + // label_noData // - this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Location = new System.Drawing.Point(314, 446); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(125, 31); - this.button1.TabIndex = 8; - this.button1.Text = "计数器范围及灵敏度"; - this.button1.UseVisualStyleBackColor = true; + this.label_noData.BackColor = System.Drawing.Color.White; + this.label_noData.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noData.Location = new System.Drawing.Point(6, 111); + this.label_noData.Margin = new System.Windows.Forms.Padding(0); + this.label_noData.Name = "label_noData"; + this.label_noData.Size = new System.Drawing.Size(425, 27); + this.label_noData.TabIndex = 73; + this.label_noData.Text = "无原始数据"; + this.label_noData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noData.Visible = false; + // + // label_noTimes + // + this.label_noTimes.BackColor = System.Drawing.Color.White; + this.label_noTimes.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134))); + this.label_noTimes.Location = new System.Drawing.Point(15, 56); + this.label_noTimes.Margin = new System.Windows.Forms.Padding(0); + this.label_noTimes.Name = "label_noTimes"; + this.label_noTimes.Size = new System.Drawing.Size(403, 27); + this.label_noTimes.TabIndex = 74; + this.label_noTimes.Text = "无检测记录"; + this.label_noTimes.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.label_noTimes.Visible = false; // // DetailDlg // @@ -405,14 +437,14 @@ this.groupBox2.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox4.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView_times)).EndInit(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button btnExitDev; + private System.Windows.Forms.Button btnClose; private System.Windows.Forms.Label labelTitle; private DevComponents.Editors.ComboItem channel1; private DevComponents.Editors.ComboItem channel2; @@ -437,7 +469,9 @@ private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Button btn_stability; private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridView dataGridView_times; private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label_noData; + private System.Windows.Forms.Label label_noTimes; } } \ No newline at end of file diff --git a/RbFreqStandMeasure/info/DetailDlg.cs b/RbFreqStandMeasure/info/DetailDlg.cs index e2df41e..7ef668c 100644 --- a/RbFreqStandMeasure/info/DetailDlg.cs +++ b/RbFreqStandMeasure/info/DetailDlg.cs @@ -1,9 +1,14 @@ -using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Dto; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Model; +using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service; using Casic.Birmm.RbFreqStandMeasure.R_DataBase.Service.Impl; using Casic.Birmm.RbFreqStandMeasure.Tools; using DevComponents.DotNetBar.Controls; using DevComponents.Editors; using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -27,50 +32,140 @@ } #endregion + #region 样式常量定义 + private readonly Color titleBackColor = Color.FromArgb(63, 132, 215); // #3F64D7 + private readonly Color tableForeColor = Color.White; + private readonly Font titleFont = new Font("微软雅黑", 14F, FontStyle.Regular, GraphicsUnit.Pixel, 134); + + private readonly Color inputBlack = Color.FromArgb(51, 51, 51); // #333333 + private readonly Color inputDefault = Color.FromArgb(204, 204, 204); // #CCCCCC + #endregion + + + DataTable tableOriginData = new DataTable(); + DataTable tableTimes = new DataTable(); + DetectionService detectionService = new DetectionServiceImpl(); + DetectionItemService detectionItemService = new DetectionItemServiceImpl(); + public Action HideMaskAction { get; set; } - public DetailDlg() + public DetailDlg(long deviceId) { InitializeComponent(); - //((ComboBoxEx)this.Controls.Find("channelFree", true)[0]).SelectedIndex = 0; + InitDataGridView_times(); + LoadTimes(deviceId); } // 关闭对话框 - private void btnAddDevCancel_Click(object sender, EventArgs e) + private void btnClose_Click(object sender, EventArgs e) { this.HideMaskAction(); } - // 添加并开始检测 - private void btnSave_Click(object sender, EventArgs e) + + // 数据列表 + private void InitDataGridView_Data() { - // 取得输入框的参数 - string devName = ((TextBoxX) this.Controls.Find("inputDevName", true)[0]).Text; - string devCode = ((TextBoxX) this.Controls.Find("inputDevCode", true)[0]).Text; - string devModel = ((TextBoxX)this.Controls.Find("inputDevModel", true)[0]).Text; - string devCustomComp = ((TextBoxX)this.Controls.Find("inputCustComp", true)[0]).Text; - string devCustomName = ((TextBoxX)this.Controls.Find("inputCustName", true)[0]).Text; + dataGridView_Data.Columns.Clear(); + dataGridView_Data.Rows.Clear(); + + } - ComboBoxEx channels = (ComboBoxEx)this.Controls.Find("channelFree", true)[0]; - string channelNo = (string)((ComboItem)channels.SelectedItem).Value; + private void LoadData(long deviceId, string detectionItem, string startTime, string endTime) + { + tableOriginData = new DataTable(); - // 初始化数据访问接口 - DeviceService devService = new DeviceServiceImpl(); - int id = devService.add(devName, devCode, "1", devModel, devCustomComp, devCustomName, channelNo); - if (id >= 0) + // 设置表格的列 + tableOriginData.Columns.Add("序号", Type.GetType("System.String")); + tableOriginData.Columns.Add("时间", Type.GetType("System.String")); + tableOriginData.Columns.Add("相对频率偏差", Type.GetType("System.String")); + + // 获取当前页的数据 + List queryList = detectionService.search(deviceId, detectionItem, startTime, endTime); + if (null != queryList && queryList.Count > 0) { - // 添加成功,继续保存检测项目和开始时间 - this.HideMaskAction(); + + int index = 1; + foreach (DetectionDto detection in queryList) + { + tableOriginData.Rows.Add(index, detection.LogTime, detection.Frequency); + index++; + } + + label_noData.Visible = false; } else { - LogHelper.WriteErrorLog(this.GetType(), "添加设备[" + devName + "]失败"); + label_noData.Visible = true; } + + dataGridView_Data.DataSource = tableOriginData; + + // width=964px + dataGridView_Data.Columns[0].Width = 80; + dataGridView_Data.Columns[1].Width = 164; + dataGridView_Data.Columns[2].Width = 120; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + + } + + // 检测记录列表 + private void InitDataGridView_times() + { + dataGridView_times.Columns.Clear(); + dataGridView_times.Rows.Clear(); + + } + + private void LoadTimes(long deviceId) + { + tableTimes = new DataTable(); + + // 设置表格的列 + tableTimes.Columns.Add("序号", Type.GetType("System.String")); + tableTimes.Columns.Add("开始时间", Type.GetType("System.String")); + tableTimes.Columns.Add("结束时间", Type.GetType("System.String")); + + // 获取当前页的数据 + List queryList = detectionItemService.serach(deviceId); + if (null != queryList && queryList.Count > 0) + { + + int index = 1; + foreach (DetectionItem detection in queryList) + { + tableTimes.Rows.Add(index, detection.StartTime, detection.EndTime); + index++; + } + + label_noTimes.Visible = false; + } + else + { + label_noTimes.Visible = true; + } + + dataGridView_times.DataSource = tableTimes; + + // width=964px + dataGridView_Data.Columns[0].Width = 80; + dataGridView_Data.Columns[1].Width = 164; + dataGridView_Data.Columns[2].Width = 120; + + + dataGridView_Data.Columns[0].ReadOnly = true; + dataGridView_Data.Columns[1].ReadOnly = true; + dataGridView_Data.Columns[2].ReadOnly = true; + } } } diff --git a/RbFreqStandMeasure/info/InfoCtrlForm.cs b/RbFreqStandMeasure/info/InfoCtrlForm.cs index 93262a9..0f08cf1 100644 --- a/RbFreqStandMeasure/info/InfoCtrlForm.cs +++ b/RbFreqStandMeasure/info/InfoCtrlForm.cs @@ -445,10 +445,10 @@ private void btnDetail_Click(object sender, EventArgs e) { int rowIndex = dataGridView_DevList.CurrentRow.Index; - int id = (int)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; + long id = (long)dataGridView_DevList.Rows[rowIndex].Cells[8].Value; - DetailDlg detailDlg = new DetailDlg(); - detailDlg.Controls.Find("label_devModel", true)[0].Text = dataGridView_DevList.Rows[rowIndex].Cells[3].Value.ToString(); + DetailDlg detailDlg = new DetailDlg(id); + detailDlg.Controls.Find("label_devModel", true)[0].Text = dataGridView_DevList.Rows[rowIndex].Cells[3].Value.ToString(); detailDlg.Controls.Find("label_devCode", true)[0].Text = dataGridView_DevList.Rows[rowIndex].Cells[4].Value.ToString(); detailDlg.Controls.Find("label_customerComp", true)[0].Text = dataGridView_DevList.Rows[rowIndex].Cells[9].Value.ToString(); detailDlg.Controls.Find("label_customerName", true)[0].Text = dataGridView_DevList.Rows[rowIndex].Cells[5].Value.ToString();