Browse Source

添加中队和车辆详情

yq 3 years ago
parent
commit
313783abc0

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

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

+ 39 - 0
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/WlClxxController.java

@@ -0,0 +1,39 @@
+package com.bizmatics.mhfire.controller.web;
+
+
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.mhfire.model.WlClxx;
+import com.bizmatics.mhfire.service.WlClxxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+
+ * 车辆详情
+ * @author ya
+ * @since 2021-11-26
+ */
+@RestController
+@RequestMapping("/wlClxx")
+public class WlClxxController {
+
+
+    @Autowired
+    public WlClxxService wlClxxService;
+
+    /**
+     * 车辆信息集合
+     * @param zdCode 中队编号
+     * @return
+     */
+    @GetMapping("list")
+    public ApiResult<List<WlClxx>> list(@RequestParam String zdCode){
+        return ApiResult.success(wlClxxService.list(zdCode));
+    }
+}
+

+ 0 - 40
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/XfzWxzController.java

@@ -1,20 +1,9 @@
 package com.bizmatics.mhfire.controller.web;
 
 
-import com.bizmatics.common.core.bean.ApiResult;
-import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.mhfire.model.JcjZzclxx;
-import com.bizmatics.mhfire.model.XfzWxz;
-import com.bizmatics.mhfire.service.XfzWxzService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.Date;
-import java.util.List;
-
 /**
  * 消防站点
  * @author ya
@@ -25,34 +14,5 @@ import java.util.List;
 public class XfzWxzController {
 
 
-
-    @Autowired
-    private XfzWxzService xfzWxzService;
-
-
-    /**
-     * 分页
-     * @param current 页数
-     * @param size 条数
-     * @return
-     */
-    @GetMapping("/page")
-    public ApiResult<CommonPage<XfzWxz>> page(@RequestParam Integer current,
-                                              @RequestParam Integer size){
-        return ApiResult.success(xfzWxzService.page(current, size));
-    }
-
-
-    /**
-     * get one
-     * @param id 消防中队id
-     * @return
-     */
-    @GetMapping("/one")
-    public ApiResult<List<JcjZzclxx>> getOne(@RequestParam String id,
-                                             @RequestParam(required = false) Date startTime,
-                                             @RequestParam(required = false) Date endTime){
-        return ApiResult.success(xfzWxzService.getOne(id,startTime,endTime));
-    }
 }
 

+ 26 - 3
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/ZskTeamController.java

@@ -1,9 +1,15 @@
 package com.bizmatics.mhfire.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.mhfire.model.ZskTeam;
+import com.bizmatics.mhfire.service.ZskTeamService;
+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;
 
 /**
 
@@ -11,9 +17,26 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-11-26
  */
-@Controller
+@RestController
 @RequestMapping("/zskTeam")
 public class ZskTeamController {
 
+
+    @Autowired
+    public ZskTeamService zskTeamService;
+
+
+    /**
+     * 分页
+     * @param current 页数
+     * @param size 条数
+     * @return
+     */
+    @GetMapping("/page")
+    public ApiResult<CommonPage<ZskTeam>> page(@RequestParam Integer current,
+                                               @RequestParam Integer size){
+        return ApiResult.success(zskTeamService.page(current, size));
+    }
+
 }
 

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

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

+ 94 - 0
mhfire-mapping/src/main/resources/mapper/mysql/WlClxxMapper.xml

@@ -0,0 +1,94 @@
+<?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.mhfire.persistence.mapper.WlClxxMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.bizmatics.mhfire.model.WlClxx">
+        <id column="ID" property="id" />
+        <result column="DJZBBM" property="djzbbm" />
+        <result column="ZBMC" property="zbmc" />
+        <result column="ZBBM" property="zbbm" />
+        <result column="SJZBBM" property="sjzbbm" />
+        <result column="ZBLXDM" property="zblxdm" />
+        <result column="DJZBZKDM" property="djzbzkdm" />
+        <result column="SSXFJGID" property="ssxfjgid" />
+        <result column="GPSBH" property="gpsbh" />
+        <result column="CLDJDM" property="cldjdm" />
+        <result column="CPHM" property="cphm" />
+        <result column="GGXH" property="ggxh" />
+        <result column="ZCBH" property="zcbh" />
+        <result column="CKJ" property="ckj" />
+        <result column="SB" property="sb" />
+        <result column="YS" property="ys" />
+        <result column="GBDM" property="gbdm" />
+        <result column="SCCJID" property="sccjid" />
+        <result column="SCCJMC" property="sccjmc" />
+        <result column="ZBRQ" property="zbrq" />
+        <result column="BFRQ" property="bfrq" />
+        <result column="YXQZ" property="yxqz" />
+        <result column="CJH" property="cjh" />
+        <result column="FDJBH" property="fdjbh" />
+        <result column="PCH" property="pch" />
+        <result column="JLDWDM" property="jldwdm" />
+        <result column="CLZDDM_MH" property="clzddmMh" />
+        <result column="record_status" property="recordStatus" />
+        <result column="tran_status" property="tranStatus" />
+        <result column="time_stamp" property="timeStamp" />
+        <result column="remark" property="remark" />
+        <result column="DTHH" property="dthh" />
+        <result column="AJBH" property="ajbh" />
+        <result column="SFZP" property="sfzp" />
+        <result column="cross_deta" property="crossDeta" />
+        <result column="cross_team" property="crossTeam" />
+        <result column="CLBH" property="clbh" />
+        <result column="CJSJ" property="cjsj" />
+        <result column="CCRQ" property="ccrq" />
+        <result column="CLJC" property="cljc" />
+        <result column="radio_channel" property="radioChannel" />
+        <result column="gis_x" property="gisX" />
+        <result column="gis_y" property="gisY" />
+        <result column="ZHY" property="zhy" />
+        <result column="TXY" property="txy" />
+        <result column="JSY" property="jsy" />
+        <result column="ZDRYRS" property="zdryrs" />
+        <result column="zdbz" property="zdbz" />
+        <result column="sjjsy" property="sjjsy" />
+        <result column="tczhc" property="tczhc" />
+        <result column="lxdh" property="lxdh" />
+        <result column="YXX" property="yxx" />
+        <result column="ZS" property="zs" />
+        <result column="ZP" property="zp" />
+        <result column="BLL" property="bll" />
+        <result column="PLL" property="pll" />
+        <result column="scaling_hegiht" property="scalingHegiht" />
+        <result column="ledsx" property="ledsx" />
+        <result column="xzjgid" property="xzjgid" />
+        <result column="zldm" property="zldm" />
+        <result column="zhyid" property="zhyid" />
+        <result column="txyid" property="txyid" />
+        <result column="jsyid" property="jsyid" />
+        <result column="zsry" property="zsry" />
+        <result column="zsryid" property="zsryid" />
+        <result column="ledcmsx" property="ledcmsx" />
+        <result column="stbll" property="stbll" />
+        <result column="blbz" property="blbz" />
+        <result column="pdabh" property="pdabh" />
+        <result column="sfdyjg" property="sfdyjg" />
+        <result column="cldtid" property="cldtid" />
+        <result column="bdp_audtt" property="bdpAudtt" />
+        <result column="SJC" property="sjc" />
+        <result column="car_status" property="carStatus" />
+        <result column="equip_type_name" property="equipTypeName" />
+        <result column="orga_name" property="orgaName" />
+        <result column="orga_desc" property="orgaDesc" />
+        <result column="jgtree" property="jgtree" />
+        <result column="orga_abbrevia" property="orgaAbbrevia" />
+        <result column="orga_sort" property="orgaSort" />
+        <result column="standardNum" property="standardNum" />
+        <result column="carUrl" property="carUrl" />
+        <result column="SJJGID" property="sjjgid" />
+        <result column="zhidui" property="zhidui" />
+        <result column="UPDATED" property="updated" />
+    </resultMap>
+
+</mapper>

