Lihong@123456 5 years ago
parent
commit
9ad56fee29
  1. 5
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/StatisticsService.java
  2. 6
      wisdomcar/src/main/resources/mapper_dao/StatisticsDao.xml

5
wisdomcar/src/main/java/com/ccsens/wisdomcar/service/StatisticsService.java

@ -63,7 +63,10 @@ public class StatisticsService implements IStatisticsService{
//当前数据 //当前数据
List<StatisticsVo.PointTime> pointTimeCurrent = statisticsDao.getPointTimeCurrent(param.getId()); List<StatisticsVo.PointTime> pointTimeCurrent = statisticsDao.getPointTimeCurrent(param.getId());
for (int i = 0; i <7; i++) { for (int i = 0; i <7; i++) {
pointTimeCurrent1.add(pointTimeCurrent.get(i)); if (i<6){
pointTimeCurrent.get(i).setTime(pointTimeCurrent.get(i+1).getTime()/1000-pointTimeCurrent.get(i).getTime()/1000);
}
} }
//医院数据 //医院数据
List<StatisticsVo.PointTime> pointTimeHospital = statisticsDao.getPointTimeHospital(param.getId()); List<StatisticsVo.PointTime> pointTimeHospital = statisticsDao.getPointTimeHospital(param.getId());

6
wisdomcar/src/main/resources/mapper_dao/StatisticsDao.xml

@ -35,7 +35,7 @@ FROM
<select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime"> <select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime">
select tfar.begin_time, tfar.type select tfar.begin_time, tfar.type as name
from from
t_first_aid_record tfar ,(select id from t_first_aid tfa where tfa.hospital_id=0 and tfa.rec_status=0 ORDER BY tfa.begin_time) t t_first_aid_record tfar ,(select id from t_first_aid tfa where tfa.hospital_id=0 and tfa.rec_status=0 ORDER BY tfa.begin_time) t
where tfar.rec_status=0 and t.id = tfar.first_aid_id where tfar.rec_status=0 and t.id = tfar.first_aid_id
@ -44,7 +44,7 @@ FROM
<select id="getPointTimeHospital" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime"> <select id="getPointTimeHospital" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime">
select select
ts.`name`, ts.`name`,
MIN(tfas.duration) as time MIN(tfas.duration)/1000 as time
from from
t_first_aid_standard tfas left JOIN t_step ts on tfas.step_id = ts.id t_first_aid_standard tfas left JOIN t_step ts on tfas.step_id = ts.id
where tfas.hospital_id=0 and tfas.type=1 and tfas.rec_status = 0 and ts.rec_status=0 where tfas.hospital_id=0 and tfas.type=1 and tfas.rec_status = 0 and ts.rec_status=0
@ -54,7 +54,7 @@ FROM
<select id="getPointTimeInternation" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime"> <select id="getPointTimeInternation" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime">
select select
ts.`name`, ts.`name`,
MIN(tfas.duration) as time MIN(tfas.duration)/1000 as time
from from
t_first_aid_standard tfas left JOIN t_step ts on tfas.step_id = ts.id t_first_aid_standard tfas left JOIN t_step ts on tfas.step_id = ts.id
where tfas.hospital_id=0 and tfas.type=0 and tfas.rec_status = 0 and ts.rec_status=0 where tfas.hospital_id=0 and tfas.type=0 and tfas.rec_status = 0 and ts.rec_status=0

Loading…
Cancel
Save