兴安访客小程序访客改造
This commit is contained in:
@@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="openid" column="openid" />
|
||||
<result property="isExamine" column="is_examine" />
|
||||
<result property="carryStuffExamine" column="carry_stuff_examine" />
|
||||
<association property="branch" column="branch_id" javaType="SysBranch" resultMap="branchResult" />
|
||||
</resultMap>
|
||||
|
||||
@@ -42,7 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectSysPeopleVo">
|
||||
select p.id, p.name, p.phone, p.sex, p.avatar, p.branch_id, p.position, p.idcard, p.car_no,p.door_no, p.guid, p.face_guid, p.openid, b.is_examine,
|
||||
p.user_id, p.remark, p.create_by, p.create_time, p.update_by, p.update_time ,b.name branchName,p.gh,p.fingerprint,p.join_time,p.down,p.del_flag,b.rule_id
|
||||
p.user_id, p.remark, p.create_by, p.create_time, p.update_by, p.update_time ,b.name branchName,p.gh,p.fingerprint,p.join_time,p.down,p.del_flag,b.rule_id,
|
||||
p.carry_stuff_examine
|
||||
from sys_people p left join sys_branch b on p.branch_id=b.id
|
||||
left join sys_user u on u.user_id = p.user_id
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
@@ -103,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
<if test="sysPeople.delFlag != null"> and p.del_flag = #{sysPeople.delFlag}</if>
|
||||
<if test="sysPeople.branchParent != null and sysPeople.branchParent != ''"> and b.id like concat(#{sysPeople.branchParent}, '%')</if>
|
||||
<if test="sysPeople.carryStuffExamine != null and sysPeople.carryStuffExamine != ''"> and p.carry_stuff_examine = #{sysPeople.carryStuffExamine}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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.VisCarryStuffMapper">
|
||||
|
||||
<resultMap type="VisCarryStuffVo" id="VisitorResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<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="reviewer1" column="reviewer1"/>
|
||||
<result property="reviewer2" column="reviewer2"/>
|
||||
<result property="reviewer3" column="reviewer3"/>
|
||||
<result property="examineState" column="examine_state"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="vehicle" column="vehicle"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectVisCarryStuffVo">
|
||||
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
|
||||
from vis_carry_stuff_out
|
||||
</sql>
|
||||
|
||||
<select id="selectList" resultType="com.dcsoft.system.visitor.domain.VisCarryStuffVo">
|
||||
<include refid="selectVisCarryStuffVo"/>
|
||||
<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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVisStuffById" resultType="com.dcsoft.system.visitor.domain.VisCarryStuffVo">
|
||||
<include refid="selectVisCarryStuffVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectStuffCheckCode" resultType="com.dcsoft.system.visitor.domain.CheckCodeVo">
|
||||
select
|
||||
code
|
||||
from vis_check_code
|
||||
where stuff_id = #{stuffId}
|
||||
order by created_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertVisCarryStuff" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into vis_carry_stuff_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="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="reviewer1 != null">reviewer1,</if>
|
||||
<if test="reviewer2 != null">reviewer2,</if>
|
||||
<if test="reviewer3 != null">reviewer3,</if>
|
||||
<if test="examineState != null and examineState != ''">examine_state,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="vehicle != null">vehicle,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="name != null and name != ''">#{name},</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="reviewer1 != null">#{reviewer1},</if>
|
||||
<if test="reviewer2 != null">#{reviewer2},</if>
|
||||
<if test="reviewer3 != null">#{reviewer3},</if>
|
||||
<if test="examineState != null and examineState != ''">#{examineState},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="vehicle != null">#{vehicle},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -152,7 +152,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
vvr.created_by,
|
||||
vvr.created_time,
|
||||
vvr.updated_by,
|
||||
vvr.updated_time
|
||||
vvr.updated_time,
|
||||
su.dept_id
|
||||
from sys_user su left join vis_visitor_register vvr on vvr.user_id = su.user_id
|
||||
where su.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
@@ -380,10 +380,10 @@
|
||||
</if>)
|
||||
</insert>
|
||||
<insert id="saveVisitorReviewProcessList">
|
||||
insert into vis_visitor_review_process (id, visitor_id, reviewer, state)
|
||||
insert into vis_visitor_review_process (id, visitor_id, reviewer, state, reject_reason)
|
||||
VALUES
|
||||
<foreach collection="list" item="i" index="index" separator=",">
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state})
|
||||
(REPLACE(uuid(), '-', ''), #{i.id}, #{i.reviewer}, #{i.state}, #{i.rejectReason})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -514,6 +514,9 @@
|
||||
<update id="updateVisitorReviewProcess">
|
||||
update vis_visitor_review_process
|
||||
set state = #{state}
|
||||
<if test="rejectReason != null and rejectReason != ''">
|
||||
,reject_reason = #{rejectReason}
|
||||
</if>
|
||||
where visitor_id = #{id}
|
||||
<if test="reviewer != null and reviewer != ''">
|
||||
and reviewer = #{reviewer}
|
||||
@@ -868,7 +871,8 @@
|
||||
<select id="queryReviewProcess" resultType="com.dcsoft.system.visitor.domain.Visitor">
|
||||
select
|
||||
reviewer,
|
||||
state
|
||||
state,
|
||||
reject_reason
|
||||
from vis_visitor_review_process
|
||||
where visitor_id = #{id}
|
||||
<if test="position != null and position != ''">
|
||||
|
||||
Reference in New Issue
Block a user