From c71fe5ffd8b8552e75fe03205a3ddf85d2840b5e Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期一, 13 四月 2026 15:21:48 +0800
Subject: [PATCH] 1.新增省立同德延续随访统计
---
smartor/src/main/java/com/smartor/domain/ServiceSubtask.java | 2
ruoyi-admin/src/main/resources/application-sltd.yml | 2
smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java | 10 +
smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskCotinueCountVO.java | 31 +++
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 60 ++++++
ruoyi-admin/src/main/resources/application-xh.yml | 2
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java | 54 ++----
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml | 219 +++++++-----------------
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 24 +-
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java | 41 +++-
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 68 +++++++
smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java | 17 +
ruoyi-admin/src/main/resources/application-ls.yml | 2
13 files changed, 307 insertions(+), 225 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index 13b1622..3559e57 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -1,11 +1,8 @@
package com.ruoyi.web.controller.smartor;
import com.github.pagehelper.ISelect;
-import com.github.pagehelper.Page;
import com.ruoyi.common.annotation.AddOrgId;
import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.constant.CacheConstants;
-import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -22,34 +19,26 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.reflect.ReflectUtils;
-import com.ruoyi.common.utils.uuid.IdUtils;
-import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserDeptService;
import com.smartor.domain.*;
+import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.VO.ServiceSubtaskVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
-import com.smartor.mapper.PatMedInhospMapper;
-import com.smartor.mapper.PatMedOuthospMapper;
import com.smartor.service.IServiceSubtaskRecordService;
import com.smartor.service.IServiceSubtaskService;
import com.smartor.service.IServiceTaskService;
-import com.smartor.service.impl.ServiceSubtaskServiceImpl;
-import com.sun.org.apache.bcel.internal.generic.NEW;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-import net.bytebuddy.implementation.bytecode.Throw;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
-import java.text.DecimalFormat;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
@@ -559,9 +548,7 @@
@PostMapping("/getSfStatisticsExport")
public void export(HttpServletResponse response, ServiceSubtaskCountReq serviceSubtaskCountReq) {
List<ServiceSubtaskStatistic> sfStatistics = serviceSubtaskService.getSfStatisticsExport(serviceSubtaskCountReq);
-
ExcelUtil<ServiceSubtaskStatistic> util = new ExcelUtil<ServiceSubtaskStatistic>(ServiceSubtaskStatistic.class);
-
String sheetName = "";
String fileName = "";
if (active.equals("ls") || active.equals("druid")) {
@@ -599,6 +586,30 @@
}
return success(serviceSubtaskService.getSfStatisticsJoydetails(serviceSubtaskCountReq));
}
+
+
+
+ /**
+ * 寤剁画鎶ょ悊缁熻
+ */
+ @ApiOperation("寤剁画鎶ょ悊缁熻")
+ @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+ @PostMapping("/getContinueNerseCount")
+ public AjaxResult getContinueNerseCount(@RequestBody ServiceSubtaskCotinueCountVO serviceSubtaskCotinueCountVO) {
+ SysUser user = getLoginUser().getUser();
+ serviceSubtaskCotinueCountVO.setOrgid(user.getOrgid());
+ serviceSubtaskCotinueCountVO.setCampusid(user.getCampusid());
+ boolean hasDistrict = !CollectionUtils.isEmpty(serviceSubtaskCotinueCountVO.getLeavehospitaldistrictcodes());
+ boolean hasDept = !CollectionUtils.isEmpty(serviceSubtaskCotinueCountVO.getDeptcodes());
+ if (hasDistrict && hasDept) {
+ return error("鐥呭尯Code闆嗗悎涓庣瀹ode闆嗗悎浜掓枼锛屼笉鑳藉悓鏃朵紶鍏�");
+ }
+ return success(serviceSubtaskService.getContinueNurseCount(serviceSubtaskCotinueCountVO));
+ }
+
+
+
+
/**
* 鑾峰彇闅忚鍒嗙被缁熻鏄庣粏
@@ -715,4 +726,6 @@
}
return map;
}
+
+
}
diff --git a/ruoyi-admin/src/main/resources/application-ls.yml b/ruoyi-admin/src/main/resources/application-ls.yml
index 5c3fb84..43de361 100644
--- a/ruoyi-admin/src/main/resources/application-ls.yml
+++ b/ruoyi-admin/src/main/resources/application-ls.yml
@@ -11,7 +11,7 @@
# username: smartor
# password: Smartor.2023
# driverClassName: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://9.209.1.5:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://9.209.1.5:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000
username: root@sfxx#other_cluster02
password: Y5oapyS8
driverClassName: com.mysql.cj.jdbc.Driver
diff --git a/ruoyi-admin/src/main/resources/application-sltd.yml b/ruoyi-admin/src/main/resources/application-sltd.yml
index d14aafb..e8fd437 100644
--- a/ruoyi-admin/src/main/resources/application-sltd.yml
+++ b/ruoyi-admin/src/main/resources/application-sltd.yml
@@ -7,7 +7,7 @@
# 涓诲簱鏁版嵁婧�
master:
# 鐪佺珛鍚屽痉
- url: jdbc:mysql://192.88.117.237:3306/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://192.88.117.237:3306/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000
username: root
password: Smartor.2023
driverClassName: com.mysql.cj.jdbc.Driver
diff --git a/ruoyi-admin/src/main/resources/application-xh.yml b/ruoyi-admin/src/main/resources/application-xh.yml
index fbeb09e..272f63c 100644
--- a/ruoyi-admin/src/main/resources/application-xh.yml
+++ b/ruoyi-admin/src/main/resources/application-xh.yml
@@ -7,7 +7,7 @@
# 涓诲簱鏁版嵁婧�
master:
# 鏂板崕
- url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+ url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&connectTimeout=60000&socketTimeout=120000
username: smartor
password: Smartor.2023
driverClassName: com.mysql.cj.jdbc.Driver
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
index eaa87e5..dff18ff 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -577,20 +577,20 @@
//2鍒ゆ柇涓�涓嬶紝褰撳墠鐨剆ort鏄笉鏄瓑浜庨渶瑕佹墽琛岀殑鎬讳釜鏁帮紝濡傛灉绛変簬鐨勮瘽锛岃鏄庢槸鏈�鍚庝竴涓紝鐩存帴灏唖ervuce_subtask鐨勭姸鎬佹敼鎴�5锛屾墽琛屽け璐ュ氨琛屼簡
Long cs = currentSort.get();
if (cs.equals(serviceSubtaskPreachforms.size())) {
- if(serviceSubtask.getPreachform().equals("1")){
+ if (serviceSubtask.getPreachform().equals("1")) {
serviceSubtask.setSendstate(7L);
serviceSubtask.setRemark("澶勭悊琛ュ伩浠诲姟,褰撳墠澶勭悊鏈�鍚庤ˉ鍋� 浜哄伐瓒呮椂");
- }else {
+ } else {
serviceSubtask.setSendstate(5L);
serviceSubtask.setRemark("澶勭悊琛ュ伩浠诲姟,褰撳墠澶勭悊鏈�鍚庤ˉ鍋匡紝鍏ㄩ儴鎵ц澶辫触");
}
serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
//淇敼鍙戦�佹柟寮忕殑鐘舵�佷负澶辫触
- if(serviceSubtaskPreachform.getPreachform().equals("1")){
+ if (serviceSubtaskPreachform.getPreachform().equals("1")) {
serviceSubtaskPreachform.setSendstate("7");
serviceSubtaskPreachform.setId(id.get());
- }else {
+ } else {
serviceSubtaskPreachform.setSendstate("5");
serviceSubtaskPreachform.setId(id.get());
}
@@ -1020,7 +1020,7 @@
log.error("getSendPreachform鏂规硶 妫�鏌ユ槸鍚︽墍鏈塻endstate涓嶇瓑浜�9, 鍏ㄥけ璐ヤ簡");
serviceSubtask.setRemark("鎵�鏈夊彂閫佹柟寮忓潎鏈幏鍙栫粨鏋滐紝浠诲姟澶辫触");
//浜哄伐鍙戦�佽秴鏃�
- if(ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")){
+ if (ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) {
serviceSubtask.setSendstate(7L);
serviceSubtask.setRemark("浜哄伐鍙戦�佽秴鏃�");
}
@@ -1106,7 +1106,7 @@
subtaskPreachform.setSendstate("5");
subtaskPreachform.setId(id.get());
//浜哄伐鍙戦�佽秴鏃�
- if(ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")){
+ if (ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) {
subtaskPreachform.setSendstate("7");
subtaskPreachform.setRemark("浜哄伐鍙戦�佽秴鏃�");
}
@@ -1234,7 +1234,7 @@
if (failSendstate.equals("2")) serviceSubtaskPreachform1.setSendstate("9");
}
serviceSubtaskPreachform1.setRemark(remark);
- if(ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")){
+ if (ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")) {
serviceSubtaskPreachform1.setSendstate("7");
serviceSubtaskPreachform1.setRemark("浜哄伐鍙戦�佽秴鏃�");
}
@@ -1242,16 +1242,18 @@
//濡傛灉褰撳墠鐨刾reachform宸茬粡鏄渶鍚庝竴涓簡锛岄偅鐩存帴灏唖erviceSubtask鐨剆endstate鐘舵�佹敼鎴�5灏辫浜�(鍏ㄥけ璐ヤ簡)
if (serviceSubtaskPreachform1.getSort() == sspCount.size()) {
- if(ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")){
+ if (ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")) {
serviceSubtask.setCurrentPreachform(preachform);
serviceSubtask.setSendstate(7L);
serviceSubtask.setRemark("浜哄伐鍙戦�佽秴鏃�");
serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
return true;
- }else {
+ } else {
if (failSendstate.equals("4") || failSendstate.equals("5")) {
serviceSubtask.setCurrentPreachform(preachform);
serviceSubtask.setSendstate(5L);
+ log.error("setSuccessPreachForm鏂规硶锛屽綋鍓嶇殑preachform宸茬粡鏄渶鍚庝竴涓簡锛屽叏閮ㄦ墽琛屽け璐�");
+ serviceSubtask.setRemark("鎵�鏈夊彂閫佹柟寮忓潎鏈幏鍙栫粨鏋滐紝浠诲姟澶辫触");
//serviceSubtask.setRemark("setSuccessPreachForm鏂规硶锛屽綋鍓嶇殑preachform宸茬粡鏄渶鍚庝竴涓簡锛屽叏閮ㄦ墽琛屽け璐�");
serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
return true;
@@ -1266,10 +1268,10 @@
//灏嗕笅涓�娆$殑闅忚鏃堕棿涓庡綋鍓嶆墽琛屾柟寮忚褰曚竴涓�
serviceSubtask.setVisitTime(getNextVisitTime(serviceSubtask.getId(), serviceSubtask.getTaskid(), serviceSubtask.getVisitTime()));
serviceSubtask.setCurrentPreachform(preachform);
- if(ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")){
+ if (ObjectUtils.isNotEmpty(preachform) && preachform.equals("1")) {
serviceSubtask.setSendstate(7L);
serviceSubtask.setRemark("浜哄伐鍙戦�佽秴鏃�");
- }else {
+ } else {
serviceSubtask.setSendstate(3L);
}
if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) {
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
index 0ac375c..0c6d83e 100644
--- a/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
+++ b/smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -653,7 +653,7 @@
@ApiModelProperty(value = "寮傚父棰勮锛�0缁胯壊锛�1绾㈣壊锛�2榛勮壊; 3宸插鐞�")
private Integer isabnormal;
- @ApiModelProperty(value = "缁х画鏍囪瘑")
+ @ApiModelProperty(value = "缁х画鏍囪瘑:1鍚� 2鏄�")
private Integer continueFlag;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
diff --git a/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskCotinueCountVO.java b/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskCotinueCountVO.java
new file mode 100644
index 0000000..dded55c
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/VO/ServiceSubtaskCotinueCountVO.java
@@ -0,0 +1,31 @@
+package com.smartor.domain.VO;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 寤剁画鎶ょ悊缁熻璇锋眰
+ *
+ * @author ls
+ * @date 2026-04-11
+ */
+@ApiModel(value = "ServiceSubtaskCotinueCountVO", description = "寤剁画鎶ょ悊缁熻璇锋眰")
+@Data
+public class ServiceSubtaskCotinueCountVO {
+
+ @ApiModelProperty(value = "鐥呭尯Code闆嗗悎")
+ private List<String> leavehospitaldistrictcodes;
+
+ @ApiModelProperty(value = "绉戝Code闆嗗悎")
+ private List<String> deptcodes;
+
+ @ApiModelProperty("鏈烘瀯缂栫爜")
+ private String orgid;
+
+ @ApiModelProperty("闄㈠尯缂栫爜")
+ private String campusid;
+
+}
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
index 38234c8..3bb4019 100644
--- a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
+++ b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskMapper.java
@@ -2,6 +2,7 @@
import com.smartor.domain.*;
import com.smartor.domain.VO.PatSatisfactionReqVO;
+import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.domain.entity.ServiceSubtaskSatisfactionEntity;
import org.apache.ibatis.annotations.MapKey;
@@ -194,4 +195,20 @@
List<Long> querySendCount(ServiceSubtaskSatisfactionEntity serviceSubtaskSatisfactionEntity);
+ /**
+ * 鎸夌梾鍖哄垎缁勭粺璁″欢缁姢鐞嗘暟閲�
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 姣忎釜鐥呭尯鐨勭粺璁$粨鏋�
+ */
+ List<Map<String, Object>> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo);
+
+ /**
+ * 鎸夌瀹ゅ垎缁勭粺璁″欢缁姢鐞嗘暟閲�
+ *
+ * @param vo 鏌ヨ鏉′欢
+ * @return 姣忎釜绉戝鐨勭粺璁$粨鏋�
+ */
+ List<Map<String, Object>> getContinueNurseCountByDept(ServiceSubtaskCotinueCountVO vo);
+
}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java b/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
index 83f15bb..4bf23c9 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceSubtaskService.java
@@ -3,6 +3,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.smartor.domain.*;
import com.smartor.domain.ServiceSubtask;
+import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
import org.springframework.web.bind.annotation.RequestBody;
@@ -149,4 +150,13 @@
public List<ServiceSubtaskDiagname> convertToDiagnameList(List<ServiceSubtask> subtaskList) ;
public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity entity);
+
+ /**
+ * 鎸夌梾鍖烘垨绉戝缁熻寤剁画鎶ょ悊鏁伴噺
+ * 閮戒笉浼犳椂鍚屾椂鎸夌梾鍖哄拰绉戝鍚勭粺璁′竴閬�
+ *
+ * @param vo 鏌ヨ鏉′欢锛坙eavehospitaldistrictcodes 涓� deptcodes 浜掓枼锛�
+ * @return noContinueCount銆丆ontinueCount 鍙� detail 鍒楄〃
+ */
+ Map<String, Object> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo);
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
index 4ad097d..505759d 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -141,16 +141,6 @@
public PatMedRes selectPatMedInhospListCount(PatMedReq patMedReq) {
PatMedRes patMedRes = null;
// 鑾峰彇褰撳墠鐧婚檰浜虹殑閮ㄩ棬鏉冮檺
- if (org.springframework.util.CollectionUtils.isEmpty(patMedReq.getDeptcodeList())) {
-// Long userId = SecurityUtils.getUserId();
-// List<SysDept> sysDepts = sysUserDeptMapper.selectDeptListByUserId(userId);
-// List<String> deptCode = new ArrayList<>();
-// for (SysDept sysDept : sysDepts) {
-// deptCode.add(sysDept.getDeptId().toString());
-// }
-// patMedReq.setDeptcodeList(deptCode);
-// patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq);
- }
patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq);
return patMedRes;
}
@@ -448,6 +438,7 @@
/**
* 澶氱淮搴﹂殢璁�
+ *
* @param config
* @return
*/
@@ -486,14 +477,12 @@
* 鎸夌淮搴︽壘鍒版墍鏈夊尮閰嶉暱鏈熶换鍔★紝鎵归噺鐢熸垚 subtask
* type: 1=绉戝, 2=鐥呭尯, 3=鐤剧梾
*/
- private void processTasksByDimension(PatMedInhosp patMedInhosp1,
- PatArchive patArchive,
- String config, int type) {
+ private void processTasksByDimension(PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, int type) {
List<Long> matchedTaskIds = findMatchingTaskIds(patMedInhosp1, type);
if (CollectionUtils.isEmpty(matchedTaskIds)) {
- String reason = getDimensionReason(type);
- markFlagAsNoConfig(patMedInhosp1, type, reason);
+ String reason = getDimensionReason(type);
+ markFlagAsNoConfig(patMedInhosp1, type, reason);
return;
}
@@ -503,11 +492,11 @@
}
}
- private String getDimensionReason(int type){
+ private String getDimensionReason(int type) {
switch (type) {
case 1: { // 绉戝
return "鏈壘鍒扮瀹ゅ尮閰嶇殑闀挎湡浠诲姟";
- }
+ }
case 2: { // 鐥呭尯
return "鏈壘鍒扮梾鍖哄尮閰嶇殑闀挎湡浠诲姟";
}
@@ -518,9 +507,7 @@
return "澶氱淮闀挎湡浠诲姟-鍖归厤绫诲瀷涓虹┖";
}
- private void markFlagAsNoConfig(PatMedInhosp patMedInhosp,
- int type,
- String reason){
+ private void markFlagAsNoConfig(PatMedInhosp patMedInhosp, int type, String reason) {
switch (type) {
case 1: { // 绉戝
patMedInhosp.setDeptcheckFlag("2");
@@ -544,14 +531,14 @@
}
- private void markAllFlagsAsError(PatMedInhosp patMedInhosp,
- String reason){
+ private void markAllFlagsAsError(PatMedInhosp patMedInhosp, String reason) {
patMedInhosp.setDeptcheckFlag("2");
patMedInhosp.setWardcheckFlag("2");
patMedInhosp.setDiagcheckFlag("2");
patMedInhosp.setRemark(reason);
patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
}
+
/**
* 鏍规嵁缁村害绫诲瀷鏌ヨ鍖归厤鐨勯暱鏈熶换鍔� ID 鍒楄〃
*/
@@ -563,8 +550,7 @@
query.setDeptCode(patMedInhosp1.getLeaveldeptcode());
query.setDeptType("1");
query.setOrgid(patMedInhosp1.getOrgid());
- return serviceTaskdeptMapper.selectServiceTaskdeptList(query)
- .stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList());
+ return serviceTaskdeptMapper.selectServiceTaskdeptList(query).stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList());
}
case 2: { // 鐥呭尯
ServiceTaskdept query = new ServiceTaskdept();
@@ -572,8 +558,7 @@
query.setDeptCode(patMedInhosp1.getLeavehospitaldistrictcode());
query.setDeptType("2");
query.setOrgid(patMedInhosp1.getOrgid());
- return serviceTaskdeptMapper.selectServiceTaskdeptList(query)
- .stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList());
+ return serviceTaskdeptMapper.selectServiceTaskdeptList(query).stream().map(ServiceTaskdept::getTaskId).collect(Collectors.toList());
}
case 3: { // 鐤剧梾
if (StringUtils.isEmpty(patMedInhosp1.getLeaveicd10code())) return Collections.emptyList();
@@ -581,8 +566,7 @@
query.setLongtask(1L);
query.setIcd10code(patMedInhosp1.getLeaveicd10code());
query.setOrgid(patMedInhosp1.getOrgid());
- return serviceTaskdiagMapper.selectServiceTaskdiagList(query)
- .stream().map(ServiceTaskdiag::getTaskId).collect(Collectors.toList());
+ return serviceTaskdiagMapper.selectServiceTaskdiagList(query).stream().map(ServiceTaskdiag::getTaskId).collect(Collectors.toList());
}
}
return Collections.emptyList();
@@ -748,13 +732,12 @@
}
/**
- *
- * @param taskid 浠诲姟id
- * @param check 鏄惁闇�瑕佹牎楠�
+ * @param taskid 浠诲姟id
+ * @param check 鏄惁闇�瑕佹牎楠�
* @param patMedInhosp1 鐥呬汉鍑哄叆闄俊鎭�
- * @param patArchive 鐥呬汉淇℃伅
- * @param type 闅忚绫诲瀷(1-绉戝锛�2-鐥呭尯锛�3-鐤剧梾锛�
- * @param config 閰嶇疆淇℃伅 visit.early.day
+ * @param patArchive 鐥呬汉淇℃伅
+ * @param type 闅忚绫诲瀷(1-绉戝锛�2-鐥呭尯锛�3-鐤剧梾锛�
+ * @param config 閰嶇疆淇℃伅 visit.early.day
*/
//灏嗘偅鑰呮斁鍒皊ubtask涓�
private void writeInSubTask(Long taskid, Boolean check, PatMedInhosp patMedInhosp1, PatArchive patArchive, Integer type, String config) {
@@ -1119,8 +1102,7 @@
}
//鏅畞 鍑洪櫌棣栨锛�7澶╋級闅忚涓�瀹氳鍋�
boolean firstVisit = false;
- if (serviceSubtask1.getOrgid().equals("47255004333112711A1001")
- && serviceSubtask1.getVisitCount() != null && serviceSubtask1.getVisitCount() == 1) {
+ if (serviceSubtask1.getOrgid().equals("47255004333112711A1001") && serviceSubtask1.getVisitCount() != null && serviceSubtask1.getVisitCount() == 1) {
firstVisit = true;
}
if (!firstVisit) {
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
index 1c9bc79..61869a6 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -13,6 +13,7 @@
import com.smartor.common.FtpService;
import com.smartor.config.PhoneUtils;
import com.smartor.domain.*;
+import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
import com.smartor.domain.entity.ServiceSubtaskEntity;
import com.smartor.mapper.*;
import com.smartor.service.*;
@@ -1982,7 +1983,7 @@
// if (existSize > 0) return pullTaskVOList;
int count = 0;
long size = listOps.size("cache-0");
- log.error("---------鎵撶數璇濅箣鍓嶇紦瀛樹腑鐨勬暟鎹噺锛歿}", size);
+ log.info("---------鎵撶數璇濅箣鍓嶇紦瀛樹腑鐨勬暟鎹噺锛歿}", size);
if (size > 0) {
//phoneCount() 閫氳繃缁欏嚭鐨勬瘡涓皬鏃堕渶瑕佹墦鍑虹殑鐢佃瘽閲忥紝绠楀嚭鍒版櫄涓�8鐐逛竴鐐硅兘鎵撳嚭澶氬皯涓數璇濓紝鑾峰彇鍒版�婚噺
//濡傛灉闇�瑕佺珛鍗虫墽琛岀殑鏁版嵁閲忓ぇ浜庝竴澶╄鎵ц鐨勪笂闄愶紝鍒欏彧鍙栦笂闄愮殑鏁伴噺锛屽叾瀹冪殑鍒欐斁鍥瀝edis涓�
@@ -2031,7 +2032,7 @@
}
}
// if (existList.size() != 0) redisCache.setCacheListRight("cache-exist", existList);
- log.error("-----------瀹為檯鎷夊彇鐨勭數璇濇暟鎹噺锛歿}", CollectionUtils.isNotEmpty(pullTaskVOList) ? pullTaskVOList.size() : null);
+ log.info("-----------瀹為檯鎷夊彇鐨勭數璇濇暟鎹噺锛歿}", CollectionUtils.isNotEmpty(pullTaskVOList) ? pullTaskVOList.size() : null);
return pullTaskVOList;
}
@@ -3847,7 +3848,7 @@
if (serviceSubtaskPreachform1.getSort() == spSize.size() && failSendstate.equals("4")) {
serviceSubtask.setCurrentPreachform(preachform);
serviceSubtask.setSendstate(5L);
-// serviceSubtask.setRemark("setFailPreachForm鏂规硶 褰撳墠鐨刾reachform宸茬粡鏄渶鍚庝竴涓簡锛屽叏澶辫触浜�");
+ serviceSubtask.setRemark("鎵�鏈夊彂閫佹柟寮忓潎鏈幏鍙栫粨鏋滐紝浠诲姟澶辫触");
serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
return true;
}
@@ -4017,4 +4018,65 @@
public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity entity) {
return serviceSubtaskMapper.getCurrentUserServiceSubtaskCount(entity);
}
+
+ @Override
+ public Map<String, Object> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo) {
+ boolean hasDistrict = !CollectionUtils.isEmpty(vo.getLeavehospitaldistrictcodes());
+ boolean hasDept = !CollectionUtils.isEmpty(vo.getDeptcodes());
+
+ List<Map<String, Object>> districtRows;
+ List<Map<String, Object>> deptRows;
+
+ if (hasDistrict) {
+ // 鍙紶浜嗙梾鍖猴細浠呮寜鐥呭尯缁村害缁熻
+ districtRows = serviceSubtaskMapper.getContinueNurseCount(vo);
+ deptRows = Collections.emptyList();
+ } else if (hasDept) {
+ // 鍙紶浜嗙瀹わ細浠呮寜绉戝缁村害缁熻
+ districtRows = Collections.emptyList();
+ deptRows = serviceSubtaskMapper.getContinueNurseCountByDept(vo);
+ } else {
+ // 閮芥湭浼狅細鐥呭尯鍜岀瀹ゅ悇缁熻涓�閬�
+ districtRows = serviceSubtaskMapper.getContinueNurseCount(vo);
+ deptRows = serviceSubtaskMapper.getContinueNurseCountByDept(vo);
+ }
+
+ long totalNoContinue = 0L;
+ long totalContinue = 0L;
+ List<Map<String, Object>> detail = new ArrayList<>();
+
+ for (Map<String, Object> row : districtRows) {
+ String groupName = row.get("groupName") == null
+ ? (row.get("groupCode") == null ? "" : row.get("groupCode").toString())
+ : row.get("groupName").toString();
+ long noCnt = row.get("noContinueCnt") == null ? 0L : Long.parseLong(row.get("noContinueCnt").toString());
+ long yesCnt = row.get("continueCnt") == null ? 0L : Long.parseLong(row.get("continueCnt").toString());
+ totalNoContinue += noCnt;
+ totalContinue += yesCnt;
+ Map<String, Object> item = new LinkedHashMap<>();
+ item.put("鏈欢缁璤" + groupName, noCnt);
+ item.put("宸插欢缁璤"+groupName, yesCnt);
+ detail.add(item);
+ }
+
+ for (Map<String, Object> row : deptRows) {
+ String groupName = row.get("groupName") == null
+ ? (row.get("groupCode") == null ? "" : row.get("groupCode").toString())
+ : row.get("groupName").toString();
+ long noCnt = row.get("noContinueCnt") == null ? 0L : Long.parseLong(row.get("noContinueCnt").toString());
+ long yesCnt = row.get("continueCnt") == null ? 0L : Long.parseLong(row.get("continueCnt").toString());
+ totalNoContinue += noCnt;
+ totalContinue += yesCnt;
+ Map<String, Object> item = new LinkedHashMap<>();
+ item.put("鏈欢缁璤" + groupName, noCnt);
+ item.put("宸插欢缁璤" + groupName, yesCnt);
+ detail.add(item);
+ }
+
+ Map<String, Object> result = new LinkedHashMap<>();
+ result.put("鏈欢缁�绘暟閲�", totalNoContinue);
+ result.put("宸插欢缁�绘暟閲�", totalContinue);
+ result.put("璇︽儏", detail);
+ return result;
+ }
}
diff --git a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
index d6a5473..24f8484 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -854,167 +854,74 @@
<select id="selectPatMedInhospCount" parameterType="com.smartor.domain.PatMedReq"
resultType="com.smartor.domain.PatMedRes">
- SELECT SUM( rs ) AS rs,
- SUM( rc ) AS rc,
- SUM( scsf ) AS scsf,
- SUM( zcsf ) AS zcsf,
- SUM( zbsf ) AS zbsf
+ SELECT SUM(rc) AS rc,
+ SUM(rs) AS rs,
+ SUM(scsf) AS scsf,
+ SUM(zcsf) AS zcsf,
+ SUM(zbsf) AS zbsf
FROM (
- <!-- 鍑洪櫌浜烘-->
- SELECT
- COUNT(1) AS rc,
- 0 AS rs,
- 0 AS scsf,
- 0 AS zcsf,
- 0 AS zbsf
- FROM
- pat_med_inhosp
- JOIN
- pat_archive ON pat_archive.id = pat_med_inhosp.patid
- where 1=1
- and pat_med_inhosp.del_flag=0
- <if test="orgid != null and orgid != ''">
- and pat_med_inhosp.orgid = #{orgid}
- </if>
- AND pat_archive.idcardno IS NOT NULL
- <if test="zy != null">
- and pat_med_inhosp.inhospstate=0
- and date_format(pat_med_inhosp.starttime,'%y%m%d') >= date_format(#{startDate},'%y%m%d')
- and date_format(pat_med_inhosp.starttime,'%y%m%d') <= date_format(#{endDate},'%y%m%d')
- <if test="deptcodeList != null and deptcodeList.size() > 0">
- and pat_med_inhosp.deptcode in
+ <!-- 鍑洪櫌浜烘锛氬幓鎺� date_format 鍖呰锛屼娇鏃ユ湡瀛楁绱㈠紩鐢熸晥 -->
+ SELECT
+ COUNT(1) AS rc,
+ 0 AS rs,
+ 0 AS scsf,
+ 0 AS zcsf,
+ 0 AS zbsf
+ FROM pat_med_inhosp
+ JOIN pat_archive ON pat_archive.id = pat_med_inhosp.patid
+ WHERE pat_med_inhosp.del_flag = 0
+ <if test="orgid != null and orgid != ''">
+ AND pat_med_inhosp.orgid = #{orgid}
+ </if>
+ AND pat_archive.idcardno IS NOT NULL
+ <if test="zy != null">
+ AND pat_med_inhosp.inhospstate = 0
+ AND pat_med_inhosp.starttime >= #{startDate}
+ AND pat_med_inhosp.starttime < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
+ AND pat_med_inhosp.deptcode IN
+ <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+ </if>
+ <if test="cy != null">
+ AND pat_med_inhosp.inhospstate = 1
+ AND pat_med_inhosp.endtime >= #{startDate}
+ AND pat_med_inhosp.endtime < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
+ AND pat_med_inhosp.leaveldeptcode IN
+ <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+ </if>
+ UNION ALL
+ <!-- 闅忚鏈嶅姟/棣栨/鍐嶆/涓撶梾闅忚锛氬悎骞朵负鍗曟鎵弿锛岀敤鏉′欢鑱氬悎浠f浛4涓� UNION ALL -->
+ SELECT
+ 0 AS rc,
+ COUNT(1) AS rs,
+ SUM(CASE WHEN service_type = 2 AND visit_count = 1 THEN 1 ELSE 0 END) AS scsf,
+ SUM(CASE WHEN service_type = 2 AND visit_count > 1 THEN 1 ELSE 0 END) AS zcsf,
+ SUM(CASE WHEN service_type = 13 THEN 1 ELSE 0 END) AS zbsf
+ FROM service_subtask
+ WHERE del_flag = 0
+ AND service_type IN (2, 13)
+ <if test="orgid != null and orgid != ''">
+ AND orgid = #{orgid}
+ </if>
+ <if test="startDate != null">
+ AND visit_time >= #{startDate}
+ </if>
+ <if test="endDate != null">
+ AND visit_time < DATE_ADD(#{endDate}, INTERVAL 1 DAY)
+ </if>
+ <if test="deptcodeList != null and deptcodeList.size() > 0">
+ AND deptcode IN
<foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
#{deptcode}
</foreach>
</if>
- </if>
- <if test="cy != null">
- and pat_med_inhosp.inhospstate=1
- and date_format(pat_med_inhosp.endtime,'%y%m%d') >= date_format(#{startDate},'%y%m%d')
- and date_format(pat_med_inhosp.endtime,'%y%m%d') <= date_format(#{endDate},'%y%m%d')
- <if test="deptcodeList != null and deptcodeList.size() > 0">
- and pat_med_inhosp.leaveldeptcode in
- <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
- </foreach>
- </if>
- </if>
- <!-- 闅忚鏈嶅姟浜烘暟 -->
- union all
- select
- 0 AS rc,
- count(1) AS rs,
- 0 AS scsf,
- 0 AS zcsf,
- 0 AS zbsf
- FROM
- service_subtask
- where 1=1
- and del_flag = 0
- and service_type=2
- <if test="orgid != null and orgid != ''">
- and orgid = #{orgid}
- </if>
- <if test="startDate != null">
- AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
- </if>
- <if test="endDate != null">
- AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
- </if>
- <if test="deptcodeList != null and deptcodeList.size() > 0">
- and deptcode in
- <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
- </foreach>
- </if>
- <!-- 棣栨闅忚浜烘暟 -->
- union all
- select
- 0 AS rc,
- 0 AS rs,
- count(1) AS scsf,
- 0 AS zcsf,
- 0 AS zbsf
- FROM
- service_subtask
- where 1=1
- and del_flag = 0
- and service_type=2
- and visit_count is not null
- and visit_count = 1
- <if test="orgid != null and orgid != ''">
- and orgid = #{orgid}
- </if>
- <if test="startDate != null">
- AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
- </if>
- <if test="endDate != null">
- AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
- </if>
- <if test="deptcodeList != null and deptcodeList.size() > 0">
- and deptcode in
- <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
- </foreach>
- </if>
- <!-- 鍐嶆闅忚浜烘暟 -->
- union all
- select
- 0 AS rc,
- 0 AS rs,
- 0 AS scsf,
- count(1) AS zcsf,
- 0 AS zbsf
- FROM
- service_subtask
- where 1=1
- and del_flag = 0
- and service_type=2
- and visit_count is not null
- and visit_count > 1
- <if test="orgid != null and orgid != ''">
- and orgid = #{orgid}
- </if>
- <if test="startDate != null">
- AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
- </if>
- <if test="endDate != null">
- AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
- </if>
- <if test="deptcodeList != null and deptcodeList.size() > 0">
- and deptcode in
- <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
- </foreach>
- </if>
- <!-- 涓撶梾闅忚浜烘暟 -->
- union all
- select
- 0 AS rc,
- 0 AS rs,
- 0 AS scsf,
- 0 AS zcsf,
- count(1) AS zbsf
- FROM
- service_subtask
- where 1=1
- and del_flag = 0
- and service_type=13
- <if test="orgid != null and orgid != ''">
- and orgid = #{orgid}
- </if>
- <if test="startDate != null">
- AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' )
- </if>
- <if test="endDate != null">
- AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d')
- </if>
- <if test="deptcodeList != null and deptcodeList.size() > 0">
- and deptcode in
- <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")">
- #{deptcode}
- </foreach>
- </if>
) AS combined_data
</select>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index e4974d5..81d7ede 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -263,7 +263,7 @@
<select id="selectServiceSubtaskList" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
- where del_flag = 0
+ where del_flag = 0
<if test="continueFlag != null ">and continue_flag = #{continueFlag}</if>
<if test="continueTimeNow != null ">and continue_time_now = #{continueTimeNow,jdbcType=TIMESTAMP}</if>
<if test="continueCount != null ">and continue_count = #{continueCount}</if>
@@ -2414,4 +2414,62 @@
</if>
</select>
+ <!--
+ 鎸夌梾鍖烘垨绉戝鍒嗙粍缁熻 continue_flag 鏁伴噺
+ 浼犱簡 leavehospitaldistrictcodes 鈫� 鎸夌梾鍖虹淮搴�
+ 浼犱簡 deptcodes 鈫� 鎸夌瀹ょ淮搴�
+ 閮戒笉浼� 鈫� 鎸夌梾鍖虹淮搴︾粺璁″叏閲�
+ -->
+ <!-- 鎸夌梾鍖哄垎缁勭粺璁″欢缁姢鐞嗘暟閲� -->
+ <select id="getContinueNurseCount"
+ parameterType="com.smartor.domain.VO.ServiceSubtaskCotinueCountVO"
+ resultType="java.util.Map">
+ SELECT
+ leavehospitaldistrictcode AS groupCode,
+ leavehospitaldistrictname AS groupName,
+ SUM(CASE WHEN continue_flag = 1 THEN 1 ELSE 0 END) AS noContinueCnt,
+ SUM(CASE WHEN continue_flag = 2 THEN 1 ELSE 0 END) AS continueCnt
+ FROM service_subtask
+ WHERE del_flag = 0
+ AND continue_flag IN (1, 2)
+ AND leavehospitaldistrictcode IS NOT NULL AND leavehospitaldistrictcode != ''
+ <if test="orgid != null and orgid != ''">
+ AND orgid = #{orgid}
+ </if>
+ <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
+ AND leavehospitaldistrictcode IN
+ <foreach collection="leavehospitaldistrictcodes" item="code" open="(" separator="," close=")">
+ #{code}
+ </foreach>
+ </if>
+ GROUP BY leavehospitaldistrictcode, leavehospitaldistrictname
+ ORDER BY groupCode
+ </select>
+
+ <!-- 鎸夌瀹ゅ垎缁勭粺璁″欢缁姢鐞嗘暟閲� -->
+ <select id="getContinueNurseCountByDept"
+ parameterType="com.smartor.domain.VO.ServiceSubtaskCotinueCountVO"
+ resultType="java.util.Map">
+ SELECT
+ deptcode AS groupCode,
+ deptname AS groupName,
+ SUM(CASE WHEN continue_flag = 1 THEN 1 ELSE 0 END) AS noContinueCnt,
+ SUM(CASE WHEN continue_flag = 2 THEN 1 ELSE 0 END) AS continueCnt
+ FROM service_subtask
+ WHERE del_flag = 0
+ AND continue_flag IN (1, 2)
+ AND deptcode IS NOT NULL AND deptcode != ''
+ <if test="orgid != null and orgid != ''">
+ AND orgid = #{orgid}
+ </if>
+ <if test="deptcodes != null and deptcodes.size() > 0">
+ AND deptcode IN
+ <foreach collection="deptcodes" item="code" open="(" separator="," close=")">
+ #{code}
+ </foreach>
+ </if>
+ GROUP BY deptcode, deptname
+ ORDER BY groupCode
+ </select>
+
</mapper>
--
Gitblit v1.9.3