Explorar o código

Merge remote-tracking branch 'origin/master'

wuhonghao %!s(int64=4) %!d(string=hai) anos
pai
achega
1a71387008
Modificáronse 30 ficheiros con 241 adicións e 241 borrados
  1. 1 1
      railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcbJcxcController.java
  2. 3 3
      railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJlgzController.java
  3. 1 1
      railway-admin/src/main/java/com/railway/web/controller/business/safetool/BaseSafetyToolController.java
  4. 1 1
      railway-business/src/main/java/com/railway/business/baseinfo/domain/BusJcxc.java
  5. 7 0
      railway-business/src/main/java/com/railway/business/baseinfo/domain/BusPrevent.java
  6. 3 2
      railway-business/src/main/java/com/railway/business/baseinfo/mapper/BaseLineMapper.java
  7. 8 2
      railway-business/src/main/java/com/railway/business/baseinfo/mapper/BaseStationMapper.java
  8. 9 13
      railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BaseLineServiceImpl.java
  9. 10 14
      railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BaseStationServiceImpl.java
  10. 3 0
      railway-business/src/main/java/com/railway/business/catenary/domain/BusJcbDmcgyq.java
  11. 4 2
      railway-business/src/main/java/com/railway/business/catenary/domain/BusJcbJcxc.java
  12. 4 2
      railway-business/src/main/java/com/railway/business/catenary/domain/BusJcbWjcxc.java
  13. 1 1
      railway-business/src/main/java/com/railway/business/catenary/mapper/BusJlgzMapper.java
  14. 1 1
      railway-business/src/main/java/com/railway/business/catenary/service/IBusJlgzService.java
  15. 6 2
      railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJlgzServiceImpl.java
  16. 6 5
      railway-business/src/main/resources/mapper/baseinfo/BaseLineMapper.xml
  17. 36 8
      railway-business/src/main/resources/mapper/baseinfo/BaseStationMapper.xml
  18. 2 0
      railway-business/src/main/resources/mapper/baseinfo/BusFjxgmdMapper.xml
  19. 9 9
      railway-business/src/main/resources/mapper/baseinfo/BusJcxcMapper.xml
  20. 18 3
      railway-business/src/main/resources/mapper/baseinfo/BusPreventMapper.xml
  21. 0 19
      railway-business/src/main/resources/mapper/baseinfo/BusZzdzxxMapper.xml
  22. 4 4
      railway-business/src/main/resources/mapper/catenary/BusJcbBlqMapper.xml
  23. 10 1
      railway-business/src/main/resources/mapper/catenary/BusJcbDmcgyqMapper.xml
  24. 13 111
      railway-business/src/main/resources/mapper/catenary/BusJcbFdfxjyqMapper.xml
  25. 4 4
      railway-business/src/main/resources/mapper/catenary/BusJcbGlkgMapper.xml
  26. 21 12
      railway-business/src/main/resources/mapper/catenary/BusJcbJcxcMapper.xml
  27. 22 13
      railway-business/src/main/resources/mapper/catenary/BusJcbWjcxcMapper.xml
  28. 12 5
      railway-business/src/main/resources/mapper/catenary/BusJlgzMapper.xml
  29. 13 0
      railway-common/src/main/java/com/railway/common/core/domain/entity/SysDept.java
  30. 9 2
      railway-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 1 - 1
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcbJcxcController.java

