查询设备下卡框
This commit is contained in:
parent
4169cf7d3a
commit
e88eb48edc
|
|
@ -1,8 +1,10 @@
|
||||||
package com.bonus.canteen.core;
|
package com.bonus.canteen.core;
|
||||||
|
|
||||||
|
import com.bonus.canteen.core.video.utils.HkCameraUtil;
|
||||||
import com.bonus.common.security.annotation.EnableCustomConfig;
|
import com.bonus.common.security.annotation.EnableCustomConfig;
|
||||||
import com.bonus.common.security.annotation.EnableRyFeignClients;
|
import com.bonus.common.security.annotation.EnableRyFeignClients;
|
||||||
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
|
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
|
@ -18,7 +20,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||||
public class BonusSmartCanteenApplication
|
public class BonusSmartCanteenApplication implements CommandLineRunner
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
|
|
@ -34,4 +36,16 @@ public class BonusSmartCanteenApplication
|
||||||
" | | \\ / \\ / \n" +
|
" | | \\ / \\ / \n" +
|
||||||
" ''-' `'-' `-..-' ");
|
" ''-' `'-' `-..-' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... args) {
|
||||||
|
HkCameraUtil util = new HkCameraUtil();
|
||||||
|
int row = util.initDevice();
|
||||||
|
if (row == 1) {
|
||||||
|
System.out.println("初始化失败!!!!!!");
|
||||||
|
}else{
|
||||||
|
System.out.println("初始化成功......");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="deviceExtendInfo" column="device_extend_info" />
|
<result property="deviceExtendInfo" column="device_extend_info" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
<result property="areaName" column="areaName" />
|
<result property="areaName" column="areaName" />
|
||||||
|
<result property="subPlaceName" column="sub_place_name" />
|
||||||
<result property="canteenName" column="canteenName" />
|
<result property="canteenName" column="canteenName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="deviceNetworkState" column="device_network_state" />
|
<result property="deviceNetworkState" column="device_network_state" />
|
||||||
<result property="deviceRepairPeriod" column="device_repair_period" />
|
<result property="deviceRepairPeriod" column="device_repair_period" />
|
||||||
<result property="deviceExtendInfo" column="device_extend_info" />
|
<result property="deviceExtendInfo" column="device_extend_info" />
|
||||||
|
<result property="subPlaceName" column="sub_place_name" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
@ -46,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT
|
SELECT
|
||||||
device_id,
|
device_id,
|
||||||
device_no,
|
device_no,
|
||||||
canteen_id,
|
kit.canteen_id,
|
||||||
area_id,
|
area_id,
|
||||||
device_pwd,
|
device_pwd,
|
||||||
device_type,
|
device_type,
|
||||||
|
|
@ -55,19 +57,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
device_name,
|
device_name,
|
||||||
device_sn,
|
device_sn,
|
||||||
sub_place,
|
sub_place,
|
||||||
|
ksp.sub_place_name,
|
||||||
device_network_state,
|
device_network_state,
|
||||||
device_repair_period,
|
device_repair_period,
|
||||||
device_extend_info,
|
device_extend_info,
|
||||||
del_flag,
|
del_flag,
|
||||||
create_by,
|
kit.create_by,
|
||||||
create_time,
|
kit.create_time,
|
||||||
update_by,
|
kit.update_by,
|
||||||
update_time,
|
kit.update_time,
|
||||||
vac.vAreaName as areaName,
|
vac.vAreaName as areaName,
|
||||||
vac.vCanteenName as canteenName
|
vac.vCanteenName as canteenName
|
||||||
FROM
|
FROM
|
||||||
kitchen_device_info kit
|
kitchen_device_info kit
|
||||||
LEFT JOIN v_area_canteen vac on vac.vAreaId = kit.area_id and vac.vCanteenId = kit.canteen_id
|
LEFT JOIN v_area_canteen vac on vac.vAreaId = kit.area_id and vac.vCanteenId = kit.canteen_id
|
||||||
|
LEFT JOIN kitchen_sub_place ksp on ksp.sub_place_id = kit.sub_place
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -84,6 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="deviceNetworkState != null "> and device_network_state = #{deviceNetworkState}</if>
|
<if test="deviceNetworkState != null "> and device_network_state = #{deviceNetworkState}</if>
|
||||||
|
<if test="deviceType !=0">
|
||||||
|
and device_type = #{deviceType}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getEmployeeViolationCount" resultType="com.bonus.canteen.core.kitchen.vo.IndexMapCountVO">
|
<select id="getEmployeeViolationCount" resultType="com.bonus.canteen.core.kitchen.vo.IndexMapCountVO">
|
||||||
select alarm_type as `name`,count(illegal_warning_id) as `count` from kitchen_staff_illegal_warning
|
select alarm_type as `name`,count(illegal_warning_id) as `count` from kitchen_staff_illegal_warning
|
||||||
where illegal_warning_type =#{warningType}
|
where illegal_warning_type =#{warningType} and DATE(create_time) = CURRENT_DATE()
|
||||||
GROUP BY alarm_type
|
GROUP BY alarm_type
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ELSE '离线'
|
ELSE '离线'
|
||||||
end as 'name'
|
end as 'name'
|
||||||
,COUNT(device_id) as count from kitchen_device_info
|
,COUNT(device_id) as count from kitchen_device_info
|
||||||
where del_flag = '0' and update_time between #{startTime} and #{endTime}
|
where del_flag = '0' and update_time between concat(#{startTime},' 00:00:00') and concat(#{endTime},' 23:59:59')
|
||||||
GROUP BY device_network_state
|
GROUP BY device_network_state
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -33,13 +33,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ELSE '不合格'
|
ELSE '不合格'
|
||||||
end as 'name'
|
end as 'name'
|
||||||
,COUNT(record_id) as count from kitchen_sample_dishes_record
|
,COUNT(record_id) as count from kitchen_sample_dishes_record
|
||||||
where create_time between #{startTime} and #{endTime}
|
where create_time between concat(#{startTime},' 00:00:00') and concat(#{endTime},' 23:59:59')
|
||||||
GROUP BY `name`
|
GROUP BY `name`
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCountNum" resultType="int">
|
<select id="getCountNum" resultType="int">
|
||||||
SELECT COUNT(record_id) FROM kitchen_device_sensor_record
|
SELECT COUNT(record_id) FROM kitchen_device_sensor_record
|
||||||
WHERE device_type = #{beans.deviceType} AND measure_metric_id = #{beans.measureId}
|
WHERE device_type = #{beans.deviceType} AND measure_code = #{beans.measureCode}
|
||||||
<if test="type == 'max'">
|
<if test="type == 'max'">
|
||||||
and #{beans.measureMaxValue} > measure_data
|
and #{beans.measureMaxValue} > measure_data
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue