From fc1f48f6cb2736bf03b7750563e5d9830d6fd4ba Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 06 十一月 2026 13:49:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/smartor_ls_261103' into smartor_ls_261103
---
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java | 6 +
ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceOutPathServiceImpl.java | 5
ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java | 155 +++++++++++++++++++++++++++++++
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java | 12 +-
ruoyi-task/src/main/resources/mapper/task/ServiceOutPathMapper.xml | 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java | 35 +++++-
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 2
ruoyi-task/src/main/java/com/ruoyi/task/domain/ServiceOutPath.java | 4
ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java | 10 +-
ruoyi-admin/src/main/resources/application.yml | 9 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java | 7
12 files changed, 222 insertions(+), 30 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
index e8da574..5ddc7ab 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -344,7 +344,7 @@
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
// sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false");
//杞垚16杩涘埗
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
serviceOutPath.setUrl(ip + ":" + req_path + "/sf?p=" + format);
@@ -380,7 +380,7 @@
serviceOutPath.setDeptName(serviceSubtask.getLeaveldeptname());
serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
serviceOutPath.setUrl(StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/wt?p=" + format : ip + "/wt?p=" + format);
@@ -421,7 +421,7 @@
serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
String url = "";
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
//闇�瑕侀�氳繃妯℃澘ID鍘诲垽鏂鍙戠殑鍐呭鏄鏁欒繕鏄�氱煡
// 鈿狅笍 涓� RyTask 鍚屽彛寰勶細**鍒绘剰涓�**涓� TemplateModuleDisabledException 闄嶇骇 鈥斺��
// 妯℃澘妯″潡鍏抽棴鏃跺鏁欏唴瀹瑰彇涓嶅埌銆佺煭淇$‘瀹炲彂涓嶅嚭鍘伙紝澶栧眰 try-catch 濡傚疄璁板け璐�
@@ -522,7 +522,7 @@
serviceOutPath.setDeptName(serviceSubtask.getLeaveldeptname());
serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
url = ip + ":" + req_path + "/sf?p=" + format;
@@ -542,7 +542,7 @@
serviceOutPath.setDeptName(serviceSubtask.getLeaveldeptname());
serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
url = StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/wt?p=" + format : ip + "/wt?p=" + format;
//濡傛灉type鏄闊抽殢璁跨殑璇濓紙璇存槑琛ュ伩鍙戦�佹柟寮忎腑鏈夌數璇濋殢璁跨殑鏂瑰紡锛岃繖閲岀殑澶栭摼灏卞湴鍧�鍙兘鐢�/sf锛�
@@ -567,7 +567,7 @@
serviceOutPath.setWardName(serviceSubtask.getLeavehospitaldistrictname());
serviceOutPath.setOrgid(serviceSubtask.getOrgid());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
//闇�瑕侀�氳繃妯℃澘ID鍘诲垽鏂鍙戠殑鍐呭鏄鏁欒繕鏄�氱煡
// HeLibrary heLibrary = templateFacade.findHeLibraryById(serviceSubtask.getLibtemplateid());
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
index c65e184..9c42669 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/SmsController.java
@@ -8,6 +8,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.RSAPublicKeyExample;
+import com.ruoyi.common.utils.ShortCode;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sms.SmsUtils;
import com.ruoyi.message.SendResult;
@@ -122,7 +123,7 @@
String patid = rsaPublicKeyExample.encryptedData(vo.getPatId().toString(), pub_key);
String subId = rsaPublicKeyExample.encryptedData(vo.getSubId().toString(), pub_key);
Integer radix = iServiceOutPathService.selectAutoId();
- String format = String.format("%03X", radix);
+ String format = ShortCode.encode(radix.longValue());
ServiceOutPath serviceOutPath = new ServiceOutPath();
serviceOutPath.setParam1(taskId);
serviceOutPath.setParam2(patid);
@@ -174,7 +175,7 @@
String patid = rsaPublicKeyExample.encryptedData(vo.getPatId().toString(), pub_key);
String subId = rsaPublicKeyExample.encryptedData(vo.getSubId().toString(), pub_key);
Integer radix = iServiceOutPathService.selectAutoId();
- String format = String.format("%03X", radix);
+ String format = ShortCode.encode(radix.longValue());
ServiceOutPath serviceOutPath = new ServiceOutPath();
serviceOutPath.setParam1(taskId);
serviceOutPath.setParam2(patid);
@@ -210,7 +211,7 @@
String patid = rsaPublicKeyExample.encryptedData(vo.getPatId().toString(), pub_key);
String subId = rsaPublicKeyExample.encryptedData(vo.getSubId().toString(), pub_key);
Integer radix = iServiceOutPathService.selectAutoId();
- String format = String.format("%03X", radix);
+ String format = ShortCode.encode(radix.longValue());
ServiceOutPath serviceOutPath = new ServiceOutPath();
serviceOutPath.setParam1(taskId);
serviceOutPath.setParam2(patid);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
index c137721..5bbda21 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
@@ -8,6 +8,7 @@
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.RSAPublicKeyExample;
+import com.ruoyi.common.utils.ShortCode;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.BaseOrganization;
@@ -17,7 +18,6 @@
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
-import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@@ -69,16 +69,35 @@
}
/**
- * param灏辨槸杩涘埗
+ * 澶栭摼钀藉湴椤靛彇浠诲姟淇℃伅锛堟偅鑰呯煭淇¢噷鐨� {@code /wt?p=XXXXXX}锛屽尶鍚嶈闂紝涓嶈兘鍔犵櫥褰曟�侀壌鏉冿級銆�
*
- * @param param
- * @return
+ * <p>鐭爜鏈変袱绉嶅舰鎬侊紝閮借璁わ細
+ * <ul>
+ * <li><b>6 浣� base62</b>锛堟湰娆℃敼閫犲悗锛夆�斺�� 鐢� {@link ShortCode} 瀵逛富閿仛甯﹀瘑閽ュ弻灏勫緱鍒帮紝
+ * 涓嶅彲鏋氫妇锛涘厛鍙嶈В鍑轰富閿啀鎸� id 鏌ワ紝杩欐牱鍗充究 {@code radix} 鍒楄鎴柇鎴栨病钀藉簱涔熻兘鏌ュ埌锛�</li>
+ * <li><b>3~5 浣嶅崄鍏繘鍒�</b>锛堝巻鍙查摼鎺ワ級鈥斺�� 鐩存帴鎸� {@code radix} 鍒楁煡锛屼繚璇佸凡鍙戝嚭鐨勭煭淇¤繕鑳芥墦寮�銆�</li>
+ * </ul>
+ *
+ * @param param 鐭爜锛堟棫绉�"杩涘埗"锛�
+ * @return 浠诲姟淇℃伅锛涚煭鐮佹棤鏁堟椂 data 涓� null
*/
@PostMapping("/getInfoByParam")
- public AjaxResult param(@Param("param") String param) {
- ServiceOutPath serviceOutPath = new ServiceOutPath();
- serviceOutPath.setRadix(param);
- List<ServiceOutPath> list = serviceOutPathService.selectServiceOutPathList(serviceOutPath);
+ public AjaxResult param(@RequestParam(value = "param", required = false) String param) {
+ if (StringUtils.isEmpty(param)) {
+ return success(null);
+ }
+ List<ServiceOutPath> list = null;
+ Long id = ShortCode.decode(param);
+ if (id != null) {
+ ServiceOutPath byId = new ServiceOutPath();
+ byId.setId(id);
+ list = serviceOutPathService.selectServiceOutPathList(byId);
+ }
+ if (CollectionUtils.isEmpty(list)) {
+ ServiceOutPath byRadix = new ServiceOutPath();
+ byRadix.setRadix(param);
+ list = serviceOutPathService.selectServiceOutPathList(byRadix);
+ }
if (CollectionUtils.isNotEmpty(list)) {
ServiceOutPath serviceOutPath1 = list.get(0);
serviceOutPath1.setId(null);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index 2db43a0..dfa1ef9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -148,6 +148,10 @@
}
String redirectUrl = path + "/#/loginSSO?token=" + loginToken + "&orgid=" + orgid + "&campusid=" + campusid + "&orgname=null&ZuHuID=null&deptCode=null";
+ if (active.equals("sltd")) {
+ //鐪佺珛鍚屽痉涓嶈兘甯︹��#鈥�
+ redirectUrl = path + "/loginSSO?token=" + loginToken + "&orgid=" + orgid + "&campusid=" + campusid + "&orgname=null&ZuHuID=null&deptCode=null";
+ }
log.info("銆怱SO鐧诲綍銆戦噸瀹氬悜鍦板潃锛歿}", redirectUrl);
return buildRedirect(redirectUrl);
}
@@ -221,7 +225,7 @@
SysUser user = SecurityUtils.getLoginUser().getUser();
//鏄剧ず鎵�鏈夐櫌鍖烘潈闄�
String allCampus = sysConfigService.selectConfigByKey("sys.authority.campus.all");
- if(StringUtils.isNotEmpty(allCampus)){
+ if (StringUtils.isNotEmpty(allCampus)) {
allCampus = "," + allCampus + ",";
if (allCampus.contains("," + user.getUserName() + ",")) {
user.setCampusid(null);
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index abecd88..25806a4 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -15,6 +15,13 @@
# 楠岃瘉鐮佺被鍨� math 鏁扮粍璁$畻 char 瀛楃楠岃瘉
captchaType: math
+# 澶栭摼鐭爜锛�/wt?p=XXXXXX 閲岄偅 6 浣嶏級鐨勫姞瀵嗗瘑閽�
+# 鐭爜 = 甯﹀瘑閽ュ弻灏�(service_out_path.id)锛屽瘑閽ュ彧鍦ㄦ湇鍔$鍙備笌璁$畻锛屼笉鍑虹幇鍦ㄩ摼鎺ラ噷銆�
+# 鈿狅笍 涓婄嚎鍚庝笉瑕佷慨鏀癸細鏀逛簡涔嬪悗宸插彂鍑虹殑 6 浣嶇煭閾炬棤娉曞弽瑙o紝鍙兘闈� service_out_path.radix 鍏滃簳锛�
+# 鑰岃鍒椾竴鏃︾獎浜� 6 浣嶅氨浼氳鎴柇锛岀瓑浜庨偅鎵归摼鎺ュけ鏁堛��
+shortcode:
+ secret: smartor-outpath-shortcode-2026
+
# 寮�鍙戠幆澧冮厤缃�
server:
# 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080
@@ -78,7 +85,7 @@
# 鍥介檯鍖栬祫婧愭枃浠惰矾寰�
basename: i18n/messages
profiles:
- active: druid
+ active: sltd
# 鏂囦欢涓婁紶
servlet:
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index 571f2ac..01dfb24 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -112,6 +112,8 @@
// 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
// .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**","/getDept/*","/SSOLogin/**","/system/dict/data/typeout/*").permitAll().antMatchers( "/druid/**").permitAll()
+ // 鍏嶇櫥褰曢殢璁跨粺璁¢〉锛坧ublic/html/sfstat.html锛変娇鐢ㄧ殑鍖垮悕鎺ュ彛
+ .antMatchers("/smartor/serviceSubtask/publicSfStatistics", "/smartor/serviceSubtask/publicSfStatisticsOptions", "/smartor/serviceSubtask/publicContinueNerseCount").permitAll()
.antMatchers("/smartor/organization/list").permitAll()
// 闄や笂闈㈠鐨勬墍鏈夎姹傚叏閮ㄩ渶瑕侀壌鏉冭璇�
.anyRequest().authenticated().and().headers().frameOptions().disable();
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 768dc79..faec1e6 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
@@ -1399,7 +1399,7 @@
serviceOutPath.setOrgid(serviceSubtask.getOrgid());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
String url = "";
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
//鍏堝垽鏂竴涓嬪彂鐨勬槸涓嶆槸瀹f暀
log.info("serviceSubtask.getType鐨勫�间负锛歿}", serviceSubtask.getType());
if (!"3".equals(serviceSubtask.getType())) {
@@ -1542,7 +1542,7 @@
serviceOutPath.setCreateTime(new Date());
serviceOutPath.setOrgid(serviceSubtask.getOrgid());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
serviceOutPath.setUrl(url);
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java b/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
index e4e6b90..06b4a55 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
@@ -3,10 +3,12 @@
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.ISelect;
import com.ruoyi.common.annotation.AddOrgId;
+import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.HttpStatus;
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.domain.entity.SysUser;
import com.ruoyi.common.core.domain.entity.SysUserDept;
import com.ruoyi.common.core.domain.model.LoginUser;
@@ -64,6 +66,7 @@
import com.ruoyi.task.domain.VO.TransferDeptVO;
import com.ruoyi.task.domain.ServiceSubtaskExport;
import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysUserDeptService;
/**
@@ -111,6 +114,9 @@
@Autowired
private ISysConfigService sysConfigService;
+
+ @Autowired
+ private ISysDeptService sysDeptService;
/**
* 浠诲姟杩愮淮瑙﹀彂鑳藉姏銆�
@@ -595,6 +601,155 @@
return getDataTable4(CollectionUtils.isEmpty(sfStatistics) ? sfStatistics.size() : 0, serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq));
}
+ // =====================================================================================
+ // 鍏嶇櫥褰曢殢璁跨粺璁★紙渚� public/html/sfstat.html 鐙珛椤甸潰浣跨敤锛孈Anonymous 鍗� SecurityConfig 鐨� permitAll锛�
+ // 鍙e緞涓� /getSfStatistics 瀹屽叏涓�鑷达紝鍖哄埆鍙湁涓ょ偣锛�
+ // 1. 涓嶄緷璧栫櫥褰曠敤鎴凤紝orgid / campusid 鐢辫姹備綋鏄惧紡浼犲叆锛�
+ // 2. 鏈寚瀹氱梾鍖猴紙绉戝锛夋椂锛屽彇璇ユ満鏋勶紙闄㈠尯锛変笅鐨勫叏閮ㄧ梾鍖猴紙绉戝锛夛紝鑰岄潪褰撳墠鐧诲綍鐢ㄦ埛鐨勬潈闄愯寖鍥淬��
+ // =====================================================================================
+
+ /**
+ * 鍏嶇櫥褰曪細闅忚缁熻锛堥娆� / 鍐嶆锛�
+ */
+ @Anonymous
+ @PostMapping("/publicSfStatistics")
+ public Map<String, Object> publicSfStatistics(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) {
+ if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) {
+ return error("鏈嶅姟绫诲瀷涓嶈兘涓虹┖");
+ }
+ if (StringUtils.isEmpty(serviceSubtaskCountReq.getOrgid())) {
+ return error("缂哄皯鏈烘瀯鍙傛暟 orgid");
+ }
+ Integer statisticaltype = serviceSubtaskCountReq.getStatisticaltype();
+ if (statisticaltype != null && statisticaltype == 1) {
+ List<String> wardCodes = isAllSelected(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())
+ ? listDeptCodesByType(serviceSubtaskCountReq.getOrgid(), serviceSubtaskCountReq.getCampusid(), "2")
+ : serviceSubtaskCountReq.getLeavehospitaldistrictcodes();
+ if (CollectionUtils.isEmpty(wardCodes)) {
+ return getDataTable4(0, new ArrayList<>());
+ }
+ serviceSubtaskCountReq.setLeavehospitaldistrictcodes(wardCodes);
+ serviceSubtaskCountReq.setDeptcodes(null);
+ } else if (statisticaltype != null && statisticaltype == 2) {
+ List<String> deptCodes = isAllSelected(serviceSubtaskCountReq.getDeptcodes())
+ ? listDeptCodesByType(serviceSubtaskCountReq.getOrgid(), serviceSubtaskCountReq.getCampusid(), "1")
+ : serviceSubtaskCountReq.getDeptcodes();
+ if (CollectionUtils.isEmpty(deptCodes)) {
+ return getDataTable4(0, new ArrayList<>());
+ }
+ serviceSubtaskCountReq.setDeptcodes(deptCodes);
+ serviceSubtaskCountReq.setLeavehospitaldistrictcodes(null);
+ }
+ String followUpCountStyle = sysConfigService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid());
+ if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
+ serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
+ } else {
+ serviceSubtaskCountReq.setFollowUpCountStyle("1");
+ }
+ if (serviceSubtaskCountReq.getRateDay() == null) {
+ serviceSubtaskCountReq.setRateDay(7);
+ }
+ serviceSubtaskCountReq.setPageNum(null);
+ serviceSubtaskCountReq.setPageSize(null);
+ List<ServiceSubtaskStatistic> sfStatistics = serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq);
+ return getDataTable4(CollectionUtils.isEmpty(sfStatistics) ? 0 : sfStatistics.size(), sfStatistics);
+ }
+
+ /**
+ * 鍏嶇櫥褰曪細闅忚缁熻绛涢�夐」锛堢梾鍖哄垪琛� / 绉戝鍒楄〃锛�
+ *
+ * @param orgid 鏈烘瀯ID锛屽繀濉�
+ * @param campusid 闄㈠尯ID锛屽彲涓虹┖锛涗负绌烘椂鍙栬鏈烘瀯鍏ㄩ儴闄㈠尯
+ */
+ @Anonymous
+ @GetMapping("/publicSfStatisticsOptions") public AjaxResult publicSfStatisticsOptions(@RequestParam(value = "orgid", required = false) String orgid,
+ @RequestParam(value = "campusid", required = false) String campusid) {
+ if (StringUtils.isEmpty(orgid)) {
+ return error("缂哄皯鏈烘瀯鍙傛暟 orgid");
+ }
+ Map<String, Object> result = new LinkedHashMap<>();
+ result.put("orgid", orgid);
+ result.put("campusid", campusid);
+ result.put("wards", listDepts(orgid, campusid, "2"));
+ result.put("depts", listDepts(orgid, campusid, "1"));
+ return success(result);
+ }
+
+ /**
+ * 鍏嶇櫥褰曪細寤剁画鎶ょ悊缁熻锛堝彛寰勪笌 /getContinueNerseCount 涓�鑷达紝orgid / campusid 鐢辫姹備綋浼犲叆锛�
+ */
+ @Anonymous
+ @PostMapping("/publicContinueNerseCount")
+ public AjaxResult publicContinueNerseCount(@RequestBody ServiceSubtaskCotinueCountVO serviceSubtaskCotinueCountVO) {
+ if (StringUtils.isEmpty(serviceSubtaskCotinueCountVO.getOrgid())) {
+ return error("缂哄皯鏈烘瀯鍙傛暟 orgid");
+ }
+ List<String> districts = serviceSubtaskCotinueCountVO.getLeavehospitaldistrictcodes();
+ List<String> depts = serviceSubtaskCotinueCountVO.getDeptcodes();
+ boolean hasDistrict = !CollectionUtils.isEmpty(districts) && !districts.contains("all");
+ boolean hasDept = !CollectionUtils.isEmpty(depts) && !depts.contains("all");
+ if (hasDistrict && hasDept) {
+ return error("鐥呭尯Code闆嗗悎涓庣瀹ode闆嗗悎浜掓枼锛屼笉鑳藉悓鏃朵紶鍏�");
+ }
+ if (!hasDistrict && !hasDept) {
+ // 鏈寚瀹氱梾鍖�/绉戝锛氭寜璇ユ満鏋勶紙闄㈠尯锛変笅鍏ㄩ儴鐥呭尯缁熻
+ List<String> wardCodes = listDeptCodesByType(serviceSubtaskCotinueCountVO.getOrgid(),
+ serviceSubtaskCotinueCountVO.getCampusid(), "2");
+ if (CollectionUtils.isEmpty(wardCodes)) {
+ return success(new LinkedHashMap<>());
+ }
+ serviceSubtaskCotinueCountVO.setLeavehospitaldistrictcodes(wardCodes);
+ serviceSubtaskCotinueCountVO.setDeptcodes(null);
+ } else if (hasDistrict) {
+ serviceSubtaskCotinueCountVO.setDeptcodes(null);
+ } else {
+ serviceSubtaskCotinueCountVO.setLeavehospitaldistrictcodes(null);
+ }
+ return success(serviceSubtaskService.getContinueNurseCount(serviceSubtaskCotinueCountVO));
+ }
+
+ /**
+ * 鍓嶇鏈�夋嫨鍏蜂綋鐥呭尯/绉戝锛堟垨閫夋嫨浜� all锛夋椂锛岃涓衡�滃叏閮ㄢ��
+ */
+ private boolean isAllSelected(List<String> codes) {
+ return CollectionUtils.isEmpty(codes) || codes.contains("all");
+ }
+
+ private List<String> listDeptCodesByType(String orgid, String campusid, String deptType) {
+ List<String> codes = new ArrayList<>();
+ for (Map<String, String> item : listDepts(orgid, campusid, deptType)) {
+ codes.add(item.get("code"));
+ }
+ return codes;
+ }
+
+ /**
+ * 鏌ヨ鏈烘瀯锛堥櫌鍖猴級涓嬫寚瀹氱被鍨嬬殑閮ㄩ棬锛歞eptType=2 鐥呭尯锛宒eptType=1 绉戝
+ */
+ private List<Map<String, String>> listDepts(String orgid, String campusid, String deptType) {
+ List<Map<String, String>> result = new ArrayList<>();
+ SysDept query = new SysDept();
+ query.setOrgid(orgid);
+ query.setDeptType(deptType);
+ if (StringUtils.isNotEmpty(campusid) && !"all".equalsIgnoreCase(campusid)) {
+ query.setCampusid(campusid);
+ }
+ List<SysDept> depts = sysDeptService.selectSysDeptList(query);
+ if (CollectionUtils.isEmpty(depts)) {
+ return result;
+ }
+ for (SysDept dept : depts) {
+ if (StringUtils.isEmpty(dept.getDeptCode())) {
+ continue;
+ }
+ Map<String, String> item = new LinkedHashMap<>();
+ item.put("code", dept.getDeptCode());
+ item.put("name", dept.getDeptName());
+ result.add(item);
+ }
+ return result;
+ }
+
/**
* 鑾峰彇涓撶梾闅忚缁熻姣斾緥
*/
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/domain/ServiceOutPath.java b/ruoyi-task/src/main/java/com/ruoyi/task/domain/ServiceOutPath.java
index 0bf57ad..abcb858 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/domain/ServiceOutPath.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/domain/ServiceOutPath.java
@@ -83,8 +83,8 @@
@ApiModelProperty(value = "绉戝鍚嶇О")
private String deptName;
- @ApiModelProperty(value = "鐥呬汉淇℃伅")
- private PatArchive patArchive;
+// @ApiModelProperty(value = "鐥呬汉淇℃伅")
+// private PatArchive patArchive;
/**
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceOutPathServiceImpl.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceOutPathServiceImpl.java
index f8cce0d..ba93d32 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceOutPathServiceImpl.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceOutPathServiceImpl.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.RSAPublicKeyExample;
+import com.ruoyi.common.utils.ShortCode;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -94,8 +95,8 @@
sop.setDeptName(serviceTask.getDeptname());
sop.setWardName(serviceTask.getLeavehospitaldistrictname());
serviceOutPathMapper.insertServiceOutPath(sop);
- //杞垚16杩涘埗骞跺洖鍐檙adix鍜寀pdateTime
- serviceOutPath.setRadix(String.format("%03X", sop.getId()));
+ // 鐢熸垚 6 浣� base62 鐭爜锛堝甫瀵嗛挜鍙屽皠锛屼笉鍙灇涓撅級骞跺洖鍐� radix 鍜� updateTime
+ serviceOutPath.setRadix(ShortCode.encode(sop.getId()));
serviceOutPath.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + sop.getRadix() : localIP + "/wt?p=" + sop.getRadix());
serviceOutPathMapper.updateServiceOutPath(serviceOutPath);
return serviceOutPath.getUrl();
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java
index eb6683c..857be70 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java
@@ -913,7 +913,7 @@
serviceOutPath.setSubId(serviceSubtask1.getId());
List<ServiceOutPath> serviceOutPaths = serviceOutPathMapper.selectServiceOutPathList(serviceOutPath);
if (CollectionUtils.isNotEmpty(serviceOutPaths))
- format = String.format("%03X", serviceOutPaths.get(0).getId());
+ format = ShortCode.encode(serviceOutPaths.get(0).getId());
else format = getOutPath(serviceSubtask1, rsaPublicKeyExample);
serviceSubtask = serviceSubtask1;
} else {
@@ -965,7 +965,7 @@
serviceOutPath.setSubId(serviceSubtask.getId());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
//杞垚16杩涘埗
- format = String.format("%03X", serviceOutPath.getId());
+ format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
iServiceOutPathService.updateServiceOutPath(serviceOutPath);
@@ -5128,7 +5128,7 @@
serviceOutPath.setCreateTime(new Date());
serviceOutPath.setOrgid(serviceSubtask.getOrgid());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
String url = "";
SendMagParam sendMagParam = new SendMagParam();
sendMagParam.setType("4");
@@ -5212,7 +5212,7 @@
serviceOutPath.setCreateTime(new Date());
serviceOutPath.setOrgid(serviceSubtask.getOrgid());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
serviceOutPath.setUrl(url);
@@ -5427,7 +5427,7 @@
serviceOutPath.setCreateTime(new Date());
serviceOutPath.setOrgid(serviceTask.getOrgid());
iServiceOutPathService.insertServiceOutPath(serviceOutPath);
- String format = String.format("%03X", serviceOutPath.getId());
+ String format = ShortCode.encode(serviceOutPath.getId());
serviceOutPath.setRadix(format);
serviceOutPath.setUpdateTime(new Date());
String url = StringUtils.isNotEmpty(req_path) ? ip + ":" + req_path + "/wt?p=" + format : ip + "/wt?p=" + format;
diff --git a/ruoyi-task/src/main/resources/mapper/task/ServiceOutPathMapper.xml b/ruoyi-task/src/main/resources/mapper/task/ServiceOutPathMapper.xml
index 6b96d34..07ba4ef 100644
--- a/ruoyi-task/src/main/resources/mapper/task/ServiceOutPathMapper.xml
+++ b/ruoyi-task/src/main/resources/mapper/task/ServiceOutPathMapper.xml
@@ -55,6 +55,9 @@
<include refid="selectServiceOutPathVo"/>
where 1=1
and del_flag = 0
+ <if test="id != null">
+ and id = #{id}
+ </if>
<if test="param1 != null ">
and param1 = #{param1}
</if>
--
Gitblit v1.9.3