Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

recovery
zy_Java 5 years ago
parent
commit
501949b8ec
  1. 4
      mt/src/main/resources/application.yml
  2. 48
      mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml
  3. 4
      tall/src/main/resources/application.yml
  4. 11
      wisdomcar/src/main/java/com/ccsens/wisdomcar/api/StatisticsController.java
  5. 1
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/dto/StatisticsDto.java
  6. 23
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/vo/StatisticsVo.java
  7. 10
      wisdomcar/src/main/java/com/ccsens/wisdomcar/persist/dao/StatisticsDao.java
  8. 14
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/IStatisticsService.java
  9. 26
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/StatisticsService.java
  10. 4
      wisdomcar/src/main/resources/application.yml
  11. 29
      wisdomcar/src/main/resources/mapper_dao/StatisticsDao.xml

4
mt/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: test
include: common, util-test
active: dev
include: common, util-dev

48
mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml

@ -108,30 +108,30 @@
LEFT JOIN t_compete_group tcg on tcg.id = tcp.compete_group_id
WHERE
<trim prefix="(" prefixOverrides="and" suffix=")">
<if test="projectId != null">
tcpro.id = #{projectId}
</if>
<if test="groupId != null">
and tcg.id = #{groupId}
</if>
<if test="companyId != null">
and tcc.id = #{companyId}
</if>
<if test="name != null and name != ''">
and tcp.name like concat('%',#{name, jdbcType=VARCHAR},'%')
</if>
<if test="idCard != null and idCard != ''">
and tcp.id_card = #{idCard}
</if>
and tcpro.type=0
and tcpro.`level` =2
and tcpro.team=1
and tcpro.rec_status = 0
and tctm.rec_status = 0
and tcp.rec_status = 0
and tcc.rec_status = 0
and tcg.rec_status = 0
and tct.rec_status = 0
<if test="projectId != null">
tcpro.id = #{projectId}
</if>
<if test="groupId != null">
and tcg.id = #{groupId}
</if>
<if test="companyId != null">
and tcc.id = #{companyId}
</if>
<if test="name != null and name != ''">
and tcp.name like concat('%',#{name, jdbcType=VARCHAR},'%')
</if>
<if test="idCard != null and idCard != ''">
and tcp.id_card = #{idCard}
</if>
and tcpro.type=0
and tcpro.`level` =2
and tcpro.team=1
and tcpro.rec_status = 0
and tctm.rec_status = 0
and tcp.rec_status = 0
and tcc.rec_status = 0
and tcg.rec_status = 0
and tct.rec_status = 0
</trim>
UNION
SELECT

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: test
include: util-test,common
active: dev
include: util-dev,common

11
wisdomcar/src/main/java/com/ccsens/wisdomcar/api/StatisticsController.java

@ -45,4 +45,15 @@ public class StatisticsController {
log.info("查看测评结果");
return JsonResponse.newInstance().ok(selResult);
}
@ApiOperation(value = "急救各个节点时间统计", notes = "")
@RequestMapping(value = "/getPointTime", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse getPointTime(@ApiParam @Validated @RequestBody QueryDto<StatisticsDto.Hospital> params) {
log.info("急救各个节点时间统计:{}",params);
StatisticsVo.PointTimeList pointTime = statisticsService.getPointTime(params.getParam());
log.info("急救各个节点时间统计");
return JsonResponse.newInstance().ok(pointTime);
}
}

1
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/dto/StatisticsDto.java

@ -30,4 +30,5 @@ public class StatisticsDto {
private Long id;
}
}

23
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/vo/StatisticsVo.java

@ -30,4 +30,27 @@ public class StatisticsVo {
@ApiModelProperty("医院id")
private Long id;
}
@Data
@ApiModel("各个结点时长")
public static class PointTime{
@ApiModelProperty("节点名")
private String name;
@ApiModelProperty("节点耗时")
private Long time;
}
@Data
@ApiModel("各个结点时长集合")
public static class PointTimeList{
@ApiModelProperty("当前数据")
private List<PointTime> pointTimeCurrentList;
@ApiModelProperty("医院数据")
private List<PointTime> pointTimeHospital;
@ApiModelProperty("国际数据")
private List<PointTime> pointTimeInternation;
}
}

