Browse Source

提交代码

recovery
wang0018 4 years ago
parent
commit
1e78765f13
  1. 15
      tcm/src/main/java/com/ccsens/tcm/bean/vo/StatisticVo.java
  2. 2
      tcm/src/main/java/com/ccsens/tcm/persist/dao/PatientDao.java
  3. 5
      tcm/src/main/resources/mapper_dao/PatientDao.xml

15
tcm/src/main/java/com/ccsens/tcm/bean/vo/StatisticVo.java

@ -1,9 +1,11 @@
package com.ccsens.tcm.bean.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
@ -12,9 +14,18 @@ public class StatisticVo {
@ApiModel("每日分析数量统计")
public static class SelCountS{
@ApiModelProperty("新建的病例")
private Integer newNums;
private List<StatisticVo.Shuliang> newNums;
@ApiModelProperty("已完成的病例")
private Integer overNums;
private List<StatisticVo.Shuliang> overNums;
}
@Data
@ApiModel("每日统计的数量")
public static class Shuliang{
@ApiModelProperty("时间")
@JsonFormat(pattern="yyyy-MM-dd")
private Date shijian;
@ApiModelProperty("数量")
private Integer nums;
}
@Data
@ApiModel("病例分析")

2
tcm/src/main/java/com/ccsens/tcm/persist/dao/PatientDao.java

@ -24,7 +24,7 @@ public interface PatientDao {
List<PatientVo.SelPatient> selPatientInformationList(PatientDto.SelPatientList param);
Integer countCase(@Param("param") StatisticDto.SelCount param,@Param("inputStatus") byte inputStatus);
List<StatisticVo.Shuliang> countCase(@Param("param") StatisticDto.SelCount param,@Param("inputStatus") byte inputStatus);
/**
*

5
tcm/src/main/resources/mapper_dao/PatientDao.xml

@ -135,8 +135,8 @@
</if>
</if>
</select>
<select id="countCase" resultType="java.lang.Integer">
select count(*) as nums from t_patient_information tpi
<select id="countCase" resultType="com.ccsens.tcm.bean.vo.StatisticVo$Shuliang">
select DATE_FORMAT(tpi.update_at,'%Y-%d-%m') as shijian,count(*) as nums from t_patient_information tpi
where tpi.rec_status=0
<if test="param.userId!=null and param.userId!=0 ">
and tpi.user_id=#{param.userId}
@ -153,6 +153,7 @@
<if test="param.endDate!=null">
and tpi.update_at &lt; #{param.endDate}
</if>
GROUP BY shijian
</select>
<select id="countAnalysis" resultType="com.ccsens.tcm.bean.vo.StatisticVo$SelGroupList">
<if test="testQuestionsId!=null and testQuestionsId!=0">

Loading…
Cancel
Save