bihuisong 3 місяців тому
батько
коміт
22e35cba79

+ 4 - 0
zhjq-admin/src/main/java/com/zhjq/ZHJQApplication.java

@@ -3,12 +3,16 @@ package com.zhjq;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 /**
  * 启动程序
  *
  * @author ruoyi
  */
+@EnableAsync
+@EnableScheduling // 启用定时任务
 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
 public class ZHJQApplication {
     public static void main(String[] args) {

+ 6 - 0
zhjq-business/pom.xml

@@ -80,6 +80,12 @@
             <version>2.5.0</version>
         </dependency>
 
+        <!--海康-->
+        <dependency>
+            <groupId>com.hikvision.ga</groupId>
+            <artifactId>artemis-http-client</artifactId>
+            <version>1.1.3</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 84 - 0
zhjq-business/src/main/java/com/zhjq/controller/ZhjqPassengerFlowController.java

@@ -0,0 +1,84 @@
+package com.zhjq.controller;
+
+import com.zhjq.common.annotation.Log;
+import com.zhjq.common.core.controller.BaseController;
+import com.zhjq.common.core.domain.AjaxResult;
+import com.zhjq.common.core.page.TableDataInfo;
+import com.zhjq.common.enums.BusinessType;
+import com.zhjq.common.utils.poi.ExcelUtil;
+import com.zhjq.domain.ZhjqPassengerFlow;
+import com.zhjq.service.IZhjqPassengerFlowService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 客流量统计Controller
+ *
+ * @author ruoyi
+ * @date 2025-02-13
+ */
+@RestController
+@RequestMapping("/system/flow")
+public class ZhjqPassengerFlowController extends BaseController {
+    @Autowired
+    private IZhjqPassengerFlowService zhjqPassengerFlowService;
+
+    /**
+     * 查询客流量统计列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(ZhjqPassengerFlow zhjqPassengerFlow) {
+        startPage();
+        List<ZhjqPassengerFlow> list = zhjqPassengerFlowService.selectZhjqPassengerFlowList(zhjqPassengerFlow);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出客流量统计列表
+     */
+    @Log(title = "客流量统计", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ZhjqPassengerFlow zhjqPassengerFlow) {
+        List<ZhjqPassengerFlow> list = zhjqPassengerFlowService.selectZhjqPassengerFlowList(zhjqPassengerFlow);
+        ExcelUtil<ZhjqPassengerFlow> util = new ExcelUtil<ZhjqPassengerFlow>(ZhjqPassengerFlow.class);
+        util.exportExcel(response, list, "客流量统计数据");
+    }
+
+    /**
+     * 获取客流量统计详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(zhjqPassengerFlowService.selectZhjqPassengerFlowById(id));
+    }
+
+    /**
+     * 新增客流量统计
+     */
+    @Log(title = "客流量统计", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ZhjqPassengerFlow zhjqPassengerFlow) {
+        return toAjax(zhjqPassengerFlowService.insertZhjqPassengerFlow(zhjqPassengerFlow));
+    }
+
+    /**
+     * 修改客流量统计
+     */
+    @Log(title = "客流量统计", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ZhjqPassengerFlow zhjqPassengerFlow) {
+        return toAjax(zhjqPassengerFlowService.updateZhjqPassengerFlow(zhjqPassengerFlow));
+    }
+
+    /**
+     * 删除客流量统计
+     */
+    @Log(title = "客流量统计", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(zhjqPassengerFlowService.deleteZhjqPassengerFlowByIds(ids));
+    }
+}

+ 75 - 0
zhjq-business/src/main/java/com/zhjq/domain/ZhjqPassengerFlow.java

@@ -0,0 +1,75 @@
+package com.zhjq.domain;
+
+import com.zhjq.common.annotation.Excel;
+import com.zhjq.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 客流量统计 zhjq_passenger_flow
+ */
+@Data
+public class ZhjqPassengerFlow extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private Long id;
+
+    /**
+     * 统计组编码
+     */
+    @Excel(name = "统计组编码")
+    private String groupId;
+
+    /**
+     * 统计组所在区域id
+     */
+    @Excel(name = "统计组所在区域id")
+    private String regionId;
+
+    /**
+     * iso统计时间
+     */
+    @Excel(name = "iso统计时间")
+    private Date statisticsTime;
+
+    /**
+     * 去重后进入人数
+     */
+    @Excel(name = "去重后进入人数")
+    private Integer enter;
+
+    /**
+     * 去重后离开人数
+     */
+    @Excel(name = "去重后离开人数")
+    private Integer exit;
+
+    /**
+     * 经过人数
+     */
+    @Excel(name = "经过人数")
+    private Integer pass;
+
+    /**
+     * 保有量
+     */
+    @Excel(name = "保有量")
+    private Integer holdValue;
+
+    /**
+     * 去重前进入人数
+     */
+    @Excel(name = "去重前进入人数")
+    private Integer allEnter;
+
+    /**
+     * 去重前离开人数
+     */
+    @Excel(name = "去重前离开人数")
+    private Integer allExit;
+
+}

+ 66 - 0
zhjq-business/src/main/java/com/zhjq/mapper/ZhjqPassengerFlowMapper.java

@@ -0,0 +1,66 @@
+package com.zhjq.mapper;
+
+import com.zhjq.domain.ZhjqPassengerFlow;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+/**
+ * 客流量统计Mapper接口
+ *
+ * @author ruoyi
+ * @date 2025-02-13
+ */
+public interface ZhjqPassengerFlowMapper {
+    /**
+     * 查询客流量统计
+     *
+     * @param id 客流量统计主键
+     * @return 客流量统计
+     */
+    public ZhjqPassengerFlow selectZhjqPassengerFlowById(Long id);
+
+    /**
+     * 查询客流量统计列表
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 客流量统计集合
+     */
+    public List<ZhjqPassengerFlow> selectZhjqPassengerFlowList(ZhjqPassengerFlow zhjqPassengerFlow);
+
+    /**
+     * 新增客流量统计
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 结果
+     */
+    public int insertZhjqPassengerFlow(ZhjqPassengerFlow zhjqPassengerFlow);
+
+    /**
+     * 修改客流量统计
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 结果
+     */
+    public int updateZhjqPassengerFlow(ZhjqPassengerFlow zhjqPassengerFlow);
+
+    /**
+     * 删除客流量统计
+     *
+     * @param id 客流量统计主键
+     * @return 结果
+     */
+    public int deleteZhjqPassengerFlowById(Long id);
+
+    /**
+     * 批量删除客流量统计
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteZhjqPassengerFlowByIds(Long[] ids);
+
+
+    int insertBatch(@Param("list") List<ZhjqPassengerFlow> list);
+}

+ 31 - 0
zhjq-business/src/main/java/com/zhjq/quartz/PersonCountGroupJob.java

@@ -0,0 +1,31 @@
+package com.zhjq.quartz;
+
+
+import com.zhjq.domain.ZhjqPassengerFlow;
+import com.zhjq.mapper.ZhjqPassengerFlowMapper;
+import com.zhjq.utils.PersonCountGroupURL;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Slf4j
+@Component("personCountGroupJob")
+public class PersonCountGroupJob {
+
+    private final String host = "218.62.80.146:1443";
+    private final String appKey = "28356728";
+    private final String appSecret = "C3K889wQUgVlSj1BMay6";
+    @Resource
+    private ZhjqPassengerFlowMapper zhjqPassengerFlowMapper;
+
+
+    public void getPersonCountGroup() throws Exception {
+        log.info("开始执行海康获取客流量统计定时任务");
+        List<ZhjqPassengerFlow> list = PersonCountGroupURL.PersonCountGroupURL(host, appKey, appSecret);
+        zhjqPassengerFlowMapper.insertBatch(list);
+        log.info("海康获取客流量统计定时任务执行完毕");
+    }
+
+}

+ 62 - 0
zhjq-business/src/main/java/com/zhjq/service/IZhjqPassengerFlowService.java

@@ -0,0 +1,62 @@
+package com.zhjq.service;
+
+import com.zhjq.domain.ZhjqPassengerFlow;
+
+import java.util.List;
+
+
+/**
+ * 客流量统计Service接口
+ *
+ * @author ruoyi
+ * @date 2025-02-13
+ */
+public interface IZhjqPassengerFlowService {
+    /**
+     * 查询客流量统计
+     *
+     * @param id 客流量统计主键
+     * @return 客流量统计
+     */
+    public ZhjqPassengerFlow selectZhjqPassengerFlowById(Long id);
+
+    /**
+     * 查询客流量统计列表
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 客流量统计集合
+     */
+    public List<ZhjqPassengerFlow> selectZhjqPassengerFlowList(ZhjqPassengerFlow zhjqPassengerFlow);
+
+    /**
+     * 新增客流量统计
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 结果
+     */
+    public int insertZhjqPassengerFlow(ZhjqPassengerFlow zhjqPassengerFlow);
+
+    /**
+     * 修改客流量统计
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 结果
+     */
+    public int updateZhjqPassengerFlow(ZhjqPassengerFlow zhjqPassengerFlow);
+
+    /**
+     * 批量删除客流量统计
+     *
+     * @param ids 需要删除的客流量统计主键集合
+     * @return 结果
+     */
+    public int deleteZhjqPassengerFlowByIds(Long[] ids);
+
+    /**
+     * 删除客流量统计信息
+     *
+     * @param id 客流量统计主键
+     * @return 结果
+     */
+    public int deleteZhjqPassengerFlowById(Long id);
+}

+ 88 - 0
zhjq-business/src/main/java/com/zhjq/service/imp/ZhjqPassengerFlowServiceImpl.java

@@ -0,0 +1,88 @@
+package com.zhjq.service.imp;
+
+import com.zhjq.domain.ZhjqPassengerFlow;
+import com.zhjq.mapper.ZhjqPassengerFlowMapper;
+import com.zhjq.service.IZhjqPassengerFlowService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+/**
+ * 客流量统计Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-02-13
+ */
+@Service
+public class ZhjqPassengerFlowServiceImpl implements IZhjqPassengerFlowService {
+    @Autowired
+    private ZhjqPassengerFlowMapper zhjqPassengerFlowMapper;
+
+    /**
+     * 查询客流量统计
+     *
+     * @param id 客流量统计主键
+     * @return 客流量统计
+     */
+    @Override
+    public ZhjqPassengerFlow selectZhjqPassengerFlowById(Long id) {
+        return zhjqPassengerFlowMapper.selectZhjqPassengerFlowById(id);
+    }
+
+    /**
+     * 查询客流量统计列表
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 客流量统计
+     */
+    @Override
+    public List<ZhjqPassengerFlow> selectZhjqPassengerFlowList(ZhjqPassengerFlow zhjqPassengerFlow) {
+        return zhjqPassengerFlowMapper.selectZhjqPassengerFlowList(zhjqPassengerFlow);
+    }
+
+    /**
+     * 新增客流量统计
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 结果
+     */
+    @Override
+    public int insertZhjqPassengerFlow(ZhjqPassengerFlow zhjqPassengerFlow) {
+        return zhjqPassengerFlowMapper.insertZhjqPassengerFlow(zhjqPassengerFlow);
+    }
+
+    /**
+     * 修改客流量统计
+     *
+     * @param zhjqPassengerFlow 客流量统计
+     * @return 结果
+     */
+    @Override
+    public int updateZhjqPassengerFlow(ZhjqPassengerFlow zhjqPassengerFlow) {
+        return zhjqPassengerFlowMapper.updateZhjqPassengerFlow(zhjqPassengerFlow);
+    }
+
+    /**
+     * 批量删除客流量统计
+     *
+     * @param ids 需要删除的客流量统计主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZhjqPassengerFlowByIds(Long[] ids) {
+        return zhjqPassengerFlowMapper.deleteZhjqPassengerFlowByIds(ids);
+    }
+
+    /**
+     * 删除客流量统计信息
+     *
+     * @param id 客流量统计主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZhjqPassengerFlowById(Long id) {
+        return zhjqPassengerFlowMapper.deleteZhjqPassengerFlowById(id);
+    }
+}

+ 97 - 0
zhjq-business/src/main/java/com/zhjq/utils/PersonCountGroupURL.java

@@ -0,0 +1,97 @@
+package com.zhjq.utils;
+
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import com.hikvision.artemis.sdk.ArtemisHttpUtil;
+import com.hikvision.artemis.sdk.config.ArtemisConfig;
+import com.zhjq.domain.ZhjqPassengerFlow;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 获取监控点预览取流URLv2
+ */
+@Component("personCountGroupURL")
+public class PersonCountGroupURL {
+
+    public static List<ZhjqPassengerFlow> PersonCountGroupURL(String host, String appKey, String appSecret) {
+        List<ZhjqPassengerFlow> returnList = new ArrayList<>();
+        ArtemisConfig.host = host; // 平台的ip端口
+        ArtemisConfig.appKey = appKey;  // 密钥appkey
+        ArtemisConfig.appSecret = appSecret;// 密钥appSecret
+        final String ARTEMIS_PATH = "/artemis";
+        final String previewURLsApi = ARTEMIS_PATH + "/api/cfas/v2/countGroup/groups/page";
+        Map<String, String> path = new HashMap<String, String>(2) {
+            {
+                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
+            }
+        };
+        String contentType = "application/json";
+        JSONObject jsonBody = new JSONObject();
+        jsonBody.put("groupType", 1);
+        jsonBody.put("pageNo", 1);
+        jsonBody.put("pageSize", 20);
+        jsonBody.put("streamType", 0);
+        jsonBody.put("protocol", "ws");
+        jsonBody.put("transmode", 1);
+        jsonBody.put("expand", "streamform=ps");
+        String body = jsonBody.toJSONString();
+        JSONObject json = JSONObject.parseObject(ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType, null));// post请求application/json类型参数
+        List<String> groupIds = new ArrayList<>();
+        if (json.get("code").equals("0")) {
+            List<Map<String, String>> list = (List<Map<String, String>>) JSONObject.parseObject(json.get("data").toString()).get("list");
+            if (!CollectionUtils.isEmpty(list)) {
+                for (Map<String, String> map : list) {
+                    groupIds.add(map.get("groupId"));
+                }
+            }
+        }
+        JSONObject jsonObject = PassengerURL(host, appKey, appSecret, groupIds);
+        if (jsonObject.get("code").equals("0")) {
+            ObjectMapper objectMapper = new ObjectMapper();
+            objectMapper.registerModule(new JavaTimeModule()); // 注册时间模块
+            try {
+                returnList = objectMapper.readValue(jsonObject.get("data").toString(), new TypeReference<List<ZhjqPassengerFlow>>() {});
+            } catch (JsonProcessingException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return returnList;
+    }
+
+
+    public static JSONObject PassengerURL(String host, String appKey, String appSecret, List<String> groupIds) {
+
+        ArtemisConfig.host = host; // 平台的ip端口
+        ArtemisConfig.appKey = appKey;  // 密钥appkey
+        ArtemisConfig.appSecret = appSecret;// 密钥appSecret
+        final String ARTEMIS_PATH = "/artemis";
+        final String previewURLsApi = ARTEMIS_PATH + "/api/cfas/v3/passenger/realTime";
+        Map<String, String> path = new HashMap<String, String>(2) {
+            {
+                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
+            }
+        };
+        String contentType = "application/json";
+        String jsonString = JSON.toJSONString(groupIds);
+        JSONObject json = JSONObject.parseObject(ArtemisHttpUtil.doPostStringArtemis(path, jsonString, null, null, contentType, null));// post请求application/json类型参数
+
+        return json;
+    }
+
+
+    public static void main(String[] args) {
+        List<ZhjqPassengerFlow> result = PersonCountGroupURL("218.62.80.146:1443", "28356728", "C3K889wQUgVlSj1BMay6");
+        System.out.println("result结果示例: " + result);
+    }
+}

+ 171 - 0
zhjq-business/src/main/resources/mapper/ZhjqPassengerFlowMapper.xml

@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zhjq.mapper.ZhjqPassengerFlowMapper">
+
+    <resultMap type="ZhjqPassengerFlow" id="ZhjqPassengerFlowResult">
+        <result property="id" column="id"/>
+        <result property="groupId" column="group_id"/>
+        <result property="regionId" column="region_id"/>
+        <result property="statisticsTime" column="statistics_time"/>
+        <result property="enter" column="enter"/>
+        <result property="exit" column="exit"/>
+        <result property="pass" column="pass"/>
+        <result property="holdValue" column="hold_value"/>
+        <result property="allEnter" column="all_enter"/>
+        <result property="allExit" column="all_exit"/>
+    </resultMap>
+
+    <sql id="selectZhjqPassengerFlowVo">
+        select id,
+               group_id,
+               region_id,
+               statistics_time,
+               enter,
+               exit,
+               pass,
+               hold_value,
+               all_enter,
+               all_exit
+        from zhjq_passenger_flow
+    </sql>
+
+    <select id="selectZhjqPassengerFlowList" parameterType="ZhjqPassengerFlow" resultMap="ZhjqPassengerFlowResult">
+        <include refid="selectZhjqPassengerFlowVo"/>
+        <where>
+            <if test="groupId != null  and groupId != ''">
+                and group_id = #{groupId}
+            </if>
+            <if test="regionId != null  and regionId != ''">
+                and region_id = #{regionId}
+            </if>
+            <if test="statisticsTime != null ">
+                and statistics_time = #{statisticsTime}
+            </if>
+            <if test="enter != null ">
+                and enter = #{enter}
+            </if>
+            <if test="exit != null ">
+                and exit = #{exit}
+            </if>
+            <if test="pass != null ">
+                and pass = #{pass}
+            </if>
+            <if test="holdValue != null ">
+                and hold_value = #{holdValue}
+            </if>
+            <if test="allEnter != null ">
+                and all_enter = #{allEnter}
+            </if>
+            <if test="allExit != null ">
+                and all_exit = #{allExit}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectZhjqPassengerFlowById" parameterType="Long"
+            resultMap="ZhjqPassengerFlowResult">
+        <include refid="selectZhjqPassengerFlowVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertZhjqPassengerFlow" parameterType="ZhjqPassengerFlow" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into zhjq_passenger_flow
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="groupId != null">group_id,
+            </if>
+            <if test="regionId != null">region_id,
+            </if>
+            <if test="statisticsTime != null">statistics_time,
+            </if>
+            <if test="enter != null">enter,
+            </if>
+            <if test="exit != null">exit,
+            </if>
+            <if test="pass != null">pass,
+            </if>
+            <if test="holdValue != null">hold_value,
+            </if>
+            <if test="allEnter != null">all_enter,
+            </if>
+            <if test="allExit != null">all_exit,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="groupId != null">#{groupId},
+            </if>
+            <if test="regionId != null">#{regionId},
+            </if>
+            <if test="statisticsTime != null">#{statisticsTime},
+            </if>
+            <if test="enter != null">#{enter},
+            </if>
+            <if test="exit != null">#{exit},
+            </if>
+            <if test="pass != null">#{pass},
+            </if>
+            <if test="holdValue != null">#{holdValue},
+            </if>
+            <if test="allEnter != null">#{allEnter},
+            </if>
+            <if test="allExit != null">#{allExit},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateZhjqPassengerFlow" parameterType="ZhjqPassengerFlow">
+        update zhjq_passenger_flow
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="groupId != null">group_id =
+                #{groupId},
+            </if>
+            <if test="regionId != null">region_id =
+                #{regionId},
+            </if>
+            <if test="statisticsTime != null">statistics_time =
+                #{statisticsTime},
+            </if>
+            <if test="enter != null">enter =
+                #{enter},
+            </if>
+            <if test="exit != null">exit =
+                #{exit},
+            </if>
+            <if test="pass != null">pass =
+                #{pass},
+            </if>
+            <if test="holdValue != null">hold_value =
+                #{holdValue},
+            </if>
+            <if test="allEnter != null">all_enter =
+                #{allEnter},
+            </if>
+            <if test="allExit != null">all_exit =
+                #{allExit},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteZhjqPassengerFlowById" parameterType="Long">
+        delete
+        from zhjq_passenger_flow
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteZhjqPassengerFlowByIds" parameterType="String">
+        delete from zhjq_passenger_flow where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <insert id="insertBatch" parameterType="java.lang.Integer">
+        insert into zhjq_passenger_flow (group_id, region_id, statistics_time, enter, `exit`, pass, hold_value, all_enter, all_exit) values
+        <foreach collection="list" item="item" separator="," index="index">
+            (#{item.groupId}, #{item.regionId}, #{item.statisticsTime}, #{item.enter}, #{item.exit}, #{item.pass}, #{item.holdValue}, #{item.allEnter}, #{item.allExit})
+        </foreach>
+    </insert>
+</mapper>

+ 1 - 1
zhjq-common/src/main/java/com/zhjq/common/constant/Constants.java

@@ -163,7 +163,7 @@ public class Constants {
     /**
      * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
      */
-    public static final String[] JOB_WHITELIST_STR = {"com.zhjq.quartz.task"};
+    public static final String[] JOB_WHITELIST_STR = {"com.zhjq.quartz.task","com.zhjq.quartz"};
 
     /**
      * 定时任务违规的字符