数据大屏
This commit is contained in:
parent
9aea0db301
commit
7eb8986695
|
@ -25,7 +25,7 @@ public class DeviceClearLogJob implements Job {
|
||||||
DeviceClearLog deviceClearLog = new DeviceClearLog();
|
DeviceClearLog deviceClearLog = new DeviceClearLog();
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
deviceClearLog.setEndedAt(c.getTime());
|
deviceClearLog.setEndedAt(c.getTime());
|
||||||
c.add(Calendar.HOUR_OF_DAY,-1);
|
c.add(Calendar.DAY_OF_MONTH,-1);
|
||||||
deviceClearLog.setStartedAt(c.getTime());
|
deviceClearLog.setStartedAt(c.getTime());
|
||||||
clearService.monitorDeviceClearLog(deviceClearLog);
|
clearService.monitorDeviceClearLog(deviceClearLog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import java.util.List;
|
||||||
public interface DeviceInfoMapper extends BaseMapper<DeviceInfo> {
|
public interface DeviceInfoMapper extends BaseMapper<DeviceInfo> {
|
||||||
int insert(DeviceInfo deviceInfo);
|
int insert(DeviceInfo deviceInfo);
|
||||||
int update(DeviceInfo deviceInfo);
|
int update(DeviceInfo deviceInfo);
|
||||||
|
int deleteAll();
|
||||||
List<DeviceInfo> getDeviceInfoList(DeviceInfo deviceInfo);
|
List<DeviceInfo> getDeviceInfoList(DeviceInfo deviceInfo);
|
||||||
DeviceInfo getDeviceInfo(DeviceInfo deviceInfo);
|
DeviceInfo getDeviceInfo(DeviceInfo deviceInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
overflow_box_num,
|
overflow_box_num,
|
||||||
in_warehouse,
|
in_warehouse,
|
||||||
housingestate_id,
|
housingestate_id,
|
||||||
create_time
|
create_time,
|
||||||
|
del_flag
|
||||||
)
|
)
|
||||||
values(
|
values(
|
||||||
#{deviceId},
|
#{deviceId},
|
||||||
|
@ -27,7 +28,8 @@
|
||||||
#{overflowBoxNum},
|
#{overflowBoxNum},
|
||||||
#{inWarehouse},
|
#{inWarehouse},
|
||||||
#{housingestateId},
|
#{housingestateId},
|
||||||
now()
|
now(),
|
||||||
|
'0'
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -42,10 +44,16 @@
|
||||||
overflow_box_num = #{overflowBoxNum},
|
overflow_box_num = #{overflowBoxNum},
|
||||||
in_warehouse = #{inWarehouse},
|
in_warehouse = #{inWarehouse},
|
||||||
housingestate_id = #{housingestateId},
|
housingestate_id = #{housingestateId},
|
||||||
update_time = now()
|
update_time = now(),
|
||||||
|
del_flag = '0'
|
||||||
where device_id = #{deviceId}
|
where device_id = #{deviceId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteAll" parameterType="org.jeecg.modules.zh.monitor.entity.DeviceInfo">
|
||||||
|
update bl_device_info
|
||||||
|
set del_flag = '1'
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getDeviceInfoList" resultType="org.jeecg.modules.zh.monitor.entity.DeviceInfo" >
|
<select id="getDeviceInfoList" resultType="org.jeecg.modules.zh.monitor.entity.DeviceInfo" >
|
||||||
select
|
select
|
||||||
id,
|
id,
|
||||||
|
@ -60,6 +68,7 @@
|
||||||
in_warehouse as inWarehouse,
|
in_warehouse as inWarehouse,
|
||||||
housingestate_id as housingestateId
|
housingestate_id as housingestateId
|
||||||
from bl_device_info
|
from bl_device_info
|
||||||
|
where del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeviceInfo" resultType="org.jeecg.modules.zh.monitor.entity.DeviceInfo" >
|
<select id="getDeviceInfo" resultType="org.jeecg.modules.zh.monitor.entity.DeviceInfo" >
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class DeviceInfoServiceImpl extends JeecgServiceImpl<DeviceInfoMapper, De
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<?> monitorAllDeviceInfos(DeviceInfo deviceInfo){
|
public Result<?> monitorAllDeviceInfos(DeviceInfo deviceInfo){
|
||||||
|
baseMapper.deleteAll();
|
||||||
Map<String, Object> params = getParmas(1,50);
|
Map<String, Object> params = getParmas(1,50);
|
||||||
String url = ApiEnum.GET_DEVICE_INFO.getValue();
|
String url = ApiEnum.GET_DEVICE_INFO.getValue();
|
||||||
String errorMsg = postUrl(url,params);
|
String errorMsg = postUrl(url,params);
|
||||||
|
|
|
@ -55,8 +55,8 @@ public class ZhHomeController {
|
||||||
* 小区投递
|
* 小区投递
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/getXqtd", method = RequestMethod.GET)
|
@RequestMapping(value = "/getXqtd", method = RequestMethod.GET)
|
||||||
public Result getXqtd() {
|
public Result getXqtd(ZhHome zhHome) {
|
||||||
List<ZhHome> list = service.getXqtd();
|
List<ZhHome> list = service.getXqtd(zhHome);
|
||||||
return Result.ok(list);
|
return Result.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ public class ZhHomeController {
|
||||||
* 设备投递
|
* 设备投递
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/getSbtd", method = RequestMethod.GET)
|
@RequestMapping(value = "/getSbtd", method = RequestMethod.GET)
|
||||||
public Result getSbtd() {
|
public Result getSbtd(ZhHome zhHome) {
|
||||||
List<ZhHome> list = service.getSbtd();
|
List<ZhHome> list = service.getSbtd(zhHome);
|
||||||
return Result.ok(list);
|
return Result.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,8 +73,17 @@ public class ZhHomeController {
|
||||||
* 会员投递
|
* 会员投递
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/getHytd", method = RequestMethod.GET)
|
@RequestMapping(value = "/getHytd", method = RequestMethod.GET)
|
||||||
public Result getHytd() {
|
public Result getHytd(ZhHome zhHome) {
|
||||||
List<ZhHome> list = service.getHytd();
|
List<ZhHome> list = service.getHytd(zhHome);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区清运
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/getXqqy", method = RequestMethod.GET)
|
||||||
|
public Result getXqqy(ZhHome zhHome) {
|
||||||
|
List<ZhHome> list = service.getXqqy(zhHome);
|
||||||
return Result.ok(list);
|
return Result.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,10 @@ public interface ZhHomeMapper extends BaseMapper<ZhHome>{
|
||||||
ZhHome getHyrs(ZhHome zhHome);
|
ZhHome getHyrs(ZhHome zhHome);
|
||||||
|
|
||||||
List<ZhHome> getOrderTypeCn();
|
List<ZhHome> getOrderTypeCn();
|
||||||
List<ZhHome> getXqtd();
|
List<ZhHome> getXqtd(ZhHome zhHome);
|
||||||
List<ZhHome> getSbtd();
|
List<ZhHome> getSbtd(ZhHome zhHome);
|
||||||
List<ZhHome> getHytd();
|
List<ZhHome> getHytd(ZhHome zhHome);
|
||||||
|
List<ZhHome> getXqqy(ZhHome zhHome);
|
||||||
IPage<ZhHome> getSstd(Page<ZhHome> page, @Param("params")ZhHome zhHome);
|
IPage<ZhHome> getSstd(Page<ZhHome> page, @Param("params")ZhHome zhHome);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
sum(case when is_online = 'true' then 1 else 0 end) as zxsbsA,
|
sum(case when is_online = 'true' then 1 else 0 end) as zxsbsA,
|
||||||
sum(case when is_online = 'false' then 1 else 0 end) as lxsbsA
|
sum(case when is_online = 'false' then 1 else 0 end) as lxsbsA
|
||||||
from bl_device_info
|
from bl_device_info
|
||||||
|
where del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTd" parameterType="org.jeecg.modules.zh.view.home.entity.ZhHome" resultType="org.jeecg.modules.zh.view.home.entity.ZhHome">
|
<select id="getTd" parameterType="org.jeecg.modules.zh.view.home.entity.ZhHome" resultType="org.jeecg.modules.zh.view.home.entity.ZhHome">
|
||||||
|
@ -85,6 +86,14 @@
|
||||||
count(a.id) as cn
|
count(a.id) as cn
|
||||||
from bl_order_info a
|
from bl_order_info a
|
||||||
inner join bl_housingestate_info b on a.housingestate_id = b.housingestate_id
|
inner join bl_housingestate_info b on a.housingestate_id = b.housingestate_id
|
||||||
|
<where>
|
||||||
|
<if test="beginTime != null and beginTime !=''">
|
||||||
|
and a.add_time >= #{beginTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime !=''">
|
||||||
|
and a.add_time <= #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
group by a.housingestate_id,b.name
|
group by a.housingestate_id,b.name
|
||||||
order by weight desc
|
order by weight desc
|
||||||
limit 10
|
limit 10
|
||||||
|
@ -101,6 +110,14 @@
|
||||||
from bl_order_info a
|
from bl_order_info a
|
||||||
inner join bl_housingestate_info b on a.housingestate_id = b.housingestate_id
|
inner join bl_housingestate_info b on a.housingestate_id = b.housingestate_id
|
||||||
inner join bl_device_info c on a.imei = c.imei
|
inner join bl_device_info c on a.imei = c.imei
|
||||||
|
<where>
|
||||||
|
<if test="beginTime != null and beginTime !=''">
|
||||||
|
and a.add_time >= #{beginTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime !=''">
|
||||||
|
and a.add_time <= #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
group by a.housingestate_id,b.name,a.imei,c.content
|
group by a.housingestate_id,b.name,a.imei,c.content
|
||||||
order by weight desc
|
order by weight desc
|
||||||
limit 10
|
limit 10
|
||||||
|
@ -112,11 +129,39 @@
|
||||||
round(sum(a.weight),2) as weight,
|
round(sum(a.weight),2) as weight,
|
||||||
count(a.id) as cn
|
count(a.id) as cn
|
||||||
from bl_order_info a
|
from bl_order_info a
|
||||||
|
<where>
|
||||||
|
<if test="beginTime != null and beginTime !=''">
|
||||||
|
and a.add_time >= #{beginTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime !=''">
|
||||||
|
and a.add_time <= #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
group by phone
|
group by phone
|
||||||
order by weight desc
|
order by weight desc
|
||||||
limit 10
|
limit 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getXqqy" parameterType="org.jeecg.modules.zh.view.home.entity.ZhHome" resultType="org.jeecg.modules.zh.view.home.entity.ZhHome">
|
||||||
|
select
|
||||||
|
a.housing_id as housingestateId,
|
||||||
|
b.name as housingestateName,
|
||||||
|
round(sum(a.this_weight)/-1000,2) as weight,
|
||||||
|
count(a.id) as cn
|
||||||
|
from bl_device_clear_log a
|
||||||
|
inner join bl_housingestate_info b on a.housing_id = b.housingestate_id
|
||||||
|
where a.status = '1'
|
||||||
|
<if test="beginTime != null and beginTime !=''">
|
||||||
|
and a.start_time >= #{beginTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime !=''">
|
||||||
|
and a.start_time <= #{endTime}
|
||||||
|
</if>
|
||||||
|
group by a.housing_id,b.name
|
||||||
|
order by weight desc
|
||||||
|
limit 10
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getSstd" parameterType="org.jeecg.modules.zh.view.home.entity.ZhHome" resultType="org.jeecg.modules.zh.view.home.entity.ZhHome">
|
<select id="getSstd" parameterType="org.jeecg.modules.zh.view.home.entity.ZhHome" resultType="org.jeecg.modules.zh.view.home.entity.ZhHome">
|
||||||
select
|
select
|
||||||
a.phone,
|
a.phone,
|
||||||
|
|
|
@ -18,8 +18,9 @@ public interface IZhHomeService extends IService<ZhHome> {
|
||||||
|
|
||||||
List<ZhHome> getOrderTypeCn();
|
List<ZhHome> getOrderTypeCn();
|
||||||
|
|
||||||
List<ZhHome> getXqtd();
|
List<ZhHome> getXqtd(ZhHome zhHome);
|
||||||
List<ZhHome> getSbtd();
|
List<ZhHome> getSbtd(ZhHome zhHome);
|
||||||
List<ZhHome> getHytd();
|
List<ZhHome> getHytd(ZhHome zhHome);
|
||||||
|
List<ZhHome> getXqqy(ZhHome zhHome);
|
||||||
IPage<ZhHome> getSstd(Page<ZhHome> page, ZhHome zhHome);
|
IPage<ZhHome> getSstd(Page<ZhHome> page, ZhHome zhHome);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ZhHomeServiceImpl extends ServiceImpl<ZhHomeMapper, ZhHome> impleme
|
||||||
ZhHome sbsA = baseMapper.getSbsA();
|
ZhHome sbsA = baseMapper.getSbsA();
|
||||||
zhHome.setSbsA(sbsA.getSbsA());
|
zhHome.setSbsA(sbsA.getSbsA());
|
||||||
zhHome.setZxsbsA(sbsA.getZxsbsA());
|
zhHome.setZxsbsA(sbsA.getZxsbsA());
|
||||||
zhHome.setLxsbsA(sbsA.getZxsbsA());
|
zhHome.setLxsbsA(sbsA.getLxsbsA());
|
||||||
return zhHome;
|
return zhHome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,24 +162,32 @@ public class ZhHomeServiceImpl extends ServiceImpl<ZhHomeMapper, ZhHome> impleme
|
||||||
* 小区投递
|
* 小区投递
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ZhHome> getXqtd(){
|
public List<ZhHome> getXqtd(ZhHome zhHome){
|
||||||
return baseMapper.getXqtd();
|
return baseMapper.getXqtd(zhHome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备投递
|
* 设备投递
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ZhHome> getSbtd(){
|
public List<ZhHome> getSbtd(ZhHome zhHome){
|
||||||
return baseMapper.getSbtd();
|
return baseMapper.getSbtd(zhHome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会员投递
|
* 会员投递
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ZhHome> getHytd(){
|
public List<ZhHome> getHytd(ZhHome zhHome){
|
||||||
return baseMapper.getHytd();
|
return baseMapper.getHytd(zhHome);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区清运
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ZhHome> getXqqy(ZhHome zhHome){
|
||||||
|
return baseMapper.getXqqy(zhHome);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,20 +17,19 @@
|
||||||
(select count(*) from bl_order_info b where a.imei = b.imei) as tdcsCount
|
(select count(*) from bl_order_info b where a.imei = b.imei) as tdcsCount
|
||||||
FROM bl_device_info a
|
FROM bl_device_info a
|
||||||
LEFT JOIN bl_housingestate_info b ON a.housingestate_id = b.housingestate_id
|
LEFT JOIN bl_housingestate_info b ON a.housingestate_id = b.housingestate_id
|
||||||
<where>
|
where del_flag = '0'
|
||||||
<if test="params.housingestateId != null and params.housingestateId != ''">
|
<if test="params.housingestateId != null and params.housingestateId != ''">
|
||||||
AND a.housingestate_id = #{params.housingestateId}
|
AND a.housingestate_id = #{params.housingestateId}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.imei != null and params.imei != ''">
|
<if test="params.imei != null and params.imei != ''">
|
||||||
AND a.imei LIKE concat('%',#{params.imei},'%')
|
AND a.imei LIKE concat('%',#{params.imei},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.isOnline != null and params.isOnline != ''">
|
<if test="params.isOnline != null and params.isOnline != ''">
|
||||||
AND a.is_online = #{params.isOnline}
|
AND a.is_online = #{params.isOnline}
|
||||||
</if>
|
</if>
|
||||||
<if test="params.inWarehouse != null and params.inWarehouse != ''">
|
<if test="params.inWarehouse != null and params.inWarehouse != ''">
|
||||||
AND a.in_warehouse = #{params.inWarehouse}
|
AND a.in_warehouse = #{params.inWarehouse}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
|
||||||
order by a.device_id
|
order by a.device_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -83,7 +82,8 @@
|
||||||
b.name as housingestateName
|
b.name as housingestateName
|
||||||
FROM bl_device_info a
|
FROM bl_device_info a
|
||||||
LEFT JOIN bl_housingestate_info b ON a.housingestate_id = b.housingestate_id
|
LEFT JOIN bl_housingestate_info b ON a.housingestate_id = b.housingestate_id
|
||||||
where a.is_online = 'true'
|
where a.del_flag = '0'
|
||||||
|
and a.is_online = 'true'
|
||||||
<if test="housingestateId != null and housingestateId != ''">
|
<if test="housingestateId != null and housingestateId != ''">
|
||||||
AND a.housingestate_id = #{housingestateId}
|
AND a.housingestate_id = #{housingestateId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -165,6 +165,10 @@ spring:
|
||||||
username: root
|
username: root
|
||||||
password: Root@123..
|
password: Root@123..
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
# url: jdbc:mysql://localhost:3306/zh_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
# username: root
|
||||||
|
# password: root
|
||||||
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置
|
# 多数据源配置
|
||||||
# multi-datasource1:
|
# multi-datasource1:
|
||||||
# url: jdbc:mysql://localhost:3306/course_information_center_jeecg_db?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
# url: jdbc:mysql://localhost:3306/course_information_center_jeecg_db?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
|
|
Loading…
Reference in New Issue