科室和医案收集里的科室列表一致

This commit is contained in:
wuchunlei
2025-08-05 09:50:03 +08:00
parent 79154cbd7c
commit b9e9f9b9f9
3 changed files with 23 additions and 14 deletions

View File

@@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.common.entity.*;
import com.peanut.modules.common.service.MedicalRecordsService;
import com.peanut.modules.common.service.TaihuTalentService;
import com.peanut.modules.common.service.UserCertificateLabelService;
import com.peanut.modules.common.service.UserCertificateService;
import com.peanut.modules.common.service.*;
import com.peanut.modules.master.service.CourseService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -33,15 +30,18 @@ public class TaihuTalentController {
private CourseService courseService;
@Autowired
private MedicalRecordsService medicalRecordsService;
@Autowired
private MedicalRecordsLabelService medicalRecordsLabelService;
//太湖英才列表
@RequestMapping("/getTaihuTalents")
public R getTaihuTalents(@RequestBody Map<String,Object> params){
LambdaQueryWrapper<TaihuTalent> wrapper = new LambdaQueryWrapper<>();
MPJLambdaWrapper<TaihuTalent> wrapper = new MPJLambdaWrapper<>();
wrapper.leftJoin(MedicalRecordsLabel.class,MedicalRecordsLabel::getId,TaihuTalent::getDeptLabelId);
wrapper.selectAll(TaihuTalent.class);
wrapper.selectAs(MedicalRecordsLabel::getTitle,TaihuTalent::getDepartment);
wrapper.like(StringUtils.isNotEmpty(params.get("name").toString()),TaihuTalent::getName,params.get("name"));
if (params.containsKey("department")){
wrapper.like(StringUtils.isNotEmpty(params.get("department").toString()),TaihuTalent::getDepartment,params.get("department"));
}
wrapper.eq(StringUtils.isNotEmpty(params.get("deptLabelId").toString()),TaihuTalent::getDeptLabelId,params.get("deptLabelId"));
wrapper.like(StringUtils.isNotEmpty(params.get("region").toString()),TaihuTalent::getRegion,params.get("region"));
wrapper.orderByAsc(TaihuTalent::getCreateTime);
List<TaihuTalent> list = taihuTalentService.list(wrapper);
@@ -68,6 +68,7 @@ public class TaihuTalentController {
@RequestMapping("/taihuTalentInfo")
public R taihuTalentInfo(@RequestBody Map<String,Object> params){
TaihuTalent taihuTalent = taihuTalentService.getById(params.get("id").toString());
taihuTalent.setDepartment(medicalRecordsLabelService.getById(taihuTalent.getDeptLabelId()).getTitle());
List<UserCertificateLabel> labels = userCertificateLabelService.list(new LambdaQueryWrapper<UserCertificateLabel>()
.eq(UserCertificateLabel::getPid,0));
List<UserCertificateLabel> filterLabels = new ArrayList<>();