+ 436 - 0
mhfire-model/src/main/java/com/bizmatics/mhfire/model/WlClxx.java

@@ -0,0 +1,436 @@
+package com.bizmatics.mhfire.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class WlClxx implements Serializable {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 车辆信息
+     */
+    @TableId("ID")
+    private String id;
+
+    /**
+     * 单件装备编码
+     */
+    @TableField("DJZBBM")
+    private String djzbbm;
+
+    /**
+     * 装备名称
+     */
+    @TableField("ZBMC")
+    private String zbmc;
+
+    /**
+     * 装备编码
+     */
+    @TableField("ZBBM")
+    private String zbbm;
+
+    /**
+     * 上级装备编码
+     */
+    @TableField("SJZBBM")
+    private String sjzbbm;
+
+    /**
+     * 装备类型代码
+     */
+    @TableField("ZBLXDM")
+    private String zblxdm;
+
+    /**
+     * 单件装备状况代码
+     */
+    @TableField("DJZBZKDM")
+    private String djzbzkdm;
+
+    /**
+     * 所属消防机构
+     */
+    @TableField("SSXFJGID")
+    private String ssxfjgid;
+
+    /**
+     * GPS编号
+     */
+    @TableField("GPSBH")
+    private String gpsbh;
+
+    /**
+     * 车辆等级代码
+     */
+    @TableField("CLDJDM")
+    private String cldjdm;
+
+    /**
+     * 车牌号码
+     */
+    @TableField("CPHM")
+    private String cphm;
+
+    /**
+     * 规格号码
+     */
+    @TableField("GGXH")
+    private String ggxh;
+
+    /**
+     * 资产编号
+     */
+    @TableField("ZCBH")
+    private String zcbh;
+
+    /**
+     * 参考价
+     */
+    @TableField("CKJ")
+    private BigDecimal ckj;
+
+    /**
+     * 商标
+     */
+    @TableField("SB")
+    private String sb;
+
+    /**
+     * 颜色
+     */
+    @TableField("YS")
+    private String ys;
+
+    /**
+     * 国别代码
+     */
+    @TableField("GBDM")
+    private String gbdm;
+
+    /**
+     * 生产厂家代码
+     */
+    @TableField("SCCJID")
+    private String sccjid;
+
+    /**
+     * 生产厂家名称
+     */
+    @TableField("SCCJMC")
+    private String sccjmc;
+
+    /**
+     * 装备日期
+     */
+    @TableField("ZBRQ")
+    private LocalDateTime zbrq;
+
+    /**
+     * 报废日期
+     */
+    @TableField("BFRQ")
+    private LocalDateTime bfrq;
+
+    /**
+     * 有效期至
+     */
+    @TableField("YXQZ")
+    private LocalDateTime yxqz;
+
+    /**
+     * 车架号
+     */
+    @TableField("CJH")
+    private String cjh;
+
+    /**
+     * 发动机编号
+     */
+    @TableField("FDJBH")
+    private String fdjbh;
+
+    /**
+     * 批次号
+     */
+    @TableField("PCH")
+    private String pch;
+
+    /**
+     * 计量单位代码
+     */
+    @TableField("JLDWDM")
+    private String jldwdm;
+
+    /**
+     * 车辆状态码_灭火
+     */
+    @TableField("CLZDDM_MH")
+    private String clzddmMh;
+
+    /**
+     * 记录状态
+     */
+    private BigDecimal recordStatus;
+
+    /**
+     * 传输状态
+     */
+    private String tranStatus;
+
+    /**
+     * 时间戳
+     */
+    private LocalDateTime timeStamp;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 电台呼号
+     */
+    @TableField("DTHH")
+    private String dthh;
+
+    /**
+     * 处警单编号
+     */
+    @TableField("AJBH")
+    private String ajbh;
+
+    /**
+     * 是否装配
+     */
+    @TableField("SFZP")
+    private String sfzp;
+
+    /**
+     * 是否跨支队
+     */
+    private String crossDeta;
+
+    /**
+     * 是否跨总队
+     */
+    private String crossTeam;
+
+    /**
+     * 车辆编号
+     */
+    @TableField("CLBH")
+    private String clbh;
+
+    /**
+     * 创建时间
+     */
+    @TableField("CJSJ")
+    private LocalDateTime cjsj;
+
+    @TableField("CCRQ")
+    private LocalDateTime ccrq;
+
+    /**
+     * 车辆简称
+     */
+    @TableField("CLJC")
+    private String cljc;
+
+    /**
+     * 电台频道
+     */
+    private String radioChannel;
+
+    private String gisX;
+
+    private String gisY;
+
+    /**
+     * 指挥员姓名
+     */
+    @TableField("ZHY")
+    private String zhy;
+
+    /**
+     * 通信员
+     */
+    @TableField("TXY")
+    private String txy;
+
+    /**
+     * 驾驶员
+     */
+    @TableField("JSY")
+    private String jsy;
+
+    /**
+     * 战斗员人数
+     */
+    @TableField("ZDRYRS")
+    private String zdryrs;
+
+    private String zdbz;
+
+    private String sjjsy;
+
+    private String tczhc;
+
+    /**
+     * 类型编号
+     */
+    private String lxdh;
+
+    /**
+     * 启用标志
+     */
+    @TableField("YXX")
+    private String yxx;
+
+    /**
+     * 载水(吨)
+     */
+    @TableField("ZS")
+    private String zs;
+
+    /**
+     * 载泡(吨)
+     */
+    @TableField("ZP")
+    private String zp;
+
+    /**
+     * 泵流量
+     */
+    @TableField("BLL")
+    private String bll;
+
+    /**
+     * 泡流量
+     */
+    @TableField("PLL")
+    private String pll;
+
+    /**
+     * 云梯高度
+     */
+    private String scalingHegiht;
+
+    private BigDecimal ledsx;
+
+    private String xzjgid;
+
+    private String zldm;
+
+    /**
+     * 指挥员id
+     */
+    private String zhyid;
+
+    /**
+     * 通讯员id
+     */
+    private String txyid;
+
+    /**
+     * 驾驶员id
+     */
+    private String jsyid;
+
+    /**
+     * 战士人员
+     */
+    private String zsry;
+
+    /**
+     * 战士人员id
+     */
+    private String zsryid;
+
+    private BigDecimal ledcmsx;
+
+    private String stbll;
+
+    private String blbz;
+
+    private String pdabh;
+
+    private String sfdyjg;
+
+    private String cldtid;
+
+    private LocalDateTime bdpAudtt;
+
+    @TableField("SJC")
+    private LocalDateTime sjc;
+
+    /**
+     * 车辆状态
+     */
+    private String carStatus;
+
+    /**
+     * 装备类型名称
+     */
+    private String equipTypeName;
+
+    /**
+     * 机构名称
+     */
+    private String orgaName;
+
+    /**
+     * 机构简称
+     */
+    private String orgaDesc;
+
+    private String jgtree;
+
+    /**
+     * 机构缩写
+     */
+    private String orgaAbbrevia;
+
+    /**
+     * 机构显示顺序
+     */
+    private Integer orgaSort;
+
+    /**
+     * 车辆最大人数限制
+     */
+    @TableField("standardNum")
+    private BigDecimal standardNum;
+
+    @TableField("carUrl")
+    private String carUrl;
+
+    @TableField("SJJGID")
+    private String sjjgid;
+
+    private String zhidui;
+
+    @TableField("UPDATED")
+    private LocalDateTime updated;
+
+
+}

