Browse Source

Merge remote-tracking branch 'origin/master'

wuhonghao 4 năm trước cách đây
mục cha
commit
9e97203352
26 tập tin đã thay đổi với 340 bổ sung758 xóa
  1. 10 0
      railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcebController.java
  2. 7 4
      railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BusFjxgmdServiceImpl.java
  3. 9 0
      railway-business/src/main/java/com/railway/business/catenary/domain/BusJlgz.java
  4. 8 1
      railway-business/src/main/java/com/railway/business/catenary/domain/vo/JcebQueryVo.java
  5. 93 91
      railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebGjsfxServiceImpl.java
  6. 0 3
      railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebServiceImpl.java
  7. 24 4
      railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJlgzServiceImpl.java
  8. 0 527
      railway-business/src/main/resources/mapper/baseinfo/BusZzdzxxMapper.xml
  9. 90 97
      railway-business/src/main/resources/mapper/catenary/BusJcbGlkgMapper.xml
  10. 3 0
      railway-business/src/main/resources/mapper/catenary/BusJcebGjsfxMapper.xml
  11. 3 0
      railway-business/src/main/resources/mapper/catenary/BusJcebJddzMapper.xml
  12. 3 0
      railway-business/src/main/resources/mapper/catenary/BusJcebJyzqsjlMapper.xml
  13. 3 0
      railway-business/src/main/resources/mapper/catenary/BusJcebLbjghjlMapper.xml
  14. 3 0
      railway-business/src/main/resources/mapper/catenary/BusJcebQmjcjlMapper.xml
  15. 3 0
      railway-business/src/main/resources/mapper/catenary/BusJcebXsjcjlMapper.xml
  16. 3 2
      railway-business/src/main/resources/mapper/catenary/BusJlgzMapper.xml
  17. 5 0
      railway-common/src/main/java/com/railway/common/core/domain/entity/SysUser.java
  18. 41 0
      railway-system/src/main/java/com/railway/system/enums/PostTypeEnum.java
  19. 1 1
      railway-system/src/main/java/com/railway/system/mapper/SysDeptMapper.java
  20. 1 1
      railway-system/src/main/java/com/railway/system/service/ISysDeptService.java
  21. 2 6
      railway-system/src/main/java/com/railway/system/service/impl/SysDeptServiceImpl.java
  22. 1 5
      railway-system/src/main/java/com/railway/system/service/impl/SysRoleServiceImpl.java
  23. 13 2
      railway-system/src/main/java/com/railway/system/service/impl/SysUserServiceImpl.java
  24. 8 6
      railway-system/src/main/resources/mapper/system/SysDeptMapper.xml
  25. 3 1
      railway-system/src/main/resources/mapper/system/SysRoleMapper.xml
  26. 3 7
      railway-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 10 - 0
railway-admin/src/main/java/com/railway/web/controller/business/catenary/BusJcebController.java

@@ -10,7 +10,10 @@ import com.railway.business.catenary.service.IBusJcebLbjghjlService;
 import com.railway.business.catenary.service.IBusJcebQmjcjlService;
 import com.railway.business.catenary.service.IBusJcebXsjcjlService;
 import com.railway.common.core.controller.BaseController;
+import com.railway.common.core.domain.entity.SysUser;
 import com.railway.common.core.page.TableDataInfo;
