Browse Source

添加实体字段

yq 3 years ago
parent
commit
cb5d63734d
22 changed files with 341 additions and 35 deletions
  1. 12 0
      mhfire-controller/pom.xml
  2. 130 0
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/MybatisGeneratorUtils.java
  3. 1 2
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwEventController.java
  4. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwFeedbackController.java
  5. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsCatalogController.java
  6. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsCatalogInfoController.java
  7. 1 2
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsController.java
  8. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsNewController.java
  9. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwUserController.java
  10. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionController.java
  11. 1 3
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionKeyController.java
  12. 1 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionMessageController.java
  13. 1 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionMessageRecordController.java
  14. 0 2
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/AtlasControllerWeb.java
  15. 21 0
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DutyController.java
  16. 0 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/FireStatisticsControllerWeb.java
  17. 16 0
      mhfire-mapping/src/main/java/com/bizmatics/mhfire/persistence/mapper/DutyMapper.java
  18. 18 0
      mhfire-mapping/src/main/resources/mapper/mysql/DutyMapper.xml
  19. 49 0
      mhfire-model/src/main/java/com/bizmatics/model/Duty.java
  20. 16 0
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/DutyService.java
  21. 48 5
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/api/AlertAndSiteApi.java
  22. 20 0
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DutyServiceImpl.java

+ 12 - 0
mhfire-controller/pom.xml

@@ -125,6 +125,18 @@
             </exclusions>
         </dependency>
 
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>2.1</version>
+        </dependency>
+
+
     </dependencies>
 
     <build>

+ 130 - 0
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/MybatisGeneratorUtils.java

@@ -0,0 +1,130 @@
+package com.bizmatics.mhfire.controller;
+
+
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.InjectionConfig;
+import com.baomidou.mybatisplus.generator.config.*;
+import com.baomidou.mybatisplus.generator.config.po.TableInfo;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author yq
+ * @date 2021/7/6 11:42
+ */
+public class MybatisGeneratorUtils {
+    public static void main(String[] args) {
+        //修改成自己的模块名称
+        String[] models = {"mhfire-controller", "mhfire-service", "mhfire-model", "mhfire-persistence"};
+        for (String model : models) {
+            shell(model);
+        }
+    }
+
+    private static void shell(String model) {
+
+        AutoGenerator mpg = new AutoGenerator();
+        //1、全局配置
+        GlobalConfig gc = new GlobalConfig();
+        File file = new File(model);
+        String path = file.getAbsolutePath();
+        gc.setOutputDir(path + "/src/main/java");  //生成路径(一般都是生成在此项目的src/main/java下面)
+        //修改为自己的名字
+        gc.setAuthor("ya"); //设置作者
+        gc.setOpen(false);
+        gc.setFileOverride(true); //第二次生成会把第一次生成的覆盖掉
+        gc.setServiceName("%sService"); //生成的service接口名字首字母是否为I,这样设置就没有
+        gc.setBaseResultMap(true); //生成resultMap
+        mpg.setGlobalConfig(gc);
+
+        //2、数据源配置
+        //修改数据源
+        DataSourceConfig dsc = new DataSourceConfig();
+        dsc.setUrl("jdbc:mysql://101.133.214.75:3306/mhfire?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowMultiQueries=true");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("root");
+        dsc.setPassword("123456");
+        mpg.setDataSource(dsc);
+
+        // 3、包配置
+        PackageConfig pc = new PackageConfig();
+        pc.setParent("com.bizmatics");
+        pc.setController("controller.web");
+        pc.setEntity("model");
+        pc.setMapper("persistence.mapper");
+        pc.setService("service");
+        pc.setServiceImpl("service.impl");
+        //pc.setModuleName("test");
+        mpg.setPackageInfo(pc);
+
+        // 4、策略配置
+        StrategyConfig strategy = new StrategyConfig();
+        strategy.setNaming(NamingStrategy.underline_to_camel);
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
+        strategy.setSuperMapperClass("com.bizmatics.common.mvc.base.CrudMapper");
+        strategy.setSuperServiceClass("com.bizmatics.common.mvc.base.CrudService");
+        strategy.setSuperServiceImplClass("com.bizmatics.common.mvc.base.AbstractCrudService");
+        // strategy.setTablePrefix("t_"); // 表名前缀
+        strategy.setEntityLombokModel(true); //使用lombok
+        //修改自己想要生成的表
+        strategy.setInclude("duty");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
+        mpg.setStrategy(strategy);
+
+        // 关闭默认 xml 生成,调整生成 至 根目录
+        //修改对应的模块名称
+        TemplateConfig tc = new TemplateConfig();
+        if ("mhfire-persistence".equals(model)) {
+            tc.setController(null);
+            tc.setEntity(null);
+            tc.setService(null);
+            tc.setServiceImpl(null);
+            // 自定义配置
+            InjectionConfig cfg = new InjectionConfig() {
+                @Override
+                public void initMap() {
+                    // to do nothing
+                }
+            };
+            //如果模板引擎是 velocity
+            String templatePath = "/templates/mapper.xml.vm";
+            // 自定义输出配置
+            List<FileOutConfig> focList = new ArrayList<>();
+            // 自定义配置会被优先输出
+            focList.add(new FileOutConfig(templatePath) {
+                @Override
+                public String outputFile(TableInfo tableInfo) {
+                    // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
+                    return path + "/src/main/resources/mapper/mysql/" + "/"
+                            + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
+                }
+            });
+            cfg.setFileOutConfigList(focList);
+            mpg.setCfg(cfg);
+            tc.setXml(null);
+        } else if ("mhfire-model".equals(model)) {
+            tc.setController(null);
+            tc.setService(null);
+            tc.setServiceImpl(null);
+            tc.setMapper(null);
+            tc.setXml(null);
+        } else if ("mhfire-service".equals(model)) {
+            tc.setController(null);
+            tc.setMapper(null);
+            tc.setXml(null);
+            tc.setEntity(null);
+        } else if ("mhfire-controller".equals(model)) {
+            tc.setMapper(null);
+            tc.setXml(null);
+            tc.setService(null);
+            tc.setServiceImpl(null);
+            tc.setEntity(null);
+        }
+        mpg.setTemplate(tc);
+        //5、执行
+        mpg.execute();
+    }
+}

