Browse Source

单位采集增加字段及报告数据文件创建

hanzhengyi 2 years ago
parent
commit
2d9c0a62ed

+ 1 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/MybatisGeneratorUtils.java

@@ -71,7 +71,7 @@ public class MybatisGeneratorUtils {
         // strategy.setTablePrefix("t_"); // 表名前缀
         strategy.setEntityLombokModel(true); //使用lombok
         //修改自己想要生成的表
-        strategy.setInclude("base_street_town");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        strategy.setInclude("dem_report_data");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
         mpg.setStrategy(strategy);
 
         // 关闭默认 xml 生成,调整生成 至 根目录

+ 21 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/controller/web/DemReportDataController.java

@@ -0,0 +1,21 @@
+package com.usky.fire.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 报告数据表 前端控制器
+ * </p>
+ *
+ * @author han
+ * @since 2023-02-28
+ */
+@Controller
+@RequestMapping("/demReportData")
+public class DemReportDataController {
+
+}
+

+ 101 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/DemReportData.java

@@ -0,0 +1,101 @@
+package com.usky.fire.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 报告数据表
+ * </p>
+ *
+ * @author han
+ * @since 2023-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class DemReportData implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 单位ID
+     */
+    private String companyId;
+
+    /**
+     * 单位编号
+     */
+    private String companyCode;
+
+    /**
+     * 消防安全风险提示
+     */
+    private String fireRisk;
+
+    /**
+     * 基本情况
+     */
+    private String baseSituation;
+
+    /**
+     * 存在问题
+     */
+    private String existProblem;
+
+    /**
+     * 整体指数分析
+     */
+    private String indexAnalysis;
+
+    /**
+     * 综合评分
+     */
+    private String overallScore;
+
+    /**
+     * 设备设施状况
+     */
+    private String equipmentState;
+
+    /**
+     * 设备统计
+     */
+    private String equipmentStatistic;
+
+    /**
+     * 监督执法情况
+     */
+    private String lawEnforce;
+
+    /**
+     * 火灾情况
+     */
+    private String fireSituation;
+
+    /**
+     * 统计时段
+     */
+    private String statisticPeriod;
+
+    /**
+     * 统计月份
+     */
+    private String statisticMonth;
+
+    /**
+     * 生成时间
+     */
+    private LocalDateTime createTime;
+
+
+}

+ 16 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/mapper/DemReportDataMapper.java

@@ -0,0 +1,16 @@
+package com.usky.fire.mapper;
+
+import com.usky.fire.domain.DemReportData;
+import com.usky.common.mybatis.core.CrudMapper;
+
+/**
+ * <p>
+ * 报告数据表 Mapper 接口
+ * </p>
+ *
+ * @author han
+ * @since 2023-02-28
+ */
+public interface DemReportDataMapper extends CrudMapper<DemReportData> {
+
+}

+ 19 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/DemReportDataService.java

@@ -0,0 +1,19 @@
+package com.usky.fire.service;
+
+import com.usky.fire.domain.DemReportData;
+import com.usky.common.mybatis.core.CrudService;
+
+/**
+ * <p>
+ * 报告数据表 服务类
+ * </p>
+ *
+ * @author han
+ * @since 2023-02-28
+ */
+public interface DemReportDataService extends CrudService<DemReportData> {
+    /**
+     * 报告数据定时生成任务逻辑
+     */
+    void regularReportData();
+}

+ 23 - 0
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/DemReportDataServiceImpl.java

@@ -0,0 +1,23 @@
+package com.usky.fire.service.impl;
+
+import com.usky.fire.domain.DemReportData;
+import com.usky.fire.mapper.DemReportDataMapper;
+import com.usky.fire.service.DemReportDataService;
+import com.usky.common.mybatis.core.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 报告数据表 服务实现类
+ * </p>
+ *
+ * @author han
+ * @since 2023-02-28
+ */
+@Service
+public class DemReportDataServiceImpl extends AbstractCrudService<DemReportDataMapper, DemReportData> implements DemReportDataService {
+    @Override
+    public void regularReportData() {
+        
+    }
+}

+ 24 - 0
service-fire/service-fire-biz/src/main/resources/mapper/fire/DemReportDataMapper.xml

@@ -0,0 +1,24 @@
+<?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.usky.fire.mapper.DemReportDataMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.usky.fire.domain.DemReportData">
+        <id column="id" property="id" />
+        <result column="company_id" property="companyId" />
+        <result column="company_code" property="companyCode" />
+        <result column="fire_risk" property="fireRisk" />
+        <result column="base_situation" property="baseSituation" />
+        <result column="exist_problem" property="existProblem" />
+        <result column="index_analysis" property="indexAnalysis" />
+        <result column="overall_score" property="overallScore" />
+        <result column="equipment_state" property="equipmentState" />
+        <result column="equipment_statistic" property="equipmentStatistic" />
+        <result column="law_enforce" property="lawEnforce" />
+        <result column="fire_situation" property="fireSituation" />
+        <result column="statistic_period" property="statisticPeriod" />
+        <result column="statistic_month" property="statisticMonth" />
+        <result column="create_time" property="createTime" />
+    </resultMap>
+
+</mapper>