Browse Source

值班管理按sort排序

master
laishajiang 2 years ago
parent
commit
b4cfd0f344
  1. 4
      mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

4
mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

@ -178,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
limit 1 limit 1
</select> </select>
<select id="getToDayDuty" resultType="com.biutag.entity.system.Duty"> <select id="getToDayDuty" resultType="com.biutag.entity.system.Duty">
select distinct on (a.depart_id, a.emp_no) a.* from duty a select distinct on (a.depart_id, a.emp_no,b.sort) a.* from duty a
inner join dept b on a.depart_id=b.id where inner join dept b on a.depart_id=b.id where
now() BETWEEN a.start_time and (to_date(a.end_time) + interval '1 D') now() BETWEEN a.start_time and (to_date(a.end_time) + interval '1 D')
<if test="depatType!=null and depatType!=''"> <if test="depatType!=null and depatType!=''">
@ -187,7 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId!=null and deptId!=''"> <if test="deptId!=null and deptId!=''">
and b.pid=#{deptId} and b.pid=#{deptId}
</if> </if>
order by a.depart_id desc order by b.sort asc
</select> </select>
<select id="mapCountyData" resultType="java.util.Map" parameterType="java.lang.String"> <select id="mapCountyData" resultType="java.util.Map" parameterType="java.lang.String">
select d.name, a.id, select d.name, a.id,

Loading…
Cancel
Save