|
@@ -51,22 +51,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="khId != null and khId != ''"> and kh_id = #{khId}</if>
|
|
|
<if test="htksrq != null and htksrq != ''"> and htksrq = #{htksrq}</if>
|
|
|
<if test="htjsrq != null and htjsrq != ''"> and htjsrq = #{htjsrq}</if>
|
|
|
- <if test="rzfj != null and rzfj != ''"> and rzfj = #{rzfj}</if>
|
|
|
- <if test="rzcw != null and rzcw != ''"> and rzcw = #{rzcw}</if>
|
|
|
+ <if test="rzfj != null and rzfj != ''"> and fjh = #{rzfj}</if>
|
|
|
+ <if test="rzcw != null and rzcw != ''"> and cwh = #{rzcw}</if>
|
|
|
<if test="params.beginYjrzrq != null and params.beginYjrzrq != '' and params.endYjrzrq != null and params.endYjrzrq != ''"> and yjrzrq between #{params.beginYjrzrq} and #{params.endYjrzrq}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<select id="selectYljgKhRztzxxListByHtxx" parameterType="YljgKhRztzxx" resultMap="YljgKhRztzxxResult">
|
|
|
- select * from v_yljg_kh_htxx_rztzxx
|
|
|
+ SELECT
|
|
|
+ `id` AS `ht_id`,
|
|
|
+ `jg_id` AS `jg_id`,
|
|
|
+ `kh_id` AS `kh_id`,
|
|
|
+ `xm` AS `xm`,
|
|
|
+ `zjhm` AS `zjhm`,
|
|
|
+ `htksrq` AS `htksrq`,
|
|
|
+ `htjsrq` AS `htjsrq`,
|
|
|
+ `create_time_str` AS `create_time_str`,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ `mz-cloud`.`yljg_fwcd_fj`.`fjmc`
|
|
|
+ FROM
|
|
|
+ `mz-cloud`.`yljg_fwcd_fj`
|
|
|
+ WHERE
|
|
|
+ (
|
|
|
+ `mz-cloud`.`yljg_fwcd_fj`.`id` = `fj_id`
|
|
|
+ )
|
|
|
+ ) AS `rzfj`,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ `mz-cloud`.`yljg_fwcd_cw`.`cwh`
|
|
|
+ FROM
|
|
|
+ `mz-cloud`.`yljg_fwcd_cw`
|
|
|
+ WHERE
|
|
|
+ (
|
|
|
+ `mz-cloud`.`yljg_fwcd_cw`.`id` = `cw_id`
|
|
|
+ )
|
|
|
+ ) AS `rzcw`,
|
|
|
+ `yjrzrq` AS `yjrzrq`,
|
|
|
+ `htqdrq` AS `htqdrq`,
|
|
|
+ `rzzt` AS `rzzt`,
|
|
|
+ `create_by` AS `blr`
|
|
|
+ FROM
|
|
|
+ `mz-cloud`.`yljg_kh_htxx`
|
|
|
<where>
|
|
|
+ `state` = '0'
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="jgId != null and jgId != ''"> and jg_id = #{jgId}</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm like concat('%', #{zjhm}, '%')</if>
|
|
|
<if test="htksrq != null and htksrq != ''"> and htksrq = #{htksrq}</if>
|
|
|
<if test="htjsrq != null and htjsrq != ''"> and htjsrq = #{htjsrq}</if>
|
|
|
- <if test="rzfj != null and rzfj != ''"> and rzfj = #{rzfj}</if>
|
|
|
- <if test="rzcw != null and rzcw != ''"> and rzcw = #{rzcw}</if>
|
|
|
+ <if test="rzfj != null and rzfj != ''"> and fjh = #{rzfj}</if>
|
|
|
+ <if test="rzcw != null and rzcw != ''"> and cwh = #{rzcw}</if>
|
|
|
<if test="rzzt == '0'"> and id IS NULL</if>
|
|
|
<if test="rzzt == '1'"> and id IS NOT NULL</if>
|
|
|
<if test="params.beginYjrzrq != null and params.beginYjrzrq != '' and params.endYjrzrq != null and params.endYjrzrq != ''"> and yjrzrq between #{params.beginYjrzrq} and #{params.endYjrzrq}</if>
|
|
@@ -76,39 +111,106 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectYljgKhRztzxxListByHtxxTz" parameterType="YljgKhRztzxx" resultMap="YljgKhRztzxxResult">
|
|
|
- select * from v_yljg_kh_htxx_tzxx
|
|
|
+ SELECT
|
|
|
+ `sjrzsj` AS `sjrzsj`,
|
|
|
+ `id` AS `ht_id`,
|
|
|
+ `jg_id` AS `jg_id`,
|
|
|
+ `kh_id` AS `kh_id`,
|
|
|
+ `xm` AS `xm`,
|
|
|
+ `zjhm` AS `zjhm`,
|
|
|
+ `htksrq` AS `htksrq`,
|
|
|
+ `htjsrq` AS `htjsrq`,
|
|
|
+ `create_time_str` AS `create_time_str`,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ `mz-cloud`.`yljg_fwcd_fj`.`fjmc`
|
|
|
+ FROM
|
|
|
+ `mz-cloud`.`yljg_fwcd_fj`
|
|
|
+ WHERE
|
|
|
+ (
|
|
|
+ `mz-cloud`.`yljg_fwcd_fj`.`id` = `fj_id`
|
|
|
+ )
|
|
|
+ ) AS `rzfj`,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ `mz-cloud`.`yljg_fwcd_cw`.`cwh`
|
|
|
+ FROM
|
|
|
+ `mz-cloud`.`yljg_fwcd_cw`
|
|
|
+ WHERE
|
|
|
+ (
|
|
|
+ `mz-cloud`.`yljg_fwcd_cw`.`id` = `cw_id`
|
|
|
+ )
|
|
|
+ ) AS `rzcw`,
|
|
|
+ `yjrzrq` AS `yjrzrq`,
|
|
|
+ `htqdrq` AS `htqdrq`,
|
|
|
+ `rzzt` AS `rzzt`,
|
|
|
+ `create_by` AS `blr`
|
|
|
+ FROM
|
|
|
+ `mz-cloud`.`yljg_kh_htxx`
|
|
|
<where>
|
|
|
+ sjrzsj is not null and sjrzsj != ''
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="jgId != null and jgId != ''"> and jg_id = #{jgId}</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm like concat('%', #{zjhm}, '%')</if>
|
|
|
<if test="htksrq != null and htksrq != ''"> and htksrq = #{htksrq}</if>
|
|
|
<if test="htjsrq != null and htjsrq != ''"> and htjsrq = #{htjsrq}</if>
|
|
|
- <if test="rzfj != null and rzfj != ''"> and rzfj = #{rzfj}</if>
|
|
|
- <if test="rzcw != null and rzcw != ''"> and rzcw = #{rzcw}</if>
|
|
|
+ <if test="rzfj != null and rzfj != ''"> and fjh = #{rzfj}</if>
|
|
|
+ <if test="rzcw != null and rzcw != ''"> and cwh = #{rzcw}</if>
|
|
|
<if test="rzzt != null and rzzt != ''"> and rzzt = #{rzzt}</if>
|
|
|
<if test="params.beginYjrzrq != null and params.beginYjrzrq != '' and params.endYjrzrq != null and params.endYjrzrq != ''"> and yjrzrq between #{params.beginYjrzrq} and #{params.endYjrzrq}</if>
|
|
|
<if test="params.beginSjrzrq != null and params.beginSjrzrq != '' and params.endSjrzrq != null and params.endSjrzrq != ''"> and sjrzsj between #{params.beginSjrzrq} and #{params.endSjrzrq}</if>
|
|
|
<if test="params.beginTzsqrq != null and params.beginTzsqrq != '' and params.endTzsqrq != null and params.endTzsqrq != ''"> and tzsqrq between #{params.beginTzsqrq} and #{params.endTzsqrq}</if>
|
|
|
</where>
|
|
|
- ORDER BY create_time_str DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="selectYljgKhRztzxxListByHtxxSh" parameterType="YljgKhRztzxx" resultMap="YljgKhRztzxxResult">
|
|
|
- select * from v_yljg_kh_htxx_tzsh
|
|
|
+ select `sjrzsj` AS `sjrzsj`,
|
|
|
+ `id` AS `ht_id`,
|
|
|
+ `jg_id` AS `jg_id`,
|
|
|
+ `kh_id` AS `kh_id`,
|
|
|
+ `xm` AS `xm`,
|
|
|
+ `zjhm` AS `zjhm`,
|
|
|
+ `htksrq` AS `htksrq`,
|
|
|
+ `htjsrq` AS `htjsrq`,
|
|
|
+ `create_time_str` AS `create_time_str`,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ `yljg_fwcd_fj`.`fjmc`
|
|
|
+ FROM
|
|
|
+ `yljg_fwcd_fj`
|
|
|
+ WHERE
|
|
|
+ (
|
|
|
+ `yljg_fwcd_fj`.`id` = `fj_id`
|
|
|
+ )
|
|
|
+ ) AS `rzfj`,
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ `yljg_fwcd_cw`.`cwh`
|
|
|
+ FROM
|
|
|
+ `yljg_fwcd_cw`
|
|
|
+ WHERE
|
|
|
+ (
|
|
|
+ `yljg_fwcd_cw`.`id` = `cw_id`
|
|
|
+ )
|
|
|
+ ) AS `rzcw`,
|
|
|
+ `yjrzrq` AS `yjrzrq`,
|
|
|
+ `htqdrq` AS `htqdrq`,
|
|
|
+ `create_by` AS `blr`
|
|
|
+ from yljg_kh_htxx
|
|
|
<where>
|
|
|
+ rzzt IN ('2', '3', '4')
|
|
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
|
|
<if test="jgId != null and jgId != ''"> and jg_id = #{jgId}</if>
|
|
|
<if test="zjhm != null and zjhm != ''"> and zjhm like concat('%', #{zjhm}, '%')</if>
|
|
|
<if test="htksrq != null and htksrq != ''"> and htksrq = #{htksrq}</if>
|
|
|
<if test="htjsrq != null and htjsrq != ''"> and htjsrq = #{htjsrq}</if>
|
|
|
- <if test="rzfj != null and rzfj != ''"> and rzfj = #{rzfj}</if>
|
|
|
- <if test="rzcw != null and rzcw != ''"> and rzcw = #{rzcw}</if>
|
|
|
+ <if test="rzfj != null and rzfj != ''"> and fjh = #{rzfj}</if>
|
|
|
+ <if test="rzcw != null and rzcw != ''"> and cwh = #{rzcw}</if>
|
|
|
<if test="rzzt != null and rzzt != ''"> and rzzt = #{rzzt}</if>
|
|
|
<if test="params.beginYjrzrq != null and params.beginYjrzrq != '' and params.endYjrzrq != null and params.endYjrzrq != ''"> and yjrzrq between #{params.beginYjrzrq} and #{params.endYjrzrq}</if>
|
|
|
<if test="params.beginSjrzrq != null and params.beginSjrzrq != '' and params.endSjrzrq != null and params.endSjrzrq != ''"> and sjrzsj between #{params.beginSjrzrq} and #{params.endSjrzrq}</if>
|
|
|
<if test="params.beginTzsqrq != null and params.beginTzsqrq != '' and params.endTzsqrq != null and params.endTzsqrq != ''"> and tzsqrq between #{params.beginTzsqrq} and #{params.endTzsqrq}</if>
|
|
|
</where>
|
|
|
- ORDER BY create_time_str DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="selectYljgKhRztzxxById" parameterType="String" resultMap="YljgKhRztzxxResult">
|