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.
69 lines
3.0 KiB
69 lines
3.0 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.biutag.lan.mapper.WorkMapper"> |
|
|
|
<select id="selectPageBy" resultType="com.biutag.lan.domain.vo.WorkVo"> |
|
select w.id, |
|
w.contact_name, |
|
w.contact_phone, |
|
w.contact_id_card, |
|
w.content, |
|
w.source, |
|
w.mail_time, |
|
w.mail_id, |
|
w.work_type, |
|
w.flow_name, |
|
m.mail_state, |
|
m.mail_category, |
|
m.mail_level, |
|
m.three_dept_id, |
|
m.three_dept_name, |
|
m.flow_key, |
|
m.mail_labels, |
|
m.countersign_total, |
|
m.countersign_completed, |
|
m.flow_name mail_flow_name, |
|
m.current_operator, |
|
f.limited_time, |
|
m.flow_limited_last_handler_time, |
|
w.create_time |
|
from work w |
|
left join mail m on w.mail_id = m.id |
|
left join flow_node f on m.flow_key = f.key |
|
${ew.getCustomSqlSegment} |
|
</select> |
|
|
|
<select id="selectCountByFlowKey" resultType="int"> |
|
select count(w.id) from work w left join mail m on w.mail_id = m.id where m.flow_key in |
|
<foreach collection="flowKeys" item="flow_key" index="index" |
|
open="(" close=")" separator=","> |
|
#{flow_key} |
|
</foreach> |
|
and w.sign_dept_id = #{deptId} |
|
</select> |
|
|
|
<select id="selectQueryPage" resultType="com.biutag.lan.domain.vo.QueryMailVo"> |
|
select distinct m.contact_name,m.contact_phone,m.contact_id_card,m.contact_sex,m.content,m.source,m.mail_time,m.id,m.mail_state, |
|
m.mail_category ,m.mail_level,m.three_dept_id,m.three_dept_name,m.flow_key,m.flow_before_name,m.mail_labels,m.flow_name, |
|
f.limited_time - ROUND(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) flow_limited_remaining_time |
|
from mail m |
|
left join work w on m.id = w.mail_id |
|
left join flow_node f on m.flow_key = f.key |
|
${ew.getCustomSqlSegment} |
|
</select> |
|
|
|
<select id="selectDissatisfiedPage" resultType="com.biutag.lan.domain.vo.QueryMailVo"> |
|
select distinct m.contact_name,m.contact_phone,m.contact_id_card,m.contact_sex,m.content,m.source,m.mail_time,m.id,m.mail_state, |
|
m.mail_category ,m.mail_level,m.three_dept_id,m.three_dept_name,m.flow_key,m.flow_before_name,m.mail_labels,m.flow_name, |
|
ma.appeal_state,ma.handling_dept, |
|
f.limited_time - ROUND(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) flow_limited_remaining_time |
|
from mail m |
|
left join mail_appeal ma on ma.mail_id = m.id |
|
left join work w on m.id = w.mail_id |
|
left join flow_node f on m.flow_key = f.key |
|
${ew.getCustomSqlSegment} |
|
</select> |
|
|
|
</mapper>
|
|
|