123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- <?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.ruoyi.project.sems.his.mapper.TSpechiCcMapper">
- <resultMap type="TSpechiCc" id="TSpechiCcResult">
- <result property="id" column="id"/>
- <result property="plantCode" column="plant_code"/>
- <result property="unit" column="unit"/>
- <result property="carNo" column="car_no"/>
- <result property="devname" column="devname"/>
- <result property="devno" column="devno"/>
- <result property="submitdate" column="submitdate"/>
- <result property="status" column="status"/>
- <result property="delFlag" column="del_flag"/>
- <result property="createrCode" column="creater_code"/>
- <result property="createdate" column="createdate"/>
- <result property="updaterCode" column="updater_code"/>
- <result property="updatedate" column="updatedate"/>
- <result property="deptId" column="dept_id"/>
- <result property="remarks" column="remarks"/>
- <result property="approveStatus" column="approve_status"/>
- <result property="regno" column="regno"/>
- <result property="useno" column="useno"/>
- <result property="warnDate" column="warn_date"/>
- <result property="warnCycle" column="warn_cycle"/>
- <result property="nextWarnDate" column="next_warn_date"/>
- <result property="warnFlag" column="warn_flag"/>
- <result property="createUnit" column="create_unit"/>
- <result property="checkStrategy" column="check_strategy"/>
- <result property="firstWarnDate" column="first_warn_date"/>
- <result property="checkUnit" column="check_unit"/>
- <result property="docno" column="docno"/>
- <result property="approveTime" column="approve_time"/>
- <result property="changeTime" column="change_time"/>
- <result property="engineNo" column="engine_no"/>
- <result property="color" column="color"/>
- <result property="capacity" column="capacity"/>
- <result property="model" column="model"/>
- <result property="engineType" column="engine_type"/>
- <result property="devClass" column="dev_class"/>
- <result property="exUnit" column="ex_unit"/>
- <result property="useDept" column="use_dept"/>
- <result property="engineer" column="engineer"/>
- <result property="exGrade" column="ex_grade"/>
- <result property="reportNo" column="report_no"/>
- <result property="frameNo" column="frame_no"/>
- <result property="productNo" column="product_no"/>
- <result property="assetOwner" column="asset_owner"/>
- <result property="devId" column="dev_id"/>
- <result property="hiType" column="hi_type"/>
- <result property="deptName" column="dept_name"/>
- <result property="plantMaint" column="plant_maint"/>
- <result property="operName" column="oper_name"/>
- <result property="operTime" column="oper_time"/>
- <result property="operType" column="oper_type"/>
- <result property="deptName" column="dept_name"/>
- </resultMap>
- <sql id="selectTSpechiCcVo">
- select d.id,
- d.plant_code,
- d.oper_name,
- d.oper_time,
- d.oper_type,
- d.unit,
- d.plant_maint,
- d.car_no,
- d.devname,
- d.devno,
- d.submitdate,
- d.status,
- d.del_flag,
- d.creater_code,
- d.createdate,
- d.updater_code,
- d.updatedate,
- d.dept_id,
- d.remarks,
- d.approve_status,
- d.regno,
- d.useno,
- d.warn_date,
- d.warn_cycle,
- d.next_warn_date,
- d.warn_flag,
- d.create_unit,
- d.check_strategy,
- d.first_warn_date,
- d.check_unit,
- d.docno,
- d.approve_time,
- d.change_time,
- d.engine_no,
- d.color,
- d.capacity,
- d.model,
- d.engine_type,
- d.dev_class,
- d.ex_unit,
- d.use_dept,
- d.engineer,
- d.ex_grade,
- d.report_no,
- d.frame_no,
- d.product_no,
- d.asset_owner,
- d.dev_id,
- d.hi_type,
- s.dept_name
- from t_spechi_cc d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <select id="selectTSpechiCcList" parameterType="TSpechiCc" resultMap="TSpechiCcResult">
- <include refid="selectTSpechiCcVo"/>
- <where>
- <if test="operName != null and operName != ''"> and oper_name like concat(concat('%', #{operName}), '%')</if>
- <if test="operTime != null "> and to_CHAR(oper_time,'YYYY-MM-DD') = to_CHAR(#{operTime} , 'YYYY-MM-DD')</if>
- <if test="operType != null and operType != ''"> and oper_type like concat(concat('%', #{operType}), '%')</if>
- and d.del_flag = 0
- and d.hi_type = 2
- </where>
- order by d.oper_time desc
- </select>
- <select id="selectTSpechiCcById" parameterType="Long" resultMap="TSpechiCcResult">
- <include refid="selectTSpechiCcVo"/>
- where d.dev_id = #{id}
- and d.hi_type = 1
- and d.del_flag = 0
- </select>
- <select id="selectTSpechiCcByReform" parameterType="Long" resultMap="TSpechiCcResult">
- <include refid="selectTSpechiCcVo"/>
- where d.dev_id = #{devId}
- and d.hi_type = 0
- and d.del_flag = 0
- </select>
- <insert id="insertTSpechiCc" parameterType="TSpechiCc">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_spechi_cc.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_spechi_cc
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="plantCode != null and plantCode != ''">plant_code,</if>
- <if test="unit != null">unit,</if>
- <if test="carNo != null">car_no,</if>
- <if test="devname != null">devname,</if>
- <if test="devno != null">devno,</if>
- <if test="submitdate != null">submitdate,</if>
- <if test="status != null">status,</if>
- <if test="createrCode != null">creater_code,</if>
- <if test="createdate != null">createdate,</if>
- <if test="updaterCode != null">updater_code,</if>
- <if test="updatedate != null">updatedate,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="remarks != null">remarks,</if>
- <if test="approveStatus != null">approve_status,</if>
- <if test="regno != null">regno,</if>
- <if test="useno != null">useno,</if>
- <if test="warnDate != null">warn_date,</if>
- <if test="warnCycle != null">warn_cycle,</if>
- <if test="nextWarnDate != null">next_warn_date,</if>
- <if test="warnFlag != null">warn_flag,</if>
- <if test="createUnit != null">create_unit,</if>
- <if test="checkStrategy != null">check_strategy,</if>
- <if test="firstWarnDate != null">first_warn_date,</if>
- <if test="checkUnit != null">check_unit,</if>
- <if test="docno != null">docno,</if>
- <if test="approveTime != null">approve_time,</if>
- <if test="changeTime != null">change_time,</if>
- <if test="engineNo != null">engine_no,</if>
- <if test="color != null">color,</if>
- <if test="capacity != null">capacity,</if>
- <if test="model != null">model,</if>
- <if test="engineType != null">engine_type,</if>
- <if test="devClass != null">dev_class,</if>
- <if test="exUnit != null">ex_unit,</if>
- <if test="useDept != null">use_dept,</if>
- <if test="engineer != null">engineer,</if>
- <if test="exGrade != null">ex_grade,</if>
- <if test="reportNo != null">report_no,</if>
- <if test="frameNo != null">frame_no,</if>
- <if test="productNo != null">product_no,</if>
- <if test="assetOwner != null">asset_owner,</if>
- <if test="devId != null">dev_id,</if>
- <if test="hiType != null">hi_type,</if>
- <if test="plantMaint != null">plant_maint,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
- <if test="unit != null">#{unit},</if>
- <if test="carNo != null">#{carNo},</if>
- <if test="devname != null">#{devname},</if>
- <if test="devno != null">#{devno},</if>
- <if test="submitdate != null">#{submitdate},</if>
- <if test="status != null">#{status},</if>
- <if test="createrCode != null">#{createrCode},</if>
- <if test="createdate != null">#{createdate},</if>
- <if test="updaterCode != null">#{updaterCode},</if>
- <if test="updatedate != null">#{updatedate},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="remarks != null">#{remarks},</if>
- <if test="approveStatus != null">#{approveStatus},</if>
- <if test="regno != null">#{regno},</if>
- <if test="useno != null">#{useno},</if>
- <if test="warnDate != null">#{warnDate},</if>
- <if test="warnCycle != null">#{warnCycle},</if>
- <if test="nextWarnDate != null">#{nextWarnDate},</if>
- <if test="warnFlag != null">#{warnFlag},</if>
- <if test="createUnit != null">#{createUnit},</if>
- <if test="checkStrategy != null">#{checkStrategy},</if>
- <if test="firstWarnDate != null">#{firstWarnDate},</if>
- <if test="checkUnit != null">#{checkUnit},</if>
- <if test="docno != null">#{docno},</if>
- <if test="approveTime != null">#{approveTime},</if>
- <if test="changeTime != null">#{changeTime},</if>
- <if test="engineNo != null">#{engineNo},</if>
- <if test="color != null">#{color},</if>
- <if test="capacity != null">#{capacity},</if>
- <if test="model != null">#{model},</if>
- <if test="engineType != null">#{engineType},</if>
- <if test="devClass != null">#{devClass},</if>
- <if test="exUnit != null">#{exUnit},</if>
- <if test="useDept != null">#{useDept},</if>
- <if test="engineer != null">#{engineer},</if>
- <if test="exGrade != null">#{exGrade},</if>
- <if test="reportNo != null">#{reportNo},</if>
- <if test="frameNo != null">#{frameNo},</if>
- <if test="productNo != null">#{productNo},</if>
- <if test="assetOwner != null">#{assetOwner},</if>
- <if test="devId != null">#{devId},</if>
- <if test="hiType != null">#{hiType},</if>
- <if test="plantMaint != null">#{plantMaint},</if>
- </trim>
- </insert>
- <insert id="insertTSpechiCcByDev" parameterType="com.ruoyi.project.sems.domain.TSpecdevCc">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_spechi_cc.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_spechi_cc
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="plantCode != null and plantCode != ''">plant_code,</if>
- <if test="unit != null">unit,</if>
- <if test="carNo != null">car_no,</if>
- <if test="devname != null">devname,</if>
- <if test="devno != null">devno,</if>
- <if test="submitdate != null">submitdate,</if>
- <if test="status != null">status,</if>
- <if test="createrCode != null">creater_code,</if>
- <if test="createdate != null">createdate,</if>
- <if test="updaterCode != null">updater_code,</if>
- <if test="updatedate != null">updatedate,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="remarks != null">remarks,</if>
- <if test="approveStatus != null">approve_status,</if>
- <if test="regno != null">regno,</if>
- <if test="useno != null">useno,</if>
- <if test="warnDate != null">warn_date,</if>
- <if test="warnCycle != null">warn_cycle,</if>
- <if test="nextWarnDate != null">next_warn_date,</if>
- <if test="warnFlag != null">warn_flag,</if>
- <if test="createUnit != null">create_unit,</if>
- <if test="checkStrategy != null">check_strategy,</if>
- <if test="firstWarnDate != null">first_warn_date,</if>
- <if test="checkUnit != null">check_unit,</if>
- <if test="docno != null">docno,</if>
- <if test="approveTime != null">approve_time,</if>
- <if test="changeTime != null">change_time,</if>
- <if test="engineNo != null">engine_no,</if>
- <if test="color != null">color,</if>
- <if test="capacity != null">capacity,</if>
- <if test="model != null">model,</if>
- <if test="engineType != null">engine_type,</if>
- <if test="devClass != null">dev_class,</if>
- <if test="exUnit != null">ex_unit,</if>
- <if test="useDept != null">use_dept,</if>
- <if test="engineer != null">engineer,</if>
- <if test="exGrade != null">ex_grade,</if>
- <if test="reportNo != null">report_no,</if>
- <if test="frameNo != null">frame_no,</if>
- <if test="productNo != null">product_no,</if>
- <if test="assetOwner != null">asset_owner,</if>
- <if test="devId != null">dev_id,</if>
- <if test="hiType != null">hi_type,</if>
- <if test="plantMaint != null">plant_maint,</if>
- <if test="createBy != null">oper_name,</if>
- <if test="createTime != null">oper_time,</if>
- <if test="remark != null">oper_type,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
- <if test="unit != null">#{unit},</if>
- <if test="carNo != null">#{carNo},</if>
- <if test="devname != null">#{devname},</if>
- <if test="devno != null">#{devno},</if>
- <if test="submitdate != null">#{submitdate},</if>
- <if test="status != null">#{status},</if>
- <if test="createrCode != null">#{createrCode},</if>
- <if test="createdate != null">#{createdate},</if>
- <if test="updaterCode != null">#{updaterCode},</if>
- <if test="updatedate != null">#{updatedate},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="remarks != null">#{remarks},</if>
- <if test="approveStatus != null">#{approveStatus},</if>
- <if test="regno != null">#{regno},</if>
- <if test="useno != null">#{useno},</if>
- <if test="warnDate != null">#{warnDate},</if>
- <if test="warnCycle != null">#{warnCycle},</if>
- <if test="nextWarnDate != null">#{nextWarnDate},</if>
- <if test="warnFlag != null">#{warnFlag},</if>
- <if test="createUnit != null">#{createUnit},</if>
- <if test="checkStrategy != null">#{checkStrategy},</if>
- <if test="firstWarnDate != null">#{firstWarnDate},</if>
- <if test="checkUnit != null">#{checkUnit},</if>
- <if test="docno != null">#{docno},</if>
- <if test="approveTime != null">#{approveTime},</if>
- <if test="changeTime != null">#{changeTime},</if>
- <if test="engineNo != null">#{engineNo},</if>
- <if test="color != null">#{color},</if>
- <if test="capacity != null">#{capacity},</if>
- <if test="model != null">#{model},</if>
- <if test="engineType != null">#{engineType},</if>
- <if test="devClass != null">#{devClass},</if>
- <if test="exUnit != null">#{exUnit},</if>
- <if test="useDept != null">#{useDept},</if>
- <if test="engineer != null">#{engineer},</if>
- <if test="exGrade != null">#{exGrade},</if>
- <if test="reportNo != null">#{reportNo},</if>
- <if test="frameNo != null">#{frameNo},</if>
- <if test="productNo != null">#{productNo},</if>
- <if test="assetOwner != null">#{assetOwner},</if>
- <if test="devId != null">#{devId},</if>
- <if test="hiType != null">#{hiType},</if>
- <if test="plantMaint != null">#{plantMaint},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateTSpechiCc" parameterType="TSpechiCc">
- update t_spechi_cc
- <trim prefix="SET" suffixOverrides=",">
- <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
- <if test="unit != null">unit = #{unit},</if>
- <if test="carNo != null">car_no = #{carNo},</if>
- <if test="devname != null">devname = #{devname},</if>
- <if test="devno != null">devno = #{devno},</if>
- <if test="submitdate != null">submitdate = #{submitdate},</if>
- <if test="status != null">status = #{status},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createrCode != null">creater_code = #{createrCode},</if>
- <if test="createdate != null">createdate = #{createdate},</if>
- <if test="updaterCode != null">updater_code = #{updaterCode},</if>
- <if test="updatedate != null">updatedate = #{updatedate},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="remarks != null">remarks = #{remarks},</if>
- <if test="approveStatus != null">approve_status = #{approveStatus},</if>
- <if test="regno != null">regno = #{regno},</if>
- <if test="useno != null">useno = #{useno},</if>
- <if test="warnDate != null">warn_date = #{warnDate},</if>
- <if test="warnCycle != null">warn_cycle = #{warnCycle},</if>
- <if test="nextWarnDate != null">next_warn_date = #{nextWarnDate},</if>
- <if test="warnFlag != null">warn_flag = #{warnFlag},</if>
- <if test="createUnit != null">create_unit = #{createUnit},</if>
- <if test="checkStrategy != null">check_strategy = #{checkStrategy},</if>
- <if test="firstWarnDate != null">first_warn_date = #{firstWarnDate},</if>
- <if test="checkUnit != null">check_unit = #{checkUnit},</if>
- <if test="docno != null">docno = #{docno},</if>
- <if test="approveTime != null">approve_time = #{approveTime},</if>
- <if test="changeTime != null">change_time = #{changeTime},</if>
- <if test="engineNo != null">engine_no = #{engineNo},</if>
- <if test="color != null">color = #{color},</if>
- <if test="capacity != null">capacity = #{capacity},</if>
- <if test="model != null">model = #{model},</if>
- <if test="engineType != null">engine_type = #{engineType},</if>
- <if test="devClass != null">dev_class = #{devClass},</if>
- <if test="exUnit != null">ex_unit = #{exUnit},</if>
- <if test="useDept != null">use_dept = #{useDept},</if>
- <if test="engineer != null">engineer = #{engineer},</if>
- <if test="exGrade != null">ex_grade = #{exGrade},</if>
- <if test="reportNo != null">report_no = #{reportNo},</if>
- <if test="frameNo != null">frame_no = #{frameNo},</if>
- <if test="productNo != null">product_no = #{productNo},</if>
- <if test="assetOwner != null">asset_owner = #{assetOwner},</if>
- <if test="devId != null">dev_id = #{devId},</if>
- <if test="hiType != null">hi_type = #{hiType},</if>
- <if test="plantMaint != null">plant_maint = #{plantMaint},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTSpechiCcById" parameterType="Long">
- update t_spechi_cc
- set del_flag = 2
- where id = #{id}
- </update>
- <update id="deleteTSpechiCcByIds" parameterType="String">
- update t_spechi_cc set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- <update id="deleteTSpechiCcByDevId" parameterType="Long">
- update t_spechi_cc
- set del_flag = 2
- where dev_id = #{devId}
- and hi_type = 1
- </update>
- </mapper>
|