From 6393d6ba70099f1b47f4124e06426f016fb28052 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 01 七月 2025 14:59:58 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java | 25
smartor/src/main/java/com/smartor/service/impl/PatSatisfactionServiceImpl.java | 102 +++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java | 4
ruoyi-common/src/main/java/com/ruoyi/common/utils/RSAPublicKeyExample.java | 8
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java | 6
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java | 25
smartor/src/main/java/com/smartor/domain/PatArchive.java | 13
smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java | 17
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java | 20
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 3
smartor/src/main/java/com/smartor/service/IPatSatisfactionService.java | 61 ++
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java | 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java | 2
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java | 12
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java | 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSatisfactionController.java | 137 ++++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java | 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TemplateDeptController.java | 2
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java | 14
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 6
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java | 6
smartor/src/main/java/com/smartor/domain/PatSatisfaction.java | 142 ++++
smartor/src/main/java/com/smartor/mapper/PatSatisfactionMapper.java | 64 ++
smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml | 306 ++++++++++
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 59 +
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 281 ++++----
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 305 +++-------
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java | 15
smartor/src/main/java/com/smartor/common/FtpService.java | 2
smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java | 2
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java | 4
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java | 12
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java | 11
36 files changed, 1,260 insertions(+), 433 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 0f2bbf1..450772d 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
@@ -104,7 +104,7 @@
public void onMessage(Message message, byte[] pattern) {
log.info("鐩戝惉Redis key杩囨湡锛宬ey锛歿}锛宑hannel锛歿}", message.toString(), new String(pattern));
String ip = localIP;
- log.error("鏈満鐨勭綉缁淚P涓�:{}", ip);
+ log.info("鏈満鐨勭綉缁淚P涓�:{}", ip);
String content = message.toString();
//鍒ゆ柇鏄笉鏄换鍔′俊鎭紝濡傛灉涓嶆槸锛岀洿鎺ヨ繑鍥烇紝涓嶉渶瑕佹墽琛�
if (!content.contains("taskid") || !port.equals("8095")) {
@@ -154,7 +154,7 @@
* @param commonTaskcallMQ
*/
public void tsakHandle(CommonTaskcallMQ commonTaskcallMQ, String ip, Integer type) {
- log.error("杩涗换鍔′簡鍚楋紵{}", commonTaskcallMQ);
+ log.info("杩涗换鍔′簡鍚楋紵{}", commonTaskcallMQ);
//鍒ゆ柇涓�涓媍ommonTaskcallMQ涓殑stopstate鏄惁涓巌vr_task涓殑涓�鑷达紝涓嶄竴鑷达紝鍒欒鏄庢槸鏆傚仠浜�
ServiceTask ivrTask1 = ivrTaskMapper.selectServiceTaskByTaskid(commonTaskcallMQ.getTaskid());
@@ -166,7 +166,7 @@
if (StringUtils.isNotEmpty(commonTaskcallMQ.getPreachform())) {
//濡備綍浠诲姟鍙戦�佹柟寮忎笉涓虹┖
String[] split = commonTaskcallMQ.getPreachform().split(",");
- log.error("split鐨勫�间负锛歿}", split);
+ log.info("split鐨勫�间负锛歿}", split);
//瀹氫箟涓�涓泦鍚堬紝鐢ㄤ笌瀛樻病鏈夋墽琛岀殑瀛愪换鍔D
List<Long> subIds = new ArrayList<>();
@@ -211,13 +211,13 @@
//璇存槑鏄珛鍗冲彂閫�
ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO();
serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid());
- log.error("缂撳瓨涓璼erviceSubtask1鐨勫�间负锛歿}", serviceSubtask1);
+ log.info("缂撳瓨涓璼erviceSubtask1鐨勫�间负锛歿}", serviceSubtask1);
List<String> list = new ArrayList<>();
List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1);
for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
list.add(serviceSubtask2.getId().toString());
}
- log.error("缂撳瓨涓璫ache-0鐨勫�间负锛歿}", list);
+ log.info("缂撳瓨涓璫ache-0鐨勫�间负锛歿}", list);
// redisCache.setCacheListLeft("cache-0", list);
redisCache.setCacheListLeftAndDistinct("cache-0", list);
} else {
@@ -384,7 +384,7 @@
//涓芥按鐨勭煭淇″彂閫佹柟寮�
Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid());
String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid());
- log.error("-----------token鐨勫�间负锛歿}", token);
+ log.info("-----------token鐨勫�间负锛歿}", token);
if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) {
ServiceSubtask ss = new ServiceSubtask();
ss.setResult("error");
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
index 8ad8488..7d34762 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -247,7 +247,7 @@
@ApiOperation("瀵屾枃鏈浆html")
@PostMapping("/htmlContent")
public AjaxResult htmlContent(@RequestBody HtmlContentVO htmlContentVO) {
- log.error("htmlContentVO鍏ュ弬涓猴細{}", htmlContentVO);
+ log.info("htmlContentVO鍏ュ弬涓猴細{}", htmlContentVO);
// 鑾峰彇鏂囦欢鐨勫師濮嬪悕绉�
String fileName = htmlContentVO.getFileName();
if (!fileName.endsWith(".html")) {
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
index 4f31ebc..8c4b521 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/hanler/ChatWebSocketHandler.java
@@ -327,7 +327,7 @@
StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) &&
StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) &&
matcher.matches()) {
- log.error("鍖归厤姝g‘浜�");
+ log.info("鍖归厤姝g‘浜�");
//璇存槑鍖归厤姝g‘浜�
ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(1);
List<IvrLibaTemplateScriptVO> backQuset = redisCache.getCacheObject(userId + "backQuset");
@@ -369,7 +369,7 @@
break;
}
} else {
- log.error("鏃犲尮閰�");
+ log.info("鏃犲尮閰�");
//娌℃湁鍖归厤鍒�
Integer mateNum = redisCache.getCacheObject(userId + "mateNum");
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java
index 645cf83..782828e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/AIRobot/AIRobotPhoneCallBackController.java
@@ -35,7 +35,7 @@
@ApiOperation("AIRobot鍛煎彨鍒拌揪绾胯矾鍚庣殑鐘舵�佽繑鍥炴帴鍙�")
@PostMapping("/callstatus")
public AjaxResult callstatus(@RequestBody RobotCallBack robotCallBack) {
- log.error("AIRobot鍛煎彨鍒拌揪绾胯矾鍚庣殑鐘舵�佽繑鍥炴帴鍙�---------{}", robotCallBack);
+ log.info("AIRobot鍛煎彨鍒拌揪绾胯矾鍚庣殑鐘舵�佽繑鍥炴帴鍙�---------{}", robotCallBack);
aiRobotPhoneCallBackService.callstatus(robotCallBack);
return success();
}
@@ -46,7 +46,7 @@
@ApiOperation("AIRobot鐢ㄦ埛 AI 浜や簰鏁版嵁杩斿洖鎺ュ彛(鍖呮嫭 n 绉嶈妭鐐圭殑杩斿洖鏁版嵁鍖�)")
@PostMapping("/aidialog")
public AjaxResult aidialog(@RequestBody RobotAIDialogBack robotAIDialogBack) {
- log.error("鐢ㄦ埛 AI 浜や簰鏁版嵁杩斿洖鎺ュ彛(鍖呮嫭 n 绉嶈妭鐐圭殑杩斿洖鏁版嵁鍖�)-----------{}", robotAIDialogBack);
+ log.info("鐢ㄦ埛 AI 浜や簰鏁版嵁杩斿洖鎺ュ彛(鍖呮嫭 n 绉嶈妭鐐圭殑杩斿洖鏁版嵁鍖�)-----------{}", robotAIDialogBack);
aiRobotPhoneCallBackService.aidialog(robotAIDialogBack);
return success();
}
@@ -57,7 +57,7 @@
@ApiOperation("鎸傛満璁¤垂淇℃伅杩斿洖鏁版嵁鎺ュ彛")
@PostMapping("/cdrinfo")
public AjaxResult cdrinfo(@RequestBody RobotcdrInfoBack robotAIDialogBack) {
- log.error("鎸傛満璁¤垂淇℃伅杩斿洖鏁版嵁鎺ュ彛-----------{}", robotAIDialogBack);
+ log.info("鎸傛満璁¤垂淇℃伅杩斿洖鏁版嵁鎺ュ彛-----------{}", robotAIDialogBack);
aiRobotPhoneCallBackService.cdrinfo(robotAIDialogBack);
return success();
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
index d727111..d8ec2bd 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
@@ -1,16 +1,21 @@
package com.ruoyi.web.controller.smartor;
import java.lang.reflect.Array;
+import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import javax.servlet.http.HttpServletResponse;
+import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.PageUtils;
import com.smartor.domain.PatMedReq;
import com.smartor.domain.PatMedRes;
+import io.netty.util.internal.ObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.ObjectUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -63,6 +68,12 @@
@PostMapping("/selectPatMedOuthospCount")
@ApiOperation("鏌ヨ闂ㄨ瘖鐪嬬梾浜烘鍜屼汉鏁�")
public AjaxResult selectPatMedOuthospCount(@RequestBody PatMedReq patMedReq) {
+ SysUser user = getLoginUser().getUser();
+ List<String> deptCode = new ArrayList<>();
+ for (Map<String, Object> map : user.getBelongDepts()) {
+ if (ObjectUtils.isNotEmpty(map.get("deptCode"))) deptCode.add(map.get("deptCode").toString());
+ }
+ patMedReq.setDeptcodeList(deptCode);
PatMedRes patMedRes = patMedOuthospService.selectPatMedOuthospCount(patMedReq);
return success(patMedRes);
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSatisfactionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSatisfactionController.java
new file mode 100644
index 0000000..78cbfa1
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatSatisfactionController.java
@@ -0,0 +1,137 @@
+package com.ruoyi.web.controller.smartor;
+
+import java.util.List;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.smartor.domain.PatSatisfaction;
+import com.smartor.service.IPatSatisfactionService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 鎮h�呮弧鎰忓害Controller
+ *
+ * @author lihu
+ * @date 2025-06-30
+ */
+@Api(description = "鎮h�呮弧鎰忓害")
+@RestController
+@RequestMapping("/smartor/satisfaction")
+public class PatSatisfactionController extends BaseController {
+ @Autowired
+ private IPatSatisfactionService patSatisfactionService;
+
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害鍒楄〃
+ */
+ @ApiOperation("鏌ヨ鎮h�呮弧鎰忓害鍒楄〃")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:list')")
+ @PostMapping("/list")
+ public TableDataInfo list(@RequestBody PatSatisfaction patSatisfaction) {
+ startPage();
+ List<PatSatisfaction> list = patSatisfactionService.selectPatSatisfactionList(patSatisfaction);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭鎮h�呮弧鎰忓害鍒楄〃
+ */
+ @ApiOperation("瀵煎嚭鎮h�呮弧鎰忓害鍒楄〃")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:export')")
+ @Log(title = "鎮h�呮弧鎰忓害", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, PatSatisfaction patSatisfaction) {
+ List<PatSatisfaction> list = patSatisfactionService.selectPatSatisfactionList(patSatisfaction);
+ ExcelUtil<PatSatisfaction> util = new ExcelUtil<PatSatisfaction>(PatSatisfaction.class);
+ util.exportExcel(response, list, "鎮h�呮弧鎰忓害鏁版嵁");
+ }
+
+ /**
+ * 鑾峰彇鎮h�呮弧鎰忓害璇︾粏淇℃伅
+ */
+ @ApiOperation("鑾峰彇鎮h�呮弧鎰忓害璇︾粏淇℃伅")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:query')")
+ @GetMapping(value = "/getInfo/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
+ return success(patSatisfactionService.selectPatSatisfactionById(id));
+ }
+
+ /**
+ * 鏂板鎮h�呮弧鎰忓害
+ */
+ @ApiOperation("鏂板鎮h�呮弧鎰忓害")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:add')")
+ @Log(title = "鎮h�呮弧鎰忓害", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ public AjaxResult add(@RequestBody PatSatisfaction patSatisfaction) {
+ LoginUser loginUser = getLoginUser();
+ SysUser user = loginUser.getUser();
+ patSatisfaction.setCreateBy(user.getNickName());
+ patSatisfaction.setOrgid(user.getOrgid());
+ return toAjax(patSatisfactionService.insertPatSatisfaction(patSatisfaction));
+ }
+
+
+ /**
+ * 鏂板鎮h�呮弧鎰忓害
+ */
+ @ApiOperation("鎵归噺鏂板鎮h�呮弧鎰忓害")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:add')")
+ @Log(title = "鎮h�呮弧鎰忓害", businessType = BusinessType.INSERT)
+ @PostMapping("/batchinsert")
+ public AjaxResult batchinsert(@RequestBody List<PatSatisfaction> patSatisfaction) {
+ LoginUser loginUser = getLoginUser();
+ SysUser user = loginUser.getUser();
+ for (PatSatisfaction patSatisfaction1 : patSatisfaction) {
+ patSatisfaction1.setCreateBy(user.getNickName());
+ patSatisfaction1.setOrgid(user.getOrgid());
+ patSatisfactionService.insertPatSatisfaction(patSatisfaction1);
+ }
+ return toAjax(1);
+ }
+
+ /**
+ * 淇敼鎮h�呮弧鎰忓害
+ */
+ @ApiOperation("淇敼鎮h�呮弧鎰忓害")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:edit')")
+ @Log(title = "鎮h�呮弧鎰忓害", businessType = BusinessType.UPDATE)
+ @PostMapping("/edit")
+ public AjaxResult edit(@RequestBody PatSatisfaction patSatisfaction) {
+ LoginUser loginUser = getLoginUser();
+ SysUser user = loginUser.getUser();
+ patSatisfaction.setCreateBy(user.getNickName());
+ return toAjax(patSatisfactionService.updatePatSatisfaction(patSatisfaction));
+ }
+
+ /**
+ * 鍒犻櫎鎮h�呮弧鎰忓害
+ */
+ @ApiOperation("鍒犻櫎鎮h�呮弧鎰忓害")
+ //@PreAuthorize("@ss.hasPermi('smartor:satisfaction:remove')")
+ @Log(title = "鎮h�呮弧鎰忓害", businessType = BusinessType.DELETE)
+ @GetMapping("/remove/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids) {
+ return toAjax(patSatisfactionService.deletePatSatisfactionByIds(ids));
+ }
+}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
index 7d2086f..b696c11 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceExternalController.java
@@ -62,7 +62,7 @@
@ApiOperation("鏂板浣撴浠诲姟杩涘瓙浠诲姟")
@PostMapping("/generalInterfaceAddTask")
public AjaxResult generalInterfaceAddTask(@RequestBody ServiceTaskInfo serviceTaskInfo) {
- log.error("------serviceTaskInfo鐨勫�间负锛歿}", serviceTaskInfo);
+ log.info("------serviceTaskInfo鐨勫�间负锛歿}", serviceTaskInfo);
Integer res = 0;
try {
res = svyTaskSingleService.insertTaskInfo(serviceTaskInfo);
@@ -80,7 +80,7 @@
@ApiOperation("360鎮h�呬俊鎭幏鍙�")
@PostMapping("/query360PatInfo")
public Map query360PatInfo(@RequestBody ServiceQueryInfo serviceQueryInfo) {
- log.error("------serviceQueryInfo鐨勫叆鍙備负锛歿}", serviceQueryInfo);
+ log.info("------serviceQueryInfo鐨勫叆鍙備负锛歿}", serviceQueryInfo);
Map map = null;
try {
map = svyTaskSingleService.query360PatInfo(serviceQueryInfo);
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
index 4fb2526..0dafc62 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskAnswerController.java
@@ -107,7 +107,7 @@
@ApiOperation("鎮h�呴棶棰樼粨鏋滆褰�(澶栭摼)")
@PostMapping("/saveQuestionAnswer")
public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) {
- log.error("-----saveQuestionAnswer鏂规硶鐨勫叆鍙備负锛歿}", serviceSubTaskAnswerReq);
+ log.info("-----saveQuestionAnswer鏂规硶鐨勫叆鍙備负锛歿}", serviceSubTaskAnswerReq);
return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 0L));
}
@@ -122,7 +122,7 @@
@ApiOperation("鎮h�呴棶棰樼粨鏋滆褰�(灏忕▼鍏呭閾�)")
@PostMapping("/saveQuestionAnswerXCH")
public AjaxResult saveQuestionAnswerXCH(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) {
- log.error("-------saveQuestionAnswerXCH鐨勫叆鍙傜殑鍊间负锛歿}", serviceSubTaskAnswerReq);
+ log.info("-------saveQuestionAnswerXCH鐨勫叆鍙傜殑鍊间负锛歿}", serviceSubTaskAnswerReq);
return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 1L));
}
@@ -135,7 +135,7 @@
@ApiOperation("鎮h�呴棶棰樼粨鏋滆褰曠紦瀛�(澶栭摼)")
@PostMapping("/saveQuestionCache")
public AjaxResult saveQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) {
- log.error("serviceSubTaskCacheReq鐨勫叆鍙備负锛歿}", serviceSubTaskCacheReq);
+ log.info("serviceSubTaskCacheReq鐨勫叆鍙備负锛歿}", serviceSubTaskCacheReq);
return toAjax(serviceSubtaskAnswerService.saveQuestionCache(serviceSubTaskCacheReq, 0L));
}
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 4a2ef29..69c6051 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
@@ -192,7 +192,7 @@
@Log(title = "鍗曚竴浠诲姟锛堥殢璁匡級", businessType = BusinessType.INSERT)
@PostMapping("/insertOrUpdateTask")
public AjaxResult insertOrUpdateHeTask(@RequestBody ServiceTaskVO ivrTaskVO) {
- log.error("insertOrUpdateHeTask鐨勫叆鍙備负锛歿}", ivrTaskVO);
+ log.info("insertOrUpdateHeTask鐨勫叆鍙備负锛歿}", ivrTaskVO);
LoginUser loginUser = getLoginUser();
SysUser user = loginUser.getUser();
ivrTaskVO.setCreateBy(user.getNickName());
@@ -249,7 +249,7 @@
@ApiOperation("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划)")
@PostMapping("/phoneCallBackYQ")
public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) {
- log.error("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划) 锛焮}", phoneCallReqYQVO);
+ log.info("鐢佃瘽ASR閫氳瘽鍥炶皟(闆ㄧ划) 锛焮}", phoneCallReqYQVO);
// SysUser user = getLoginUser().getUser();
// phoneCallReqYQVO.setOrgid(user.getOrgid());
PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO);
@@ -262,11 +262,9 @@
@ApiOperation("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划)")
@PostMapping("/taskPull")
public List<PullTaskVO> taskPull() {
- log.error("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划)");
+ log.info("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划)");
List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull();
-// List<PullTaskVO> pullTaskVOList = new ArrayList<>();
-
- log.error("鐢佃瘽浠诲姟鎷夊彇(闆ㄧ划):{}", pullTaskVOList);
+ log.info("鐢佃瘽浠诲姟鎷夊彇鏁版嵁(闆ㄧ划):{}", pullTaskVOList);
return pullTaskVOList;
}
@@ -296,10 +294,7 @@
@ApiOperation("閫氳瘽璁板綍鍥炶皟(闆ㄧ划)")
@PostMapping("/recordAccept")
public AjaxResult recordAccept(@RequestBody PhoneCallRecordVO phoneCallRecordVO) {
- log.error("閫氳瘽璁板綍鍥炶皟(闆ㄧ划):{}", phoneCallRecordVO);
-// return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
-// SysUser user = getLoginUser().getUser();
-// phoneCallRecordVO.setOrgid(user.getOrgid());
+ log.info("閫氳瘽璁板綍鍥炶皟(闆ㄧ划):{}", phoneCallRecordVO);
serviceSubtaskService.recordAccept(phoneCallRecordVO);
return success();
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
index dd7e71e..c4db88e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskController.java
@@ -182,7 +182,7 @@
public AjaxResult getScriptInfoByCondition(@RequestBody ServiceTaskScriptQues serviceTaskScriptQues) {
Long tid = null;
Long pid = null;
- log.error("getScriptInfoByCondition鍏ュ弬涓猴細{}", serviceTaskScriptQues);
+ log.info("getScriptInfoByCondition鍏ュ弬涓猴細{}", serviceTaskScriptQues);
try {
tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam1(), pri_key));
pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceTaskScriptQues.getParam2(), pri_key));
@@ -190,7 +190,7 @@
log.error("getScriptInfoByCondition鎶ラ敊浜嗭細{}", e.getMessage());
}
- log.error("tid鍜宲id鐨勫�间负锛歿},{}", tid, pid);
+ log.info("tid鍜宲id鐨勫�间负锛歿},{}", tid, pid);
if (StringUtils.isEmpty(serviceTaskScriptQues.getPatfrom())) serviceTaskScriptQues.setPatfrom("0");
return success(serviceTaskService.getScriptInfoByCondition(tid, pid, true, serviceTaskScriptQues.getPatfrom()));
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TemplateDeptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TemplateDeptController.java
index 7c1b164..09f27fa 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TemplateDeptController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/TemplateDeptController.java
@@ -98,7 +98,7 @@
@Log(title = "妯℃澘绉戝鍏宠仈", businessType = BusinessType.DELETE)
@GetMapping("/remove/{id}")
public AjaxResult remove(@PathVariable("id") Long id) {
- log.error("鍒犻櫎鐨処D涓猴細{}",id);
+ log.info("鍒犻櫎鐨処D涓猴細{}",id);
return toAjax(templateDeptService.deleteTemplateDeptById(id));
}
}
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 dd2aed7..28bd80e 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
@@ -93,7 +93,7 @@
@GetMapping("getRouters")
public AjaxResult getRouters() {
Long userId = SecurityUtils.getUserId();
- log.error("----------getRouters鐨剈serId鍏ュ弬涓猴細{}", userId);
+ log.info("----------getRouters鐨剈serId鍏ュ弬涓猴細{}", userId);
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
return AjaxResult.success(menuService.buildMenus(menus));
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index cde3492..351c976 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -101,7 +101,7 @@
//@PreAuthorize("@ss.hasPermi('system:user:query')")
@GetMapping("/getInfo/{userId}")
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) {
- log.error("--------userId鐨勫�间负锛歿}",userId);
+ log.info("--------userId鐨勫�间负锛歿}",userId);
userService.checkUserDataScope(userId);
AjaxResult ajax = AjaxResult.success();
List<SysRole> roles = roleService.selectRoleAll();
@@ -120,7 +120,7 @@
sysUserDept.setDeptType("1");
LoginUser loginUser = getLoginUser();
SysUser user = loginUser.getUser();
- log.error("--------user鐨勫�间负锛歿}",user);
+ log.info("--------user鐨勫�间负锛歿}",user);
sysUserDept.setOrgid(user.getOrgid());
sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
ajax.put("belongDepts", sysUserDeptKSs);
@@ -234,7 +234,7 @@
@Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.GRANT)
@PostMapping("/authRole/insertAuthRole")
public AjaxResult insertAuthRole(@RequestBody AuthRole authRole) {
- log.error("-----鐢ㄦ埛鎺堟潈瑙掕壊鐨勫叆鍙備负锛歶serId={},roleIds={}", authRole.getUserId(), authRole.getRoleIds());
+ log.info("-----鐢ㄦ埛鎺堟潈瑙掕壊鐨勫叆鍙備负锛歶serId={},roleIds={}", authRole.getUserId(), authRole.getRoleIds());
if (ObjectUtils.isEmpty(authRole.getRoleIds())) {
throw new BaseException("瑙掕壊涓虹┖锛岃妫�鏌ヤ箣鍚庡啀娆″皾璇�");
}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/RSAPublicKeyExample.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/RSAPublicKeyExample.java
index 2159f6d..196de03 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/RSAPublicKeyExample.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/RSAPublicKeyExample.java
@@ -58,7 +58,7 @@
* @return
*/
public String encryptedData(String plainText, String pub_key) {
- log.error("闇�瑕佸姞瀵嗙殑鏁版嵁锛歿}", plainText);
+ log.info("闇�瑕佸姞瀵嗙殑鏁版嵁锛歿}", plainText);
try {
byte[] publicKeyBytes = Base64.getDecoder().decode(pub_key);
@@ -73,11 +73,11 @@
// 灏嗗姞瀵嗗悗鐨勬暟鎹浆鎹负Base64缂栫爜鐨勫瓧绗︿覆
String encryptedText = Base64.getEncoder().encodeToString(encryptedBytes);
- log.error("Base64鍔犲瘑鍚庣殑鏁版嵁锛歿}", encryptedText);
+ log.info("Base64鍔犲瘑鍚庣殑鏁版嵁锛歿}", encryptedText);
encryptedText = URLEncoder.encode(encryptedText, StandardCharsets.UTF_8.toString());
- log.error("URLEncoder缂栫爜鍚庣殑鏁版嵁锛歿}", encryptedText);
+ log.info("URLEncoder缂栫爜鍚庣殑鏁版嵁锛歿}", encryptedText);
String decodedString = URLDecoder.decode(encryptedText, "UTF-8");
- log.error("URLEncoder瑙g爜鍚庣殑鏁版嵁锛歿}", decodedString);
+ log.info("URLEncoder瑙g爜鍚庣殑鏁版嵁锛歿}", decodedString);
return encryptedText;
} catch (Exception e) {
log.error("鍔犲瘑澶辫触浜�:{}", e.getMessage());
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
index a3401b8..d8b249b 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java
@@ -168,7 +168,7 @@
}
}
out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(), StandardCharsets.UTF_8));
- log.error("---------param鍙戦�佺殑鏁版嵁涓�:{}",param);
+ log.info("---------param鍙戦�佺殑鏁版嵁涓�:{}",param);
out.print(param);
out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
@@ -220,7 +220,7 @@
}
}
- log.error("鍙戦�佸弬鏁帮細{}", param);
+ log.info("鍙戦�佸弬鏁帮細{}", param);
try (OutputStream os = conn.getOutputStream()) {
byte[] input = param.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
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 8989707..2ce4c4d 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
@@ -212,27 +212,27 @@
public void dealHisData() {
log.info("銆恉ealHisData銆戝紑濮嬫墽琛孒IS鏁版嵁閲囬泦浠诲姟");
long startTime = System.currentTimeMillis();
-
+
try {
// 鑾峰彇鏄ㄥぉ0鐐瑰埌浠婂ぉ0鐐圭殑鏃堕棿鑼冨洿
LocalDateTime todayZero = LocalDateTime.now().with(LocalTime.MIN);
LocalDateTime yesterdayZero = todayZero.minusDays(1);
-
+
log.info("銆恉ealHisData銆戦噰闆嗘椂闂磋寖鍥达細{} ~ {}", yesterdayZero, todayZero);
-
+
// 閲囬泦鍏ラ櫌鏁版嵁
log.info("銆恉ealHisData銆戝紑濮嬮噰闆嗗叆闄㈡暟鎹�");
getInHospInfo("0", yesterdayZero, todayZero);
log.info("銆恉ealHisData銆戝叆闄㈡暟鎹噰闆嗗畬鎴�");
-
+
// 閲囬泦鍑洪櫌鏁版嵁
log.info("銆恉ealHisData銆戝紑濮嬮噰闆嗗嚭闄㈡暟鎹�");
getInHospInfo("1", yesterdayZero, todayZero);
log.info("銆恉ealHisData銆戝嚭闄㈡暟鎹噰闆嗗畬鎴�");
-
+
long endTime = System.currentTimeMillis();
log.info("銆恉ealHisData銆慔IS鏁版嵁閲囬泦浠诲姟瀹屾垚锛屾�昏�楁椂锛歿}ms", endTime - startTime);
-
+
} catch (Exception e) {
log.error("銆恉ealHisData銆慔IS鏁版嵁閲囬泦寮傚父", e);
// 杩欓噷鍙互娣诲姞鍛婅閫氱煡閫昏緫锛屾瘮濡傚彂閫侀偖浠舵垨鐭俊
@@ -560,7 +560,6 @@
RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key);
for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) {
- // log.error("serviceSubtask---------杩涙潵浜嗗悧锛焮}", serviceSubtask);
boolean dateToday = isDateToday(serviceSubtask.getLongSendTime());
if (dateToday) {
try {
@@ -650,42 +649,43 @@
/**
* 鑾峰彇鎮h�呭嚭鍏ラ櫌淇℃伅
- * @param cry 鍑哄叆闄㈢被鍨嬶細0-鍏ラ櫌锛�1-鍑洪櫌
+ *
+ * @param cry 鍑哄叆闄㈢被鍨嬶細0-鍏ラ櫌锛�1-鍑洪櫌
* @param startTime 寮�濮嬫椂闂�
- * @param endTime 缁撴潫鏃堕棿
+ * @param endTime 缁撴潫鏃堕棿
*/
@Transactional
public void getInHospInfo(String cry, LocalDateTime startTime, LocalDateTime endTime) {
String typeName = "0".equals(cry) ? "鍏ラ櫌" : "鍑洪櫌";
log.info("銆恎etInHospInfo銆戝紑濮嬭幏鍙杮}鎮h�呬俊鎭紝鏃堕棿鑼冨洿锛歿} ~ {}", typeName, startTime, endTime);
long startTimeMillis = System.currentTimeMillis();
-
+
try {
// 绗竴姝ワ細鏋勫缓璇锋眰鍙傛暟骞惰皟鐢℉IS鎺ュ彛
List<ThiedInhospInfo> thiedInhospInfoList = fetchHisData(cry, startTime, endTime);
-
+
if (CollectionUtils.isEmpty(thiedInhospInfoList)) {
log.info("銆恎etInHospInfo銆憑}鎮h�呬俊鎭负绌猴紝璺宠繃澶勭悊", typeName);
return;
}
-
+
log.info("銆恎etInHospInfo銆戣幏鍙栧埌{}鏉}鎮h�呬俊鎭�", thiedInhospInfoList.size(), typeName);
-
+
// 绗簩姝ワ細淇濆瓨鍘熷鏁版嵁鍒版枃浠讹紙鐢ㄤ簬澶囦唤锛�
saveRawDataToFile(cry, thiedInhospInfoList);
-
+
// 绗笁姝ワ細澶勭悊鎮h�呮暟鎹�
processPatientData(thiedInhospInfoList, cry);
-
+
long endTimeMillis = System.currentTimeMillis();
log.info("銆恎etInHospInfo銆憑}鎮h�呬俊鎭鐞嗗畬鎴愶紝鑰楁椂锛歿}ms", typeName, endTimeMillis - startTimeMillis);
-
+
} catch (Exception e) {
log.error("銆恎etInHospInfo銆戣幏鍙杮}鎮h�呬俊鎭紓甯�", typeName, e);
throw new RuntimeException("鑾峰彇" + typeName + "鎮h�呬俊鎭け璐�", e);
}
}
-
+
/**
* 绗竴姝ワ細璋冪敤HIS鎺ュ彛鑾峰彇鏁版嵁
*/
@@ -693,29 +693,29 @@
try {
// 鏋勫缓璇锋眰鍙傛暟
Map<String, String> requestParams = buildRequestParams(cry, startTime, endTime);
-
+
// 鏋勫缓璇锋眰澶�
Map<String, String> headers = buildRequestHeaders(startTime);
-
+
// 鍙戦�丠TTP璇锋眰
String result = HttpUtils.sendPostByHeader(hospInfoUrl, new Gson().toJson(requestParams), headers);
-
+
// 瑙f瀽鍝嶅簲鏁版嵁
return parseResponseData(result);
-
+
} catch (Exception e) {
log.error("銆恌etchHisData銆戣皟鐢℉IS鎺ュ彛寮傚父", e);
throw e;
}
}
-
+
/**
* 鏋勫缓璇锋眰鍙傛暟
*/
private Map<String, String> buildRequestParams(String cry, LocalDateTime startTime, LocalDateTime endTime) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
Map<String, String> req = new HashMap<>();
-
+
if ("1".equals(cry)) {
// 鍑洪櫌鍙傛暟
req.put("cashStartDate", startTime.format(formatter));
@@ -727,10 +727,10 @@
req.put("admissEndDate", endTime.format(formatter));
req.put("currStatus", "2");
}
-
+
return req;
}
-
+
/**
* 鏋勫缓璇锋眰澶�
*/
@@ -744,23 +744,24 @@
header.put("x-hcsb-msgdate", startTime.format(formatter));
return header;
}
-
+
/**
* 瑙f瀽鍝嶅簲鏁版嵁
*/
private List<ThiedInhospInfo> parseResponseData(String result) {
try {
- Gson gson = new Gson();
- JsonObject jsonObject = gson.fromJson(result, JsonObject.class);
- JsonArray resultArray = jsonObject.getAsJsonObject("data").getAsJsonArray("result");
- Type resultType = new TypeToken<List<ThiedInhospInfo>>() {}.getType();
+ Gson gson = new Gson();
+ JsonObject jsonObject = gson.fromJson(result, JsonObject.class);
+ JsonArray resultArray = jsonObject.getAsJsonObject("data").getAsJsonArray("result");
+ Type resultType = new TypeToken<List<ThiedInhospInfo>>() {
+ }.getType();
return gson.fromJson(resultArray, resultType);
} catch (Exception e) {
log.error("銆恜arseResponseData銆戣В鏋愬搷搴旀暟鎹紓甯革紝鍘熷鏁版嵁锛歿}", result, e);
throw e;
}
}
-
+
/**
* 绗簩姝ワ細淇濆瓨鍘熷鏁版嵁鍒版枃浠�
*/
@@ -769,30 +770,30 @@
String typeName = "0".equals(cry) ? "鍏ラ櫌淇℃伅" : "鍑洪櫌淇℃伅";
String filename = typeName + "_" + System.currentTimeMillis() + ".json";
String filePath = "D:\\public\\HIS鏁版嵁閲囬泦\\" + filename;
-
+
File file = new File(filePath);
File parentDir = file.getParentFile();
if (!parentDir.exists()) {
parentDir.mkdirs();
}
-
- if (!file.exists()) {
+
+ if (!file.exists()) {
file.createNewFile();
}
-
+
// 灏嗘暟鎹啓鍏ユ枃浠�
try (FileWriter writer = new FileWriter(file)) {
writer.write(new Gson().toJson(dataList));
}
-
+
log.info("銆恠aveRawDataToFile銆戝師濮嬫暟鎹凡淇濆瓨鍒版枃浠讹細{}", filePath);
-
+
} catch (Exception e) {
log.error("銆恠aveRawDataToFile銆戜繚瀛樺師濮嬫暟鎹埌鏂囦欢寮傚父", e);
// 鏂囦欢淇濆瓨澶辫触涓嶅奖鍝嶄富娴佺▼锛屽彧璁板綍鏃ュ織
}
}
-
+
/**
* 绗笁姝ワ細澶勭悊鎮h�呮暟鎹�
*/
@@ -800,7 +801,7 @@
int successCount = 0;
int skipCount = 0;
int errorCount = 0;
-
+
for (ThiedInhospInfo thiedInhospInfo : thiedInhospInfoList) {
try {
if (processSinglePatient(thiedInhospInfo, cry)) {
@@ -810,35 +811,32 @@
}
} catch (Exception e) {
errorCount++;
- log.error("銆恜rocessPatientData銆戝鐞嗘偅鑰呮暟鎹紓甯革紝鎮h�匢D锛歿}",
- thiedInhospInfo.getPatiMediaNo(), e);
+ log.error("銆恜rocessPatientData銆戝鐞嗘偅鑰呮暟鎹紓甯革紝鎮h�匢D锛歿}", thiedInhospInfo.getPatiMediaNo(), e);
}
}
-
- log.info("銆恜rocessPatientData銆戞偅鑰呮暟鎹鐞嗗畬鎴愶紝鎴愬姛锛歿}锛岃烦杩囷細{}锛屽け璐ワ細{}",
- successCount, skipCount, errorCount);
+
+ log.info("銆恜rocessPatientData銆戞偅鑰呮暟鎹鐞嗗畬鎴愶紝鎴愬姛锛歿}锛岃烦杩囷細{}锛屽け璐ワ細{}", successCount, skipCount, errorCount);
}
-
+
/**
* 澶勭悊鍗曚釜鎮h�呮暟鎹�
*/
private boolean processSinglePatient(ThiedInhospInfo thiedInhospInfo, String cry) {
// 楠岃瘉韬唤璇佸彿
if (StringUtils.isEmpty(thiedInhospInfo.getPatiIdCardNo())) {
- log.warn("銆恜rocessSinglePatient銆戞偅鑰呰韩浠借瘉鍙蜂负绌猴紝璺宠繃澶勭悊锛屾偅鑰呯紪鍙凤細{}",
- thiedInhospInfo.getPatiMediaNo());
+ log.warn("銆恜rocessSinglePatient銆戞偅鑰呰韩浠借瘉鍙蜂负绌猴紝璺宠繃澶勭悊锛屾偅鑰呯紪鍙凤細{}", thiedInhospInfo.getPatiMediaNo());
return false;
}
-
+
// 澶勭悊鎮h�呮。妗堜俊鎭�
PatArchive patArchive = processPatientArchive(thiedInhospInfo, cry);
-
+
// 澶勭悊鎮h�呬綇闄俊鎭�
processPatientInhospInfo(thiedInhospInfo, patArchive, cry);
-
+
return true;
}
-
+
/**
* 澶勭悊鎮h�呮。妗堜俊鎭�
*/
@@ -847,66 +845,66 @@
PatArchive queryArchive = new PatArchive();
queryArchive.setIdcardno(thiedInhospInfo.getPatiIdCardNo().trim());
List<PatArchive> existingArchives = patArchiveService.selectPatArchiveList(queryArchive);
-
+
// 鏋勫缓鎮h�呮。妗堜俊鎭�
PatArchive patArchive = buildPatientArchive(thiedInhospInfo, cry);
-
+
// 淇濆瓨鎴栨洿鏂版偅鑰呮。妗�
if (CollectionUtils.isEmpty(existingArchives)) {
patArchiveService.insertPatArchive(patArchive);
log.debug("銆恜rocessPatientArchive銆戞柊澧炴偅鑰呮。妗堬紝鎮h�呯紪鍙凤細{}", patArchive.getPatientno());
- } else {
+ } else {
patArchive.setId(existingArchives.get(0).getId());
patArchiveService.updateArchive(patArchive);
log.debug("銆恜rocessPatientArchive銆戞洿鏂版偅鑰呮。妗堬紝鎮h�呯紪鍙凤細{}", patArchive.getPatientno());
}
-
+
return patArchive;
}
-
+
/**
* 鏋勫缓鎮h�呮。妗堜俊鎭�
*/
private PatArchive buildPatientArchive(ThiedInhospInfo thiedInhospInfo, String cry) {
PatArchive patArchive = new PatArchive();
-
+
// 鍩烘湰淇℃伅
- patArchive.setPatientno(thiedInhospInfo.getPatiMediaNo());
+ patArchive.setPatientno(thiedInhospInfo.getPatiMediaNo());
patArchive.setIdcardno(thiedInhospInfo.getPatiIdCardNo().trim());
patArchive.setName(thiedInhospInfo.getPatiRecordName());
- patArchive.setSourcefrom(2);
- patArchive.setPattype("2");
-
+ patArchive.setSourcefrom(2);
+ patArchive.setPattype("2");
+
// 鎬у埆
patArchive.setSex("鐢�".equals(thiedInhospInfo.getPatiRecordGender()) ? 1L : 2L);
-
+
// 姘戞棌鍜岀睄璐�
- patArchive.setNation(thiedInhospInfo.getPatiNation());
- patArchive.setNativePlace(thiedInhospInfo.getPatiNationality());
-
+ patArchive.setNation(thiedInhospInfo.getPatiNation());
+ patArchive.setNativePlace(thiedInhospInfo.getPatiNationality());
+
// 灞呬綇鍦板潃
String homeAddr = thiedInhospInfo.getPatiHomeAddr();
patArchive.setPlaceOfResidence(StringUtils.isNotEmpty(homeAddr) ? homeAddr.replace("null", "") : "");
-
+
// 鍑虹敓鏃ユ湡
if (StringUtils.isNotEmpty(thiedInhospInfo.getPatiBirthday())) {
try {
- patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday()));
- } catch (ParseException e) {
+ patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday()));
+ } catch (ParseException e) {
log.warn("銆恇uildPatientArchive銆戣В鏋愬嚭鐢熸棩鏈熷け璐ワ細{}", thiedInhospInfo.getPatiBirthday(), e);
- }
+ }
}
-
+
// 骞撮緞
- if (thiedInhospInfo.getTreateAge() != null) {
- patArchive.setAge(Long.valueOf(thiedInhospInfo.getTreateAge()));
- }
- patArchive.setAgeUnit(thiedInhospInfo.getTreatAgeunit());
-
+ if (thiedInhospInfo.getTreateAge() != null) {
+ patArchive.setAge(Long.valueOf(thiedInhospInfo.getTreateAge()));
+ }
+ patArchive.setAgeUnit(thiedInhospInfo.getTreatAgeunit());
+
// 鑱旂郴鏂瑰紡
- patArchive.setTelcode(thiedInhospInfo.getCompanyTelNum());
- patArchive.setRelativetelcode(thiedInhospInfo.getContactPersonPhone());
-
+ patArchive.setTelcode(thiedInhospInfo.getCompanyTelNum());
+ patArchive.setRelativetelcode(thiedInhospInfo.getContactPersonPhone());
+
// 鍑洪櫌鏂瑰紡澶勭悊锛堟浜$瓑鐗规畩鎯呭喌锛�
if (StringUtils.isNotEmpty(thiedInhospInfo.getOutWayId()) && "4".equals(thiedInhospInfo.getOutWayId())) {
patArchive.setNotrequiredFlag("1");
@@ -916,114 +914,117 @@
patArchive.setNotrequiredFlag("1");
patArchive.setNotrequiredreason("鍑洪櫌鏂瑰紡涓虹┖");
}
-
+
// 绯荤粺瀛楁
- patArchive.setDelFlag("0");
- patArchive.setCreateTime(new Date());
- patArchive.setUpdateTime(new Date());
-
+ patArchive.setDelFlag("0");
+ patArchive.setCreateTime(new Date());
+ patArchive.setUpdateTime(new Date());
+
return patArchive;
}
-
+
/**
* 澶勭悊鎮h�呬綇闄俊鎭�
*/
private void processPatientInhospInfo(ThiedInhospInfo thiedInhospInfo, PatArchive patArchive, String cry) {
// 鏋勫缓浣忛櫌淇℃伅
PatMedInhosp patMedInhosp = buildPatientInhospInfo(thiedInhospInfo, patArchive, cry);
-
+
// 鏌ヨ鏄惁宸插瓨鍦ㄤ綇闄㈣褰�
PatMedInhosp queryInhosp = new PatMedInhosp();
queryInhosp.setPatno(patArchive.getPatientno());
queryInhosp.setSerialnum(patMedInhosp.getSerialnum());
List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhospList(queryInhosp);
-
+
// 淇濆瓨鎴栨洿鏂颁綇闄俊鎭�
if (CollectionUtils.isNotEmpty(existingInhosps)) {
patMedInhosp.setInhospid(existingInhosps.get(0).getInhospid());
patMedInhospService.updatePatMedInhosp(patMedInhosp);
- log.debug("銆恜rocessPatientInhospInfo銆戞洿鏂颁綇闄俊鎭紝鎮h�呯紪鍙凤細{}锛屾祦姘村彿锛歿}",
- patArchive.getPatientno(), patMedInhosp.getSerialnum());
- } else {
+ log.debug("銆恜rocessPatientInhospInfo銆戞洿鏂颁綇闄俊鎭紝鎮h�呯紪鍙凤細{}锛屾祦姘村彿锛歿}", patArchive.getPatientno(), patMedInhosp.getSerialnum());
+ } else {
patMedInhospService.insertPatMedInhosp(patMedInhosp);
- log.debug("銆恜rocessPatientInhospInfo銆戞柊澧炰綇闄俊鎭紝鎮h�呯紪鍙凤細{}锛屾祦姘村彿锛歿}",
- patArchive.getPatientno(), patMedInhosp.getSerialnum());
+ log.debug("銆恜rocessPatientInhospInfo銆戞柊澧炰綇闄俊鎭紝鎮h�呯紪鍙凤細{}锛屾祦姘村彿锛歿}", patArchive.getPatientno(), patMedInhosp.getSerialnum());
}
}
-
+
/**
* 鏋勫缓鎮h�呬綇闄俊鎭�
*/
private PatMedInhosp buildPatientInhospInfo(ThiedInhospInfo thiedInhospInfo, PatArchive patArchive, String cry) {
- PatMedInhosp patMedInhosp = new PatMedInhosp();
-
+ PatMedInhosp patMedInhosp = new PatMedInhosp();
+
// 鎮h�呭熀鏈俊鎭�
- patMedInhosp.setPatid(patArchive.getId());
- patMedInhosp.setPatno(patArchive.getPatientno());
- patMedInhosp.setPatname(patArchive.getName());
-
+ patMedInhosp.setPatid(patArchive.getId());
+ patMedInhosp.setPatno(patArchive.getPatientno());
+ patMedInhosp.setPatname(patArchive.getName());
+
// 鎶ょ悊淇℃伅
- patMedInhosp.setNurseId(thiedInhospInfo.getNurseId());
- patMedInhosp.setNurseName(thiedInhospInfo.getNurseName());
-
+ patMedInhosp.setNurseId(thiedInhospInfo.getNurseId());
+ patMedInhosp.setNurseName(thiedInhospInfo.getNurseName());
+
// 浣忛櫌淇℃伅
- patMedInhosp.setSerialnum(thiedInhospInfo.getInpatientId());
- patMedInhosp.setFuflag("1");
+ patMedInhosp.setSerialnum(thiedInhospInfo.getInpatientId());
+ patMedInhosp.setFuflag("1");
patMedInhosp.setInhospstate("0".equals(cry) ? "0" : "1");
-
- // 鍖婚櫌鍜岀瀹や俊鎭�
- patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId());
- patMedInhosp.setDeptcode(thiedInhospInfo.getAdmissDeptId());
- patMedInhosp.setDeptid(thiedInhospInfo.getAdmissDeptId());
- patMedInhosp.setDeptname(thiedInhospInfo.getAdmissDeptName());
+
+ // 鍖婚櫌鍜屽簥浣嶄俊鎭�
+ patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId());
patMedInhosp.setBedNo(thiedInhospInfo.getAdmissBedNo());
-
- // 璇婃柇淇℃伅
- patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10());
- patMedInhosp.setDiagname(thiedInhospInfo.getDiagName());
-
+
+
// 鏃堕棿淇℃伅
if (StringUtils.isNotEmpty(thiedInhospInfo.getAdmissDate())) {
- try {
- patMedInhosp.setStarttime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getAdmissDate()));
- } catch (ParseException e) {
+ try {
+ patMedInhosp.setStarttime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getAdmissDate()));
+ } catch (ParseException e) {
log.warn("銆恇uildPatientInhospInfo銆戣В鏋愬叆闄㈡椂闂村け璐ワ細{}", thiedInhospInfo.getAdmissDate(), e);
- }
+ }
}
-
+
if (StringUtils.isNotEmpty(thiedInhospInfo.getOutDate())) {
- try {
- patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getOutDate()));
- } catch (ParseException e) {
+ try {
+ patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getOutDate()));
+ } catch (ParseException e) {
log.warn("銆恇uildPatientInhospInfo銆戣В鏋愬嚭闄㈡椂闂村け璐ワ細{}", thiedInhospInfo.getOutDate(), e);
}
}
-
+
// 鍑洪櫌淇℃伅
- patMedInhosp.setLeaveldeptcode(thiedInhospInfo.getCurrDeptId());
- patMedInhosp.setLeaveldeptname(thiedInhospInfo.getCurrDeptName());
- patMedInhosp.setLeavediagname(thiedInhospInfo.getDiagName());
- patMedInhosp.setLeaveicd10code(thiedInhospInfo.getDiagIcd10());
- patMedInhosp.setOutWayId(thiedInhospInfo.getOutWayId());
- patMedInhosp.setOutWayName(thiedInhospInfo.getOutWayName());
-
+ if (cry.equals("1")) {
+ patMedInhosp.setLeaveldeptcode(thiedInhospInfo.getCurrDeptId());
+ patMedInhosp.setLeaveldeptname(thiedInhospInfo.getCurrDeptName());
+ patMedInhosp.setLeavediagname(thiedInhospInfo.getDiagName());
+ patMedInhosp.setLeaveicd10code(thiedInhospInfo.getDiagIcd10());
+ patMedInhosp.setOutWayId(thiedInhospInfo.getOutWayId());
+ patMedInhosp.setOutWayName(thiedInhospInfo.getOutWayName());
+ // 鐥呭尯淇℃伅
+ patMedInhosp.setLeavehospitaldistrictid(thiedInhospInfo.getCurrWardCode());
+ patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId());
+ patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName());
+ patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode());
+ } else {
+ //鍏ラ櫌
+ patMedInhosp.setDeptcode(thiedInhospInfo.getCurrDeptId());
+ patMedInhosp.setDeptname(thiedInhospInfo.getCurrDeptName());
+ patMedInhosp.setDiagname(thiedInhospInfo.getDiagName());
+ patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10());
+ patMedInhosp.setHospitaldistrictid(thiedInhospInfo.getAdmissWardCode());
+ patMedInhosp.setHospitaldistrictcode(thiedInhospInfo.getAdmissWardId());
+ patMedInhosp.setHospitaldistrictname(thiedInhospInfo.getAdmissWardName());
+ }
+
// 鍖荤敓淇℃伅
patMedInhosp.setDrname(thiedInhospInfo.getDoctName());
patMedInhosp.setDrcode(thiedInhospInfo.getDoctId());
-
- // 鐥呭尯淇℃伅
- patMedInhosp.setLeavehospitaldistrictid(thiedInhospInfo.getCurrWardCode());
- patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId());
- patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName());
- patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode());
-
+
+
// 鐘舵�佷俊鎭�
patMedInhosp.setSchemestatus("0".equals(cry) ? 1L : 2L);
-
+
// 绯荤粺瀛楁
patMedInhosp.setDelFlag("0");
- patMedInhosp.setOrgid("1");
-
+ patMedInhosp.setOrgid("1");
+
return patMedInhosp;
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
index eec1856..af81682 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
@@ -191,7 +191,7 @@
}
routers.add(router);
}
- log.error("----------routers鐨勫叆鍙備负锛歿}", routers);
+ log.info("----------routers鐨勫叆鍙備负锛歿}", routers);
for (RouterVo routerVo : routers) {
List<String> childName = new ArrayList<>();
List<RouterVo> childrens = routerVo.getChildren();
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
index 1d555ae..044a52c 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -166,238 +166,107 @@
@Override
public SysUser selectUserByUserName2(String userName) {
- log.debug("寮�濮嬫煡璇㈢敤鎴蜂俊鎭紝鐢ㄦ埛鍚�: {}", userName);
-
- try {
- // 鍙傛暟鏍¢獙
- if (StringUtils.isEmpty(userName)) {
- log.warn("鐢ㄦ埛鍚嶅弬鏁颁负绌�");
- return null;
- }
-
- // 瑙f瀽鐢ㄦ埛鍚嶅拰鏈烘瀯ID
- String[] userInfo = parseUserName(userName);
- if (userInfo == null) {
- log.warn("鐢ㄦ埛鍚嶆牸寮忎笉姝g‘: {}", userName);
- return null;
- }
-
- String username = userInfo[0];
- String orgId = userInfo[1];
-
- // 鏌ヨ鐢ㄦ埛鍩烘湰淇℃伅
- SysUser sysUser = userMapper.selectUserByUserNameByCondition(username, orgId);
- if (Objects.isNull(sysUser)) {
- log.warn("鏈壘鍒扮敤鎴蜂俊鎭�: username={}, orgId={}", username, orgId);
- return null;
- }
-
- // 鏌ヨ鐢ㄦ埛閮ㄩ棬淇℃伅
- List<SysDept> sysDepts = getUserDepts(sysUser, username, orgId);
- List<Long> deptIds = extractDeptIds(sysDepts);
- sysUser.setDepts(deptIds);
-
- // 鏍规嵁鎼滅储鑼冨洿澶勭悊绉戝鍜岀梾鍖轰俊鎭�
- processUserDeptInfo(sysUser, username, orgId);
-
- log.debug("鐢ㄦ埛淇℃伅鏌ヨ瀹屾垚: userId={}", sysUser.getUserId());
- return sysUser;
-
- } catch (Exception e) {
- log.error("鏌ヨ鐢ㄦ埛淇℃伅鏃跺彂鐢熷紓甯�: userName={}", userName, e);
- return null;
- }
- }
-
- /**
- * 瑙f瀽鐢ㄦ埛鍚嶏紝鎻愬彇鐢ㄦ埛鍚嶅拰鏈烘瀯ID
- */
- private String[] parseUserName(String userName) {
- if (StringUtils.isEmpty(userName) || !userName.contains("&")) {
- return null;
- }
- return userName.split("&");
- }
-
- /**
- * 鑾峰彇鐢ㄦ埛閮ㄩ棬淇℃伅
- */
- private List<SysDept> getUserDepts(SysUser sysUser, String username, String orgId) {
- if ("admin".equals(username)) {
+ String[] split = userName.split("&");
+ SysUser sysUser = userMapper.selectUserByUserNameByCondition(split[0], split[1]);
+ if (Objects.isNull(sysUser)) return sysUser;
+ List<SysDept> sysDepts = null;
+ if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) {
SysDept dept = new SysDept();
- dept.setOrgid(orgId);
- return sysDeptMapper.selectDeptList(dept);
+ dept.setOrgid(split[1]);
+ sysDepts = sysDeptMapper.selectDeptList(dept);
} else {
- return sysUserDeptMapper.selectDeptListByUserId(sysUser.getUserId());
+ sysDepts = sysUserDeptMapper.selectDeptListByUserId(sysUser.getUserId());
}
- }
-
- /**
- * 鎻愬彇閮ㄩ棬ID鍒楄〃
- */
- private List<Long> extractDeptIds(List<SysDept> sysDepts) {
- if (CollectionUtils.isEmpty(sysDepts)) {
- return new ArrayList<>();
+ List<Long> deptIds = new ArrayList<>();
+ for (SysDept sysDept : sysDepts) {
+ deptIds.add(sysDept.getDeptId());
}
- return sysDepts.stream()
- .map(SysDept::getDeptId)
- .collect(Collectors.toList());
- }
-
- /**
- * 澶勭悊鐢ㄦ埛绉戝鍜岀梾鍖轰俊鎭�
- */
- private void processUserDeptInfo(SysUser sysUser, String username, String orgId) {
- String searchScope = sysUser.getSearchscope();
- if (StringUtils.isEmpty(searchScope)) {
- return;
- }
-
- switch (searchScope) {
- case "0": // 鍏ㄩ儴鑼冨洿
- processFullScopeDeptInfo(sysUser, username, orgId);
- break;
- case "1": // 绉戝鑼冨洿
- processDeptScopeInfo(sysUser, orgId, "1");
- break;
- case "2": // 鐥呭尯鑼冨洿
- processDeptScopeInfo(sysUser, orgId, "2");
- break;
- default:
- log.warn("鏈煡鐨勬悳绱㈣寖鍥�: {}", searchScope);
- }
- }
-
- /**
- * 澶勭悊鍏ㄩ儴鑼冨洿鐨勯儴闂ㄤ俊鎭�
- */
- private void processFullScopeDeptInfo(SysUser sysUser, String username, String orgId) {
- SysUserDept sysUserDept = createSysUserDept(sysUser, orgId);
-
+ SysUserDept sysUserDept = new SysUserDept();
+ sysUserDept.setUserId(sysUser.getUserId());
+ sysUserDept.setDeptType(sysUser.getSearchscope());
+ sysUserDept.setOrgid(split[1]);
List<SysUserDept> sysUserDeptKSs = null;
List<SysUserDept> sysUserDeptBQs = null;
-
- if ("admin".equals(username)) {
- // admin鐢ㄦ埛鐗规畩澶勭悊
- sysUserDept.setUserId(null);
- sysUserDeptKSs = getAdminDeptList(orgId, "1");
- sysUserDeptBQs = getAdminDeptList(orgId, "2");
-
- // 鍘婚噸澶勭悊
- sysUserDeptKSs = removeDuplicateDepts(sysUserDeptKSs);
- sysUserDeptBQs = removeDuplicateDepts(sysUserDeptBQs);
- } else {
- // 鏅�氱敤鎴峰鐞�
+ if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("0")) {
+ if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) {
+ sysUserDept.setUserId(null);
+ }
sysUserDept.setDeptType("1");
sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
sysUserDept.setDeptType("2");
sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
- }
-
- // 璁剧疆绉戝鍜岀梾鍖轰俊鎭�
- setBelongWards(sysUser, sysUserDeptBQs);
- setBelongDepts(sysUser, sysUserDeptKSs);
- }
-
- /**
- * 澶勭悊鎸囧畾鑼冨洿鐨勯儴闂ㄤ俊鎭�
- */
- private void processDeptScopeInfo(SysUser sysUser, String orgId, String deptType) {
- SysUserDept sysUserDept = createSysUserDept(sysUser, orgId);
- sysUserDept.setDeptType(deptType);
- List<SysUserDept> deptList = sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
-
- if ("1".equals(deptType)) {
- setBelongDepts(sysUser, deptList);
- } else if ("2".equals(deptType)) {
- setBelongWards(sysUser, deptList);
- }
- }
-
- /**
- * 鍒涘缓SysUserDept瀵硅薄
- */
- private SysUserDept createSysUserDept(SysUser sysUser, String orgId) {
- SysUserDept sysUserDept = new SysUserDept();
- sysUserDept.setUserId(sysUser.getUserId());
- sysUserDept.setDeptType(sysUser.getSearchscope());
- sysUserDept.setOrgid(orgId);
- return sysUserDept;
- }
-
- /**
- * 鑾峰彇admin鐢ㄦ埛鐨勯儴闂ㄥ垪琛�
- */
- private List<SysUserDept> getAdminDeptList(String orgId, String deptType) {
- SysDept dept = new SysDept();
- dept.setOrgid(orgId);
- dept.setDeptType(deptType);
- List<SysDept> sysDepts = sysDeptMapper.selectDeptList(dept);
- return DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class);
- }
-
- /**
- * 鍘婚櫎閲嶅鐨勯儴闂ㄤ俊鎭�
- */
- private List<SysUserDept> removeDuplicateDepts(List<SysUserDept> deptList) {
- if (CollectionUtils.isEmpty(deptList)) {
- return new ArrayList<>();
- }
-
- List<SysUserDept> distinctDepts = new ArrayList<>();
- Set<String> uniqueCodes = new HashSet<>();
-
- for (SysUserDept dept : deptList) {
- String deptCode = dept.getDeptCode();
- if (StringUtils.isNotEmpty(deptCode) && !uniqueCodes.contains(deptCode)) {
- distinctDepts.add(dept);
- uniqueCodes.add(deptCode);
+ //濡傛灉鏄痑dmin锛岄渶瑕佸sysUserDeptBQs锛宻ysUserDeptBQs鍘婚噸
+ if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) {
+ //濡傛灉鏄痑dmin锛屽彧鑳藉幓sys_dept鍘诲彇鏁版嵁
+ SysDept dept = new SysDept();
+ dept.setOrgid(split[1]);
+ dept.setDeptType("1");
+ sysDepts = sysDeptMapper.selectDeptList(dept);
+ sysUserDeptKSs = DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class);
+
+ dept.setDeptType("2");
+ sysDepts = sysDeptMapper.selectDeptList(dept);
+ sysUserDeptBQs = DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class);
+
+ List<SysUserDept> distinctUserDepts = new ArrayList<>();
+ Set<String> uniqueDeptCodes = new HashSet<>();
+ for (SysUserDept userDept : sysUserDeptKSs) {
+ String deptCode = userDept.getDeptCode();
+ if (StringUtils.isNotEmpty(deptCode) && !uniqueDeptCodes.contains(deptCode)) {
+ distinctUserDepts.add(userDept);
+ uniqueDeptCodes.add(deptCode);
+ }
+ }
+
+ List<SysUserDept> distinctUserBQs = new ArrayList<>();
+ Set<String> uniqueBQCodes = new HashSet<>();
+ for (SysUserDept userDept : sysUserDeptBQs) {
+ String deptCode = userDept.getDeptCode();
+ if (StringUtils.isNotEmpty(deptCode) && !uniqueBQCodes.contains(deptCode)) {
+ distinctUserBQs.add(userDept);
+ uniqueBQCodes.add(deptCode);
+ }
+ }
+ sysUserDeptKSs = distinctUserDepts;
+ sysUserDeptBQs = distinctUserBQs;
}
+
+ } else if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("1")) {
+ sysUserDept.setDeptType("1");
+ sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
+ } else if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("2")) {
+ sysUserDept.setDeptType("2");
+ sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
}
-
- return distinctDepts;
- }
-
- /**
- * 璁剧疆鐥呭尯淇℃伅
- */
- private void setBelongWards(SysUser sysUser, List<SysUserDept> sysUserDeptBQs) {
- if (CollectionUtils.isEmpty(sysUserDeptBQs)) {
- return;
+
+ sysUser.setDepts(deptIds);
+ if (!CollectionUtils.isEmpty(sysUserDeptBQs)) {
+ List<Map<String, Object>> list = new ArrayList<>();
+ for (SysUserDept sud : sysUserDeptBQs) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("districtCode", "");
+ if (StringUtils.isNotEmpty(sud.getDeptCode())) map.put("districtCode", sud.getDeptCode());
+ else continue;
+ map.put("districtName", "");
+ if (StringUtils.isNotEmpty(sud.getDeptName())) map.put("districtName", sud.getDeptName());
+ list.add(map);
+ }
+ sysUser.setBelongWards(list);
}
-
- List<Map<String, Object>> wardList = sysUserDeptBQs.stream()
- .filter(sud -> StringUtils.isNotEmpty(sud.getDeptCode()))
- .map(sud -> {
- Map<String, Object> map = new HashMap<>();
- map.put("districtCode", StringUtils.defaultString(sud.getDeptCode(), ""));
- map.put("districtName", StringUtils.defaultString(sud.getDeptName(), ""));
- return map;
- })
- .collect(Collectors.toList());
-
- sysUser.setBelongWards(wardList);
- }
-
- /**
- * 璁剧疆绉戝淇℃伅
- */
- private void setBelongDepts(SysUser sysUser, List<SysUserDept> sysUserDeptKSs) {
- if (CollectionUtils.isEmpty(sysUserDeptKSs)) {
- return;
+ if (!CollectionUtils.isEmpty(sysUserDeptKSs)) {
+ List<Map<String, Object>> list = new ArrayList<>();
+ for (SysUserDept sud : sysUserDeptKSs) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("deptCode", "");
+ if (StringUtils.isNotEmpty(sud.getDeptCode())) map.put("deptCode", sud.getDeptCode());
+ else continue;
+ map.put("deptName", "");
+ if (StringUtils.isNotEmpty(sud.getDeptName())) map.put("deptName", sud.getDeptName());
+ list.add(map);
+ }
+ sysUser.setBelongDepts(list);
}
-
- List<Map<String, Object>> deptList = sysUserDeptKSs.stream()
- .filter(sud -> StringUtils.isNotEmpty(sud.getDeptCode()))
- .map(sud -> {
- Map<String, Object> map = new HashMap<>();
- map.put("deptCode", StringUtils.defaultString(sud.getDeptCode(), ""));
- map.put("deptName", StringUtils.defaultString(sud.getDeptName(), ""));
- return map;
- })
- .collect(Collectors.toList());
-
- sysUser.setBelongDepts(deptList);
+ return sysUser;
}
/**
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index e2b39f7..f975fe8 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -77,6 +77,9 @@
<if test="hisParentId != null and hisParentId != ''">
AND his_parent_id = #{hisParentId}
</if>
+ <if test="orgid != null and orgid != ''">
+ AND orgid = #{orgid}
+ </if>
<!-- 鏁版嵁鑼冨洿杩囨护 -->
${params.dataScope}
order by d.dept_type asc, d.parent_id, d.order_num
diff --git a/smartor/src/main/java/com/smartor/common/FtpService.java b/smartor/src/main/java/com/smartor/common/FtpService.java
index 066814d..6b5aa9e 100644
--- a/smartor/src/main/java/com/smartor/common/FtpService.java
+++ b/smartor/src/main/java/com/smartor/common/FtpService.java
@@ -103,7 +103,7 @@
try (FileOutputStream fos = new FileOutputStream(localFile)) {
channelSftp.get(remoteFilePath, fos);
- log.error("鏂囦欢涓嬭浇鎴愬姛锛歿}", remoteFilePath);
+ log.info("鏂囦欢涓嬭浇鎴愬姛锛歿}", remoteFilePath);
} catch (Exception e) {
System.err.println("鏂囦欢涓嬭浇澶辫触: " + remoteFilePath);
e.printStackTrace();
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchive.java b/smartor/src/main/java/com/smartor/domain/PatArchive.java
index d96576d..d24b496 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchive.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -64,6 +64,19 @@
private String notrequiredreason;
/**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�")
+ private String filterDrname;
+
+
+ /**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢熺紪鐮�")
+ private String filterDrcode;
+
+ /**
* 鏉ユ簮(1锛欻IS锛�2锛氭暟鎹钩鍙帮紱3锛氭枃浠跺鍏ワ級
*/
@ApiModelProperty("鏉ユ簮(1锛欻IS锛�2锛氭暟鎹钩鍙帮紱3锛氭枃浠跺鍏ワ級")
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java b/smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
index 26bc297..6da1123 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
@@ -44,6 +44,20 @@
/**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�")
+ private String filterDrname;
+
+
+ /**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢熺紪鐮�")
+ private String filterDrcode;
+
+
+ /**
* 浣忛櫌鍙�
*/
@ApiModelProperty(value = "浣忛櫌鍙�")
@@ -382,5 +396,8 @@
@ApiModelProperty("鍑洪櫌鐥呭尯缂栧彿")
private String leavehospitaldistrictcode;
+ @ApiModelProperty("鍏ラ櫌鐥呭尯鍚嶇О")
+ private String hospitaldistrictname;
+
}
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java b/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
index 0e589cd..0b4944a 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -60,6 +60,27 @@
@Excel(name = " 鏈嶅姟鏍囪瘑锛�0锛岄渶瑕侊紝1锛屼笉闇�瑕� ")
private String notrequiredFlag;
+ /**
+ * 涓嶈鏈嶅姟鐨勫師鍥�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勫師鍥�")
+ @Excel(name = " 涓嶈鏈嶅姟鐨勫師鍥� ")
+ private String notrequiredreason;
+
+
+ /**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�")
+ private String filterDrname;
+
+
+ /**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢熺紪鐮�")
+ private String filterDrcode;
+
/**
* 璇佷欢鍙风爜
@@ -91,9 +112,9 @@
/**
- * 鏌ョ湅鍏ㄩ儴 0 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3
+ * 鏌ョ湅鍏ㄩ儴 0 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3 鏌ョ湅鍑洪櫌 4
*/
- @ApiModelProperty(value = " 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3")
+ @ApiModelProperty(value = " 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3 鏌ョ湅鍑洪櫌 4")
private Long allhosp;
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
index a6be5e7..700b972 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
+++ b/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
@@ -234,6 +234,20 @@
@Excel(name = " 涓嶈鏈嶅姟鐨勫師鍥� ")
private String notrequiredreason;
+
+ /**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�")
+ private String filterDrname;
+
+
+ /**
+ * 涓嶈鏈嶅姟鐨勬搷浣滃尰鐢�
+ */
+ @ApiModelProperty("涓嶈鏈嶅姟鐨勬搷浣滃尰鐢熺紪鐮�")
+ private String filterDrcode;
+
/**
* 閽夐拤鍙�
*/
diff --git a/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java b/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java
new file mode 100644
index 0000000..a51537e
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/domain/PatSatisfaction.java
@@ -0,0 +1,142 @@
+package com.smartor.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 鎮h�呮弧鎰忓害瀵硅薄 pat_satisfaction
+ *
+ * @author lihu
+ * @date 2025-06-30
+ */
+@Data
+@ApiModel("鎮h�呮弧鎰忓害")
+public class PatSatisfaction extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("$column.columnComment")
+ //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鎮h�呭鍚�")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String patName;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鎮h�呯紪鐮�")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String patCode;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鎵嬫満鍙�")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String phone;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鐥呭尯鍚嶇О")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String hospitaldistrictname;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鐥呭尯缂栫爜")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String hospitaldistrictcode;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("閮ㄩ棬鍚嶇О")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String deptname;
+
+ /**
+ * 閮ㄩ棬缂栫爜
+ */
+ @ApiModelProperty("閮ㄩ棬缂栫爜")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private String deptcode;
+
+ /**
+ * 鐪熷疄鎬�
+ */
+ @ApiModelProperty("鐪熷疄鎬�")
+ @Excel(name = "鐪熷疄鎬�")
+ private double authenticity;
+
+ /**
+ * 涓�鍛ㄥ唴瀹屾垚
+ */
+ @ApiModelProperty("涓�鍛ㄥ唴瀹屾垚")
+ @Excel(name = "涓�鍛ㄥ唴瀹屾垚")
+ private double weekFinish;
+
+ /**
+ * 瑙勮寖鎬�
+ */
+ @ApiModelProperty("瑙勮寖鎬�")
+ @Excel(name = "瑙勮寖鎬�")
+ private double standard;
+
+ /**
+ * 鍙婃椂鎬�
+ */
+ @ApiModelProperty("鍙婃椂鎬�")
+ @Excel(name = "鍙婃椂鎬�")
+ private double timeliness;
+
+ /**
+ * 瀹f暀鎯呭喌
+ */
+ @ApiModelProperty("瀹f暀鎯呭喌")
+ @Excel(name = "瀹f暀鎯呭喌")
+ private double library;
+
+ /**
+ * 鐜婊℃剰搴�
+ */
+ @ApiModelProperty("鐜婊℃剰搴�")
+ @Excel(name = "鐜婊℃剰搴�")
+ private double environment;
+
+ /**
+ * 鍖荤敓婊℃剰搴�
+ */
+ @ApiModelProperty("鍖荤敓婊℃剰搴�")
+ @Excel(name = "鍖荤敓婊℃剰搴�")
+ private double doctorSatisfaction;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鎶ゅ+婊℃剰搴�")
+ @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+ private double nurseSatisfaction;
+
+ @ApiModelProperty("鎬诲垎")
+ private double total;
+
+ /**
+ * $column.columnComment
+ */
+ @ApiModelProperty("鍒犻櫎")
+ private String delFlag;
+
+}
+
diff --git a/smartor/src/main/java/com/smartor/mapper/PatSatisfactionMapper.java b/smartor/src/main/java/com/smartor/mapper/PatSatisfactionMapper.java
new file mode 100644
index 0000000..f0bcdf9
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/mapper/PatSatisfactionMapper.java
@@ -0,0 +1,64 @@
+package com.smartor.mapper;
+
+import com.smartor.domain.PatSatisfaction;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 鎮h�呮弧鎰忓害Mapper鎺ュ彛
+ *
+ * @author lihu
+ * @date 2025-06-30
+ */
+@Mapper
+public interface PatSatisfactionMapper
+{
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害
+ *
+ * @param id 鎮h�呮弧鎰忓害涓婚敭
+ * @return 鎮h�呮弧鎰忓害
+ */
+ public PatSatisfaction selectPatSatisfactionById(Long id);
+
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害鍒楄〃
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 鎮h�呮弧鎰忓害闆嗗悎
+ */
+ public List<PatSatisfaction> selectPatSatisfactionList(PatSatisfaction patSatisfaction);
+
+ /**
+ * 鏂板鎮h�呮弧鎰忓害
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 缁撴灉
+ */
+ public int insertPatSatisfaction(PatSatisfaction patSatisfaction);
+
+ /**
+ * 淇敼鎮h�呮弧鎰忓害
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 缁撴灉
+ */
+ public int updatePatSatisfaction(PatSatisfaction patSatisfaction);
+
+ /**
+ * 鍒犻櫎鎮h�呮弧鎰忓害
+ *
+ * @param id 鎮h�呮弧鎰忓害涓婚敭
+ * @return 缁撴灉
+ */
+ public int deletePatSatisfactionById(Long id);
+
+ /**
+ * 鎵归噺鍒犻櫎鎮h�呮弧鎰忓害
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deletePatSatisfactionByIds(Long[] ids);
+}
diff --git a/smartor/src/main/java/com/smartor/service/IPatSatisfactionService.java b/smartor/src/main/java/com/smartor/service/IPatSatisfactionService.java
new file mode 100644
index 0000000..cced720
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/IPatSatisfactionService.java
@@ -0,0 +1,61 @@
+package com.smartor.service;
+
+import java.util.List;
+import com.smartor.domain.PatSatisfaction;
+
+/**
+ * 鎮h�呮弧鎰忓害Service鎺ュ彛
+ *
+ * @author lihu
+ * @date 2025-06-30
+ */
+public interface IPatSatisfactionService
+{
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害
+ *
+ * @param id 鎮h�呮弧鎰忓害涓婚敭
+ * @return 鎮h�呮弧鎰忓害
+ */
+ public PatSatisfaction selectPatSatisfactionById(Long id);
+
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害鍒楄〃
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 鎮h�呮弧鎰忓害闆嗗悎
+ */
+ public List<PatSatisfaction> selectPatSatisfactionList(PatSatisfaction patSatisfaction);
+
+ /**
+ * 鏂板鎮h�呮弧鎰忓害
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 缁撴灉
+ */
+ public int insertPatSatisfaction(PatSatisfaction patSatisfaction);
+
+ /**
+ * 淇敼鎮h�呮弧鎰忓害
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 缁撴灉
+ */
+ public int updatePatSatisfaction(PatSatisfaction patSatisfaction);
+
+ /**
+ * 鎵归噺鍒犻櫎鎮h�呮弧鎰忓害
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鎮h�呮弧鎰忓害涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deletePatSatisfactionByIds(Long[] ids);
+
+ /**
+ * 鍒犻櫎鎮h�呮弧鎰忓害淇℃伅
+ *
+ * @param id 鎮h�呮弧鎰忓害涓婚敭
+ * @return 缁撴灉
+ */
+ public int deletePatSatisfactionById(Long id);
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
index f0e8abf..7f871a5 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -172,7 +172,7 @@
//鍘籸edis涓紝鏌ヨ鏄惁鏈塻ubid锛屾湁鐨勮瘽绉婚櫎cache-exist
if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
- log.error("闇�瑕佺Щ闄ょ殑subId涓猴細{}", serviceSubtask.getId().toString());
+ log.info("闇�瑕佺Щ闄ょ殑subId涓猴細{}", serviceSubtask.getId().toString());
serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId());
redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString());
redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString());
@@ -279,6 +279,13 @@
List<PatArchiveOthreInfo> patArchives3 = patArchiveMapper.selectPatArchiveInfoByPhysical(patArchiveReq);
if (CollectionUtils.isNotEmpty(patArchives3)) {
patArchiveList.addAll(patArchives3);
+ }
+ } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 4) {
+ // 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3 鏌ョ湅鍑洪櫌 4
+ patArchiveReq.setCry(1);
+ List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq);
+ if (CollectionUtils.isNotEmpty(patArchives1)) {
+ patArchiveList.addAll(patArchives1);
}
}
@@ -588,6 +595,13 @@
if (CollectionUtils.isNotEmpty(patArchives3)) {
patArchiveList.addAll(patArchives3);
}
+ } else if (patArchive.getAllhosp() != null && patArchive.getAllhosp() == 4) {
+ // 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3 鏌ョ湅鍑洪櫌 4
+ patArchive.setCry(1);
+ List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchive);
+ if (CollectionUtils.isNotEmpty(patArchives1)) {
+ patArchiveList.addAll(patArchives1);
+ }
}
//鏍规嵁鎮h�匢D杩涜鍒嗙粍
@@ -752,6 +766,7 @@
List<PatArchiveOthreInfo> patArchiveList = new ArrayList<>();
if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) {
// 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3
+ patArchiveReq.setCry(0);
List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq);
if (CollectionUtils.isNotEmpty(patArchives1)) {
patArchiveList.addAll(patArchives1);
@@ -768,6 +783,14 @@
if (CollectionUtils.isNotEmpty(patArchives3)) {
patArchiveList.addAll(patArchives3);
}
+
+ } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 4) {
+ // 鏌ョ湅浣忛櫌 1 鏌ョ湅闂ㄨ瘖 2 鏌ョ湅浣撴 3 鏌ョ湅鍑洪櫌 4
+ patArchiveReq.setCry(1);
+ List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq);
+ if (CollectionUtils.isNotEmpty(patArchives1)) {
+ patArchiveList.addAll(patArchives1);
+ }
}
return patArchiveList;
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 4d8b5b6..4dc28ec 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -209,7 +209,7 @@
pmks.setInhospstate("1");
pmks.setFuflag("1");
List<PatMedInhosp> patMedInhosps = patMedInhospMapper.selectPatMedInhospList(pmks);
- log.error("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌閮ㄩ棬鎮h�呬俊鎭細{}", patMedInhosps);
+ log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌閮ㄩ棬鎮h�呬俊鎭細{}", patMedInhosps);
for (PatMedInhosp patMedInhosp1 : patMedInhosps) {
String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
patMedInhosp1.setTagname(tagname);
@@ -262,7 +262,7 @@
pmbq.setInhospstate("1");
pmbq.setFuflag("1");
List<PatMedInhosp> patMedInhospBQs = patMedInhospMapper.selectPatMedInhospList(pmbq);
- log.error("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鐥呭尯鎮h�呬俊鎭細{}", patMedInhosps);
+ log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鐥呭尯鎮h�呬俊鎭細{}", patMedInhosps);
for (PatMedInhosp patMedInhosp1 : patMedInhospBQs) {
String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
patMedInhosp1.setTagname(tagname);
@@ -312,7 +312,7 @@
pmjb.setInhospstate("1");
pmjb.setFuflag("1");
List<PatMedInhosp> patMedInhospJBs = patMedInhospMapper.selectPatMedInhospList(pmjb);
- log.error("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鐤剧梾鎮h�呬俊鎭細{}", patMedInhosps);
+ log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鐤剧梾鎮h�呬俊鎭細{}", patMedInhosps);
for (PatMedInhosp patMedInhosp1 : patMedInhospJBs) {
String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid());
patMedInhosp1.setTagname(tagname);
@@ -538,7 +538,7 @@
st.setSendState(2L);
List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(st);
if (CollectionUtils.isEmpty(serviceTasks)) {
- log.error("璇ユ偅鑰呭嚭闄㈤殢璁块暱鏈熶换鍔′笉瀛樺湪,浠诲姟ID涓猴細{}", taskid);
+ log.info("璇ユ偅鑰呭嚭闄㈤殢璁块暱鏈熶换鍔′笉瀛樺湪,浠诲姟ID涓猴細{}", taskid);
patMedInhosp1.setDeptcheckFlag("2");
patMedInhosp1.setLongTaskReason(longTaskReason + " & 璇ユ偅鑰呭嚭闄㈤殢璁块暱鏈熶换鍔′笉瀛樺湪,浠诲姟ID涓�:" + taskid);
patMedInhospMapper.updatePatMedInhosp(patMedInhosp1);
@@ -566,7 +566,7 @@
subtask.setSendstate(2L);
subtask.setTaskid(taskid);
List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(subtask);
- log.error("璇ユ偅鑰呭緟鎵ц鐨勪换鍔�:{}", selectServiceSubtaskList);
+ log.info("璇ユ偅鑰呭緟鎵ц鐨勪换鍔�:{}", selectServiceSubtaskList);
if (CollectionUtils.isNotEmpty(selectServiceSubtaskList) && selectServiceSubtaskList.size() > 0) {
for (ServiceSubtask serviceSubtask1 : selectServiceSubtaskList) {
if (Objects.isNull(serviceSubtask1.getLongSendTime())) {
@@ -643,7 +643,7 @@
patMedInhospMapper.updatePatMedInhosp(patMedInhosp2);
} else {
//鐢熸垚瀛愪换鍔″け璐ワ紝
- log.error("鐢熸垚瀛愪换鍔″け璐erviceSubtask涓猴細{}", serviceSubtask);
+ log.info("鐢熸垚瀛愪换鍔″け璐erviceSubtask涓猴細{}", serviceSubtask);
PatMedInhosp patMedInhosp2 = new PatMedInhosp();
patMedInhosp2.setInhospid(patMedInhosp1.getInhospid());
if (type == 1) patMedInhosp2.setDeptcheckFlag("2");
@@ -695,6 +695,7 @@
if (serviceTask.getSendDay() == null) serviceTask.setSendDay(1L);
Date newDate = addDays(patMedInhosp1.getEndtime(), serviceTask.getSendDay().intValue());
serviceSubtask.setLongSendTime(newDate);
+ serviceSubtask.setVisitTime(newDate);
//鎮h�呭彂閫佹椂闂�
if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) {
// log.error("serviceSubtask99999999鐨勫�间负锛歿}",serviceSubtask);
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
index 6923908..7b26833 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -116,16 +116,16 @@
@Override
public PatMedRes selectPatMedOuthospCount(PatMedReq patMedReq) {
- // 鑾峰彇褰撳墠鐧婚檰浜虹殑閮ㄩ棬鏉冮檺
- if (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);
- }
+// // 鑾峰彇褰撳墠鐧婚檰浜虹殑閮ㄩ棬鏉冮檺
+// if (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);
+// }
return patMedOuthospMapper.selectPatMedOuthospCount(patMedReq);
}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatSatisfactionServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatSatisfactionServiceImpl.java
new file mode 100644
index 0000000..918caac
--- /dev/null
+++ b/smartor/src/main/java/com/smartor/service/impl/PatSatisfactionServiceImpl.java
@@ -0,0 +1,102 @@
+package com.smartor.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.utils.DateUtils;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.smartor.mapper.PatSatisfactionMapper;
+import com.smartor.domain.PatSatisfaction;
+import com.smartor.service.IPatSatisfactionService;
+
+/**
+ * 鎮h�呮弧鎰忓害Service涓氬姟灞傚鐞�
+ *
+ * @author lihu
+ * @date 2025-06-30
+ */
+@Service
+public class PatSatisfactionServiceImpl implements IPatSatisfactionService {
+ @Autowired
+ private PatSatisfactionMapper patSatisfactionMapper;
+
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害
+ *
+ * @param id 鎮h�呮弧鎰忓害涓婚敭
+ * @return 鎮h�呮弧鎰忓害
+ */
+ @Override
+ public PatSatisfaction selectPatSatisfactionById(Long id) {
+ PatSatisfaction ps = patSatisfactionMapper.selectPatSatisfactionById(id);
+ double total = ps.getDoctorSatisfaction() + ps.getAuthenticity() + ps.getWeekFinish() + ps.getStandard() + ps.getTimeliness() + ps.getLibrary() + ps.getEnvironment() + ps.getNurseSatisfaction();
+ ps.setTotal(total);
+ return ps;
+ }
+
+ /**
+ * 鏌ヨ鎮h�呮弧鎰忓害鍒楄〃
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 鎮h�呮弧鎰忓害
+ */
+ @Override
+ public List<PatSatisfaction> selectPatSatisfactionList(PatSatisfaction patSatisfaction) {
+ List<PatSatisfaction> patSatisfactions = patSatisfactionMapper.selectPatSatisfactionList(patSatisfaction);
+ if (CollectionUtils.isNotEmpty(patSatisfactions)) {
+ patSatisfactions.forEach(ps -> {
+ double total = ps.getDoctorSatisfaction() + ps.getAuthenticity() + ps.getWeekFinish() + ps.getStandard() + ps.getTimeliness() + ps.getLibrary() + ps.getEnvironment() + ps.getNurseSatisfaction();
+ ps.setTotal(total);
+ });
+ }
+ return patSatisfactions;
+ }
+
+ /**
+ * 鏂板鎮h�呮弧鎰忓害
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertPatSatisfaction(PatSatisfaction patSatisfaction) {
+ patSatisfaction.setCreateTime(DateUtils.getNowDate());
+ patSatisfaction.setUpdateTime(DateUtils.getNowDate());
+ return patSatisfactionMapper.insertPatSatisfaction(patSatisfaction);
+ }
+
+ /**
+ * 淇敼鎮h�呮弧鎰忓害
+ *
+ * @param patSatisfaction 鎮h�呮弧鎰忓害
+ * @return 缁撴灉
+ */
+ @Override
+ public int updatePatSatisfaction(PatSatisfaction patSatisfaction) {
+ patSatisfaction.setUpdateTime(DateUtils.getNowDate());
+ return patSatisfactionMapper.updatePatSatisfaction(patSatisfaction);
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎鎮h�呮弧鎰忓害
+ *
+ * @param ids 闇�瑕佸垹闄ょ殑鎮h�呮弧鎰忓害涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deletePatSatisfactionByIds(Long[] ids) {
+ return patSatisfactionMapper.deletePatSatisfactionByIds(ids);
+ }
+
+ /**
+ * 鍒犻櫎鎮h�呮弧鎰忓害淇℃伅
+ *
+ * @param id 鎮h�呮弧鎰忓害涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deletePatSatisfactionById(Long id) {
+ return patSatisfactionMapper.deletePatSatisfactionById(id);
+ }
+}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
index 40885f9..387c0b9 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -127,7 +127,7 @@
@Override
public Boolean addUserInfo(Map dataMap) {
- log.error("ServiceExternalServiceImpl---addUserInfo鐨勬柊澧炵殑鍊间负锛歿}", dataMap);
+ log.info("ServiceExternalServiceImpl---addUserInfo鐨勬柊澧炵殑鍊间负锛歿}", dataMap);
Map yeWuXX = (Map) dataMap.get("YeWuXX");
Map<String, Object> yongHuXX = (Map<String, Object>) yeWuXX.get("YongHuXX");
ExternalUserInfo externalUserInfo = BeanUtil.mapToBean(yongHuXX, ExternalUserInfo.class, true);
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 52b7116..f9ba7d0 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -454,7 +454,7 @@
serviceTask.setCreateTime(new Date());
serviceTask.setUpdateTime(new Date());
serviceTaskService.insertServiceTask(serviceTask);
- log.error("----serviceTaskVO.getAppltype()鐨勫�间负锛歿}", serviceTaskVO.getAppltype());
+ log.info("----serviceTaskVO.getAppltype()鐨勫�间负锛歿}", serviceTaskVO.getAppltype());
if (StringUtils.isNotEmpty(serviceTaskVO.getAppltype())) {
if (serviceTaskVO.getAppltype().equals("3")) {
ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag();
@@ -467,7 +467,7 @@
serviceTaskdiag.setGuid(serviceTask.getGuid());
serviceTaskdiag.setOrgid(serviceTask.getOrgid());
serviceTaskdiag.setCreateTime(new Date());
- log.error("----serviceTaskdiag鐨勫�间负锛歿}", serviceTaskdiag);
+ log.info("----serviceTaskdiag鐨勫�间负锛歿}", serviceTaskdiag);
if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) {
String[] Icd10codes = serviceTaskVO.getIcd10code().split(",");
for (String icd10code : Icd10codes) {
@@ -490,7 +490,7 @@
String[] opcodes = serviceTaskVO.getOpcode().split(",");
for (String opcode : opcodes) {
serviceTaskoper.setOpcode(opcode);
- log.error("----serviceTaskoper鐨勫�间负锛歿}", serviceTaskoper);
+ log.info("----serviceTaskoper鐨勫�间负锛歿}", serviceTaskoper);
serviceTaskoperService.insertServiceTaskoper(serviceTaskoper);
}
}
@@ -595,7 +595,7 @@
}
if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
- log.error("insertOrUpdateTask闇�瑕佺Щ闄ょ殑subId涓猴細{}", serviceSubtask.getId().toString());
+ log.info("insertOrUpdateTask闇�瑕佺Щ闄ょ殑subId涓猴細{}", serviceSubtask.getId().toString());
serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId());
redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString());
redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString());
@@ -685,7 +685,7 @@
serviceTaskdiag2.setIcd10code(icdcode);
List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag2);
serviceTaskdiag.setIcd10code(icdcode);
- log.error("----serviceTaskdiag鏇存柊鐨勫�间负锛歿}", serviceTaskdiag);
+ log.info("----serviceTaskdiag鏇存柊鐨勫�间负锛歿}", serviceTaskdiag);
if (CollectionUtils.isNotEmpty(serviceTaskdiags)) {
serviceTaskdiag.setId(serviceTaskdiags.get(0).getId());
serviceTaskdiagService.updateServiceTaskdiag(serviceTaskdiag);
@@ -719,7 +719,7 @@
List<ServiceTaskoper> serviceTaskopers = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper2);
serviceTaskoper.setOpcode(opcode);
- log.error("----serviceTaskoper鐨勫�间负锛歿}", serviceTaskoper);
+ log.info("----serviceTaskoper鐨勫�间负锛歿}", serviceTaskoper);
if (CollectionUtils.isNotEmpty(serviceTaskopers)) {
serviceTaskoper.setId(serviceTaskopers.get(0).getId());
serviceTaskoperService.updateServiceTaskoper(serviceTaskoper);
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
index 0002a5f..15a26e4 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -278,7 +278,7 @@
serviceSubtask.setBedNo(serviceTaskVO.getBedno());
serviceSubtask.setDeptname(serviceTaskVO.getDeptname());
serviceSubtask.setDeptcode(serviceTaskVO.getDeptcode());
- serviceSubtask.setSendstate(1L);
+ serviceSubtask.setSendstate(6L);
serviceSubtask.setCreateTime(new Date());
serviceSubtask.setLeavehospitaldistrictcode(serviceTaskVO.getDistrictcode());
//鍏堟煡璇竴閬嶏紝璇askGuid鏄惁瀛樺湪
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index ba9a75e..2b6dc92 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -60,6 +60,8 @@
<result property="carePerson" column="care_person"/>
<result property="casePersonAge" column="case_person_age"/>
<result property="guid" column="guid"/>
+ <result property="filterDrname" column="filter_drname"/>
+ <result property="filterDrcode" column="filter_drcode"/>
</resultMap>
@@ -119,6 +121,8 @@
<result property="guid" column="guid"/>
<result property="leavediagname" column="leavediagname"/>
<result property="leaveicd10code" column="leaveicd10code"/>
+ <result property="filterDrname" column="filter_drname"/>
+ <result property="filterDrcode" column="filter_drcode"/>
</resultMap>
<sql id="selectPatArchiveVo">
@@ -126,6 +130,8 @@
notrequired_flag,
notrequiredreason,
patientno,
+ filter_drname,
+ filter_drcode,
patid_his,
age_unit,
age_unit2,
@@ -200,6 +206,8 @@
<if test="medicareType != null ">and medicare_type = #{medicareType}</if>
<if test="carePerson != null ">and care_person = #{carePerson}</if>
<if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
+ <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
+ <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
</where>
</select>
@@ -233,11 +241,15 @@
a.income,
a.medicare_type,
a.care_person,
+ a.filter_drname,
+ a.filter_drcode,
a.case_person_age
from pat_archive a,pat_archivetag b ,base_tag c
<where>
a.del_flag=0 and
a.id = b.patid and b.tagid = c.tagid
+ <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
+ <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
<if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="telcode != null and telcode != ''">and telcode = #{telcode}</if>
@@ -303,6 +315,8 @@
<if test="medicareType != null ">medicare_type,</if>
<if test="carePerson != null ">care_person,</if>
<if test="casePersonAge != null ">case_person_age,</if>
+ <if test="filterDrname != null ">filter_drname,</if>
+ <if test="filterDrcode != null ">filter_drcode,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientno != null">#{patientno},</if>
@@ -350,6 +364,8 @@
<if test="medicareType != null ">#{medicareType},</if>
<if test="carePerson != null ">#{carePerson},</if>
<if test="casePersonAge != null ">#{casePersonAge},</if>
+ <if test="filterDrname != null ">#{filterDrname},</if>
+ <if test="filterDrcode != null ">#{filterDrcode},</if>
</trim>
</insert>
@@ -357,14 +373,14 @@
insert into
pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path,
- degree_of_education,marital_status,income,medicare_type,care_person,case_person_age)
+ degree_of_education,marital_status,income,medicare_type,care_person,case_person_age,filter_drname,filter_drcode)
values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.age2},#{item.sourcefrom},#{item.archivetime},#{item.archiveby}
,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy},
#{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace},#{item.patientno},
#{item.patidHis},#{item.sdFlag},#{item.ageUnit},#{item.ageUnit2},#{item.notrequiredFlag},#{item.notrequiredreason}
- ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge})
+ ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge},#{item.filterDrname},#{item.filterDrcode})
</foreach>
</insert>
@@ -411,6 +427,8 @@
<if test="carePerson != null ">care_person = #{carePerson},</if>
<if test="casePersonAge != null ">case_person_age = #{casePersonAge},</if>
<if test="guid != null ">guid = #{guid},</if>
+ <if test="filterDrname != null ">filter_drname = #{filterDrname},</if>
+ <if test="filterDrcode != null ">filter_drcode = #{filterDrcode},</if>
</trim>
where id = #{id}
</update>
@@ -469,6 +487,8 @@
a.upload_time,
a.viptype,
a.pattype,
+ a.filter_drname,
+ a.filter_drcode,
b.tagname AS tag,
b.tagid AS tagid
FROM
@@ -536,6 +556,8 @@
a.isupload,
a.upload_time,
a.pattype,
+ a.filter_drname,
+ a.filter_drcode,
d.bed_no,
d.starttime,
d.endtime,
@@ -671,6 +693,8 @@
a.create_time,
a.isupload,
a.upload_time,
+ a.filter_drname,
+ a.filter_drcode,
t.tagname,
a.pattype
from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid
@@ -760,6 +784,8 @@
a.create_time,
a.isupload,
a.upload_time,
+ a.filter_drname,
+ a.filter_drcode,
t.tagname,
a.pattype
from pat_med_physical d JOIN pat_archive a ON a.id = d.patid
@@ -810,7 +836,7 @@
<select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq"
resultMap="PatArchiveOthreInfoResult">
-
+ select * from (
select
a.idcardno,
a.id,
@@ -854,6 +880,8 @@
a.isupload,
a.upload_time,
a.pattype,
+ a.filter_drname,
+ a.filter_drcode,
d.bed_no,
d.starttime,
d.endtime,
@@ -916,6 +944,21 @@
#{leaveldeptcode}
</foreach>
</if>
+ <if test="hospitaldistrictcodes != null and hospitaldistrictcodes.size()>0">
+ AND d.hospitaldistrictcode IN
+ <foreach collection="hospitaldistrictcodes" item="hospitaldistrictcode" open="(" separator=","
+ close=")">
+ #{hospitaldistrictcode}
+ </foreach>
+ </if>
+ <if test="deptcodes != null and deptcodes.size() > 0">
+ AND d.deptcode IN
+ <foreach collection="deptcodes" item="deptcode" open="(" separator=","
+ close=")">
+ #{deptcode}
+ </foreach>
+ </if>
+
<if test="pids != null">
AND a.id NOT IN
<foreach collection="pids" item="pid" open="(" separator="," close=")">
@@ -926,7 +969,7 @@
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
</where>
- order by a.id,a.update_time desc ) order by endtime desc
+ order by a.id,a.update_time desc ) as tmp order by endtime desc
</select>
<select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq"
@@ -953,8 +996,8 @@
a.place_of_residence,
a.birthplace,
a.birthdate,
--- a.icd10code as leaveicd10code,
--- a.diagname as leavediagname,
+ -- a.icd10code as leaveicd10code,
+ -- a.diagname as leavediagname,
a.age,
a.age2,
a.viptype,
@@ -973,6 +1016,8 @@
a.create_time,
a.isupload,
a.upload_time,
+ a.filter_drname,
+ a.filter_drcode,
t.tagname,
a.pattype
from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid
@@ -1046,6 +1091,8 @@
a.viptype,
a.birthdate,
a.age,
+ a.filter_drname,
+ a.filter_drcode,
a.age2,
a.sourcefrom,
a.archivetime,
diff --git a/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml b/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml
new file mode 100644
index 0000000..2f08750
--- /dev/null
+++ b/smartor/src/main/resources/mapper/smartor/PatSatisfactionMapper.xml
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.smartor.mapper.PatSatisfactionMapper">
+
+ <resultMap type="com.smartor.domain.PatSatisfaction" id="PatSatisfactionResult">
+ <result property="id" column="id"/>
+ <result property="patName" column="pat_name"/>
+ <result property="patCode" column="pat_code"/>
+ <result property="phone" column="phone"/>
+ <result property="hospitaldistrictname" column="hospitaldistrictname"/>
+ <result property="hospitaldistrictcode" column="hospitaldistrictcode"/>
+ <result property="deptname" column="deptname"/>
+ <result property="deptcode" column="deptcode"/>
+ <result property="authenticity" column="authenticity"/>
+ <result property="weekFinish" column="week_finish"/>
+ <result property="standard" column="standard"/>
+ <result property="timeliness" column="timeliness"/>
+ <result property="library" column="library"/>
+ <result property="environment" column="environment"/>
+ <result property="doctorSatisfaction" column="doctor_satisfaction"/>
+ <result property="nurseSatisfaction" column="nurse_satisfaction"/>
+ <result property="updateTime" column="update_time"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateBy" column="update_by"/>
+ <result property="createBy" column="create_by"/>
+ <result property="delFlag" column="del_flag"/>
+ <result property="orgid" column="orgid"/>
+ </resultMap>
+
+ <sql id="selectPatSatisfactionVo">
+ select id,
+ orgid,
+ pat_name,
+ pat_code,
+ phone,
+ hospitaldistrictname,
+ hospitaldistrictcode,
+ deptname,
+ deptcode,
+ authenticity,
+ week_finish,
+ standard,
+ timeliness,
+ library,
+ environment,
+ doctor_satisfaction,
+ nurse_satisfaction,
+ update_time,
+ create_time,
+ update_by,
+ create_by,
+ del_flag
+ from pat_satisfaction
+ </sql>
+
+ <select id="selectPatSatisfactionList" parameterType="com.smartor.domain.PatSatisfaction"
+ resultMap="PatSatisfactionResult">
+ <include refid="selectPatSatisfactionVo"/>
+ <where>
+ del_flag=0
+ <if test="patName != null and patName != ''">
+ and pat_name like concat('%', #{patName}, '%')
+ </if>
+ <if test="patCode != null and patCode != ''">
+ and pat_code = #{patCode}
+ </if>
+ <if test="phone != null and phone != ''">
+ and phone = #{phone}
+ </if>
+ <if test="hospitaldistrictname != null and hospitaldistrictname != ''">
+ and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%')
+ </if>
+ <if test="hospitaldistrictcode != null and hospitaldistrictcode != ''">
+ and hospitaldistrictcode = #{hospitaldistrictcode}
+ </if>
+ <if test="deptname != null and deptname != ''">
+ and deptname like concat('%', #{deptname}, '%')
+ </if>
+ <if test="deptcode != null and deptcode != ''">
+ and deptcode = #{deptcode}
+ </if>
+ <if test="authenticity != null and authenticity != ''">
+ and authenticity = #{authenticity}
+ </if>
+ <if test="weekFinish != null and weekFinish != ''">
+ and week_finish = #{weekFinish}
+ </if>
+ <if test="standard != null and standard != ''">
+ and standard = #{standard}
+ </if>
+ <if test="timeliness != null and timeliness != ''">
+ and timeliness = #{timeliness}
+ </if>
+ <if test="library != null and library != ''">
+ and library = #{library}
+ </if>
+ <if test="environment != null and environment != ''">
+ and environment = #{environment}
+ </if>
+ <if test="doctorSatisfaction != null and doctorSatisfaction != ''">
+ and doctor_satisfaction = #{doctorSatisfaction}
+ </if>
+ <if test="nurseSatisfaction != null and nurseSatisfaction != ''">
+ and nurse_satisfaction = #{nurseSatisfaction}
+ </if>
+ <if test="orgid != null and orgid != ''">
+ and orgid = #{orgid}
+ </if>
+ </where>
+ </select>
+
+ <select id="selectPatSatisfactionById" parameterType="Long"
+ resultMap="PatSatisfactionResult">
+ <include refid="selectPatSatisfactionVo"/>
+ where id = #{id}
+ </select>
+
+ <insert id="insertPatSatisfaction" parameterType="com.smartor.domain.PatSatisfaction">
+ insert into pat_satisfaction
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">id,
+ </if>
+ <if test="patName != null">pat_name,
+ </if>
+ <if test="patCode != null">pat_code,
+ </if>
+ <if test="phone != null">phone,
+ </if>
+ <if test="hospitaldistrictname != null">hospitaldistrictname,
+ </if>
+ <if test="hospitaldistrictcode != null">hospitaldistrictcode,
+ </if>
+ <if test="deptname != null">deptname,
+ </if>
+ <if test="deptcode != null">deptcode,
+ </if>
+ <if test="authenticity != null">authenticity,
+ </if>
+ <if test="weekFinish != null">week_finish,
+ </if>
+ <if test="standard != null">standard,
+ </if>
+ <if test="timeliness != null">timeliness,
+ </if>
+ <if test="library != null">library,
+ </if>
+ <if test="environment != null">environment,
+ </if>
+ <if test="doctorSatisfaction != null">doctor_satisfaction,
+ </if>
+ <if test="nurseSatisfaction != null">nurse_satisfaction,
+ </if>
+ <if test="updateTime != null">update_time,
+ </if>
+ <if test="createTime != null">create_time,
+ </if>
+ <if test="updateBy != null">update_by,
+ </if>
+ <if test="createBy != null">create_by,
+ </if>
+ <if test="delFlag != null">del_flag,
+ </if>
+ <if test="orgid != null">orgid,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">#{id},
+ </if>
+ <if test="patName != null">#{patName},
+ </if>
+ <if test="patCode != null">#{patCode},
+ </if>
+ <if test="phone != null">#{phone},
+ </if>
+ <if test="hospitaldistrictname != null">#{hospitaldistrictname},
+ </if>
+ <if test="hospitaldistrictcode != null">#{hospitaldistrictcode},
+ </if>
+ <if test="deptname != null">#{deptname},
+ </if>
+ <if test="deptcode != null">#{deptcode},
+ </if>
+ <if test="authenticity != null">#{authenticity},
+ </if>
+ <if test="weekFinish != null">#{weekFinish},
+ </if>
+ <if test="standard != null">#{standard},
+ </if>
+ <if test="timeliness != null">#{timeliness},
+ </if>
+ <if test="library != null">#{library},
+ </if>
+ <if test="environment != null">#{environment},
+ </if>
+ <if test="doctorSatisfaction != null">#{doctorSatisfaction},
+ </if>
+ <if test="nurseSatisfaction != null">#{nurseSatisfaction},
+ </if>
+ <if test="updateTime != null">#{updateTime},
+ </if>
+ <if test="createTime != null">#{createTime},
+ </if>
+ <if test="updateBy != null">#{updateBy},
+ </if>
+ <if test="createBy != null">#{createBy},
+ </if>
+ <if test="delFlag != null">#{delFlag},
+ </if>
+ <if test="orgid != null">#{orgid},
+ </if>
+ </trim>
+ </insert>
+
+ <update id="updatePatSatisfaction" parameterType="com.smartor.domain.PatSatisfaction">
+ update pat_satisfaction
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="patName != null">pat_name =
+ #{patName},
+ </if>
+ <if test="patCode != null">pat_code =
+ #{patCode},
+ </if>
+ <if test="phone != null">phone =
+ #{phone},
+ </if>
+ <if test="hospitaldistrictname != null">hospitaldistrictname =
+ #{hospitaldistrictname},
+ </if>
+ <if test="hospitaldistrictcode != null">hospitaldistrictcode =
+ #{hospitaldistrictcode},
+ </if>
+ <if test="deptname != null">deptname =
+ #{deptname},
+ </if>
+ <if test="deptcode != null">deptcode =
+ #{deptcode},
+ </if>
+ <if test="authenticity != null">authenticity =
+ #{authenticity},
+ </if>
+ <if test="weekFinish != null">week_finish =
+ #{weekFinish},
+ </if>
+ <if test="standard != null">standard =
+ #{standard},
+ </if>
+ <if test="timeliness != null">timeliness =
+ #{timeliness},
+ </if>
+ <if test="library != null">library =
+ #{library},
+ </if>
+ <if test="environment != null">environment =
+ #{environment},
+ </if>
+ <if test="doctorSatisfaction != null">doctor_satisfaction =
+ #{doctorSatisfaction},
+ </if>
+ <if test="nurseSatisfaction != null">nurse_satisfaction =
+ #{nurseSatisfaction},
+ </if>
+ <if test="updateTime != null">update_time =
+ #{updateTime},
+ </if>
+ <if test="createTime != null">create_time =
+ #{createTime},
+ </if>
+ <if test="updateBy != null">update_by =
+ #{updateBy},
+ </if>
+ <if test="createBy != null">create_by =
+ #{createBy},
+ </if>
+ <if test="delFlag != null">del_flag =
+ #{delFlag},
+ </if>
+ <if test="orgid != null">orgid =
+ #{orgid},
+ </if>
+ </trim>
+ where id = #{id}
+ </update>
+
+ <update id="deletePatSatisfactionById" parameterType="Long">
+ update pat_satisfaction
+ <trim prefix="SET" suffixOverrides=",">
+ del_flag =1
+ </trim>
+ where id = #{id}
+ </update>
+
+ <update id="deletePatSatisfactionByIds" parameterType="String">
+ update pat_satisfaction
+ <trim prefix="SET" suffixOverrides=",">
+ del_flag =1
+ </trim>
+ where id in
+ <foreach item="id" collection="array" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </update>
+
+
+</mapper>
--
Gitblit v1.9.3