7 changed files with 167 additions and 12 deletions
@ -0,0 +1,53 @@ |
|||
package com.ccsens.tcm.api; |
|||
|
|||
import com.ccsens.cloudutil.annotation.MustLogin; |
|||
import com.ccsens.tcm.bean.dto.BiologicalSamplesDto; |
|||
import com.ccsens.tcm.bean.dto.StatisticDto; |
|||
import com.ccsens.tcm.bean.vo.BiologicalSamplesVo; |
|||
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("/biologicalSamples") |
|||
@Slf4j |
|||
public class BiologicalSamplesController { |
|||
@Resource |
|||
private IPatientService patientService; |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "添加生物样本", notes = "w:添加生物样本") |
|||
@RequestMapping(value = "/addBiologicalSamples", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse addBiologicalSamples(@ApiParam @Validated @RequestBody QueryDto<BiologicalSamplesDto.AddBiolog> params) { |
|||
log.info("添加生物样本:{}",params); |
|||
patientService.addBiologicalSamples(params.getParam(),params.getUserId()); |
|||
log.info("添加生物样本完成"); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
@MustLogin |
|||
@ApiOperation(value = "搜索生物样本", notes = "w:搜索生物样本") |
|||
@RequestMapping(value = "/selBiologicalSamples", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<PageInfo<BiologicalSamplesVo.selBiolog>> selBiologicalSamples(@ApiParam @Validated @RequestBody QueryDto<BiologicalSamplesDto.SelBiolog> params) { |
|||
log.info("查询生物样本参数:{}",params); |
|||
PageInfo<BiologicalSamplesVo.selBiolog> selBiologPageInfo= patientService.selBiologicalSamples(params.getParam(),params.getUserId()); |
|||
log.info("查询生物样本完成"); |
|||
return JsonResponse.newInstance().ok(selBiologPageInfo); |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.ccsens.tcm.bean.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Max; |
|||
import javax.validation.constraints.Min; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class BiologicalSamplesDto { |
|||
@Data |
|||
@ApiModel("添加生物样本") |
|||
public static class AddBiolog { |
|||
@ApiModelProperty("样本类型 0:抗血凝10ml 1:促凝血5ml 2:晨尿10ml 3:24小时尿10ml") |
|||
private Byte sampleType; |
|||
@ApiModelProperty("患者id") |
|||
private Long patientInformationId; |
|||
@ApiModelProperty("采集时间") |
|||
private Integer collectTime; |
|||
} |
|||
@Data |
|||
@ApiModel("查询生物样本") |
|||
public static class SelBiolog { |
|||
@ApiModelProperty("医院id") |
|||
private Long hospitalId; |
|||
@ApiModelProperty("样本类型 0:抗血凝10ml 1:促凝血5ml 2:晨尿10ml 3:24小时尿10ml") |
|||
private Byte sampleType; |
|||
@ApiModelProperty("患者住院号") |
|||
private String hospitalization; |
|||
@ApiModelProperty("采集时间") |
|||
private Integer collectTime; |
|||
@Min(1) |
|||
@ApiModelProperty("当前页") |
|||
private Integer pageNum=1; |
|||
@Min(1) |
|||
@Max(20) |
|||
@ApiModelProperty("每页数量") |
|||
private Integer pageSize=10; |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.ccsens.tcm.bean.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class BiologicalSamplesVo { |
|||
@Data |
|||
@ApiModel("添加生物样本") |
|||
public static class selBiolog { |
|||
@ApiModelProperty("医院名称") |
|||
private String name; |
|||
@ApiModelProperty("患者住院号") |
|||
private String hospitalization; |
|||
@ApiModelProperty("样本类型 0:抗血凝10ml 1:促凝血5ml 2:晨尿10ml 3:24小时尿10ml") |
|||
private Byte sampleType; |
|||
@ApiModelProperty("采集时间") |
|||
private Integer collectTime; |
|||
} |
|||
} |
Loading…
Reference in new issue