+ 21 - 0
mhfire-service/src/main/java/com/bizmatics/mhfire/service/WlClxxService.java

@@ -0,0 +1,21 @@
+package com.bizmatics.mhfire.service;
+
+import com.bizmatics.mhfire.model.WlClxx;
+import com.bizmatics.common.mvc.base.CrudService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-26
+ */
+public interface WlClxxService extends CrudService<WlClxx> {
+
+
+
+    List<WlClxx> list(String zdCode);
+}

+ 0 - 17
mhfire-service/src/main/java/com/bizmatics/mhfire/service/XfzWxzService.java

@@ -1,13 +1,8 @@
 package com.bizmatics.mhfire.service;
 
-import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.common.mvc.base.CrudService;
-import com.bizmatics.mhfire.model.JcjZzclxx;
 import com.bizmatics.mhfire.model.XfzWxz;
 
-import java.util.Date;
-import java.util.List;
-
 /**
  * <p>
  *  服务类
@@ -18,17 +13,5 @@ import java.util.List;
  */
 public interface XfzWxzService extends CrudService<XfzWxz> {
 
-    /**
-     * 分页
-     * @return
-     */
-    CommonPage<XfzWxz> page(Integer current, Integer size);
-
 
-    /**
-     * get one
-     * @param id
-     * @return
-     */
-    List<JcjZzclxx> getOne(String id, Date startTime, Date endTime);
 }

+ 9 - 0
mhfire-service/src/main/java/com/bizmatics/mhfire/service/ZskTeamService.java

@@ -1,5 +1,6 @@
 package com.bizmatics.mhfire.service;
 
+import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.mhfire.model.ZskTeam;
 import com.bizmatics.common.mvc.base.CrudService;
 
@@ -13,4 +14,12 @@ import com.bizmatics.common.mvc.base.CrudService;
  */
 public interface ZskTeamService extends CrudService<ZskTeam> {
 
+
+    /**
+     * 分页
+     * @param current
+     * @param size
+     * @return
+     */
+    CommonPage<ZskTeam> page(Integer current,Integer size);
 }

+ 10 - 8
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/JcjAjxxServiceImpl.java

@@ -167,14 +167,16 @@ public class JcjAjxxServiceImpl extends AbstractCrudService<JcjAjxxMapper, JcjAj
         Date startTime = DateUtils.addMonths(jcjAjxx.getLasj(), -30);
         Date endTime = DateUtils.addMonths(jcjAjxx.getLasj(), 30);
         List<LocateInfo> lonLat = GouldUtil.getLonLat(jcjAjxx.getAfdz());
-        LocateInfo locateInfo = lonLat.get(0);
-        //计算精度维度在一定范围内的数据和火灾关联
-        List<FireStatisticsPO> list = fireStatisticsService.distanceList(locateInfo.getLongitude(), locateInfo.getLatitude(), startTime, endTime);
-        if (CollectionUtils.isNotEmpty(list)){
-            FireStatisticsPO fireStatisticsPo = list.get(0);
-            jcjAjxx.setPropertyLoss(fireStatisticsPo.getPropertyLoss());
-            jcjAjxx.setDeathToll(fireStatisticsPo.getDeathToll());
-            jcjAjxx.setNonFatal(fireStatisticsPo.getNonFatal());
+        if (CollectionUtils.isNotEmpty(lonLat)){
+            LocateInfo locateInfo = lonLat.get(0);
+            //计算精度维度在一定范围内的数据和火灾关联
+            List<FireStatisticsPO> list = fireStatisticsService.distanceList(locateInfo.getLongitude(), locateInfo.getLatitude(), startTime, endTime);
+            if (CollectionUtils.isNotEmpty(list)){
+                FireStatisticsPO fireStatisticsPo = list.get(0);
+                jcjAjxx.setPropertyLoss(fireStatisticsPo.getPropertyLoss());
+                jcjAjxx.setDeathToll(fireStatisticsPo.getDeathToll());
+                jcjAjxx.setNonFatal(fireStatisticsPo.getNonFatal());
+            }
         }
     }
 

+ 32 - 0
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/WlClxxServiceImpl.java

