提交代码

dev_xds
姜玉琦 2024-08-09 02:10:46 +08:00
parent 1a292837c9
commit bb0f7c0a49
24 changed files with 438 additions and 20 deletions

View File

@ -24,7 +24,7 @@ spring:
# 国际化资源文件路径 # 国际化资源文件路径
basename: i18n/messages basename: i18n/messages
profiles: profiles:
active: druid active: prod
# 文件上传 # 文件上传
servlet: servlet:
multipart: multipart:

View File

@ -55,7 +55,7 @@ public class RyTask
} }
/** /**
* *
*/ */
public void findDeviceTowerOnline() public void findDeviceTowerOnline()
{ {

View File

@ -101,9 +101,9 @@
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/> <dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="120"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">

View File

@ -124,9 +124,9 @@
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/> <dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="120"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">

View File

@ -112,7 +112,7 @@
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">

View File

@ -259,9 +259,9 @@
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" /> <dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="120"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

View File

@ -237,9 +237,9 @@
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" /> <dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="120"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

View File

@ -111,6 +111,18 @@
<el-table-column label="塔身高度" align="center" prop="towerBodyHeight" /> <el-table-column label="塔身高度" align="center" prop="towerBodyHeight" />
<el-table-column label="塔帽高度" align="center" prop="towerCapHeight" /> <el-table-column label="塔帽高度" align="center" prop="towerCapHeight" />
<el-table-column label="塔节高度" align="center" prop="towerSectionHeight" /> <el-table-column label="塔节高度" align="center" prop="towerSectionHeight" />
<el-table-column label="司机" align="center">
<template slot-scope="scope">
<div>{{scope.row.driName}}</div>
<div>{{scope.row.driPhone}}</div>
</template>
</el-table-column>
<el-table-column label="安全员" align="center">
<template slot-scope="scope">
<div>{{scope.row.safName}}</div>
<div>{{scope.row.safPhone}}</div>
</template>
</el-table-column>
<el-table-column label="塔机状态" align="center" prop="online"> <el-table-column label="塔机状态" align="center" prop="online">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.project_video_signal_state" :value="scope.row.online"/> <dict-tag :options="dict.type.project_video_signal_state" :value="scope.row.online"/>
@ -206,6 +218,18 @@
<el-form-item label="设备序列号" prop="deviceSn"> <el-form-item label="设备序列号" prop="deviceSn">
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" /> <el-input v-model="form.deviceSn" placeholder="请输入设备序列号" />
</el-form-item> </el-form-item>
<el-form-item label="塔机司机" prop="driName">
<el-input v-model="form.driName" placeholder="请输入塔机司机" />
</el-form-item>
<el-form-item label="司机电话" prop="driPhone">
<el-input v-model="form.driPhone" placeholder="请输入司机电话" />
</el-form-item>
<el-form-item label="安全员" prop="safName">
<el-input v-model="form.safName" placeholder="请输入安全员" />
</el-form-item>
<el-form-item label="安全员电话" prop="safPhone">
<el-input v-model="form.safPhone" placeholder="请输入安全员电话" />
</el-form-item>
<el-alert <el-alert
title="温馨提示:" title="温馨提示:"
type="warning" type="warning"
@ -377,6 +401,10 @@ export default {
towerBodyHeight: null, towerBodyHeight: null,
towerCapHeight: null, towerCapHeight: null,
towerSectionHeight: null, towerSectionHeight: null,
driName: null,
driPhone: null,
safName: null,
safPhone: null,
isDel: null, isDel: null,
createBy: null, createBy: null,
createTime: null, createTime: null,

View File

@ -20,7 +20,7 @@ spring:
# 国际化资源文件路径 # 国际化资源文件路径
basename: i18n/messages basename: i18n/messages
profiles: profiles:
active: druid active: prod
# 文件上传 # 文件上传
servlet: servlet:
multipart: multipart:

View File

@ -0,0 +1,103 @@
package com.yanzhu.jh.bigscreen.web.controller;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.PublicStateEnum;
import com.yanzhu.jh.device.domain.DevTowerProjectConfig;
import com.yanzhu.jh.device.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* Controller
*
* @author JiangYuQi
* @date 2024-08-08
*/
@RestController
@RequestMapping("/bgscreen/tower")
public class TowerCraneController extends BaseController {
@Autowired
private RedisCache redisCache;
@Autowired
private IDevTowerDataRunService devTowerDataRunService;
@Autowired
private IDevTowerDataRoundService devTowerDataRoundService;
@Autowired
private IDevTowerDataLimitService devTowerDataLimitService;
@Autowired
private IDevTowerDataLocalService devTowerDataLocalService;
@Autowired
private IDevTowerDataCollideService devTowerDataCollideService;
@Autowired
private IDevTowerProjectConfigService devTowerProjectConfigService;
/**
*
*/
@GetMapping("/findtowerConfigGroupOnline")
public AjaxResult findtowerConfigGroupOnline(String deptId, String projectId)
{
String key = "bgscreen.tower.findtowerConfigGroupOnline."+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
DevTowerProjectConfig devTowerProjectConfig = new DevTowerProjectConfig();
devTowerProjectConfig.setProjectId(Convert.toLong(projectId));
List<Map<String, Object>> list = devTowerProjectConfigService.findtowerConfigGroupOnline(devTowerProjectConfig);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return success(list);
}
/**
*
*/
@GetMapping("/findtowerConfigListByProjectId")
public AjaxResult findtowerConfigListByProjectId(String deptId, String projectId)
{
String key = "bgscreen.tower.findtowerConfigListByProjectId."+projectId;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
DevTowerProjectConfig devTowerProjectConfig = new DevTowerProjectConfig();
devTowerProjectConfig.setProjectId(Convert.toLong(projectId));
devTowerProjectConfig.setIsDel(Convert.toLong(PublicStateEnum.OK.getCode()));
List<DevTowerProjectConfig> list = devTowerProjectConfigService.selectDevTowerProjectConfigList(devTowerProjectConfig);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return success(list);
}
/**
*
*/
@GetMapping("/findtowerStatisticsView")
public AjaxResult findtowerStatisticsView(String deviceSn)
{
String key = "bgscreen.tower.findtowerStatisticsView."+deviceSn;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
Map<String, Object> data = devTowerDataRunService.findtowerStatisticsView(deviceSn);
redisCache.setCacheObject(key, data, Constants.BIGSCREEN_QUERY_CACHE*5, TimeUnit.MINUTES);
return success(data);
}
}

View File

@ -57,9 +57,6 @@ public class TowerCraneApiController {
@Autowired @Autowired
private IDevTowerDataCollideService devTowerDataCollideService; private IDevTowerDataCollideService devTowerDataCollideService;
@Autowired
private IDevTowerDataWarningService devTowerDataWarningService;
@Autowired @Autowired
private IDevTowerProjectConfigService devTowerProjectConfigService; private IDevTowerProjectConfigService devTowerProjectConfigService;
@ -148,6 +145,12 @@ public class TowerCraneApiController {
if(dataContent.get("warnings")!=null){ if(dataContent.get("warnings")!=null){
List<String> warnings = (List<String>)dataContent.get("warnings"); List<String> warnings = (List<String>)dataContent.get("warnings");
devTowerDataRun.setWarnings(String.join(",", warnings)); devTowerDataRun.setWarnings(String.join(",", warnings));
for(String warning:warnings){
Integer alarm = Convert.toInt(warning);
if(alarm>100 && alarm<120){
devTowerDataRun.setIsAlarm(1L);
}
}
} }
devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun); devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
} }
@ -191,6 +194,15 @@ public class TowerCraneApiController {
if(dataContent.get("warning")!=null){ if(dataContent.get("warning")!=null){
List<String> warnings = (List<String>)dataContent.get("warning"); List<String> warnings = (List<String>)dataContent.get("warning");
devTowerDataRound.setWarnings(String.join(",", warnings)); devTowerDataRound.setWarnings(String.join(",", warnings));
for(String warning:warnings){
Integer alarm = Convert.toInt(warning);
if(alarm>6 && alarm<10){
devTowerDataRound.setIsOverload(1L);
}
if(alarm>100 && alarm<120){
devTowerDataRound.setIsAlarm(1L);
}
}
} }
devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound); devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound);
} }

