Browse Source

Merge remote-tracking branch 'origin/master'

wuhonghao 4 years ago
parent
commit
affa377dac

+ 47 - 22
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusFjxgmdController.java

@@ -1,43 +1,68 @@
 package com.railway.web.controller.business.catenary;
 
-
-import com.railway.business.catenary.domain.vo.BusFjxgmdVo;
-import com.railway.business.catenary.service.BusFjxgmdService;
+import com.railway.business.catenary.domain.BusFjxgmd;
+import com.railway.business.catenary.service.IBusFjxgmdService;
 import com.railway.common.core.controller.BaseController;
 import com.railway.common.core.domain.AjaxResult;
 import com.railway.common.core.page.TableDataInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
 import java.util.List;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- * 附加悬挂锚段 前端控制器
- * </p>
- *
- * @author railway
- * @since 2021-10-11
- */
-@Api(value = "rest/catenary/bus/fjxgmd", tags = "APP-附加悬挂锚段")
+
+@Api(value = "rest/catenary/bus/fjxgmd", tags = "基础数据-附加悬挂锚段")
 @RestController
+@Validated
 @RequestMapping(value = "business/catenary/bus/fjxgmd")
 public class BusFjxgmdController extends BaseController {
+    @Autowired
+    private IBusFjxgmdService busFjxgmdService;
+
+    @ApiOperation(value = "新增")
+    @PostMapping("/add")
+    public AjaxResult add(@Validated @RequestBody BusFjxgmd busFjxgmd) {
+        return toAjax(busFjxgmdService.create(busFjxgmd));
+    }
+
+    @ApiOperation(value = "删除")
+    @DeleteMapping("/{ids}")
+    public AjaxResult delete(@PathVariable(value = "ids") String[] ids) {
+        return toAjax(busFjxgmdService.delete(ids));
+    }
 
-    private final BusFjxgmdService busFjxgmdService;
+    @ApiOperation(value = "更新")
+    @PutMapping("/update")
+    public AjaxResult update(@RequestBody @Valid BusFjxgmd busFjxgmd) {
+        return toAjax(busFjxgmdService.update(busFjxgmd));
+    }
 
-    public BusFjxgmdController(BusFjxgmdService busFjxgmdService) {
-        this.busFjxgmdService = busFjxgmdService;
+    @ApiOperation(value = "单个")
+    @GetMapping(value = {"/", "/{id}"})
+    public AjaxResult getInfo(@PathVariable(value = "id") String id) {
+        BusFjxgmd info = busFjxgmdService.getInfo(id);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("info",info);
+        return ajax;
+    }
+
+    @ApiOperation(value = "列表")
+    @GetMapping(value = "list")
+    public TableDataInfo getList(BusFjxgmd busFjxgmd) {
+        startPage();
+        List<BusFjxgmd> list = busFjxgmdService.getList(busFjxgmd);
+        return getDataTable(list);
     }
 
     @ApiOperation(value = "通过支柱信息获取对锚列表", notes = "通过支柱信息获取对锚列表", response = AjaxResult.class)
     @GetMapping("/getListByZz")
-    public TableDataInfo getList(BusFjxgmdVo busFjxgmdVo) {
+    public TableDataInfo getListByZz(BusFjxgmd busFjxgmd) {
         startPage();
-        List<BusFjxgmdVo> list = busFjxgmdService.getListByZz(busFjxgmdVo);
+        List<BusFjxgmd> list = busFjxgmdService.getListByZz(busFjxgmd);
         return getDataTable(list);
     }
-}
 
+}

+ 60 - 0
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusGlkgController.java

@@ -0,0 +1,60 @@
+package com.railway.web.controller.business.catenary;
+
+import com.railway.business.catenary.domain.BusGlkg;
+import com.railway.business.catenary.service.IBusGlkgService;
+import com.railway.common.core.controller.BaseController;
+import com.railway.common.core.domain.AjaxResult;
+import com.railway.common.core.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+@Api(value = "rest/catenary/bus/glkg", tags = "基础数据-检查表-隔离开关")
+@RestController
+@Validated
+@RequestMapping(value = "business/catenary/bus/glkg")
+public class BusGlkgController extends BaseController {
+    @Autowired
+    private IBusGlkgService busGlkgService;
+
+    @ApiOperation(value = "新增")
+    @PostMapping("/add")
+    public AjaxResult add(@Validated @RequestBody BusGlkg busGlkg) {
+        return toAjax(busGlkgService.create(busGlkg));
+    }
+
+    @ApiOperation(value = "删除")
+    @DeleteMapping("/{ids}")
+    public AjaxResult delete(@PathVariable(value = "ids") String[] ids) {
+        return toAjax(busGlkgService.delete(ids));
+    }
+
+    @ApiOperation(value = "更新")
+    @PutMapping("/update")
+    public AjaxResult update(@RequestBody @Valid BusGlkg busGlkg) {
+        return toAjax(busGlkgService.update(busGlkg));
+    }
+
+    @ApiOperation(value = "单个")
+    @GetMapping(value = {"/", "/{id}"})
+    public AjaxResult getInfo(@PathVariable(value = "id") String id) {
+        BusGlkg info = busGlkgService.getInfo(id);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("info",info);
+        return ajax;
+    }
+
+    @ApiOperation(value = "列表")
+    @GetMapping(value = "list")
+    public TableDataInfo getList(BusGlkg busGlkg) {
+        startPage();
+        List<BusGlkg> list = busGlkgService.getList(busGlkg);
+        return getDataTable(list);
+    }
+
+}

+ 48 - 138
railway-business/src/main/java/com/railway/business/catenary/domain/BusFjxgmd.java

@@ -1,168 +1,78 @@
 package com.railway.business.catenary.domain;
 
 import com.railway.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
+import org.hibernate.validator.constraints.Length;
 /**
- * <p>
  * 附加悬挂锚段
- * </p>
- *
- * @author railway
- * @since 2021-10-11
+ * @author author 2021-10-26
  */
 @Data
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class BusFjxgmd extends BaseEntity {
-
-    private static final long serialVersionUID = 1L;
+@ApiModel("附加悬挂锚段")
+@EqualsAndHashCode(callSuper = true)
+public class BusFjxgmd extends BaseEntity{
 
-    /**
-     * 主键
-     */
-    private Long id;
+    @ApiModelProperty(value = "主键")
+    private String id;
 
-    /**
-     * 段别
-     */
+    @ApiModelProperty(value = "段别")
+    @Length(min = 1, max = 100, message = "【段别】长度必须介于 {min} 和 {max} 之间")
     private String db;
 
-    /**
-     * 所属部门
-     */
+    @ApiModelProperty(value = "部门/车间")
+    @Length(min = 1, max = 100, message = "【部门/车间】长度必须介于 {min} 和 {max} 之间")
     private String bm;
 
-    /**
-     * 线别
-     */
+    @ApiModelProperty(value = "所属部门名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "线别")
+    @Length(min = 1, max = 100, message = "【线别】长度必须介于 {min} 和 {max} 之间")
     private String xb;
 
-    /**
-     * 站/区间
-     */
+    @ApiModelProperty(value = "线别名称")
+    private String lineName;
+
+    @ApiModelProperty(value = "站/区间")
+    @Length(min = 1, max = 100, message = "【站/区间】长度必须介于 {min} 和 {max} 之间")
     private String qj;
 
-    /**
-     * 行别
-     */
-    private String hb;
+    @ApiModelProperty(value = "区间名称")
+    private String stationName;
 
-    /**
-     * 股道
-     */
-    private String gd;
+    @ApiModelProperty(value = "行别")
+    @Length(min = 1, max = 100, message = "【行别】长度必须介于 {min} 和 {max} 之间")
+    private String hb;
 
-    /**
-     * 管辖模式
-     */
-    private String gxms;
+    @ApiModelProperty(value = "行别字典中文")
+    private String xingbieText;
 
-    /**
-     * 附加类型
-     */
+    @ApiModelProperty(value = "附加类型")
+    @Length(min = 1, max = 100, message = "【附加类型】长度必须介于 {min} 和 {max} 之间")
     private String fjlx;
 
-    /**
-     * 锚段号
-     */
-    private String mdh;
+    @ApiModelProperty(value = "附加类型字典中文")
+    private String fjlxText;
 
-    /**
-     * 锚段长度(m)
-     */
-    private String mdcd;
+    @ApiModelProperty(value = "起始公里标(km)")
+    @Length(min = 1, max = 100, message = "【起始公里标(km)】长度必须介于 {min} 和 {max} 之间")
+    private String qsglb;
 
-    /**
-     * 投运日期
-     */
-    private String tyrq;
+    @ApiModelProperty(value = "起始杆号")
+    @Length(min = 1, max = 100, message = "【起始杆号】长度必须介于 {min} 和 {max} 之间")
+    private String qsgh;
 
-    /**
-     * 起始公里标(km)
-     */
-    private String qsglb;
+    @ApiModelProperty(value = "del_flag")
+    @Length(min = 1, max = 1, message = "【del_flag】长度必须介于 {min} 和 {max} 之间")
+    private String delFlag;
 
-    /**
-     * 结束公里标(km)
-     */
-    private String jsglb;
+    @ApiModelProperty(value = "支柱范围")
+    private String zzfw;
 
-    /**
-     * 起始杆号
-     */
-    private String qsgh;
+    public BusFjxgmd() {
+    }
 
-    /**
-     * 截止杆号
-     */
-    private String jzgh;
-
-    /**
-     * 线索材质
-     */
-    private String xscz;
-
-    /**
-     * 线索型号
-     */
-    private String xsxh;
-
-    /**
-     * 线索张力(kN)
-     */
-    private String xszl;
-
-    /**
-     * 线索厂家
-     */
-    private String xscj;
-
-    /**
-     * 接头数量
-     */
-    private String jtsl;
-
-    /**
-     * 补强数量
-     */
-    private String bqsl;
-
-    /**
-     * AF线
-     */
-    private String afx;
-
-    /**
-     * 避雷线
-     */
-    private String blx;
-
-    /**
-     * 其它
-     */
-    private String qt;
-
-    /**
-     * 附件
-     */
-    private String fj;
-
-    /**
-     * 数量
-     */
-    private String sl;
-
-    /**
-     * 单位
-     */
-    private String dw;
-
-    /**
-     * 数据编号
-     */
-    private String slbh;
-
-}
+}

+ 80 - 0
railway-business/src/main/java/com/railway/business/catenary/domain/BusGlkg.java

@@ -0,0 +1,80 @@
+package com.railway.business.catenary.domain;
+
+import com.railway.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.hibernate.validator.constraints.Length;
+/**
+ * 基础数据-检查表-隔离开关
+ * @author author 2021-10-26
+ */
+@Data
+@ApiModel("基础数据-检查表-隔离开关")
+@EqualsAndHashCode(callSuper = true)
+public class BusGlkg extends BaseEntity{
+
+    @ApiModelProperty(value = "主键")
+    private String id;
+
+    @ApiModelProperty(value = "段别")
+    @Length(min = 1, max = 100, message = "【段别】长度必须介于 {min} 和 {max} 之间")
+    private String db;
+
+    @ApiModelProperty(value = "所属部门")
+    @Length(min = 1, max = 100, message = "【所属部门】长度必须介于 {min} 和 {max} 之间")
+    private String bm;
+
+    @ApiModelProperty(value = "所属部门名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "线别")
+    @Length(min = 1, max = 100, message = "【线别】长度必须介于 {min} 和 {max} 之间")
+    private String xb;
+
+    @ApiModelProperty(value = "线别名称")
+    private String lineName;
+
+    @ApiModelProperty(value = "区间")
+    @Length(min = 1, max = 100, message = "【区间】长度必须介于 {min} 和 {max} 之间")
+    private String qj;
+
+    @ApiModelProperty(value = "区间名称")
+    private String stationName;
+
+    @ApiModelProperty(value = "行别")
+    @Length(min = 1, max = 100, message = "【行别】长度必须介于 {min} 和 {max} 之间")
+    private String hb;
+
+    @ApiModelProperty(value = "行别字典中文")
+    private String xingbieText;
+
+    @ApiModelProperty(value = "支柱号")
+    @Length(min = 1, max = 100, message = "【支柱号】长度必须介于 {min} 和 {max} 之间")
+    private String zzh;
+
+    @ApiModelProperty(value = "公里标")
+    @Length(min = 1, max = 100, message = "【公里标】长度必须介于 {min} 和 {max} 之间")
+    private String glb;
+
+    @ApiModelProperty(value = "开关编号")
+    @Length(min = 1, max = 100, message = "【开关编号】长度必须介于 {min} 和 {max} 之间")
+    private String kgbh;
+
+    @ApiModelProperty(value = "生产厂家")
+    @Length(min = 1, max = 200, message = "【生产厂家】长度必须介于 {min} 和 {max} 之间")
+    private String sccj;
+
+    @ApiModelProperty(value = "开关型号")
+    @Length(min = 1, max = 100, message = "【开关型号】长度必须介于 {min} 和 {max} 之间")
+    private String kgxh;
+
+    @ApiModelProperty(value = "del_flag")
+    @Length(min = 1, max = 1, message = "【del_flag】长度必须介于 {min} 和 {max} 之间")
+    private String delFlag;
+
+    public BusGlkg() {
+    }
+
+}

+ 0 - 50
railway-business/src/main/java/com/railway/business/catenary/domain/vo/BusFjxgmdVo.java

@@ -1,50 +0,0 @@
-package com.railway.business.catenary.domain.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@Data
-public class BusFjxgmdVo {
-
-    /**
-     * 支柱号
-     */
-    @ApiModelProperty(value = "支柱号")
-    private String zzh;
-
-    /**
-     * 支柱前后范围
-     */
-    @ApiModelProperty(value = "支柱前后范围")
-    private String zzfw;
-
-    /**
-     * 起始公里标(km)
-     */
-    @ApiModelProperty(value = "起始公里标(km)")
-    private String qsglb;
-
-    /**
-     * 所属部门
-     */
-    @ApiModelProperty(value = "所属部门")
-    private String bm;
-
-    /**
-     * 线别
-     */
-    @ApiModelProperty(value = "线别")
-    private String xb;
-
-    /**
-     * 站/区间
-     */
-    @ApiModelProperty(value = "站/区间")
-    private String qj;
-
-    /**
-     * 行别
-     */
-    @ApiModelProperty(value = "行别")
-    private String hb;
-}

+ 35 - 11
railway-business/src/main/java/com/railway/business/catenary/mapper/BusFjxgmdMapper.java

@@ -1,26 +1,50 @@
 package com.railway.business.catenary.mapper;
 
+import com.github.pagehelper.Page;
 import com.railway.business.catenary.domain.BusFjxgmd;
-import com.railway.business.catenary.domain.vo.BusFjxgmdVo;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
 
 /**
- * <p>
- * 附加悬挂锚段 Mapper 接口
- * </p>
- *
- * @author railway
- * @since 2021-10-11
+ * 附加悬挂锚段
+ * @author author
+ * @date 2021/10/26
  */
-
+@Mapper
 @Repository
 public interface BusFjxgmdMapper {
-    BusFjxgmd selectById(@Param("id") Long id);
+    /**
+     * @Description: 新增
+     */
+    int insert(BusFjxgmd busFjxgmd);
+
+    /**
+     * @Description: 删除
+     */
+    int delete(@Param("id") String id);
+
+    /**
+     * @Description: 更新
+     */
+    int update(BusFjxgmd busFjxgmd);
+
+    /**
+     * @Description: 获取单个
+     */
+    BusFjxgmd getInfo(@Param("id") String id);
 
-    List<BusFjxgmd> getList();
+    /**
+     * @Description: 查询列表
+     */
+    Page<BusFjxgmd> getList(BusFjxgmd busFjxgmd);
 
-    List<BusFjxgmdVo> getListByZz(@Param("query") BusFjxgmdVo busFjxgmdVo);
+    /**
+     * 通过支柱信息获取对锚列表
+     * @param busFjxgmd
+     * @return
+     */
+    List<BusFjxgmd> getListByZz(@Param("query") BusFjxgmd busFjxgmd);
 }

+ 43 - 0
railway-business/src/main/java/com/railway/business/catenary/mapper/BusGlkgMapper.java

@@ -0,0 +1,43 @@
+package com.railway.business.catenary.mapper;
+
+import com.github.pagehelper.Page;
+import com.railway.business.catenary.domain.BusGlkg;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+/**
+* 基础数据-检查表-隔离开关
+* @author author
+* @date 2021/10/26
+*/
+@Mapper
+@Repository
+public interface BusGlkgMapper {
+
+    /**
+    * @Description: 新增
+    */
+    int insert(BusGlkg busGlkg);
+
+    /**
+    * @Description: 删除
+    */
+    int delete(@Param("id") String id);
+
+    /**
+    * @Description: 更新
+    */
+    int update(BusGlkg busGlkg);
+
+    /**
+    * @Description: 获取单个
+    */
+    BusGlkg getInfo(@Param("id") String id);
+
+    /**
+    * @Description: 查询列表
+    */
+    Page<BusGlkg> getList(BusGlkg busGlkg);
+
+}

+ 0 - 23
railway-business/src/main/java/com/railway/business/catenary/service/BusFjxgmdService.java

@@ -1,23 +0,0 @@
-package com.railway.business.catenary.service;
-
-import com.railway.business.catenary.domain.BusFjxgmd;
-import com.railway.business.catenary.domain.vo.BusFjxgmdVo;
-
-import java.util.List;
-
-/**
- * <p>
- * 附加悬挂锚段 服务类
- * </p>
- *
- * @author railway
- * @since 2021-10-11
- */
-public interface BusFjxgmdService {
-
-    BusFjxgmd getById(Long id);
-
-    List<BusFjxgmd> getList();
-
-    List<BusFjxgmdVo> getListByZz(BusFjxgmdVo busFjxgmdVo);
-}

+ 48 - 0
railway-business/src/main/java/com/railway/business/catenary/service/IBusFjxgmdService.java

@@ -0,0 +1,48 @@
+package com.railway.business.catenary.service;
+
+import com.railway.business.catenary.domain.BusFjxgmd;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 附加悬挂锚段 服务类
+ * </p>
+ *
+ * @author railway
+ * @since 2021-10-11
+ */
+public interface IBusFjxgmdService {
+
+    /**
+     * @Description: 新增
+     */
+    int create(BusFjxgmd busFjxgmd);
+
+    /**
+     * @Description: 删除
+     */
+    int delete(String[] ids);
+
+    /**
+     * @Description: 更新
+     */
+    int update(BusFjxgmd busFjxgmd);
+
+    /**
+     * @Description: 获取单个
+     */
+    BusFjxgmd getInfo(String id);
+
+    /**
+     * @Description: 查询列表
+     */
+    List<BusFjxgmd> getList(BusFjxgmd busFjxgmd);
+
+    /**
+     * 通过支柱信息获取对锚列表
+     * @param busFjxgmd
+     * @return
+     */
+    List<BusFjxgmd> getListByZz(BusFjxgmd busFjxgmd);
+}

+ 37 - 0
railway-business/src/main/java/com/railway/business/catenary/service/IBusGlkgService.java

@@ -0,0 +1,37 @@
+package com.railway.business.catenary.service;
+
+import com.railway.business.catenary.domain.BusGlkg;
+import java.util.List;
+/**
+* 基础数据-检查表-隔离开关
+* @author author
+* @date 2021/10/26
+*/
+public interface IBusGlkgService{
+
+    /**
+    * @Description: 新增
+    */
+    int create(BusGlkg busGlkg);
+
+    /**
+    * @Description: 删除
+    */
+    int delete(String[] ids);
+
+    /**
+    * @Description: 更新
+    */
+    int update(BusGlkg busGlkg);
+
+    /**
+    * @Description: 获取单个
+    */
+    BusGlkg getInfo(String id);
+
+    /**
+    * @Description: 查询列表
+    */
+    List<BusGlkg> getList(BusGlkg busGlkg);
+
+}

+ 65 - 21
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusFjxgmdServiceImpl.java

@@ -1,46 +1,90 @@
 package com.railway.business.catenary.service.impl;
 
 import com.railway.business.catenary.domain.BusFjxgmd;
-import com.railway.business.catenary.domain.vo.BusFjxgmdVo;
+import com.railway.business.catenary.enums.DelFlagEnum;
 import com.railway.business.catenary.mapper.BusFjxgmdMapper;
-import com.railway.business.catenary.service.BusFjxgmdService;
+import com.railway.business.catenary.service.IBusFjxgmdService;
+import com.railway.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.util.Date;
 import java.util.List;
-
 /**
- * <p>
- * 附加悬挂锚段 服务实现类
- * </p>
- *
- * @author railway
- * @since 2021-10-11
+ * 附加悬挂锚段
+ * @author author
+ * @date 2021/10/26
  */
 @Service
-public class BusFjxgmdServiceImpl implements BusFjxgmdService {
+@Transactional(readOnly = true)
+public class BusFjxgmdServiceImpl implements IBusFjxgmdService{
+    @Autowired
+    private BusFjxgmdMapper busFjxgmdMapper;
 
-    private final BusFjxgmdMapper busFjxgmdMapper;
+    /**
+     * @Description: 新增
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int create(BusFjxgmd busFjxgmd) {
+        busFjxgmd.setCreateTime(new Date());
+        busFjxgmd.setCreateBy(SecurityUtils.getUsername());
+        busFjxgmd.setDelFlag(DelFlagEnum.NOT_DELETE.getCode());
+        return busFjxgmdMapper.insert(busFjxgmd);
+    }
 
-    public BusFjxgmdServiceImpl(BusFjxgmdMapper busFjxgmdMapper) {
-        this.busFjxgmdMapper = busFjxgmdMapper;
+    /**
+     * @Description: 删除
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int delete(String[] ids) {
+        int r =0;
+        for (String id : ids) {
+            int j= busFjxgmdMapper.delete(id);
+            r = r + j;
+        }
+        return	r;
     }
 
+    /**
+     * @Description: 更新
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int update(BusFjxgmd busFjxgmd) {
+        busFjxgmd.setUpdateTime(new Date());
+        busFjxgmd.setUpdateBy(SecurityUtils.getUsername());
+        return busFjxgmdMapper.update(busFjxgmd);
+    }
 
+    /**
+     * @Description: 获取单个
+     */
     @Override
-    public BusFjxgmd getById(Long id) {
-        return busFjxgmdMapper.selectById(id);
+    public BusFjxgmd getInfo(String id) {
+        return busFjxgmdMapper.getInfo(id);
     }
 
+    /**
+     * @Description: 查询列表
+     */
     @Override
-    public List<BusFjxgmd> getList() {
-        return busFjxgmdMapper.getList();
+    public List<BusFjxgmd> getList(BusFjxgmd busFjxgmd) {
+        return busFjxgmdMapper.getList(busFjxgmd);
     }
 
+    /**
+     * 通过支柱信息获取对锚列表
+     * @param busFjxgmd
+     * @return
+     */
     @Override
-    public List<BusFjxgmdVo> getListByZz(BusFjxgmdVo busFjxgmdVo) {
-        if (busFjxgmdVo.getZzfw() == null) {
-            busFjxgmdVo.setZzfw("500");
+    public List<BusFjxgmd> getListByZz(BusFjxgmd busFjxgmd) {
+        if (busFjxgmd.getZzfw() == null) {
+            busFjxgmd.setZzfw("500");
         }
-        return busFjxgmdMapper.getListByZz(busFjxgmdVo);
+        return busFjxgmdMapper.getListByZz(busFjxgmd);
     }
 }

+ 77 - 0
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusGlkgServiceImpl.java

@@ -0,0 +1,77 @@
+package com.railway.business.catenary.service.impl;
+
+import com.railway.business.catenary.domain.BusGlkg;
+import com.railway.business.catenary.enums.DelFlagEnum;
+import com.railway.business.catenary.mapper.BusGlkgMapper;
+import com.railway.business.catenary.service.IBusGlkgService;
+import com.railway.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+/**
+* 基础数据-检查表-隔离开关
+* @author author
+* @date 2021/10/26
+*/
+@Service
+@Transactional(readOnly = true)
+public class BusGlkgServiceImpl implements IBusGlkgService{
+@Autowired
+private BusGlkgMapper busGlkgMapper;
+
+	/**
+	* @Description: 新增
+	*/
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public int create(BusGlkg busGlkg) {
+	    busGlkg.setCreateTime(new Date());
+        busGlkg.setCreateBy(SecurityUtils.getUsername());
+		busGlkg.setDelFlag(DelFlagEnum.NOT_DELETE.getCode());
+		return busGlkgMapper.insert(busGlkg);
+	}
+
+	/**
+	* @Description: 删除
+	*/
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public int delete(String[] ids) {
+		int r =0;
+		for (String id : ids) {
+			int j= busGlkgMapper.delete(id);
+			r = r + j;
+		}
+		return	r;
+	}
+
+	/**
+	* @Description: 更新
+	*/
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public int update(BusGlkg busGlkg) {
+		busGlkg.setUpdateTime(new Date());
+    	busGlkg.setUpdateBy(SecurityUtils.getUsername());
+		return busGlkgMapper.update(busGlkg);
+	}
+
+	/**
+	* @Description: 获取单个
+	*/
+	@Override
+	public BusGlkg getInfo(String id) {
+		return busGlkgMapper.getInfo(id);
+	}
+
+	/**
+	* @Description: 查询列表
+	*/
+	@Override
+	public List<BusGlkg> getList(BusGlkg busGlkg) {
+		return busGlkgMapper.getList(busGlkg);
+	}
+}

+ 260 - 26
railway-business/src/main/resources/mapper/business/BusFjxgmdMapper.xml

@@ -1,18 +1,251 @@
 <?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">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.railway.business.catenary.mapper.BusFjxgmdMapper">
 
-    <select id="selectById" resultType="com.railway.business.catenary.domain.BusFjxgmd">
-        select * from bus_fjxgmd where id = #{id}
+    <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusFjxgmd">
+                <result column="id" property="id"/>
+                <result column="db" property="db"/>
+                <result column="bm" property="bm"/>
+                <result column="xb" property="xb"/>
+                <result column="qj" property="qj"/>
+                <result column="hb" property="hb"/>
+                <result column="fjlx" property="fjlx"/>
+                <result column="qsglb" property="qsglb"/>
+                <result column="qsgh" property="qsgh"/>
+                <result column="del_flag" property="delFlag"/>
+                <result column="create_by" property="createBy"/>
+                <result column="create_time" property="createTime"/>
+                <result column="update_by" property="updateBy"/>
+                <result column="update_time" property="updateTime"/>
+                <result column="dept_name" property="deptName"/>
+                <result column="line_name" property="lineName"/>
+                <result column="station_name" property="stationName"/>
+                <result column="xingbie_text" property="xingbieText"/>
+                <result column="fjlx_text" property="fjlxText"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+                id,
+                db,
+                bm,
+                xb,
+                qj,
+                hb,
+                fjlx,
+                qsglb,
+                qsgh,
+                del_flag,
+                create_by,
+                create_time,
+                update_by,
+                update_time
+    </sql>
+
+    <insert id="insert" parameterType="com.railway.business.catenary.domain.BusFjxgmd">
+        <selectKey keyProperty="id" order="BEFORE" resultType="String">
+            select replace(uuid(), '-', '') from dual
+        </selectKey>
+        INSERT INTO bus_fjxgmd
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                    <if test ='null != db'>
+                    db,
+                    </if>
+                    <if test ='null != bm'>
+                    bm,
+                    </if>
+                    <if test ='null != xb'>
+                    xb,
+                    </if>
+                    <if test ='null != qj'>
+                    qj,
+                    </if>
+                    <if test ='null != hb'>
+                    hb,
+                    </if>
+                    <if test ='null != fjlx'>
+                    fjlx,
+                    </if>
+                    <if test ='null != qsglb'>
+                    qsglb,
+                    </if>
+                    <if test ='null != qsgh'>
+                    qsgh,
+                    </if>
+                    <if test ='null != delFlag'>
+                    del_flag,
+                    </if>
+                    <if test ='null != createBy'>
+                    create_by,
+                    </if>
+                    <if test ='null != createTime'>
+                    create_time,
+                    </if>
+                    <if test ='null != updateBy'>
+                    update_by,
+                    </if>
+                    <if test ='null != updateTime'>
+                    update_time
+                    </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                    <if test ='null != db'>
+                    #{db},
+                    </if>
+                    <if test ='null != bm'>
+                    #{bm},
+                    </if>
+                    <if test ='null != xb'>
+                    #{xb},
+                    </if>
+                    <if test ='null != qj'>
+                    #{qj},
+                    </if>
+                    <if test ='null != hb'>
+                    #{hb},
+                    </if>
+                    <if test ='null != fjlx'>
+                    #{fjlx},
+                    </if>
+                    <if test ='null != qsglb'>
+                    #{qsglb},
+                    </if>
+                    <if test ='null != qsgh'>
+                    #{qsgh},
+                    </if>
+                    <if test ='null != delFlag'>
+                    #{delFlag},
+                    </if>
+                    <if test ='null != createBy'>
+                    #{createBy},
+                    </if>
+                    <if test ='null != createTime'>
+                    #{createTime},
+                    </if>
+                    <if test ='null != updateBy'>
+                    #{updateBy},
+                    </if>
+                    <if test ='null != updateTime'>
+                    #{updateTime}
+                    </if>
+        </trim>
+    </insert>
+
+    <delete id="delete">
+        UPDATE bus_fjxgmd
+        set del_flag='1'
+        WHERE id = #{id}
+    </delete>
+
+    <update id="update" parameterType="com.railway.business.catenary.domain.BusFjxgmd">
+        UPDATE bus_fjxgmd
+        <set>
+                    <if test ='null != db'>db = #{db},</if>
+                    <if test ='null != bm'>bm = #{bm},</if>
+                    <if test ='null != xb'>xb = #{xb},</if>
+                    <if test ='null != qj'>qj = #{qj},</if>
+                    <if test ='null != hb'>hb = #{hb},</if>
+                    <if test ='null != fjlx'>fjlx = #{fjlx},</if>
+                    <if test ='null != qsglb'>qsglb = #{qsglb},</if>
+                    <if test ='null != qsgh'>qsgh = #{qsgh},</if>
+                    <if test ='null != delFlag'>del_flag = #{delFlag},</if>
+                    <if test ='null != createBy'>create_by = #{createBy},</if>
+                    <if test ='null != createTime'>create_time = #{createTime},</if>
+                    <if test ='null != updateBy'>update_by = #{updateBy},</if>
+                    <if test ='null != updateTime'>update_time = #{updateTime}</if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <select id="getInfo" resultMap="BaseResultMap">
+        SELECT
+            dept.dept_name,
+            l.line_name,
+            s.station_name,
+            dict1.dict_label as xingbie_text,
+            dict2.dict_label as fjlx_text,
+            a.*
+        FROM
+            bus_fjxgmd a
+        LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
+        LEFT JOIN bus_line l ON a.xb = l.line_id
+        LEFT JOIN bus_station s ON a.qj = s.station_id
+        LEFT JOIN sys_dict_data dict1 ON (a.hb = dict1.dict_value AND dict1.dict_type = 'xingbie')
+        LEFT JOIN sys_dict_data dict2 ON (a.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
+        WHERE
+            a.del_flag = '0'
+            AND dept.del_flag = '0'
+            AND l.del_flag = '0'
+            AND s.del_flag = '0'
+            AND a.id = #{id}
     </select>
 
-    <select id="getList" resultType="com.railway.business.catenary.domain.BusFjxgmd">
-        select * from bus_fjxgmd
+    <select id="getList" resultMap="BaseResultMap">
+        SELECT
+            dept.dept_name,
+            l.line_name,
+            s.station_name,
+            dict1.dict_label as xingbie_text,
+            dict2.dict_label as fjlx_text,
+            a.*
+        FROM
+            bus_fjxgmd a
+        LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
+        LEFT JOIN bus_line l ON a.xb = l.line_id
+        LEFT JOIN bus_station s ON a.qj = s.station_id
+        LEFT JOIN sys_dict_data dict1 ON (a.hb = dict1.dict_value AND dict1.dict_type = 'xingbie')
+        LEFT JOIN sys_dict_data dict2 ON (a.fjlx = dict2.dict_value AND dict2.dict_type = 'fjlx')
+        <where>
+            a.del_flag = '0'
+            AND dept.del_flag = '0'
+            AND l.del_flag = '0'
+            AND s.del_flag = '0'
+            <if test="db!=null and db!=''">
+                    and a.db=#{db}
+                </if>
+                <if test="bm!=null and bm!=''">
+                    and a.bm=#{bm}
+                </if>
+                <if test="xb!=null and xb!=''">
+                    and a.xb=#{xb}
+                </if>
+                <if test="qj!=null and qj!=''">
+                    and a.qj=#{qj}
+                </if>
+                <if test="hb!=null and hb!=''">
+                    and a.hb=#{hb}
+                </if>
+                <if test="fjlx!=null and fjlx!=''">
+                    and a.fjlx=#{fjlx}
+                </if>
+                <if test="qsglb!=null and qsglb!=''">
+                    and a.qsglb=#{qsglb}
+                </if>
+                <if test="qsgh!=null and qsgh!=''">
+                    and a.qsgh=#{qsgh}
+                </if>
+                <if test="delFlag!=null and delFlag!=''">
+                    and a.del_flag=#{delFlag}
+                </if>
+                <if test="createBy!=null and createBy!=''">
+                    and a.create_by=#{createBy}
+                </if>
+                <if test="createTime!=null and createTime!=''">
+                    and a.create_time=#{createTime}
+                </if>
+                <if test="updateBy!=null and updateBy!=''">
+                    and a.update_by=#{updateBy}
+                </if>
+                <if test="updateTime!=null and updateTime!=''">
+                    and a.update_time=#{updateTime}
+                </if>
+        </where>
     </select>
 
-    <select id="getListByZz" resultType="com.railway.business.catenary.domain.vo.BusFjxgmdVo">
+    <select id="getListByZz" resultMap="BaseResultMap">
         SELECT DISTINCT
-            dm.qsgh as zzh,
+            dm.qsgh,
             dm.qsglb,
             dm.bm,
             dm.xb,
@@ -27,30 +260,31 @@
                 bus_zzdzxx A,
             (
                 SELECT
-                    zz.id,
-                    zz.glb
+                zz.id,
+                zz.glb
                 FROM
-                    bus_zzdzxx zz
+                bus_zzdzxx zz
                 WHERE 1=1
-                    <if test="query.zzh != null and query.zzh != ''">
-                        AND zz.zzh = #{query.zzh}
-                    </if>
-                    <if test="query.bm != null and query.bm != ''">
-                        AND zz.bm = #{query.bm}
-                    </if>
-                    <if test="query.xb != null and query.xb != ''">
-                        AND zz.xb = #{query.xb}
-                    </if>
-                    <if test="query.qj != null and query.qj != ''">
-                        AND zz.qj = #{query.qj}
-                    </if>
-                    <if test="query.hb != null and query.hb != ''">
-                        AND zz.hb = #{query.hb}
-                    </if>
+                <if test="query.qsgh != null and query.qsgh != ''">
+                    AND zz.zzh = #{query.qsgh}
+                </if>
+                <if test="query.bm != null and query.bm != ''">
+                    AND zz.bm = #{query.bm}
+                </if>
+                <if test="query.xb != null and query.xb != ''">
+                    AND zz.xb = #{query.xb}
+                </if>
+                <if test="query.qj != null and query.qj != ''">
+                    AND zz.qj = #{query.qj}
+                </if>
+                <if test="query.hb != null and query.hb != ''">
+                    AND zz.hb = #{query.hb}
+                </if>
             ) B
             WHERE
                 A.glb BETWEEN B.glb - #{query.zzfw} AND B.glb + #{query.zzfw}
         )
         ORDER BY dm.qsgh
     </select>
-</mapper>
+
+</mapper>

+ 267 - 0
railway-business/src/main/resources/mapper/business/BusGlkgMapper.xml

@@ -0,0 +1,267 @@
+<?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.railway.business.catenary.mapper.BusGlkgMapper">
+
+    <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusGlkg">
+                <result column="id" property="id"/>
+                <result column="db" property="db"/>
+                <result column="bm" property="bm"/>
+                <result column="xb" property="xb"/>
+                <result column="qj" property="qj"/>
+                <result column="hb" property="hb"/>
+                <result column="zzh" property="zzh"/>
+                <result column="glb" property="glb"/>
+                <result column="kgbh" property="kgbh"/>
+                <result column="sccj" property="sccj"/>
+                <result column="kgxh" property="kgxh"/>
+                <result column="del_flag" property="delFlag"/>
+                <result column="create_by" property="createBy"/>
+                <result column="create_time" property="createTime"/>
+                <result column="update_by" property="updateBy"/>
+                <result column="update_time" property="updateTime"/>
+                <result column="dept_name" property="deptName"/>
+                <result column="line_name" property="lineName"/>
+                <result column="station_name" property="stationName"/>
+                <result column="xingbie_text" property="xingbieText"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+                id,
+                db,
+                bm,
+                xb,
+                qj,
+                hb,
+                zzh,
+                glb,
+                kgbh,
+                sccj,
+                kgxh,
+                del_flag,
+                create_by,
+                create_time,
+                update_by,
+                update_time
+    </sql>
+
+    <insert id="insert" parameterType="com.railway.business.catenary.domain.BusGlkg">
+        <selectKey keyProperty="id" order="BEFORE" resultType="String">
+            select replace(uuid(), '-', '') from dual
+        </selectKey>
+        INSERT INTO bus_glkg
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                    <if test ='null != db'>
+                    db,
+                    </if>
+                    <if test ='null != bm'>
+                    bm,
+                    </if>
+                    <if test ='null != xb'>
+                    xb,
+                    </if>
+                    <if test ='null != qj'>
+                    qj,
+                    </if>
+                    <if test ='null != hb'>
+                    hb,
+                    </if>
+                    <if test ='null != zzh'>
+                    zzh,
+                    </if>
+                    <if test ='null != glb'>
+                    glb,
+                    </if>
+                    <if test ='null != kgbh'>
+                    kgbh,
+                    </if>
+                    <if test ='null != sccj'>
+                    sccj,
+                    </if>
+                    <if test ='null != kgxh'>
+                    kgxh,
+                    </if>
+                    <if test ='null != delFlag'>
+                    del_flag,
+                    </if>
+                    <if test ='null != createBy'>
+                    create_by,
+                    </if>
+                    <if test ='null != createTime'>
+                    create_time,
+                    </if>
+                    <if test ='null != updateBy'>
+                    update_by,
+                    </if>
+                    <if test ='null != updateTime'>
+                    update_time
+                    </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                    <if test ='null != db'>
+                    #{db},
+                    </if>
+                    <if test ='null != bm'>
+                    #{bm},
+                    </if>
+                    <if test ='null != xb'>
+                    #{xb},
+                    </if>
+                    <if test ='null != qj'>
+                    #{qj},
+                    </if>
+                    <if test ='null != hb'>
+                    #{hb},
+                    </if>
+                    <if test ='null != zzh'>
+                    #{zzh},
+                    </if>
+                    <if test ='null != glb'>
+                    #{glb},
+                    </if>
+                    <if test ='null != kgbh'>
+                    #{kgbh},
+                    </if>
+                    <if test ='null != sccj'>
+                    #{sccj},
+                    </if>
+                    <if test ='null != kgxh'>
+                    #{kgxh},
+                    </if>
+                    <if test ='null != delFlag'>
+                    #{delFlag},
+                    </if>
+                    <if test ='null != createBy'>
+                    #{createBy},
+                    </if>
+                    <if test ='null != createTime'>
+                    #{createTime},
+                    </if>
+                    <if test ='null != updateBy'>
+                    #{updateBy},
+                    </if>
+                    <if test ='null != updateTime'>
+                    #{updateTime}
+                    </if>
+        </trim>
+    </insert>
+
+    <delete id="delete">
+        UPDATE bus_glkg
+        set del_flag='1'
+        WHERE id = #{id}
+    </delete>
+
+    <update id="update" parameterType="com.railway.business.catenary.domain.BusGlkg">
+        UPDATE bus_glkg
+        <set>
+                    <if test ='null != db'>db = #{db},</if>
+                    <if test ='null != bm'>bm = #{bm},</if>
+                    <if test ='null != xb'>xb = #{xb},</if>
+                    <if test ='null != qj'>qj = #{qj},</if>
+                    <if test ='null != hb'>hb = #{hb},</if>
+                    <if test ='null != zzh'>zzh = #{zzh},</if>
+                    <if test ='null != glb'>glb = #{glb},</if>
+                    <if test ='null != kgbh'>kgbh = #{kgbh},</if>
+                    <if test ='null != sccj'>sccj = #{sccj},</if>
+                    <if test ='null != kgxh'>kgxh = #{kgxh},</if>
+                    <if test ='null != delFlag'>del_flag = #{delFlag},</if>
+                    <if test ='null != createBy'>create_by = #{createBy},</if>
+                    <if test ='null != createTime'>create_time = #{createTime},</if>
+                    <if test ='null != updateBy'>update_by = #{updateBy},</if>
+                    <if test ='null != updateTime'>update_time = #{updateTime}</if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <select id="getInfo" resultMap="BaseResultMap">
+        SELECT
+            dept.dept_name,
+            l.line_name,
+            s.station_name,
+            dict.dict_label as xingbie_text,
+            a.*
+        FROM
+            bus_glkg a
+        LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
+        LEFT JOIN bus_line l ON a.xb = l.line_id
+        LEFT JOIN bus_station s ON a.qj = s.station_id
+        LEFT JOIN sys_dict_data dict ON a.hb = dict.dict_value
+        WHERE
+            a.del_flag = '0'
+            AND dept.del_flag = '0'
+            AND l.del_flag = '0'
+            AND s.del_flag = '0'
+            AND dict.dict_type = 'xingbie'
+            AND a.id = #{id}
+    </select>
+
+    <select id="getList" resultMap="BaseResultMap">
+        SELECT
+            dept.dept_name,
+            l.line_name,
+            s.station_name,
+            dict.dict_label as xingbie_text,
+            a.*
+        FROM
+            bus_glkg a
+        LEFT JOIN sys_dept dept ON a.bm = dept.dept_id
+        LEFT JOIN bus_line l ON a.xb = l.line_id
+        LEFT JOIN bus_station s ON a.qj = s.station_id
+        LEFT JOIN sys_dict_data dict ON a.hb = dict.dict_value
+        <where>
+            a.del_flag = '0'
+            AND dept.del_flag = '0'
+            AND l.del_flag = '0'
+            AND s.del_flag = '0'
+            AND dict.dict_type = 'xingbie'
+                <if test="db!=null and db!=''">
+                    and a.db=#{db}
+                </if>
+                <if test="bm!=null and bm!=''">
+                    and a.bm=#{bm}
+                </if>
+                <if test="xb!=null and xb!=''">
+                    and a.xb=#{xb}
+                </if>
+                <if test="qj!=null and qj!=''">
+                    and a.qj=#{qj}
+                </if>
+                <if test="hb!=null and hb!=''">
+                    and a.hb=#{hb}
+                </if>
+                <if test="zzh!=null and zzh!=''">
+                    and a.zzh=#{zzh}
+                </if>
+                <if test="glb!=null and glb!=''">
+                    and a.glb=#{glb}
+                </if>
+                <if test="kgbh!=null and kgbh!=''">
+                    and a.kgbh=#{kgbh}
+                </if>
+                <if test="sccj!=null and sccj!=''">
+                    and a.sccj=#{sccj}
+                </if>
+                <if test="kgxh!=null and kgxh!=''">
+                    and a.kgxh=#{kgxh}
+                </if>
+                <if test="delFlag!=null and delFlag!=''">
+                    and a.del_flag=#{delFlag}
+                </if>
+                <if test="createBy!=null and createBy!=''">
+                    and a.create_by=#{createBy}
+                </if>
+                <if test="createTime!=null and createTime!=''">
+                    and a.create_time=#{createTime}
+                </if>
+                <if test="updateBy!=null and updateBy!=''">
+                    and a.update_by=#{updateBy}
+                </if>
+                <if test="updateTime!=null and updateTime!=''">
+                    and a.update_time=#{updateTime}
+                </if>
+        </where>
+    </select>
+
+</mapper>