pacs 补偿job,和信息添加
parent
451f04c002
commit
f1e4a8298a
@ -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 insert(@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,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,57 @@
|
|||||||
|
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 com.docus.server.common.util.FileUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.File;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
private final static String MESSAGE_SAVE_PATH = FileUtil.currentPath() + File.separator + "pacs-print-error";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(SdryPacsPrintExcept pacsPrintExcept) {
|
||||||
|
Long id = pacsPrintExcept.getId();
|
||||||
|
id = id == null ? idService.getDateSeq() : id;
|
||||||
|
pacsPrintExcept.setId(id);
|
||||||
|
return sdryPacsPrintExceptMapper.insert(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,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="insert">
|
||||||
|
INSERT INTO `docus_archivefile`.`sdry_pacs_print_except`(`id`, `inpatient_no`, `admiss_times`, `jzh`, `report_message_path`, `state`, `create_time`, `service_flag`)
|
||||||
|
VALUES (#{except.id}, #{except.inpatientNo}, #{except.admissTimes}, #{except.jzh}, #{except.reportMessagePath}, 0, #{except.createTime}, #{except.serviceFlag});
|
||||||
|
</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