16 changed files with 334 additions and 37 deletions
@ -1,10 +1,16 @@ |
|||
package com.ccsens.health.persist.dao; |
|||
|
|||
import com.ccsens.health.bean.po.HealthAbnormal; |
|||
import com.ccsens.health.bean.vo.AbnormalVo; |
|||
import com.ccsens.health.persist.mapper.HealthAbnormalMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
@Repository |
|||
public interface HealthAbnormalDao extends HealthAbnormalMapper { |
|||
// List<AbnormalVo.AbnormalStatisticsVo> getAbnormalList(@Param("post") Integer post, @Param("department")String department, @Param("healthType")Integer healthType);
|
|||
List<AbnormalVo.AbnormalStatisticsVo> getAbnormalList(@Param("post") Integer post, @Param("department")String department, @Param("healthType")Integer healthType); |
|||
|
|||
} |
|||
|
@ -0,0 +1,8 @@ |
|||
package com.ccsens.health.persist.dao; |
|||
|
|||
import com.ccsens.health.persist.mapper.JourneyAbnormalMapper; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
@Repository |
|||
public interface JourneyAbnormalDao extends JourneyAbnormalMapper { |
|||
} |
@ -0,0 +1,48 @@ |
|||
<?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.ccsens.health.persist.dao.HealthAbnormalDao"> |
|||
|
|||
<resultMap id="resultMap_abnormal_statistics" type="com.ccsens.health.bean.vo.AbnormalVo$AbnormalStatisticsVo"> |
|||
<id column="id" property="id"/> |
|||
<result column="wkno" property="wkno"/> |
|||
<result column="name" property="name"/> |
|||
<result column="department" property="department"/> |
|||
<result column="animalHeat" property="animalHeat"/> |
|||
<result column="reason" property="reason"/> |
|||
<result column="healthType" property="healthType"/> |
|||
<result column="startTime" property="startTime"/> |
|||
<result column="endTime" property="endTime"/> |
|||
</resultMap> |
|||
|
|||
<select id="getAbnormalList" resultMap="resultMap_abnormal_statistics" parameterType="java.util.Map"> |
|||
select |
|||
a.id as id, |
|||
a.wkno as wkno, |
|||
a.name as name, |
|||
a.department as department, |
|||
a.animal_heat as animalHeat, |
|||
a.reason as reason, |
|||
a.health_status as healthType, |
|||
a.start_time as startTime, |
|||
a.end_time as endTime |
|||
from |
|||
t_health_abnormal a left join t_member m on a.wkno = m.wkno |
|||
where |
|||
a.rec_status = 0 |
|||
<if test="post == 0"> |
|||
and |
|||
m.type != 2 |
|||
</if> |
|||
<if test="post != 0"> |
|||
and |
|||
m.type = 2 |
|||
</if> |
|||
<if test="department != null"> |
|||
and |
|||
a.department = #{department} |
|||
</if> |
|||
<if test="healthType != null"> |
|||
a.health_status = #{healthType} |
|||
</if> |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue