6 changed files with 141 additions and 1 deletions
@ -0,0 +1,47 @@ |
|||||
|
package com.ccsens.carbasics.api; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.dto.OrganizationDto; |
||||
|
import com.ccsens.carbasics.bean.dto.StatisticalDto; |
||||
|
import com.ccsens.carbasics.bean.vo.OrganizationVo; |
||||
|
import com.ccsens.carbasics.bean.vo.StatisticalVo; |
||||
|
import com.ccsens.carbasics.service.IOrganizationService; |
||||
|
import com.ccsens.cloudutil.annotation.MustLogin; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
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; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: whj |
||||
|
* @time: 2021/9/3 16:38 |
||||
|
*/ |
||||
|
@Api(tags = "机构(质控,医院)相关") |
||||
|
@RestController |
||||
|
@RequestMapping("/organization") |
||||
|
@Slf4j |
||||
|
public class OrganizationController { |
||||
|
|
||||
|
@Resource |
||||
|
private IOrganizationService organizationService; |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "山西省地市查询", notes = "山西省地市查询") |
||||
|
@RequestMapping(value = "/provinceCity", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<OrganizationVo.Rank> provinceCityStatistical(@ApiParam @Validated @RequestBody QueryDto<OrganizationDto.Rank> params) { |
||||
|
log.info("山西省地市查询:{}", params); |
||||
|
OrganizationVo.Rank rank = organizationService.rank(params.getParam(), params.getUserId()); |
||||
|
log.info("山西省地市查询结果:{}", rank); |
||||
|
return JsonResponse.newInstance().ok(rank); |
||||
|
} |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.carbasics.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: whj |
||||
|
* @time: 2021/9/3 16:47 |
||||
|
*/ |
||||
|
public class OrganizationDto { |
||||
|
|
||||
|
@ApiModel("医院排名-请求") |
||||
|
@Data |
||||
|
public static class Rank{ |
||||
|
@ApiModelProperty("地区ID 有市,则为市的ID,否则,省的ID;空则查全部医院") |
||||
|
private Long areaId; |
||||
|
@ApiModelProperty("等级 2:二级 3:三级") |
||||
|
private byte level; |
||||
|
@NotNull |
||||
|
@ApiModelProperty("指标类型-必填 0:时间窗患者例数,1:溶栓例数 2:溶栓率 3:DNT中位数 4:脑出血例数") |
||||
|
private byte type; |
||||
|
@NotNull |
||||
|
@ApiModelProperty("项目ID-必填") |
||||
|
private Long projectId; |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.ccsens.carbasics.service; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.dto.OrganizationDto; |
||||
|
import com.ccsens.carbasics.bean.vo.OrganizationVo; |
||||
|
|
||||
|
public interface IOrganizationService { |
||||
|
|
||||
|
/** |
||||
|
* 医院排名 |
||||
|
* @param param 搜索条件 |
||||
|
* @param userId userId |
||||
|
* @return 医院排名 |
||||
|
*/ |
||||
|
OrganizationVo.Rank rank(OrganizationDto.Rank param, Long userId); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.carbasics.service; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.dto.OrganizationDto; |
||||
|
import com.ccsens.carbasics.bean.vo.OrganizationVo; |
||||
|
import com.ccsens.carbasics.persist.dao.OrganizationDao; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Propagation; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: whj |
||||
|
* @time: 2021/9/3 16:57 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
||||
|
public class OrganizationService implements IOrganizationService { |
||||
|
|
||||
|
@Resource |
||||
|
private OrganizationDao organizationDao; |
||||
|
|
||||
|
@Override |
||||
|
public OrganizationVo.Rank rank(OrganizationDto.Rank param, Long userId) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue