太湖英才
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
package com.peanut.modules.common.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.peanut.common.utils.R;
|
||||||
|
import com.peanut.common.utils.ShiroUtils;
|
||||||
|
import com.peanut.modules.common.entity.AiRecordFolder;
|
||||||
|
import com.peanut.modules.common.service.AiRecordFolderService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController("commonAiRecordFolder")
|
||||||
|
@RequestMapping("common/aiRecordFolder")
|
||||||
|
public class AiRecordFolderController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AiRecordFolderService aiRecordFolderService;
|
||||||
|
|
||||||
|
//病历夹列表
|
||||||
|
@RequestMapping("/getRecordFolders")
|
||||||
|
public R getRecordFolders(@RequestBody Map<String,Object> params){
|
||||||
|
LambdaQueryWrapper<AiRecordFolder> wrapper = new LambdaQueryWrapper();
|
||||||
|
wrapper.eq(AiRecordFolder::getUserId, ShiroUtils.getUId());
|
||||||
|
if (StringUtils.isNotEmpty(params.get("title").toString())||StringUtils.isNotEmpty(params.get("patientName").toString())){
|
||||||
|
wrapper.like(StringUtils.isNotEmpty(params.get("title").toString()),AiRecordFolder::getTitle,params.get("title"));
|
||||||
|
wrapper.like(StringUtils.isNotEmpty(params.get("patientName").toString()),AiRecordFolder::getPatientName,params.get("patientName"));
|
||||||
|
}else {
|
||||||
|
wrapper.select(AiRecordFolder::getTitle);
|
||||||
|
wrapper.groupBy(AiRecordFolder::getTitle);
|
||||||
|
}
|
||||||
|
wrapper.orderByDesc(AiRecordFolder::getCreateTime);
|
||||||
|
return R.ok().put("list",aiRecordFolderService.list(wrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
//将聊天记录加入病历夹
|
||||||
|
@RequestMapping("/addRecordFolder")
|
||||||
|
public R addRecordFolder(@RequestBody AiRecordFolder aiRecordFolder){
|
||||||
|
aiRecordFolder.setUserId(ShiroUtils.getUId());
|
||||||
|
aiRecordFolderService.save(aiRecordFolder) ;
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.peanut.modules.common.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.peanut.common.utils.R;
|
||||||
|
import com.peanut.modules.common.entity.TaihuTalent;
|
||||||
|
import com.peanut.modules.common.entity.UserCertificate;
|
||||||
|
import com.peanut.modules.common.service.TaihuTalentService;
|
||||||
|
import com.peanut.modules.common.service.UserCertificateService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController("commonTaihuTalent")
|
||||||
|
@RequestMapping("common/taihuTalent")
|
||||||
|
public class TaihuTalentController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TaihuTalentService taihuTalentService;
|
||||||
|
@Autowired
|
||||||
|
private UserCertificateService userCertificateService;
|
||||||
|
|
||||||
|
//太湖英才列表
|
||||||
|
@RequestMapping("/getTaihuTalents")
|
||||||
|
public R getTaihuTalents(@RequestBody Map<String,Object> params){
|
||||||
|
LambdaQueryWrapper<TaihuTalent> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.like(StringUtils.isNotEmpty(params.get("name").toString()),TaihuTalent::getName,params.get("name"));
|
||||||
|
wrapper.like(StringUtils.isNotEmpty(params.get("region").toString()),TaihuTalent::getRegion,params.get("region"));
|
||||||
|
return R.ok().put("list",taihuTalentService.list(wrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
//太湖英才详情
|
||||||
|
@RequestMapping("/taihuTalentInfo")
|
||||||
|
public R taihuTalentInfo(@RequestBody Map<String,Object> params){
|
||||||
|
TaihuTalent taihuTalent = taihuTalentService.getById(params.get("id").toString());
|
||||||
|
List<UserCertificate> certificates = userCertificateService.list(new LambdaQueryWrapper<UserCertificate>()
|
||||||
|
.eq(UserCertificate::getUserId,taihuTalent.getUserId()));
|
||||||
|
List<UserCertificate> res = new ArrayList<>();
|
||||||
|
Set<String> label = new HashSet<>();
|
||||||
|
//出师证、太湖国际中医师证、太湖国际针灸师证排在前面
|
||||||
|
for (UserCertificate uc:certificates) {
|
||||||
|
if (uc.getLabelId()==22){
|
||||||
|
res.add(uc);
|
||||||
|
label.add("出师证");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (UserCertificate uc:certificates) {
|
||||||
|
if (uc.getLabelId()==13){
|
||||||
|
res.add(uc);
|
||||||
|
label.add("太湖国际中医师");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (UserCertificate uc:certificates) {
|
||||||
|
if (uc.getLabelId()==19){
|
||||||
|
res.add(uc);
|
||||||
|
label.add("太湖国际针灸师");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (UserCertificate uc:certificates) {
|
||||||
|
if (uc.getLabelId()!=22&&uc.getLabelId()!=13&&uc.getLabelId()!=19){
|
||||||
|
res.add(uc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok()
|
||||||
|
.put("taihuTalent",taihuTalent)
|
||||||
|
.put("label",taihuTalent)
|
||||||
|
.put("certificates",res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.peanut.modules.common.dao;
|
||||||
|
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.peanut.modules.common.entity.TaihuTalent;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TaihuTalentDao extends MPJBaseMapper<TaihuTalent> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.peanut.modules.common.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("taihu_talent")
|
||||||
|
public class TaihuTalent implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
//姓名
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//职称
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
//头像
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
//地域
|
||||||
|
private String region;
|
||||||
|
|
||||||
|
//介绍
|
||||||
|
private String introduce;
|
||||||
|
|
||||||
|
//业务专长
|
||||||
|
private String specialty;
|
||||||
|
|
||||||
|
//出诊信息
|
||||||
|
private String clinic;
|
||||||
|
|
||||||
|
//预约
|
||||||
|
private String reservation;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableLogic
|
||||||
|
private Integer delFlag;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.peanut.modules.common.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.peanut.modules.common.entity.TaihuTalent;
|
||||||
|
|
||||||
|
public interface TaihuTalentService extends IService<TaihuTalent> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.peanut.modules.common.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.peanut.modules.common.dao.TaihuTalentDao;
|
||||||
|
import com.peanut.modules.common.entity.TaihuTalent;
|
||||||
|
import com.peanut.modules.common.service.TaihuTalentService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service("commonTaihuTalentService")
|
||||||
|
public class TaihuTalentServiceImpl extends ServiceImpl<TaihuTalentDao, TaihuTalent> implements TaihuTalentService {
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.peanut.modules.master.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.peanut.common.utils.R;
|
||||||
|
import com.peanut.modules.common.entity.TaihuTalent;
|
||||||
|
import com.peanut.modules.common.service.TaihuTalentService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController("masterTaihuTalent")
|
||||||
|
@RequestMapping("master/taihuTalent")
|
||||||
|
public class TaihuTalentController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TaihuTalentService taihuTalentService;
|
||||||
|
|
||||||
|
//太湖英才列表
|
||||||
|
@RequestMapping("/getTaihuTalents")
|
||||||
|
public R getTaihuTalents(@RequestBody Map<String,Object> params){
|
||||||
|
LambdaQueryWrapper<TaihuTalent> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.like(StringUtils.isNotEmpty(params.get("name").toString()),TaihuTalent::getName,params.get("name"));
|
||||||
|
wrapper.like(StringUtils.isNotEmpty(params.get("region").toString()),TaihuTalent::getRegion,params.get("region"));
|
||||||
|
return R.ok().put("list",taihuTalentService.list(wrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增太湖英才
|
||||||
|
@RequestMapping("/addTaihuTalent")
|
||||||
|
public R addTaihuTalent(@RequestBody TaihuTalent taihuTalent){
|
||||||
|
taihuTalentService.save(taihuTalent);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改太湖英才
|
||||||
|
@RequestMapping("/updateTaihuTalent")
|
||||||
|
public R updateTaihuTalent(@RequestBody TaihuTalent taihuTalent){
|
||||||
|
taihuTalentService.updateById(taihuTalent);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除太湖英才
|
||||||
|
@RequestMapping("/delTaihuTalent")
|
||||||
|
public R delTaihuTalent(@RequestBody TaihuTalent taihuTalent){
|
||||||
|
taihuTalentService.removeById(taihuTalent);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
//太湖英才详情
|
||||||
|
@RequestMapping("/taihuTalentInfo")
|
||||||
|
public R taihuTalentInfo(@RequestBody Map<String,Object> params){
|
||||||
|
TaihuTalent taihuTalent = taihuTalentService.getById(params.get("id").toString());
|
||||||
|
return R.ok().put("taihuTalent",taihuTalent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user