From fe47ff909096722ba8e9172c3e1f0f7910b16909 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期二, 21 十月 2025 14:49:18 +0800
Subject: [PATCH] 结束出院日期格式
---
smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java | 54 ++++++++++++++++++++++++++++--------------------------
1 files changed, 28 insertions(+), 26 deletions(-)
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 4b7c681..ce09f39 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -1,7 +1,5 @@
package com.smartor.service.impl;
-import cn.hutool.json.JSONUtil;
-import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -9,22 +7,16 @@
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.enums.HospTypeEnum;
import com.ruoyi.common.enums.ServiceTaskTypeEnum;
-import com.ruoyi.common.enums.TaskTypeEnum;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.*;
-import com.ruoyi.common.utils.http.HttpEntity;
-import com.ruoyi.common.utils.http.HttpUtils;
+import com.smartor.common.LSHospTokenUtil;
import com.smartor.common.LyraTokenUtil;
import com.smartor.domain.*;
import com.smartor.mapper.BaseOrganizationMapper;
import com.smartor.mapper.ServiceSubtaskMapper;
import com.smartor.service.IServiceTaskService;
import com.smartor.service.ISvyTaskSingleService;
-import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.extern.slf4j.Slf4j;
-import okhttp3.OkHttpClient;
-import okhttp3.Request;
-import okhttp3.Response;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -119,7 +111,7 @@
}
if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
- log.error("insertOrUpdateSvyTask闇�瑕佺Щ闄ょ殑subId涓猴細{}", serviceSubtask.getId().toString());
+ log.info("insertOrUpdateSvyTask闇�瑕佺Щ闄ょ殑subId涓猴細{}", serviceSubtask.getId().toString());
serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId());
redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString());
redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString());
@@ -248,14 +240,13 @@
if (StringUtils.isNotEmpty(serviceTaskVO.getServicetype()))
type = ServiceTaskTypeEnum.getDescByCode(serviceTaskVO.getServicetype());
serviceSubtask.setServiceType(type);
- String tasktype = "-1";
- if (StringUtils.isNotEmpty(serviceTaskVO.getTasktype()))
- tasktype = TaskTypeEnum.getDescByCode(serviceTaskVO.getTasktype());
- serviceSubtask.setType(tasktype);
+ //绗笁鏂逛紶杩囨潵鐨勶紝鐩存帴缁熶竴瀹氫负闂嵎
+ serviceSubtask.setType("2");
serviceSubtask.setLabelstatus(serviceTaskVO.getTaskstate());
serviceSubtask.setTaskName(serviceTaskVO.getTaskname());
serviceSubtask.setTaskDesc(serviceTaskVO.getTaskdesc());
- serviceSubtask.setPreachform(serviceTaskVO.getExemode());
+ //绗笁鏂逛紶杩囨潵鐨勶紝鐩存帴缁熶竴瀹氫负"浜哄伐"
+ serviceSubtask.setPreachform("1");
serviceSubtask.setCreateBy(serviceTaskVO.getCreateBy());
serviceSubtask.setCreateTime(serviceTaskVO.getCreateTime());
serviceSubtask.setOperatorNo(serviceTaskVO.getOperatorno());
@@ -287,7 +278,8 @@
serviceSubtask.setBedNo(serviceTaskVO.getBedno());
serviceSubtask.setDeptname(serviceTaskVO.getDeptname());
serviceSubtask.setDeptcode(serviceTaskVO.getDeptcode());
- serviceSubtask.setSendstate(1L);
+ serviceSubtask.setSendstate(6L);
+ serviceSubtask.setVisitTime(serviceTaskVO.getVisittime());
serviceSubtask.setCreateTime(new Date());
serviceSubtask.setLeavehospitaldistrictcode(serviceTaskVO.getDistrictcode());
//鍏堟煡璇竴閬嶏紝璇askGuid鏄惁瀛樺湪
@@ -313,14 +305,18 @@
log.info("360鏌ヨ鏉′欢涓虹┖");
throw new BaseException("360鏌ヨ鏉′欢涓虹┖");
}
- String token = null;
-
- LyraTokenUtil lyraTokenUtil = LyraTokenUtil.createLyraTokenUtil("https://9.0.124.104:13021/mediinfo-lyra-authserver/connect/token", "zjhes.suifangxt", "OIjdJvx2ALjFVGZoCZO4I8O");
- try {
- token = lyraTokenUtil.getToken();
- } catch (IOException e) {
- e.printStackTrace();
- }
+ String token = LSHospTokenUtil.getToken(serviceQueryInfo.getXiaoXiTou().getFaSongJGID(),serviceQueryInfo.getUrl());
+// LyraTokenUtil lyraTokenUtil = null;
+// if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47255004333112711A1001")) //鏅畞
+// lyraTokenUtil = LyraTokenUtil.createLyraTokenUtil("https://9.0.124.104:13021/mediinfo-lyra-authserver/connect/token", "zjhes.suifangxt", "OIjdJvx2ALjFVGZoCZO4I8O");
+// if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47231022633110211A2101")) //涓尰闄�
+// lyraTokenUtil = LyraTokenUtil.createLyraTokenUtil("https://9.0.124.104:13011/mediinfo-lyra-authserver/connect/token", "zjhes.suifangxt", "OIjdJvx2ALjFVGZoCZO4I8O");
+//
+// try {
+// token = lyraTokenUtil.getToken();
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
//鐢ㄦ埛淇℃伅锛岄�氳繃ZuZhiJGID鍘籦se_organization涓幏鍙栨満鏋勪俊鎭�
if (StringUtils.isBlank(serviceQueryInfo.getYeWuXX().getYongHuXX().getZuZhiJGID()))
@@ -347,8 +343,14 @@
try {
String jsonString = objectMapper.writeValueAsString(serviceQueryInfo);
log.error("token鐨勫�间负锛歿}", token);
- result = OkHttpExample.sendPostRequest("https://9.0.124.104:13021/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
- map = objectMapper.readValue(result, Map.class);
+ if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47255004333112711A1001")) { //鏅畞
+ result = OkHttpExample.sendPostRequest("https://9.0.124.104:13021/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
+ }else if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47231022633110211A2101")) { //涓尰闄�
+ result = OkHttpExample.sendPostRequest("https://9.0.124.104:13011/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token);
+ }else if(ObjectUtils.isNotEmpty(serviceQueryInfo.getUrl360())){
+ result = OkHttpExample.sendPostRequest(serviceQueryInfo.getUrl360(), jsonString, token);
+ }
+ map = objectMapper.readValue(result, Map.class);
} catch (Exception e) {
e.printStackTrace();
}
--
Gitblit v1.9.3