|
@@ -75,7 +75,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="sbkh" column="sbkh" />
|
|
|
<result property="khmc" column="khmc" />
|
|
|
<result property="lzzt" column="lzzt" />
|
|
|
- <result property="lrBhyy" column="lr_bhyy" />
|
|
|
<result property="createTimeStr" column="create_time_str" />
|
|
|
<result property="createUserId" column="create_user_id" />
|
|
|
<result property="createBy" column="create_by" />
|
|
@@ -92,8 +91,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateUnit" column="update_unit" />
|
|
|
<result property="updateUnitName" column="update_unit_name" />
|
|
|
<result property="age" column="age" />
|
|
|
+ <result property="wfqrLx" column="wfqr_lx" />
|
|
|
+ <result property="wfqrYy" column="wfqr_yy" />
|
|
|
</resultMap>
|
|
|
|
|
|
+
|
|
|
+ <resultMap type="ZwywLrJbxx" id="ZwywQrLrJbxxResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="lrZjhm" column="lr_zjhm" />
|
|
|
+ <result property="lrXm" column="lr_xm" />
|
|
|
+ <result property="lrCydh" column="lr_cydh" />
|
|
|
+ <result property="lrHjdz" column="lr_hjdz" />
|
|
|
+ <result property="lrHjdzName" column="lr_hjdz_name" />
|
|
|
+ <result property="lrHjbcxx" column="lr_hjbcxx" />
|
|
|
+ <result property="lrXjdz" column="lr_xjdz" />
|
|
|
+ <result property="lrXjdzName" column="lr_xjdz_name" />
|
|
|
+ <result property="lrXjdzBcxx" column="lr_xjdz_bcxx" />
|
|
|
+ <result property="lrSbdz" column="lr_sbdz" />
|
|
|
+ <result property="wfqrLx" column="wfqr_lx" />
|
|
|
+ <result property="wfqrYy" column="wfqr_yy" />
|
|
|
+ <result property="lzzt" column="lzzt" />
|
|
|
+ <result property="createTimeStr" column="create_time_str" />
|
|
|
+ <result property="createUserId" column="create_user_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createUserType" column="create_user_type" />
|
|
|
+ <result property="createAreaCode" column="create_area_code" />
|
|
|
+ <result property="createUnit" column="create_unit" />
|
|
|
+ <result property="createTounit" column="create_tounit" />
|
|
|
+ <result property="createBmjsc" column="create_bmjsc" />
|
|
|
+ <result property="createQhjsc" column="create_qhjsc" />
|
|
|
+ <result property="createUnitName" column="create_unit_name" />
|
|
|
+ <result property="updateTimeStr" column="update_time_str" />
|
|
|
+ <result property="updateUserId" column="update_user_id" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateUnit" column="update_unit" />
|
|
|
+ <result property="updateUnitName" column="update_unit_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<sql id="selectZwywLrJbxxVo">
|
|
|
select
|
|
|
getxzqhcodebycode(lr_hjdz) as lr_hjdz,
|
|
@@ -101,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
getxzqhmcbycode(lr_hjdz) as lr_hjdz_name,
|
|
|
getxzqhmcbycode(lr_xjdz) as lr_xjdz_name,
|
|
|
getxzqhmcbycode(lr_sbdz) as lr_sbdz_name,
|
|
|
- lzzt, ( CASE lzzt WHEN 1 THEN lr_bhyy ELSE '无' END ) as lr_bhyy,
|
|
|
+ lzzt,
|
|
|
id, lr_zjhm, lr_xm, lr_xb, lr_csrq, lr_xl, lr_zzmm, lr_mz, lr_gj, lr_jg, lr_hjbcxx, lr_hjlb, is_yz,
|
|
|
lr_xjdz_bcxx, lr_cydh, lr_hyzk, lr_poxm, lr_po_zjmh, lr_tx, lr_sbdz, jhr_xm, jhr_sjhm, jhr_gx,
|
|
|
is_sz, is_ls, is_db, is_dj, is_gl, is_tk, is_dsr, is_chx, is_yyjh, is_sn, lr_cjdj,
|
|
@@ -119,17 +155,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
from zwyw_lr_jbxx a
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectZwywLrJbxxXxqrById" parameterType="ZwywLrJbxx" resultMap="ZwywLrJbxxResult">
|
|
|
+ <select id="selectZwywLrJbxxXxqrById" parameterType="ZwywLrJbxx" resultMap="ZwywQrLrJbxxResult">
|
|
|
select
|
|
|
getxzqhcodebycode(lr_hjdz) as lr_hjdz,
|
|
|
getxzqhcodebycode(lr_xjdz) as lr_xjdz,
|
|
|
getxzqhmcbycode(lr_hjdz) as lr_hjdz_name,
|
|
|
getxzqhmcbycode(lr_xjdz) as lr_xjdz_name,
|
|
|
getxzqhmcbycode(lr_sbdz) as lr_sbdz_name,
|
|
|
- ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '02' WHEN lzzt = '2' THEN '01' END ) as lzzt,
|
|
|
- ( CASE lzzt WHEN 1 THEN lr_bhyy ELSE '无' END ) as lr_bhyy, lr_xjdz_bcxx,
|
|
|
- id, lr_zjhm, lr_xm, lr_xb, lr_csrq, lr_jg, lr_hjbcxx, lr_cydh,
|
|
|
- lr_xjdz_bcxx,
|
|
|
+ lzzt,
|
|
|
+ ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '99' WHEN lzzt = '2' THEN '01' END ) as lzztCx,
|
|
|
+ (SELECT wfqr_lx FROM zwyw_lr_bhxx where lr_id = zwyw_lr_jbxx.id ORDER BY create_time_str DESC LIMIT 1 ) as wfqr_lx,
|
|
|
+ (SELECT wfqr_yy FROM zwyw_lr_bhxx where lr_id = zwyw_lr_jbxx.id ORDER BY create_time_str DESC LIMIT 1 ) as wfqr_yy,
|
|
|
+ id, lr_zjhm, lr_xm, lr_cydh,
|
|
|
+ lr_hjbcxx, lr_xjdz_bcxx,
|
|
|
create_time_str, create_user_id, create_by, create_user_type,create_area_code, create_unit,create_tounit,create_bmjsc,create_qhjsc,
|
|
|
create_unit_name,
|
|
|
update_time_str, update_user_id, update_by, update_unit, update_unit_name
|
|
@@ -139,8 +177,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectZwywLrJbxxXxqrList" parameterType="ZwywLrJbxx" resultMap="ZwywLrJbxxResult">
|
|
|
select
|
|
|
- id, lr_xm, lr_zjhm,
|
|
|
- ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '02' WHEN lzzt = '2' THEN '01' END ) as lzzt,
|
|
|
+ id, lr_xm, lr_zjhm, lzzt,
|
|
|
+ ( CASE WHEN lzzt IS NULL OR lzzt = '0' THEN '00' WHEN lzzt = '1' THEN '99' WHEN lzzt = '2' THEN '01' END ) as lzztCx,
|
|
|
getxzqhmcbycode(lr_xjdz) as lr_sbdz_name, lr_sbdz,
|
|
|
create_unit,create_tounit,create_bmjsc,create_qhjsc
|
|
|
from zwyw_lr_jbxx
|
|
@@ -151,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="lzztCx != null and lzztCx == '00'"> and ( lzzt is null or lzzt = '0' ) </if>
|
|
|
<if test="lzztCx != null and lzztCx == '01'"> and lzzt = '2' </if>
|
|
|
<if test="lzztCx != null and lzztCx == '02'"> and lzzt = '1' </if>
|
|
|
+ <if test="lzztCx != null and lzztCx == '05'"> and lzzt in ('1','2') </if>
|
|
|
<if test="lzztCx != null and lzztCx == '99'"> and lzzt is null </if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -730,7 +769,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update zwyw_lr_jbxx
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="lzzt != null">lzzt = #{lzzt},</if>
|
|
|
- <if test="lrBhyy != null">lr_bhyy = #{lrBhyy},</if>
|
|
|
update_time_str = #{updateTimeStr},
|
|
|
update_user_id = #{updateUserId},
|
|
|
update_by = #{updateBy},
|