|
@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateUnitName" column="update_unit_name" />
|
|
|
<result property="isYh" column="is_yh" />
|
|
|
<result property="isZgwc" column="is_zgwc" />
|
|
|
+ <result property="isZgcs" column="is_zgcs" />
|
|
|
<result property="tyshxydm" column="tyshxydm" />
|
|
|
<result property="jgmc" column="jgmc" />
|
|
|
<result property="xbzt" column="xbzt" />
|
|
@@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="txdz" column="txdz" />
|
|
|
<result property="isJgxfaqdbgc" column="is_jgxfaqdbgc" />
|
|
|
<result property="isJc" column="is_jc" />
|
|
|
- <result property="isJc" column="is_jc" />
|
|
|
+ <result property="checkBm" column="check_bm" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="YljgXfaqzcxxYljgJcxmxxResult" type="YljgXfaqzcxx" extends="YljgXfaqzcxxResult">
|
|
@@ -127,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
) AS is_zgwc,
|
|
|
(SELECT COUNT( id ) FROM yljg_jcxmxx WHERE xfaqzcxx_id = a.id AND is_sf = '是' AND DATE_FORMAT(NOW(), '%Y%m%d') <= zgwcsx) as is_yh,
|
|
|
a.id, a.jg_id, a.xfaqfzr, a.xfaqfzrzjlx, a.xfaqfzrzjhm, a.xfaqfzrdh, a.xfaqglr,
|
|
|
+ a.create_unit_name as check_bm,
|
|
|
a.xfaqglrzjlx, a.is_jgxfaqdbgc, a.is_jc, getxzqhmcbycode(b.szxzqh) as szxzqh_name,
|
|
|
a.xfaqglrzjhm, a.xfaqglrdh, mhhjyssya, a.xfsyhbaqk, a.jtqk, a.pbqk, a.pbqkqt, a.aqzd, a.zcsj, a.zcfzer, a.zt,
|
|
|
a.create_time_str, a.create_user_id, a.create_by, a.create_unit, a.create_unit_name,
|
|
@@ -141,8 +143,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="tyshxydm != null and tyshxydm != ''"> and b.tyshxydm like concat('%',#{tyshxydm}, '%')</if>
|
|
|
<if test="isYh != null and isYh != '' and isYh == 1"> and ( (SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是') > 0 ) </if>
|
|
|
<if test="isYh != null and isYh != '' and isYh == 0"> and ( (SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是') = 0 ) </if>
|
|
|
- <if test="isZgwc != null and isZgwc != '' and isZgwc == '00'"> and
|
|
|
- ( (SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='0' AND DATE_FORMAT(NOW(), '%Y%m%d') > zgwcsx) > 0 )
|
|
|
+
|
|
|
+ <if test="isZgcs != null and isZgcs != '' and isZgcs == '01'"> and
|
|
|
+ (
|
|
|
+ ( SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='1' AND wczfsj <= zgwcsx) > 0
|
|
|
+ OR
|
|
|
+ ( SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='0' AND DATE_FORMAT(NOW(), '%Y%m%d') > zgwcsx ) > 0
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="isZgcs != null and isZgcs != '' and isZgcs == '02'"> and
|
|
|
+ (
|
|
|
+ ( SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='1' AND wczfsj > zgwcsx) > 0
|
|
|
+ OR
|
|
|
+ ( SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='0' AND DATE_FORMAT(NOW(), '%Y%m%d') <= zgwcsx ) > 0
|
|
|
+ )
|
|
|
</if>
|
|
|
|
|
|
<if test="isZgwc != null and isZgwc != '' and isZgwc == '01'"> and
|
|
@@ -152,9 +167,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
(SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='0' AND DATE_FORMAT(NOW(), '%Y%m%d') > zgwcsx) = 0
|
|
|
)
|
|
|
</if>
|
|
|
-
|
|
|
<if test="isZgwc != null and isZgwc != '' and isZgwc == '02'"> and
|
|
|
- ( (SELECT COUNT(id) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf='是' AND is_wczg ='0' ) = 0 )
|
|
|
+ (
|
|
|
+ ( SELECT COUNT(0) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf = '是' ) != 0
|
|
|
+ AND
|
|
|
+ ( SELECT COUNT(0) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_wczg = '1' ) != 0
|
|
|
+ AND
|
|
|
+ ( SELECT COUNT(0) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_sf = '是' )
|
|
|
+ =
|
|
|
+ ( SELECT COUNT(0) FROM yljg_jcxmxx where xfaqzcxx_id = a.id AND is_wczg = '1' )
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test="zt != null and zt != ''"> and a.zt = #{zt}</if>
|
|
|
<if test="params.beginTbrq != null and params.beginTbrq != '' and params.endTbrq != null and params.endTbrq != ''"> and a.zcsj between #{params.beginTbrq} and #{params.endTbrq}</if>
|
|
@@ -162,7 +184,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="(params.beginTbrq == null or params.beginTbrq == '') and params.endTbrq != null and params.endTbrq != ''"> and a.zcsj <= #{params.endTbrq}</if>
|
|
|
AND a.is_jc='1' AND ( a.zt = '2' OR ( a.zt = '1' AND a.create_unit = #{createUnit} ) )
|
|
|
</where>
|
|
|
- ORDER BY a.zt ASC, a.create_time_str DESC
|
|
|
+ ORDER BY a.zt ASC, a.zcsj DESC
|
|
|
</select>
|
|
|
|
|
|
<!--政务业务-综合监管-消防安全自查-->
|