@@ -0,0 +1,32 @@
+package com.bizmatics.mhfire.service.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
+import com.bizmatics.mhfire.model.WlClxx;
+import com.bizmatics.mhfire.persistence.mapper.WlClxxMapper;
+import com.bizmatics.mhfire.service.WlClxxService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ya
+ * @since 2021-11-26
+ */
+@DS("mhsystem")
+@Service
+public class WlClxxServiceImpl extends AbstractCrudService<WlClxxMapper, WlClxx> implements WlClxxService {
+
+    @Override
+    public List<WlClxx> list(String zdCode) {
+        LambdaQueryWrapper<WlClxx> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(WlClxx::getSsxfjgid,zdCode);
+        return this.list(queryWrapper);
+    }
+}

+ 0 - 36
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/XfzWxzServiceImpl.java

@@ -1,27 +1,12 @@
 package com.bizmatics.mhfire.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.common.core.exception.BusinessException;
 import com.bizmatics.common.mvc.base.AbstractCrudService;
-import com.bizmatics.mhfire.model.JcjZzclxx;
 import com.bizmatics.mhfire.model.XfzWxz;
-import com.bizmatics.mhfire.model.ZskTeam;
 import com.bizmatics.mhfire.persistence.mapper.XfzWxzMapper;
-import com.bizmatics.mhfire.service.JcjZzclxxService;
 import com.bizmatics.mhfire.service.XfzWxzService;
-import com.bizmatics.mhfire.service.ZskTeamService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
-
 /**
  * <p>
  *  服务实现类
@@ -34,25 +19,4 @@ import java.util.Optional;
 @Service
 public class XfzWxzServiceImpl extends AbstractCrudService<XfzWxzMapper, XfzWxz> implements XfzWxzService {
 
-    @Autowired
-    private JcjZzclxxService jcjZzclxxService;
-    @Autowired
-    private ZskTeamService zskTeamService;
-    @Override
-    public CommonPage<XfzWxz> page(Integer current, Integer size) {
-        IPage<XfzWxz> page = new Page<>(current, size);
-        LambdaQueryWrapper<XfzWxz> queryWrapper = Wrappers.lambdaQuery();
-        page = this.page(page, queryWrapper);
-        return this.ToCommonPage(page);
-    }
-
-    @Override
-    public List<JcjZzclxx> getOne(String zdId, Date startTime,Date endTime) {
-        ZskTeam zskTeam = zskTeamService.getById(zdId);
-        Optional.ofNullable(zskTeam).orElseThrow(() -> new BusinessException("中队数据为空"));
-        LambdaQueryWrapper<JcjZzclxx> queryWrapper = Wrappers.lambdaQuery();
-        queryWrapper.eq(JcjZzclxx::getJgxxXfjgId,zskTeam.getXfjgId());
-        queryWrapper.between(JcjZzclxx::getTssj,startTime,endTime);
-        return jcjZzclxxService.list(queryWrapper);
-    }
 }

+ 15 - 1
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/ZskTeamServiceImpl.java

@@ -1,9 +1,15 @@
 package com.bizmatics.mhfire.service.impl;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.common.mvc.base.AbstractCrudService;
 import com.bizmatics.mhfire.model.ZskTeam;
 import com.bizmatics.mhfire.persistence.mapper.ZskTeamMapper;
 import com.bizmatics.mhfire.service.ZskTeamService;
-import com.bizmatics.common.mvc.base.AbstractCrudService;
 import org.springframework.stereotype.Service;
 
 /**
@@ -14,7 +20,15 @@ import org.springframework.stereotype.Service;
  * @author ya
  * @since 2021-11-26
  */
+@DS("mhsystem")
 @Service
 public class ZskTeamServiceImpl extends AbstractCrudService<ZskTeamMapper, ZskTeam> implements ZskTeamService {
 
+    @Override
+    public CommonPage<ZskTeam> page(Integer current, Integer size) {
+        IPage<ZskTeam> page = new Page<>(current, size);
+        LambdaQueryWrapper<ZskTeam> queryWrapper = Wrappers.lambdaQuery();
+        page = this.page(page, queryWrapper);
+        return this.ToCommonPage(page);
+    }
 }