项目初始化
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.medicalprescription.MedicalPrescription;
|
||||
import com.joju.datamanager.model.viewmodel.PatientList;
|
||||
import com.joju.datamanager.service.HisViewSearchService;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description: his视图获取
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-15 17:44
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/hisViewSearch")
|
||||
public class HisViewSearchController {
|
||||
|
||||
@Autowired
|
||||
HisViewSearchService hisViewSearchService;
|
||||
|
||||
/**
|
||||
* his手术管理视图
|
||||
*
|
||||
* @param hzxm
|
||||
* @param blh
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getSurgicalViewData")
|
||||
@EleganceLog(description = "his手术管理视图")
|
||||
public Result getSurgicalViewData(String hzxm, String blh) {
|
||||
List<Map<String, Object>> maps = hisViewSearchService.getSurgicalView(hzxm, blh);
|
||||
if (!CollUtil.isEmpty(maps)) {//有数据
|
||||
return ResultUtil.successData(maps);
|
||||
}
|
||||
return ResultUtil.failureMsg("未获取到数据");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* his历史就诊记录查询
|
||||
*
|
||||
* @param patient_name
|
||||
* @param idcard
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getHistoricalVisits")
|
||||
@EleganceLog(description = "his历史就诊记录查询")
|
||||
public Result getHistoricalVisits(String patient_name, String idcard) {
|
||||
List<PatientList> historicalVisits = hisViewSearchService.getHistoricalVisits(patient_name, idcard);
|
||||
|
||||
if (!CollUtil.isEmpty(historicalVisits)) {//有数据
|
||||
return ResultUtil.successData(historicalVisits);
|
||||
}
|
||||
return ResultUtil.failureMsg("未获取到数据");
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getMedicalPrescription")
|
||||
@EleganceLog(description = "获取今天的遗嘱开单信息!")
|
||||
public Result getMedicalPrescription() {
|
||||
List<MedicalPrescription> medicalPrescriptions = hisViewSearchService.getMedicalPrescription();
|
||||
|
||||
if (!CollUtil.isEmpty(medicalPrescriptions)) {
|
||||
return ResultUtil.successData(medicalPrescriptions);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.guidance.IntelligentGuidanceCategory;
|
||||
import com.joju.datamanager.model.guidance.IntelligentGuidanceQuestions;
|
||||
import com.joju.datamanager.service.IntelligentGuidanceCategoryService;
|
||||
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.RestController;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: 智能导诊
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-21 14:00
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/IntelligentGuidance")
|
||||
public class IntelligentGuidanceController {
|
||||
|
||||
@Autowired
|
||||
IntelligentGuidanceCategoryService intelligentGuidanceCategoryService;
|
||||
|
||||
|
||||
@GetMapping("/testGuidance")
|
||||
public Result testInterface() {
|
||||
return ResultUtil.successData("ok");
|
||||
}
|
||||
|
||||
@GetMapping("/getSymptom")
|
||||
@EleganceLog(description = "导诊根据身体部位获取症状")
|
||||
public Result getSymptomByBodyAreaType(String bodyAreaType) {
|
||||
|
||||
List<IntelligentGuidanceCategory> intelligentGuidanceCategoryList = intelligentGuidanceCategoryService.getSymptomByBodyAreaType(bodyAreaType);
|
||||
|
||||
|
||||
Map<String, List<IntelligentGuidanceCategory>> listMap = intelligentGuidanceCategoryList.stream().collect(Collectors.groupingBy(IntelligentGuidanceCategory::getBodyArea));
|
||||
String bodyArea = listMap.keySet().iterator().next();
|
||||
JSONObject result = JSONUtil.createObj().put("bodyArea", bodyArea).put("categoryList", intelligentGuidanceCategoryList);
|
||||
JSONUtil.toJsonStr(result);
|
||||
return ResultUtil.successData(JSONUtil.toJsonStr(result));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getQuestions")
|
||||
@EleganceLog(description = "导诊获取症状对应的子问题")
|
||||
public Result getQuestionsByChildId(String childId) {
|
||||
|
||||
List<IntelligentGuidanceQuestions> intelligentGuidanceQuestionsList = intelligentGuidanceCategoryService.getQuestionsByChildId(childId);
|
||||
|
||||
List<IntelligentGuidanceQuestions> intelligentGuidanceQuestions = intelligentGuidanceQuestionsList.stream().sorted(Comparator.comparing(IntelligentGuidanceQuestions::getSortId)).collect(Collectors.toList());
|
||||
return ResultUtil.successData(intelligentGuidanceQuestions);
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/getAllBodyArea")
|
||||
@EleganceLog(description = "导诊获取身体区域划分")
|
||||
public Result getAllBodyArea() {
|
||||
|
||||
List<IntelligentGuidanceCategory> list = intelligentGuidanceCategoryService.getAllBodyArea();
|
||||
return ResultUtil.successData(list);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.callnumber.CallNumbers;
|
||||
import com.joju.datamanager.service.CallNumbersService;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 排队叫号接口
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-27 19:00
|
||||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/callNumbers")
|
||||
public class LineUpToCallNumbersController {
|
||||
|
||||
@Autowired
|
||||
CallNumbersService callNumbersService;
|
||||
|
||||
|
||||
@GetMapping("/getCallNumberByIdentity")
|
||||
@EleganceLog(description = "排队叫号获取线上数据")
|
||||
public Result getCallNumberByIdentity(String identity) {
|
||||
|
||||
List<CallNumbers> callNumbersList = callNumbersService.getCallNumberByIdentity(identity);
|
||||
if (!CollUtil.isEmpty(callNumbersList)) {
|
||||
return ResultUtil.successData(callNumbersList);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
}
|
||||
|
||||
@GetMapping("/getCallNumber")
|
||||
@EleganceLog(description = "排队叫号获取本地测试数据")
|
||||
public Result getCallNumber(String identity) {
|
||||
List<CallNumbers> list = callNumbersService.list(new QueryWrapper<CallNumbers>().eq("Card_no", identity).ne("adiagnostic_status", "已就诊"));
|
||||
if (!CollUtil.isEmpty(list)) {
|
||||
return ResultUtil.successData(list);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.medicalprescription.MedicalPrescription;
|
||||
import com.joju.datamanager.service.MedicalPrescriptionService;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 医嘱开单接口
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-04-02 19:11
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/MedicalPrescription")
|
||||
public class MedicalPrescriptionController {
|
||||
|
||||
|
||||
@Autowired
|
||||
MedicalPrescriptionService medicalPrescriptionService;
|
||||
|
||||
|
||||
@GetMapping("/getLocalMedicalPrescription")
|
||||
@EleganceLog(description = "获取本地的医嘱开单信息")
|
||||
public Result getLocalMedicalPrescription() {
|
||||
String today = DateUtil.today();
|
||||
String todayString = today + "00:00:00";
|
||||
DateTime tomorrow = DateUtil.tomorrow();
|
||||
String s = DateUtil.formatDate(tomorrow);
|
||||
String tomorrowString = s + "00:00:00";
|
||||
|
||||
List<MedicalPrescription> medicalPrescriptions = medicalPrescriptionService.list(new QueryWrapper<MedicalPrescription>().between("lrrq", todayString, tomorrowString));
|
||||
|
||||
if (!CollUtil.isEmpty(medicalPrescriptions)) {
|
||||
return ResultUtil.successData(medicalPrescriptions);
|
||||
}
|
||||
|
||||
return ResultUtil.failureMsg("获取失败!!");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.order.Order;
|
||||
import com.joju.datamanager.model.order.OrderVo;
|
||||
import com.joju.datamanager.service.OrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 患者预约记录接口
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-27 18:52
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping(value = "/order")
|
||||
@Slf4j
|
||||
public class OrderController {
|
||||
|
||||
|
||||
@Autowired
|
||||
OrderService orderService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取预约到今天的挂号订单信息
|
||||
*
|
||||
* @param yyrq
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping("/getOrderByDate")
|
||||
@EleganceLog(description = "根据日期获取预约订单")
|
||||
public Result getOrderByDate(String yyrq) {
|
||||
List<Order> orders = orderService.list(new QueryWrapper<Order>().eq("yyrq", yyrq).eq("status", "0"));
|
||||
if (!CollUtil.isEmpty(orders)) {
|
||||
return ResultUtil.successData(orders);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
}
|
||||
|
||||
@GetMapping("/getOrderByDateAndDist")
|
||||
@EleganceLog(description = "根据日期获取预约订单以及关联的人员信息")
|
||||
public Result getOrderByDateAndDist(String yyrq) {
|
||||
//查到当日就诊的所有订单以及患者信息,根据真实姓名去重
|
||||
List<OrderVo> orderVos = orderService.getOrderByDateAndDist(yyrq);
|
||||
if (!CollUtil.isEmpty(orderVos)) {
|
||||
return ResultUtil.successData(orderVos);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
}
|
||||
@PostMapping("/insertMissedAppoints")
|
||||
@EleganceLog(description = "批量插入爽约记录")
|
||||
public Result insertMissedApponits(@RequestBody List<OrderVo> orderVos) {
|
||||
Integer i = orderService.insertMissedAppoints(orderVos);
|
||||
if (i > 0) {
|
||||
return ResultUtil.success();
|
||||
}
|
||||
return ResultUtil.failureMsg("插入失败!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.viewmodel.PatientList;
|
||||
import com.joju.datamanager.service.PatientListService;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 历史就诊测试用接口
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-28 17:14
|
||||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/patientList")
|
||||
public class PatientListController {
|
||||
|
||||
|
||||
@Autowired
|
||||
PatientListService patientListService;
|
||||
|
||||
|
||||
@GetMapping("/getPatientListByNameAndIdCard")
|
||||
@EleganceLog(description = "获取历史就诊记录的本地测试数据")
|
||||
public Result getPatientListByNameAndIdCard(String patientName, String idCard) {
|
||||
|
||||
List<PatientList> list = patientListService.list(new QueryWrapper<PatientList>().eq("patient_name", patientName).eq("idcard", idCard).orderBy(true, false, "register_date"));
|
||||
if (!CollUtil.isEmpty(list)) {
|
||||
return ResultUtil.successData(list);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.service.TriageCallingService;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 分诊叫号接口
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-29 16:15
|
||||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/triageCalling")
|
||||
public class TriageCallingController {
|
||||
|
||||
@Autowired
|
||||
TriageCallingService triageCallingService;
|
||||
|
||||
|
||||
@GetMapping("/getTriageCallingByDate")
|
||||
@EleganceLog(description = "分诊叫号获取患者叫号记录")
|
||||
public Result getTriageCallingByDate() {
|
||||
List<String> triageCallings = triageCallingService.getTriageCallingByDate();
|
||||
|
||||
if (!CollUtil.isEmpty(triageCallings)) {
|
||||
return ResultUtil.successData(triageCallings);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.joju.datamanager.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.joju.datamanager.common.annotation.EleganceLog;
|
||||
import com.joju.datamanager.common.result.Result;
|
||||
import com.joju.datamanager.common.result.ResultUtil;
|
||||
import com.joju.datamanager.model.user.User;
|
||||
import com.joju.datamanager.service.UserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: 微信用户信息管理
|
||||
* @author: Mr.zs
|
||||
* @create: 2024-03-06 18:09
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
@Slf4j
|
||||
public class UserController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@GetMapping("/getUserData")
|
||||
@EleganceLog(description = "测试接口")
|
||||
public Result getData() {
|
||||
|
||||
return ResultUtil.successData("ok");
|
||||
}
|
||||
|
||||
@GetMapping("/getOpenidByUserCard")
|
||||
@EleganceLog(description = "获取用户卡号绑定的openid")
|
||||
public Result getOpenidByUserCard(String card) {
|
||||
|
||||
List<User> userCardAndRelateList = userService.getOpenidByUserCard(card);
|
||||
|
||||
if (!CollUtil.isEmpty(userCardAndRelateList)) {
|
||||
return ResultUtil.successData(userCardAndRelateList);
|
||||
}
|
||||
return ResultUtil.failureMsg("获取失败");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user