+ 1 - 2
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwEventController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwEventController.java

@@ -1,4 +1,4 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwFeedbackController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwFeedbackController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.BmfwEvent;
 import com.bizmatics.mhfire.model.bulehelp.BmfwFeedback;
 import com.bizmatics.mhfire.service.bulehelp.BmfwFeedbackService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsCatalogController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsCatalogController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.BmfwFeedback;
 import com.bizmatics.mhfire.model.bulehelp.BmfwLawsCatalog;
 import com.bizmatics.mhfire.service.bulehelp.BmfwLawsCatalogService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsCatalogInfoController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsCatalogInfoController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.BmfwLawsCatalog;
 import com.bizmatics.mhfire.model.bulehelp.BmfwLawsCatalogInfo;
 import com.bizmatics.mhfire.service.bulehelp.BmfwLawsCatalogInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 2
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsController.java

@@ -1,9 +1,8 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RestController;
 
 /**

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsNewController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwLawsNewController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.BmfwLawsCatalogInfo;
 import com.bizmatics.mhfire.model.bulehelp.BmfwLawsNew;
 import com.bizmatics.mhfire.service.bulehelp.BmfwLawsNewService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwUserController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/BmfwUserController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.BmfwLawsNew;
 import com.bizmatics.mhfire.model.bulehelp.BmfwUser;
 import com.bizmatics.mhfire.service.bulehelp.BmfwUserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.BmfwUser;
 import com.bizmatics.mhfire.model.bulehelp.RobotQuestion;
 import com.bizmatics.mhfire.service.bulehelp.RobotQuestionService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionKeyController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionKeyController.java

@@ -1,16 +1,14 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.bulehelp.RobotQuestion;
 import com.bizmatics.mhfire.model.bulehelp.RobotQuestionKey;
 import com.bizmatics.mhfire.service.bulehelp.RobotQuestionKeyService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 

+ 1 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionMessageController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionMessageController.java

@@ -1,4 +1,4 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;

+ 1 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionMessageRecordController.java → mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/bulehelp/RobotQuestionMessageRecordController.java

@@ -1,4 +1,4 @@
-package com.bizmatics.mhfire.controller.web.bulehelp;
+package com.bizmatics.mhfire.controller.bulehelp;
 
 
 import com.bizmatics.common.core.bean.ApiResult;

+ 0 - 2
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/AtlasControllerWeb.java

@@ -6,8 +6,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.print.DocFlavor;
-
 /**
  * @author yq
  * @date 2021/7/13 14:06

+ 21 - 0
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/DutyController.java

@@ -0,0 +1,21 @@
+package com.bizmatics.mhfire.controller.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-04
+ */
+@Controller
+@RequestMapping("/duty")
+public class DutyController {
+
+}
+

+ 0 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/FireStatisticsControllerWeb.java

@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.xml.crypto.Data;
 import java.util.Date;
 import java.util.List;
 

+ 16 - 0
mhfire-mapping/src/main/java/com/bizmatics/mhfire/persistence/mapper/DutyMapper.java

