| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.unis.inspectionplan.server.dao.TJcjhDao" >
- <resultMap id="BaseResultMap" type="com.unis.inspectionplan.server.entity.TJcjhDO" >
- <result column="jh_id" property="jhId" jdbcType="VARCHAR" />
- <result column="jh_name" property="jhName" jdbcType="VARCHAR" />
- <result column="rwlx_id" property="rwlxId" jdbcType="VARCHAR" />
- <result column="rwlxmc" property="rwlxmc" jdbcType="VARCHAR" />
- <result column="is_bjjcz" property="isBjjcz" jdbcType="INTEGER" />
- <result column="bjdwfx" property="bjdwfx" jdbcType="INTEGER" />
- <result column="rwqsr" property="rwqsr" jdbcType="DATE" />
- <result column="rwjsr" property="rwjsr" jdbcType="DATE" />
- <result column="status" property="status" jdbcType="INTEGER" />
- <result column="createor" property="createor" jdbcType="VARCHAR" />
- <result column="createor_code" property="createorCode" jdbcType="VARCHAR" />
- <result column="create_date" property="createDate" jdbcType="DATE" />
- <result column="refresher" property="refresher" jdbcType="VARCHAR" />
- <result column="refresher_code" property="refresherCode" jdbcType="VARCHAR" />
- <result column="refresh_date" property="refreshDate" jdbcType="DATE" />
- <result column="remark" property="remark" jdbcType="VARCHAR" />
- <result column="org_id" property="orgId" jdbcType="VARCHAR" />
- <result column="xfr" property="xfr" jdbcType="VARCHAR" />
- <result column="xfsj" property="xfsj" jdbcType="DATE" />
- <result column="jhzt" property="jhzt" jdbcType="INTEGER" />
- <result column="planid" property="planid" jdbcType="VARCHAR" />
- </resultMap>
-
-
-
-
-
-
- <sql id="Example_Where_Clause" >
- <where >
- <foreach collection="oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause" >
- <where >
- <foreach collection="example.oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List" >
- jc.jh_id, jc.jh_name, jc.rwlx_id, jc.rwlxmc, jc.is_bjjcz, jc.bjdwfx, jc.rwqsr, jc.rwjsr,
- jc.status, jc.createor, jc.createor_code, jc.create_date, jc.refresher, jc.refresher_code, jc.refresh_date,
- jc.remark, jc.org_id, jc.xfr, jc.xfsj, jc.jhzt,jc.planid
- </sql>
-
-
-
-
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.unis.inspectionplan.server.example.TJcjhExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from T_JCJH
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- where status=1
- </select>
-
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from T_JCJH jc
- where jc.jh_id = #{jhId,jdbcType=VARCHAR} and jc.status=1
- </select>
-
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from T_JCJH
- where jh_id = #{jhId,jdbcType=VARCHAR} </delete>
- <delete id="deleteByExample" parameterType="com.unis.inspectionplan.server.example.TJcjhExample" >
- delete from T_JCJH
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
-
- <update id="updateByPrimaryKeySelective" parameterType="com.unis.inspectionplan.server.entity.TJcjhDO" >
- update T_JCJH
- <set >
-
- <if test="jhName != null" >
- jh_name = #{jhName,jdbcType=VARCHAR},
- </if>
- <if test="rwlxId != null" >
- rwlx_id = #{rwlxId,jdbcType=VARCHAR},
- </if>
- <if test="rwlxmc != null" >
- rwlxmc = #{rwlxmc,jdbcType=VARCHAR},
- </if>
- <if test="isBjjcz != null" >
- is_bjjcz = #{isBjjcz,jdbcType=INTEGER},
- </if>
- <if test="bjdwfx != null" >
- bjdwfx = #{bjdwfx,jdbcType=INTEGER},
- </if>
- <if test="rwqsr != null" >
- rwqsr = #{rwqsr,jdbcType=DATE},
- </if>
- <if test="rwjsr != null" >
- rwjsr = #{rwjsr,jdbcType=DATE},
- </if>
- <if test="status != null" >
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="createor != null" >
- createor = #{createor,jdbcType=VARCHAR},
- </if>
- <if test="createorCode != null" >
- createor_code = #{createorCode,jdbcType=VARCHAR},
- </if>
- <if test="createDate != null" >
- create_date = #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="refresher != null" >
- refresher = #{refresher,jdbcType=VARCHAR},
- </if>
- <if test="refresherCode != null" >
- refresher_code = #{refresherCode,jdbcType=VARCHAR},
- </if>
- <if test="refreshDate != null" >
- refresh_date = #{refreshDate,jdbcType=TIMESTAMP},
- </if>
- <if test="remark != null" >
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- org_id = #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="xfr != null" >
- xfr=#{xfr,jdbcType=VARCHAR},
- </if>
- <if test="xfsj != null" >
- xfsj=#{xfsj,jdbcType=TIMESTAMP},
- </if>
- <if test="jhzt != null" >
- jhzt=#{jhzt,jdbcType=INTEGER},
- </if>
- </set>
- where jh_id = #{jhId,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.unis.inspectionplan.server.entity.TJcjhDO" >
- update T_JCJH
- set
- jh_name = #{jhName,jdbcType=VARCHAR},
- rwlx_id = #{rwlxId,jdbcType=VARCHAR},
- rwlxmc = #{rwlxmc,jdbcType=VARCHAR},
- is_bjjcz = #{isBjjcz,jdbcType=INTEGER},
- bjdwfx = #{bjdwfx,jdbcType=INTEGER},
- rwqsr = #{rwqsr,jdbcType=DATE},
- rwjsr = #{rwjsr,jdbcType=DATE},
- status = #{status,jdbcType=INTEGER},
- xfr=#{xfr,jdbcType=VARCHAR},
- xfsj=#{xfsj,jdbcType=TIMESTAMP},
- jhzt=#{jhzt,jdbcType=INTEGER},
- createor = #{createor,jdbcType=VARCHAR},
- createor_code = #{createorCode,jdbcType=VARCHAR},
- create_date = #{createDate,jdbcType=TIMESTAMP},
- refresher = #{refresher,jdbcType=VARCHAR},
- refresher_code = #{refresherCode,jdbcType=VARCHAR},
- refresh_date = #{refreshDate,jdbcType=TIMESTAMP},
- remark = #{remark,jdbcType=VARCHAR},
- org_id = #{orgId,jdbcType=VARCHAR}
- where jh_id = #{jhId,jdbcType=VARCHAR}
- </update>
-
- <insert id="insert" parameterType="com.unis.inspectionplan.server.entity.TJcjhDO" >
- insert into T_JCJH (jh_id, jh_name,
- rwlx_id, rwlxmc, is_bjjcz,
- bjdwfx, rwqsr, rwjsr, status, createor,
- createor_code, create_date, refresher,
- refresher_code, refresh_date, remark,
- org_id,xfr,xfsj,jhzt,planid)
- values (#{jhId,jdbcType=VARCHAR}, #{jhName,jdbcType=VARCHAR},
- #{rwlxId,jdbcType=VARCHAR}, #{rwlxmc,jdbcType=VARCHAR}, #{isBjjcz,jdbcType=INTEGER},
- #{bjdwfx,jdbcType=INTEGER}, #{rwqsr,jdbcType=DATE}, #{rwjsr,jdbcType=DATE}, #{status,jdbcType=INTEGER}, #{createor,jdbcType=VARCHAR},
- #{createorCode,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{refresher,jdbcType=VARCHAR},
- #{refresherCode,jdbcType=VARCHAR}, #{refreshDate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
- #{orgId,jdbcType=VARCHAR}, #{xfr,jdbcType=VARCHAR}, #{xfsj,jdbcType=VARCHAR}, #{jhzt,jdbcType=INTEGER}, #{planid,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.unis.inspectionplan.server.entity.TJcjhDO" >
- insert into T_JCJH
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="jhId != null" >
- jh_id,
- </if>
- <if test="jhName != null" >
- jh_name,
- </if>
- <if test="rwlxId != null" >
- rwlx_id,
- </if>
- <if test="rwlxmc != null" >
- rwlxmc,
- </if>
- <if test="isBjjcz != null" >
- is_bjjcz,
- </if>
- <if test="bjdwfx != null" >
- bjdwfx,
- </if>
- <if test="rwqsr != null" >
- rwqsr,
- </if>
- <if test="rwjsr != null" >
- rwjsr,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="createor != null" >
- createor,
- </if>
- <if test="createorCode != null" >
- createor_code,
- </if>
- <if test="createDate != null" >
- create_date,
- </if>
- <if test="refresher != null" >
- refresher,
- </if>
- <if test="refresherCode != null" >
- refresher_code,
- </if>
- <if test="refreshDate != null" >
- refresh_date,
- </if>
- <if test="remark != null" >
- remark,
- </if>
- <if test="orgId != null" >
- org_id,
- </if>
- <if test="xfr != null" >
- xfr,
- </if>
- <if test="xfsj != null" >
- xfsj,
- </if>
- <if test="jhzt != null" >
- jhzt,
- </if>
- <if test="planid != null" >
- planid,
- </if>
- rwsfgd
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="jhId != null" >
- #{jhId,jdbcType=VARCHAR},
- </if>
- <if test="jhName != null" >
- #{jhName,jdbcType=VARCHAR},
- </if>
- <if test="rwlxId != null" >
- #{rwlxId,jdbcType=VARCHAR},
- </if>
- <if test="rwlxmc != null" >
- #{rwlxmc,jdbcType=VARCHAR},
- </if>
- <if test="isBjjcz != null" >
- #{isBjjcz,jdbcType=INTEGER},
- </if>
- <if test="bjdwfx != null" >
- #{bjdwfx,jdbcType=INTEGER},
- </if>
- <if test="rwqsr != null" >
- #{rwqsr,jdbcType=DATE},
- </if>
- <if test="rwjsr != null" >
- #{rwjsr,jdbcType=DATE},
- </if>
- <if test="status != null" >
- #{status,jdbcType=INTEGER},
- </if>
- <if test="createor != null" >
- #{createor,jdbcType=VARCHAR},
- </if>
- <if test="createorCode != null" >
- #{createorCode,jdbcType=VARCHAR},
- </if>
- <if test="createDate != null" >
- #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="refresher != null" >
- #{refresher,jdbcType=VARCHAR},
- </if>
- <if test="refresherCode != null" >
- #{refresherCode,jdbcType=VARCHAR},
- </if>
- <if test="refreshDate != null" >
- #{refreshDate,jdbcType=TIMESTAMP},
- </if>
- <if test="remark != null" >
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- #{orgId,jdbcType=VARCHAR},
- </if>
- <if test="xfr != null" >
- #{xfr,jdbcType=VARCHAR},
- </if>
- <if test="xfsj != null" >
- #{xfsj,jdbcType=TIMESTAMP},
- </if>
- <if test="jhzt != null" >
- #{jhzt,jdbcType=INTEGER},
- </if>
- <if test="planid != null" >
- #{planid,jdbcType=INTEGER},
- </if>
- 0
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.unis.inspectionplan.server.example.TJcjhExample" resultType="java.lang.Integer" >
- select count(1) from T_JCJH
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update T_JCJH
- <set >
- <if test="record.jhId != null" >
- jh_id = #{record.jhId,jdbcType=VARCHAR},
- </if>
- <if test="record.jhName != null" >
- jh_name = #{record.jhName,jdbcType=VARCHAR},
- </if>
- <if test="record.rwlxId != null" >
- rwlx_id = #{record.rwlxId,jdbcType=VARCHAR},
- </if>
- <if test="record.rwlxmc != null" >
- rwlxmc = #{record.rwlxmc,jdbcType=VARCHAR},
- </if>
- <if test="record.isBjjcz != null" >
- is_bjjcz = #{record.isBjjcz,jdbcType=INTEGER},
- </if>
- <if test="record.bjdwfx != null" >
- bjdwfx = #{record.bjdwfx,jdbcType=INTEGER},
- </if>
- <if test="record.rwqsr != null" >
- rwqsr = #{record.rwqsr,jdbcType=DATE},
- </if>
- <if test="record.rwjsr != null" >
- rwjsr = #{record.rwjsr,jdbcType=DATE},
- </if>
- <if test="record.status != null" >
- status = #{record.status,jdbcType=INTEGER},
- </if>
- <if test="record.createor != null" >
- createor = #{record.createor,jdbcType=VARCHAR},
- </if>
- <if test="record.createorCode != null" >
- createor_code = #{record.createorCode,jdbcType=VARCHAR},
- </if>
- <if test="record.createDate != null" >
- create_date = #{record.createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.refresher != null" >
- refresher = #{record.refresher,jdbcType=VARCHAR},
- </if>
- <if test="record.refresherCode != null" >
- refresher_code = #{record.refresherCode,jdbcType=VARCHAR},
- </if>
- <if test="record.refreshDate != null" >
- refresh_date = #{record.refreshDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.remark != null" >
- remark = #{record.remark,jdbcType=VARCHAR},
- </if>
- <if test="record.orgId != null" >
- org_id = #{record.orgId,jdbcType=VARCHAR},
- </if>
- <if test="record.xfr != null" >
- xfr=#{record.xfr,jdbcType=VARCHAR},
- </if>
- <if test="record.xfsj != null" >
- xfsj=#{record.xfsj,jdbcType=TIMESTAMP},
- </if>
- <if test="record.jhzt != null" >
- jhzt=#{record.jhzt,jdbcType=INTEGER},
- </if>
- </set>
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map" >
- update T_JCJH
- set
-
- jh_name = #{record.jhName,jdbcType=VARCHAR},
- rwlx_id = #{record.rwlxId,jdbcType=VARCHAR},
- rwlxmc = #{record.rwlxmc,jdbcType=VARCHAR},
- is_bjjcz = #{record.isBjjcz,jdbcType=INTEGER},
- bjdwfx = #{record.bjdwfx,jdbcType=INTEGER},
- rwqsr = #{record.rwqsr,jdbcType=DATE},
- rwjsr = #{record.rwjsr,jdbcType=DATE},
- status = #{record.status,jdbcType=INTEGER},
- createor = #{record.createor,jdbcType=VARCHAR},
- createor_code = #{record.createorCode,jdbcType=VARCHAR},
- create_date = #{record.createDate,jdbcType=TIMESTAMP},
- refresher = #{record.refresher,jdbcType=VARCHAR},
- refresher_code = #{record.refresherCode,jdbcType=VARCHAR},
- refresh_date = #{record.refreshDate,jdbcType=TIMESTAMP},
- remark = #{record.remark,jdbcType=VARCHAR},
- org_id = #{record.orgId,jdbcType=VARCHAR},
- xfr= #{record.xfr,jdbcType=VARCHAR},
- xfsj=#{record.xfsj,jdbcType=TIMESTAMP},
- jhzt=#{record.jhzt,jdbcType=INTEGER},
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
-
- <select id="getMaxCodeById" resultType="java.lang.String" parameterType="java.lang.String">
- SELECT
- max(jh_id)
- from
- T_JCJH
- where jh_id LIKE CONCAT(#{pstr,jdbcType=VARCHAR}, '%')
- </select>
-
-
- <!-- 根据条件查询计划信息 -->
- <select id="getList" resultMap="BaseResultMap" parameterType="com.unis.inspectionplan.common.vo.InspectionplanQueryVO">
- SELECT
- DISTINCT(jc.jh_id), jc.jh_name, jc.rwlx_id, jc.rwlxmc, jc.is_bjjcz, jc.bjdwfx, jc.rwqsr, jc.rwjsr,
- jc.status, jc.createor, jc.createor_code, jc.create_date, jc.refresher, jc.refresher_code, jc.refresh_date,
- jc.remark, jc.org_id, jc.xfr, jc.xfsj, jc.jhzt
- from T_JCJH jc
- LEFT JOIN T_JCDW jd ON jc.JH_ID = jd.JH_ID
- <where>
- jc.rwsfgd = '0' and jc.status=1
- <if test="rwlxMc != null and rwlxMc != ''" >
- and jc.rwlxmc LIKE concat(CONCAT('%',#{rwlxMc,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="jhName != null and jhName != ''" >
- and jc.jh_name LIKE concat(CONCAT('%',#{jhName,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="rwlxId != null" >
- and jc.rwlx_id LIKE concat(CONCAT('%',#{rwlxId,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="jcdwName != null and jcdwName != ''" >
- and jd.jcdw_name LIKE concat(CONCAT('%',#{jcdwName,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="jcdwId != null and jcdwId != ''" >
- and jd.jcdw_id LIKE concat(CONCAT('%',#{jcdwId,jdbcType=VARCHAR}) ,'%')
- </if>
-
- <if test="rwqsr != null and rwqsr != ''" >
- and DATE_FORMAT(jc.rwqsr,'%Y-%m-%d') >= #{rwqsr}
- </if>
- <if test="rwjsr != null and rwjsr != ''" >
- and DATE_FORMAT(jc.rwjsr,'%Y-%m-%d') <= #{rwjsr}
- </if>
- <!--<if test="orgId != null and orgId != ''" >
- and jc.org_id LIKE concat(CONCAT('%',#{orgId,jdbcType=VARCHAR}) ,'%')
- </if>-->
- <if test="jhzt != null" >
- and jc.jhzt = #{jhzt,jdbcType=INTEGER}
- </if>
- <if test="rwlxIds !=null and rwlxIds !=''">
- and jc.rwlx_id in
- <foreach collection="rwlxIds" item="item" index="index" open="(" separator="," close= ")" >
- #{item}
- </foreach>
- </if>
- and(
- jc.org_id like '%${orgId,jdbcType=VARCHAR}%'
- <if test="jhIds != null and jhIds != ''">
- or jc.jh_id in
- <foreach collection="jhIds" item="item" index="index" open="(" separator="," close= ")" >
- #{item}
- </foreach>
- </if>
- )
- </where>
- ORDER BY jc.xfsj desc,jc.create_date desc
- </select>
-
-
-
-
-
-
-
- <!-- 根据条件查询计划信息 -->
- <select id="getJcjhList" resultMap="BaseResultMap" parameterType="java.lang.String">
- SELECT
- jc.jh_id, jc.jh_name, jc.rwlx_id, jc.rwlxmc, jc.is_bjjcz, jc.bjdwfx, jc.rwqsr, jc.rwjsr,
- jc.status, jc.createor, jc.createor_code, jc.create_date, jc.refresher, jc.refresher_code, jc.refresh_date,
- jc.remark, jc.org_id, jc.xfr, jc.xfsj, jc.jhzt, jc.planid
- from T_JCJH jc
- <where>
- jc.status = 1
- and (
- (jc.rwqsr <= sysdate and jc.rwjsr >= sysdate)
- or
- (jc.rwqsr <= sysdate and jc.rwjsr is null)
- )
- and jc.rwsfgd = '0'
- and (jc.jhzt=2 or jc.jhzt=3)
- and jc.rwlx_id LIKE concat(CONCAT('%',#{rwlxbh,jdbcType=VARCHAR}) ,'%')
- </where>
- ORDER BY jc.create_date desc
- </select>
-
-
- <!-- 根据条件查询计划信息 -->
- <select id="getplaceList" resultMap="BaseResultMap" parameterType="com.unis.inspectionplan.common.vo.InspectionplanQueryVO">
- SELECT
- DISTINCT(jc.jh_id), jc.jh_name, jc.rwlx_id, jc.rwlxmc, jc.is_bjjcz, jc.bjdwfx, jc.rwqsr, jc.rwjsr,
- jc.status, jc.createor, jc.createor_code, jc.create_date, jc.refresher, jc.refresher_code, jc.refresh_date,
- jc.remark, jc.org_id, jc.xfr, jc.xfsj, jc.jhzt, jc.planid
- from T_JCJH jc LEFT JOIN T_JCDW jd
- ON
- jc.JH_ID = jd.JH_ID
- <where>
- <if test="rwlxMc != null and rwlxMc != ''" >
- and jc.rwlxmc LIKE concat(CONCAT('%',#{rwlxMc,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="rwlxId != null" >
- and jc.rwlx_id LIKE concat(CONCAT('%',#{rwlxId,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="jcdwName != null and jcdwName != ''" >
- and jd.jcdw_name LIKE concat(CONCAT('%',#{jcdwName,jdbcType=VARCHAR}) ,'%')
- </if>
- <if test="jcdwId != null and jcdwId != ''" >
- and jd.jcdw_id LIKE concat(CONCAT('%',#{jcdwId,jdbcType=VARCHAR}) ,'%')
- </if>
-
- <if test="rwqsr != null and rwqsr != ''" >
- and DATE_FORMAT(jc.rwqsr,'%Y-%m-%d') >= #{rwqsr}
- </if>
- <if test="rwjsr != null and rwjsr != ''" >
- and DATE_FORMAT(jc.rwjsr,'%Y-%m-%d') <= #{rwjsr}
- </if>
- <if test="orgId != null and orgId != ''" >
- <!--and jc.org_id LIKE concat#(CONCAT('%',#{orgId,jdbcType=VARCHAR}) ,'%')-->
- and jc.org_id=#{orgId,jdbcType=VARCHAR}
- </if>
- <if test="jhzt != null" >
- and jc.jhzt = #{jhzt,jdbcType=INTEGER}
- </if>
- <if test="jhIds != null and jhIds != ''">
- and jc.jh_id in
- <foreach collection="jhIds" item="item" index="index" open="(" separator="," close= ")" >
- #{item}
- </foreach>
- </if>
- and jc.rwsfgd = '1'
- </where>
- ORDER BY jc.create_date desc
- </select>
-
-
-
- <update id="update" parameterType="java.lang.String" >
- update T_JCJH
- set
- rwsfgd = '1'
- where jh_id = #{jhId,jdbcType=VARCHAR}
- </update>
-
-
- <update id="updateById" parameterType="java.lang.String" >
- update T_JCJH
- set
- status = '0'
- where jh_id = #{jhId,jdbcType=VARCHAR}
- </update>
-
- <update id="updateOverDueByEntitySelective">
- update T_JCJH
- set
- jhzt = #{jhzt,jdbcType=VARCHAR}
- <where>
- <!--此处为必填条件,如不满足则不执行,以免更新全部-->
- <choose>
- <when test='rwjsr !=null'>
- <![CDATA[
- AND rwjsr < #{rwjsr,jdbcType=DATE}
- ]]>
- </when>
- <otherwise>
- AND 1=0
- </otherwise>
- </choose>
- AND jhzt =2
- <!--此处可添加状态条件等-->
- <if test='status!=null'>
- AND STATUS = #{status,jdbcType=DECIMAL}
- </if>
- </where>
- </update>
-
-
-
-
- <select id="getPlanList" resultMap="BaseResultMap"
- parameterType="com.unis.inspectionplan.server.entity.TJcjhDO">
- select
- <include refid="Base_Column_List" />
- from T_JCJH jc
- <where>
- jc.STATUS = 1
- <if test="jhzt != null">
- AND jc.jhzt = #{jhzt,jdbcType=INTEGER}
- </if>
- </where>
- </select>
- <!-- 获取某状态计划总数 -->
- <select id="getPlanUnfinishedCount" resultType="java.lang.Long">
- SELECT count(1) FROM T_JCJH
- <where>
- status = 1
- <if test="status != null">
- AND jhzt = #{status,jdbcType=INTEGER}
- </if>
- </where>
- </select>
-
- <delete id="backlog" parameterType="java.lang.String">
- delete from db_utf8.ty_backlog
- where item_id like concat(CONCAT('%',#{id,jdbcType=VARCHAR}) ,'%')
- </delete>
- </mapper>
|