diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/BonusSmartCanteenApplication.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/BonusSmartCanteenApplication.java
index 0313157..bfc9479 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/BonusSmartCanteenApplication.java
+++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/BonusSmartCanteenApplication.java
@@ -1,8 +1,10 @@
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.EnableRyFeignClients;
import com.bonus.common.swagger.annotation.EnableCustomSwagger2;
+import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -10,7 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 系统模块
- *
+ *
* @author bonus
*/
@EnableCustomConfig
@@ -18,7 +20,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling
@EnableRyFeignClients
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class BonusSmartCanteenApplication
+public class BonusSmartCanteenApplication implements CommandLineRunner
{
public static void main(String[] args)
{
@@ -34,4 +36,16 @@ public class BonusSmartCanteenApplication
" | | \\ / \\ / \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("初始化成功......");
+ }
+
+ }
}
diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceInfoMapper.xml
index 01e3b8e..80ed265 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceInfoMapper.xml
+++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceInfoMapper.xml
@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -46,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
device_id,
device_no,
- canteen_id,
+ kit.canteen_id,
area_id,
device_pwd,
device_type,
@@ -55,19 +57,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
device_name,
device_sn,
sub_place,
+ ksp.sub_place_name,
device_network_state,
device_repair_period,
device_extend_info,
del_flag,
- create_by,
- create_time,
- update_by,
- update_time,
+ kit.create_by,
+ kit.create_time,
+ kit.update_by,
+ kit.update_time,
vac.vAreaName as areaName,
vac.vCanteenName as canteenName
FROM
kitchen_device_info kit
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
@@ -84,6 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
and device_network_state = #{deviceNetworkState}
+
+ and device_type = #{deviceType}
+
diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenHomePageMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenHomePageMapper.xml
index 8af4d3d..dbc50ed 100644
--- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenHomePageMapper.xml
+++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenHomePageMapper.xml
@@ -10,7 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE '离线'
end as 'name'
,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
@@ -33,13 +33,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ELSE '不合格'
end as 'name'
,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`