View File

@ -147,6 +147,14 @@ public class DevTowerDataRound extends BaseEntity
@Excel(name = "警报信息") @Excel(name = "警报信息")
private String warnings; private String warnings;
/** 是否告警 */
@Excel(name = "是否告警")
private Long isAlarm;
/** 是否告警 */
@Excel(name = "是否告警")
private Long isOverload;
/** 是否有效 */ /** 是否有效 */
@Excel(name = "是否有效") @Excel(name = "是否有效")
private Long isDel; private Long isDel;
@ -465,6 +473,22 @@ public class DevTowerDataRound extends BaseEntity
this.deptName = deptName; this.deptName = deptName;
} }
public Long getIsAlarm() {
return isAlarm;
}
public void setIsAlarm(Long isAlarm) {
this.isAlarm = isAlarm;
}
public Long getIsOverload() {
return isOverload;
}
public void setIsOverload(Long isOverload) {
this.isOverload = isOverload;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -127,6 +127,10 @@ public class DevTowerDataRun extends BaseEntity
@Excel(name = "时间戳") @Excel(name = "时间戳")
private Long timeLongs; private Long timeLongs;
/** 是否告警 */
@Excel(name = "是否告警")
private Long isAlarm;
/** 是否有效 */ /** 是否有效 */
@Excel(name = "是否有效") @Excel(name = "是否有效")
private Long isDel; private Long isDel;
@ -400,6 +404,14 @@ public class DevTowerDataRun extends BaseEntity
this.deptName = deptName; this.deptName = deptName;
} }
public Long getIsAlarm() {
return isAlarm;
}
public void setIsAlarm(Long isAlarm) {
this.isAlarm = isAlarm;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -36,6 +36,10 @@ public class DevTowerProjectConfig extends BaseEntity
@Excel(name = "设备序列号") @Excel(name = "设备序列号")
private String deviceSn; private String deviceSn;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 设备来源 */ /** 设备来源 */
@Excel(name = "设备来源") @Excel(name = "设备来源")
private String deviceSource; private String deviceSource;
@ -80,6 +84,22 @@ public class DevTowerProjectConfig extends BaseEntity
@Excel(name = "设备状态") @Excel(name = "设备状态")
private String online; private String online;
/** 司机名称 */
@Excel(name = "司机名称")
private String driName;
/** 司机电话 */
@Excel(name = "司机电话")
private String driPhone;
/** 安全员名称 */
@Excel(name = "安全员名称")
private String safName;
/** 安全员电话 */
@Excel(name = "安全员电话")
private String safPhone;
/** 是否有效 */ /** 是否有效 */
@Excel(name = "是否有效") @Excel(name = "是否有效")
private Long isDel; private Long isDel;
@ -120,6 +140,15 @@ public class DevTowerProjectConfig extends BaseEntity
{ {
return deviceSn; return deviceSn;
} }
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public void setDeviceSource(String deviceSource) public void setDeviceSource(String deviceSource)
{ {
this.deviceSource = deviceSource; this.deviceSource = deviceSource;
@ -219,6 +248,38 @@ public class DevTowerProjectConfig extends BaseEntity
this.online = online; this.online = online;
} }
public String getDriName() {
return driName;
}
public void setDriName(String driName) {
this.driName = driName;
}
public String getDriPhone() {
return driPhone;
}
public void setDriPhone(String driPhone) {
this.driPhone = driPhone;
}
public String getSafName() {
return safName;
}
public void setSafName(String safName) {
this.safName = safName;
}
public String getSafPhone() {
return safPhone;
}
public void setSafPhone(String safPhone) {
this.safPhone = safPhone;
}
public void setIsDel(Long isDel) public void setIsDel(Long isDel)
{ {
this.isDel = isDel; this.isDel = isDel;
@ -252,6 +313,7 @@ public class DevTowerProjectConfig extends BaseEntity
.append("projectId", getProjectId()) .append("projectId", getProjectId())
.append("deptId", getDeptId()) .append("deptId", getDeptId())
.append("deviceSn", getDeviceSn()) .append("deviceSn", getDeviceSn())
.append("deviceName", getDeviceName())
.append("deviceSource", getDeviceSource()) .append("deviceSource", getDeviceSource())
.append("towerType", getTowerType()) .append("towerType", getTowerType())
.append("coordinateX", getCoordinateX()) .append("coordinateX", getCoordinateX())
@ -262,6 +324,10 @@ public class DevTowerProjectConfig extends BaseEntity
.append("towerCapHeight", getTowerCapHeight()) .append("towerCapHeight", getTowerCapHeight())
.append("towerSectionHeight", getTowerSectionHeight()) .append("towerSectionHeight", getTowerSectionHeight())
.append("online", getOnline()) .append("online", getOnline())
.append("driName", getDriName())
.append("driPhone", getDriPhone())
.append("safName", getSafName())
.append("safPhone", getSafPhone())
.append("isDel", getIsDel()) .append("isDel", getIsDel())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

View File

@ -58,4 +58,12 @@ public interface DevTowerDataRoundMapper
* @return * @return
*/ */
public int deleteDevTowerDataRoundByIds(Long[] ids); public int deleteDevTowerDataRoundByIds(Long[] ids);
/**
*
*
* @param devTowerDataRound
* @return
*/
public int findRoundCountByDeviceKey(DevTowerDataRound devTowerDataRound);
} }

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.device.mapper; package com.yanzhu.jh.device.mapper;
import java.util.List; import java.util.List;
import com.yanzhu.jh.device.domain.DevTowerDataRound;
import com.yanzhu.jh.device.domain.DevTowerDataRun; import com.yanzhu.jh.device.domain.DevTowerDataRun;
/** /**
@ -58,4 +60,12 @@ public interface DevTowerDataRunMapper
* @return * @return
*/ */
public int deleteDevTowerDataRunByIds(Long[] ids); public int deleteDevTowerDataRunByIds(Long[] ids);
/**
*
*
* @param DevTowerDataRound
* @return
*/
public int findRunCountByDeviceKey(DevTowerDataRound DevTowerDataRound);
} }

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.device.mapper; package com.yanzhu.jh.device.mapper;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.jh.device.domain.DevTowerProjectConfig; import com.yanzhu.jh.device.domain.DevTowerProjectConfig;
/** /**
@ -58,4 +60,11 @@ public interface DevTowerProjectConfigMapper
* @return * @return
*/ */
public int deleteDevTowerProjectConfigByIds(Long[] ids); public int deleteDevTowerProjectConfigByIds(Long[] ids);
/**
*
* @param devTowerProjectConfig
* @return
*/
public List<Map<String, Object>> findtowerConfigGroupOnline(DevTowerProjectConfig devTowerProjectConfig);
} }

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.device.service; package com.yanzhu.jh.device.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.jh.device.domain.DevTowerDataRun; import com.yanzhu.jh.device.domain.DevTowerDataRun;
/** /**
@ -58,4 +60,10 @@ public interface IDevTowerDataRunService
* @return * @return
*/ */
public int deleteDevTowerDataRunById(Long id); public int deleteDevTowerDataRunById(Long id);
/**
*
* @return
*/
public Map<String, Object> findtowerStatisticsView(String deviceSn);
} }

View File

@ -1,6 +1,8 @@
package com.yanzhu.jh.device.service; package com.yanzhu.jh.device.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.jh.device.domain.DevTowerProjectConfig; import com.yanzhu.jh.device.domain.DevTowerProjectConfig;
/** /**
@ -71,4 +73,11 @@ public interface IDevTowerProjectConfigService
* @return * @return
*/ */
public int deleteDevTowerProjectConfigById(Long id); public int deleteDevTowerProjectConfigById(Long id);
/**
*
* @param devTowerProjectConfig
* @return
*/
public List<Map<String, Object>> findtowerConfigGroupOnline(DevTowerProjectConfig devTowerProjectConfig);
} }

View File

@ -1,7 +1,11 @@
package com.yanzhu.jh.device.service.impl; package com.yanzhu.jh.device.service.impl;
import java.util.List; import java.text.SimpleDateFormat;
import java.util.*;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.yanzhu.jh.device.domain.DevTowerDataRound;
import com.yanzhu.jh.device.mapper.DevTowerDataRoundMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yanzhu.jh.device.mapper.DevTowerDataRunMapper; import com.yanzhu.jh.device.mapper.DevTowerDataRunMapper;
@ -20,6 +24,9 @@ public class DevTowerDataRunServiceImpl implements IDevTowerDataRunService
@Autowired @Autowired
private DevTowerDataRunMapper devTowerDataRunMapper; private DevTowerDataRunMapper devTowerDataRunMapper;
@Autowired
private DevTowerDataRoundMapper devTowerDataRoundMapper;
/** /**
* *
* *
@ -95,4 +102,55 @@ public class DevTowerDataRunServiceImpl implements IDevTowerDataRunService
{ {
return devTowerDataRunMapper.deleteDevTowerDataRunById(id); return devTowerDataRunMapper.deleteDevTowerDataRunById(id);
} }
/**
*
* @return
*/
@Override
public Map<String, Object> findtowerStatisticsView(String deviceSn){
Map<String, Object> dataMap = new HashMap<>();
DevTowerDataRound devTowerDataRound = new DevTowerDataRound();
devTowerDataRound.setDeviceKey(deviceSn);
int a0 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
dataMap.put("a0",a0);
devTowerDataRound.setActiveName("cz");
int b0 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
dataMap.put("b0",b0);
devTowerDataRound.setActiveName("gj");
int c0 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
int d0 = devTowerDataRunMapper.findRunCountByDeviceKey(devTowerDataRound);
dataMap.put("c0",c0+d0);
Calendar cale = Calendar.getInstance();
// 获取当月第一天和最后一天
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// 第一天
String firstDay = "";
cale = Calendar.getInstance();
cale.add(Calendar.MONTH, 0);
cale.set(Calendar.DAY_OF_MONTH, 1);
firstDay = format.format(cale.getTime());
// 最后一天
String lastDay = "";
cale = Calendar.getInstance();
cale.add(Calendar.MONTH, 1);
cale.set(Calendar.DAY_OF_MONTH, 0);
lastDay = format.format(cale.getTime());
Map<String, Object> params = new HashMap<>();
params.put("beginCreateTime",firstDay);
params.put("endCreateTime",lastDay);
devTowerDataRound.setParams(params);
int a1 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
dataMap.put("a1",a1);
devTowerDataRound.setActiveName("cz");
int b1 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
dataMap.put("b1",b1);
devTowerDataRound.setActiveName("gj");
int c1 = devTowerDataRoundMapper.findRoundCountByDeviceKey(devTowerDataRound);
int d1 = devTowerDataRunMapper.findRunCountByDeviceKey(devTowerDataRound);
dataMap.put("c1",c1+d1);
return dataMap;
}
} }

