|
@ -56,7 +56,7 @@ public class AssistanceApplyController extends EnvelopRestEndPoint {
|
|
|
@GetMapping(value = "/hospital")
|
|
|
@ApiOperation(value = "区域检验-【医院排行】")
|
|
|
public Envelop examHospitalRanking(
|
|
|
@ApiParam(name = "areaCode", value = "区域编码", defaultValue = "")
|
|
|
@ApiParam(name = "areaCode", value = "区域编码(为空显示全市数据)", defaultValue = "")
|
|
|
@RequestParam(value = "areaCode", required = false) String areaCode,
|
|
|
@ApiParam(name = "eventDate", value = "就诊时间(年月)", defaultValue = "")
|
|
|
@RequestParam(value = "eventDate", required = false) String eventDate) {
|
|
@ -83,30 +83,56 @@ public class AssistanceApplyController extends EnvelopRestEndPoint {
|
|
|
map = examStatisticsService.areaExamStatistics(areaCode,date);
|
|
|
} catch (ManageException e) {
|
|
|
return failed(e.getMessage());
|
|
|
} catch (Exception e) {
|
|
|
return failed(e.getMessage());
|
|
|
}
|
|
|
return success(map);
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/organizations/statistics")
|
|
|
@ApiOperation(value = "机构今日检验统计查询")
|
|
|
@ApiOperation(value = "机构今日检验统计查询-【医生端-头部统计信息】",notes = "医生端的头部统计信息,数据为当日的数据统计")
|
|
|
public Envelop orgStatistics(
|
|
|
@ApiParam(name = "orgCode", value = "机构编码(不传默认全市)", defaultValue = "")
|
|
|
@RequestParam(value = "orgCode", required = false) String orgCode) throws IOException {
|
|
|
|
|
|
String demoData = "{\"increase\":200,\"waitSolution \":100,\"solution\":100}";
|
|
|
Map<String,Object> map = objectMapper.readValue(demoData,Map.class);
|
|
|
Map<String,Object> map = null;
|
|
|
try {
|
|
|
map = examStatisticsService.organizationExamStatistics(orgCode);
|
|
|
} catch (ManageException e) {
|
|
|
return failed(e.getMessage());
|
|
|
} catch (Exception e) {
|
|
|
return failed(e.getMessage());
|
|
|
}
|
|
|
return success(map);
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/organizations/basic/statistics")
|
|
|
@ApiOperation(value = "机构今日检验统计查询-【基层机构端-头部统计信息】",notes = "基层机构端的头部统计信息,主要包含总检验数,及今日已处理数,今日未处理数")
|
|
|
public Envelop basicOrgStatistics(
|
|
|
@ApiParam(name = "orgCode", value = "机构编码(不传默认全市)", defaultValue = "")
|
|
|
@RequestParam(value = "orgCode", required = false) String orgCode) throws IOException {
|
|
|
|
|
|
Map<String,Object> map = null;
|
|
|
try {
|
|
|
map = examStatisticsService.basicOrgExamStatistics(orgCode);
|
|
|
} catch (ManageException e) {
|
|
|
return failed(e.getMessage());
|
|
|
} catch (Exception e) {
|
|
|
return failed(e.getMessage());
|
|
|
}
|
|
|
return success(map);
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/apply/list")
|
|
|
@ApiOperation(value = "机构申请/处理列表查询")
|
|
|
public Collection<AssistanceApplyModel> applyList(
|
|
|
@ApiOperation(value = "机构申请/处理列表查询",notes = "filters 的like查询用“?”,")
|
|
|
public Envelop applyList(
|
|
|
@ApiParam(name = "fields", value = "返回的字段,为空返回全部字段", defaultValue = "")
|
|
|
@RequestParam(value = "fields", required = false) String fields,
|
|
|
@ApiParam(name = "filters", value = "过滤器,为空检索所有信息eg:applyOrg=jkzl;createTime>=2018-11-14T18:43:57Z;createTime<2018-11-14T22:59:59Z;", defaultValue = "")
|
|
|
@ApiParam(name = "filters", value = "过滤器,like用?,为空检索所有信息eg:applyOrg=jkzl;createTime>=2018-11-14T18:43:57Z;createTime<2018-11-14T22:59:59Z;", defaultValue = "")
|
|
|
@RequestParam(value = "filters", required = false) String filters,
|
|
|
@ApiParam(name = "sorts", value = "排序,规则参见说明文档", defaultValue = "")
|
|
|
@ApiParam(name = "sorts", value = "排序,升序+,降序-(eg:+id)", defaultValue = "+id")
|
|
|
@RequestParam(value = "sorts", required = false) String sorts,
|
|
|
@ApiParam(name = "size", value = "分页大小", defaultValue = "15")
|
|
|
@RequestParam(value = "size", required = false) int size,
|
|
@ -116,8 +142,16 @@ public class AssistanceApplyController extends EnvelopRestEndPoint {
|
|
|
HttpServletResponse response) throws IOException, ParseException {
|
|
|
|
|
|
List<AssistanceApplyModel> assistanceApplyModelList = (List<AssistanceApplyModel>)assistanceApplyService.search(fields, filters, sorts, page, size);
|
|
|
pagedResponse(request, response, assistanceApplyService.getCount(filters), page, size);
|
|
|
return convertToModels(assistanceApplyModelList, new ArrayList<AssistanceApplyModel>(assistanceApplyModelList.size()), AssistanceApplyModel.class, fields);
|
|
|
Envelop envelop = new Envelop();
|
|
|
envelop.setTotalCount((int)assistanceApplyService.getCount(filters));
|
|
|
envelop.setCurrPage(page);
|
|
|
envelop.setPageSize(size);
|
|
|
envelop.setDetailModelList(assistanceApplyModelList);
|
|
|
envelop.setSuccessFlg(true);
|
|
|
envelop.setTotalPage(envelop.getTotalPage());
|
|
|
return envelop;
|
|
|
// pagedResponse(request, response, assistanceApplyService.getCount(filters), page, size);
|
|
|
// return convertToModels(assistanceApplyModelList, new ArrayList<AssistanceApplyModel>(assistanceApplyModelList.size()), AssistanceApplyModel.class, fields);
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/apply/detail")
|
|
@ -134,10 +168,15 @@ public class AssistanceApplyController extends EnvelopRestEndPoint {
|
|
|
@ApiOperation(value = "检验协助申请", response = AssistanceApplyModel.class)
|
|
|
@PostMapping(value = "apply",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
public Envelop createAssistanceApply(
|
|
|
@ApiParam(name = "dictionary", value = "档案申请JSON结构")
|
|
|
@ApiParam(name = "apply", value = "档案申请JSON结构")
|
|
|
@RequestBody AssistanceApplyModel apply) {
|
|
|
|
|
|
AssistanceApplyModel save = assistanceApplyService.save(apply);
|
|
|
AssistanceApplyModel save = null;
|
|
|
try {
|
|
|
save = assistanceApplyService.saveApply(apply);
|
|
|
} catch (ManageException e) {
|
|
|
return failed(e.getMessage());
|
|
|
}
|
|
|
return success(save);
|
|
|
}
|
|
|
|