兴安出门证申请开发
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.dcsoft.system.visitor.mapper.VisCarryStuffMapper">
|
||||
|
||||
<resultMap type="VisCarryStuffVo" id="VisitorResult">
|
||||
<resultMap type="VisExitOutVo" id="VisitorResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="exitPermitNo" column="exit_permit_no"/>
|
||||
<result property="peopleId" column="people_id"/>
|
||||
<result property="visitingUnit" column="visiting_unit"/>
|
||||
<result property="stuffName" column="stuff_name"/>
|
||||
<result property="stuffType" column="stuff_type"/>
|
||||
<result property="stuffNumber" column="stuff_number"/>
|
||||
<result property="imgUrls" column="img_urls"/>
|
||||
<result property="visTime" column="vis_time"/>
|
||||
<result property="carNo" column="car_no"/>
|
||||
<result property="reviewer1" column="reviewer1"/>
|
||||
<result property="reviewer2" column="reviewer2"/>
|
||||
<result property="reviewer3" column="reviewer3"/>
|
||||
@@ -24,75 +24,101 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="vehicle" column="vehicle"/>
|
||||
<result property="currentNode" column="current_node"/>
|
||||
<!-- <association property="examine" column="id" javaType="VisStuffInfoVo" resultMap="StuffResult"/>-->
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisCarryStuffVo">
|
||||
<resultMap type="VisStuffInfoVo" id="StuffResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="exitId" column="exit_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="purpose" column="purpose"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="imgUrls" column="img_urls"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="isBack" column="is_back"/>
|
||||
<result property="backTime" column="back_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="backName" column="back_name"/>
|
||||
<result property="backPurpose" column="back_purpose"/>
|
||||
<result property="backType" column="back_type"/>
|
||||
<result property="backModel" column="back_model"/>
|
||||
<result property="backUnit" column="back_unit"/>
|
||||
<result property="backNumber" column="back_number"/>
|
||||
<result property="backImgUrls" column="back_img_urls"/>
|
||||
<result property="backRemark" column="back_remark"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisExitOutVo">
|
||||
select distinct
|
||||
id,
|
||||
name,
|
||||
user_id,
|
||||
visiting_unit,
|
||||
stuff_name,
|
||||
stuff_type,
|
||||
stuff_number,
|
||||
img_urls,
|
||||
vis_time,
|
||||
reviewer1,
|
||||
reviewer2,
|
||||
reviewer3,
|
||||
examine_state,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
vehicle,
|
||||
current_node
|
||||
from vis_carry_stuff_out
|
||||
e.id,
|
||||
e.user_id,
|
||||
e.name,
|
||||
e.phone,
|
||||
e.`exit_permit_no`,
|
||||
e.`people_id`,
|
||||
e.visiting_unit,
|
||||
e.`car_no`,
|
||||
e.vis_time,
|
||||
e.reviewer1,
|
||||
e.reviewer2,
|
||||
e.reviewer3,
|
||||
e.examine_state,
|
||||
e.create_by,
|
||||
e.create_time,
|
||||
e.update_by,
|
||||
e.update_time,
|
||||
e.vehicle,
|
||||
e.current_node
|
||||
from vis_exit_out e
|
||||
</sql>
|
||||
|
||||
<update id="updateStaff">
|
||||
update vis_carry_stuff_out
|
||||
update vis_exit_out
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="name != null and name != ''"> `name` = #{name},</if>
|
||||
<if test="phone != null and phone != ''"> `phone` = #{phone},</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''"> `exit_permit_no` = #{exitPermitNo},</if>
|
||||
<if test="peopleId != null and peopleId != ''"> `people_id` = #{peopleId},</if>
|
||||
<if test="visitingUnit != null and visitingUnit != ''">visiting_unit = #{visitingUnit},</if>
|
||||
<if test="stuffName != null and stuffName != ''">stuff_name = #{stuffName},</if>
|
||||
<if test="stuffType != null and stuffType != ''">stuff_type = #{stuffType},</if>
|
||||
<if test="stuffNumber != null and stuffNumber != ''">stuff_number = #{stuffNumber},</if>
|
||||
<if test="imgUrls != null and imgUrls != ''">img_urls = #{imgUrls},</if>
|
||||
<if test="visTime != null">vis_time = #{visTime},</if>
|
||||
<if test="vehicle != null and vehicle != ''">vehicle = #{vehicle},</if>
|
||||
<if test="carNo != null and carNo != ''">car_no = #{carNo},</if>
|
||||
<if test="reviewer1 != null">reviewer1 = #{reviewer1},</if>
|
||||
<if test="reviewer2 != null">reviewer2 = #{reviewer2},</if>
|
||||
<if test="reviewer3 != null">reviewer3 = #{reviewer3},</if>
|
||||
<if test="examineState != null and examineState != ''">examine_state = #{examineState},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="vehicle != null">vehicle = #{vehicle},</if>
|
||||
<if test="currentNode != null">current_node = #{currentNode},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisCarryStuffVo">
|
||||
<include refid="selectVisCarryStuffVo"/>
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<include refid="selectVisExitOutVo"/>
|
||||
<where>
|
||||
<if test="id != null">and id = #{id}</if>
|
||||
<if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and user_id = #{userId}</if>
|
||||
<if test="examineState != null and examineState != 3">and examine_state = #{examineState}</if>
|
||||
<if test="id != null">and e.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and e.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and e.create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and e.user_id = #{userId}</if>
|
||||
<if test="examineState != null and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisStuffById" resultType="com.dcsoft.system.visitor.domain.VisCarryStuffVo">
|
||||
<include refid="selectVisCarryStuffVo"/>
|
||||
where id = #{id}
|
||||
<select id="selectVisStuffById" resultType="com.dcsoft.system.visitor.domain.VisExitOutVo">
|
||||
<include refid="selectVisExitOutVo"/>
|
||||
where e.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectStuffCheckCode" resultType="com.dcsoft.system.visitor.domain.CheckCodeVo">
|
||||
select
|
||||
code
|
||||
from vis_check_code
|
||||
where stuff_id = #{stuffId}
|
||||
where exit_id = #{exitId}
|
||||
order by created_time desc
|
||||
limit 1
|
||||
</select>
|
||||
@@ -105,7 +131,7 @@
|
||||
sp.name reviewerName
|
||||
from vis_visitor_review_process vvrp
|
||||
left join sys_people sp on vvrp.reviewer = sp.id and sp.del_flag = '0'
|
||||
where stuff_id = #{id}
|
||||
where exit_id = #{id}
|
||||
order by ifnull(createdTime, 'zzz')
|
||||
</select>
|
||||
|
||||
@@ -115,23 +141,60 @@
|
||||
state,
|
||||
reject_reason
|
||||
from vis_visitor_review_process
|
||||
where stuff_id = #{id}
|
||||
where exit_id = #{id}
|
||||
order by created_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertVisCarryStuff" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_carry_stuff_out
|
||||
<select id="selectStuffList" resultMap="StuffResult">
|
||||
select
|
||||
`id`,
|
||||
`exit_id`,
|
||||
`name`,
|
||||
`purpose`,
|
||||
`type`,
|
||||
`model`,
|
||||
`unit`,
|
||||
`number`,
|
||||
`img_urls`,
|
||||
`remark`,
|
||||
`is_back`,
|
||||
`back_time`,
|
||||
`back_name`,
|
||||
`back_purpose`,
|
||||
`back_type`,
|
||||
`back_model`,
|
||||
`back_unit`,
|
||||
`back_number`,
|
||||
`back_img_urls`,
|
||||
`back_remark`,
|
||||
`sort`
|
||||
from vis_stuff_info
|
||||
<where>
|
||||
<if test="exitId != null">and exit_id = #{exitId}</if>
|
||||
<if test="name != null and name != ''">and `name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and e.create_by = #{createBy}</if>
|
||||
<if test="exitIds != null and exitIds.size() > 0">
|
||||
exit_id in
|
||||
<foreach item="id" collection="exitIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertVisExitOut" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_exit_out
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="name != null and name != ''">`name`,</if>
|
||||
<if test="phone != null and phone != ''">`phone`,</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">`exit_permit_no`,</if>
|
||||
<if test="peopleId != null and peopleId != ''">`people_id`,</if>
|
||||
<if test="visitingUnit != null and visitingUnit != ''">visiting_unit,</if>
|
||||
<if test="stuffName != null and stuffName != ''">stuff_name,</if>
|
||||
<if test="stuffType != null and stuffType != ''">stuff_type,</if>
|
||||
<if test="stuffNumber != null and stuffNumber != ''">stuff_number,</if>
|
||||
<if test="imgUrls != null and imgUrls != ''">img_urls,</if>
|
||||
<if test="visTime != null">vis_time,</if>
|
||||
<if test="carNo != null and carNo != ''">car_no,</if>
|
||||
<if test="reviewer1 != null">reviewer1,</if>
|
||||
<if test="reviewer2 != null">reviewer2,</if>
|
||||
<if test="reviewer3 != null">reviewer3,</if>
|
||||
@@ -144,12 +207,12 @@
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="exitPermitNo != null and exitPermitNo != ''">#{exitPermitNo},</if>
|
||||
<if test="peopleId != null and peopleId != ''">#{peopleId},</if>
|
||||
<if test="visitingUnit != null and visitingUnit != ''">#{visitingUnit},</if>
|
||||
<if test="stuffName != null and stuffName != ''">#{stuffName},</if>
|
||||
<if test="stuffType != null and stuffType != ''">#{stuffType},</if>
|
||||
<if test="stuffNumber != null and stuffNumber != ''">#{stuffNumber},</if>
|
||||
<if test="imgUrls != null and imgUrls != ''">#{imgUrls},</if>
|
||||
<if test="visTime != null">#{visTime},</if>
|
||||
<if test="carNo != null and carNo != ''">#{carNo},</if>
|
||||
<if test="reviewer1 != null">#{reviewer1},</if>
|
||||
<if test="reviewer2 != null">#{reviewer2},</if>
|
||||
<if test="reviewer3 != null">#{reviewer3},</if>
|
||||
@@ -160,7 +223,7 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="saveVisitorReviewProcess">
|
||||
insert into vis_visitor_review_process (id, stuff_id, reviewer
|
||||
insert into vis_visitor_review_process (id, exit_id, reviewer
|
||||
<if test="state != null and state != ''">
|
||||
,state
|
||||
</if>
|
||||
@@ -171,4 +234,53 @@
|
||||
</if>)
|
||||
</insert>
|
||||
|
||||
<insert id="insertVisStuffInfo">
|
||||
INSERT INTO vis_stuff_info (
|
||||
exit_id,
|
||||
`name`,
|
||||
purpose,
|
||||
type,
|
||||
model,
|
||||
unit,
|
||||
number,
|
||||
img_urls,
|
||||
remark,
|
||||
is_back,
|
||||
back_time,
|
||||
back_name,
|
||||
back_purpose,
|
||||
back_type,
|
||||
back_model,
|
||||
back_unit,
|
||||
back_number,
|
||||
back_img_urls,
|
||||
back_remark,
|
||||
sort
|
||||
) VALUES
|
||||
<foreach collection="list" item="i" index="index" separator=",">
|
||||
(
|
||||
#{i.exitId},
|
||||
#{i.name},
|
||||
#{i.purpose},
|
||||
#{i.type},
|
||||
#{i.model},
|
||||
#{i.unit},
|
||||
#{i.number},
|
||||
#{i.imgUrls},
|
||||
#{i.remark},
|
||||
#{i.isBack},
|
||||
#{i.backTime},
|
||||
#{i.backName},
|
||||
#{i.backPurpose},
|
||||
#{i.backType},
|
||||
#{i.backModel},
|
||||
#{i.backUnit},
|
||||
#{i.backNumber},
|
||||
#{i.backImgUrls},
|
||||
#{i.backRemark,},
|
||||
#{i.sort}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?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.dcsoft.system.visitor.mapper.VisExitOutRecordMapper">
|
||||
|
||||
<resultMap type="VisExitOutRecordVo" id="VisitorResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="exitId" column="exit_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisExitOutRecordVo">
|
||||
select distinct
|
||||
r.id,
|
||||
r.exit_id,
|
||||
r.user_id,
|
||||
r.user_name,
|
||||
r.create_by,
|
||||
r.create_time,
|
||||
r.update_by,
|
||||
r.update_time
|
||||
from vis_exit_out_record r
|
||||
</sql>
|
||||
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisExitOutRecordVo">
|
||||
select distinct
|
||||
r.id,
|
||||
r.exit_id,
|
||||
r.user_id,
|
||||
r.create_by,
|
||||
r.create_time,
|
||||
r.update_by,
|
||||
r.update_time,
|
||||
p.name,
|
||||
from vis_exit_out_record r
|
||||
left join sys_people p on r.user_id = p.id
|
||||
<where>
|
||||
<if test="id != null">and r.id = #{id}</if>
|
||||
<if test="name != null and name != ''">and r.`name` like concat('%', #{name}, '%')</if>
|
||||
<if test="createBy != null ">and r.create_by = #{createBy}</if>
|
||||
<if test="userId != null ">and r.user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExitOutRecordById" resultType="com.dcsoft.system.visitor.domain.VisExitOutRecordVo">
|
||||
<include refid="selectVisExitOutRecordVo"/>
|
||||
where r.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExitOutRecord">
|
||||
insert into vis_exit_out_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="exitId != null">`exit_id`,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user