View File

@ -2,6 +2,7 @@ package com.yanzhu.jh.device.service.impl;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map;
import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
@ -157,4 +158,13 @@ public class DevTowerProjectConfigServiceImpl implements IDevTowerProjectConfigS
this.loadingDevTowerProjectConfigCache(); this.loadingDevTowerProjectConfigCache();
return res; return res;
} }
/**
*
* @param devTowerProjectConfig
* @return
*/
public List<Map<String, Object>> findtowerConfigGroupOnline(DevTowerProjectConfig devTowerProjectConfig){
return devTowerProjectConfigMapper.findtowerConfigGroupOnline(devTowerProjectConfig);
}
} }

View File

@ -39,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="startLeanAngleY" column="start_lean_angle_y" /> <result property="startLeanAngleY" column="start_lean_angle_y" />
<result property="endLeanAngleY" column="end_lean_angle_y" /> <result property="endLeanAngleY" column="end_lean_angle_y" />
<result property="warnings" column="warnings" /> <result property="warnings" column="warnings" />
<result property="isAlarm" column="is_alarm" />
<result property="isOverload" column="is_overload" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -48,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDevTowerDataRoundVo"> <sql id="selectDevTowerDataRoundVo">
select dtdr.id, dtdr.cfg_id, dtdr.project_id, dtdr.dept_id, sp.projectName, sd.dept_name, dtdr.device_key, dtdr.device_source, dtdr.tower_id, dtdr.work_start_time, dtdr.work_end_time, dtdr.min_height, dtdr.max_height, dtdr.min_range, dtdr.max_range, dtdr.start_height, dtdr.end_height, dtdr.start_range, dtdr.end_range, dtdr.start_rotation, dtdr.end_rotation, dtdr.max_load, dtdr.max_load_percent, dtdr.max_moment, dtdr.max_moment_percent, dtdr.start_wind_speed, dtdr.end_wind_speed, dtdr.start_wind_speed_percent, dtdr.end_wind_speed_percent, dtdr.start_lean_angle_x, dtdr.end_lean_angle_x, dtdr.start_lean_angle_y, dtdr.end_lean_angle_y, dtdr.warnings, dtdr.is_del, dtdr.create_by, dtdr.create_time, dtdr.update_by, dtdr.update_time, dtdr.remark from dev_tower_data_round dtdr select dtdr.id, dtdr.cfg_id, dtdr.project_id, dtdr.dept_id, sp.projectName, sd.dept_name, dtdr.device_key, dtdr.device_source, dtdr.tower_id, dtdr.work_start_time, dtdr.work_end_time, dtdr.min_height, dtdr.max_height, dtdr.min_range, dtdr.max_range, dtdr.start_height, dtdr.end_height, dtdr.start_range, dtdr.end_range, dtdr.start_rotation, dtdr.end_rotation, dtdr.max_load, dtdr.max_load_percent, dtdr.max_moment, dtdr.max_moment_percent, dtdr.start_wind_speed, dtdr.end_wind_speed, dtdr.start_wind_speed_percent, dtdr.end_wind_speed_percent, dtdr.start_lean_angle_x, dtdr.end_lean_angle_x, dtdr.start_lean_angle_y, dtdr.end_lean_angle_y, dtdr.warnings, dtdr.is_alarm, dtdr.is_del, dtdr.create_by, dtdr.create_time, dtdr.update_by, dtdr.update_time, dtdr.remark from dev_tower_data_round dtdr
left join sur_project sp on sp.id = dtdr.project_id left join sur_project sp on sp.id = dtdr.project_id
left join sys_dept sd on sd.dept_id = dtdr.dept_id left join sys_dept sd on sd.dept_id = dtdr.dept_id
</sql> </sql>
@ -108,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startLeanAngleY != null">start_lean_angle_y,</if> <if test="startLeanAngleY != null">start_lean_angle_y,</if>
<if test="endLeanAngleY != null">end_lean_angle_y,</if> <if test="endLeanAngleY != null">end_lean_angle_y,</if>
<if test="warnings != null">warnings,</if> <if test="warnings != null">warnings,</if>
<if test="isAlarm != null">is_alarm,</if>
<if test="isOverload != null">is_overload,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -147,6 +151,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startLeanAngleY != null">#{startLeanAngleY},</if> <if test="startLeanAngleY != null">#{startLeanAngleY},</if>
<if test="endLeanAngleY != null">#{endLeanAngleY},</if> <if test="endLeanAngleY != null">#{endLeanAngleY},</if>
<if test="warnings != null">#{warnings},</if> <if test="warnings != null">#{warnings},</if>
<if test="isAlarm != null">#{isAlarm},</if>
<if test="isOverload != null">#{isOverload},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -190,6 +196,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startLeanAngleY != null">start_lean_angle_y = #{startLeanAngleY},</if> <if test="startLeanAngleY != null">start_lean_angle_y = #{startLeanAngleY},</if>
<if test="endLeanAngleY != null">end_lean_angle_y = #{endLeanAngleY},</if> <if test="endLeanAngleY != null">end_lean_angle_y = #{endLeanAngleY},</if>
<if test="warnings != null">warnings = #{warnings},</if> <if test="warnings != null">warnings = #{warnings},</if>
<if test="isAlarm != null">is_alarm = #{isAlarm},</if>
<if test="isOverload != null">is_overload = #{isOverload},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
@ -210,4 +218,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="findRoundCountByDeviceKey" parameterType="DevTowerDataRound" resultType="Int">
select count(1) as total from dev_tower_data_round
<where>
<if test="deviceKey != null and deviceKey != ''">and cfg_id = (select dc.id from dev_tower_project_config dc where dc.device_sn=#{deviceKey}) and device_key = #{deviceKey}</if>
<if test='activeName == "cz"'> and is_overload = 1 </if>
<if test='activeName == "gj"'> and is_alarm = 1 </if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
</mapper> </mapper>

View File

@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="heightSensorState" column="height_sensor_state" /> <result property="heightSensorState" column="height_sensor_state" />
<result property="brakingStatus" column="braking_status" /> <result property="brakingStatus" column="braking_status" />
<result property="timeLongs" column="time_longs" /> <result property="timeLongs" column="time_longs" />
<result property="isAlarm" column="is_alarm" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -43,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDevTowerDataRunVo"> <sql id="selectDevTowerDataRunVo">
select dtdr.id, dtdr.cfg_id, dtdr.project_id, dtdr.dept_id, sp.projectName, sd.dept_name, dtdr.device_key, dtdr.device_source, dtdr.height, dtdr.range, dtdr.rotation, dtdr.load, dtdr.wind_speed, dtdr.lean_angle_x, dtdr.lean_angle_y, dtdr.load_percent, dtdr.moment_percent, dtdr.wind_speed_percent, dtdr.lean_angle_percent, dtdr.warnings, dtdr.rate, dtdr.rotation_sensor_state, dtdr.load_sensor_state, dtdr.wind_speed_sensor_state, dtdr.lean_angle_sensor_state, dtdr.range_sensor_state, dtdr.height_sensor_state, dtdr.braking_status, dtdr.time_longs, dtdr.is_del, dtdr.create_by, dtdr.create_time, dtdr.update_by, dtdr.update_time, dtdr.remark from dev_tower_data_run dtdr select dtdr.id, dtdr.cfg_id, dtdr.project_id, dtdr.dept_id, sp.projectName, sd.dept_name, dtdr.device_key, dtdr.device_source, dtdr.height, dtdr.range, dtdr.rotation, dtdr.load, dtdr.wind_speed, dtdr.lean_angle_x, dtdr.lean_angle_y, dtdr.load_percent, dtdr.moment_percent, dtdr.wind_speed_percent, dtdr.lean_angle_percent, dtdr.warnings, dtdr.rate, dtdr.rotation_sensor_state, dtdr.load_sensor_state, dtdr.wind_speed_sensor_state, dtdr.lean_angle_sensor_state, dtdr.range_sensor_state, dtdr.height_sensor_state, dtdr.braking_status, dtdr.time_longs, dtdr.is_alarm, dtdr.is_del, dtdr.create_by, dtdr.create_time, dtdr.update_by, dtdr.update_time, dtdr.remark from dev_tower_data_run dtdr
left join sur_project sp on sp.id = dtdr.project_id left join sur_project sp on sp.id = dtdr.project_id
left join sys_dept sd on sd.dept_id = dtdr.dept_id left join sys_dept sd on sd.dept_id = dtdr.dept_id
</sql> </sql>
@ -97,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="heightSensorState != null">height_sensor_state,</if> <if test="heightSensorState != null">height_sensor_state,</if>
<if test="brakingStatus != null">braking_status,</if> <if test="brakingStatus != null">braking_status,</if>
<if test="timeLongs != null">time_longs,</if> <if test="timeLongs != null">time_longs,</if>
<if test="isAlarm != null">is_alarm,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -131,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="heightSensorState != null">#{heightSensorState},</if> <if test="heightSensorState != null">#{heightSensorState},</if>
<if test="brakingStatus != null">#{brakingStatus},</if> <if test="brakingStatus != null">#{brakingStatus},</if>
<if test="timeLongs != null">#{timeLongs},</if> <if test="timeLongs != null">#{timeLongs},</if>
<if test="isAlarm != null">#{isAlarm},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -169,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="heightSensorState != null">height_sensor_state = #{heightSensorState},</if> <if test="heightSensorState != null">height_sensor_state = #{heightSensorState},</if>
<if test="brakingStatus != null">braking_status = #{brakingStatus},</if> <if test="brakingStatus != null">braking_status = #{brakingStatus},</if>
<if test="timeLongs != null">time_longs = #{timeLongs},</if> <if test="timeLongs != null">time_longs = #{timeLongs},</if>
<if test="isAlarm != null">is_alarm = #{isAlarm},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
@ -189,4 +193,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="findRunCountByDeviceKey" parameterType="DevTowerDataRound" resultType="Int">
select count(1) as total from dev_tower_data_run
<where>
<if test="deviceKey != null and deviceKey != ''">and cfg_id = (select dc.id from dev_tower_project_config dc where dc.device_sn=#{deviceKey}) and device_key = #{deviceKey}</if>
<if test='activeName == "gj"'> and is_alarm = 1 </if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and date(create_time) between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
</select>
</mapper> </mapper>

View File

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
<result property="deviceSn" column="device_sn" /> <result property="deviceSn" column="device_sn" />
<result property="deviceName" column="device_name" />
<result property="deviceSource" column="device_source" /> <result property="deviceSource" column="device_source" />
<result property="towerId" column="tower_id" /> <result property="towerId" column="tower_id" />
<result property="towerType" column="tower_type" /> <result property="towerType" column="tower_type" />
@ -22,6 +23,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="towerCapHeight" column="tower_cap_height" /> <result property="towerCapHeight" column="tower_cap_height" />
<result property="towerSectionHeight" column="tower_section_height" /> <result property="towerSectionHeight" column="tower_section_height" />
<result property="online" column="online" /> <result property="online" column="online" />
<result property="driName" column="dri_name" />
<result property="driPhone" column="dri_phone" />
<result property="safName" column="saf_name" />
<result property="safPhone" column="saf_phone" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -31,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDevTowerProjectConfigVo"> <sql id="selectDevTowerProjectConfigVo">
select dtpc.id, dtpc.project_id, dtpc.dept_id, sp.projectName, sd.dept_name, dtpc.device_sn, dtpc.device_source, dtpc.tower_id, dtpc.tower_type, dtpc.coordinate_x, dtpc.coordinate_y, dtpc.front_brachium, dtpc.after_brachium, dtpc.tower_body_height, dtpc.tower_cap_height, dtpc.tower_section_height, dtpc.online, dtpc.is_del, dtpc.create_by, dtpc.create_time, dtpc.update_by, dtpc.update_time, dtpc.remark from dev_tower_project_config dtpc select dtpc.id, dtpc.project_id, dtpc.dept_id, sp.projectName, sd.dept_name, dtpc.device_sn, dtpc.device_name, dtpc.device_source, dtpc.tower_id, dtpc.tower_type, dtpc.coordinate_x, dtpc.coordinate_y, dtpc.front_brachium, dtpc.after_brachium, dtpc.tower_body_height, dtpc.tower_cap_height, dtpc.tower_section_height, dtpc.online, dtpc.dri_name, dtpc.dri_phone, dtpc.saf_name, dtpc.saf_phone, dtpc.is_del, dtpc.create_by, dtpc.create_time, dtpc.update_by, dtpc.update_time, dtpc.remark from dev_tower_project_config dtpc
left join sur_project sp on sp.id = dtpc.project_id left join sur_project sp on sp.id = dtpc.project_id
left join sys_dept sd on sd.dept_id = dtpc.dept_id left join sys_dept sd on sd.dept_id = dtpc.dept_id
</sql> </sql>
@ -44,9 +49,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null "> and dtpc.dept_id = #{deptId}</if> <if test="deptId != null "> and dtpc.dept_id = #{deptId}</if>
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if> <if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
<if test="deviceSn != null and deviceSn != ''"> and dtpc.device_sn = #{deviceSn}</if> <if test="deviceSn != null and deviceSn != ''"> and dtpc.device_sn = #{deviceSn}</if>
<if test="deviceName != null and deviceName != ''"> and dtpc.device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceSource != null and deviceSource != ''"> and dtpc.device_source = #{deviceSource}</if> <if test="deviceSource != null and deviceSource != ''"> and dtpc.device_source = #{deviceSource}</if>
<if test="towerId != null and towerId != ''"> and dtpc.tower_id = #{towerId}</if> <if test="towerId != null and towerId != ''"> and dtpc.tower_id = #{towerId}</if>
<if test="towerType != null and towerType != ''"> and dtpc.tower_type = #{towerType}</if> <if test="towerType != null and towerType != ''"> and dtpc.tower_type = #{towerType}</if>
<if test="isDel != null "> and dtpc.is_del = #{isDel}</if>
</where> </where>
order by dtpc.id desc order by dtpc.id desc
</select> </select>
@ -62,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null">project_id,</if> <if test="projectId != null">project_id,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="deviceSn != null">device_sn,</if> <if test="deviceSn != null">device_sn,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceSource != null">device_source,</if> <if test="deviceSource != null">device_source,</if>
<if test="towerType != null">tower_type,</if> <if test="towerType != null">tower_type,</if>
<if test="towerId != null">tower_id,</if> <if test="towerId != null">tower_id,</if>
@ -73,6 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="towerCapHeight != null">tower_cap_height,</if> <if test="towerCapHeight != null">tower_cap_height,</if>
<if test="towerSectionHeight != null">tower_section_height,</if> <if test="towerSectionHeight != null">tower_section_height,</if>
<if test="online != null">online,</if> <if test="online != null">online,</if>
<if test="driName != null">dri_name,</if>
<if test="driPhone != null">dri_phone,</if>
<if test="safName != null">saf_name,</if>
<if test="safPhone != null">saf_phone,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -84,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null">#{projectId},</if> <if test="projectId != null">#{projectId},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="deviceSn != null">#{deviceSn},</if> <if test="deviceSn != null">#{deviceSn},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceSource != null">#{deviceSource},</if> <if test="deviceSource != null">#{deviceSource},</if>
<if test="towerType != null">#{towerType},</if> <if test="towerType != null">#{towerType},</if>
<if test="towerId != null">#{towerId},</if> <if test="towerId != null">#{towerId},</if>
@ -95,6 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="towerCapHeight != null">#{towerCapHeight},</if> <if test="towerCapHeight != null">#{towerCapHeight},</if>
<if test="towerSectionHeight != null">#{towerSectionHeight},</if> <if test="towerSectionHeight != null">#{towerSectionHeight},</if>
<if test="online != null">#{online},</if> <if test="online != null">#{online},</if>
<if test="driName != null">#{driName},</if>
<if test="driPhone != null">#{driPhone},</if>
<if test="safName != null">#{safName},</if>
<if test="safPhone != null">#{safPhone},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -110,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null">project_id = #{projectId},</if> <if test="projectId != null">project_id = #{projectId},</if>
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="deviceSn != null">device_sn = #{deviceSn},</if> <if test="deviceSn != null">device_sn = #{deviceSn},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceSource != null">device_source = #{deviceSource},</if> <if test="deviceSource != null">device_source = #{deviceSource},</if>
<if test="towerType != null">tower_type = #{towerType},</if> <if test="towerType != null">tower_type = #{towerType},</if>
<if test="towerId != null">tower_id = #{towerId},</if> <if test="towerId != null">tower_id = #{towerId},</if>
@ -141,4 +159,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id} #{id}
</foreach> </foreach>
</update> </update>
<select id="findtowerConfigGroupOnline" parameterType="DevTowerProjectConfig" resultType="Map">
select online, count(1) as total from dev_tower_project_config
<where>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
</where>
group by online
</select>
</mapper> </mapper>