|
|
@@ -92,6 +92,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ := svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM := svc.GetWaitCountsMonth("187")
|
|
|
numWY := svc.GetWaitCountsYear("187")
|
|
|
+ deviceEQ.TemplateTypeId = 187
|
|
|
deviceEQ.DeviceName = "防雷装置(等电位)"
|
|
|
deviceEQ.DeviceQty = int(numEQ)
|
|
|
deviceEQ.WaitYear = int(numWY)
|
|
|
@@ -112,6 +113,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("286")
|
|
|
numWY = svc.GetWaitCountsYear("286")
|
|
|
+ deviceLPT.TemplateTypeId = 286
|
|
|
deviceLPT.DeviceName = "防雷装置"
|
|
|
deviceLPT.DeviceQty = numEQ
|
|
|
deviceLPT.WaitYear = int(numWY)
|
|
|
@@ -132,6 +134,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("181")
|
|
|
numWY = svc.GetWaitCountsYear("181")
|
|
|
+ deviceLP.TemplateTypeId = 181
|
|
|
deviceLP.DeviceName = "漏电保护器"
|
|
|
deviceLP.DeviceQty = numEQ
|
|
|
deviceLP.WaitYear = int(numWY)
|
|
|
@@ -152,6 +155,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("179")
|
|
|
numWY = svc.GetWaitCountsYear("179")
|
|
|
+ deviceEG.TemplateTypeId = 179
|
|
|
deviceEG.DeviceName = "电气接地"
|
|
|
deviceEG.DeviceQty = numEQ
|
|
|
deviceEG.WaitYear = int(numWY)
|
|
|
@@ -176,6 +180,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ := svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM := svc.GetWaitCountsMonth("156")
|
|
|
numWY := svc.GetWaitCountsYear("156")
|
|
|
+ deviceZHQ.TemplateTypeId = 156
|
|
|
deviceZHQ.DeviceName = "阻火器"
|
|
|
deviceZHQ.DeviceQty = numEQ
|
|
|
deviceZHQ.WaitYear = int(numWY)
|
|
|
@@ -196,6 +201,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("183")
|
|
|
numWY = svc.GetWaitCountsYear("183")
|
|
|
+ deviceHXF.TemplateTypeId = 183
|
|
|
deviceHXF.DeviceName = "呼吸阀"
|
|
|
deviceHXF.DeviceQty = numEQ
|
|
|
deviceHXF.WaitYear = int(numWY)
|
|
|
@@ -216,6 +222,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("154")
|
|
|
numWY = svc.GetWaitCountsYear("154")
|
|
|
+ deviceYYF.TemplateTypeId = 154
|
|
|
deviceYYF.DeviceName = "液压安全阀"
|
|
|
deviceYYF.DeviceQty = numEQ
|
|
|
deviceYYF.WaitYear = int(numWY)
|
|
|
@@ -236,6 +243,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("189")
|
|
|
numWY = svc.GetWaitCountsYear("189")
|
|
|
+ deviceKQPM.TemplateTypeId = 189
|
|
|
deviceKQPM.DeviceName = "空气泡沫产生器"
|
|
|
deviceKQPM.DeviceQty = numEQ
|
|
|
deviceKQPM.WaitYear = int(numWY)
|
|
|
@@ -256,6 +264,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("141")
|
|
|
numWY = svc.GetWaitCountsYear("141")
|
|
|
+ deviceYL.TemplateTypeId = 141
|
|
|
deviceYL.DeviceName = "游梁式抽油机"
|
|
|
deviceYL.DeviceQty = numEQ
|
|
|
deviceYL.WaitYear = int(numWY)
|
|
|
@@ -276,6 +285,7 @@ func (this *DeviceStatisticsController) GetEntityList() {
|
|
|
numEQ = svc.GetCountsByDateEquipment(this.User.AccCode+LimsCheckEquipmentListName, whereN)
|
|
|
numWM = svc.GetWaitCountsMonth("173")
|
|
|
numWY = svc.GetWaitCountsYear("173")
|
|
|
+ deviceWYL.TemplateTypeId = 173
|
|
|
deviceWYL.DeviceName = "无游梁式抽油机"
|
|
|
deviceWYL.DeviceQty = numEQ
|
|
|
deviceWYL.WaitYear = int(numWY)
|
|
|
@@ -346,6 +356,43 @@ func (this *DeviceStatisticsController) GetAuthority() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+// @Title
|
|
|
+// @Description get user by token
|
|
|
+// @Success 200 {object}
|
|
|
+// @router /getdevicetotal [get]
|
|
|
+func (this *DeviceStatisticsController) GetDeviceTotal() {
|
|
|
+ templateTypeId := this.GetString("TemplateTypeId")
|
|
|
+ //unitId := this.GetString("UnitID")
|
|
|
+
|
|
|
+ svc := organize.GetOrganizeService(utils.DBE)
|
|
|
+ svcd := devicestatistics.GetDeviceStatisticsService(utils.DBE)
|
|
|
+
|
|
|
+ ids := svc.GetAllChildById("100000304")
|
|
|
+ where := "TemplateTypeId=" + templateTypeId + " and DepartmentId IN (" + ids + ")"
|
|
|
+ total := svcd.GetDeviceCounts(this.User.AccCode + LimsCheckEquipmentListName, where)
|
|
|
+
|
|
|
+
|
|
|
+ where = "TemplateTypeId=" + templateTypeId + " and DepartmentId IN (" + ids + ")"
|
|
|
+ total = svcd.GetDeviceCounts(this.User.AccCode + LimsCheckEquipmentListName, where)
|
|
|
+
|
|
|
+ where = "TemplateTypeId=" + templateTypeId + " and DepartmentId IN (" + ids + ")"
|
|
|
+ total = svcd.GetDeviceCounts(this.User.AccCode + LimsCheckEquipmentListName, where)
|
|
|
+
|
|
|
+ where = "TemplateTypeId=" + templateTypeId + " and DepartmentId IN (" + ids + ")"
|
|
|
+ total = svcd.GetDeviceCounts(this.User.AccCode + LimsCheckEquipmentListName, where)
|
|
|
+
|
|
|
+ where = "TemplateTypeId=" + templateTypeId + " and DepartmentId IN (" + ids + ")"
|
|
|
+ total = svcd.GetDeviceCounts(this.User.AccCode + LimsCheckEquipmentListName, where)
|
|
|
+
|
|
|
+ where = "TemplateTypeId=" + templateTypeId + " and DepartmentId IN (" + ids + ")"
|
|
|
+ total = svcd.GetDeviceCounts(this.User.AccCode + LimsCheckEquipmentListName, where)
|
|
|
+
|
|
|
+ var datainfo ErrorDataInfo
|
|
|
+ datainfo.Item = total
|
|
|
+ this.Data["json"] = &datainfo
|
|
|
+ this.ServeJSON()
|
|
|
+
|
|
|
+}
|
|
|
|
|
|
//获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。
|
|
|
|