|
@@ -4,14 +4,15 @@
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.equipment.EquipmentInfo" >
|
|
<resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.equipment.EquipmentInfo" >
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
- <result column="et_code" property="et_code" jdbcType="INTEGER" />
|
|
|
|
|
|
+ <result column="et_code" property="et_code" jdbcType="VARCHAR" />
|
|
<result column="ei_code" property="ei_code" jdbcType="VARCHAR" />
|
|
<result column="ei_code" property="ei_code" jdbcType="VARCHAR" />
|
|
<result column="ei_rent" property="ei_rent" jdbcType="INTEGER" />
|
|
<result column="ei_rent" property="ei_rent" jdbcType="INTEGER" />
|
|
<result column="ei_status" property="ei_status" jdbcType="INTEGER" />
|
|
<result column="ei_status" property="ei_status" jdbcType="INTEGER" />
|
|
|
|
+ <result column="ei_date" property="ei_date" jdbcType="DATE" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
<sql id="Base_Column_List" >
|
|
- id,et_code, ei_code,ei_rent,ei_status
|
|
|
|
|
|
+ id,et_code, ei_code,ei_rent,ei_status,ei_date
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!--获取所有数据-->
|
|
<!--获取所有数据-->
|
|
@@ -23,25 +24,31 @@
|
|
|
|
|
|
<select id="getAll" resultMap="BaseResultMap" >
|
|
<select id="getAll" resultMap="BaseResultMap" >
|
|
select
|
|
select
|
|
- id,et_code, ei_code,ei_rent,ei_status
|
|
|
|
|
|
+ id,fgetequipmenttypename(et_code) et_code, ei_code,ei_rent,ei_status,ei_date
|
|
from equipment_info
|
|
from equipment_info
|
|
order by id desc
|
|
order by id desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="queryEquipmentInfo" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.equipment.EquipmentInfo">
|
|
<select id="queryEquipmentInfo" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.equipment.EquipmentInfo">
|
|
select
|
|
select
|
|
- id,et_code, ei_code,ei_rent,ei_status
|
|
|
|
|
|
+ id,fgetequipmenttypename(et_code) et_code, ei_code,ei_rent,ei_status,ei_date
|
|
from equipment_info
|
|
from equipment_info
|
|
where 1=1
|
|
where 1=1
|
|
- <if test="et_code != null and ot_code != ''">
|
|
|
|
- and et_code like "%"#{et_code,jdbcType=VARCHAR}"%"
|
|
|
|
|
|
+ <if test="ei_code != null and et_code != ''">
|
|
|
|
+ and ei_code = #{ei_code,jdbcType=INTEGER}
|
|
</if>
|
|
</if>
|
|
- <if test="ei_rent != null and cm_phone != ''">
|
|
|
|
|
|
+ <if test="et_code != null and et_code != ''">
|
|
|
|
+ and et_code = #{et_code,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="ei_rent != null and ei_rent != ''">
|
|
and ei_rent = #{ei_rent,jdbcType=INTEGER}
|
|
and ei_rent = #{ei_rent,jdbcType=INTEGER}
|
|
</if>
|
|
</if>
|
|
- <if test="ei_status != null and ot_startdate != ''">
|
|
|
|
|
|
+ <if test="ei_status != null and ei_status != ''">
|
|
and ei_status = #{ei_status,jdbcType=INTEGER}
|
|
and ei_status = #{ei_status,jdbcType=INTEGER}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="ei_date != null and ei_date != ''">
|
|
|
|
+ and ei_date = #{ei_date,jdbcType=DATE}
|
|
|
|
+ </if>
|
|
order by id desc
|
|
order by id desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -52,6 +59,20 @@
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getEquipmentInfoEicode" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
+ from equipment_info
|
|
|
|
+ where ei_code = #{ei_code,jdbcType=INTEGER}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="checkEquipmentInfo" resultType="java.lang.Integer" parameterType="java.lang.String" >
|
|
|
|
+ select
|
|
|
|
+ count(1)
|
|
|
|
+ from equipment_info
|
|
|
|
+ where ei_code = #{ei_code,jdbcType=INTEGER}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
delete from equipment_info
|
|
delete from equipment_info
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
@@ -71,7 +92,10 @@
|
|
ei_rent,
|
|
ei_rent,
|
|
</if>
|
|
</if>
|
|
<if test="ei_status != null" >
|
|
<if test="ei_status != null" >
|
|
- ei_status
|
|
|
|
|
|
+ ei_status,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="ei_date != null" >
|
|
|
|
+ ei_date
|
|
</if>
|
|
</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
@@ -85,7 +109,10 @@
|
|
#{ei_rent,jdbcType=INTEGER},
|
|
#{ei_rent,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
<if test="ei_status != null" >
|
|
<if test="ei_status != null" >
|
|
- #{ei_status,jdbcType=INTEGER}
|
|
|
|
|
|
+ #{ei_status,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="ei_date != null" >
|
|
|
|
+ #{ei_date,jdbcType=DATE}
|
|
</if>
|
|
</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
@@ -104,10 +131,12 @@
|
|
ei_rent = #{ei_rent,jdbcType=INTEGER},
|
|
ei_rent = #{ei_rent,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
<if test="ei_status != null" >
|
|
<if test="ei_status != null" >
|
|
- ei_status = #{ei_status,jdbcType=INTEGER}
|
|
|
|
|
|
+ ei_status = #{ei_status,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="ei_date != null" >
|
|
|
|
+ ei_date = #{ei_date,jdbcType=DATE}
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|