|
@@ -0,0 +1,39 @@
|
|
|
+package thyyxxk.webserver.controller.inpatient;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
+import thyyxxk.webserver.entity.ResultVo;
|
|
|
+import thyyxxk.webserver.entity.inpatient.chargelist.BriefPatInfo;
|
|
|
+import thyyxxk.webserver.service.inpatient.ChargeListService;
|
|
|
+import thyyxxk.webserver.utils.ListUtil;
|
|
|
+import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
+import thyyxxk.webserver.utils.StringUtil;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/chargeList")
|
|
|
+public class ChargeListController {
|
|
|
+ private final ChargeListService service;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public ChargeListController(ChargeListService service) {
|
|
|
+ this.service = service;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/selectBriefPatInfo")
|
|
|
+ public ResultVo<List<BriefPatInfo>> selectBriefPatInfo(@RequestParam("patNo") String patNo) {
|
|
|
+ if (StringUtil.isBlank(patNo)) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.INVALID_PARAM, "住院号不能为空!");
|
|
|
+ }
|
|
|
+ List<BriefPatInfo> resultList = service.selectBriefPatInfo(patNo);
|
|
|
+ if (ListUtil.isBlank(resultList)) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
|
|
|
+ }
|
|
|
+ return ResultVoUtil.success(resultList);
|
|
|
+ }
|
|
|
+}
|