@@ -0,0 +1,16 @@
+package com.bizmatics.persistence.mapper;
+
+import com.bizmatics.model.Duty;
+import com.bizmatics.common.mvc.base.CrudMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-04
+ */
+public interface DutyMapper extends CrudMapper<Duty> {
+
+}

+ 18 - 0
mhfire-mapping/src/main/resources/mapper/mysql/DutyMapper.xml

@@ -0,0 +1,18 @@
+<?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.bizmatics.persistence.mapper.DutyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.model.Duty">
+        <result column="orga_desc" property="orgaDesc" />
+        <result column="DTHH" property="dthh" />
+        <result column="LXDH" property="lxdh" />
+        <result column="car_status" property="carStatus" />
+        <result column="YS" property="ys" />
+        <result column="ID" property="id" />
+        <result column="CLJC" property="cljc" />
+        <result column="CPHM" property="cphm" />
+        <result column="ssxfjgid" property="ssxfjgid" />
+    </resultMap>
+
+</mapper>

+ 49 - 0
mhfire-model/src/main/java/com/bizmatics/model/Duty.java

@@ -0,0 +1,49 @@
+package com.bizmatics.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class Duty implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    private String orgaDesc;
+
+    @TableField("DTHH")
+    private String dthh;
+
+    @TableField("LXDH")
+    private String lxdh;
+
+    private String carStatus;
+
+    @TableField("YS")
+    private String ys;
+
+    @TableField("ID")
+    private String id;
+
+    @TableField("CLJC")
+    private String cljc;
+
+    @TableField("CPHM")
+    private String cphm;
+
+    private String ssxfjgid;
+
+
+}

+ 16 - 0
mhfire-service/src/main/java/com/bizmatics/mhfire/service/DutyService.java

@@ -0,0 +1,16 @@
+package com.bizmatics.mhfire.service;
+
+import com.bizmatics.model.Duty;
+import com.bizmatics.common.mvc.base.CrudService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-04
+ */
+public interface DutyService extends CrudService<Duty> {
+
+}

+ 48 - 5
mhfire-service/src/main/java/com/bizmatics/mhfire/service/api/AlertAndSiteApi.java

@@ -11,10 +11,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import lombok.extern.log4j.Log4j2;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author yq
@@ -43,7 +40,15 @@ public class AlertAndSiteApi {
     /**
      * 消防站点url
      */
-    private static final String FIRE_SITE_URL = String.format("%s%s",URL,"/mhxfzd/mhapi/xf/fire/queryNature");;
+    private static final String FIRE_SITE_URL = String.format("%s%s",URL,"/mhxfzd/mhapi/xf/fire/queryNature");
+    /**
+     * 执勤实力url
+     */
+    private static final String Z_Q_URL = String.format("%s%s",URL,"/mhxfzd/mhapi/xf/fire/queryNature");
+    /**
+     * 车辆信息url
+     */
+    private static final String CAR_URL = String.format("%s%s",URL,"/mhxfzd/mhapi/xf/fire/queryNature");
 
     private static final ObjectMapper MAPPER = new ObjectMapper();
 
@@ -143,5 +148,43 @@ public class AlertAndSiteApi {
         }
         return list;
     }
+
+
+
+    /**
+     * 站点集合
+     * @return
+     */
+    public static List<FireSite> dutyApi(){
+        List<FireSite> list = new ArrayList<>();
+        //添加参数信息
+        Map<String,String> params = new HashMap<>();
+
+        //添加token信息
+//        Map<String,String> header = new HashMap<>();
+//        header.put("Authorization",token);
+        try {
+            String result = HttpUtils.postJson(Z_Q_URL, null, null);
+            JsonNode arrNode = MAPPER.readTree(result);
+            if ("200".equals(arrNode.get("code").asText())){
+                JsonNode data = arrNode.get("data");
+                Iterator<String> sites = data.fieldNames();
+
+                while (sites.hasNext()){
+                    String site = sites.next();
+                    JsonNode jsonNode = data.get(site);
+
+                }
+
+            }else {
+                throw new BusinessException("执勤实力api失败"+arrNode.get("msg"));
+            }
+        } catch (IOException e) {
+            throw new BusinessException("调用执勤实力api异常:"+e.getMessage());
+        }
+        return list;
+    }
+
+
 }
 

+ 20 - 0
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/DutyServiceImpl.java

@@ -0,0 +1,20 @@
+package com.bizmatics.mhfire.service.impl;
+
+import com.bizmatics.model.Duty;
+import com.bizmatics.persistence.mapper.DutyMapper;
+import com.bizmatics.mhfire.service.DutyService;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-04
+ */
+@Service
+public class DutyServiceImpl extends AbstractCrudService<DutyMapper, Duty> implements DutyService {
+
+}