万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

152 lines
6.6 KiB

<?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.flow.mapper.FlowMapper">
<!-- 查询我的请求 -->
<select id="getRequestItemList" parameterType="map" resultType="BizRequestItem">
select top ${pageSize} *
from biz_request_item
where
id not in ( select top ${pageIndex} id from biz_request_item
where delSign=0
<if test="fromBegin!=null and fromBegin!=''">
and <![CDATA[applytime >=#{fromBegin} ]]>
</if>
<if test="toEnd!=null and toEnd!=''">
and <![CDATA[applytime <=#{toEnd} ]]>
</if>
<if test="createBy!=null and createBy!=''">
and <![CDATA[createby = #{createBy} ]]>
</if>
<if test="vague!=null and vague!=''">
and (title like '%'+ #{vague}+'%'
or moduleurl like '%'+ #{vague}+'%'
or modulename like '%'+ #{vague}+'%'
or projectName like '%'+ #{vague}+'%'
or applyuser like '%'+ #{vague}+'%'
or applydepart like '%'+ #{vague}+'%'
or applytime like '%'+ #{vague}+'%'
or instanceid like '%'+ #{vague}+'%'
or createby like '%'+ #{vague}+'%'
or createtime like '%'+ #{vague}+'%')
</if> order by id desc)
and delSign=0
<if test="fromBegin!=null and fromBegin!=''">
and <![CDATA[applytime >=#{fromBegin} ]]>
</if>
<if test="toEnd!=null and toEnd!=''">
and <![CDATA[applytime <=#{toEnd} ]]>
</if>
<if test="createBy!=null and createBy!=''">
and createby = #{createBy}
</if>
<if test="vague!=null and vague!=''">
and (title like '%'+ #{vague}+'%'
or moduleurl like '%'+ #{vague}+'%'
or modulename like '%'+ #{vague}+'%'
or projectName like '%'+ #{vague}+'%'
or applyuser like '%'+ #{vague}+'%'
or applydepart like '%'+ #{vague}+'%'
or applytime like '%'+ #{vague}+'%'
or instanceid like '%'+ #{vague}+'%'
or createby like '%'+ #{vague}+'%'
or createtime like '%'+ #{vague}+'%')
</if>
order by id desc
</select>
<!--查询我的请求条数 -->
<select id="getRequestItemTotal" parameterType="map" resultType="long">
select count(*) from biz_request_item where delSign=0
<if test="fromBegin!=null and fromBegin!=''">
and <![CDATA[applytime >=#{fromBegin} ]]>
</if>
<if test="toEnd!=null and toEnd!=''">
and <![CDATA[applytime <=#{toEnd} ]]>
</if>
<if test="createBy!=null and createBy!=''">
and createby = #{createBy}
</if>
<if test="vague!=null and vague!=''">
and (title like '%'+ #{vague}+'%'
or moduleurl like '%'+ #{vague}+'%'
or modulename like '%'+ #{vague}+'%'
or projectName like '%'+ #{vague}+'%'
or applyuser like '%'+ #{vague}+'%'
or applydepart like '%'+ #{vague}+'%'
or applytime like '%'+ #{vague}+'%'
or instanceid like '%'+ #{vague}+'%'
or createby like '%'+ #{vague}+'%'
or createtime like '%'+ #{vague}+'%')
</if>
</select>
<insert id="add">
insert into biz_request_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="moduleUrl != null and moduleUrl != ''">moduleurl,</if>
<if test="moduleName != null and moduleName != ''">modulename,</if>
<if test="projectName != null and projectName != ''">projectName,</if>
<if test="applyUser != null and applyUser != ''">applyuser,</if>
<if test="applyDepart != null and applyDepart != ''">applydepart,</if>
<if test="applyTime != null and applyTime != ''">applytime,</if>
<if test="instanceId != null and instanceId != ''">instanceid,</if>
<if test="createBy != null and createBy != ''">createby,</if>
<if test="createTime != null and createTime != ''">createtime,</if>
<if test="keyNo != null and keyNo != ''">keyNo,</if>
<if test="delSign != null and delSign != ''">delSign,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="moduleUrl != null and moduleUrl != ''">#{moduleUrl},</if>
<if test="moduleName != null and moduleName != ''">#{moduleName},</if>
<if test="projectName != null and projectName != ''">#{projectName},</if>
<if test="applyUser != null and applyUser != ''">#{applyUser},</if>
<if test="applyDepart != null and applyDepart != ''">#{applyDepart},</if>
<if test="applyTime != null and applyTime != ''">#{applyTime},</if>
<if test="instanceId != null and instanceId != ''">#{instanceId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null and createTime != ''">#{createTime},</if>
<if test="keyNo != null and keyNo != ''">#{keyNo},</if>
<if test="delSign != null and delSign != ''">#{delSign},</if>
</trim>
</insert>
<update id="update">
update biz_request_item
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="moduleUrl != null and moduleUrl != ''">moduleurl = #{moduleUrl},</if>
<if test="moduleName != null and moduleName != ''">modulename = #{moduleName},</if>
<if test="projectName != null and projectName != ''">projectName = #{projectName},</if>
<if test="applyUser != null and applyUser != ''">applyuser = #{applyUser},</if>
<if test="applyDepart != null and applyDepart != ''">applydepart = #{applyDepart},</if>
<if test="applyTime != null and applyTime != ''">applytime = #{applyTime},</if>
<if test="instanceId != null and instanceId != ''">instanceid = #{instanceId},</if>
<if test="delSign != null and delSign != ''">delSign = #{delSign},</if>
</trim>
where id = #{id} and delSign = 0
</update>
<select id="getRequestItemByKeyNo" parameterType="String" resultType="BizRequestItem">
select * from biz_request_item where keyNo = #{keyNo} and delSign = 0
</select>
<delete id="delRequestItem" parameterType="String">
update biz_request_item set delSign=1 where keyNo=#{0} and delSign=0
</delete>
<update id="updateTitleProjectName">
update biz_request_item
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="projectName != null and projectName != ''">projectName = #{projectName},</if>
</trim>
where modulename = #{moduleName} and keyNo = #{keyNo} and delSign = 0
</update>
</mapper>