You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.2 KiB
Java
74 lines
2.2 KiB
Java
package com.example.duplicate.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.example.duplicate.common.ResultBody;
|
|
import com.example.duplicate.service.DuplicateService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
/**
|
|
* @ClassName DuplicateController
|
|
* @Description 医院复印预约接口
|
|
* @Author linjj
|
|
* @Date 2023/5/12 11:22
|
|
* @Version 1.0
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/duplicate")
|
|
@Api(value="测试",tags = "对外接口")
|
|
public class DuplicateController {
|
|
|
|
|
|
|
|
@Autowired
|
|
DuplicateService duplicateService;
|
|
|
|
@RequestMapping(value = "getFilePath", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ApiOperation(value="微信接口")
|
|
public ResultBody getFilePath(String inpatientNo, Integer admissTimes) {
|
|
if (StringUtils.isEmpty(inpatientNo)) {
|
|
return ResultBody.failed("住院号不得为空");
|
|
}
|
|
if (null == admissTimes) {
|
|
return ResultBody.failed("住院次数不得为空");
|
|
}
|
|
return ResultBody.success(duplicateService.getFilePath(inpatientNo, admissTimes));
|
|
}
|
|
|
|
|
|
/**
|
|
* @description: 高级检查
|
|
* @params: startRange
|
|
* @params: endRange
|
|
* @return: String
|
|
* @author linjj
|
|
* @date: 2023/4/14 9:32
|
|
*/
|
|
@RequestMapping(value = "SeniorExamine", method = RequestMethod.POST)
|
|
@ResponseBody
|
|
@ApiOperation(value="文件质检接口")
|
|
public String SeniorExamine(String startRange, String endRange) {
|
|
if (StringUtils.isEmpty(startRange) && StringUtils.isEmpty(endRange)) {
|
|
return "开始范围,结束范围不能全部为空";
|
|
}
|
|
if (StringUtils.isNotEmpty(startRange) && StringUtils.isNotEmpty(endRange)) {
|
|
if (startRange.compareTo(endRange) > 0) {
|
|
return "开始范围不能小于结束范围";
|
|
}
|
|
}
|
|
String s = duplicateService.SeniorExamine(startRange, endRange);
|
|
return JSON.toJSONString(s);
|
|
}
|
|
|
|
|
|
|
|
}
|