1、新增长期医嘱、临时医嘱、其他报告类型
2、新增长期医嘱、临时医嘱、其他报告下载方式 3、新增下载成功医嘱,删除FTP医嘱并将删除的FTP文件写入日志 4、将所有地址写入Z盘master
parent
95c46d1673
commit
bace7fcf7f
@ -0,0 +1,47 @@
|
|||||||
|
package com.ann.entity.interfaceEntity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 医嘱
|
||||||
|
* @Date 2020/7/1 9:00
|
||||||
|
* @Created by ljx
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Table
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
public class InterfaceHisCache {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String inpNo;
|
||||||
|
|
||||||
|
private String visitId;
|
||||||
|
|
||||||
|
// 医嘱类型 0代表临时医嘱 1代表长期医嘱
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private String pdfPath;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
// 0代表未处理 1代表已处理 2代表处理异常
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
//2020-7-6 新增修改时间
|
||||||
|
private Date updateTime ;
|
||||||
|
|
||||||
|
|
||||||
|
public void setValue(String state, String remark, Date updateTime) {
|
||||||
|
this.state = state;
|
||||||
|
this.remark = remark;
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.ann.repository;
|
||||||
|
|
||||||
|
import com.ann.entity.interfaceEntity.InterfaceHisCache;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface InterfaceHisCacheRepository extends JpaRepository<InterfaceHisCache,String> {
|
||||||
|
|
||||||
|
public List<InterfaceHisCache> findAllByStateAndPdfPathIsNotNull(String state);
|
||||||
|
|
||||||
|
// @Transactional
|
||||||
|
// @Modifying
|
||||||
|
// @Query(value = "update InterfaceHisCache o set o.state = ?1 where o.id = ?2 and o.state = 0 and o.type = ?3 ")
|
||||||
|
// public Integer updateStateById(Integer state, String id, Integer type);
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.ann.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ann.entity.interfaceEntity.InterfaceHisCache;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface InterfaceHisCacheService {
|
||||||
|
|
||||||
|
//查询所有未处理的状态
|
||||||
|
public List<InterfaceHisCache> findInterfaceHisCacheByState();
|
||||||
|
|
||||||
|
//修改状态
|
||||||
|
public boolean updateState(Integer state, String id, Integer type);
|
||||||
|
|
||||||
|
void save(InterfaceHisCache interfaceHisCache);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.ann.service.impl;
|
||||||
|
|
||||||
|
import com.ann.entity.interfaceEntity.InterfaceHisCache;
|
||||||
|
import com.ann.repository.InterfaceHisCacheRepository;
|
||||||
|
import com.ann.service.InterfaceHisCacheService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class InterfaceHisCacheServiceImpl implements InterfaceHisCacheService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private InterfaceHisCacheRepository interfaceHisCacheRepository;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<InterfaceHisCache> findInterfaceHisCacheByState() {
|
||||||
|
return interfaceHisCacheRepository.findAllByStateAndPdfPathIsNotNull("0");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateState(Integer state,String id,Integer type ) {
|
||||||
|
// if(interfaceHisCacheRepository.updateStateById(state,id,type) > 0)
|
||||||
|
// return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(InterfaceHisCache interfaceHisCache) {
|
||||||
|
interfaceHisCacheRepository.save(interfaceHisCache);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue