Merge remote-tracking branch 'origin/master'
commit
48eeb5be29
@ -1,4 +1,15 @@
|
||||
{
|
||||
"blocking": ["xdxt","yx","jc"],
|
||||
"notHandled":["lis","bl","nh"]
|
||||
"blocking": [
|
||||
"xdxt",
|
||||
"yx",
|
||||
"jc"
|
||||
],
|
||||
"notHandled": [
|
||||
"lis",
|
||||
"bl",
|
||||
"nh"
|
||||
],
|
||||
"fetchBase64": [
|
||||
"cta"
|
||||
]
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.docus.server.common.mapper;
|
||||
|
||||
import com.docus.server.common.entity.RemoteCallResult;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 远程调用过程信息表
|
||||
* @author wyb
|
||||
*
|
||||
*/
|
||||
public interface RemoteCallResultMapper {
|
||||
/**
|
||||
* 远程调用结果存储
|
||||
* @param remoteCallResult 远程调用结果
|
||||
* @return 保存结果
|
||||
*/
|
||||
int save(@Param("result") RemoteCallResult remoteCallResult);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.docus.server.common.mapper;
|
||||
|
||||
import com.docus.server.common.entity.SdryPacsPrintExcept;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 顺德人医pacs接口获取base64报告出错的记录 mapper
|
||||
* @author wyb
|
||||
*/
|
||||
public interface SdryPacsPrintExceptMapper {
|
||||
int saveExcept(@Param("except") SdryPacsPrintExcept pacsPrintExcept);
|
||||
|
||||
SdryPacsPrintExcept getById(@Param("id") Long id);
|
||||
|
||||
int compensateSuccuss(@Param("id") Long id);
|
||||
|
||||
List<Long> getCompensateIds(@Param("beginDateTime") String beginDateTime);
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.docus.server.common.service;
|
||||
|
||||
import com.docus.server.common.entity.RemoteCallResult;
|
||||
|
||||
/**
|
||||
* 远程调用存储服务业务接口
|
||||
* @author WYBDEV
|
||||
*/
|
||||
public interface RemoteCallResultService {
|
||||
/**
|
||||
* 远程调用结果存储
|
||||
* @param remoteCallResult 远程调用结果
|
||||
*/
|
||||
void save(RemoteCallResult remoteCallResult);
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.docus.server.common.service;
|
||||
|
||||
import com.docus.server.common.entity.SdryPacsPrintExcept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 顺德pacs打印出错补偿的服务
|
||||
* @author WYBDEV
|
||||
*/
|
||||
public interface SdryPacsPrintExceptService {
|
||||
|
||||
|
||||
int insert(SdryPacsPrintExcept pacsPrintExcept);
|
||||
|
||||
SdryPacsPrintExcept getById(Long id);
|
||||
|
||||
int compensateSuccuss(Long id);
|
||||
|
||||
List<Long> getCompensateIds(String beginDateTime);
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.docus.server.common.service.impl;
|
||||
|
||||
import com.docus.core.util.Func;
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.common.entity.RemoteCallResult;
|
||||
import com.docus.server.common.mapper.RemoteCallResultMapper;
|
||||
import com.docus.server.common.service.RemoteCallResultService;
|
||||
import com.docus.server.common.util.FileUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* 远程调用存储服务业务实现
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Service
|
||||
public class RemoteCallResultServiceImpl implements RemoteCallResultService {
|
||||
@Resource
|
||||
private IdService idService;
|
||||
@Resource
|
||||
private RemoteCallResultMapper remoteCallResultMapper;
|
||||
|
||||
private final static int SAVE_DISK_DATA_LENGTH = 1024;
|
||||
|
||||
private final static String REMOTE_CALL_SAVE_PATH = FileUtil.currentPath() + File.separator + "remote-call";
|
||||
|
||||
@Override
|
||||
public void save(RemoteCallResult remoteCallResult) {
|
||||
remoteCallResult.setRequestStorageType(0);
|
||||
remoteCallResult.setResponseStorageType(0);
|
||||
|
||||
Long id = remoteCallResult.getId() == null ? idService.getDateSeq() : remoteCallResult.getId();
|
||||
remoteCallResult.setId(id);
|
||||
String request = remoteCallResult.getRequest();
|
||||
String response = remoteCallResult.getResponse();
|
||||
if (Func.isNotBlank(request) && request.length() > SAVE_DISK_DATA_LENGTH) {
|
||||
String saveReqPath = REMOTE_CALL_SAVE_PATH + File.separator + id + "_request";
|
||||
FileUtil.saveStrData(response, new File(saveReqPath));
|
||||
remoteCallResult.setRequestStorageType(1);
|
||||
remoteCallResult.setRequest(saveReqPath);
|
||||
}
|
||||
if (Func.isNotBlank(response) && response.length() > SAVE_DISK_DATA_LENGTH) {
|
||||
String saveRespPath = REMOTE_CALL_SAVE_PATH + File.separator + id + "_response";
|
||||
FileUtil.saveStrData(response, new File(saveRespPath));
|
||||
remoteCallResult.setResponseStorageType(1);
|
||||
remoteCallResult.setResponse(saveRespPath);
|
||||
}
|
||||
remoteCallResultMapper.save(remoteCallResult);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.docus.server.common.service.impl;
|
||||
|
||||
import com.docus.infrastructure.redis.service.IdService;
|
||||
import com.docus.server.common.entity.SdryPacsPrintExcept;
|
||||
import com.docus.server.common.mapper.SdryPacsPrintExceptMapper;
|
||||
import com.docus.server.common.service.SdryPacsPrintExceptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 远程调用存储服务业务实现
|
||||
*
|
||||
* @author wyb
|
||||
*/
|
||||
@Service
|
||||
public class SdryPacsPrintExceptServiceImpl implements SdryPacsPrintExceptService {
|
||||
@Resource
|
||||
private IdService idService;
|
||||
@Resource
|
||||
private SdryPacsPrintExceptMapper sdryPacsPrintExceptMapper;
|
||||
|
||||
@Override
|
||||
public int insert(SdryPacsPrintExcept pacsPrintExcept) {
|
||||
Long id = pacsPrintExcept.getId();
|
||||
id = id == null ? idService.getDateSeq() : id;
|
||||
pacsPrintExcept.setId(id);
|
||||
return sdryPacsPrintExceptMapper.saveExcept(pacsPrintExcept);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdryPacsPrintExcept getById(Long id) {
|
||||
return sdryPacsPrintExceptMapper.getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compensateSuccuss(Long id) {
|
||||
return sdryPacsPrintExceptMapper.compensateSuccuss(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getCompensateIds(String beginDateTime) {
|
||||
List<Long> ids= sdryPacsPrintExceptMapper.getCompensateIds(beginDateTime);
|
||||
if(Objects.isNull(ids)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.docus.server.report.controller;
|
||||
|
||||
import com.docus.infrastructure.web.api.CommonResult;
|
||||
import com.docus.server.report.job.FetchPacsBase64Job;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Slf4j
|
||||
@Api(tags = "pacs获取base64异常相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/api/fetchPacsBase64Except")
|
||||
public class FetchPacsBase64ExceptController {
|
||||
@Resource
|
||||
private FetchPacsBase64Job fetchPacsBase64Job;
|
||||
|
||||
|
||||
@ApiOperation(value = "根据异常数据表的id补偿")
|
||||
@GetMapping("/compenstateById")
|
||||
public CommonResult<Object> compenstateById(@Param("id") Long exceptId) {
|
||||
fetchPacsBase64Job.compensateFetchBase64Report(exceptId);
|
||||
return CommonResult.success("完成");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
<?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.docus.server.common.mapper.RemoteCallResultMapper">
|
||||
|
||||
<insert id="save">
|
||||
INSERT INTO `docus_archivefile`.`remote_call_result`(`id`, `keyword`, `url`, `header`, `request`, `response`, `remark`, `description`, `request_storage_type`, `response_storage_type`, `call_status`, `call_start_time`, `call_end_time`)
|
||||
VALUES (#{result.id}, #{result.keyword}, #{result.url}, #{result.header}, #{result.request}, #{result.response}, #{result.remark}, #{result.description}, #{result.requestStorageType}, #{result.responseStorageType}, #{result.callStatus}, #{result.callStartTime}, #{result.callEndTime})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,38 @@
|
||||
<?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.docus.server.common.mapper.SdryPacsPrintExceptMapper">
|
||||
|
||||
|
||||
<insert id="saveExcept">
|
||||
INSERT INTO `docus_archivefile`.`sdry_pacs_print_except`(`id`, `inpatient_no`, `admiss_times`, `jzh`, `report_message_path`, `state`, `create_time`, `service_flag`,`exam_report_sn`)
|
||||
VALUES (#{except.id}, #{except.inpatientNo}, #{except.admissTimes}, #{except.jzh}, #{except.reportMessagePath}, 0, #{except.createTime}, #{except.serviceFlag},#{except.examReportSn})
|
||||
</insert>
|
||||
<update id="compensateSuccuss">
|
||||
update
|
||||
`docus_archivefile`.`sdry_pacs_print_except`
|
||||
set `state`=1
|
||||
where id=#{id}
|
||||
</update>
|
||||
<select id="getById" resultType="com.docus.server.common.entity.SdryPacsPrintExcept">
|
||||
select
|
||||
`id`,
|
||||
`inpatient_no`,
|
||||
`admiss_times`,
|
||||
`jzh`,
|
||||
`report_message_path`,
|
||||
`state`,
|
||||
`create_time`,
|
||||
`service_flag`
|
||||
from `docus_archivefile`.`sdry_pacs_print_except`
|
||||
where id=#{id}
|
||||
</select>
|
||||
<select id="getCompensateIds" resultType="java.lang.Long">
|
||||
select
|
||||
`id`
|
||||
from
|
||||
`docus_archivefile`.`sdry_pacs_print_except`
|
||||
where `state`=0 and `create_time` > #{beginDateTime}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue