|
@@ -1,56 +1,93 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.project.ehs.mapper.TJobticketMapper">
|
|
|
|
|
|
<resultMap type="TJobticket" id="TJobticketResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="plantCode" column="plant_code" />
|
|
|
- <result property="kprq" column="kprq" />
|
|
|
- <result property="qfsj" column="qfsj" />
|
|
|
- <result property="qfbz" column="qfbz" />
|
|
|
- <result property="qfr" column="qfr" />
|
|
|
- <result property="xpxp" column="xpxp" />
|
|
|
- <result property="yqxkzh" column="yqxkzh" />
|
|
|
- <result property="whgzxkzh" column="whgzxkzh" />
|
|
|
- <result property="dhzyxkzh" column="dhzyxkzh" />
|
|
|
- <result property="hpjb" column="hpjb" />
|
|
|
- <result property="xzkjxkzh" column="xzkjxkzh" />
|
|
|
- <result property="content" column="content" />
|
|
|
- <result property="byclxr" column="byclxr" />
|
|
|
- <result property="sgdw" column="sgdw" />
|
|
|
- <result property="lxr" column="lxr" />
|
|
|
- <result property="lxdh" column="lxdh" />
|
|
|
- <result property="xpsj" column="xpsj" />
|
|
|
- <result property="zypzt" column="zypzt" />
|
|
|
- <result property="jccdr" column="jccdr" />
|
|
|
- <result property="wcxxbh" column="wcxxbh" />
|
|
|
- <result property="wcxzt" column="wcxzt" />
|
|
|
- <result property="cxsj" column="cxsj" />
|
|
|
- <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="deptName" column="dept_name" />
|
|
|
- <result property="startDate" column="kprq" />
|
|
|
- <result property="endDate" column="kprq" />
|
|
|
- <result property="mbzyxkzh" column="mbzyxkzh" />
|
|
|
- <result property="gczyxkzh" column="gczyxkzh" />
|
|
|
- <result property="gczyjb" column="gczyjb" />
|
|
|
- <result property="postponeNumber" column="postpone_number" />
|
|
|
- <result property="userMg" column="user_mg" />
|
|
|
- <result property="userUnit" column="user_unit" />
|
|
|
- <result property="tag" column="tag" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="plantCode" column="plant_code"/>
|
|
|
+ <result property="kprq" column="kprq"/>
|
|
|
+ <result property="qfsj" column="qfsj"/>
|
|
|
+ <result property="qfbz" column="qfbz"/>
|
|
|
+ <result property="qfr" column="qfr"/>
|
|
|
+ <result property="xpxp" column="xpxp"/>
|
|
|
+ <result property="yqxkzh" column="yqxkzh"/>
|
|
|
+ <result property="whgzxkzh" column="whgzxkzh"/>
|
|
|
+ <result property="dhzyxkzh" column="dhzyxkzh"/>
|
|
|
+ <result property="hpjb" column="hpjb"/>
|
|
|
+ <result property="xzkjxkzh" column="xzkjxkzh"/>
|
|
|
+ <result property="content" column="content"/>
|
|
|
+ <result property="byclxr" column="byclxr"/>
|
|
|
+ <result property="sgdw" column="sgdw"/>
|
|
|
+ <result property="lxr" column="lxr"/>
|
|
|
+ <result property="lxdh" column="lxdh"/>
|
|
|
+ <result property="xpsj" column="xpsj"/>
|
|
|
+ <result property="zypzt" column="zypzt"/>
|
|
|
+ <result property="jccdr" column="jccdr"/>
|
|
|
+ <result property="wcxxbh" column="wcxxbh"/>
|
|
|
+ <result property="wcxzt" column="wcxzt"/>
|
|
|
+ <result property="cxsj" column="cxsj"/>
|
|
|
+ <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="deptName" column="dept_name"/>
|
|
|
+ <result property="startDate" column="kprq"/>
|
|
|
+ <result property="endDate" column="kprq"/>
|
|
|
+ <result property="mbzyxkzh" column="mbzyxkzh"/>
|
|
|
+ <result property="gczyxkzh" column="gczyxkzh"/>
|
|
|
+ <result property="gczyjb" column="gczyjb"/>
|
|
|
+ <result property="postponeNumber" column="postpone_number"/>
|
|
|
+ <result property="userMg" column="user_mg"/>
|
|
|
+ <result property="userUnit" column="user_unit"/>
|
|
|
+ <result property="tag" column="tag"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTJobticketVo">
|
|
|
- select d.id, d.plant_code, d.kprq, d.qfsj, d.qfbz, d.qfr, d.xpxp, d.yqxkzh, d.whgzxkzh, d.dhzyxkzh, d.hpjb, d.xzkjxkzh, d.content, d.byclxr, d.sgdw, d.lxr, d.lxdh, d.xpsj, d.zypzt, d.jccdr, d.wcxxbh, d.wcxzt, d.cxsj,
|
|
|
- d.mbzyxkzh,d.gczyxkzh,d.gczyjb,d.postpone_number,d.user_mg,d.user_unit, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks,d.tag ,s.dept_name from t_jobticket d
|
|
|
- left join sys_dept s on s.dept_id = d.dept_id
|
|
|
+ select d.id,
|
|
|
+ d.plant_code,
|
|
|
+ d.kprq,
|
|
|
+ d.qfsj,
|
|
|
+ d.qfbz,
|
|
|
+ d.qfr,
|
|
|
+ d.xpxp,
|
|
|
+ d.yqxkzh,
|
|
|
+ d.whgzxkzh,
|
|
|
+ d.dhzyxkzh,
|
|
|
+ d.hpjb,
|
|
|
+ d.xzkjxkzh,
|
|
|
+ d.content,
|
|
|
+ d.byclxr,
|
|
|
+ d.sgdw,
|
|
|
+ d.lxr,
|
|
|
+ d.lxdh,
|
|
|
+ d.xpsj,
|
|
|
+ d.zypzt,
|
|
|
+ d.jccdr,
|
|
|
+ d.wcxxbh,
|
|
|
+ d.wcxzt,
|
|
|
+ d.cxsj,
|
|
|
+ d.mbzyxkzh,
|
|
|
+ d.gczyxkzh,
|
|
|
+ d.gczyjb,
|
|
|
+ d.postpone_number,
|
|
|
+ d.user_mg,
|
|
|
+ d.user_unit,
|
|
|
+ d.del_flag,
|
|
|
+ d.creater_code,
|
|
|
+ d.createdate,
|
|
|
+ d.updater_code,
|
|
|
+ d.updatedate,
|
|
|
+ d.dept_id,
|
|
|
+ d.remarks,
|
|
|
+ d.tag,
|
|
|
+ s.dept_name
|
|
|
+ from t_jobticket d
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTJobticketList" parameterType="TJobticket" resultMap="TJobticketResult">
|
|
@@ -58,30 +95,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
|
<if test="startDate != null ">and kprq <![CDATA[>=]]> #{startDate}</if>
|
|
|
<if test="endDate != null">and kprq <![CDATA[<=]]>#{endDate}</if>
|
|
|
- <if test="qfbz != null and qfbz != ''"> and qfbz = #{qfbz}</if>
|
|
|
- <if test="xpxp != null and xpxp != ''"> and xpxp = #{xpxp}</if>
|
|
|
- <if test="hpjb != null and hpjb != ''"> and hpjb = #{hpjb}</if>
|
|
|
- <if test="zypzt != null and zypzt != ''"> and zypzt = #{zypzt}</if>
|
|
|
- <if test="xzkjxkzh !=null and xzkjxkzh!=''"> and xzkjxkzh like concat(concat('%',#{xzkjxkzh}),'%')</if>
|
|
|
- <if test="mbzyxkzh != null and mbzyxkzh != ''"> and mbzyxkzh like concat(concat('%',#{mbzyxkzh}),'%')</if>
|
|
|
- <if test="gczyxkzh != null and gczyxkzh != ''"> and gczyxkzh like concat(concat('%',#{gczyxkzh}),'%')</if>
|
|
|
- <if test="content != null and content != ''"> and content like concat(concat('%',#{content}),'%')</if>
|
|
|
- <if test="whgzxkzh != null and whgzxkzh != ''"> and whgzxkzh like concat(concat('%',#{whgzxkzh}),'%')</if>
|
|
|
- <if test="yqxkzh != null and yqxkzh != ''"> and yqxkzh like concat(concat('%',#{yqxkzh}),'%')</if>
|
|
|
- <if test="dhzyxkzh != null and dhzyxkzh != ''"> and dhzyxkzh like concat(concat('%',#{dhzyxkzh}),'%')</if>
|
|
|
- <if test="byclxr != null and byclxr != ''"> and byclxr like concat(concat('%',#{byclxr}),'%')</if>
|
|
|
- <if test="sgdw != null and sgdw != ''"> and sgdw like concat(concat('%',#{sgdw}),'%')</if>
|
|
|
- <if test="jccdr != null and jccdr != ''"> and jccdr like concat(concat('%',#{jccdr}),'%')</if>
|
|
|
- <if test="wcxxbh != null and wcxxbh != ''"> and wcxxbh like concat(concat('%',#{wcxxbh}),'%')</if>
|
|
|
- <if test="wcxzt != null and wcxzt != ''"> and wcxzt like concat(concat('%',#{wcxzt}),'%')</if>
|
|
|
- <if test="xpsj != null "> and xpsj <![CDATA[=]]> #{xpsj}</if>
|
|
|
- <if test="cxsj != null "> and cxsj <![CDATA[=]]> #{cxsj}</if>
|
|
|
- <if test="gczyjb != null and gczyjb != ''"> and gczyjb = #{gczyjb}</if>
|
|
|
- <if test="postponeNumber != null "> and postpone_number = #{postponeNumber}</if>
|
|
|
- <if test="userMg != null "> and user_mg = #{userMg}</if>
|
|
|
- <if test="userUnit != null "> and user_unit = #{userUnit}</if>
|
|
|
- <if test="tag != null and tag != '' "> and tag = #{tag}</if>
|
|
|
- and d.del_flag = 0 and xpxp = 10
|
|
|
+ <if test="qfbz != null and qfbz != ''">and qfbz = #{qfbz}</if>
|
|
|
+ <if test="xpxp != null and xpxp != ''">and xpxp = #{xpxp}</if>
|
|
|
+ <if test="hpjb != null and hpjb != ''">and hpjb = #{hpjb}</if>
|
|
|
+ <if test="zypzt != null and zypzt != ''">and zypzt = #{zypzt}</if>
|
|
|
+ <if test="xzkjxkzh !=null and xzkjxkzh!=''">and xzkjxkzh like concat(concat('%',#{xzkjxkzh}),'%')</if>
|
|
|
+ <if test="mbzyxkzh != null and mbzyxkzh != ''">and mbzyxkzh like concat(concat('%',#{mbzyxkzh}),'%')</if>
|
|
|
+ <if test="gczyxkzh != null and gczyxkzh != ''">and gczyxkzh like concat(concat('%',#{gczyxkzh}),'%')</if>
|
|
|
+ <if test="content != null and content != ''">and content like concat(concat('%',#{content}),'%')</if>
|
|
|
+ <if test="whgzxkzh != null and whgzxkzh != ''">and whgzxkzh like concat(concat('%',#{whgzxkzh}),'%')</if>
|
|
|
+ <if test="yqxkzh != null and yqxkzh != ''">and yqxkzh like concat(concat('%',#{yqxkzh}),'%')</if>
|
|
|
+ <if test="dhzyxkzh != null and dhzyxkzh != ''">and dhzyxkzh like concat(concat('%',#{dhzyxkzh}),'%')</if>
|
|
|
+ <if test="byclxr != null and byclxr != ''">and byclxr like concat(concat('%',#{byclxr}),'%')</if>
|
|
|
+ <if test="sgdw != null and sgdw != ''">and sgdw like concat(concat('%',#{sgdw}),'%')</if>
|
|
|
+ <if test="jccdr != null and jccdr != ''">and jccdr like concat(concat('%',#{jccdr}),'%')</if>
|
|
|
+ <if test="wcxxbh != null and wcxxbh != ''">and wcxxbh like concat(concat('%',#{wcxxbh}),'%')</if>
|
|
|
+ <if test="wcxzt != null and wcxzt != ''">and wcxzt like concat(concat('%',#{wcxzt}),'%')</if>
|
|
|
+ <if test="xpsj != null ">and xpsj <![CDATA[=]]> #{xpsj}</if>
|
|
|
+ <if test="cxsj != null ">and cxsj <![CDATA[=]]> #{cxsj}</if>
|
|
|
+ <if test="gczyjb != null and gczyjb != ''">and gczyjb = #{gczyjb}</if>
|
|
|
+ <if test="postponeNumber != null ">and postpone_number = #{postponeNumber}</if>
|
|
|
+ <if test="userMg != null ">and user_mg = #{userMg}</if>
|
|
|
+ <if test="userUnit != null ">and user_unit = #{userUnit}</if>
|
|
|
+ <if test="tag != null and tag != '' ">and tag = #{tag}</if>
|
|
|
+ <choose>
|
|
|
+ <when test="xpxp == '12'">
|
|
|
+ and xpxp = #{xpxp}
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and xpxp = 10
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ and d.del_flag = 0
|
|
|
</where>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScope}
|
|
@@ -91,11 +136,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectTJobticketChildren" parameterType="TJobticket" resultMap="TJobticketResult">
|
|
|
<include refid="selectTJobticketVo"/>
|
|
|
<where>
|
|
|
- <if test="whgzxkzh != null and whgzxkzh != ''"> and whgzxkzh = #{whgzxkzh}</if>
|
|
|
- <if test="dhzyxkzh != null and dhzyxkzh != ''"> and dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
- <if test="xzkjxkzh != null and xzkjxkzh != ''"> and xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
- <if test="mbzyxkzh != null and mbzyxkzh != ''"> and mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
- <if test="gczyxkzh != null and gczyxkzh != ''"> and gczyxkzh = #{gczyxkzh}</if>
|
|
|
+ <if test="whgzxkzh != null and whgzxkzh != ''">and whgzxkzh = #{whgzxkzh}</if>
|
|
|
+ <if test="dhzyxkzh != null and dhzyxkzh != ''">and dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
+ <if test="xzkjxkzh != null and xzkjxkzh != ''">and xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
+ <if test="mbzyxkzh != null and mbzyxkzh != ''">and mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
+ <if test="gczyxkzh != null and gczyxkzh != ''">and gczyxkzh = #{gczyxkzh}</if>
|
|
|
and d.del_flag = 0 and xpxp = 12
|
|
|
</where>
|
|
|
order by d.kprq
|
|
@@ -107,28 +152,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询相同数据 sql-->
|
|
|
- <select id="selectTJobticketSameData" parameterType="TJobticket" resultType ="java.lang.Integer">
|
|
|
- select count(*) from t_jobticket d <where>
|
|
|
- <if test="xzkjxkzh != null and xzkjxkzh != ''"> and xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
- <if test="mbzyxkzh != null and mbzyxkzh != ''"> and mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
- <if test="gczyxkzh != null and gczyxkzh != ''"> and gczyxkzh = #{gczyxkzh}</if>
|
|
|
- <if test="whgzxkzh != null and whgzxkzh != ''"> and whgzxkzh = #{whgzxkzh}</if>
|
|
|
- <if test="dhzyxkzh != null and dhzyxkzh != ''"> and dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
- <if test="yqxkzh != null and yqxkzh != ''"> and yqxkzh = #{yqxkzh}</if>
|
|
|
- and d.del_flag = 0
|
|
|
- and d.xpxp = #{xpxp}
|
|
|
- </where>
|
|
|
+ <select id="selectTJobticketSameData" parameterType="TJobticket" resultType="java.lang.Integer">
|
|
|
+ select count(*) from t_jobticket d
|
|
|
+ <where>
|
|
|
+ <if test="xzkjxkzh != null and xzkjxkzh != ''">and xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
+ <if test="mbzyxkzh != null and mbzyxkzh != ''">and mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
+ <if test="gczyxkzh != null and gczyxkzh != ''">and gczyxkzh = #{gczyxkzh}</if>
|
|
|
+ <if test="whgzxkzh != null and whgzxkzh != ''">and whgzxkzh = #{whgzxkzh}</if>
|
|
|
+ <if test="dhzyxkzh != null and dhzyxkzh != ''">and dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
+ <if test="yqxkzh != null and yqxkzh != ''">and yqxkzh = #{yqxkzh}</if>
|
|
|
+ and d.del_flag = 0
|
|
|
+ and d.xpxp = #{xpxp}
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
<select id="countXp" parameterType="TJobticket" resultType="int">
|
|
|
- select count(1) from t_jobticket d
|
|
|
+ select count(1) from t_jobticket d
|
|
|
<where>
|
|
|
- <if test="whgzxkzh != null and whgzxkzh != ''"> and d.whgzxkzh = #{whgzxkzh}</if>
|
|
|
- <if test="dhzyxkzh != null and dhzyxkzh != ''"> and d.dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
- <if test="xzkjxkzh != null and xzkjxkzh != ''"> and d.xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
- <if test="mbzyxkzh != null and mbzyxkzh != ''"> and d.mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
- <if test="gczyxkzh != null and gczyxkzh != ''"> and d.gczyxkzh = #{gczyxkzh}</if>
|
|
|
- <if test="deptId != null "> and d.dept_id = #{deptId}</if>
|
|
|
+ <if test="whgzxkzh != null and whgzxkzh != ''">and d.whgzxkzh = #{whgzxkzh}</if>
|
|
|
+ <if test="dhzyxkzh != null and dhzyxkzh != ''">and d.dhzyxkzh = #{dhzyxkzh}</if>
|
|
|
+ <if test="xzkjxkzh != null and xzkjxkzh != ''">and d.xzkjxkzh = #{xzkjxkzh}</if>
|
|
|
+ <if test="mbzyxkzh != null and mbzyxkzh != ''">and d.mbzyxkzh = #{mbzyxkzh}</if>
|
|
|
+ <if test="gczyxkzh != null and gczyxkzh != ''">and d.gczyxkzh = #{gczyxkzh}</if>
|
|
|
+ <if test="deptId != null ">and d.dept_id = #{deptId}</if>
|
|
|
and d.del_flag = 0 and d.xpxp = 12 and d.zypzt != 20
|
|
|
</where>
|
|
|
</select>
|
|
@@ -176,7 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userMg != null">user_mg,</if>
|
|
|
<if test="userUnit != null">user_unit,</if>
|
|
|
<if test="tag != null">tag,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
|
<if test="plantCode != null and plantCode != ''">#{plantCode},</if>
|
|
@@ -215,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="userMg != null">#{userMg},</if>
|
|
|
<if test="userUnit != null">#{userUnit},</if>
|
|
|
<if test="tag != null">#{tag},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateTJobticket" parameterType="TJobticket">
|
|
@@ -262,7 +308,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<update id="deleteTJobticketById" parameterType="Long">
|
|
|
- update t_jobticket set del_flag = 2 where id = #{id}
|
|
|
+ update t_jobticket
|
|
|
+ set del_flag = 2
|
|
|
+ where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
<update id="deleteTJobticketByIds" parameterType="String">
|