소스 검색

【CHG】统一部分常见字段和表名

ZhaoMn 4 년 전
부모
커밋
fea8626e07

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

@@ -64,7 +64,7 @@ public class BusZzdzxx extends BaseEntity{
 
     @ApiModelProperty(value = "公里标(m)")
     @Length(min = 1, max = 20, message = "【公里标(m)】长度必须介于 {min} 和 {max} 之间")
-    private String glb;
+    private String marker;
 
     @ApiModelProperty(value = "接触悬挂锚段号")
     @Length(min = 1, max = 100, message = "【接触悬挂锚段号】长度必须介于 {min} 和 {max} 之间")

+ 15 - 7
railway-business/src/main/java/com/railway/business/baseinfo/service/impl/BusZzdzxxServiceImpl.java

@@ -1,12 +1,11 @@
 package com.railway.business.baseinfo.service.impl;
 
-import com.railway.business.baseinfo.mapper.BusZzdzxxMapper;
 import com.railway.business.baseinfo.domain.BusZzdzxx;
+import com.railway.business.baseinfo.mapper.BusZzdzxxMapper;
 import com.railway.business.baseinfo.service.IBusZzdzxxService;
-import org.springframework.beans.factory.annotation.Autowired;
+import java.util.List;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import java.util.List;
 /**
 * 支柱吊柱信息
 * @author wuhonghao
@@ -15,12 +14,17 @@ import java.util.List;
 @Service
 @Transactional(readOnly = true)
 public class BusZzdzxxServiceImpl implements IBusZzdzxxService{
-@Autowired
-private BusZzdzxxMapper busZzdzxxMapper;
+
+	private final BusZzdzxxMapper busZzdzxxMapper;
+
+	public BusZzdzxxServiceImpl(BusZzdzxxMapper busZzdzxxMapper) {
+		this.busZzdzxxMapper = busZzdzxxMapper;
+	}
 
 	/**
 	* 新增
 	*/
+	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public int create(BusZzdzxx busZzdzxx) {
 		return busZzdzxxMapper.insert(busZzdzxx);
@@ -29,11 +33,12 @@ private BusZzdzxxMapper busZzdzxxMapper;
 	/**
 	* 删除
 	*/
+	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public int delete(String[] ids) {
 		int r =0;
-		for (int i=0; i< ids.length;i++){
-			int j= busZzdzxxMapper.delete(ids[i]);
+		for (String id : ids) {
+			int j = busZzdzxxMapper.delete(id);
 			r = r + j;
 		}
 		return r;
@@ -42,6 +47,7 @@ private BusZzdzxxMapper busZzdzxxMapper;
 	/**
 	* 更新
 	*/
+	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public int update(BusZzdzxx busZzdzxx) {
 		return busZzdzxxMapper.update(busZzdzxx);
@@ -50,6 +56,7 @@ private BusZzdzxxMapper busZzdzxxMapper;
 	/**
 	* 获取单个
 	*/
+	@Override
 	public BusZzdzxx getInfo(String id) {
 		return busZzdzxxMapper.getInfo(id);
 	}
@@ -57,6 +64,7 @@ private BusZzdzxxMapper busZzdzxxMapper;
 	/**
 	* 查询列表
 	*/
+	@Override
 	public List<BusZzdzxx> getList(BusZzdzxx busZzdzxx) {
 		return busZzdzxxMapper.getList(busZzdzxx);
 	}

+ 186 - 199
railway-business/src/main/resources/mapper/baseinfo/BusZzdzxxMapper.xml

@@ -7,15 +7,17 @@
     <result column="id" property="id"/>
     <result column="dept_id" property="deptId"/>
     <result column="dept_name" property="deptName"/>
-    <result column="xb" property="xb"/>
-    <result column="qj" property="qj"/>
-    <result column="hb" property="hb"/>
-    <result column="zzh" property="zzh"/>
-    <result column="gd" property="gd"/>
+    <result column="line_id" property="lineId"/>
+    <result column="line_name" property="lineName"/>
+    <result column="station_id" property="stationId"/>
+    <result column="station_name" property="stationName"/>
+    <result column="xingbie" property="xingbie"/>
+    <result column="pillar_code" property="pillarCode"/>
+    <result column="station_track" property="stationTrack"/>
     <result column="gxms" property="gxms"/>
     <result column="jbdydm" property="jbdydm"/>
     <result column="sd" property="sd"/>
-    <result column="glb" property="glb"/>
+    <result column="marker" property="marker"/>
     <result column="jcxgmdh" property="jcxgmdh"/>
     <result column="jcxgazth" property="jcxgazth"/>
     <result column="fjxgazth" property="fjxgazth"/>
@@ -78,106 +80,102 @@
     <result column="create_time" property="createTime"/>
     <result column="update_by" property="updateBy"/>
     <result column="update_time" property="updateTime"/>
-    <result column="station_id" property="stationId"/>
   </resultMap>
 
   <sql id="Base_Column_List">
     t.id,
+    v.dept_id,
     v.dept_name,
-    xb,
-    qj,
-    hb,
-    zzh,
-    gd,
-    gxms,
-    jbdydm,
-    sd,
-    glb,
-    jcxgmdh,
-    jcxgazth,
-    fjxgazth,
-    zzlx,
-    zzxh,
-    zzyt,
-    cz,
-    zxqwqn,
-    kj,
-    qxbj,
-    dg,
-    lcz,
-    gmbg_scz,
-    gmbg_bzz,
-    cmxj_scz,
-    cmxj_bzz,
-    wgcg_scz,
-    wgcg_bzz,
-    zzzt,
-    sccj,
-    tyrq,
-    ccrq,
-    sjsm,
-    zzjczt,
-    jclx,
-    dxzt,
-    jxzq,
-    sf_sfpwjjdm,
-    sf_bczz,
-    sf_fdjyq,
-    sf_fxjyq,
-    sf_jcxc,
-    sf_lxwjcxc,
-    sf_sxwjcxc,
-    sf_mdgjzfx,
-    sf_hkd,
-    sf_dlj,
-    sf_glkg,
-    sf_blq,
-    sf_dcgyzz,
-    sf_xcbzp,
-    sf_jdzz,
-    sf_xsx,
-    sf_hlx,
-    sf_gwx,
-    sf_gdx,
-    sf_pwx,
-    sf_sfx,
-    sf_jqx,
-    sf_blx,
-    sf_lx,
-    sf_zm,
-    qt,
-    fj,
-    sl,
-    dw,
-    sjbh,
-    del_flag,
-    create_by,
-    create_time,
-    update_by,
-    update_time,
-    station_id
+    v.line_id,
+    v.line_name,
+    v.station_name as station_name,
+    t.station_id,
+    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,
+    t.create_time,
+    t.update_by,
+    t.update_time,
+    t.station_id
   </sql>
 
   <insert id="insert" parameterType="com.railway.business.baseinfo.domain.BusZzdzxx">
     INSERT INTO base_pillar
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test='null != bm'>
-        bm,
-      </if>
-      <if test='null != xb'>
-        xb,
-      </if>
-      <if test='null != qj'>
-        qj,
+      <if test='null != stationId'>
+        station_id,
       </if>
-      <if test='null != hb'>
-        hb,
+      <if test='null != xingbie'>
+        xingbie,
       </if>
-      <if test='null != zzh'>
-        zzh,
+      <if test='null != pillarCode'>
+        pillar_code,
       </if>
-      <if test='null != gd'>
-        gd,
+      <if test='null != stationTrack'>
+        station_track,
       </if>
       <if test='null != gxms'>
         gxms,
@@ -188,8 +186,8 @@
       <if test='null != sd'>
         sd,
       </if>
-      <if test='null != glb'>
-        glb,
+      <if test='null != marker'>
+        marker,
       </if>
       <if test='null != jcxgmdh'>
         jcxgmdh,
@@ -382,23 +380,17 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test='null != bm'>
-        #{bm},
-      </if>
-      <if test='null != xb'>
-        #{xb},
-      </if>
-      <if test='null != qj'>
-        #{qj},
+      <if test='null != stationId'>
+        #{stationId},
       </if>
-      <if test='null != hb'>
-        #{hb},
+      <if test='null != xingbie'>
+        #{xingbie},
       </if>
-      <if test='null != zzh'>
-        #{zzh},
+      <if test='null != pillarCode'>
+        #{pillarCode},
       </if>
-      <if test='null != gd'>
-        #{gd},
+      <if test='null != stationTrack'>
+        #{stationTrack},
       </if>
       <if test='null != gxms'>
         #{gxms},
@@ -409,8 +401,8 @@
       <if test='null != sd'>
         #{sd},
       </if>
-      <if test='null != glb'>
-        #{glb},
+      <if test='null != marker'>
+        #{marker},
       </if>
       <if test='null != jcxgmdh'>
         #{jcxgmdh},
@@ -613,16 +605,14 @@
   <update id="update" parameterType="com.railway.business.baseinfo.domain.BusZzdzxx">
     UPDATE base_pillar
     <set>
-      <if test='null != bm'>bm = #{bm},</if>
-      <if test='null != xb'>xb = #{xb},</if>
-      <if test='null != qj'>qj = #{qj},</if>
-      <if test='null != hb'>hb = #{hb},</if>
-      <if test='null != zzh'>zzh = #{zzh},</if>
-      <if test='null != gd'>gd = #{gd},</if>
+      <if test='null != stationId'>station_id = #{stationId},</if>
+      <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 != glb'>glb = #{glb},</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>
@@ -694,17 +684,17 @@
   <select id="getInfo" resultMap="BaseResultMap">
     SELECT
     <include refid="Base_Column_List"/>
-    FROM base_pillar
-    WHERE del_flag='0' and id = #{id}
+    FROM base_pillar t
+    LEFT JOIN v_station v on t.station_id = v.station_id
+    WHERE t.del_flag='0' and t.id = #{id}
 
   </select>
 
   <select id="getList" resultMap="BaseResultMap">
     SELECT
-    a.*,b.dept_id,b.line_id
+    <include refid="Base_Column_List"/>
     FROM base_pillar t
-    left join v_station v
-    on t.station_id = v.station_id
+    left join v_station v on t.station_id = v.station_id
     <where>
       t.del_flag='0'
       <if test="stationId!=null and stationId!=''">
@@ -716,215 +706,212 @@
       <if test="lineId!=null and lineId!=''">
         and v.line_id=#{lineId}
       </if>
-      <if test="qj!=null and qj!=''">
-        and qj=#{qj}
-      </if>
-      <if test="hb!=null and hb!=''">
-        and hb=#{hb}
+      <if test="xingbie!=null and xingbie!=''">
+        and t.xingbie=#{xingbie}
       </if>
-      <if test="zzh!=null and zzh!=''">
-        and zzh=#{zzh}
+      <if test="pillarCode!=null and pillarCode!=''">
+        and t.pillar_code=#{pillarCode}
       </if>
-      <if test="gd!=null and gd!=''">
-        and gd=#{gd}
+      <if test="stationTrack!=null and stationTrack!=''">
+        and t.station_track=#{stationTrack}
       </if>
       <if test="gxms!=null and gxms!=''">
-        and gxms=#{gxms}
+        and t.gxms=#{gxms}
       </if>
       <if test="jbdydm!=null and jbdydm!=''">
-        and jbdydm=#{jbdydm}
+        and t.jbdydm=#{jbdydm}
       </if>
       <if test="sd!=null and sd!=''">
-        and sd=#{sd}
+        and t.sd=#{sd}
       </if>
-      <if test="glb!=null and glb!=''">
-        and glb=#{glb}
+      <if test="marker!=null and marker!=''">
+        and t.marker=#{marker}
       </if>
       <if test="jcxgmdh!=null and jcxgmdh!=''">
-        and jcxgmdh=#{jcxgmdh}
+        and t.jcxgmdh=#{jcxgmdh}
       </if>
       <if test="jcxgazth!=null and jcxgazth!=''">
-        and jcxgazth=#{jcxgazth}
+        and t.jcxgazth=#{jcxgazth}
       </if>
       <if test="fjxgazth!=null and fjxgazth!=''">
-        and fjxgazth=#{fjxgazth}
+        and t.fjxgazth=#{fjxgazth}
       </if>
       <if test="zzlx!=null and zzlx!=''">
-        and zzlx=#{zzlx}
+        and t.zzlx=#{zzlx}
       </if>
       <if test="zzxh!=null and zzxh!=''">
-        and zzxh=#{zzxh}
+        and t.zzxh=#{zzxh}
       </if>
       <if test="zzyt!=null and zzyt!=''">
-        and zzyt=#{zzyt}
+        and t.zzyt=#{zzyt}
       </if>
       <if test="cz!=null and cz!=''">
-        and cz=#{cz}
+        and t.cz=#{cz}
       </if>
       <if test="zxqwqn!=null and zxqwqn!=''">
-        and zxqwqn=#{zxqwqn}
+        and t.zxqwqn=#{zxqwqn}
       </if>
       <if test="kj!=null and kj!=''">
-        and kj=#{kj}
+        and t.kj=#{kj}
       </if>
       <if test="qxbj!=null and qxbj!=''">
-        and qxbj=#{qxbj}
+        and t.qxbj=#{qxbj}
       </if>
       <if test="dg!=null and dg!=''">
-        and dg=#{dg}
+        and t.dg=#{dg}
       </if>
       <if test="lcz!=null and lcz!=''">
-        and lcz=#{lcz}
+        and t.lcz=#{lcz}
       </if>
       <if test="gmbgScz!=null and gmbgScz!=''">
-        and gmbg_scz=#{gmbgScz}
+        and t.gmbg_scz=#{gmbgScz}
       </if>
       <if test="gmbgBzz!=null and gmbgBzz!=''">
-        and gmbg_bzz=#{gmbgBzz}
+        and t.gmbg_bzz=#{gmbgBzz}
       </if>
       <if test="cmxjScz!=null and cmxjScz!=''">
-        and cmxj_scz=#{cmxjScz}
+        and t.cmxj_scz=#{cmxjScz}
       </if>
       <if test="cmxjBzz!=null and cmxjBzz!=''">
-        and cmxj_bzz=#{cmxjBzz}
+        and t.cmxj_bzz=#{cmxjBzz}
       </if>
       <if test="wgcgScz!=null and wgcgScz!=''">
-        and wgcg_scz=#{wgcgScz}
+        and t.wgcg_scz=#{wgcgScz}
       </if>
       <if test="wgcgBzz!=null and wgcgBzz!=''">
-        and wgcg_bzz=#{wgcgBzz}
+        and t.wgcg_bzz=#{wgcgBzz}
       </if>
       <if test="zzzt!=null and zzzt!=''">
-        and zzzt=#{zzzt}
+        and t.zzzt=#{zzzt}
       </if>
       <if test="sccj!=null and sccj!=''">
-        and sccj=#{sccj}
+        and t.sccj=#{sccj}
       </if>
       <if test="tyrq!=null and tyrq!=''">
-        and tyrq=#{tyrq}
+        and t.tyrq=#{tyrq}
       </if>
       <if test="ccrq!=null and ccrq!=''">
-        and ccrq=#{ccrq}
+        and t.ccrq=#{ccrq}
       </if>
       <if test="sjsm!=null and sjsm!=''">
-        and sjsm=#{sjsm}
+        and t.sjsm=#{sjsm}
       </if>
       <if test="zzjczt!=null and zzjczt!=''">
-        and zzjczt=#{zzjczt}
+        and t.zzjczt=#{zzjczt}
       </if>
       <if test="jclx!=null and jclx!=''">
-        and jclx=#{jclx}
+        and t.jclx=#{jclx}
       </if>
       <if test="dxzt!=null and dxzt!=''">
-        and dxzt=#{dxzt}
+        and t.dxzt=#{dxzt}
       </if>
       <if test="jxzq!=null and jxzq!=''">
-        and jxzq=#{jxzq}
+        and t.jxzq=#{jxzq}
       </if>
       <if test="sfSfpwjjdm!=null and sfSfpwjjdm!=''">
-        and sf_sfpwjjdm=#{sfSfpwjjdm}
+        and t.sf_sfpwjjdm=#{sfSfpwjjdm}
       </if>
       <if test="sfBczz!=null and sfBczz!=''">
-        and sf_bczz=#{sfBczz}
+        and t.sf_bczz=#{sfBczz}
       </if>
       <if test="sfFdjyq!=null and sfFdjyq!=''">
-        and sf_fdjyq=#{sfFdjyq}
+        and t.sf_fdjyq=#{sfFdjyq}
       </if>
       <if test="sfFxjyq!=null and sfFxjyq!=''">
-        and sf_fxjyq=#{sfFxjyq}
+        and t.sf_fxjyq=#{sfFxjyq}
       </if>
       <if test="sfJcxc!=null and sfJcxc!=''">
-        and sf_jcxc=#{sfJcxc}
+        and t.sf_jcxc=#{sfJcxc}
       </if>
       <if test="sfLxwjcxc!=null and sfLxwjcxc!=''">
-        and sf_lxwjcxc=#{sfLxwjcxc}
+        and t.sf_lxwjcxc=#{sfLxwjcxc}
       </if>
       <if test="sfSxwjcxc!=null and sfSxwjcxc!=''">
-        and sf_sxwjcxc=#{sfSxwjcxc}
+        and t.sf_sxwjcxc=#{sfSxwjcxc}
       </if>
       <if test="sfMdgjzfx!=null and sfMdgjzfx!=''">
-        and sf_mdgjzfx=#{sfMdgjzfx}
+        and t.sf_mdgjzfx=#{sfMdgjzfx}
       </if>
       <if test="sfHkd!=null and sfHkd!=''">
-        and sf_hkd=#{sfHkd}
+        and t.sf_hkd=#{sfHkd}
       </if>
       <if test="sfDlj!=null and sfDlj!=''">
-        and sf_dlj=#{sfDlj}
+        and t.sf_dlj=#{sfDlj}
       </if>
       <if test="sfGlkg!=null and sfGlkg!=''">
-        and sf_glkg=#{sfGlkg}
+        and t.sf_glkg=#{sfGlkg}
       </if>
       <if test="sfBlq!=null and sfBlq!=''">
-        and sf_blq=#{sfBlq}
+        and t.sf_blq=#{sfBlq}
       </if>
       <if test="sfDcgyzz!=null and sfDcgyzz!=''">
-        and sf_dcgyzz=#{sfDcgyzz}
+        and t.sf_dcgyzz=#{sfDcgyzz}
       </if>
       <if test="sfXcbzp!=null and sfXcbzp!=''">
-        and sf_xcbzp=#{sfXcbzp}
+        and t.sf_xcbzp=#{sfXcbzp}
       </if>
       <if test="sfJdzz!=null and sfJdzz!=''">
-        and sf_jdzz=#{sfJdzz}
+        and t.sf_jdzz=#{sfJdzz}
       </if>
       <if test="sfXsx!=null and sfXsx!=''">
-        and sf_xsx=#{sfXsx}
+        and t.sf_xsx=#{sfXsx}
       </if>
       <if test="sfHlx!=null and sfHlx!=''">
-        and sf_hlx=#{sfHlx}
+        and t.sf_hlx=#{sfHlx}
       </if>
       <if test="sfGwx!=null and sfGwx!=''">
-        and sf_gwx=#{sfGwx}
+        and t.sf_gwx=#{sfGwx}
       </if>
       <if test="sfGdx!=null and sfGdx!=''">
-        and sf_gdx=#{sfGdx}
+        and t.sf_gdx=#{sfGdx}
       </if>
       <if test="sfPwx!=null and sfPwx!=''">
-        and sf_pwx=#{sfPwx}
+        and t.sf_pwx=#{sfPwx}
       </if>
       <if test="sfSfx!=null and sfSfx!=''">
-        and sf_sfx=#{sfSfx}
+        and t.sf_sfx=#{sfSfx}
       </if>
       <if test="sfJqx!=null and sfJqx!=''">
-        and sf_jqx=#{sfJqx}
+        and t.sf_jqx=#{sfJqx}
       </if>
       <if test="sfBlx!=null and sfBlx!=''">
-        and sf_blx=#{sfBlx}
+        and t.sf_blx=#{sfBlx}
       </if>
       <if test="sfLx!=null and sfLx!=''">
-        and sf_lx=#{sfLx}
+        and t.sf_lx=#{sfLx}
       </if>
       <if test="sfZm!=null and sfZm!=''">
-        and sf_zm=#{sfZm}
+        and t.sf_zm=#{sfZm}
       </if>
       <if test="qt!=null and qt!=''">
-        and qt=#{qt}
+        and t.qt=#{qt}
       </if>
       <if test="fj!=null and fj!=''">
-        and fj=#{fj}
+        and t.fj=#{fj}
       </if>
       <if test="sl!=null and sl!=''">
-        and sl=#{sl}
+        and t.sl=#{sl}
       </if>
       <if test="dw!=null and dw!=''">
-        and dw=#{dw}
+        and t.dw=#{dw}
       </if>
       <if test="sjbh!=null and sjbh!=''">
-        and sjbh=#{sjbh}
+        and t.sjbh=#{sjbh}
       </if>
       <if test="delFlag!=null and delFlag!=''">
-        and del_flag=#{delFlag}
+        and t.del_flag=#{delFlag}
       </if>
       <if test="createBy!=null and createBy!=''">
-        and create_by=#{createBy}
+        and t.create_by=#{createBy}
       </if>
       <if test="createTime!=null and createTime!=''">
-        and create_time=#{createTime}
+        and t.create_time=#{createTime}
       </if>
       <if test="updateBy!=null and updateBy!=''">
-        and update_by=#{updateBy}
+        and t.update_by=#{updateBy}
       </if>
       <if test="updateTime!=null and updateTime!=''">
-        and update_time=#{updateTime}
+        and t.update_time=#{updateTime}
       </if>
     </where>
   </select>