采集器运行状态

gaoming_branch
ALW 3 years ago
parent 93fc3dea48
commit be2849a706

@ -2,26 +2,32 @@ package com.emr.controller;
import com.emr.dao.ArchiveOtherExtMapper;
import com.emr.entity.ArchiveOther;
import com.emr.entity.Archive_Master;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.ipml.ArchiveOtherExtService;
import com.emr.service.ipml.ArchiveOtherService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.HttpRequest;
import com.emr.util.Msg;
import com.emr.vo.AfCollectTaskUpdateDTO;
import com.emr.vo.ArchiveForceSumbitInfoVo;
import com.emr.vo.ArchiveOtherExtVo;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@ -34,8 +40,12 @@ public class ArchiveOtherExtController {
private ArchiveOtherService archiveOtherService;
@Autowired
private ArchiveOtherExtMapper archiveOtherExtMapper;
@Autowired
private Archive_MasterService archiveMasterService;
/**
*
*
* @param offset
* @param limit
* @param archiveOtherExtVo
@ -44,12 +54,12 @@ public class ArchiveOtherExtController {
*/
@RequestMapping("getArchiveExtInfo")
@ResponseBody
public OffsetLimitPage getArchiveExtInfo(Integer offset, Integer limit, ArchiveOtherExtVo archiveOtherExtVo, HttpServletRequest request){
if(null != offset && null != limit) {
public OffsetLimitPage getArchiveExtInfo(Integer offset, Integer limit, ArchiveOtherExtVo archiveOtherExtVo, HttpServletRequest request) {
if (null != offset && null != limit) {
PageHelper.offsetPage(offset, limit);
}
try {
List<ArchiveOtherExtVo> list = archiveOtherExtService.getArchiveExtInfo(request,archiveOtherExtVo);
List<ArchiveOtherExtVo> list = archiveOtherExtService.getArchiveExtInfo(request, archiveOtherExtVo);
return new OffsetLimitPage((Page) list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
@ -57,11 +67,12 @@ public class ArchiveOtherExtController {
return null;
}
}
@RequestMapping("getArchiveExtInfoList")
@ResponseBody
public List<ArchiveOtherExtVo> getArchiveExtInfoList(ArchiveOtherExtVo archiveOtherExtVo, HttpServletRequest request){
public List<ArchiveOtherExtVo> getArchiveExtInfoList(ArchiveOtherExtVo archiveOtherExtVo, HttpServletRequest request) {
try {
List<ArchiveOtherExtVo> list = archiveOtherExtService.getArchiveExtInfo(request,archiveOtherExtVo);
List<ArchiveOtherExtVo> list = archiveOtherExtService.getArchiveExtInfo(request, archiveOtherExtVo);
return list;
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
@ -72,87 +83,111 @@ public class ArchiveOtherExtController {
/**
*
* @param ids ext_id
*
* @param ids ext_id
* @param notNursingIds ext_idext_id
* @param detailIds detailid
* @param jzh
* @param masterId masterid
* @param sysFlag ext
* @param detailIds detailid
* @param jzh
* @param masterId masterid
* @param sysFlag ext
* @return
* @throws Exception
*/
@RequestMapping("submitUpdate")
@ResponseBody
public Msg submitUpdate(String ids,String notNursingIds,String nursingIds,String detailIds,String jzh,String masterId,Integer sysFlag,HttpServletRequest request) throws Exception{
if(StringUtils.isBlank(ids)){
public Msg submitUpdate(String ids, String notNursingIds, String nursingIds, String detailIds, String jzh, String masterId, Integer sysFlag, String dzblIds, HttpServletRequest request) throws Exception {
if (StringUtils.isBlank(ids)) {
return Msg.fail("至少选中一个!");
}
if(null != sysFlag && sysFlag == 1){
if(StringUtils.isBlank(jzh)){
if (null != sysFlag && sysFlag == 1) {
if (StringUtils.isBlank(jzh)) {
return Msg.fail("记账号不能为空!");
}
if(StringUtils.isBlank(masterId)){
if (StringUtils.isBlank(masterId)) {
return Msg.fail("masterId不能为空!");
}
}
archiveOtherExtService.updateSubmit(ids,notNursingIds,nursingIds,detailIds,jzh,masterId,sysFlag,request);
if (StringUtils.isNotBlank(dzblIds)) {
List<String> list = Arrays.asList(dzblIds.split(","));
for (String taskid : list) {
HttpRequest.sendGet("http://200.100.104.40:9296/api/noviewtask/MakeUp", "taskid=" + taskid);
}
}
if (StringUtils.isNotBlank(nursingIds)) {
List<String> list = Arrays.asList(nursingIds.split(","));
for (String taskid : list) {
HttpRequest.sendGet("http://200.100.104.40:9296/api/noviewtask/MakeUp", "taskid=" + taskid);
}
}
archiveOtherExtService.updateSubmit(ids, notNursingIds, nursingIds, detailIds, jzh, masterId, sysFlag, request);
return Msg.success();
}
@PostMapping("/taskUpdate")
public String taskUpdate(@RequestBody AfCollectTaskUpdateDTO updateDTO) {
archiveOtherExtService.taskUpdate(updateDTO);
return "上报成功";
}
/**
* id
*
* @param ids ext_id
* @return
* @throws Exception
*/
@RequestMapping("selectAllByIdsAndSubmitTime")
@ResponseBody
public Msg selectSuccessByExtIds(String ids,String jzh) throws Exception{
if(StringUtils.isNotBlank(ids)){
public Msg selectSuccessByExtIds(String ids, String jzh) throws Exception {
if (StringUtils.isNotBlank(ids)) {
String[] split = ids.split(",");
StringBuilder temp = new StringBuilder();
for(String str : split){
if(StringUtils.isNotBlank(str)){
if(StringUtils.isNotBlank(temp)){
for (String str : split) {
if (StringUtils.isNotBlank(str)) {
if (StringUtils.isNotBlank(temp)) {
temp.append(",");
}
temp.append("'").append(str).append("'");
}
}
List<ArchiveOther> list = archiveOtherExtService.selectAllByIdsAndSubmitTime(temp.toString(),jzh);
List<ArchiveOther> list = archiveOtherExtService.selectAllByIdsAndSubmitTime(temp.toString(), jzh);
//判断遗嘱
List<ArchiveOther> archiveOthers = archiveOtherService.selectAllByC2(temp.toString(),"Done",-8);
List<ArchiveOther> archiveOthers = archiveOtherService.selectAllByC2(temp.toString(), "Done", -8);
list.addAll(archiveOthers);
return Msg.success().add("list",list);
}else{
return Msg.success().add("list", list);
} else {
return Msg.fail("参数ids不能为空");
}
}
/**
*
*
* @param patientId
* @return
* @throws Exception
*/
@RequestMapping("selectC1WithNotCollectFinishByPatientId/{patientId}")
@ResponseBody
public Msg selectC1WithNotCollectFinishByPatientId(@PathVariable("patientId") String patientId) throws Exception{
public Msg selectC1WithNotCollectFinishByPatientId(@PathVariable("patientId") String patientId) throws Exception {
String c1s = archiveOtherExtService.selectC1WithNotCollectFinishByPatientId(patientId);
return Msg.success().add("c1s",c1s);
return Msg.success().add("c1s", c1s);
}
/**
* his
*
* @return
*/
@RequestMapping("hisCallBackList")
private String hisCallBackList(){
private String hisCallBackList() {
return "/vCountDir/hisCallBackList";
}
/**
* his
*
* @param archiveOtherExtVo
* @param offset
* @param limit
@ -161,7 +196,7 @@ public class ArchiveOtherExtController {
*/
@ResponseBody
@RequestMapping(value = "getHisCallBackList")
public OffsetLimitPage getHisCallBackList(ArchiveOtherExtVo archiveOtherExtVo, Integer offset, Integer limit) throws Exception{
public OffsetLimitPage getHisCallBackList(ArchiveOtherExtVo archiveOtherExtVo, Integer offset, Integer limit) throws Exception {
try {
return archiveOtherExtService.getHisCallBackListLimit(archiveOtherExtVo, offset, limit);
} catch (Exception e) {
@ -173,12 +208,13 @@ public class ArchiveOtherExtController {
/**
*
*
* @param response
* @param archiveOtherExtVo
*/
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response,ArchiveOtherExtVo archiveOtherExtVo){
public void exportExcel(HttpServletResponse response, ArchiveOtherExtVo archiveOtherExtVo) {
String tableThNames = "申请时间,审批时间,住院号,患者姓名,住院次数,出院日期,出院科室,处理状态,开始时间,结束时间,归档状态";
String fieldCns = "sysupdatetimeStr,t2Str,zyh,c1,visitId,t1Str,deptName,statusFlagStr,stimeStr,etimeStr,n2Str";
//构造excel的数据
@ -189,8 +225,8 @@ public class ArchiveOtherExtController {
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
}catch (Exception e){
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}

@ -18,4 +18,8 @@ public interface ArchiveFlowRoleMapper {
int updateByPrimaryKey(ArchiveFlowRole record);
List<ArchiveFlowRole> selectAll();
String selectByid(String id);
}

@ -2,6 +2,7 @@ package com.emr.dao;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExt;
import com.emr.vo.ArchiveCollectTaskVo;
import com.emr.vo.ArchiveOtherExtVo;
import org.apache.ibatis.annotations.Param;
@ -20,7 +21,9 @@ public interface ArchiveOtherExtMapper {
int updateByPrimaryKey(ArchiveOtherExt record);
List<ArchiveOtherExtVo> getArchiveExtInfo(ArchiveOtherExtVo record);
List<ArchiveOtherExtVo> getArchiveExtInfo(ArchiveOtherExt record);
// List<ArchiveCollectTaskVo>getArchiveCollectTaskVoInfo(@Param("MID") String MID);
List<ArchiveOtherExtVo> selectAllByIds(@Param("ids") String ids);
@ -70,6 +73,7 @@ public interface ArchiveOtherExtMapper {
void updateOtherDomForStatusFlag( @Param("jzh")String jzh, @Param("filePath")String filePath,@Param("sysFlag")Integer sysFlag);
void upDateArchiveOther( ArchiveOtherExt archiveOtherExtVo);
/**
* his
* @param record

@ -23,7 +23,7 @@ public interface CollectorMapper {
Integer selectCount(String key);
Integer update(Collector collector );
Integer update(Collector collector);
Integer insert(Collector collector);

@ -29,7 +29,7 @@ public interface DiskMapper {
int delete(String virtualId);
int saveBatch(List<Disk> disks);
int saveBatch(Disk disk);

@ -9,8 +9,18 @@ public class ArchiveOtherExt implements Serializable {
private Date syctime;
private Long consumingTime;
private String sycobj;
public Long getConsumingTime() {
return consumingTime;
}
public void setConsumingTime(Long consumingTime) {
this.consumingTime = consumingTime;
}
private Long otherid;
private Integer sysflag;

@ -11,8 +11,18 @@ public class Archive_Detail {
private String assortid;
public String getSourceTwo() {
return sourceTwo;
}
public void setSourceTwo(String sourceTwo) {
this.sourceTwo = sourceTwo;
}
private String source;
private String sourceTwo;
private String subassort;
private String title;

@ -8,9 +8,7 @@ import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExt;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.entity.OffsetLimitPage;
import com.emr.vo.ArchiveForceSumbitInfoVo;
import com.emr.vo.ArchiveOtherExtVo;
import com.emr.vo.KeyValue;
import com.emr.vo.*;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
@ -18,10 +16,12 @@ import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.text.CollationElementIterator;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@ -57,6 +57,11 @@ public class ArchiveOtherExtService {
String maxETime = archiveOtherExtMapper.selectMaxETimeByNursingAndJzh(archiveOtherExtVo.getJzh());
archiveOtherExtVo.setNursingEndTime(maxETime);
for (ArchiveOtherExtVo vo : list) {
// String mid = vo.getMid();
// List<ArchiveCollectTaskVo> archiveCollectTaskVoInfo = archiveOtherExtMapper.getArchiveCollectTaskVoInfo(mid);
// for (ArchiveCollectTaskVo vo1:archiveCollectTaskVoInfo){
// vo.setMid(vo1.getMasterID());
// }
//遗嘱特殊处理结束时间
operYizhuETime(vo);
if (vo.getSysflag().equals(1)) {
@ -103,34 +108,6 @@ public class ArchiveOtherExtService {
}
}
}
// if (!vo.getSysflag().equals(1)) {
// String idTemp = vo.getIdTemp();
// List<ArchiveOtherExtVo> archiveOtherExtVos = archiveOtherExtMapper.selectEmrBackInfo1(idTemp);
// for (int i = 0; archiveOtherExtVos.size() > i; i++) {
// if (null != archiveOtherExtVos) {
// if (!archiveOtherExtVos.get(i).getC1().equals("")) {
// vo.setStatusFlagStr("完成");
// } else {
// vo.setStatusFlagStr("未完成");
// }
// }
// }
// }
// if (vo.getSysflag().equals(1)) {
// archiveOtherExtVo.setPid(vo.getJzh());
// List<ArchiveOtherExtVo> archiveOtherExtVos1 = archiveOtherExtMapper.selectEmrBackInfo2(archiveOtherExtVo);
// if (null != archiveOtherExtVos1) {
// for (ArchiveOtherExtVo a : archiveOtherExtVos1) {
// if (a.getStatusFlag()==3) {
// vo.setStatusFlagStr("完成");
// break;
// } else {
// vo.setStatusFlagStr("未完成");
// break;
// }
// }
// }
// }
}
}
return list;
@ -204,9 +181,6 @@ public class ArchiveOtherExtService {
archiveOtherExtMapper.updateNursingSubmit(nursingIdTemp);
}
}
// if (null != sysFlag && sysFlag == 3){
// archiveOtherService.updateArchiveOtherExt(ids)
// }
//ext表更新非护理记录
if(StringUtils.isNotBlank(notNursingIds)){
@ -216,6 +190,25 @@ public class ArchiveOtherExtService {
operOtherExtSubmitInfo(ids,idsStr,detailIds,request);
}
public void taskUpdate(AfCollectTaskUpdateDTO updateDTO) {
SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Date StartTime =null;
Date endTime =null;
try {
StartTime = ft.parse(updateDTO.getStartTime());
endTime = ft.parse(updateDTO.getEndTime());
} catch (ParseException e) {
e.printStackTrace();
}
ArchiveOtherExt archiveOtherExtVo=new ArchiveOtherExt();
archiveOtherExtVo.setId(updateDTO.getTaskId());
archiveOtherExtVo.setStime(StartTime);
archiveOtherExtVo.setEtime(endTime);
archiveOtherExtVo.setConsumingTime(updateDTO.getConsumingTime());
archiveOtherExtMapper.upDateArchiveOther(archiveOtherExtVo);
}
/**
*
* 1.idsTemparchive_other

@ -126,6 +126,13 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
record.setRoleId(currentUser.getRoleId());
}
PageHelper.offsetPage(offset, limit);
String source = record.getSource();
if (source.equals("移动护理系统采集服务")){
record.setSource("'1','移动护理系统采集服务'");
}
if (source.equals("PACS系统采集服务")){
record.setSource("'3','PACS系统采集服务'");
}
List<Archive_Detail_Vo> list = archiveDetailMapper.detailByClo(record);
OffsetLimitPage offsetLimitPage = new OffsetLimitPage((Page) list);
if(!CollectionUtils.isEmpty(list)) {

@ -29,7 +29,9 @@ public class CollectorServiceImpl implements ICollectorService {
collector.setStartUrl(collectorVo.getUrlMap().get(1));
collector.setRestartUrl(collectorVo.getUrlMap().get(2));
//判断采集器信息是否存在
if (collectorMapper.selectCount(collector.getKey()) != 0) {
String key = collector.getKey();
Integer integer = collectorMapper.selectCount(key);
if (integer!=0) {
//存在
collectorMapper.update(collector);
} else {

@ -1,24 +1,32 @@
package com.emr.service.ipml;
import com.emr.entity.ArchiveFlowRole;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@Service
@Transactional
public class EnumVerify {
/**
*
* */
public enum Checker
{
Dortor(1,"医生"),
Nurse(2,"护士"),
Generate(4,"一般审核者");
*/
public enum Checker {
Dortor(1, "医生"),
Nurse(2, "护士"),
Generate(4, "一般审核者");
private int code;
private String name;
private Checker(int code, String name)
{
private Checker(int code, String name) {
this.code = code;
this.name = name;
}
@ -41,9 +49,9 @@ public class EnumVerify {
/**
*
* */
public enum DocState
{
*/
public enum DocState {
None(1, "初始状态"),
DortorSubmit(2, "医生提交"),
DortorCheck(4, "医生质控员质控"),
@ -56,6 +64,8 @@ public class EnumVerify {
NurseBack(512, "护士退回"),
CallBacked(1024, "召回");
private int code;
private String name;
@ -91,81 +101,68 @@ public class EnumVerify {
//判断是否包含
public static boolean HasCurrentState(int curState, DocState ds)
{
public static boolean HasCurrentState(int curState, DocState ds) {
return (curState & ds.code) != 0;
}
//获取当前步骤的显示名称可以考虑用JS实现
//根据当前状态获取获取状态中文逗号隔开的字符串
public static String GetStepName(Integer curState,int role)
{
public static String GetStepName(Integer curState, int role) {
String doctorV = "";
String nurseV = "";
if((Checker.Nurse.code != role)){
if(!HasCurrentState(curState, DortorSubmit) && !HasCurrentState(curState, DortorCheck) && !HasCurrentState(curState, DirectorCheck)){
if ((Checker.Nurse.code != role)) {
if (!HasCurrentState(curState, DortorSubmit) && !HasCurrentState(curState, DortorCheck) && !HasCurrentState(curState, DirectorCheck)) {
doctorV = None.name;
}
}
if((Checker.Dortor.code != role)){
if(!HasCurrentState(curState, NurseSubmit) && !HasCurrentState(curState, NurseCheck)){
nurseV = None.name;
if ((Checker.Dortor.code != role)) {
if (!HasCurrentState(curState, NurseSubmit) && !HasCurrentState(curState, NurseCheck)) {
nurseV = None.name;
}
}
if (HasCurrentState(curState, DortorSubmit) && (Checker.Nurse.code != role))
{
if (HasCurrentState(curState, DortorSubmit) && (Checker.Nurse.code != role)) {
doctorV = "医生已提交";
}
if (HasCurrentState(curState, DortorCheck) && (Checker.Nurse.code != role))
{
if (HasCurrentState(curState, DortorCheck) && (Checker.Nurse.code != role)) {
doctorV = "医生质控员已质控";
}
if (HasCurrentState(curState, DirectorCheck) && (Checker.Nurse.code != role))
{
if (HasCurrentState(curState, DirectorCheck) && (Checker.Nurse.code != role)) {
doctorV = "科主任已质控";
}
if (HasCurrentState(curState, NurseSubmit) && (Checker.Dortor.code != role))
{
if (HasCurrentState(curState, NurseSubmit) && (Checker.Dortor.code != role)) {
nurseV = "护士已提交";
}
if (HasCurrentState(curState, NurseCheck) && (Checker.Dortor.code != role))
{
if (HasCurrentState(curState, NurseCheck) && (Checker.Dortor.code != role)) {
nurseV = "护士质控员已质控";
}
String tmpV = "";
if (HasCurrentState(curState, DortorBack))
{
if(Checker.Nurse.code != role){
if (HasCurrentState(curState, DortorBack)) {
if (Checker.Nurse.code != role) {
doctorV = "医生退回";
}
}
if (HasCurrentState(curState, NurseBack))
{
if(Checker.Dortor.code != role){
if (HasCurrentState(curState, NurseBack)) {
if (Checker.Dortor.code != role) {
nurseV = "护士退回";
}
}
if(Checker.Dortor.code == role){
if (Checker.Dortor.code == role) {
tmpV = doctorV;
}else if(Checker.Nurse.code == role){
} else if (Checker.Nurse.code == role) {
tmpV = nurseV;
}else if(Checker.Generate.code == role){
} else if (Checker.Generate.code == role) {
tmpV = doctorV + "," + nurseV;
}
if (HasCurrentState(curState, HeadNurseCheck))
{
if (HasCurrentState(curState, HeadNurseCheck)) {
tmpV = "护士长已质控";
}
if (HasCurrentState(curState, MedicalRoomCheck))
{
if (HasCurrentState(curState, MedicalRoomCheck)) {
tmpV = "已归档";
}
if (HasCurrentState(curState, CallBacked))
{
if (HasCurrentState(curState, CallBacked)) {
tmpV = "病案室审核";
}
if(tmpV.startsWith(","))
{
if (tmpV.startsWith(",")) {
tmpV = tmpV.substring(1);
}
@ -174,52 +171,51 @@ public class EnumVerify {
/**
*
*
* @param curState
* @param role
* @return
*/
public static String GetCurrentStepName(Integer curState,int role)
{
public static String GetCurrentStepName(Integer curState, int role,String qualitySwitch) {
String doctorV = "";
String nurseV = "";
if (HasCurrentState(curState, None) || HasCurrentState(curState, DortorBack) || !HasCurrentState(curState, DortorSubmit))
{
if (HasCurrentState(curState, None) || HasCurrentState(curState, DortorBack) || !HasCurrentState(curState, DortorSubmit)) {
doctorV = ",医生未质控";
}
if (HasCurrentState(curState, DortorSubmit) && !HasCurrentState(curState, DortorCheck))
{
doctorV = ",医生质控员未质控";
}
if (HasCurrentState(curState, DortorCheck) && !HasCurrentState(curState, DirectorCheck))
{
doctorV = ",科主任未质控";
if (qualitySwitch.equals("1")) {
if (HasCurrentState(curState, DortorSubmit) && !HasCurrentState(curState, DortorCheck)) {
doctorV = ",医生质控员未质控";
}
if (HasCurrentState(curState, DortorCheck) && !HasCurrentState(curState, DirectorCheck)) {
doctorV = ",科主任未质控";
}
}
if (HasCurrentState(curState, None) || HasCurrentState(curState, NurseBack) || !HasCurrentState(curState, NurseSubmit))
{
if (HasCurrentState(curState, None) || HasCurrentState(curState, NurseBack) || !HasCurrentState(curState, NurseSubmit)) {
nurseV = ",护士未质控";
}
if (HasCurrentState(curState, NurseSubmit) && !HasCurrentState(curState, NurseCheck))
{
nurseV = ",护士质控员未质控";
if (qualitySwitch.equals("1")) {
if (HasCurrentState(curState, NurseSubmit) && !HasCurrentState(curState, NurseCheck)) {
nurseV = ",护士质控员未质控";
}
}
String tmpV = "";
if(Checker.Dortor.code == role){
if (Checker.Dortor.code == role) {
tmpV = doctorV;
}else if(Checker.Nurse.code == role){
} else if (Checker.Nurse.code == role) {
tmpV = nurseV;
}else if(Checker.Generate.code == role){
} else if (Checker.Generate.code == role) {
tmpV = doctorV + nurseV;
}
if (HasCurrentState(curState, DirectorCheck) && HasCurrentState(curState, NurseCheck))
{
tmpV = ",护士长未质控";
if (qualitySwitch.equals("1")) {
if (HasCurrentState(curState, DirectorCheck) && HasCurrentState(curState, NurseCheck)) {
tmpV = ",护士长未质控";
}
}
if (HasCurrentState(curState,HeadNurseCheck))
{
if (HasCurrentState(curState, HeadNurseCheck)) {
tmpV = ",病案室未质控";
}
if(tmpV.startsWith(","))
{
if (tmpV.startsWith(",")) {
tmpV = tmpV.substring(1);
}
@ -227,96 +223,82 @@ public class EnumVerify {
}
//获取当前步骤所包含的枚举值,可以返回多个值
public static ArrayList<Integer> GetCurrentStepContainStates(int curState) throws Exception
{
public static ArrayList<Integer> GetCurrentStepContainStates(int curState) throws Exception {
ArrayList<Integer> rets = new ArrayList<>();
if (HasCurrentState(curState, DortorSubmit))
{
if (HasCurrentState(curState, DortorSubmit)) {
rets.add(DortorSubmit.code);
}
if (HasCurrentState(curState, DortorCheck))
{
if (HasCurrentState(curState, DortorCheck)) {
rets.add(DortorCheck.code);
}
if (HasCurrentState(curState, DirectorCheck))
{
if (HasCurrentState(curState, DirectorCheck)) {
rets.add(DirectorCheck.code);
}
if (HasCurrentState(curState, NurseSubmit))
{
if (HasCurrentState(curState, NurseSubmit)) {
rets.add(NurseSubmit.code);
}
if (HasCurrentState(curState, NurseCheck))
{
if (HasCurrentState(curState, NurseCheck)) {
rets.add(NurseCheck.code);
}
if (HasCurrentState(curState, HeadNurseCheck))
{
if (HasCurrentState(curState, HeadNurseCheck)) {
rets.add(HeadNurseCheck.code);
}
if (HasCurrentState(curState, MedicalRoomCheck))
{
if (HasCurrentState(curState, MedicalRoomCheck)) {
rets.add(MedicalRoomCheck.code);
}
if (HasCurrentState(curState, DortorBack))
{
if (HasCurrentState(curState, DortorBack)) {
rets.add(DortorBack.code);
}
if (HasCurrentState(curState, NurseBack))
{
if (HasCurrentState(curState, NurseBack)) {
rets.add(NurseBack.code);
}
if (HasCurrentState(curState, None))
{
if (HasCurrentState(curState, None)) {
rets.add(None.code);
}
return rets;
}
//医生累加code
public static int GetNextStepCode_Dortor(int curState,List<ArchiveFlowRole> flowRoles) throws Exception
{
public static int GetNextStepCode_Dortor(int curState, List<ArchiveFlowRole> flowRoles) throws Exception {
//定义医生提交是否有效
int doctorSubmitEffective = 0;
//定义医生质控员是否有效
int dortorCheckEffective = 0;
//定义科主任审核是否有效
int directorCheckEffective = 0;
if(null != flowRoles && !flowRoles.isEmpty()) {
if (null != flowRoles && !flowRoles.isEmpty()) {
for (ArchiveFlowRole flowRole : flowRoles) {
if (flowRole.getCode().equals(DortorSubmit.code+"")){
if (flowRole.getCode().equals(DortorSubmit.code + "")) {
doctorSubmitEffective = flowRole.getEffective();
}
if (flowRole.getCode().equals(DortorCheck.code+"")){
if (flowRole.getCode().equals(DortorCheck.code + "")) {
dortorCheckEffective = flowRole.getEffective();
}
if (flowRole.getCode().equals(DirectorCheck.code+"")){
if (flowRole.getCode().equals(DirectorCheck.code + "")) {
directorCheckEffective = flowRole.getEffective();
}
//如果遍历完立即退出循环
if(doctorSubmitEffective == 1 && dortorCheckEffective == 1 && directorCheckEffective == 1){
if (doctorSubmitEffective == 1 && dortorCheckEffective == 1 && directorCheckEffective == 1) {
break;
}
}
}
if(!HasCurrentState(curState, DortorSubmit) && doctorSubmitEffective == 1)
{
if (!HasCurrentState(curState, DortorSubmit) && doctorSubmitEffective == 1) {
//有退回情况需减去医生退回code再加当前提交
int state = curState ^ DortorBack.code | DortorSubmit.code;
//无退回情况,^退回编码会更大,不需要^退回编码
if(state > (curState | DortorSubmit.code)){
return curState | DortorSubmit.code;
}else{
if (state > (curState | DortorSubmit.code)) {
return curState | DortorSubmit.code;
} else {
//否则需要减去医生退回部分
return state;
}
}
if(!HasCurrentState(curState, DortorCheck) && dortorCheckEffective == 1)
{
return curState | DortorCheck.code;
if (!HasCurrentState(curState, DortorCheck) && dortorCheckEffective == 1) {
return curState | DortorCheck.code;
}
if(!HasCurrentState(curState, DirectorCheck) && directorCheckEffective == 1)
{
return curState | DirectorCheck.code;
if (!HasCurrentState(curState, DirectorCheck) && directorCheckEffective == 1) {
return curState | DirectorCheck.code;
}
/* if(HasCurrentState(curState,DirectorCheck))
{
@ -340,120 +322,108 @@ public class EnumVerify {
}
//护士累加code
public static int GetNextStepCode_Nurse(int curState,List<ArchiveFlowRole> flowRoles) throws Exception
{
public static int GetNextStepCode_Nurse(int curState, List<ArchiveFlowRole> flowRoles) throws Exception {
int nurseSubmitEffective = 0;
int nurseCheckEffective = 0;
if(null != flowRoles && !flowRoles.isEmpty()) {
if (null != flowRoles && !flowRoles.isEmpty()) {
for (ArchiveFlowRole flowRole : flowRoles) {
if (flowRole.getCode().equals(NurseSubmit.code+"")){
if (flowRole.getCode().equals(NurseSubmit.code + "")) {
nurseSubmitEffective = flowRole.getEffective();
}
if (flowRole.getCode().equals(NurseCheck.code+"")){
if (flowRole.getCode().equals(NurseCheck.code + "")) {
nurseCheckEffective = flowRole.getEffective();
}
//两者都遍历到立即退出循环
if(nurseSubmitEffective == 1 && nurseCheckEffective == 1){
if (nurseSubmitEffective == 1 && nurseCheckEffective == 1) {
break;
}
}
}
if(!HasCurrentState(curState, NurseSubmit) && nurseSubmitEffective == 1)
{
if (!HasCurrentState(curState, NurseSubmit) && nurseSubmitEffective == 1) {
int state = curState ^ NurseBack.code | NurseSubmit.code;
if(state > (curState | NurseSubmit.code)){
if (state > (curState | NurseSubmit.code)) {
return curState | NurseSubmit.code;
}else{
} else {
return state;
}
}
if(!HasCurrentState(curState, NurseCheck) && nurseCheckEffective == 1)
{
if (!HasCurrentState(curState, NurseCheck) && nurseCheckEffective == 1) {
return curState | NurseCheck.code;
}
throw new Exception("护士提交的状态未知。");
}
//一般审核者累加code
public static int GetNextStepCode_Generate(int curState,List<ArchiveFlowRole> flowRoles) throws Exception
{
public static int GetNextStepCode_Generate(int curState, List<ArchiveFlowRole> flowRoles) throws Exception {
int headNurseCheckEffective = 0;
int medicalRoomCheckEffective = 0;
if(null != flowRoles && !flowRoles.isEmpty()) {
if (null != flowRoles && !flowRoles.isEmpty()) {
for (ArchiveFlowRole flowRole : flowRoles) {
if (flowRole.getCode().equals(HeadNurseCheck.code+"")){
if (flowRole.getCode().equals(HeadNurseCheck.code + "")) {
headNurseCheckEffective = flowRole.getEffective();
}
if (flowRole.getCode().equals(MedicalRoomCheck.code+"")){
if (flowRole.getCode().equals(MedicalRoomCheck.code + "")) {
medicalRoomCheckEffective = flowRole.getEffective();
}
}
}
if (!HasCurrentState(curState, HeadNurseCheck) && headNurseCheckEffective == 1)
{
if (!HasCurrentState(curState, HeadNurseCheck) && headNurseCheckEffective == 1) {
return HeadNurseCheck.code;
}
if(!HasCurrentState(curState, MedicalRoomCheck) && medicalRoomCheckEffective == 1)
{
if (!HasCurrentState(curState, MedicalRoomCheck) && medicalRoomCheckEffective == 1) {
return MedicalRoomCheck.code;
}
throw new Exception("一般工作者提交的状态未知。");
}
//累加当前code
public static int GetNextStepCode(int curState, Integer isDortor,List<ArchiveFlowRole> flowRoles) throws Exception
{
if(curState == None.code)
{
if(isDortor == Checker.Dortor.code)
{
public static int GetNextStepCode(int curState, Integer isDortor, List<ArchiveFlowRole> flowRoles) throws Exception {
if (curState == None.code) {
if (isDortor == Checker.Dortor.code) {
return DortorSubmit.code;
}
if(isDortor == Checker.Nurse.code)
{
if (isDortor == Checker.Nurse.code) {
return NurseSubmit.code;
}
throw new Exception("初始状态,只有可能是医生或护士进行提交");
throw new Exception("初始状态,只有可能是医生或护士进行提交");
}
if(isDortor == Checker.Dortor.code)
{
return GetNextStepCode_Dortor(curState,flowRoles);
if (isDortor == Checker.Dortor.code) {
return GetNextStepCode_Dortor(curState, flowRoles);
}
if(isDortor == Checker.Nurse.code)
{
return GetNextStepCode_Nurse(curState,flowRoles);
if (isDortor == Checker.Nurse.code) {
return GetNextStepCode_Nurse(curState, flowRoles);
}
if(isDortor == Checker.Generate.code)
{
return GetNextStepCode_Generate(curState,flowRoles);
if (isDortor == Checker.Generate.code) {
return GetNextStepCode_Generate(curState, flowRoles);
}
throw new Exception(String.format("参数出错 %d", curState));
}
//医生退回
public static int backToDoctor(int curState,List<ArchiveFlowRole> flowRoles) throws Exception{
if(curState != HeadNurseCheck.code && curState != CallBacked.code){
public static int backToDoctor(int curState, List<ArchiveFlowRole> flowRoles) throws Exception {
if (curState != HeadNurseCheck.code && curState != CallBacked.code) {
//不是病案室退回节点删除医生code
if(HasCurrentState(curState, DirectorCheck)){
if (HasCurrentState(curState, DirectorCheck)) {
curState ^= DirectorCheck.code;
}
if(HasCurrentState(curState, DortorCheck)){
if (HasCurrentState(curState, DortorCheck)) {
curState ^= DortorCheck.code;
}
if(HasCurrentState(curState, DortorSubmit)){
if (HasCurrentState(curState, DortorSubmit)) {
curState ^= DortorSubmit.code;
}
if(HasCurrentState(curState, HeadNurseCheck)){
if (HasCurrentState(curState, HeadNurseCheck)) {
curState ^= HeadNurseCheck.code;
}
}else{
} else {
curState = 0;
//是病案室退回节点累加护士code
for(ArchiveFlowRole flowRole : flowRoles) {
for (ArchiveFlowRole flowRole : flowRoles) {
if (flowRole.getEffective() == 1) {
if(flowRole.getCode().equals(NurseSubmit.getCode()+"")){
if (flowRole.getCode().equals(NurseSubmit.getCode() + "")) {
curState = curState | NurseSubmit.getCode();
}else if(flowRole.getCode().equals(NurseCheck.getCode()+"")){
} else if (flowRole.getCode().equals(NurseCheck.getCode() + "")) {
curState = curState | NurseCheck.getCode();
}
}
@ -461,29 +431,30 @@ public class EnumVerify {
}
return curState | DortorBack.code;
}
//护士退回
public static int backToNurse(int curState,List<ArchiveFlowRole> flowRoles) throws Exception{
if(curState != HeadNurseCheck.code && curState != CallBacked.code) {
public static int backToNurse(int curState, List<ArchiveFlowRole> flowRoles) throws Exception {
if (curState != HeadNurseCheck.code && curState != CallBacked.code) {
//不是病案室退回节点删除护士code
if(HasCurrentState(curState, NurseCheck)){
if (HasCurrentState(curState, NurseCheck)) {
curState ^= NurseCheck.code;
}
if(HasCurrentState(curState, NurseSubmit)){
if (HasCurrentState(curState, NurseSubmit)) {
curState ^= NurseSubmit.code;
}
if(HasCurrentState(curState, HeadNurseCheck)){
if (HasCurrentState(curState, HeadNurseCheck)) {
curState ^= HeadNurseCheck.code;
}
}else{
} else {
curState = 0;
//是病案室退回节点,累加医生节点
for(ArchiveFlowRole flowRole : flowRoles) {
for (ArchiveFlowRole flowRole : flowRoles) {
if (flowRole.getEffective() == 1) {
if(flowRole.getCode().equals(DortorSubmit.getCode()+"")){
if (flowRole.getCode().equals(DortorSubmit.getCode() + "")) {
curState = curState | DortorSubmit.getCode();
}else if(flowRole.getCode().equals(DortorCheck.getCode()+"")){
} else if (flowRole.getCode().equals(DortorCheck.getCode() + "")) {
curState = curState | DortorCheck.getCode();
}else if(flowRole.getCode().equals(DirectorCheck.getCode()+"")){
} else if (flowRole.getCode().equals(DirectorCheck.getCode() + "")) {
curState = curState | DirectorCheck.getCode();
}
}
@ -491,8 +462,9 @@ public class EnumVerify {
}
return curState | NurseBack.code;
}
//医生护士全退回
public static int backToAll(){
public static int backToAll() {
return DortorBack.code | NurseBack.code;
}
}

@ -32,7 +32,7 @@ public class VirtualServiceImpl implements IVirtualService {
//获取虚拟机信息
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date=new Date();
Virtual virtual=new Virtual(null, virtualVo.getCpuUtilization(), virtualVo.getMemoryTotal(),
Virtual virtual=new Virtual(null,virtualVo.getCpuUtilization(), virtualVo.getMemoryTotal(),
virtualVo.getMemoryAllowance(), virtualVo.getUplinkRate(), virtualVo.getDescendingRate(),
virtualVo.getIp(),virtualVo.getUrl(),simpleDateFormat.format(date));
//获取磁盘信息
@ -48,25 +48,35 @@ public class VirtualServiceImpl implements IVirtualService {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("virtual_id",id);//满足的条件
queryWrapper.or();
String virtualId = virtual.getId().toString();
diskMapper.delete(virtualId);
diskMapper.delete(virtual.getIp());
//重新添加磁盘信息
for(Disk disk:disks){
disk.setId(null);
disk.setVirtualId(virtual.getId().toString());
Disk disk=new Disk();
for(Disk disk1:disks){
disk.setVirtualId(virtual.getIp());
disk.setAvailableSize(disk1.getAvailableSize());
disk.setDiskName(disk1.getDiskName());
disk.setTotalSize(disk1.getTotalSize());
disk.setDiskFormat(disk1.getDiskFormat());
disk.setDiskType(disk1.getDiskType());
diskMapper.saveBatch(disk);
}
diskMapper.saveBatch(disks);
}else{
//不存在则添加
int insert = virtualMapper.insert(virtual);
//把虚拟机id给磁盘对象
for(Disk disk:disks){
disk.setId(null);
disk.setVirtualId(virtual.getId().toString());
Disk disk=new Disk();
for(Disk disk1:disks){
disk.setVirtualId(virtual.getIp());
disk.setAvailableSize(disk1.getAvailableSize());
disk.setDiskName(disk1.getDiskName());
disk.setTotalSize(disk1.getTotalSize());
disk.setDiskFormat(disk1.getDiskFormat());
disk.setDiskType(disk1.getDiskType());
diskMapper.saveBatch(disk);
}
//添加磁盘信息
diskMapper.saveBatch(disks);
}
}

@ -0,0 +1,125 @@
package com.emr.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.List;
import java.util.Map;
public class HttpRequest {
/**
* URLGET
*
* @param url
* URL
* @param param
* name1=value1&name2=value2
* @return URL
*/
public static String sendGet(String url, String param) {
String result = "";
BufferedReader in = null;
try {
String urlNameString = url + "?" + param;
URL realUrl = new URL(urlNameString);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 建立实际的连接
connection.connect();
// 获取所有响应头字段
Map<String, List<String>> map = connection.getHeaderFields();
// 遍历所有的响应头字段
for (String key : map.keySet()) {
System.out.println(key + "--->" + map.get(key));
}
// 定义 BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
System.out.println("发送GET请求出现异常" + e);
e.printStackTrace();
}
// 使用finally块来关闭输入流
finally {
try {
if (in != null) {
in.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
return result;
}
/**
* URL POST
*
* @param url
* URL
* @param param
* name1=value1&name2=value2
* @return
*/
public static String sendPost(String url, String param) {
PrintWriter out = null;
BufferedReader in = null;
String result = "";
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection conn = realUrl.openConnection();
// 设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
// 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
System.out.println("发送 POST 请求出现异常!"+e);
e.printStackTrace();
}
//使用finally块来关闭输出流、输入流
finally{
try{
if(out!=null){
out.close();
}
if(in!=null){
in.close();
}
}
catch(IOException ex){
ex.printStackTrace();
}
}
return result;
}
}

@ -0,0 +1,79 @@
package com.emr.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author
* @since 2021-05-07
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class AfCollectTask implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.ID_WORKER_STR)
private Long id;
private String patientId;
private String sysflag;
private Date startTime;
private Date endTime;
private Long consumingTime;
private String state;
private Date syncTime;
private Date recollectTime;
private String recollectName;
private String remark;
private String C1;
private String C2;
private String C3;
private String C4;
private String C6;
private String C9;
}

@ -0,0 +1,23 @@
package com.emr.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
public class AfCollectTaskUpdateDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long taskId;
private String startTime;
private String endTime;
private Long consumingTime;
}

@ -0,0 +1,35 @@
package com.emr.vo;
import lombok.Data;
@Data
public class ArchiveCollectTaskVo {
private Long id;
private String MasterID;
private Long afArchiveDetailId;
private String sysflag;
private String startTime;
private String endTime;
private Long consumingTime;
private String state;
private String syncTime;
private String createTime;
private String recollectTime;
private String recollectName;
private String remark;
private String exceInfo;
private String exceRemark;
private String pResult;
private String C1;
private String C2;
private String C3;
private String C4;
private String C5;
private String C6;
private String C7;
private String C8;
private String C9;
private String C10;
}

@ -19,6 +19,8 @@ import lombok.Data;
public class ArchiveOtherExtVo extends ArchiveOtherExt {
private String idTemp;
private Long consumingTime;
private String sysupdatetimeStr;
private String stimeStr;

@ -1,6 +1,8 @@
package com.emr.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -19,9 +21,10 @@ import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class Virtual implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.INPUT)
private Long id;
private String cpuUtilization;

@ -1,5 +1,7 @@
package com.emr.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -9,13 +11,15 @@ import java.io.Serializable;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class VirtualVo implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.INPUT)
private Long id;

@ -22,6 +22,7 @@
/login=anon
/static/**=anon
/statistics/**=anon
/archiveExt/**=anon
/jspf/**=anon
/img/**=anon
/collector/**=anon

@ -118,4 +118,7 @@
<select id="selectAll" resultMap="BaseResultMap">
SELECT * FROM archive_flow_role ORDER BY role,id
</select>
<select id="selectByid" resultType="java.lang.String" parameterType="java.lang.String">
select count(*) from archive_other_ext where MID=#{id} AND sysFlag=-300 AND statusFlag!=3
</select>
</mapper>

@ -434,31 +434,28 @@
and statusFlag = #{statusflag,jdbcType=INTEGER}
</if>
</sql>
<!--统一查询语句-->
<sql id="selectWhereSql2">
and sysFlag in (1,2,3,4,5,6,7,8,9)
<if test="jzh != null and jzh != ''">
and jzh = #{jzh,jdbcType=NVARCHAR}
</if>
<if test="c1 != null and c1 != ''">
and C1 like '%${c1}%'
</if>
<if test="sysflag != null">
and sysFlag = #{sysflag,jdbcType=INTEGER}
</if>
<if test="statusflag != null">
and statusFlag = #{statusflag,jdbcType=INTEGER}
</if>
</sql>
<select id="getArchiveExtInfo" resultMap="BaseResultMap">
select distinct temp.*,zd_assort.assort_name,zd_assort.assort_id,
archive_other_ext_submitTime.create_time,archive_other_ext_submitTime.str2 tempTime,
(case when temp.etimeStr &lt;= archive_other_ext_submitTime.create_time THEN '1'
when temp.etimeStr >=archive_other_ext_submitTime.create_time THEN '2' end
) as timeStatus
-- CASE
-- WHEN sysFlag = 1 THEN
-- CASE
-- WHEN archive_other_ext_submitTime.str2 IS NOT NULL
-- AND archive_other_ext_submitTime.str2 >= (select top 1 convert(varchar(19),eTime,120) eTime from archive_other_ext where sysFlag = 1 and jzh = temp.jzh order by eTime desc) THEN
-- - 1
-- ELSE
-- statusFlag
-- END
-- ELSE
-- CASE
-- WHEN archive_other_ext_submitTime.str2 IS NOT NULL
-- AND archive_other_ext_submitTime.str2 >= etimeStr THEN
-- - 1
-- ELSE
-- statusFlag
-- END
-- END
-- statusFlagSort
from (
select
archive_other_ext.ID idTemp,
@ -516,6 +513,37 @@
<include refid="selectWhereSql"></include>
</where>
order by sysUpdateTime desc
UNION ALL
SELECT
a.id idTemp,
a.create_time SycTime,
archive_detail.source sysFlag,
a.sync_time sysupdatetimeStr,
a.start_time stimeStr,
a.end_time etimeStr,
a.state statusFlag,
pResult,
archive_detail.Title C1,
NULL DID,
NULL jzh
FROM
archive_collect_task a
INNER JOIN archive_detail ON archive_detail.MasterID = a.MasterID
<where>
archive_detail.source in ('1','3')
<if test="mid != null and mid != ''">
and archive_detail.MasterID = #{mid,jdbcType=NVARCHAR}
</if>
<if test="c1 != null and c1 != ''">
and archive_detail.Title like '%${c1}%'
</if>
<if test="sysflag != null">
and archive_detail.Source = #{sysflag,jdbcType=INTEGER}
</if>
<if test="statusflag != null">
and a.state = #{statusflag,jdbcType=INTEGER}
</if>
</where>
) temp
LEFT JOIN archive_detail ON temp.DID = archive_detail.id
LEFT JOIN zd_assort ON archive_detail.AssortID = zd_assort.assort_id
@ -526,7 +554,6 @@
and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}
</if>
</where>
-- order by statusFlagSort
</select>
<select id="selectAllByIds" resultMap="BaseResultMap">
select *,
@ -686,6 +713,22 @@
</if>
</where>
</update>
<update id="upDateArchiveOther" parameterType="com.emr.entity.ArchiveOtherExt">
update archive_collect_task
<set >
<if test="stime != null" >
start_time = #{stime},
</if>
<if test="etime != null" >
end_time = #{etime},
</if>
<if test="consumingTime != null" >
consuming_time = #{consumingTime},
</if>
</set>
WHERE id=#{id}
</update>
<!--根据时间查询his召回详情-->
<select id="callBackStatisticsDetail" resultMap="BaseResultMap">
@ -825,5 +868,10 @@
parameterType="com.emr.vo.ArchiveOtherExtVo">
select * from archive_other_ext where jzh=#{jzh} and sysFlag=1
</select>
<!--<select id="getArchiveCollectTaskVoInfo" resultType="com.emr.vo.ArchiveCollectTaskVo"-->
<!--parameterType="java.lang.String">-->
<!--select * from archive_collect_task where MasterID=#{MID} and sysflag in ("")-->
<!--</select>-->
</mapper>

@ -136,7 +136,7 @@
and t.title like '%${title}%'
</if>
<if test="source != null and source != ''">
and t.Source = #{source,jdbcType=VARCHAR}
and t.Source in (${source})
</if>
ORDER BY
<choose>

@ -5,56 +5,83 @@
insert into collector
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="virtualId != null" >
virtualId,
virtual_id ,
</if>
<if test="key != null" >
[key],
</if>
<if test="type != null" >
type,
</if>
<if test="beforeTime != null" >
beforeTime,
before_time ,
</if>
<if test="state != null" >
state,
</if>
<if test="stopUrl != null" >
stopUrl,
stop_url ,
</if>
<if test="startUrl != null" >
startUrl,
start_url ,
</if>
<if test="restartUrl != null" >
restartUrl,
restart_url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="virtualId != null" >
#{virtual_id},
#{virtualId},
</if>
<if test="key != null" >
#{key},
</if>
<if test="type != null" >
#{type},
</if>
<if test="beforeTime != null" >
#{before_time},
#{beforeTime},
</if>
<if test="state != null" >
#{state},
</if>
<if test="stopUrl != null" >
#{stop_url},
#{stopUrl},
</if>
<if test="startUrl != null" >
#{start_url},
#{startUrl},
</if>
<if test="restartUrl != null" >
#{restart_url},
#{restartUrl},
</if>
</trim>
</insert>
<update id="update" parameterType="com.emr.vo.Collector">
UPDATE collector
SET `virtual_id`=#{virtualId}, `type`=#{type}, `before_time`=#{beforeTime},
`state`=#{state}, `stop_url`=#{stopUrl}, `start_url`=#{startUrl}, `restart_url`=#{restartUrl}
WHERE `key`=#{key}
update collector
<set >
<if test="virtualId != null" >
virtual_id = #{virtualId},
</if>
<if test="type != null" >
type = #{type},
</if>
<if test="beforeTime != null" >
before_time = #{beforeTime},
</if>
<if test="state != null" >
state = #{state},
</if>
<if test="stopUrl != null" >
stop_url = #{stopUrl},
</if>
<if test="startUrl != null" >
start_url = #{startUrl},
</if>
<if test="restartUrl != null" >
restart_url = #{restartUrl},
</if>
</set>
WHERE [key]=#{key}
</update>
<select id="selectCollectors" resultType="com.emr.vo.Collector" parameterType="com.emr.vo.Collector">
@ -64,7 +91,7 @@
<select id="selectCount" resultType="java.lang.Integer" parameterType="java.lang.String">
SELECT count(1)
FROM collector
WHERE `key`=#{key}
WHERE [key]=#{key}
</select>
<select id="getCollectors" resultType="com.emr.vo.Collector" parameterType="com.emr.vo.Collector">
select * from collector

@ -1,18 +1,49 @@
<?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.emr.dao.DiskMapper">
<insert id="saveBatch" parameterType="java.util.List">
insert into disk ( virtual_id, disk_name, total_size,available_size,disk_format,
disk_type)
values
<foreach collection="list" item="item" separator=",">
(#{item.virtualId},
#{item.diskName},
#{item.totalSize},
#{item.availableSize},
#{item.diskFormat},
#{item.diskType}
</foreach>
<insert id="saveBatch" parameterType="com.emr.vo.Disk">
insert into disk
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="virtualId != null" >
virtual_id ,
</if>
<if test="diskName != null" >
disk_name,
</if>
<if test="totalSize != null" >
total_size,
</if>
<if test="availableSize != null" >
available_size ,
</if>
<if test="diskFormat != null" >
disk_format,
</if>
<if test="diskType != null" >
disk_type ,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="virtualId != null" >
#{virtualId},
</if>
<if test="diskName != null" >
#{diskName},
</if>
<if test="totalSize != null" >
#{totalSize},
</if>
<if test="availableSize != null" >
#{availableSize},
</if>
<if test="diskFormat != null" >
#{diskFormat},
</if>
<if test="diskType != null" >
#{diskType},
</if>
</trim>
</insert>

@ -1,23 +1,23 @@
<?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.emr.dao.VirtualMapper">
<insert id="insert" parameterType="com.emr.vo.Virtual">
<insert id="insert" parameterType="com.emr.vo.Virtual" useGeneratedKeys="true" >
insert into virtual
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="cpuUtilization != null" >
cpuUtilization,
cpu_utilization,
</if>
<if test="memoryTotal != null" >
memoryTotal,
memory_total ,
</if>
<if test="memoryAllowance != null" >
memoryAllowance,
memory_allowance ,
</if>
<if test="uplinkRate != null" >
uplinkRate,
uplink_rate,
</if>
<if test="descendingRate != null" >
descendingRate,
descending_rate,
</if>
<if test="ip != null" >
ip,
@ -25,22 +25,25 @@
<if test="url != null" >
url,
</if>
<if test="updateTime != null" >
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="cpuUtilization != null" >
#{cpu_utilization},
#{cpuUtilization},
</if>
<if test="memoryTotal != null" >
#{memory_total},
#{memoryTotal},
</if>
<if test="memoryAllowance != null" >
#{memory_allowance},
#{memoryAllowance},
</if>
<if test="uplinkRate != null" >
#{uplink_rate},
#{uplinkRate},
</if>
<if test="descendingRate != null" >
#{descending_rate},
#{descendingRate},
</if>
<if test="ip != null" >
#{ip},
@ -48,6 +51,9 @@
<if test="url != null" >
#{url},
</if>
<if test="updateTime != null" >
updateTime,
</if>
</trim>
</insert>
<update id="updateById" parameterType="com.emr.vo.Virtual">
@ -74,12 +80,15 @@
<if test="url != null" >
url = #{url},
</if>
<if test="updateTime != null" >
update_time = #{updateTime},
</if>
</set>
where id = #{id}
</update>
<select id="selectVirtuaidIdlByIp" resultType="java.lang.Long" parameterType="java.lang.String">
select * from virtual where ip =#{ip}
select id from virtual where ip =#{ip}
</select>
<select id="getVirtual" resultType="com.emr.vo.VirtualReq" parameterType="com.emr.vo.VirtualReq">
SELECT
@ -92,6 +101,6 @@
b.virtual_id
FROM
virtual a
LEFT JOIN DISK b ON a.id= b.virtual_id
LEFT JOIN DISK b ON a.ip= b.virtual_id
</select>
</mapper>

@ -295,7 +295,7 @@
<form class="form-horizontal" id="form1">
<!--记账号-->
<input id="patientId" type="hidden">
<input id="masterId" hidden></input>
<input id="masterId" type="hidden"></input>
<div class="row">
<div class="row divCss3">病历信息</div>
<div class="row divCss2">

@ -233,6 +233,12 @@ function getSource(){
list = list.split(",");
for (var i = 0; i < list.length; i++) {
var source = list[i];
if (source=="1"){
source="移动护理系统采集服务";
}
if (source=="3"){
source="PACS系统采集服务";
}
html += '<option value="' + source + '">' + source + '</option>';
}
}
@ -698,7 +704,15 @@ function initTable2() {
field: 'source',
align: 'center',
valign: 'middle',
width: 50 // 定义列的宽度单位为像素px
width: 50, // 定义列的宽度单位为像素px
formatter:function(value, row){
if(value=="1"){
return '<span >移动护理系统采集服务</span>';
}
if(value=="3"){
return '<span >PACS系统采集服务</span>';
}
}
},
{
title: '状态',
@ -1087,7 +1101,7 @@ $("#workDetail").click(function(){
$.ajax({
type:'get',
url:path+'/archiveExt/getArchiveExtInfoList',
data:{jzh: $("#patientId").val()},
data:{jzh: $("#patientId").val(),mid: $("#masterId").val()},
dataType:'json',
success:function(data){
loadTable5Table(data);
@ -1205,6 +1219,7 @@ function initTable5(data,sidePagination) {
jzh: $("#patientId").val(),
c1: $("#c1").val(),
statusflag:$("#statusflag").val(),
mid: $("#masterId").val(),
sysflag:$("#sysflag").val(),
assortId:$("#assortIdSearch").val()
};
@ -1223,8 +1238,8 @@ function initTable5(data,sidePagination) {
if (statusFlagStr=="未完成" ||statusFlagStr==""){
return { disabled : true}
}
let sysFlagStr=row.sysFlagStr
if (sysFlagStr=='Pacs检查'){
let sysflag=row.sysflag
if (sysflag == 1 || sysflag == 3){
return { disabled : true}
}
},
@ -1236,8 +1251,12 @@ function initTable5(data,sidePagination) {
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
let statusFlagStr = row.statusFlagStr;
let sysFlagStr=row.sysFlagStr
if (sysFlagStr!='Pacs检查'){
var sysflag=row.sysflag;
console.log(sysflag)
if (sysflag == 1 ||sysflag == 3){
var html = '<button type="button" display = "block" class="btn btn-primary btn-sm editInfo" disabled : false >无需同步更新</button>';
return html;
}else {
if (statusFlagStr=="未完成" ||statusFlagStr==""){
var html = '<button type="button" class="btn btn-primary btn-sm editInfo" disabled : false>正在更新</button>';
return html;
@ -1245,9 +1264,6 @@ function initTable5(data,sidePagination) {
var html = '<button type="button" class="btn btn-primary btn-sm editInfo" >同步更新</button>';
return html;
}
}else {
var html = '<button type="button" display = "block" class="btn btn-primary btn-sm editInfo" disabled : false >同步更新</button>';
return html;
}
},
events: {
@ -1256,6 +1272,7 @@ function initTable5(data,sidePagination) {
var sysflag = row.sysflag;
var notNursingIds = '';
var nursingIds='';
var dzblIds='';
if(sysflag = 1){
nursingIds= id;
}
@ -1263,7 +1280,10 @@ function initTable5(data,sidePagination) {
sysflag = '';
notNursingIds = id;
}
submitUpdate(id,notNursingIds,row.did,sysflag,nursingIds);
if(sysflag = 3){
dzblIds= id;
}
submitUpdate(id,notNursingIds,row.did,sysflag,nursingIds,dzblIds);
}
}
},
@ -1467,7 +1487,7 @@ function cancleListentingSuccess(){
}
//提交同步采集
function submitUpdate(ids,notNursingIds,detailIds,sysFlag,nursingIds) {
function submitUpdate(ids,notNursingIds,detailIds,sysFlag,nursingIds,dzblIds) {
//记录需要监听的数据
addListentingData(ids);
//撤销定时
@ -1476,7 +1496,7 @@ function submitUpdate(ids,notNursingIds,detailIds,sysFlag,nursingIds) {
$.ajax({
type:'post',
url:path+'/archiveExt/submitUpdate',
data:{ids:ids,notNursingIds:notNursingIds,nursingIds:nursingIds,detailIds:detailIds,jzh:jzh,masterId:$("#idLab").text(),sysFlag:sysFlag},
data:{ids:ids,notNursingIds:notNursingIds,nursingIds:nursingIds,detailIds:detailIds,jzh:jzh,masterId:$("#idLab").text(),sysFlag:sysFlag,dzblIds:dzblIds},
dataType:'json',
success:function (data) {
@ -1565,6 +1585,7 @@ $("#searchBtn6").click(function(){
var sysflag = '';
var notNursingIds = '';
var nursingIds='';
var dzblIds='';
var detailIds = '';
for (var i = 0; i < data.length; i++) {
var id = data[i].idTemp;
@ -1597,7 +1618,15 @@ $("#searchBtn6").click(function(){
}
notNursingIds += id;
}
if(data[i].sysflag == 3){
//判断包含护理
sysflag = 3;
if(dzblIds != ''){
dzblIds += ',';
}
dzblIds += id;
}
}
submitUpdate(ids,notNursingIds,detailIds,sysflag,nursingIds);
submitUpdate(ids,notNursingIds,detailIds,sysflag,nursingIds,dzblIds);
}
})

File diff suppressed because one or more lines are too long

@ -148,9 +148,9 @@ function initTable() {
},
{
title: '最后更新时间',
field: 'diskType',
field: 'updateTime',
align: 'center',
valign: 'updateTime',
valign: 'middle',
}
],
onLoadSuccess: function (result) { //加载成功时执行

Loading…
Cancel
Save