12 changed files with 287 additions and 22 deletions
@ -0,0 +1,44 @@ |
|||
package com.ccsens.tcm.api; |
|||
|
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.tcm.bean.dto.ConRecDto; |
|||
import com.ccsens.tcm.bean.dto.StatisticDto; |
|||
import com.ccsens.tcm.bean.vo.ConRecVo; |
|||
import com.ccsens.tcm.bean.vo.StatisticVo; |
|||
import com.ccsens.tcm.service.IPatientService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import com.github.pagehelper.PageInfo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
/** |
|||
* @author wang |
|||
*/ |
|||
@Api(tags = "统计分析相关接口") |
|||
@RestController |
|||
@RequestMapping("/statistics") |
|||
@Slf4j |
|||
public class StatisticalAnalysisController { |
|||
@Resource |
|||
private IPatientService patientService; |
|||
@MustLogin |
|||
@ApiOperation(value = "每日病例统计", notes = "w:每日病例统计") |
|||
@RequestMapping(value = "/countCase", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<StatisticVo.SelCountS> countCase(@ApiParam @Validated @RequestBody QueryDto<StatisticDto.SelCount> params) { |
|||
log.info("统计每日病例请求参数:{}",params); |
|||
StatisticVo.SelCountS countCase= patientService.countCase(params.getParam(),params.getUserId()); |
|||
log.info("统计每日病例调用完成"); |
|||
return JsonResponse.newInstance().ok(countCase); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.ccsens.tcm.bean.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class StatisticDto { |
|||
@Data |
|||
public static class SelCount{ |
|||
@ApiModelProperty("主治大夫id") |
|||
private Long userId; |
|||
@ApiModelProperty("医院id") |
|||
private Long hospitalId; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
@ApiModelProperty("开始时间") |
|||
private Date startDate; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
@ApiModelProperty("结束时间") |
|||
private Date endDate; |
|||
} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.ccsens.tcm.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class StatisticVo { |
|||
@Data |
|||
@ApiModel("每日分析数量统计") |
|||
public static class SelCountS{ |
|||
@ApiModelProperty("新建的病例") |
|||
private Integer newNums; |
|||
@ApiModelProperty("已完成的病例") |
|||
private Integer overNums; |
|||
} |
|||
@Data |
|||
@ApiModel("病例分析") |
|||
public static class SelGroupNum{ |
|||
private Long inpatientId; |
|||
private List<SelGroupList> list; |
|||
} |
|||
@Data |
|||
@ApiModel("病例分析详细数量") |
|||
public static class SelGroupList{ |
|||
private String contents; |
|||
private Integer nums; |
|||
} |
|||
} |
Loading…
Reference in new issue