@@ -125,7 +125,7 @@ public class BusJcbJcxcController extends BaseController {
         WordUtils wordUtil = new WordUtils();
         //填充变量
         Map<String, Object> params = new HashMap<>();
-        params.put("${xch}", info.getXianchahao());
+        params.put("${xch}", info.getXch());
         params.put("${stationName()}", info.getStationName());
         params.put("${temperature}", info.getTemperature());
         if(info.getCheckDate() != null) {

+ 3 - 3
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJlgzController.java

@@ -55,9 +55,9 @@ public class BusJlgzController extends BaseController {
     }
 
     @ApiOperation(value = "单个")
-    @GetMapping(value = {"/", "/{id}"})
-    public AjaxResult getInfo(@PathVariable(value = "id") Long id) {
-        BusJlgz info = budJlgzService.getInfo(id);
+    @GetMapping(value = {"/", "/{id}/{lineId}"})
+    public AjaxResult getInfo(@PathVariable(value = "id") Long id, @PathVariable(value = "lineId") Long lineId) {
+        BusJlgz info = budJlgzService.getInfo(id, lineId);
         AjaxResult ajax = AjaxResult.success();
         ajax.put("info",info);
         return ajax;

+ 1 - 1
railway-admin/src/main/java/com/railway/web/controller/business/safetool/BaseSafetyToolController.java

@@ -33,7 +33,7 @@ public class BaseSafetyToolController extends BaseController {
 
     @ApiOperation(value = "删除")
     @DeleteMapping("/{toolIds}")
-    public AjaxResult delete(@RequestParam String[] toolIds) {
+    public AjaxResult delete(@PathVariable String[] toolIds) {
         return toAjax(baseSafetyToolService.delete(toolIds));
     }
 

+ 1 - 1
railway-business/src/main/java/com/railway/business/baseinfo/domain/BusJcxc.java

@@ -48,7 +48,7 @@ public class BusJcxc extends BaseEntity{
 
     @ApiModelProperty(value = "支柱范围")
     @Length(min = 1, max = 50, message = "【支柱号】长度必须介于 {min} 和 {max} 之间")
-    private String pillarArea;
+    private String pillarCode;
 
     @ApiModelProperty(value = "股道")
     @Length( max = 100, message = "【股道】长度必须介于 {min} 和 {max} 之间")

+ 7 - 0
railway-business/src/main/java/com/railway/business/baseinfo/domain/BusPrevent.java

@@ -8,6 +8,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.hibernate.validator.constraints.Length;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -125,4 +126,10 @@ public class BusPrevent extends BaseEntity {
     @ApiModelProperty(value = "调查人")
     private String inquirer;
 
+    @ApiModelProperty(value = "开始公里标")
+    private String startMarker;
+
+    @ApiModelProperty(value = "结束公里标")
+    private String endMarker;
+
 }

+ 3 - 2
railway-business/src/main/java/com/railway/business/baseinfo/mapper/BaseLineMapper.java

@@ -3,6 +3,7 @@ package com.railway.business.baseinfo.mapper;
 import com.github.pagehelper.Page;
 import com.railway.business.baseinfo.domain.BaseLine;
 import com.railway.business.baseinfo.domain.vo.BaseLineQuery;
+import com.railway.business.baseinfo.domain.vo.BaseLineVo;
 import com.railway.common.core.domain.entity.SysDept;
 import java.util.List;
 import org.apache.ibatis.annotations.Mapper;
@@ -37,12 +38,12 @@ public interface BaseLineMapper {
   /**
    * 获取单个
    */
-  BaseLine getInfo(@Param("lineId") Long lineId);
+  BaseLineVo getInfo(@Param("lineId") Long lineId);
 
   /**
    * 查询列表
    */
-  Page<BaseLine> getList(BaseLineQuery query);
+  Page<BaseLineVo> getList(BaseLineQuery query);
 
   /**
    * 查询列表

+ 8 - 2
railway-business/src/main/java/com/railway/business/baseinfo/mapper/BaseStationMapper.java

@@ -3,6 +3,7 @@ package com.railway.business.baseinfo.mapper;
 import com.github.pagehelper.Page;
 import com.railway.business.baseinfo.domain.BaseStation;
 import com.railway.business.baseinfo.domain.vo.BaseStationQuery;
+import com.railway.business.baseinfo.domain.vo.BaseStationVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
@@ -35,11 +36,16 @@ public interface BaseStationMapper {
   /**
    * 获取单个
    */
-  BaseStation getInfo(@Param("stationId") Long stationId);
+  BaseStationVo getInfo(@Param("stationId") Long stationId);
 
   /**
    * 查询列表
    */
-  Page<BaseStation> getList(BaseStationQuery query);
+  Page<BaseStationVo> getList(BaseStationQuery query);
+
+  /**
+   * 查询列表
+   */
+  Page<BaseStation> getStationList(BaseStationQuery query);
 
 }

+ 9 - 13
railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BaseLineServiceImpl.java

@@ -10,7 +10,6 @@ import com.railway.business.baseinfo.service.IBaseLineService;
 import com.railway.common.enums.DelFlagEnum;
 import com.railway.common.utils.SecurityUtils;
 import com.railway.common.utils.bean.BeanUtils;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import org.apache.commons.collections4.CollectionUtils;
@@ -99,11 +98,12 @@ public class BaseLineServiceImpl implements IBaseLineService {
    */
   @Override
   public BaseLineVo getInfo(Long lineId) {
-    BaseLine line = baseLineMapper.getInfo(lineId);
+    BaseLineVo line = baseLineMapper.getInfo(lineId);
     if(null == line){
       return null;
     }
-    return setBaseLine(line);
+    setBaseLine(line);
+    return line;
   }
 
   /**
@@ -111,20 +111,16 @@ public class BaseLineServiceImpl implements IBaseLineService {
    */
   @Override
   public List<BaseLineVo> getDetailList(BaseLineQuery query) {
-    List<BaseLine> lines = baseLineMapper.getList(query);
-    List<BaseLineVo> lineVoList = new ArrayList<>(lines.size());
-    for(BaseLine line : lines){
-      lineVoList.add(setBaseLine(line));
+    List<BaseLineVo> lines = baseLineMapper.getList(query);
+    for(BaseLineVo line : lines){
+      setBaseLine(line);
     }
-    return lineVoList;
+    return lines;
   }
 
-  private BaseLineVo setBaseLine(BaseLine line){
+  private void setBaseLine(BaseLineVo line){
     List<BaseDeptLine> deptLines = deptLineMapper.getList(line.getLineId());
-    BaseLineVo baseLineVo = new BaseLineVo();
-    BeanUtils.copyBeanProp(baseLineVo, line);
-    baseLineVo.setDeptLines(deptLines);
-    return baseLineVo;
+    line.setDeptLines(deptLines);
   }
 
   /**

+ 10 - 14
railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BaseStationServiceImpl.java

@@ -10,7 +10,6 @@ import com.railway.business.baseinfo.service.IBaseStationService;
 import com.railway.common.enums.DelFlagEnum;
 import com.railway.common.utils.SecurityUtils;
 import com.railway.common.utils.bean.BeanUtils;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import org.apache.commons.collections4.CollectionUtils;
@@ -99,11 +98,12 @@ public class BaseStationServiceImpl implements IBaseStationService {
    */
   @Override
   public BaseStationVo getInfo(Long stationId) {
-    BaseStation station = baseStationMapper.getInfo(stationId);
+    BaseStationVo station = baseStationMapper.getInfo(stationId);
     if(null == station){
       return null;
     }
-    return setBaseStation(station);
+    setBaseStation(station);
+    return station;
   }
 
   /**
@@ -131,20 +131,16 @@ public class BaseStationServiceImpl implements IBaseStationService {
    */
   @Override
   public List<BaseStationVo> getDetailList(BaseStationQuery query) {
-    List<BaseStation> stations = baseStationMapper.getList(query);
-    List<BaseStationVo> stationVos = new ArrayList<>(stations.size());
-    for(BaseStation station : stations){
-      stationVos.add(setBaseStation(station));
+    List<BaseStationVo> stations = baseStationMapper.getList(query);
+    for(BaseStationVo station : stations){
+      setBaseStation(station);
     }
-    return stationVos;
+    return stations;
   }
 
-  private BaseStationVo setBaseStation(BaseStation station){
+  private void setBaseStation(BaseStationVo station){
     List<BaseDeptStation> deptStations = deptStationMapper.getList(station.getStationId());
-    BaseStationVo baseStationVo = new BaseStationVo();
-    BeanUtils.copyBeanProp(baseStationVo, station);
-    baseStationVo.setDeptStations(deptStations);
-    return baseStationVo;
+    station.setDeptStations(deptStations);
   }
 
   /**
@@ -152,7 +148,7 @@ public class BaseStationServiceImpl implements IBaseStationService {
    */
   @Override
   public List<BaseStation> getListByDeptId(BaseStationQuery query) {
-    return baseStationMapper.getList(query);
+    return baseStationMapper.getStationList(query);
   }
 
 }

+ 3 - 0
railway-business/src/main/java/com/railway/business/catenary/domain/BusJcbDmcgyq.java

@@ -41,6 +41,9 @@ public class BusJcbDmcgyq extends BaseEntity{
     @ApiModelProperty(value = "车间-区间站场关联id")
     private Long deptStationId;
 
+    @ApiModelProperty(value = "感应器id")
+    private Long gyqId;
+
     @ApiModelProperty(value = "分相")
     @Length(min = 1, max = 100, message = "【分相】长度必须介于 {min} 和 {max} 之间")
     private String fenxiang;

+ 4 - 2
railway-business/src/main/java/com/railway/business/catenary/domain/BusJcbJcxc.java

@@ -45,9 +45,11 @@ public class BusJcbJcxc extends BaseEntity{
     @Length(min = 1, max = 50, message = "【支柱号】长度必须介于 {min} 和 {max} 之间")
     private String pillarCode;
 
+    @ApiModelProperty(value = "线岔ID")
+    private Long xcId;
+
     @ApiModelProperty(value = "线岔号")
-    @Length(min = 1, max = 30, message = "【线岔号】长度必须介于 {min} 和 {max} 之间")
-    private String xianchahao;
+    private String xch;
 
     @ApiModelProperty(value = "温度")
     @Length(min = 1, max = 20, message = "【温度】长度必须介于 {min} 和 {max} 之间")

+ 4 - 2
railway-business/src/main/java/com/railway/business/catenary/domain/BusJcbWjcxc.java

@@ -45,9 +45,11 @@ public class BusJcbWjcxc extends BaseEntity{
     @Length(min = 1, max = 50, message = "【支柱号】长度必须介于 {min} 和 {max} 之间")
     private String pillarCode;
 
+    @ApiModelProperty(value = "线岔ID")
+    private Long xcId;
+
     @ApiModelProperty(value = "线岔号")
-    @Length(min = 1, max = 30, message = "【线岔号】长度必须介于 {min} 和 {max} 之间")
-    private String xianchahao;
+    private String xch;
 
     @ApiModelProperty(value = "温度")
     @Length(min = 1, max = 20, message = "【温度】长度必须介于 {min} 和 {max} 之间")

+ 1 - 1
railway-business/src/main/java/com/railway/business/catenary/mapper/BusJlgzMapper.java

@@ -37,7 +37,7 @@ public interface BusJlgzMapper {
     /**
     * 获取单个
     */
-    BusJlgz getInfo(@Param("id") Long id);
+    BusJlgz getInfo(@Param("id") Long id, @Param("lineId") Long lineId);
 
     /**
     * 查询列表

+ 1 - 1
railway-business/src/main/java/com/railway/business/catenary/service/IBusJlgzService.java

@@ -30,7 +30,7 @@ public interface IBusJlgzService {
     /**
     * 获取单个
     */
-    BusJlgz getInfo(Long id);
+    BusJlgz getInfo(Long id, Long lineId);
 
     /**
     * 查询列表

+ 6 - 2
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJlgzServiceImpl.java

@@ -101,8 +101,8 @@ public class BusJlgzServiceImpl implements IBusJlgzService {
 	* 获取单个
 	*/
 	@Override
-	public BusJlgz getInfo(Long id) {
-		BusJlgz busJlgz = busJlgzMapper.getInfo(id);
+	public BusJlgz getInfo(Long id, Long lineId) {
+		BusJlgz busJlgz = busJlgzMapper.getInfo(id, lineId);
 		if (busJlgz != null) {
 			BusJlgzPic busJlgzPic = new BusJlgzPic();
 			busJlgzPic.setJlgzId(id);
@@ -119,6 +119,10 @@ public class BusJlgzServiceImpl implements IBusJlgzService {
 	public List<BusJlgz> getList(BusJlgz busJlgz) {
 		if(StringUtils.isNotEmpty(busJlgz.getOrderBy())){
 			busJlgz.setOrderBy(SqlUtil.humpToLine(busJlgz.getOrderBy()));
+		} else {
+			// 默认倒序排列
+			busJlgz.setOrderBy("operation_date");
+			busJlgz.setIsAsc("0");
 		}
 		if (busJlgz.getPillarArea() == null) {
 			busJlgz.setPillarArea("500");

+ 6 - 5
railway-business/src/main/resources/mapper/baseinfo/BaseLineMapper.xml

@@ -3,7 +3,7 @@
   "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.railway.business.baseinfo.mapper.BaseLineMapper">
 
-  <resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.BaseLine">
+  <resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.vo.BaseLineVo">
     <result column="line_id" property="lineId"/>
     <result column="line_name" property="lineName"/>
     <result column="line_sddj" property="lineSddj"/>
@@ -155,6 +155,7 @@
     SELECT
     <include refid="Base_Column_List"/>
     FROM base_line t
+    left join v_line v on t.line_id = v.line_id
     WHERE t.del_flag='0' and t.line_id = #{lineId}
 
   </select>
@@ -163,11 +164,11 @@
     SELECT DISTINCT
     <include refid="Base_Column_List"/>
     FROM base_line t
-    left join base_dept_line t1 on t.line_id = t1.line_id
+    left join v_line v on t.line_id = v.line_id
     <where>
       t.del_flag='0'
       <if test="deptId!=null and deptId!=''">
-        and t1.dept_id=#{deptId}
+        and v.dept_id=#{deptId}
       </if>
       <if test="lineName!=null and lineName!=''">
         and t.line_name like concat('%', #{lineName}, '%')
@@ -179,11 +180,11 @@
     SELECT DISTINCT
     <include refid="Base_Column_List"/>
     FROM base_line t
-    left join base_dept_line t1 on t.line_id = t1.line_id
+    left join v_line v on t.line_id = v.line_id
     <where>
       t.del_flag='0'
       <if test="deptId!=null and deptId!=''">
-        and t1.dept_id=#{deptId}
+        and v.dept_id=#{deptId}
       </if>
     </where>
   </select>

+ 36 - 8
railway-business/src/main/resources/mapper/baseinfo/BaseStationMapper.xml

@@ -3,7 +3,7 @@
   "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.railway.business.baseinfo.mapper.BaseStationMapper">
 
-  <resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.BaseStation">
+  <resultMap id="BaseResultMap" type="com.railway.business.baseinfo.domain.vo.BaseStationVo">
     <result column="station_id" property="stationId"/>
     <result column="line_id" property="lineId"/>
     <result column="line_name" property="lineName"/>
@@ -137,25 +137,53 @@
 
   <select id="getInfo" resultMap="BaseResultMap">
     SELECT
-    <include refid="Base_Column_List"/>, l.line_name, dict.dict_label as station_type_text
+    <include refid="Base_Column_List"/>, v.line_name, dict.dict_label as station_type_text
     FROM base_station t
-    left join base_line l on t.line_id = l.line_id
     left join sys_dict_data dict on t.station_type = dict.dict_value and dict.dict_type = 'station_type'
-    WHERE del_flag='0' and station_id = #{stationId}
+    left join base_dept_station v on t.station_id = t1.station_id
+    WHERE t.del_flag='0' and t.station_id = #{stationId}
 
   </select>
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT DISTINCT
-    <include refid="Base_Column_List"/>, l.line_name, dict.dict_label as station_type_text
+    <include refid="Base_Column_List"/>, v.line_name, dict.dict_label as station_type_text
     FROM base_station t
-    left join base_line l on t.line_id = l.line_id
     left join sys_dict_data dict on t.station_type = dict.dict_value and dict.dict_type = 'station_type'
-    left join base_dept_station t1 on t.station_id = t1.station_id
+    left join v_station v on t.station_id = v.station_id
     <where>
       t.del_flag='0'
       <if test="deptId!=null and deptId!=''">
-        and  t1.dept_id=#{deptId}
+        and  v.dept_id=#{deptId}
+      </if>
+      <if test="lineId!=null and lineId!=''">
+        and  t.line_id=#{lineId}
+      </if>
+      <if test="stationName!=null and stationName!=''">
+        and  t.station_name=#{stationName}
+      </if>
+      <if test="stationType!=null and stationType!=''">
+        and  t.station_type=#{stationType}
+      </if>
+      <if test="startMarker!=null and startMarker!=''">
+        and  t.start_marker <![CDATA[ >= ]]> #{startMarker}
+      </if>
+      <if test="endMarker!=null and endMarker!=''">
+        and  t.end_marker <![CDATA[ <= ]]> #{endMarker}
+      </if>
+    </where>
+  </select>
+
+  <select id="getStationList" resultMap="BaseResultMap">
+    SELECT DISTINCT
+    <include refid="Base_Column_List"/>, v.line_name, dict.dict_label as station_type_text
+    FROM base_station t
+    left join sys_dict_data dict on t.station_type = dict.dict_value and dict.dict_type = 'station_type'
+    left join v_station v on t.station_id = v.station_id
+    <where>
+      t.del_flag='0'
+      <if test="deptId!=null and deptId!=''">
+        and  v.dept_id=#{deptId}
       </if>
       <if test="lineId!=null and lineId!=''">
         and  t.line_id=#{lineId}

+ 2 - 0
railway-business/src/main/resources/mapper/baseinfo/BusFjxgmdMapper.xml

@@ -160,6 +160,7 @@
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
+      DISTINCT
       v.dept_name,
       v.line_name,
       v.station_name,
@@ -223,6 +224,7 @@
   <select id="getListByZz" resultMap="BaseResultMap">
 
       SELECT
+        DISTINCT
         a.id,
         v.dept_id,
         v.dept_name,

+ 9 - 9
railway-business/src/main/resources/mapper/baseinfo/BusJcxcMapper.xml

@@ -15,7 +15,7 @@
     <result column="xingbie" property="xingbie"/>
     <result column="xingbie_text" property="xingbieText"/>
     <result column="xclx_text" property="xclxText"/>
-    <result column="pillar_area" property="pillarArea"/>
+    <result column="pillar_code" property="pillarCode"/>
     <result column="marker" property="marker"/>
     <result column="station_track" property="stationTrack"/>
     <result column="gxms" property="gxms"/>
@@ -42,7 +42,7 @@
     v.station_id,
     t.dept_station_id,
     t.xingbie,
-    t.pillar_area,
+    t.pillar_code,
     t.marker,
     t.station_track,
     t.gxms,
@@ -71,8 +71,8 @@
       <if test='null != xingbie'>
         xingbie,
       </if>
-      <if test='null != pillarArea'>
-        pillar_area,
+      <if test='null != pillarCode'>
+        pillar_code,
       </if>
       <if test='null != stationTrack'>
         station_track,
@@ -118,8 +118,8 @@
       <if test='null != xingbie'>
         #{xingbie},
       </if>
-      <if test='null != pillarArea'>
-        #{pillarArea},
+      <if test='null != pillarCode'>
+        #{pillarCode},
       </if>
       <if test='null != stationTrack'>
         #{stationTrack},
@@ -171,7 +171,7 @@
     <set>
       <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
       <if test='null != xingbie'>xingbie = #{xingbie},</if>
-      <if test='null != pillarArea'>pillar_area = #{pillarArea},</if>
+      <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
       <if test='null != marker'>marker = #{marker},</if>
       <if test='null != stationTrack'>station_track = #{stationTrack},</if>
       <if test='null != gxms'>gxms = #{gxms},</if>
@@ -223,8 +223,8 @@
       <if test="xingbie!=null and xingbie!=''">
         and t.xingbie=#{xingbie}
       </if>
-      <if test="pillarArea!=null and pillarArea!=''">
-        and t.pillar_area=#{pillarArea}
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_code=#{pillarCode}
       </if>
       <if test="marker!=null and marker!=''">
         and t.marker=#{marker}

+ 18 - 3
railway-business/src/main/resources/mapper/baseinfo/BusPreventMapper.xml

@@ -38,6 +38,8 @@
     <result column="severity" property="severity"/>
     <result column="property_rights" property="propertyRights"/>
     <result column="inquirer" property="inquirer"/>
+    <result column="start_marker" property="startMarker"/>
+    <result column="end_marker" property="endMarker"/>
   </resultMap>
 
 <!--  <sql id="Base_Column_List">
@@ -110,7 +112,9 @@
     v.kind,
     v.severity,
     v.property_rights,
-    v.inquirer
+    v.inquirer,
+    v.start_marker,
+    v.end_marker
     FROM
     v_prevent v
     left join v_station v1 on v.dept_station_id = v1.dept_station_id
@@ -132,8 +136,19 @@
         and v.pillar_code=#{pillarCode}
       </if>-->
       <if test="marker != null and marker != ''">
-        AND (v.marker + 0.0) BETWEEN (#{marker} + 0.0) - (#{pillarArea} + 0.0) AND (#{marker} + 0.0) +
-        (#{pillarArea} + 0.0)
+        AND (
+        (#{marker} + 0.0) - (#{pillarArea} + 0.0) BETWEEN (v.start_marker + 0.0) and (v.end_marker + 0.0)
+        or
+        (#{marker} + 0.0) + (#{pillarArea} + 0.0) BETWEEN (v.start_marker + 0.0) and (v.end_marker + 0.0)
+        or
+        (#{marker} + 0.0) BETWEEN (v.start_marker + 0.0) and (v.end_marker + 0.0)
+        or
+        (
+        (v.start_marker + 0.0) &gt;= (#{marker} + 0.0) - (#{pillarArea} + 0.0)
+        and
+        (v.start_marker + 0.0) &lt;= (#{marker} + 0.0) + (#{pillarArea} + 0.0)
+        )
+        )
       </if>
     </where>
   </select>

+ 0 - 19
railway-business/src/main/resources/mapper/baseinfo/BusZzdzxxMapper.xml

@@ -179,15 +179,6 @@
       <if test='null != createTime'>
         create_time,
       </if>
-      <if test='null != updateBy'>
-        update_by,
-      </if>
-      <if test='null != updateTime'>
-        update_time,
-      </if>
-      <if test='null != stationId'>
-        station_id
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test='null != deptStationId'>
@@ -250,15 +241,6 @@
       <if test='null != createTime'>
         #{createTime},
       </if>
-      <if test='null != updateBy'>
-        #{updateBy},
-      </if>
-      <if test='null != updateTime'>
-        #{updateTime},
-      </if>
-      <if test='null != stationId'>
-        #{stationId}
-      </if>
     </trim>
   </insert>
 
@@ -292,7 +274,6 @@
       <if test='null != delFlag'>del_flag = #{delFlag},</if>
       <if test='null != updateBy'>update_by = #{updateBy},</if>
       <if test='null != updateTime'>update_time = #{updateTime}</if>
-      <if test='null != stationId'>station_id = #{stationId}</if>
     </set>
     WHERE id = #{id}
   </update>

+ 4 - 4
railway-business/src/main/resources/mapper/catenary/BusJcbBlqMapper.xml

@@ -46,11 +46,11 @@
   </resultMap>
 
   <sql id="Base_Column_List">
-    id,
-    blq_id,
+    t.id,
+    t.blq_id,
     v.dept_id,
     v.dept_name,
-    v.station_name as station_name,
+    v.station_name,
     v.station_id,
     t.dept_station_id,
     t.pillar_code,
@@ -376,7 +376,7 @@
         and v.dept_id=#{deptId}
       </if>
       <if test="pillarCode!=null and pillarCode!=''">
-        and t.pillar_code=#{pillarCode}
+        and t1.pillar_code=#{pillarCode}
       </if>
       <if test="temperature!=null and temperature!=''">
         and t.temperature=#{temperature}

+ 10 - 1
railway-business/src/main/resources/mapper/catenary/BusJcbDmcgyqMapper.xml

@@ -5,6 +5,7 @@
 
   <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbDmcgyq">
     <result column="id" property="id"/>
+    <result column="gyq_id" property="gyqId"/>
     <result column="dept_id" property="deptId"/>
     <result column="dept_name" property="deptName"/>
     <result column="station_id" property="stationId"/>
@@ -44,7 +45,8 @@
   </resultMap>
 
   <sql id="Base_Column_List">
-    id,
+    t.id,
+    t.gyq_id,
     v.dept_id,
     v.dept_name,
     v.station_name as station_name,
@@ -85,6 +87,9 @@
   <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcbDmcgyq">
     INSERT INTO bus_jcb_dmcgyq
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test='null != gyqId'>
+        gyq_id,
+      </if>
       <if test='null != deptStationId'>
         dept_station_id,
       </if>
@@ -177,6 +182,9 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test='null != gyqId'>
+        #{gyqId},
+      </if>
       <if test='null != deptStationId'>
         #{deptStationId},
       </if>
@@ -279,6 +287,7 @@
   <update id="update" parameterType="com.railway.business.catenary.domain.BusJcbDmcgyq">
     UPDATE bus_jcb_dmcgyq
     <set>
+      <if test='null != gyqId'>dept_station_id = #{gyqId},</if>
       <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
       <if test='null != fenxiang'>fenxiang = #{fenxiang},</if>
       <if test='null != xingbie'>xingbie = #{xingbie},</if>

+ 13 - 111
railway-business/src/main/resources/mapper/catenary/BusJcbFdfxjyqMapper.xml

@@ -60,15 +60,13 @@
   </resultMap>
 
   <sql id="Base_Column_List">
-    id,
+    t.id,
     t.fdfxjyq_id,
-    v.dept_id,
-    v.dept_name,
-    v.station_name as station_name,
+    b.dept_station_id,
     v.station_id,
-    t.dept_station_id,
-    t.pillar_code,
-    t.fdh,
+    v.station_name,
+    b.pillar_area pillar_code,
+    b.dch fdh,
     t.temperature,
     t.check_date,
     t.pic_url,
@@ -473,56 +471,7 @@
 
   <select id="getInfo" resultMap="BaseResultMap">
     SELECT
-    t.id,
-    t.fdfxjyq_id,
-    b.dept_station_id station_id,
-    v.station_name,
-    b.pillar_code,
-    b.dch fdh,
-    t.temperature,
-    t.check_date,
-    t.pic_url,
-    t.point_a,
-    t.point_b,
-    t.point_c,
-    t.point_d,
-    t.point_e,
-    t.point_f,
-    t.point_g,
-    t.point_h,
-    t.fcd,
-    t.fddmpsd,
-    t.jybj_fdjyqzjyzt,
-    t.jybj_fdjyqzjyzt_desc,
-    t.jybj_clsjyzzt,
-    t.jybj_clsjyzzt_desc,
-    t.lbjzt_ls,
-    t.lbjzt_ls_desc,
-    t.lbjzt_xdx,
-    t.lbjzt_xdx_desc,
-    t.lbjzt_phzj,
-    t.lbjzt_phzj_desc,
-    t.lbjzt_jcxjt,
-    t.lbjzt_jcxjt_desc,
-    t.lbjzt_xhj,
-    t.lbjzt_xhj_desc,
-    t.sbzt,
-    t.sbzt_desc,
-    t.check_user,
-    t.confirm_user,
-    t.czwt,
-    t.create_by,
-    t.create_time,
-    t.update_by,
-    t.update_time,
-    t.submit_state,
-    t.del_flag,
-    t.xlfd_xlpd,
-    t.xlfd_wgdg,
-    t.xlfd_fdsxlqj,
-    t.xlfd_fdczxlqj,
-    t.sdgjczt_sddg,
-    t.sdgjczt_sddg_desc
+    <include refid="Base_Column_List"/>
     FROM
     bus_jcb_fdfxjyq t
     left join base_fdfxjyq b on t.fdfxjyq_id = b.id
@@ -533,56 +482,7 @@
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
-    t.id,
-    t.fdfxjyq_id,
-    b.dept_station_id station_id,
-    v.station_name,
-    b.pillar_code,
-    b.dch fdh,
-    t.temperature,
-    t.check_date,
-    t.pic_url,
-    t.point_a,
-    t.point_b,
-    t.point_c,
-    t.point_d,
-    t.point_e,
-    t.point_f,
-    t.point_g,
-    t.point_h,
-    t.fcd,
-    t.fddmpsd,
-    t.jybj_fdjyqzjyzt,
-    t.jybj_fdjyqzjyzt_desc,
-    t.jybj_clsjyzzt,
-    t.jybj_clsjyzzt_desc,
-    t.lbjzt_ls,
-    t.lbjzt_ls_desc,
-    t.lbjzt_xdx,
-    t.lbjzt_xdx_desc,
-    t.lbjzt_phzj,
-    t.lbjzt_phzj_desc,
-    t.lbjzt_jcxjt,
-    t.lbjzt_jcxjt_desc,
-    t.lbjzt_xhj,
-    t.lbjzt_xhj_desc,
-    t.sbzt,
-    t.sbzt_desc,
-    t.check_user,
-    t.confirm_user,
-    t.czwt,
-    t.create_by,
-    t.create_time,
-    t.update_by,
-    t.update_time,
-    t.submit_state,
-    t.del_flag,
-    t.xlfd_xlpd,
-    t.xlfd_wgdg,
-    t.xlfd_fdsxlqj,
-    t.xlfd_fdczxlqj,
-    t.sdgjczt_sddg,
-    t.sdgjczt_sddg_desc
+    <include refid="Base_Column_List"/>
     FROM
     bus_jcb_fdfxjyq t
     left join base_fdfxjyq b on t.fdfxjyq_id = b.id
@@ -750,10 +650,12 @@
   <select id="getLastOne" resultMap="BaseResultMap">
     SELECT
     <include refid="Base_Column_List"/>
-    FROM bus_jcb_fdfxjyq t
-    LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id
-    WHERE
-    t.submit_state = '1'and t.del_flag = '0'
+    FROM
+    bus_jcb_fdfxjyq t
+    left join base_fdfxjyq b on t.fdfxjyq_id = b.id
+    LEFT JOIN v_station v on b.dept_station_id = v.dept_station_id
+    where t.del_flag='0' and b.del_flag='0' and b.del_flag='0'
+    and t.submit_state = '1'and t.del_flag = '0'
     <if test="stationId!=null and stationId!=''">
       and v.station_id=#{stationId}
     </if>

+ 4 - 4
railway-business/src/main/resources/mapper/catenary/BusJcbGlkgMapper.xml

@@ -84,7 +84,7 @@
     id,
     v.dept_id,
     v.dept_name,
-    v.station_name as station_name,
+    v.station_name,
     v.station_id,
     t.dept_station_id,
     t.xingbie,
@@ -658,7 +658,7 @@
   <select id="getInfo" resultMap="BaseResultMap">
     SELECT
     distinct
-    <include refid="Base_Column_List"></include>
+    <include refid="Base_Column_List"/>
     FROM
     bus_jcb_glkg t
     LEFT JOIN  v_station v ON t.dept_station_id = v.dept_station_id
@@ -669,7 +669,7 @@
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
-    <include refid="Base_Column_List"></include>
+    <include refid="Base_Column_List"/>
     FROM
     bus_jcb_glkg t
     LEFT JOIN  v_station v ON t.dept_station_id = v.dept_station_id
@@ -910,7 +910,7 @@
 
   <select id="getLastOne" resultMap="BaseResultMap">
     SELECT
-    <include refid="Base_Column_List"></include>
+    <include refid="Base_Column_List"/>
     FROM
         bus_jcb_glkg t
     LEFT JOIN v_station v on t.dept_station_id = v.dept_station_id

+ 21 - 12
railway-business/src/main/resources/mapper/catenary/BusJcbJcxcMapper.xml

@@ -5,13 +5,14 @@
 
   <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbJcxc">
     <result column="id" property="id"/>
+    <result column="xc_id" property="xcId"/>
     <result column="dept_id" property="deptId"/>
     <result column="dept_name" property="deptName"/>
     <result column="station_id" property="stationId"/>
     <result column="station_name" property="stationName"/>
     <result column="dept_station_id" property="deptStationId"/>
     <result column="pillar_code" property="pillarCode"/>
-    <result column="xianchahao" property="xianchahao"/>
+    <result column="xch" property="xch"/>
     <result column="temperature" property="temperature"/>
     <result column="check_date" property="checkDate"/>
     <result column="gz1lcz" property="gz1lcz"/>
@@ -58,14 +59,15 @@
   </resultMap>
 
   <sql id="Base_Column_List">
-    id,
+    t.id,
+    t.xc_id,
     v.dept_id,
     v.dept_name,
-    v.station_name as station_name,
+    v.station_name,
     v.station_id,
     t.dept_station_id,
     t.pillar_code,
-    t.xianchahao,
+    t.xch,
     t.temperature,
     t.check_date,
     t.gz1lcz,
@@ -120,8 +122,11 @@
       <if test='null != pillarCode'>
         pillar_code,
       </if>
-      <if test='null != xianchahao'>
-        xianchahao,
+      <if test='null != xcId'>
+        xc_id,
+      </if>
+      <if test='null != xch'>
+        xch,
       </if>
       <if test='null != temperature'>
         temperature,
@@ -257,8 +262,11 @@
       <if test='null != pillarCode'>
         #{pillarCode},
       </if>
-      <if test='null != xianchahao'>
-        #{xianchahao},
+      <if test='null != xcId'>
+        #{xcId},
+      </if>
+      <if test='null != xch'>
+        #{xch},
       </if>
       <if test='null != temperature'>
         #{temperature},
@@ -400,7 +408,8 @@
     <set>
       <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
       <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
-      <if test='null != xianchahao'>xianchahao = #{xianchahao},</if>
+      <if test='null != xch'>xc_id = #{xcId},</if>
+      <if test='null != xch'>xch = #{xch},</if>
       <if test='null != temperature'>temperature = #{temperature},</if>
       <if test='null != checkDate'>check_date = #{checkDate},</if>
       <if test='null != gz1lcz'>gz1lcz = #{gz1lcz},</if>
@@ -457,7 +466,7 @@
 
   <select id="getLastRecord" resultMap="BaseResultMap">
     SELECT
-    a.GZ1LCZ, a.GZ2LCZ, a.ZGLCZ, a.QGLCZ, a.NGJ, a.PLZ, a.CZJJ, a.LGZZGC, a.GZYFZGC
+    a.gz1lcz, a.gz2lcz, a.zglcz, a.qglcz, a.ngj, a.plz, a.czjj, a.lgzzgc, a.gzyfzgc
     FROM bus_jcb_jcxc a,
     (
     select max(update_time) as lastTime
@@ -482,8 +491,8 @@
       <if test="pillarCode!=null and pillarCode!=''">
         and t.pillar_code=#{pillarCode}
       </if>
-      <if test="xianchahao!=null and xianchahao!=''">
-        and t.xianchahao=#{xianchahao}
+      <if test="xch!=null and xch!=''">
+        and t.xch=#{xch}
       </if>
       <if test="temperature!=null and temperature!=''">
         and t.temperature=#{temperature}

+ 22 - 13
railway-business/src/main/resources/mapper/catenary/BusJcbWjcxcMapper.xml

@@ -5,13 +5,14 @@
 
   <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcbWjcxc">
     <result column="id" property="id"/>
+    <result column="xc_id" property="xcId"/>
     <result column="dept_id" property="deptId"/>
     <result column="dept_name" property="deptName"/>
     <result column="station_id" property="stationId"/>
     <result column="station_name" property="stationName"/>
     <result column="dept_station_id" property="deptStationId"/>
     <result column="pillar_code" property="pillarCode"/>
-    <result column="xianchahao" property="xianchahao"/>
+    <result column="xch" property="xch"/>
     <result column="temperature" property="temperature"/>
     <result column="check_date" property="checkDate"/>
     <result column="lbjzt" property="lbjzt"/>
@@ -52,14 +53,15 @@
   </resultMap>
 
   <sql id="Base_Column_List">
-    id,
+    t.id,
+    t.xc_id,
     v.dept_id,
     v.dept_name,
-    v.station_name as station_name,
+    v.station_name,
     v.station_id,
     t.dept_station_id,
     t.pillar_code,
-    t.xianchahao,
+    t.xch,
     t.temperature,
     t.check_date,
     t.lbjzt,
@@ -108,8 +110,11 @@
       <if test='null != pillarCode'>
         pillar_code,
       </if>
-      <if test='null != xianchahao'>
-        xianchahao,
+      <if test='null != xcId'>
+        xc_id,
+      </if>
+      <if test='null != xch'>
+        xch,
       </if>
       <if test='null != temperature'>
         temperature,
@@ -227,8 +232,11 @@
       <if test='null != pillarCode'>
         #{pillarCode},
       </if>
-      <if test='null != xianchahao'>
-        #{xianchahao},
+      <if test='null != xcId'>
+        #{xcId},
+      </if>
+      <if test='null != xch'>
+        #{xch},
       </if>
       <if test='null != temperature'>
         #{temperature},
@@ -352,7 +360,8 @@
     <set>
       <if test='null != deptStationId'>dept_station_id = #{deptStationId},</if>
       <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
-      <if test='null != xianchahao'>xianchahao = #{xianchahao},</if>
+      <if test='null != xch'>xc_id = #{xcId},</if>
+      <if test='null != xch'>xch = #{xch},</if>
       <if test='null != temperature'>temperature = #{temperature},</if>
       <if test='null != checkDate'>check_date = #{checkDate},</if>
       <if test='null != lbjzt'>lbjzt = #{lbjzt},</if>
@@ -403,8 +412,8 @@
 
   <select id="getLastRecord" resultMap="BaseResultMap">
     SELECT
-    a.ZXLCZ, a.ZXDG, a.CXLCZ, a.CXDG, a.ZXWXJQ, a.CXWXJQ, a.AZZXLCZ, a.AZZXDG, a.AZCXLCZ, a.AZCXDG,
-    a.BZZXLCZ, a.BZZXDG, a.BZCXLCZ, a.BZCXDG,a.CZZXLCZ, a.CZZXDG, a.CZCXLCZ, a.CZCXDG
+    a.zxlcz, a.zxdg, a.cxlcz, a.cxdg, a.zxwxjq, a.cxwxjq, a.azzxlcz, a.azzxdg, a.azcxlcz, a.azcxdg,
+    a.bzzxlcz, a.bzzxdg, a.bzcxlcz, a.bzcxdg,a.czzxlcz, a.czzxdg, a.czcxlcz, a.czcxdg
     FROM bus_jcb_wjcxc a,
     (
     select max(update_time) as lastTime
@@ -429,8 +438,8 @@
       <if test="pillarCode!=null and pillarCode!=''">
         and t.pillar_code=#{pillarCode}
       </if>
-      <if test="xianchahao!=null and xianchahao!=''">
-        and t.xianchahao=#{xianchahao}
+      <if test="xch!=null and xch!=''">
+        and t.xch=#{xch}
       </if>
       <if test="temperature!=null and temperature!=''">
         and t.temperature=#{temperature}

+ 12 - 5
railway-business/src/main/resources/mapper/catenary/BusJlgzMapper.xml

@@ -152,13 +152,20 @@
     LEFT JOIN v_substation v ON t.substation_id = v.substation_id
     LEFT JOIN sys_dict_data dict1 ON (t.xingbie = dict1.dict_value AND dict1.dict_type = 'xingbie')
     LEFT JOIN sys_dict_data dict2 ON (t.yylx = dict2.dict_value AND dict2.dict_type = 'gzyy')
-    WHERE
-    t.del_flag = '0'
-    AND t.id = #{id}
+    <where>
+        t.del_flag = '0'
+      <if test="id!=null and id!=''">
+        and t.id = #{id}
+      </if>
+      <if test="lineId!=null and lineId!=''">
+        AND v.line_id = #{lineId}
+      </if>
+    </where>
   </select>
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
+    DISTINCT
     dict1.dict_label as xingbie_text,
     dict2.dict_label as yylx_text,
     <include refid="Base_Column_List"/>
@@ -188,7 +195,7 @@
         and t.yylx=#{yylx}
       </if>
       <if test="operationDate!=null and operationDate!=''">
-        and t.operation_date=#{operationDate}
+        and STR_TO_DATE(t.operation_date,'%Y-%m-%d')=#{operationDate}
       </if>
       <if test="gzms!=null and gzms!=''">
         and t.gzms=#{gzms}
@@ -210,7 +217,7 @@
       </if>
     </where>
     <if test="orderBy!=null and orderBy!=''">
-      order by t.${orderBy}
+      order by STR_TO_DATE(t.${orderBy},'%Y-%m-%d')
     </if>
     <if test="isAsc!=null and isAsc!=''">
       <if test="isAsc == '1'.toString()">

+ 13 - 0
railway-common/src/main/java/com/railway/common/core/domain/entity/SysDept.java

@@ -50,6 +50,19 @@ public class SysDept extends BaseEntity {
   @Size(max = 30, message = "部门名称长度不能超过30个字符")
   private String deptName;
 
+  /**
+   * 部门类型
+   */
+  @ApiModelProperty(value = "部门类型")
+  @Size(max = 20, message = "部门名称长度不能超过20个字符")
+  private String deptType;
+
+  /**
+   * 部门类型
+   */
+  @ApiModelProperty(value = "部门类型")
+  private String deptTypeText;
+
   /**
    * 显示顺序
    */

+ 9 - 2
railway-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -9,6 +9,8 @@
     <result property="parentId" column="parent_id"/>
     <result property="ancestors" column="ancestors"/>
     <result property="deptName" column="dept_name"/>
+    <result property="deptType" column="dept_type"/>
+    <result property="deptTypeText" column="dept_type_text"/>
     <result property="orderNum" column="order_num"/>
     <result property="leader" column="leader"/>
     <result property="phone" column="phone"/>
@@ -26,8 +28,10 @@
 
   <sql id="selectDeptVo">
     select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone,
-    d.email, d.status, d.del_flag, d.create_by, d.create_time, d.remark, t.user_count
+    d.email, d.status, d.del_flag, d.create_by, d.create_time, d.remark, t.user_count,
+    d.dept_type, dict.dict_label as dept_type_text
     from sys_dept d
+    left join sys_dict_data dict on d.dept_type = dict.dict_value and dict.dict_type = 'dictType'
     left join (select dept_id, count(*) as user_count from sys_user where del_flag = '0' group by dept_id) t on t.dept_id = d.dept_id
   </sql>
 
@@ -65,7 +69,7 @@
 
   <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
     <include refid="selectDeptVo"/>
-    where dept_id = #{deptId}
+    where d.dept_id = #{deptId}
   </select>
 
   <select id="checkDeptExistUser" parameterType="Long" resultType="int">
@@ -96,6 +100,7 @@
     <if test="deptId != null and deptId != 0">dept_id,</if>
     <if test="parentId != null and parentId != 0">parent_id,</if>
     <if test="deptName != null and deptName != ''">dept_name,</if>
+    <if test="deptType != null and deptType != ''">dept_type,</if>
     <if test="ancestors != null and ancestors != ''">ancestors,</if>
     <if test="orderNum != null and orderNum != ''">order_num,</if>
     <if test="leader != null and leader != ''">leader,</if>
@@ -109,6 +114,7 @@
     <if test="deptId != null and deptId != 0">#{deptId},</if>
     <if test="parentId != null and parentId != 0">#{parentId},</if>
     <if test="deptName != null and deptName != ''">#{deptName},</if>
+    <if test="deptType != null and deptType != ''">#{deptType},</if>
     <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
     <if test="orderNum != null and orderNum != ''">#{orderNum},</if>
     <if test="leader != null and leader != ''">#{leader},</if>
@@ -126,6 +132,7 @@
     <set>
       <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
       <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
+      <if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
       <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
       <if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
       <if test="leader != null">leader = #{leader},</if>