1.来函信息展示,新增,修改,审核,取消审核,删除,条件查询
2.翻译配置文件中添加来函页面的中英翻译
This commit is contained in:
272
src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml
Normal file
272
src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml
Normal file
@@ -0,0 +1,272 @@
|
||||
<?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.nis.web.dao.configuration.RequestInfoDao">
|
||||
<resultMap id="BaseResultMap" type="com.nis.domain.configuration.RequestInfo">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="request_number" jdbcType="VARCHAR" property="requestNumber" />
|
||||
<result column="request_org" jdbcType="VARCHAR" property="requestOrg" />
|
||||
<result column="request_time" jdbcType="DATE" property="requestTime" />
|
||||
<result column="request_title" jdbcType="VARCHAR" property="requestTitle" />
|
||||
<result column="request_content" jdbcType="VARCHAR" property="requestContent" />
|
||||
<result column="is_valid" jdbcType="INTEGER" property="isValid" />
|
||||
<result column="is_audit" jdbcType="INTEGER" property="isAudit" />
|
||||
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
|
||||
<result column="create_time" jdbcType="DATE" property="createTime" />
|
||||
<result column="editor_id" jdbcType="INTEGER" property="editorId" />
|
||||
<result column="edit_time" jdbcType="DATE" property="editTime" />
|
||||
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
|
||||
<result column="audit_time" jdbcType="DATE" property="auditTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, request_number, request_org, request_time, request_title, request_content, is_valid,
|
||||
is_audit, creator_id, create_time, editor_id, edit_time, auditor_id, audit_time
|
||||
</sql>
|
||||
<!-- 查询列表 -->
|
||||
<select id="findRequestInfo" resultMap="BaseResultMap">
|
||||
select
|
||||
r.id AS id,
|
||||
r.request_number AS requestNumber,
|
||||
r.request_org AS requestOrg,
|
||||
r.request_time AS requestTime,
|
||||
r.request_title AS requestTitle,
|
||||
r.request_content AS requestContent,
|
||||
r.is_valid AS isValid,
|
||||
r.is_audit AS isAudit,
|
||||
s.name AS creatorName,
|
||||
r.create_time AS createTime,
|
||||
u.name AS editorName,
|
||||
r.edit_time AS editTime,
|
||||
e.name AS currentName,
|
||||
r.audit_time AS auditTime
|
||||
from request_info r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user u on r.editor_id=u.id
|
||||
left join sys_user e on r.auditor_id=e.id
|
||||
where r.is_valid=1 and r.is_audit !=3
|
||||
<if test="requestTitle != null and requestTitle != ''">
|
||||
AND r.request_title like
|
||||
<if test="dbName == 'mysql'">CONCAT('%',#{requestTitle}, '%')</if>
|
||||
</if>
|
||||
<if test="requestContent != null and requestContent != ''">
|
||||
AND r.request_content like
|
||||
<if test="dbName == 'mysql'">CONCAT('%',#{requestContent},'%')</if>
|
||||
</if>
|
||||
<if test="requestNumber != null and requestNumber != ''">
|
||||
AND r.request_number=#{requestNumber}
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.is_audit=${isAudit}
|
||||
</if>
|
||||
<if test=" timeType = 'requestTime' and beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
|
||||
AND r.request_time between #{beginDate} and #{endDate}
|
||||
</if>
|
||||
<if test="timeType = 'createTime' and beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
|
||||
AND (r.create_time between #{beginDate} and #{endDate}) or (r.audit_time between #{beginDate} and #{endDate})
|
||||
</if>
|
||||
</select>
|
||||
<!-- 根据来函号查询 -->
|
||||
<select id="getRequestInfoByRequestNumber" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from request_info
|
||||
where request_number = #{requestNumber,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<!-- 根据来id查询 -->
|
||||
<select id="getRequestInfoById" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from request_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<!-- 新增 -->
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.RequestInfo">
|
||||
insert into request_info (
|
||||
request_number,
|
||||
request_org,
|
||||
request_time,
|
||||
request_title,
|
||||
request_content,
|
||||
is_valid,
|
||||
is_audit,
|
||||
creator_id,
|
||||
create_time,
|
||||
editor_id,
|
||||
edit_time,
|
||||
auditor_id,
|
||||
audit_time
|
||||
)
|
||||
values (#{requestNumber,jdbcType=VARCHAR}, #{requestOrg,jdbcType=VARCHAR},
|
||||
#{requestTime,jdbcType=DATE}, #{requestTitle,jdbcType=VARCHAR}, #{requestContent,jdbcType=VARCHAR},
|
||||
#{isValid,jdbcType=INTEGER}, #{isAudit,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=DATE}, #{editorId,jdbcType=INTEGER}, #{editTime,jdbcType=DATE},
|
||||
#{auditorId,jdbcType=INTEGER}, #{auditTime,jdbcType=DATE})
|
||||
</insert>
|
||||
<!--修改 -->
|
||||
<update id="update" parameterType="com.nis.domain.configuration.RequestInfo">
|
||||
update request_info
|
||||
<set>
|
||||
<if test="requestNumber != null">
|
||||
request_number = #{requestNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestOrg != null">
|
||||
request_org = #{requestOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestTime != null">
|
||||
request_time = #{requestTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="requestTitle != null">
|
||||
request_title = #{requestTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestContent != null">
|
||||
request_content = #{requestContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
edit_time = #{editTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
audit_time = #{auditTime,jdbcType=DATE},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<!--删除 -->
|
||||
<update id="delete" parameterType="com.nis.domain.configuration.RequestInfo">
|
||||
update request_info
|
||||
<set>
|
||||
<if test="isValid != null and id != null">
|
||||
is_valid=#{isValid}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT} and is_audit !=1
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<insert id="insertSelective" parameterType="com.nis.domain.configuration.RequestInfo">
|
||||
insert into request_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="requestNumber != null">
|
||||
request_number,
|
||||
</if>
|
||||
<if test="requestOrg != null">
|
||||
request_org,
|
||||
</if>
|
||||
<if test="requestTime != null">
|
||||
request_time,
|
||||
</if>
|
||||
<if test="requestTitle != null">
|
||||
request_title,
|
||||
</if>
|
||||
<if test="requestContent != null">
|
||||
request_content,
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
is_valid,
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
is_audit,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
editor_id,
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
edit_time,
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
auditor_id,
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
audit_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="requestNumber != null">
|
||||
#{requestNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestOrg != null">
|
||||
#{requestOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestTime != null">
|
||||
#{requestTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="requestTitle != null">
|
||||
#{requestTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="requestContent != null">
|
||||
#{requestContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
#{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
#{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null">
|
||||
#{editTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null">
|
||||
#{auditTime,jdbcType=DATE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.nis.domain.configuration.RequestInfo">
|
||||
update request_info
|
||||
set request_number = #{requestNumber,jdbcType=VARCHAR},
|
||||
request_org = #{requestOrg,jdbcType=VARCHAR},
|
||||
request_time = #{requestTime,jdbcType=DATE},
|
||||
request_title = #{requestTitle,jdbcType=VARCHAR},
|
||||
request_content = #{requestContent,jdbcType=VARCHAR},
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
create_time = #{createTime,jdbcType=DATE},
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
edit_time = #{editTime,jdbcType=DATE},
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{auditTime,jdbcType=DATE}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user