From 879bc177f31717f6d4a4998840e786a668256e97 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 06 八月 2026 15:52:01 +0800
Subject: [PATCH] 【景宁】查询随访任务组科室关联列表、查询随访任务组疾病关联列表
---
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 8 ++
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java | 5 +
smartor/src/main/java/com/smartor/domain/Icd10.java | 9 ++
smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml | 8 ++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java | 108 ++++++++++++++++++++++++++++++++++++
5 files changed, 137 insertions(+), 1 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java
new file mode 100644
index 0000000..f8cd47c
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java
@@ -0,0 +1,108 @@
+package com.ruoyi.web.controller.smartor;
+
+import com.ruoyi.common.annotation.AddOrgId;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysDeptService;
+import com.smartor.domain.Icd10;
+import com.smartor.domain.ServiceTaskSchedule;
+import com.smartor.domain.ServiceTaskdiag;
+import com.smartor.service.IIcd10Service;
+import com.smartor.service.IServiceTaskScheduleService;
+import com.smartor.service.IServiceTaskdiagService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+import static com.alibaba.fastjson2.JSONValidator.Type.Array;
+
+/**
+ * 闅忚浠诲姟缁勫叧鑱擟ontroller
+ *
+ * @author 闄堟樁鑱�
+ * @date 2026-08-06
+ */
+@Api("闅忚浠诲姟缁勫叧鑱�")
+@RestController
+@RequestMapping("/smartor/taskSchedule")
+public class ServiceTaskscheduleController extends BaseController {
+ @Autowired
+ private IServiceTaskScheduleService serviceTaskScheduleService;
+
+ @Autowired
+ private IIcd10Service icd10Service;
+
+ @Autowired
+ private ISysDeptService sysDeptService;
+
+ /**
+ * 鏌ヨ闅忚浠诲姟缁勭瀹ゅ叧鑱斿垪琛�
+ */
+ @ApiOperation("鏌ヨ闅忚浠诲姟缁勭瀹ゅ叧鑱斿垪琛�")
+ @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+ @PostMapping("getTaskScheduleDeptList")
+ public Map<String, Object> getTaskScheduleDeptList(@RequestBody ServiceTaskSchedule serviceTaskSchedule) {
+ List<SysDept> list = new ArrayList<>();
+ //浠诲姟缁勪俊鎭�
+ if(ObjectUtils.isNotEmpty(serviceTaskSchedule.getTaskid())){
+ ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTaskSchedule.getTaskid());
+ if(ObjectUtils.isNotEmpty(schedule) && StringUtils.isNotEmpty(schedule.getDeptCodes())){
+ String[] split = schedule.getDeptCodes().split(",");
+ SysDept sysDept = new SysDept();
+ sysDept.setOrgid(schedule.getOrgid());
+ sysDept.setDeptType("1");
+ sysDept.setDeptCodes(Arrays.asList(split));
+ list = sysDeptService.selectDeptList(sysDept);
+ }
+
+ if(ObjectUtils.isNotEmpty(schedule) && StringUtils.isNotEmpty(schedule.getWardCodes())){
+ String[] split = schedule.getWardCodes().split(",");
+ SysDept sysDept = new SysDept();
+ sysDept.setOrgid(schedule.getOrgid());
+ sysDept.setDeptType("2");
+ sysDept.setDeptCodes(Arrays.asList(split));
+ list = sysDeptService.selectDeptList(sysDept);
+ }
+ }
+
+ return getDataTable3(CollectionUtils.isEmpty(list) ? 0 : list.size(), list);
+ }
+
+ /**
+ * 鏌ヨ闅忚浠诲姟缁勭柧鐥呭叧鑱斿垪琛�
+ */
+ @ApiOperation("鏌ヨ闅忚浠诲姟缁勭柧鐥呭叧鑱斿垪琛�")
+ @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+ @PostMapping("getTaskScheduleDiagList")
+ public Map<String, Object> getTaskScheduleDiagList(@RequestBody ServiceTaskSchedule serviceTaskSchedule) {
+ List<Icd10> list = new ArrayList<>();
+ //浠诲姟缁勪俊鎭�
+ if(ObjectUtils.isNotEmpty(serviceTaskSchedule.getTaskid())){
+ ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTaskSchedule.getTaskid());
+ if(ObjectUtils.isNotEmpty(schedule) && StringUtils.isNotEmpty(schedule.getIcd10Codes())){
+ Icd10 icd10 = new Icd10();
+ String[] split = schedule.getIcd10Codes().split(",");
+ icd10.setIcdcodes(Arrays.asList(split));
+ icd10.setOrgid(schedule.getOrgid());
+ list = icd10Service.selectIcd10List(icd10);
+ }
+ }
+
+ return getDataTable3(CollectionUtils.isEmpty(list) ? 0 : list.size(), list);
+ }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
index 8665f11..501ccf6 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
@@ -132,4 +132,9 @@
@Excel(name = " 闄㈠尯 ")
private String campusid;
+ /**
+ * 缁戝畾绉戝浠g爜锛堥�楀彿鍒嗛殧锛夛紝浠诲姟缁勮嚜鍔ㄧ撼鍏ュ尮閰嶇敤
+ */
+ @ApiModelProperty("缁戝畾绉戝浠g爜(閫楀彿鍒嗛殧)锛岃嚜鍔ㄧ撼鍏ョ敤")
+ private List<String> deptCodes;
}
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 2e18b43..b08c908 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -85,6 +85,14 @@
<if test="orgid != null and orgid != ''">
AND orgid = #{orgid}
</if>
+ <if test="deptCodes != null and deptCodes.size() > 0">
+ AND dept_code IN
+ <foreach collection="deptCodes" item="deptCodeItem" open="("
+ separator=","
+ close=")">
+ #{deptCodeItem}
+ </foreach>
+ </if>
<!-- 鏁版嵁鑼冨洿杩囨护 -->
${params.dataScope}
order by d.dept_type asc, d.parent_id, d.order_num
diff --git a/smartor/src/main/java/com/smartor/domain/Icd10.java b/smartor/src/main/java/com/smartor/domain/Icd10.java
index 9a3eb2f..5ec91fc 100644
--- a/smartor/src/main/java/com/smartor/domain/Icd10.java
+++ b/smartor/src/main/java/com/smartor/domain/Icd10.java
@@ -8,6 +8,8 @@
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
+import java.util.List;
+
/**
* 鐤剧梾瀵硅薄 icd10
*
@@ -111,5 +113,10 @@
@ApiModelProperty("chimedflag")
private String chimedflag;
-
+ /**
+ * icd10缂栫爜
+ */
+ @ApiModelProperty("icd10缂栫爜闆嗗悎")
+ @Excel(name = "icd10缂栫爜闆嗗悎")
+ private List<String> icdcodes;
}
diff --git a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
index e979d62..5dd12df 100644
--- a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
@@ -57,6 +57,14 @@
<if test="pid != null ">and pid = #{pid}</if>
<if test="guid != null and guid != ''">and guid = #{guid}</if>
<if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
+ <if test="icdcodes != null and icdcodes.size() > 0">
+ AND icdcode IN
+ <foreach collection="icdcodes" item="icdcodeItem" open="("
+ separator=","
+ close=")">
+ #{icdcodeItem}
+ </foreach>
+ </if>
</select>
<select id="selectIcd10ByIcdid" parameterType="Long" resultMap="Icd10Result">
--
Gitblit v1.9.3