From cb22e2441394cd61116d64a844708ca9390a0529 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期日, 21 七月 2024 18:43:55 +0800
Subject: [PATCH] Merge branch 'master' of http://47.93.189.255:8099/r/zhangshi_app_backend
---
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 48 ++++++++++++++++++++++++++++++++++--------------
1 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
index 9f1d5ab..3367b37 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -86,11 +86,7 @@
//鍔犱笂鑷繁瀹跺涵鐨刬d
idList.add(familyId);
// String familyIds = listFamilyIds();
-// String secondFamilyAuthority = listSecondFamilyIds();
-
- //鏌ョ湅鍒汉鍒嗕韩
- List<ZfDoctor> bs = zfDoctorShareService.listUserId(myself.getUserId());
-
+// String secondFamilyAuthority = listSecondFamilyIds()
LambdaQueryWrapper<ZfDoctor> lqw = buildCondition(zfDoctor, idList);
Page<ZfDoctor> zfDoctorPage = new Page<>(pageNum, pageSize);
@@ -99,7 +95,6 @@
List<ZfDoctor> beanRecords = pageResult.getRecords();//寰楀埌鏌ヨ鍑烘潵鐨勬暟鎹�
List<ZfDoctor> dtoResult = markOwnData(familyId, beanRecords);
- dtoResult.addAll(bs);
HashMap<String, Object> data = MapUtils.getResult(pageResult, dtoResult);
return AjaxResult.success(data);
}
@@ -121,12 +116,9 @@
//鍔犱笂鑷繁瀹跺涵鐨刬d
idList.add(familyId);
- //鏌ョ湅鍒汉鍒嗕韩
- List<ZfDoctor> bs = zfDoctorShareService.listUserId(myself.getUserId());
LambdaQueryWrapper<ZfDoctor> lambdaQueryWrapper = buildCondition(zfDoctor, idList);
List<ZfDoctor> beanRecords = list(lambdaQueryWrapper);
- beanRecords.addAll(bs);
log.info("浠庢暟鎹簱涓煡鍒扮殑涓�:{}", beanRecords);
return markOwnData(familyId, beanRecords);
}
@@ -166,10 +158,13 @@
for (ZfDoctor zfDoctor : dataList) {
- if (zfDoctor.getSymptom().length() == 0 || zfDoctor.getSymptom() == null) {
- throw new RuntimeException("鐥囩姸涓虹┖锛屽鍏ユ暟鎹け璐�");
- } else {
- zfDoctorService.addData(zfDoctor);
+ if (zfDoctor.getSuitable().length() != 0 || zfDoctor.getType().length() != 0 || zfDoctor.getEffect().length() != 0 ) {
+ if(zfDoctor.getSymptom().length() == 0 || zfDoctor.getSymptom() == null){
+ throw new RuntimeException("鐥囩姸涓虹┖锛屽鍏ユ暟鎹け璐�");
+ }
+ else {
+ zfDoctorService.addData(zfDoctor);
+ }
}
}
return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
@@ -191,7 +186,7 @@
// List<ZfDoctorShare> authority1 = zfDoctorShareService.getAuthority();
// List<Long> idList1 = authority1.stream().filter(auth -> auth.getShareContent().toString().equals(DOCTOR_LIST)).map(ZfDoctorShare::getShareId).collect(Collectors.toList());
- zfDoctorService.addData(zfDoctor);
+// zfDoctorService.addData(zfDoctor);
if (zfDoctor.getFamilyId() != null && !familyIdList.contains(zfDoctor.getFamilyId())) {
throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
@@ -444,6 +439,31 @@
return lqw;
}
+// public LambdaQueryWrapper<ZfDoctor> buildCondition2(List<Long> ids) {
+// LambdaQueryWrapper<ZfDoctor> lqw = new LambdaQueryWrapper<>();
+// lqw.eq(ZfDoctor::getId, ids);
+//
+// return lqw;
+// }
+// @Override
+// public AjaxResult selectListById(List<Long> ids, Integer pageNum, Integer pageSize) {
+// List<ZfDoctor> lqw2 = new ArrayList<>();
+//
+// LambdaQueryWrapper<ZfDoctor> lqw = buildCondition2(ids);
+// List<ZfDoctor> bb = list(lqw);
+// System.out.println("15052222254"+bb);
+//
+// Page<ZfDoctor> zfDoctorPage = new Page<>(pageNum, pageSize);
+// Page<ZfDoctor> pageResult = page(zfDoctorPage, lqw);
+// List<ZfDoctor> beanRecords = pageResult.getRecords();//寰楀埌鏌ヨ鍑烘潵鐨勬暟鎹�
+// System.out.println(beanRecords);
+//
+// HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords);
+//
+//
+// return AjaxResult.success(data);
+//// }
+
// private List<Long> buildCondition1(){
// List<ZfDoctorShare> authority1 = zfDoctorShareService.getAuthority();
// List<Long> idList1 = authority1.stream().filter(auth -> auth.getShareContent().toString().equals(DOCTOR_LIST)).map(ZfDoctorShare::getShareId).collect(Collectors.toList());
--
Gitblit v1.9.1