+import com.railway.common.utils.SecurityUtils;
+import com.railway.system.enums.PostTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import java.util.ArrayList;
@@ -56,6 +59,13 @@ public class BusJcebController extends BaseController {
   @GetMapping(value = "listByType")
   public TableDataInfo listByType(JcebQueryVo query) {
     startPage();
+    SysUser user = SecurityUtils.getLoginUser().getUser();
+    PostTypeEnum postType = PostTypeEnum.ofValue(user.getPost());
+    if(postType == PostTypeEnum.STAFF){
+      query.setCreateBy(user.getUserName());
+    }else {
+      query.setCreateBy(null);
+    }
 
     JcebTypeEnum jcebTypeEnum = JcebTypeEnum.ofValue(query.getJcebType());
     List<JcebRecordVo> list = null;

+ 7 - 4
railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BusFjxgmdServiceImpl.java

@@ -3,6 +3,7 @@ package com.railway.business.baseinfo.service.impl;
 import com.railway.business.baseinfo.domain.BusFjxgmd;
 import com.railway.business.baseinfo.domain.BusZzdzxx;
 import com.railway.business.baseinfo.domain.vo.BusFjxgmdQueryVo;
+import com.railway.business.baseinfo.domain.vo.BusSmartQueryVo;
 import com.railway.business.baseinfo.mapper.BusZzdzxxMapper;
 import com.railway.common.enums.DelFlagEnum;
 import com.railway.business.baseinfo.mapper.BusFjxgmdMapper;
@@ -97,10 +98,12 @@ public class BusFjxgmdServiceImpl implements IBusFjxgmdService{
         // 有站场区间,支柱号 查询支柱公里标
         if (StringUtils.isNoneBlank(busFjxgmdQueryVo.getPillarCode())
             && busFjxgmdQueryVo.getStationId() != null) {
-            BusZzdzxx busZzdzxx = new BusZzdzxx();
-            busZzdzxx.setPillarCode(busFjxgmdQueryVo.getPillarCode());
-            busZzdzxx.setStationId(busFjxgmdQueryVo.getStationId());
-            List<BusZzdzxx> zzList = busZzdzxxMapper.getList(busZzdzxx);
+            BusSmartQueryVo vo = new BusSmartQueryVo();
+            vo.setPillarCode(busFjxgmdQueryVo.getPillarCode());
+            vo.setStationId(busFjxgmdQueryVo.getStationId());
+            vo.setLineId(busFjxgmdQueryVo.getLineId());
+            vo.setXingbie(busFjxgmdQueryVo.getXingbie());
+            List<BusZzdzxx> zzList = busZzdzxxMapper.smartQuery(vo);
             if (zzList != null && zzList.size() > 0) {
                 BusZzdzxx zz = zzList.get(0);
                 busFjxgmdQueryVo.setMarker(zz.getMarker());

+ 9 - 0
railway-business/src/main/java/com/railway/business/catenary/domain/BusJlgz.java

@@ -43,6 +43,9 @@ public class BusJlgz extends BaseEntity{
     @Length(min = 1, max = 20, message = "【公里标】长度必须介于 {min} 和 {max} 之间")
     private String marker;
 
+    @ApiModelProperty(value = "支柱范围")
+    private String pillarArea;
+
     @ApiModelProperty(value = "原因类型")
     @Length(min = 1, max = 100, message = "【原因类型】长度必须介于 {min} 和 {max} 之间")
     private String yylx;
@@ -68,6 +71,12 @@ public class BusJlgz extends BaseEntity{
     @ApiModelProperty(value = "1-ASC 正序排序,0-DESC 倒序排序")
     private String isAsc;
 
+    @ApiModelProperty(value = "站场区间")
+    private Long stationId;
+
+    @ApiModelProperty(value = "支柱号")
+    private String pillarCode;
+
     private List<BusJlgzPic> pics;
 
 }

+ 8 - 1
railway-business/src/main/java/com/railway/business/catenary/domain/vo/JcebQueryVo.java

@@ -27,5 +27,12 @@ public class JcebQueryVo implements Serializable {
   private String pillarCode;
 
   @ApiModelProperty(value = "记录人/操作人")
-  private String operator;
+  private Long operator;
+
+  /**
+   * 创建者
+   */
+  @ApiModelProperty(value = "创建者")
+  private String createBy;
+
 }

+ 93 - 91
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebGjsfxServiceImpl.java

@@ -9,109 +9,111 @@ import java.util.Date;
 import java.util.List;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+
 /**
-* 检测表-关节式分相 
-* @author whh
-* @date 2021/10/19
-*/
+ * 检测表-关节式分相
+ *
+ * @author whh
+ * @date 2021/10/19
+ */
 @Service
 @Transactional(readOnly = true)
 public class BusJcebGjsfxServiceImpl extends BusJcebServiceImpl<BusJcebGjsfx>
-		implements IBusJcebGjsfxService{
+    implements IBusJcebGjsfxService {
 
-	private final BusJcebGjsfxMapper busJcebGjsfxMapper;
+  private final BusJcebGjsfxMapper busJcebGjsfxMapper;
 
-	public BusJcebGjsfxServiceImpl(BusJcebGjsfxMapper busJcebGjsfxMapper) {
-		super(busJcebGjsfxMapper);
-		this.busJcebGjsfxMapper = busJcebGjsfxMapper;
-	}
+  public BusJcebGjsfxServiceImpl(BusJcebGjsfxMapper busJcebGjsfxMapper) {
+    super(busJcebGjsfxMapper);
+    this.busJcebGjsfxMapper = busJcebGjsfxMapper;
+  }
 
-	/**
-	* 新增
-	*/
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public int create(BusJcebGjsfx busJcebGjsfx) {
-	    busJcebGjsfx.setCreateTime(new Date());
-        busJcebGjsfx.setCreateBy(SecurityUtils.getUsername());
-		return busJcebGjsfxMapper.insert(busJcebGjsfx);
-	}
+  /**
+   * 新增
+   */
+  @Override
+  @Transactional(rollbackFor = Exception.class)
+  public int create(BusJcebGjsfx busJcebGjsfx) {
+    busJcebGjsfx.setCreateTime(new Date());
+    busJcebGjsfx.setCreateBy(SecurityUtils.getUsername());
+    return busJcebGjsfxMapper.insert(busJcebGjsfx);
+  }
 
-	/**
-	* 删除
-	*/
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public int delete(String[] ids) {
-		int r =0;
-		for (String id : ids) {
-			int j= busJcebGjsfxMapper.delete(id);
-			r = r + j;
-		}
-		return	r;
-	}
+  /**
+   * 删除
+   */
+  @Override
+  @Transactional(rollbackFor = Exception.class)
+  public int delete(String[] ids) {
+    int r = 0;
+    for (String id : ids) {
+      int j = busJcebGjsfxMapper.delete(id);
+      r = r + j;
+    }
+    return r;
+  }
 
-	/**
-	* 更新
-	*/
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public int update(BusJcebGjsfx busJcebGjsfx) {
-		busJcebGjsfx.setUpdateTime(new Date());
-    	busJcebGjsfx.setUpdateBy(SecurityUtils.getUsername());
-		return busJcebGjsfxMapper.update(busJcebGjsfx);
-	}
+  /**
+   * 更新
+   */
+  @Override
+  @Transactional(rollbackFor = Exception.class)
+  public int update(BusJcebGjsfx busJcebGjsfx) {
+    busJcebGjsfx.setUpdateTime(new Date());
+    busJcebGjsfx.setUpdateBy(SecurityUtils.getUsername());
+    return busJcebGjsfxMapper.update(busJcebGjsfx);
+  }
 
-	/**
-	* 获取单个
-	*/
-	@Override
-	public BusJcebGjsfx getInfo(String id) {
-		return busJcebGjsfxMapper.getInfo(id);
-	}
+  /**
+   * 获取单个
+   */
+  @Override
+  public BusJcebGjsfx getInfo(String id) {
+    return busJcebGjsfxMapper.getInfo(id);
+  }
 
-	/**
-	* 查询列表
-	*/
-	@Override
-	public List<BusJcebGjsfx> getList(BusJcebGjsfx busJcebGjsfx) {
-		return busJcebGjsfxMapper.getList(busJcebGjsfx);
-	}
+  /**
+   * 查询列表
+   */
+  @Override
+  public List<BusJcebGjsfx> getList(BusJcebGjsfx busJcebGjsfx) {
+    return busJcebGjsfxMapper.getList(busJcebGjsfx);
+  }
 
-	/**
-	 * 提交
-	 *
-	 * @return 提交结果
-	 */
-	@Override
-	public int submit(BusJcebGjsfx busJcebGjsfx) {
-		setSubmit(busJcebGjsfx);
-		if(StringUtils.isEmpty(busJcebGjsfx.getId())){
-			return create(busJcebGjsfx);
-		} else {
-			return update(busJcebGjsfx);
-		}
-	}
+  /**
+   * 提交
+   *
+   * @return 提交结果
+   */
+  @Override
+  public int submit(BusJcebGjsfx busJcebGjsfx) {
+    setSubmit(busJcebGjsfx);
+    if (StringUtils.isEmpty(busJcebGjsfx.getId())) {
+      return create(busJcebGjsfx);
+    } else {
+      return update(busJcebGjsfx);
+    }
+  }
 
-	/**
-	 * 退回
-	 *
-	 * @return 退回结果
-	 */
-	@Override
-	public int reject(BusJcebGjsfx busJcebGjsfx) {
-		setReject(busJcebGjsfx);
-		return update(busJcebGjsfx);
-	}
+  /**
+   * 退回
+   *
+   * @return 退回结果
+   */
+  @Override
+  public int reject(BusJcebGjsfx busJcebGjsfx) {
+    setReject(busJcebGjsfx);
+    return update(busJcebGjsfx);
+  }
 
-	/**
-	 * 确认
-	 *
-	 * @return 确认结果
-	 */
-	@Override
-	public int confirm(BusJcebGjsfx busJcebGjsfx) {
-		setConfirm(busJcebGjsfx);
-		return update(busJcebGjsfx);
-	}
+  /**
+   * 确认
+   *
+   * @return 确认结果
+   */
+  @Override
+  public int confirm(BusJcebGjsfx busJcebGjsfx) {
+    setConfirm(busJcebGjsfx);
+    return update(busJcebGjsfx);
+  }
 }

+ 0 - 3
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJcebServiceImpl.java

@@ -7,9 +7,6 @@ import com.railway.business.catenary.domain.vo.JcebRecordVo;
 import com.railway.business.catenary.enums.JcebStatusEnum;
 import com.railway.business.catenary.mapper.BusJcebMapper;
 import com.railway.business.catenary.service.IBusJcebService;
-import com.railway.common.utils.SecurityUtils;
-import java.util.Date;
-import java.util.List;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 

+ 24 - 4
railway-business/src/main/java/com/railway/business/catenary/service/impl/BusJlgzServiceImpl.java

@@ -1,6 +1,7 @@
 package com.railway.business.catenary.service.impl;
 
 import com.railway.business.baseinfo.domain.BusZzdzxx;
+import com.railway.business.baseinfo.domain.vo.BusSmartQueryVo;
 import com.railway.business.baseinfo.mapper.BusZzdzxxMapper;
 import com.railway.business.catenary.domain.BusJlgz;
 import com.railway.business.catenary.domain.BusJlgzPic;
@@ -119,6 +120,23 @@ public class BusJlgzServiceImpl implements IBusJlgzService {
 		if(StringUtils.isNotEmpty(busJlgz.getOrderBy())){
 			busJlgz.setOrderBy(SqlUtil.humpToLine(busJlgz.getOrderBy()));
 		}
+		if (busJlgz.getPillarArea() == null) {
+			busJlgz.setPillarArea("500");
+		}
+		// 有站场区间,支柱号 查询支柱公里标
+		if (StringUtils.isNoneBlank(busJlgz.getPillarCode())
+				&& busJlgz.getStationId() != null) {
+			BusSmartQueryVo vo = new BusSmartQueryVo();
+			vo.setPillarCode(busJlgz.getPillarCode());
+			vo.setStationId(busJlgz.getStationId());
+			vo.setLineId(busJlgz.getLineId());
+			vo.setXingbie(busJlgz.getXingbie());
+			List<BusZzdzxx> zzList = busZzdzxxMapper.smartQuery(vo);
+			if (zzList != null && zzList.size() > 0) {
+				BusZzdzxx zz = zzList.get(0);
+				busJlgz.setMarker(zz.getMarker());
+			}
+		}
 		return busJlgzMapper.getList(busJlgz);
 	}
 
@@ -130,10 +148,12 @@ public class BusJlgzServiceImpl implements IBusJlgzService {
 		// 有站场区间,支柱号 查询支柱公里标
 		if (StringUtils.isNoneBlank(busJlgzQueryVo.getPillarCode())
 				&& busJlgzQueryVo.getStationId() != null) {
-			BusZzdzxx busZzdzxx = new BusZzdzxx();
-			busZzdzxx.setPillarCode(busJlgzQueryVo.getPillarCode());
-			busZzdzxx.setStationId(busJlgzQueryVo.getStationId());
-			List<BusZzdzxx> zzList = busZzdzxxMapper.getList(busZzdzxx);
+			BusSmartQueryVo vo = new BusSmartQueryVo();
+			vo.setPillarCode(busJlgzQueryVo.getPillarCode());
+			vo.setStationId(busJlgzQueryVo.getStationId());
+			vo.setLineId(busJlgzQueryVo.getLineId());
+			vo.setXingbie(busJlgzQueryVo.getXingbie());
+			List<BusZzdzxx> zzList = busZzdzxxMapper.smartQuery(vo);
 			if (zzList != null && zzList.size() > 0) {
 				BusZzdzxx zz = zzList.get(0);
 				busJlgzQueryVo.setMarker(zz.getMarker());

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

@@ -94,66 +94,18 @@
     t.xingbie,
     t.pillar_code,
     t.station_track,
-    t.gxms,
-    t.jbdydm,
     t.sd,
     t.marker,
     t.jcxgmdh,
-    t.jcxgazth,
-    t.fjxgazth,
     t.zzlx,
     t.zzxh,
     t.zzyt,
     t.cz,
     t.zxqwqn,
-    t.kj,
-    t.qxbj,
-    t.dg,
-    t.lcz,
-    t.gmbg_scz,
-    t.gmbg_bzz,
-    t.cmxj_scz,
-    t.cmxj_bzz,
-    t.wgcg_scz,
-    t.wgcg_bzz,
     t.zzzt,
-    t.sccj,
     t.tyrq,
     t.ccrq,
-    t.sjsm,
-    t.zzjczt,
-    t.jclx,
-    t.dxzt,
     t.jxzq,
-    t.sf_sfpwjjdm,
-    t.sf_bczz,
-    t.sf_fdjyq,
-    t.sf_fxjyq,
-    t.sf_jcxc,
-    t.sf_lxwjcxc,
-    t.sf_sxwjcxc,
-    t.sf_mdgjzfx,
-    t.sf_hkd,
-    t.sf_dlj,
-    t.sf_glkg,
-    t.sf_blq,
-    t.sf_dcgyzz,
-    t.sf_xcbzp,
-    t.sf_jdzz,
-    t.sf_xsx,
-    t.sf_hlx,
-    t.sf_gwx,
-    t.sf_gdx,
-    t.sf_pwx,
-    t.sf_sfx,
-    t.sf_jqx,
-    t.sf_blx,
-    t.sf_lx,
-    t.sf_zm,
-    t.qt,
-    t.fj,
-    t.sl,
-    t.dw,
     t.sjbh,
     t.del_flag,
     t.create_by,
@@ -178,12 +130,6 @@
       <if test='null != stationTrack'>
         station_track,
       </if>
-      <if test='null != gxms'>
-        gxms,
-      </if>
-      <if test='null != jbdydm'>
-        jbdydm,
-      </if>
       <if test='null != sd'>
         sd,
       </if>
@@ -193,12 +139,6 @@
       <if test='null != jcxgmdh'>
         jcxgmdh,
       </if>
-      <if test='null != jcxgazth'>
-        jcxgazth,
-      </if>
-      <if test='null != fjxgazth'>
-        fjxgazth,
-      </if>
       <if test='null != zzlx'>
         zzlx,
       </if>
@@ -214,150 +154,18 @@
       <if test='null != zxqwqn'>
         zxqwqn,
       </if>
-      <if test='null != kj'>
-        kj,
-      </if>
-      <if test='null != qxbj'>
-        qxbj,
-      </if>
-      <if test='null != dg'>
-        dg,
-      </if>
-      <if test='null != lcz'>
-        lcz,
-      </if>
-      <if test='null != gmbgScz'>
-        gmbg_scz,
-      </if>
-      <if test='null != gmbgBzz'>
-        gmbg_bzz,
-      </if>
-      <if test='null != cmxjScz'>
-        cmxj_scz,
-      </if>
-      <if test='null != cmxjBzz'>
-        cmxj_bzz,
-      </if>
-      <if test='null != wgcgScz'>
-        wgcg_scz,
-      </if>
-      <if test='null != wgcgBzz'>
-        wgcg_bzz,
-      </if>
       <if test='null != zzzt'>
         zzzt,
       </if>
-      <if test='null != sccj'>
-        sccj,
-      </if>
       <if test='null != tyrq'>
         tyrq,
       </if>
       <if test='null != ccrq'>
         ccrq,
       </if>
-      <if test='null != sjsm'>
-        sjsm,
-      </if>
-      <if test='null != zzjczt'>
-        zzjczt,
-      </if>
-      <if test='null != jclx'>
-        jclx,
-      </if>
-      <if test='null != dxzt'>
-        dxzt,
-      </if>
       <if test='null != jxzq'>
         jxzq,
       </if>
-      <if test='null != sfSfpwjjdm'>
-        sf_sfpwjjdm,
-      </if>
-      <if test='null != sfBczz'>
-        sf_bczz,
-      </if>
-      <if test='null != sfFdjyq'>
-        sf_fdjyq,
-      </if>
-      <if test='null != sfFxjyq'>
-        sf_fxjyq,
-      </if>
-      <if test='null != sfJcxc'>
-        sf_jcxc,
-      </if>
-      <if test='null != sfLxwjcxc'>
-        sf_lxwjcxc,
-      </if>
-      <if test='null != sfSxwjcxc'>
-        sf_sxwjcxc,
-      </if>
-      <if test='null != sfMdgjzfx'>
-        sf_mdgjzfx,
-      </if>
-      <if test='null != sfHkd'>
-        sf_hkd,
-      </if>
-      <if test='null != sfDlj'>
-        sf_dlj,
-      </if>
-      <if test='null != sfGlkg'>
-        sf_glkg,
-      </if>
-      <if test='null != sfBlq'>
-        sf_blq,
-      </if>
-      <if test='null != sfDcgyzz'>
-        sf_dcgyzz,
-      </if>
-      <if test='null != sfXcbzp'>
-        sf_xcbzp,
-      </if>
-      <if test='null != sfJdzz'>
-        sf_jdzz,
-      </if>
-      <if test='null != sfXsx'>
-        sf_xsx,
-      </if>
-      <if test='null != sfHlx'>
-        sf_hlx,
-      </if>
-      <if test='null != sfGwx'>
-        sf_gwx,
-      </if>
-      <if test='null != sfGdx'>
-        sf_gdx,
-      </if>
-      <if test='null != sfPwx'>
-        sf_pwx,
-      </if>
-      <if test='null != sfSfx'>
-        sf_sfx,
-      </if>
-      <if test='null != sfJqx'>
-        sf_jqx,
-      </if>
-      <if test='null != sfBlx'>
-        sf_blx,
-      </if>
-      <if test='null != sfLx'>
-        sf_lx,
-      </if>
-      <if test='null != sfZm'>
-        sf_zm,
-      </if>
-      <if test='null != qt'>
-        qt,
-      </if>
-      <if test='null != fj'>
-        fj,
-      </if>
-      <if test='null != sl'>
-        sl,
-      </if>
-      <if test='null != dw'>
-        dw,
-      </if>
       <if test='null != sjbh'>
         sjbh,
       </if>
@@ -393,12 +201,6 @@
       <if test='null != stationTrack'>
         #{stationTrack},
       </if>
-      <if test='null != gxms'>
-        #{gxms},
-      </if>
-      <if test='null != jbdydm'>
-        #{jbdydm},
-      </if>
       <if test='null != sd'>
         #{sd},
       </if>
@@ -408,12 +210,6 @@
       <if test='null != jcxgmdh'>
         #{jcxgmdh},
       </if>
-      <if test='null != jcxgazth'>
-        #{jcxgazth},
-      </if>
-      <if test='null != fjxgazth'>
-        #{fjxgazth},
-      </if>
       <if test='null != zzlx'>
         #{zzlx},
       </if>
@@ -429,150 +225,18 @@
       <if test='null != zxqwqn'>
         #{zxqwqn},
       </if>
-      <if test='null != kj'>
-        #{kj},
-      </if>
-      <if test='null != qxbj'>
-        #{qxbj},
-      </if>
-      <if test='null != dg'>
-        #{dg},
-      </if>
-      <if test='null != lcz'>
-        #{lcz},
-      </if>
-      <if test='null != gmbgScz'>
-        #{gmbgScz},
-      </if>
-      <if test='null != gmbgBzz'>
-        #{gmbgBzz},
-      </if>
-      <if test='null != cmxjScz'>
-        #{cmxjScz},
-      </if>
-      <if test='null != cmxjBzz'>
-        #{cmxjBzz},
-      </if>
-      <if test='null != wgcgScz'>
-        #{wgcgScz},
-      </if>
-      <if test='null != wgcgBzz'>
-        #{wgcgBzz},
-      </if>
       <if test='null != zzzt'>
         #{zzzt},
       </if>
-      <if test='null != sccj'>
-        #{sccj},
-      </if>
       <if test='null != tyrq'>
         #{tyrq},
       </if>
       <if test='null != ccrq'>
         #{ccrq},
       </if>
-      <if test='null != sjsm'>
-        #{sjsm},
-      </if>
-      <if test='null != zzjczt'>
-        #{zzjczt},
-      </if>
-      <if test='null != jclx'>
-        #{jclx},
-      </if>
-      <if test='null != dxzt'>
-        #{dxzt},
-      </if>
       <if test='null != jxzq'>
         #{jxzq},
       </if>
-      <if test='null != sfSfpwjjdm'>
-        #{sfSfpwjjdm},
-      </if>
-      <if test='null != sfBczz'>
-        #{sfBczz},
-      </if>
-      <if test='null != sfFdjyq'>
-        #{sfFdjyq},
-      </if>
-      <if test='null != sfFxjyq'>
-        #{sfFxjyq},
-      </if>
-      <if test='null != sfJcxc'>
-        #{sfJcxc},
-      </if>
-      <if test='null != sfLxwjcxc'>
-        #{sfLxwjcxc},
-      </if>
-      <if test='null != sfSxwjcxc'>
-        #{sfSxwjcxc},
-      </if>
-      <if test='null != sfMdgjzfx'>
-        #{sfMdgjzfx},
-      </if>
-      <if test='null != sfHkd'>
-        #{sfHkd},
-      </if>
-      <if test='null != sfDlj'>
-        #{sfDlj},
-      </if>
-      <if test='null != sfGlkg'>
-        #{sfGlkg},
-      </if>
-      <if test='null != sfBlq'>
-        #{sfBlq},
-      </if>
-      <if test='null != sfDcgyzz'>
-        #{sfDcgyzz},
-      </if>
-      <if test='null != sfXcbzp'>
-        #{sfXcbzp},
-      </if>
-      <if test='null != sfJdzz'>
-        #{sfJdzz},
-      </if>
-      <if test='null != sfXsx'>
-        #{sfXsx},
-      </if>
-      <if test='null != sfHlx'>
-        #{sfHlx},
-      </if>
-      <if test='null != sfGwx'>
-        #{sfGwx},
-      </if>
-      <if test='null != sfGdx'>
-        #{sfGdx},
-      </if>
-      <if test='null != sfPwx'>
-        #{sfPwx},
-      </if>
-      <if test='null != sfSfx'>
-        #{sfSfx},
-      </if>
-      <if test='null != sfJqx'>
-        #{sfJqx},
-      </if>
-      <if test='null != sfBlx'>
-        #{sfBlx},
-      </if>
-      <if test='null != sfLx'>
-        #{sfLx},
-      </if>
-      <if test='null != sfZm'>
-        #{sfZm},
-      </if>
-      <if test='null != qt'>
-        #{qt},
-      </if>
-      <if test='null != fj'>
-        #{fj},
-      </if>
-      <if test='null != sl'>
-        #{sl},
-      </if>
-      <if test='null != dw'>
-        #{dw},
-      </if>
       <if test='null != sjbh'>
         #{sjbh},
       </if>
@@ -610,66 +274,19 @@
       <if test='null != xingbie'>xingbie = #{xingbie},</if>
       <if test='null != pillarCode'>pillar_code = #{pillarCode},</if>
       <if test='null != stationTrack'>station_track = #{stationTrack},</if>
-      <if test='null != gxms'>gxms = #{gxms},</if>
-      <if test='null != jbdydm'>jbdydm = #{jbdydm},</if>
       <if test='null != sd'>sd = #{sd},</if>
       <if test='null != marker'>marker = #{marker},</if>
       <if test='null != jcxgmdh'>jcxgmdh = #{jcxgmdh},</if>
-      <if test='null != jcxgazth'>jcxgazth = #{jcxgazth},</if>
-      <if test='null != fjxgazth'>fjxgazth = #{fjxgazth},</if>
       <if test='null != zzlx'>zzlx = #{zzlx},</if>
       <if test='null != zzxh'>zzxh = #{zzxh},</if>
       <if test='null != zzyt'>zzyt = #{zzyt},</if>
       <if test='null != cz'>cz = #{cz},</if>
       <if test='null != zxqwqn'>zxqwqn = #{zxqwqn},</if>
-      <if test='null != kj'>kj = #{kj},</if>
-      <if test='null != qxbj'>qxbj = #{qxbj},</if>
-      <if test='null != dg'>dg = #{dg},</if>
-      <if test='null != lcz'>lcz = #{lcz},</if>
-      <if test='null != gmbgScz'>gmbg_scz = #{gmbgScz},</if>
-      <if test='null != gmbgBzz'>gmbg_bzz = #{gmbgBzz},</if>
-      <if test='null != cmxjScz'>cmxj_scz = #{cmxjScz},</if>
-      <if test='null != cmxjBzz'>cmxj_bzz = #{cmxjBzz},</if>
-      <if test='null != wgcgScz'>wgcg_scz = #{wgcgScz},</if>
-      <if test='null != wgcgBzz'>wgcg_bzz = #{wgcgBzz},</if>
       <if test='null != zzzt'>zzzt = #{zzzt},</if>
       <if test='null != sccj'>sccj = #{sccj},</if>
       <if test='null != tyrq'>tyrq = #{tyrq},</if>
       <if test='null != ccrq'>ccrq = #{ccrq},</if>
-      <if test='null != sjsm'>sjsm = #{sjsm},</if>
-      <if test='null != zzjczt'>zzjczt = #{zzjczt},</if>
-      <if test='null != jclx'>jclx = #{jclx},</if>
-      <if test='null != dxzt'>dxzt = #{dxzt},</if>
       <if test='null != jxzq'>jxzq = #{jxzq},</if>
-      <if test='null != sfSfpwjjdm'>sf_sfpwjjdm = #{sfSfpwjjdm},</if>
-      <if test='null != sfBczz'>sf_bczz = #{sfBczz},</if>
-      <if test='null != sfFdjyq'>sf_fdjyq = #{sfFdjyq},</if>
-      <if test='null != sfFxjyq'>sf_fxjyq = #{sfFxjyq},</if>
-      <if test='null != sfJcxc'>sf_jcxc = #{sfJcxc},</if>
-      <if test='null != sfLxwjcxc'>sf_lxwjcxc = #{sfLxwjcxc},</if>
-      <if test='null != sfSxwjcxc'>sf_sxwjcxc = #{sfSxwjcxc},</if>
-      <if test='null != sfMdgjzfx'>sf_mdgjzfx = #{sfMdgjzfx},</if>
-      <if test='null != sfHkd'>sf_hkd = #{sfHkd},</if>
-      <if test='null != sfDlj'>sf_dlj = #{sfDlj},</if>
-      <if test='null != sfGlkg'>sf_glkg = #{sfGlkg},</if>
-      <if test='null != sfBlq'>sf_blq = #{sfBlq},</if>
-      <if test='null != sfDcgyzz'>sf_dcgyzz = #{sfDcgyzz},</if>
-      <if test='null != sfXcbzp'>sf_xcbzp = #{sfXcbzp},</if>
-      <if test='null != sfJdzz'>sf_jdzz = #{sfJdzz},</if>
-      <if test='null != sfXsx'>sf_xsx = #{sfXsx},</if>
-      <if test='null != sfHlx'>sf_hlx = #{sfHlx},</if>
-      <if test='null != sfGwx'>sf_gwx = #{sfGwx},</if>
-      <if test='null != sfGdx'>sf_gdx = #{sfGdx},</if>
-      <if test='null != sfPwx'>sf_pwx = #{sfPwx},</if>
-      <if test='null != sfSfx'>sf_sfx = #{sfSfx},</if>
-      <if test='null != sfJqx'>sf_jqx = #{sfJqx},</if>
-      <if test='null != sfBlx'>sf_blx = #{sfBlx},</if>
-      <if test='null != sfLx'>sf_lx = #{sfLx},</if>
-      <if test='null != sfZm'>sf_zm = #{sfZm},</if>
-      <if test='null != qt'>qt = #{qt},</if>
-      <if test='null != fj'>fj = #{fj},</if>
-      <if test='null != sl'>sl = #{sl},</if>
-      <if test='null != dw'>dw = #{dw},</if>
       <if test='null != sjbh'>sjbh = #{sjbh},</if>
       <if test='null != delFlag'>del_flag = #{delFlag},</if>
       <if test='null != updateBy'>update_by = #{updateBy},</if>
@@ -717,12 +334,6 @@
       <if test="stationTrack!=null and stationTrack!=''">
         and t.station_track=#{stationTrack}
       </if>
-      <if test="gxms!=null and gxms!=''">
-        and t.gxms=#{gxms}
-      </if>
-      <if test="jbdydm!=null and jbdydm!=''">
-        and t.jbdydm=#{jbdydm}
-      </if>
       <if test="sd!=null and sd!=''">
         and t.sd=#{sd}
       </if>
@@ -732,12 +343,6 @@
       <if test="jcxgmdh!=null and jcxgmdh!=''">
         and t.jcxgmdh=#{jcxgmdh}
       </if>
-      <if test="jcxgazth!=null and jcxgazth!=''">
-        and t.jcxgazth=#{jcxgazth}
-      </if>
-      <if test="fjxgazth!=null and fjxgazth!=''">
-        and t.fjxgazth=#{fjxgazth}
-      </if>
       <if test="zzlx!=null and zzlx!=''">
         and t.zzlx=#{zzlx}
       </if>
@@ -753,150 +358,18 @@
       <if test="zxqwqn!=null and zxqwqn!=''">
         and t.zxqwqn=#{zxqwqn}
       </if>
-      <if test="kj!=null and kj!=''">
-        and t.kj=#{kj}
-      </if>
-      <if test="qxbj!=null and qxbj!=''">
-        and t.qxbj=#{qxbj}
-      </if>
-      <if test="dg!=null and dg!=''">
-        and t.dg=#{dg}
-      </if>
-      <if test="lcz!=null and lcz!=''">
-        and t.lcz=#{lcz}
-      </if>
-      <if test="gmbgScz!=null and gmbgScz!=''">
-        and t.gmbg_scz=#{gmbgScz}
-      </if>
-      <if test="gmbgBzz!=null and gmbgBzz!=''">
-        and t.gmbg_bzz=#{gmbgBzz}
-      </if>
-      <if test="cmxjScz!=null and cmxjScz!=''">
-        and t.cmxj_scz=#{cmxjScz}
-      </if>
-      <if test="cmxjBzz!=null and cmxjBzz!=''">
-        and t.cmxj_bzz=#{cmxjBzz}
-      </if>
-      <if test="wgcgScz!=null and wgcgScz!=''">
-        and t.wgcg_scz=#{wgcgScz}
-      </if>
-      <if test="wgcgBzz!=null and wgcgBzz!=''">
-        and t.wgcg_bzz=#{wgcgBzz}
-      </if>
       <if test="zzzt!=null and zzzt!=''">
         and t.zzzt=#{zzzt}
       </if>
-      <if test="sccj!=null and sccj!=''">
-        and t.sccj=#{sccj}
-      </if>
       <if test="tyrq!=null and tyrq!=''">
         and t.tyrq=#{tyrq}
       </if>
       <if test="ccrq!=null and ccrq!=''">
         and t.ccrq=#{ccrq}
       </if>
-      <if test="sjsm!=null and sjsm!=''">
-        and t.sjsm=#{sjsm}
-      </if>
-      <if test="zzjczt!=null and zzjczt!=''">
-        and t.zzjczt=#{zzjczt}
-      </if>
-      <if test="jclx!=null and jclx!=''">
-        and t.jclx=#{jclx}
-      </if>
-      <if test="dxzt!=null and dxzt!=''">
-        and t.dxzt=#{dxzt}
-      </if>
       <if test="jxzq!=null and jxzq!=''">
         and t.jxzq=#{jxzq}
       </if>
-      <if test="sfSfpwjjdm!=null and sfSfpwjjdm!=''">
-        and t.sf_sfpwjjdm=#{sfSfpwjjdm}
-      </if>
-      <if test="sfBczz!=null and sfBczz!=''">
-        and t.sf_bczz=#{sfBczz}
-      </if>
-      <if test="sfFdjyq!=null and sfFdjyq!=''">
-        and t.sf_fdjyq=#{sfFdjyq}
-      </if>
-      <if test="sfFxjyq!=null and sfFxjyq!=''">
-        and t.sf_fxjyq=#{sfFxjyq}
-      </if>
-      <if test="sfJcxc!=null and sfJcxc!=''">
-        and t.sf_jcxc=#{sfJcxc}
-      </if>
-      <if test="sfLxwjcxc!=null and sfLxwjcxc!=''">
-        and t.sf_lxwjcxc=#{sfLxwjcxc}
-      </if>
-      <if test="sfSxwjcxc!=null and sfSxwjcxc!=''">
-        and t.sf_sxwjcxc=#{sfSxwjcxc}
-      </if>
-      <if test="sfMdgjzfx!=null and sfMdgjzfx!=''">
-        and t.sf_mdgjzfx=#{sfMdgjzfx}
-      </if>
-      <if test="sfHkd!=null and sfHkd!=''">
-        and t.sf_hkd=#{sfHkd}
-      </if>
-      <if test="sfDlj!=null and sfDlj!=''">
-        and t.sf_dlj=#{sfDlj}
-      </if>
-      <if test="sfGlkg!=null and sfGlkg!=''">
-        and t.sf_glkg=#{sfGlkg}
-      </if>
-      <if test="sfBlq!=null and sfBlq!=''">
-        and t.sf_blq=#{sfBlq}
-      </if>
-      <if test="sfDcgyzz!=null and sfDcgyzz!=''">
-        and t.sf_dcgyzz=#{sfDcgyzz}
-      </if>
-      <if test="sfXcbzp!=null and sfXcbzp!=''">
-        and t.sf_xcbzp=#{sfXcbzp}
-      </if>
-      <if test="sfJdzz!=null and sfJdzz!=''">
-        and t.sf_jdzz=#{sfJdzz}
-      </if>
-      <if test="sfXsx!=null and sfXsx!=''">
-        and t.sf_xsx=#{sfXsx}
-      </if>
-      <if test="sfHlx!=null and sfHlx!=''">
-        and t.sf_hlx=#{sfHlx}
-      </if>
-      <if test="sfGwx!=null and sfGwx!=''">
-        and t.sf_gwx=#{sfGwx}
-      </if>
-      <if test="sfGdx!=null and sfGdx!=''">
-        and t.sf_gdx=#{sfGdx}
-      </if>
-      <if test="sfPwx!=null and sfPwx!=''">
-        and t.sf_pwx=#{sfPwx}
-      </if>
-      <if test="sfSfx!=null and sfSfx!=''">
-        and t.sf_sfx=#{sfSfx}
-      </if>
-      <if test="sfJqx!=null and sfJqx!=''">
-        and t.sf_jqx=#{sfJqx}
-      </if>
-      <if test="sfBlx!=null and sfBlx!=''">
-        and t.sf_blx=#{sfBlx}
-      </if>
-      <if test="sfLx!=null and sfLx!=''">
-        and t.sf_lx=#{sfLx}
-      </if>
-      <if test="sfZm!=null and sfZm!=''">
-        and t.sf_zm=#{sfZm}
-      </if>
-      <if test="qt!=null and qt!=''">
-        and t.qt=#{qt}
-      </if>
-      <if test="fj!=null and fj!=''">
-        and t.fj=#{fj}
-      </if>
-      <if test="sl!=null and sl!=''">
-        and t.sl=#{sl}
-      </if>
-      <if test="dw!=null and dw!=''">
-        and t.dw=#{dw}
-      </if>
       <if test="sjbh!=null and sjbh!=''">
         and t.sjbh=#{sjbh}
       </if>

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

@@ -656,272 +656,265 @@
   <select id="getInfo" resultMap="BaseResultMap">
     SELECT
     distinct
-    s.station_name,
-    a.*, dict.dict_label as xingbie_text
+    <include refid="Base_Column_List"></include>
     FROM
-    bus_jcb_glkg a
-    LEFT JOIN base_station s ON a.station_id = s.station_id
-    LEFT JOIN sys_dict_data dict ON (a.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
+    bus_jcb_glkg t
+    LEFT JOIN  v_station v ON t.station_id = v.dept_station_id
     WHERE
-    a.del_flag = '0'
-    AND s.del_flag = '0'
-    AND a.id = #{id}
+    t.del_flag = '0'
+    AND t.id = #{id}
   </select>
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
-    s.station_name,
-    a.*, dict.dict_label as xingbie_text
+    <include refid="Base_Column_List"></include>
     FROM
-    bus_jcb_glkg a
-    LEFT JOIN base_station s ON a.station_id = s.station_id
-    LEFT JOIN sys_dict_data dict ON (a.xingbie = dict.dict_value AND dict.dict_type = 'xingbie')
+    bus_jcb_glkg t
+    LEFT JOIN  v_station v ON t.station_id = v.dept_station_id
     <where>
-      a.del_flag = '0'
-      AND s.del_flag = '0'
+      t.del_flag = '0'
       <if test="deptId!=null and deptId!=''">
-        and a.dept_id=#{deptId}
+        and t.dept_id=#{deptId}
       </if>
       <if test="deptName!=null and deptName!=''">
-        and a.dept_name=#{deptName}
+        and t.dept_name=#{deptName}
       </if>
       <if test="lineId!=null and lineId!=''">
-        and a.line_id=#{lineId}
+        and t.line_id=#{lineId}
       </if>
       <if test="lineName!=null and lineName!=''">
-        and a.line_name=#{lineName}
+        and t.line_name=#{lineName}
       </if>
       <if test="stationId!=null and stationId!=''">
-        and a.station_id=#{stationId}
+        and t.station_id=#{stationId}
       </if>
       <if test="stationName!=null and stationName!=''">
-        and a.station_name=#{stationName}
+        and t.station_name=#{stationName}
       </if>
       <if test="xingbie!=null and xingbie!=''">
-        and a.xingbie=#{xingbie}
+        and t.xingbie=#{xingbie}
       </if>
       <if test="pillarCode!=null and pillarCode!=''">
-        and a.pillar_code=#{pillarCode}
+        and t.pillar_code=#{pillarCode}
       </if>
       <if test="kgh!=null and kgh!=''">
-        and a.kgh=#{kgh}
+        and t.kgh=#{kgh}
       </if>
       <if test="temperature!=null and temperature!=''">
-        and a.temperature=#{temperature}
+        and t.temperature=#{temperature}
       </if>
       <if test="checkDate!=null and checkDate!=''">
-        and a.check_date=#{checkDate}
+        and t.check_date=#{checkDate}
       </if>
       <if test="jgxA!=null and jgxA!=''">
-        and a.jgx_a=#{jgxA}
+        and t.jgx_a=#{jgxA}
       </if>
       <if test="jgxADesc!=null and jgxADesc!=''">
-        and a.jgx_a_desc=#{jgxADesc}
+        and t.jgx_a_desc=#{jgxADesc}
       </if>
       <if test="jgxB!=null and jgxB!=''">
-        and a.jgx_b=#{jgxB}
+        and t.jgx_b=#{jgxB}
       </if>
       <if test="jgxBDesc!=null and jgxBDesc!=''">
-        and a.jgx_b_desc=#{jgxBDesc}
+        and t.jgx_b_desc=#{jgxBDesc}
       </if>
       <if test="jgxC!=null and jgxC!=''">
-        and a.jgx_c=#{jgxC}
+        and t.jgx_c=#{jgxC}
       </if>
       <if test="jgxCDesc!=null and jgxCDesc!=''">
-        and a.jgx_c_desc=#{jgxCDesc}
+        and t.jgx_c_desc=#{jgxCDesc}
       </if>
       <if test="qdzzA!=null and qdzzA!=''">
-        and a.qdzz_a=#{qdzzA}
+        and t.qdzz_a=#{qdzzA}
       </if>
       <if test="qdzzADesc!=null and qdzzADesc!=''">
-        and a.qdzz_a_desc=#{qdzzADesc}
+        and t.qdzz_a_desc=#{qdzzADesc}
       </if>
       <if test="cdgA!=null and cdgA!=''">
-        and a.cdg_a=#{cdgA}
+        and t.cdg_a=#{cdgA}
       </if>
       <if test="cdgADesc!=null and cdgADesc!=''">
-        and a.cdg_a_desc=#{cdgADesc}
+        and t.cdg_a_desc=#{cdgADesc}
       </if>
       <if test="cdgB!=null and cdgB!=''">
-        and a.cdg_b=#{cdgB}
+        and t.cdg_b=#{cdgB}
       </if>
       <if test="cdgBDesc!=null and cdgBDesc!=''">
-        and a.cdg_b_desc=#{cdgBDesc}
+        and t.cdg_b_desc=#{cdgBDesc}
       </if>
       <if test="cdgC!=null and cdgC!=''">
-        and a.cdg_c=#{cdgC}
+        and t.cdg_c=#{cdgC}
       </if>
       <if test="cdgCDesc!=null and cdgCDesc!=''">
-        and a.cdg_c_desc=#{cdgCDesc}
+        and t.cdg_c_desc=#{cdgCDesc}
       </if>
       <if test="gbA!=null and gbA!=''">
-        and a.gb_a=#{gbA}
+        and t.gb_a=#{gbA}
       </if>
       <if test="gbADesc!=null and gbADesc!=''">
-        and a.gb_a_desc=#{gbADesc}
+        and t.gb_a_desc=#{gbADesc}
       </if>
       <if test="ctztA!=null and ctztA!=''">
-        and a.ctzt_a=#{ctztA}
+        and t.ctzt_a=#{ctztA}
       </if>
       <if test="ctztADesc!=null and ctztADesc!=''">
-        and a.ctzt_a_desc=#{ctztADesc}
+        and t.ctzt_a_desc=#{ctztADesc}
       </if>
       <if test="ctmtztA!=null and ctmtztA!=''">
-        and a.ctmtzt_a=#{ctmtztA}
+        and t.ctmtzt_a=#{ctmtztA}
       </if>
       <if test="ctmtztADesc!=null and ctmtztADesc!=''">
-        and a.ctmtzt_a_desc=#{ctmtztADesc}
+        and t.ctmtzt_a_desc=#{ctmtztADesc}
       </if>
       <if test="hjkztA!=null and hjkztA!=''">
-        and a.hjkzt_a=#{hjkztA}
+        and t.hjkzt_a=#{hjkztA}
       </if>
       <if test="hjkztADesc!=null and hjkztADesc!=''">
-        and a.hjkzt_a_desc=#{hjkztADesc}
+        and t.hjkzt_a_desc=#{hjkztADesc}
       </if>
       <if test="zcjyzztA!=null and zcjyzztA!=''">
-        and a.zcjyzzt_a=#{zcjyzztA}
+        and t.zcjyzzt_a=#{zcjyzztA}
       </if>
       <if test="zcjyzztADesc!=null and zcjyzztADesc!=''">
-        and a.zcjyzzt_a_desc=#{zcjyzztADesc}
+        and t.zcjyzzt_a_desc=#{zcjyzztADesc}
       </if>
       <if test="yxztA!=null and yxztA!=''">
-        and a.yxzt_a=#{yxztA}
+        and t.yxzt_a=#{yxztA}
       </if>
       <if test="yxztADesc!=null and yxztADesc!=''">
-        and a.yxzt_a_desc=#{yxztADesc}
+        and t.yxzt_a_desc=#{yxztADesc}
       </if>
       <if test="yxztB!=null and yxztB!=''">
-        and a.yxzt_b=#{yxztB}
+        and t.yxzt_b=#{yxztB}
       </if>
       <if test="yxztBDesc!=null and yxztBDesc!=''">
-        and a.yxzt_b_desc=#{yxztBDesc}
+        and t.yxzt_b_desc=#{yxztBDesc}
       </if>
       <if test="yxztC!=null and yxztC!=''">
-        and a.yxzt_c=#{yxztC}
+        and t.yxzt_c=#{yxztC}
       </if>
       <if test="yxztCDesc!=null and yxztCDesc!=''">
-        and a.yxzt_c_desc=#{yxztCDesc}
+        and t.yxzt_c_desc=#{yxztCDesc}
       </if>
       <if test="swyx1Lcz!=null and swyx1Lcz!=''">
-        and a.swyx_1_lcz=#{swyx1Lcz}
+        and t.swyx_1_lcz=#{swyx1Lcz}
       </if>
       <if test="swyx1Dg!=null and swyx1Dg!=''">
-        and a.swyx_1_dg=#{swyx1Dg}
+        and t.swyx_1_dg=#{swyx1Dg}
       </if>
       <if test="swyx2Lcz!=null and swyx2Lcz!=''">
-        and a.swyx_2_lcz=#{swyx2Lcz}
+        and t.swyx_2_lcz=#{swyx2Lcz}
       </if>
       <if test="swyx2Dg!=null and swyx2Dg!=''">
-        and a.swyx_2_dg=#{swyx2Dg}
+        and t.swyx_2_dg=#{swyx2Dg}
       </if>
       <if test="zxjl!=null and zxjl!=''">
         and zxjl=#{zxjl}
       </if>
       <if test="xjztA!=null and xjztA!=''">
-        and a.xjzt_a=#{xjztA}
+        and t.xjzt_a=#{xjztA}
       </if>
       <if test="xjztADesc!=null and xjztADesc!=''">
-        and a.xjzt_a_desc=#{xjztADesc}
+        and t.xjzt_a_desc=#{xjztADesc}
       </if>
       <if test="xjztB!=null and xjztB!=''">
-        and a.xjzt_b=#{xjztB}
+        and t.xjzt_b=#{xjztB}
       </if>
       <if test="xjztBDesc!=null and xjztBDesc!=''">
-        and a.xjzt_b_desc=#{xjztBDesc}
+        and t.xjzt_b_desc=#{xjztBDesc}
       </if>
       <if test="sdfhsyA!=null and sdfhsyA!=''">
-        and a.sdfhsy_a=#{sdfhsyA}
+        and t.sdfhsy_a=#{sdfhsyA}
       </if>
       <if test="sdfhsyADesc!=null and sdfhsyADesc!=''">
-        and a.sdfhsy_a_desc=#{sdfhsyADesc}
+        and t.sdfhsy_a_desc=#{sdfhsyADesc}
       </if>
       <if test="ddfhsyA!=null and ddfhsyA!=''">
-        and a.ddfhsy_a=#{ddfhsyA}
+        and t.ddfhsy_a=#{ddfhsyA}
       </if>
       <if test="ddfhsyADesc!=null and ddfhsyADesc!=''">
-        and a.ddfhsy_a_desc=#{ddfhsyADesc}
+        and t.ddfhsy_a_desc=#{ddfhsyADesc}
       </if>
       <if test="ydfhsyA!=null and ydfhsyA!=''">
-        and a.ydfhsy_a=#{ydfhsyA}
+        and t.ydfhsy_a=#{ydfhsyA}
       </if>
       <if test="ydfhsyADesc!=null and ydfhsyADesc!=''">
-        and a.ydfhsy_a_desc=#{ydfhsyADesc}
+        and t.ydfhsy_a_desc=#{ydfhsyADesc}
       </if>
       <if test="kgztjdztA!=null and kgztjdztA!=''">
-        and a.kgztjdzt_a=#{kgztjdztA}
+        and t.kgztjdzt_a=#{kgztjdztA}
       </if>
       <if test="kgztjdztADesc!=null and kgztjdztADesc!=''">
-        and a.kgztjdzt_a_desc=#{kgztjdztADesc}
+        and t.kgztjdzt_a_desc=#{kgztjdztADesc}
       </if>
       <if test="kgztjdztDzz!=null and kgztjdztDzz!=''">
-        and a.kgztjdzt_dzz=#{kgztjdztDzz}
+        and t.kgztjdzt_dzz=#{kgztjdztDzz}
       </if>
       <if test="kgjgxjdztA!=null and kgjgxjdztA!=''">
-        and a.kgjgxjdzt_a=#{kgjgxjdztA}
+        and t.kgjgxjdzt_a=#{kgjgxjdztA}
       </if>
       <if test="kgjgxjdztADesc!=null and kgjgxjdztADesc!=''">
-        and a.kgjgxjdzt_a_desc=#{kgjgxjdztADesc}
+        and t.kgjgxjdzt_a_desc=#{kgjgxjdztADesc}
       </if>
       <if test="kgjgxjdztDzz!=null and kgjgxjdztDzz!=''">
-        and a.kgjgxjdzt_dzz=#{kgjgxjdztDzz}
+        and t.kgjgxjdzt_dzz=#{kgjgxjdztDzz}
       </if>
       <if test="sbzt!=null and sbzt!=''">
-        and a.sbzt=#{sbzt}
+        and t.sbzt=#{sbzt}
       </if>
       <if test="sbztDesc!=null and sbztDesc!=''">
-        and a.sbzt_desc=#{sbztDesc}
+        and t.sbzt_desc=#{sbztDesc}
       </if>
       <if test="checkUser!=null and checkUser!=''">
-        and a.check_user=#{checkUser}
+        and t.check_user=#{checkUser}
       </if>
       <if test="confirmUser!=null and confirmUser!=''">
-        and a.confirm_user=#{confirmUser}
+        and t.confirm_user=#{confirmUser}
       </if>
       <if test="czwt!=null and czwt!=''">
-        and a.czwt=#{czwt}
+        and t.czwt=#{czwt}
       </if>
       <if test="createBy!=null and createBy!=''">
-        and a.create_by=#{createBy}
+        and t.create_by=#{createBy}
       </if>
       <if test="createTime!=null and createTime!=''">
-        and a.create_time=#{createTime}
+        and t.create_time=#{createTime}
       </if>
       <if test="updateBy!=null and updateBy!=''">
-        and a.update_by=#{updateBy}
+        and t.update_by=#{updateBy}
       </if>
       <if test="updateTime!=null and updateTime!=''">
-        and a.update_time=#{updateTime}
+        and t.update_time=#{updateTime}
       </if>
       <if test="submitState!=null and submitState!=''">
-        and a.submit_state=#{submitState}
+        and t.submit_state=#{submitState}
       </if>
       <if test="delFlag!=null and delFlag!=''">
-        and a.del_flag=#{delFlag}
+        and t.del_flag=#{delFlag}
       </if>
     </where>
-    order by str_to_date(a.check_date,'%Y-%m-%d') desc
+    order by str_to_date(t.check_date,'%Y-%m-%d') desc
   </select>
 
   <select id="getLastOne" resultMap="BaseResultMap">
     SELECT
-      s.station_name,
-      a.*
+    <include refid="Base_Column_List"></include>
     FROM
-        bus_jcb_glkg a
-    LEFT JOIN base_station s ON a.station_id = s.station_id
+        bus_jcb_glkg t
+    LEFT JOIN v_station v ON t.station_id = v.dept_station_id
     WHERE
-        a.del_flag = '0' and a.submit_state in ('1','9')
+        t.del_flag = '0' and t.submit_state in ('1','9')
     <if test="stationId!=null and stationId!=''">
-      and a.station_id=#{stationId}
+      and t.station_id=#{stationId}
     </if>
     <if test="pillarCode!=null and pillarCode!=''">
-      and a.pillar_code=#{pillarCode}
+      and t.pillar_code=#{pillarCode}
     </if>
     <if test="kgh!=null and kgh!=''">
-      and a.kgh=#{kgh}
+      and t.kgh=#{kgh}
     </if>
     ORDER BY
-        a.update_time DESC
+        t.update_time DESC
     LIMIT 1
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebGjsfxMapper.xml

@@ -378,6 +378,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebJddzMapper.xml

@@ -296,6 +296,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebJyzqsjlMapper.xml

@@ -265,6 +265,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebLbjghjlMapper.xml

@@ -300,6 +300,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebQmjcjlMapper.xml

@@ -343,6 +343,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 0
railway-business/src/main/resources/mapper/catenary/BusJcebXsjcjlMapper.xml

@@ -326,6 +326,9 @@
       <if test="operator!=null and operator!=''">
         and t.operator=#{operator}
       </if>
+      <if test="createBy!=null and createBy!=''">
+        and t.create_by=#{createBy}
+      </if>
     </where>
   </select>
 

+ 3 - 2
railway-business/src/main/resources/mapper/catenary/BusJlgzMapper.xml

@@ -172,7 +172,7 @@
       AND dict1.status =  '0'
       AND dict2.status =  '0'
       <if test="lineId!=null and lineId!=''">
-        and t.line_id=#{lineId}
+        AND v.line_id = #{lineId}
       </if>
       <if test="substationId!=null and substationId!=''">
         and t.substation_id=#{substationId}
@@ -181,7 +181,8 @@
         and t.xingbie=#{xingbie}
       </if>
       <if test="marker!=null and marker!=''">
-        and t.marker=#{marker}
+        AND (t.marker + 0.0) BETWEEN (#{marker} + 0.0) - (#{pillarArea} + 0.0)
+        AND (#{marker} + 0.0) + (#{pillarArea} + 0.0)
       </if>
       <if test="yylx!=null and yylx!=''">
         and t.yylx=#{yylx}

+ 5 - 0
railway-common/src/main/java/com/railway/common/core/domain/entity/SysUser.java

@@ -187,6 +187,11 @@ public class SysUser extends BaseEntity {
   })
   private SysDept dept = new SysDept();
 
+  /**
+   * 角色名,以逗号分隔多个角色名
+   */
+  private String roleName;
+
   private List<SysRole> roles;
 
   /**

+ 41 - 0
railway-system/src/main/java/com/railway/system/enums/PostTypeEnum.java

@@ -0,0 +1,41 @@
+package com.railway.system.enums;
+
+/**
+ * 岗位
+ *
+ * @author zhaomn
+ */
+public enum PostTypeEnum {
+
+  /** 岗位 */
+  LEADER("leader", "领导"),
+  STAFF("staff", "职工"),
+  INSPECTOR("inspector", "送检员"),
+  TESTER("tester", "实验员"),
+  ;
+
+  private final String code;
+  private final String info;
+
+  PostTypeEnum(String code, String info) {
+    this.code = code;
+    this.info = info;
+  }
+
+  public String getCode() {
+    return code;
+  }
+
+  public String getInfo() {
+    return info;
+  }
+
+  public static PostTypeEnum ofValue(String code) {
+    for (PostTypeEnum investor : PostTypeEnum.values()) {
+      if (investor.getCode().equals(code)) {
+        return investor;
+      }
+    }
+    return STAFF;
+  }
+}

+ 1 - 1
railway-system/src/main/java/com/railway/system/mapper/SysDeptMapper.java

@@ -28,7 +28,7 @@ public interface SysDeptMapper {
    * @param deptCheckStrictly 部门树选择项是否关联显示
    * @return 选中部门列表
    */
-  List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId,
+  List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId,
       @Param("deptCheckStrictly") boolean deptCheckStrictly);
 
   /**

+ 1 - 1
railway-system/src/main/java/com/railway/system/service/ISysDeptService.java

@@ -48,7 +48,7 @@ public interface ISysDeptService {
    * @param roleId 角色ID
    * @return 选中部门列表
    */
-  List<Integer> selectDeptListByRoleId(Long roleId);
+  List<Long> selectDeptListByRoleId(Long roleId);
 
   /**
    * 根据部门ID查询信息

+ 2 - 6
railway-system/src/main/java/com/railway/system/service/impl/SysDeptServiceImpl.java

@@ -62,11 +62,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
   @Override
   @DataScope(deptAlias = "d")
   public List<SysDept> selectDeptList(SysDept dept) {
-    List<SysDept> deptList = deptMapper.selectDeptList(dept);
-    for(SysDept sysDept : deptList){
-      sysDept.setUserCount(userMapper.countUserByDeptId(sysDept.getDeptId()));
-    }
-    return deptList;
+    return deptMapper.selectDeptList(dept);
   }
 
   /**
@@ -116,7 +112,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
    * @return 选中部门列表
    */
   @Override
-  public List<Integer> selectDeptListByRoleId(Long roleId) {
+  public List<Long> selectDeptListByRoleId(Long roleId) {
     SysRole role = roleMapper.selectRoleById(roleId);
     return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
   }

+ 1 - 5
railway-system/src/main/java/com/railway/system/service/impl/SysRoleServiceImpl.java

@@ -55,11 +55,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
   @Override
   @DataScope(deptAlias = "d")
   public List<SysRole> selectRoleList(SysRole role) {
-    List<SysRole> roleList = roleMapper.selectRoleList(role);
-    for(SysRole sysRole : roleList){
-      sysRole.setUserCount(userRoleMapper.countUserRoleByRoleId(sysRole.getRoleId()));
-    }
-    return roleList;
+    return roleMapper.selectRoleList(role);
   }
 
   /**

+ 13 - 2
railway-system/src/main/java/com/railway/system/service/impl/SysUserServiceImpl.java

@@ -20,7 +20,9 @@ import com.railway.system.service.ISysConfigService;
 import com.railway.system.service.ISysUserService;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -61,7 +63,16 @@ public class SysUserServiceImpl implements ISysUserService {
   @Override
   @DataScope(deptAlias = "d", userAlias = "u")
   public List<SysUser> selectUserList(SysUser user) {
-    return userMapper.selectUserList(user);
+    List<SysUser> users = userMapper.selectUserList(user);
+    for (SysUser sysUser : users) {
+      if (CollectionUtils.isNotEmpty(sysUser.getRoles())) {
+        // 把多个角色名以逗号分隔拼接
+        String roleName = sysUser.getRoles().stream().map(SysRole::getRoleName)
+            .collect(Collectors.joining(","));
+        sysUser.setRoleName(roleName);
+      }
+    }
+    return users;
   }
 
   /**
@@ -232,7 +243,7 @@ public class SysUserServiceImpl implements ISysUserService {
   @Transactional(rollbackFor = Exception.class)
   public int insertUser(SysUser user) {
     String password = user.getPassword();
-    if(StringUtils.isEmpty(password)){
+    if (StringUtils.isEmpty(password)) {
       password = configService.selectConfigByKey("sys.user.initPassword");
     }
     user.setPassword(SecurityUtils.encryptPassword(password));

+ 8 - 6
railway-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -21,35 +21,37 @@
     <result property="updateBy" column="update_by"/>
     <result property="updateTime" column="update_time"/>
     <result property="remark" column="remark"/>
+    <result property="userCount" column="user_count"/>
   </resultMap>
 
   <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
+    d.email, d.status, d.del_flag, d.create_by, d.create_time, d.remark, t.user_count
     from sys_dept d
+    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>
 
   <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
     <include refid="selectDeptVo"/>
     where d.del_flag = '0'
     <if test="deptId != null and deptId != 0">
-      AND dept_id = #{deptId}
+      AND d.dept_id = #{deptId}
     </if>
     <if test="parentId != null and parentId != 0">
-      AND parent_id = #{parentId}
+      AND d.parent_id = #{parentId}
     </if>
     <if test="deptName != null and deptName != ''">
-      AND dept_name like concat('%', #{deptName}, '%')
+      AND d.dept_name like concat('%', #{deptName}, '%')
     </if>
     <if test="status != null and status != ''">
-      AND status = #{status}
+      AND d.status = #{status}
     </if>
     <!-- 数据范围过滤 -->
     ${params.dataScope}
     order by d.parent_id, d.order_num
   </select>
 
-  <select id="selectDeptListByRoleId" resultType="Integer">
+  <select id="selectDeptListByRoleId" resultType="Long">
     select d.dept_id
     from sys_dept d
     left join sys_role_dept rd on d.dept_id = rd.dept_id

+ 3 - 1
railway-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -19,16 +19,18 @@
     <result property="updateBy" column="update_by"/>
     <result property="updateTime" column="update_time"/>
     <result property="remark" column="remark"/>
+    <result property="userCount" column="user_count"/>
   </resultMap>
 
   <sql id="selectRoleVo">
     select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope,
     r.menu_check_strictly, r.dept_check_strictly,
-    r.status, r.del_flag, r.create_time, r.remark
+    r.status, r.del_flag, r.create_time, r.update_by, r.update_time, r.remark, t.user_count
     from sys_role r
     left join sys_user_role ur on ur.role_id = r.role_id
     left join sys_user u on u.user_id = ur.user_id
     left join sys_dept d on u.dept_id = d.dept_id
+    left join (select role_id, count(1) as user_count from sys_user_role group by role_id) t on t.role_id = r.role_id
   </sql>
 
   <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">

+ 3 - 7
railway-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -55,7 +55,8 @@
     u.wechat, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by,
     u.create_time, u.remark,u.birthday,u.post, dict.dict_label,
     d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
-    r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
+    r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
+    u.post, dict.dict_label as post_text
     from sys_user u
     left join sys_dept d on u.dept_id = d.dept_id
     left join sys_user_role ur on u.user_id = ur.user_id
@@ -64,12 +65,7 @@
   </sql>
 
   <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-    select u.user_id, u.dept_id, u.nick_name, u.user_name, u.real_name, u.email, u.avatar, u.phone, u.wechat,
-    u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time,
-    u.birthday, u.remark, d.dept_name, d.leader, u.post, dict.dict_label
-    from sys_user u
-    left join sys_dept d on u.dept_id = d.dept_id
-    LEFT JOIN sys_dict_data dict ON (u.post = dict.dict_value AND dict.dict_type = 'postType')
+    <include refid="selectUserVo"/>
     where u.del_flag = '0'
     <if test="userId != null and userId != 0">
       AND u.user_id = #{userId}