10
wisdomcar/src/main/java/com/ccsens/wisdomcar/persist/dao/StatisticsDao.java

@ -8,5 +8,15 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface StatisticsDao extends FirstAidMapper {
List<StatisticsVo.PointTime> getPointTimeCurrent(@Param("id") Long id);
List<StatisticsVo.PointTime> getPointTimeHospital(@Param("id") Long id);
List<StatisticsVo.PointTime> getPointTimeInternation(@Param("id") Long id);
public List<Integer> selResult(@Param("param")StatisticsDto.UseNum param);
}

14
wisdomcar/src/main/java/com/ccsens/wisdomcar/service/IStatisticsService.java

@ -3,6 +3,8 @@ package com.ccsens.wisdomcar.service;
import com.ccsens.wisdomcar.bean.dto.StatisticsDto;
import com.ccsens.wisdomcar.bean.vo.StatisticsVo;
import java.util.List;
public interface IStatisticsService {
/**
* 查看FAST ED结果
@ -12,9 +14,15 @@ public interface IStatisticsService {
StatisticsVo.FastEdResult getResult(StatisticsDto.Hospital param);
/**
* 查询医院得小车使用情况
* @param param
* @return
<<<<<<< HEAD
* 急救时长分析各个节点
*/
StatisticsVo.PointTimeList getPointTime(StatisticsDto.Hospital param);
// /
// * 查询医院得小车使用情况
// * @param param
// * @return
// */
StatisticsVo.UseNumsVo selResult(StatisticsDto.UseNum param);
}

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

@ -8,9 +8,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.security.PrivateKey;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@ -24,6 +26,7 @@ public class StatisticsService implements IStatisticsService{
return null;
}
@Override
public StatisticsVo.UseNumsVo selResult(StatisticsDto.UseNum param) {
StatisticsVo.UseNumsVo useNumsVo=new StatisticsVo.UseNumsVo();
@ -49,5 +52,28 @@ public class StatisticsService implements IStatisticsService{
useNumsVo.setSigleLast(useNumVosLast);
useNumsVo.setSumLast(sumLast);
return useNumsVo;
}
@Override
public StatisticsVo.PointTimeList getPointTime(StatisticsDto.Hospital param) {
List<StatisticsVo.PointTime> pointTimeCurrent1 = new ArrayList<>();
//当前数据
List<StatisticsVo.PointTime> pointTimeCurrent = statisticsDao.getPointTimeCurrent(param.getId());
for (int i = 0; i <7; i++) {
pointTimeCurrent1.add(pointTimeCurrent.get(i));
}
//医院数据
List<StatisticsVo.PointTime> pointTimeHospital = statisticsDao.getPointTimeHospital(param.getId());
//国际数据
List<StatisticsVo.PointTime> pointTimeInternation = statisticsDao.getPointTimeInternation(param.getId());
StatisticsVo.PointTimeList pointTimeList = new StatisticsVo.PointTimeList();
pointTimeList.setPointTimeCurrentList(pointTimeCurrent1);
pointTimeList.setPointTimeHospital(pointTimeHospital);
pointTimeList.setPointTimeInternation(pointTimeInternation);
return pointTimeList;
}
}

4
wisdomcar/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: test
include: common, util-test
active: dev
include: common, util-dev

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

@ -31,4 +31,33 @@ FROM
) tfa on tsm.`name`=tfa.`da`
</select>
<select id="getPointTimeCurrent" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime">
select tfar.begin_time, tfar.type
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
where tfar.rec_status=0 and t.id = tfar.first_aid_id
</select>
<select id="getPointTimeHospital" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime">
select
ts.`name`,
MIN(tfas.duration) as time
from
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
GROUP BY tfas.step_id;
</select>
<select id="getPointTimeInternation" parameterType="java.util.Map" resultType="com.ccsens.wisdomcar.bean.vo.StatisticsVo$PointTime">
select
ts.`name`,
MIN(tfas.duration) as time
from
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
GROUP BY tfas.step_id;
</select>
</mapper>
Loading…
Cancel
Save