潮州人医批量申请页面

master
linjj 3 years ago
parent 7df296dbd3
commit 7ee38e14d4

@ -0,0 +1,115 @@
package com.emr.controller;
import com.emr.entity.BatchApply;
import com.emr.entity.Power_User;
import com.emr.service.batchApply.BatchApplyService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.vo.BatchApplyVo;
import com.emr.vo.Msg;
import com.emr.vo.commomSearch.CommomVo;
import com.github.pagehelper.IPage;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @ClassName BatchApplyController
* @Description
* @Author linjj
* @Date 2023/8/28 15:56
* @Version 1.0
*/
@Controller
@RequestMapping("batchApply/")
public class BatchApplyController {
@Autowired
BatchApplyService batchApplyService;
@RequestMapping(value = "batchApplication")
public String batchApply(Model model) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (user != null) {
Integer roleId = user.getRoleId();
if (roleId == 0 || roleId == -100) {
model.addAttribute("createNameFlag", "0");
}
}
return "batchApply/batchApply";
}
/**
* @description:
* @author linjj
* @date: 2023/8/28 17:02
*/
@RequestMapping("selectBatchApply")
@ResponseBody
public PageInfo selectBatchApply(Integer page, Integer limit, BatchApplyVo batchApplyVo) {
if (null != page && null != limit) {
PageHelper.startPage(page, limit);
}
try {
//查询
List<BatchApply> list = batchApplyService.selectBatchApply(batchApplyVo);
return new PageInfo<>(list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
* @description:
* @params: batchApplyVo
* @return: int
* @author linjj
* @date: 2023/8/31 14:29
*/
@RequestMapping("insertBatch")
@ResponseBody
public int insertBatch(BatchApplyVo batchApplyVo) {
return batchApplyService.insertBatch(batchApplyVo);
}
/**
* @description:
* @params: batchApplyVo
* @author linjj
* @date: 2023/9/1 14:40
*/
@RequestMapping("updateBatch")
@ResponseBody
public int updateBatch(BatchApplyVo batchApplyVo) {
return batchApplyService.updateBatch(batchApplyVo);
}
/**
* @description:
* @params: id
* @return: int
* @author linjj
* @date: 2023/9/18 15:30
*/
@RequestMapping("deleteById")
@ResponseBody
public int deleteById(int id){
return batchApplyService.deleteById(id);
}
}

@ -0,0 +1,145 @@
package com.emr.controller;
import com.emr.entity.BatchApplyDetails;
import com.emr.service.BatchApplyDetails.BatchApplyDetailsService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.vo.BatchBorrowingVo;
import com.emr.vo.Msg;
import com.emr.vo.commomSearch.CommomVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* @ClassName BatchApplyController
* @Description
* @Author linjj
* @Date 2023/8/28 15:56
* @Version 1.0
*/
@Controller
@RequestMapping("applyDetails/")
public class BatchApplyDetailsController {
@Autowired
BatchApplyDetailsService batchApplyDetailsService;
@RequestMapping(value = "batchApplyDetails")
public String batchApplyDetails(Model model) {
return "batchApply/batchApplyDetails";
}
/**
* @description:
* @params: CommomVo
* @author linjj
* @date: 2023/9/4 9:02
*/
@RequestMapping("getCommomVo")
@ResponseBody
public PageInfo getCommomVo(Integer page, Integer limit, CommomVo commomVo) {
if (null != page && null != limit) {
PageHelper.startPage(page, limit);
}
try {
//查询
List<CommomVo> list = batchApplyDetailsService.addCommomVo(commomVo);
return new PageInfo<>(list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
* @description:
* @params: batchId
* @return: BatchApplyDetails
* @author linjj
* @date: 2023/9/4 15:16
*/
@RequestMapping("getBatchApplyDetails")
@ResponseBody
public PageInfo getBatchApplyDetails(Integer page, Integer limit, int batchId,String inpatientNo) {
if (null != page && null != limit) {
PageHelper.startPage(page, limit);
}
try {
//查询
List<BatchApplyDetails> list = batchApplyDetailsService.getBatchApplyDetails(batchId,inpatientNo);
return new PageInfo<>(list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
* @description:
* @params: BatchBorrowingVo
* @author linjj
* @date: 2023/9/6 15:15
*/
@RequestMapping("addBatchBorrowing")
@ResponseBody
public Msg addBatchBorrowing(BatchBorrowingVo batchBorrowingVo) {
if (StringUtils.isBlank(batchBorrowingVo.getPatientIds())) {
return Msg.fail("病案主键为空");
}
int i = batchApplyDetailsService.addBatchBorrowing(batchBorrowingVo);
if (i == 0) {
return Msg.fail("批量申请保存失败");
}
return Msg.success("批量申请保存成功");
}
/**
* @description:
* @params: id
* @return: int
* @author linjj
* @date: 2023/9/18 16:38
*/
@RequestMapping("deleteById")
@ResponseBody
public int deleteById(int id,int batchId) {
return batchApplyDetailsService.deleteById(id,batchId);
}
/**
* @description:
* @params: id
* @return: int
* @author linjj
* @date: 2023/9/18 16:38
*/
@RequestMapping("rejectById")
@ResponseBody
public int rejectById(int id) {
return batchApplyDetailsService.rejectById(id);
}
/**
* @description:
* @params:
* @return:
* @author linjj
* @date: 2023/9/20 14:54
*/
@RequestMapping("agreeById")
@ResponseBody
public int agreeById(String ids) {
return batchApplyDetailsService.agreeById(ids);
}
}

@ -9,11 +9,15 @@ import com.emr.entity.Zd_Assort;
import com.emr.entity.recordType.Emr_Type;
import com.emr.service.FontService;
import com.emr.service.Zd_AssortServiceImpl;
import com.emr.service.pushRcvBasic.PushRcvBasicService;
import com.emr.service.recordType.EmrTypeService;
import com.emr.service.tScanAssort.T_Scan_AssortService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Jpg2PdfUtil;
import com.emr.vo.FontVo.*;
import com.emr.vo.Msg;
import com.emr.vo.PushRcvBasicDTO;
import com.emr.vo.ZhFyImageVo;
import com.emr.vo.commomSearch.CommomVo;
import com.lowagie.text.Document;
import com.lowagie.text.Image;
@ -70,6 +74,10 @@ public class FontController {
private Zd_AssortServiceImpl assortService;
@Autowired
private Emr_Apply_ApproveMapper apply_approveMapper;
@Autowired
private T_Scan_AssortService tScanAssortService;
@Autowired
private PushRcvBasicService pushRcvBasicService;
/**
@ -471,4 +479,60 @@ public class FontController {
model.addAttribute("flag", flag);
return "recordManage/commomSearch/showRecordIframeBlood";
}
/**
* @description:
* @params: inpatientNo
* @params: admissTimes
* @author linjj
* @date: 2023/9/8 10:40
*/
@RequestMapping(value = "getPathListByInpatientNo", method = RequestMethod.POST)
@ResponseBody
public Msg getPathListByInpatientNo(String inpatientNo,String admissTimes){
if (StringUtils.isBlank(inpatientNo)){
return Msg.fail("inpatientNo住院号不得为空");
}
if (StringUtils.isBlank(admissTimes)){
return Msg.fail("admissTimes住院次数不得为空");
}
List<ZhFyImageVo> list = tScanAssortService.getPathListByInpatientNo(inpatientNo, admissTimes);
return Msg.successData(list);
}
/**
* @description:
* @params: startTime
* @params: endTime
* @author linjj
* @date: 2023/9/8 10:40
*/
@RequestMapping(value = "getPathListByDisDate", method = RequestMethod.POST)
@ResponseBody
public Msg getPathListByDisDate(String startTime,String endTime){
if (StringUtils.isBlank(startTime)){
return Msg.fail("startTime开始时间范围不得为空");
}
if (StringUtils.isBlank(endTime)){
return Msg.fail("endTime结束时间范围不得为空");
}
List<ZhFyImageVo> list = tScanAssortService.getPathListByDisDate(startTime,endTime);
return Msg.successData(list);
}
/**
* @description:
* @params:
* @return:
* @author linjj
* @date: 2023/9/26 11:09
*/
@RequestMapping(value = "addRcvBasic", method = RequestMethod.POST)
@ResponseBody
public Msg addRcvBasic(List<PushRcvBasicDTO> pushRcvBasicDTOList){
int i = pushRcvBasicService.addRcvBasic(pushRcvBasicDTOList);
if (i==1){
return Msg.success();
}
return Msg.fail();
}
}

@ -132,7 +132,7 @@ public class FontShowRecordController {
* @params:
* @return:
* @author linjj
* @date: 2023/7/31 8:53
* @date: 2023/7/31 8
*/
@RequestMapping(value = "showRecordList")
public String showRecordList(String inpatientNo, String idCard, Model model, HttpServletRequest request) {

@ -0,0 +1,35 @@
package com.emr.dao;
import com.emr.entity.BatchApplyDetails;
import com.emr.entity.EffectiveTimeVo;
import com.emr.vo.BatchApplyDetailsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @InterfaceName BatchApplyDetailsMapper
* @Description
* @Author linjj
* @Date 2023/9/4 11:19
* @Version 1.0
*/
@Mapper
public interface BatchApplyDetailsMapper {
int addBatchApplyDetails(@Param("list")List<BatchApplyDetailsVo> list);
List<BatchApplyDetails> getBatchApplyDetails(@Param("batchId")int batchId, @Param("inpatientNo")String inpatientNo);
int deleteByBatchId(int batchId);
int deleteById(int id);
int upadteApplyDetails(BatchApplyDetailsVo batchApplyDetailsVo);
int upadteApplyDetailsList(@Param("list") List<BatchApplyDetailsVo> list);
String getEffectiveTime(@Param("ids") Integer ids,@Param("examineTimes") String examineTimes);
}

@ -0,0 +1,36 @@
package com.emr.dao;
import com.emr.entity.BatchApply;
import com.emr.vo.BatchApplyVo;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @InterfaceName BatchApplyMapper
* @Description
* @Author linjj
* @Date 2023/8/28 17:13
* @Version 1.0
*/
public interface BatchApplyMapper {
List<BatchApply> selectBatchApply(BatchApplyVo batchApplyVo);
int insertBatch(BatchApplyVo batchApplyVo);
int updateBatch(BatchApplyVo batchApplyVo);
List<CommomVo> getCommomVo(CommomVo commomVo);
List<CommomVo> getCommomVoByPatientIds(@Param(value = "patientIds")String patientIds);
BatchApplyVo getBorrowingNum(int batchId);
int updateBorrowingNum(@Param("borrowingNum") int borrowingNum, @Param("batchId") int batchId);
int deleteById(int id);
}

@ -0,0 +1,18 @@
package com.emr.dao;
import com.emr.vo.PushRcvBasicDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @InterfaceName PushRcvBasicMaooer
* @Description
* @Author linjj
* @Date 2023/9/26 11:29
* @Version 1.0
*/
public interface PushRcvBasicMapper {
int addRcvBasic(@Param(value = "pushRcvBasicDTOList") List<PushRcvBasicDTO> pushRcvBasicDTOList);
}

@ -3,6 +3,7 @@ package com.emr.dao.tScanAssort;
import com.emr.entity.tScanAssort.T_Scan_Assort;
import com.emr.vo.FontVo.FontCommom;
import com.emr.vo.FontVo.ScanAssortVo;
import com.emr.vo.ZhFyImageVo;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.ibatis.annotations.Param;
@ -40,4 +41,9 @@ public interface T_Scan_AssortMapper {
void selectPicPaths(CommomVo commomVo, String scanPages);
void recoverPic(@Param("patientId") String patientId, @Param("scanPages") String scanPages);
List<ZhFyImageVo> getPathListByInpatientNo(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") String admissTimes);
List<ZhFyImageVo> getPathListByDisDate(@Param("startTime")String startTime,@Param("endTime")String endTime);
}

@ -0,0 +1,31 @@
package com.emr.entity;
import lombok.Data;
/**
* @ClassName BatchApply
* @Description
* @Author linjj
* @Date 2023/8/28 17:03
* @Version 1.0
*/
@Data
public class BatchApply {
private int id;
//批次名称
private String batchName;
//借阅数量
private Integer borrowingNum;
//0.未审批1.已审批3.审批中
private Integer statc;
//已审批数量
private Integer readNum;
//创建人
private String createName;
//创建时间
private String createDate;
//创建时间
private String applyName;
}

@ -0,0 +1,53 @@
package com.emr.entity;
import lombok.Data;
/**
* @ClassName AatchApplyDetailsVo
* @Description
* @Author linjj
* @Date 2023/9/4 11:13
* @Version 1.0
*/
@Data
public class BatchApplyDetails {
private int id;
//批次id
private int batchId;
//申请者
private String applyName;
//申请时间
private String applyTime;
//有效日期
private String effectiveTime;
//申请理由
private String applyReason;
//申请类型1.借阅申请2.纸质申请
private int applyFlag;
//经办人
private String handlingName;
//申请科室
private String applyDate;
//申请状态:1.已通过2.申请中3.驳回
private int applyStatc;
//出院时间
private String disTime;
//申请天数
private int effectiveDay;
//住院号
private String inpatientNo;
//住院次数
private String admissTimes;
//患者姓名
private String patientName;
//审批人姓名
private String examineName;
//审批时间
private String examineTime;
}

@ -0,0 +1,18 @@
package com.emr.entity;
import lombok.Data;
/**
* @ClassName effectiveTimeVo
* @Description vo
* @Author linjj
* @Date 2023/9/20 16:46
* @Version 1.0
*/
@Data
public class EffectiveTimeVo {
private int id;
private String effectiveTime;
}

@ -90,6 +90,18 @@ public class Power_User extends UserVo {
*/
private Set<String> menus;
private String powerDepts;
@Override
public String getPowerDepts() {
return powerDepts;
}
@Override
public void setPowerDepts(String powerDepts) {
this.powerDepts = powerDepts;
}
public Integer getUserId() {
return userId;
}

@ -0,0 +1,31 @@
package com.emr.service.BatchApplyDetails;
import com.emr.entity.BatchApplyDetails;
import com.emr.vo.BatchBorrowingVo;
import com.emr.vo.commomSearch.CommomVo;
import java.util.List;
/**
* @InterfaceName BatchApplyService
* @Description
* @Author linjj
* @Date 2023/8/28 17:10
* @Version 1.0
*/
public interface BatchApplyDetailsService {
List<CommomVo> addCommomVo(CommomVo commomVo) throws Exception;
List<BatchApplyDetails> getBatchApplyDetails(int batchId,String inpatientNo);
int addBatchBorrowing(BatchBorrowingVo batchBorrowingVo);
int deleteById(int id,int batchId);
int rejectById(int id);
int agreeById(String ids);
}

@ -0,0 +1,249 @@
package com.emr.service.BatchApplyDetails;
import com.emr.dao.BatchApplyDetailsMapper;
import com.emr.dao.BatchApplyMapper;
import com.emr.dao.EmrComomSetMapper;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.entity.*;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ListUtils;
import com.emr.util.Setters;
import com.emr.vo.BatchApplyDetailsVo;
import com.emr.vo.BatchApplyVo;
import com.emr.vo.BatchBorrowingVo;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* @ClassName BatchApplyServiceImpl
* @Description
* @Author linjj
* @Date 2023/8/28 17:10
* @Version 1.0
*/
@Service
public class BatchApplyDetailsServiceImpl implements BatchApplyDetailsService {
@Autowired
BatchApplyMapper batchApplyMapper;
@Autowired
Emr_DictionaryMapper emrDictionaryMapper;
@Autowired
BatchApplyDetailsMapper batchApplyDetailsMapper;
@Autowired
EmrComomSetMapper emrComomSetMapper;
@Override
public List<CommomVo> addCommomVo(CommomVo commomVo) {
List<CommomVo> list = batchApplyMapper.getCommomVo(commomVo);
//转换科室
convertDepartment(list);
//当查询集合中只有一条记录时直接插入申请列表
if (commomVo.getRefreshTable() == 1) {
addApplyDetails(list, commomVo.getBatchId(),commomVo.getApplyName());
}
return list;
}
@Override
public List<BatchApplyDetails> getBatchApplyDetails(int batchId,String inpatientNo) {
//获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
String format = fmt.format(new Date());
List<BatchApplyDetails> batchApplyDetails = batchApplyDetailsMapper.getBatchApplyDetails(batchId,inpatientNo);
for (BatchApplyDetails list : batchApplyDetails) {
//判断是否过期如果过期状态为4
String effectiveTime = list.getEffectiveTime();
if (StringUtils.isNotBlank(effectiveTime) ) {
if ((effectiveTime.compareTo(format)) == -1) {
list.setApplyStatc(4);
}
}
}
return batchApplyDetails;
}
@Override
public int addBatchBorrowing(BatchBorrowingVo batchBorrowingVo) {
//查询患者基础数据
List<CommomVo> commomList = batchApplyMapper.getCommomVoByPatientIds(batchBorrowingVo.getPatientIds());
return addApplyDetailsList(commomList, batchBorrowingVo);
}
@Override
public int deleteById(int id,int batchId) {
//更新批次数量
delBorrowingNum(batchId);
return batchApplyDetailsMapper.deleteById(id);
}
@Override
public int rejectById(int id) {
//获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
//获取登录用户信息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
BatchApplyDetailsVo batchApplyDetailsVo = new BatchApplyDetailsVo();
batchApplyDetailsVo.setExamineName(user.getUserPosition());
batchApplyDetailsVo.setExamineTime(fmt.format(new Date()));
batchApplyDetailsVo.setId(id);
batchApplyDetailsVo.setApplyStatc(3);
return batchApplyDetailsMapper.upadteApplyDetails(batchApplyDetailsVo);
}
@Override
public int agreeById(String ids) {
//获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
//获取登录用户信息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
//声明一个BatchApplyDetailsVo对象
BatchApplyDetailsVo batchApplyDetailsVo = new BatchApplyDetailsVo();
//声明一个BatchApplyDetailsVo集合
List<BatchApplyDetailsVo> list = Collections.synchronizedList(new ArrayList<>());
//将字符串转为List<String>在转成List<Integer>
List<Integer> idsList = Arrays.asList(ids.split(",")).stream().mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
//遍历审核信息
for (Integer id : idsList) {
batchApplyDetailsVo.setExamineName(user.getUserPosition());
batchApplyDetailsVo.setExamineTime(fmt.format(new Date()));
batchApplyDetailsVo.setApplyStatc(1);
batchApplyDetailsVo.setId(id);
list.add(batchApplyDetailsVo);
}
//给有效时间赋值
upDateEffectiveTimeList(list);
return batchApplyDetailsMapper.upadteApplyDetailsList(list);
}
private void upDateEffectiveTimeList(List<BatchApplyDetailsVo> batchApplyDetailsVolist) {
for (BatchApplyDetailsVo list : batchApplyDetailsVolist) {
String effectiveTime = batchApplyDetailsMapper.getEffectiveTime(list.getId(), list.getExamineTime());
list.setEffectiveTime(effectiveTime);
}
}
private int addApplyDetailsList(List<CommomVo> commomList, BatchBorrowingVo batchBorrowingVo) {
//获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
//获取登录用户信息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
List<BatchApplyDetailsVo> list = Collections.synchronizedList(new ArrayList<>());
for (CommomVo commomInfoList : commomList) {
//插入申请借阅详情集合
BatchApplyDetailsVo batchApplyDetailsVo = new BatchApplyDetailsVo();
batchApplyDetailsVo.setBatchId(batchBorrowingVo.getBatchId());
batchApplyDetailsVo.setApplyName(batchBorrowingVo.getApplyName());
batchApplyDetailsVo.setApplyDate(user.getRemark());
batchApplyDetailsVo.setApplyTime(fmt.format(new Date()));
batchApplyDetailsVo.setEffectiveDay(batchBorrowingVo.getEffectiveDay());
batchApplyDetailsVo.setInpatientNo(commomInfoList.getInpatientNo());
batchApplyDetailsVo.setAdmissTimes(commomInfoList.getAdmissTimes());
batchApplyDetailsVo.setPatientName(commomInfoList.getName());
batchApplyDetailsVo.setDisTime(commomInfoList.getDisDate());
batchApplyDetailsVo.setApplyReason(batchBorrowingVo.getApplyReason());
batchApplyDetailsVo.setApplyFlag(batchBorrowingVo.getApplyFlag());
batchApplyDetailsVo.setApplyStatc(2);
batchApplyDetailsVo.setHandlingName(user.getUserName());
//将对象传入集合
list.add(batchApplyDetailsVo);
}
//同步数量
updateNum(batchBorrowingVo.getBatchId(), list.size());
return batchApplyDetailsMapper.addBatchApplyDetails(list);
}
/**
* @description:
* @author linjj
* @date: 2023/9/4 14:18
*/
private void convertDepartment(List<CommomVo> list) {
//获取科室列表
List<Emr_Dictionary> dicList = emrDictionaryMapper.selectDictionaryByTypeCode("dept_code");
//转换科室
Map<String, Emr_Dictionary> codeMap = ListUtils.toMap(dicList, Emr_Dictionary::getCode);
Setters.<CommomVo>instance().list(list).cycleSetProperties(p -> {
String deptCode = p.getDisDept();
if (StringUtils.isNotBlank(deptCode) && codeMap.containsKey(deptCode)) {
String deptName = codeMap.get(deptCode).getName();
p.setDisDept(deptName);
}
});
}
private void addApplyDetails(List<CommomVo> list, int batchId,String ApplyName) {
//获取系统设置的默认参数
EmrComomSet emrComomSet = emrComomSetMapper.selectByPrimaryKey(1);
//获取登录用户信息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (list.size() == 1) {
BatchApplyDetailsVo batchApplyDetailsVo = new BatchApplyDetailsVo();
batchApplyDetailsVo.setBatchId(batchId);
batchApplyDetailsVo.setApplyName(ApplyName);
batchApplyDetailsVo.setApplyDate(user.getRemark());
//获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
batchApplyDetailsVo.setApplyTime(fmt.format(new Date()));
batchApplyDetailsVo.setEffectiveDay(emrComomSet.getDefaultDay());
batchApplyDetailsVo.setInpatientNo(list.get(0).getInpatientNo());
batchApplyDetailsVo.setAdmissTimes(list.get(0).getAdmissTimes());
batchApplyDetailsVo.setPatientName(list.get(0).getName());
batchApplyDetailsVo.setHandlingName(user.getUserName());
batchApplyDetailsVo.setDisTime(list.get(0).getDisDate());
batchApplyDetailsVo.setApplyReason("需要借阅这份病历");
batchApplyDetailsVo.setApplyFlag(1);
batchApplyDetailsVo.setApplyStatc(2);
List<BatchApplyDetailsVo> batchApplyDetailsList = Arrays.asList(batchApplyDetailsVo);
batchApplyDetailsMapper.addBatchApplyDetails(batchApplyDetailsList);
//新增时同步批次数量先获取原先数量
updateBorrowingNum(batchId);
}
}
private void updateBorrowingNum(int batchId) {
BatchApplyVo batchApplyVo = batchApplyMapper.getBorrowingNum(batchId);
Integer borrowingNum = batchApplyVo.getBorrowingNum();
int i = borrowingNum + 1;
batchApplyMapper.updateBorrowingNum(i, batchId);
}
private void delBorrowingNum(int batchId) {
BatchApplyVo batchApplyVo = batchApplyMapper.getBorrowingNum(batchId);
Integer borrowingNum = batchApplyVo.getBorrowingNum();
int i = borrowingNum - 1;
batchApplyMapper.updateBorrowingNum(i, batchId);
}
private void updateNum(int batchId, int listNum) {
BatchApplyVo batchApplyVo = batchApplyMapper.getBorrowingNum(batchId);
Integer borrowingNum = batchApplyVo.getBorrowingNum();
int i = borrowingNum + listNum;
batchApplyMapper.updateBorrowingNum(i, batchId);
}
}

@ -219,7 +219,8 @@ public class CommomService {
if (StringUtils.isNotBlank(flag)) {
CommomVo commomVo = commomMapper.selectByPrimaryKey(patientId);
if (commomVo != null) {
if (StringUtils.isNotBlank(commomVo.getFilePath())) {
String filePath = commomVo.getFilePath();
if (StringUtils.isNotBlank(filePath)) {
//flag = home_addr取home_addr字段path_file取home_addr字段
String root1 = "";
if ("home_addr".equals(flag)) {
@ -594,6 +595,10 @@ public class CommomService {
* @return
*/
public List<String> selectPrintPic(HttpServletResponse response, String patientId, String rootPaths, String names, String sources, String mapKey) {
//获取登录用户信息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
List<String> outs = new LinkedList<>();
if (StringUtils.isNotBlank(names)) {
String[] rootPathList = rootPaths.split(",");
@ -607,6 +612,7 @@ public class CommomService {
Short printIsImg = emrPdfWaterSet.getPrintIsImg();
//获取是否打印用户信息
Short userEffective = emrPdfWaterSet.getUserEffective();
Integer roleId = user.getRoleId();
for (int i = 0; i < nameList.length; i++) {
//定义图片根目录地址
String rootPath = "";
@ -629,8 +635,8 @@ public class CommomService {
//定义输出地址
String outSrc = "";
//获取项目上下文地址
if ((printEffective != null && printEffective == 1) ||
(printIsImg != null && printIsImg == 1)) {
if ((printEffective != null && printEffective == 1 && roleId == 8) ||
(printIsImg != null && printIsImg == 1) && roleId == 8) {
if ("99".equals(sourceList[i])) {
String rootSrcPath = selectRootByNotWater(srcPath);
String str2 = srcPath.substring(0, srcPath.indexOf(File.separator));

@ -0,0 +1,28 @@
package com.emr.service.batchApply;
import com.emr.entity.BatchApply;
import com.emr.vo.BatchApplyVo;
import com.emr.vo.commomSearch.CommomVo;
import java.util.List;
/**
* @InterfaceName BatchApplyService
* @Description
* @Author linjj
* @Date 2023/8/28 17:10
* @Version 1.0
*/
public interface BatchApplyService {
List<BatchApply> selectBatchApply(BatchApplyVo batchApplyVo);
int insertBatch(BatchApplyVo batchApplyVo);
int updateBatch(BatchApplyVo batchApplyVo);
int deleteById(int id);
}

@ -0,0 +1,91 @@
package com.emr.service.batchApply;
import com.emr.dao.BatchApplyDetailsMapper;
import com.emr.dao.BatchApplyMapper;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.entity.BatchApply;
import com.emr.entity.BatchApplyDetails;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.Power_User;
import com.emr.util.ListUtils;
import com.emr.util.Setters;
import com.emr.vo.BatchApplyDetailsVo;
import com.emr.vo.BatchApplyVo;
import com.emr.vo.commomSearch.CommomVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @ClassName BatchApplyServiceImpl
* @Description
* @Author linjj
* @Date 2023/8/28 17:10
* @Version 1.0
*/
@Service
@Transactional
public class BatchApplyServiceImpl implements BatchApplyService {
@Autowired
BatchApplyMapper batchApplyMapper;
@Autowired
Emr_DictionaryMapper emrDictionaryMapper;
@Autowired
BatchApplyDetailsMapper batchApplyDetailsMapper;
@Override
public List<BatchApply> selectBatchApply(BatchApplyVo batchApplyVo) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (user != null) {
Integer roleId = user.getRoleId();
if (roleId != 0 || roleId != -100) {
batchApplyVo.setCreateName(user.getUserName());
}
}
return batchApplyMapper.selectBatchApply(batchApplyVo);
}
@Override
public int insertBatch(BatchApplyVo batchApplyVo) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
// 从session获取用户名
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
if (user != null) {
//初始化批量申请
String username = user.getUserName();
batchApplyVo.setCreateName(username);
batchApplyVo.setStatc(0);
batchApplyVo.setReadNum(0);
batchApplyVo.setBorrowingNum(0);
//获取系统当前时间
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
batchApplyVo.setCreateDate(fmt.format(new Date()));
}
return batchApplyMapper.insertBatch(batchApplyVo);
}
@Override
public int updateBatch(BatchApplyVo batchApplyVo) {
return batchApplyMapper.updateBatch(batchApplyVo);
}
@Override
public int deleteById(int id) {
batchApplyDetailsMapper.deleteByBatchId(id);
return batchApplyMapper.deleteById(id);
}
}

@ -0,0 +1,18 @@
package com.emr.service.pushRcvBasic;
import com.emr.vo.Msg;
import com.emr.vo.PushRcvBasicDTO;
import java.util.List;
/**
* @InterfaceName PushRcvBasicService
* @Description
* @Author linjj
* @Date 2023/9/26 11:28
* @Version 1.0
*/
public interface PushRcvBasicService {
int addRcvBasic(List<PushRcvBasicDTO> pushRcvBasicDTOList);
}

@ -0,0 +1,28 @@
package com.emr.service.pushRcvBasic;
import com.emr.dao.PushRcvBasicMapper;
import com.emr.vo.PushRcvBasicDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @ClassName PushRcvBasicServiceImpl
* @Description
* @Author linjj
* @Date 2023/9/26 11:28
* @Version 1.0
*/
@Service
@Transactional
public class PushRcvBasicServiceImpl implements PushRcvBasicService {
@Autowired
PushRcvBasicMapper pushRcvBasicMapper;
@Override
public int addRcvBasic(List<PushRcvBasicDTO> pushRcvBasicDTOList) {
return pushRcvBasicMapper.addRcvBasic(pushRcvBasicDTOList);
}
}

@ -2,7 +2,7 @@ package com.emr.service.tScanAssort;
import com.emr.entity.tScanAssort.T_Scan_Assort;
import com.emr.vo.FontVo.ScanAssortVo;
import com.emr.vo.commomSearch.CommomVo;
import com.emr.vo.ZhFyImageVo;
import java.util.List;
@ -16,4 +16,8 @@ public interface T_Scan_AssortService {
List<ScanAssortVo> selectPicPaths(String patientId,String scanPages,String flag);
void recoverPic(String patientId, String scanPages);
List<ZhFyImageVo> getPathListByInpatientNo(String inpatientNo, String admissTimes);
List<ZhFyImageVo> getPathListByDisDate(String startTime,String endTime);
}

@ -2,17 +2,20 @@ package com.emr.service.tScanAssort;
import com.emr.dao.CommomMapper;
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
import com.emr.entity.recordLock.Emr_Lock;
import com.emr.entity.tScanAssort.T_Scan_Assort;
import com.emr.vo.FontVo.ScanAssortVo;
import com.emr.vo.commomSearch.CommomVo;
import com.emr.vo.ZhFyImageVo;
import com.emr.vo.PicListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -34,6 +37,8 @@ public class T_Scan_AssortServiceImpl implements T_Scan_AssortService{
private T_Scan_AssortMapper scanAssortMapper;
@Autowired
private CommomMapper commomMapper;
@Value("${NEW_EMR_RECORD_JSP}")
private String NEW_EMR_RECORD_JSP;
@Override
public void updateByPrimaryKeySelective(T_Scan_Assort newAssort, T_Scan_Assort oldAssort) {
scanAssortMapper.updateByPrimaryKeySelective(newAssort,oldAssort);
@ -85,4 +90,68 @@ public class T_Scan_AssortServiceImpl implements T_Scan_AssortService{
public void recoverPic(String patientId, String scanPages) {
scanAssortMapper.recoverPic(patientId, scanPages);
}
@Override
public List<ZhFyImageVo> getPathListByInpatientNo(String inpatientNo, String admissTimes) {
List<ZhFyImageVo> list = scanAssortMapper.getPathListByInpatientNo(inpatientNo, admissTimes);
for (ZhFyImageVo scanAssortList:list){
List<PicListVo> picList = scanAssortList.getPicList();
for (PicListVo picPathList:picList){
//获取盘符并转换映射地址的头部地址
String root = selectRootByNotWater(picPathList.getPicUrl());
//获取盘符后面的地址
String str1 = picPathList.getPicUrl().substring(0, picPathList.getPicUrl().indexOf(File.separator));
String picPath = picPathList.getPicUrl().substring(str1.length() + 1, picPathList.getPicUrl().length());
String fileUrl = NEW_EMR_RECORD_JSP+ File.separator + root + picPath;
picPathList.setPicUrl(fileUrl);
}
}
return list;
}
@Override
public List<ZhFyImageVo> getPathListByDisDate(String startTime,String endTime) {
List<ZhFyImageVo> list = scanAssortMapper.getPathListByDisDate(startTime, endTime);
for (ZhFyImageVo scanAssortList:list){
List<PicListVo> picList = scanAssortList.getPicList();
for (PicListVo picPathList:picList){
//获取盘符并转换映射地址的头部地址
String root = selectRootByNotWater(picPathList.getPicUrl());
//获取盘符后面的地址
String str1 = picPathList.getPicUrl().substring(0, picPathList.getPicUrl().indexOf(File.separator));
String picPath = picPathList.getPicUrl().substring(str1.length() + 1, picPathList.getPicUrl().length());
String fileUrl = NEW_EMR_RECORD_JSP+ File.separator + root + picPath;
picPathList.setPicUrl(fileUrl);
}
}
return list;
}
private String selectRootByNotWater(String srcPath) {
//获取盘符
String str = srcPath.substring(0, 1).toUpperCase();
switch (str) {
case "C":
return "reloadC\\";
case "D":
return "reloadD\\";
case "E":
return "reloadE\\";
case "F":
return "reloadF\\";
case "G":
return "reloadG\\";
case "H":
return "reloadH\\";
case "I":
return "reloadI\\";
case "J":
return "reloadJ\\";
case "K":
return "reloadK\\";
default:
;
}
return null;
}
}

@ -0,0 +1,12 @@
package com.emr.util;
/**
* @InterfaceName FieldSelector
* @Description
* @Author linjj
* @Date 2023/6/29 16:41
* @Version 1.0
*/
public interface FieldSelector<Type, FieldType> {
FieldType select(Type type);
}

@ -0,0 +1,22 @@
package com.emr.util;
import java.util.List;
public class ListPropertySetter<T> {
private final List<T> values;
public ListPropertySetter(List<T> values) {
this.values = values;
}
public List<T> cycleSetProperties(PropertySetter<T> setter) {
if (null == values) return values;
for (T value : values) {
setter.apply(value);
}
return values;
}
}

@ -0,0 +1,73 @@
package com.emr.util;
import org.springframework.util.CollectionUtils;
import java.util.*;
public final class ListUtils {
public static <T, K> Map<K, T> toMap(List<T> list, FieldSelector<T, K> selector) {
if (CollectionUtils.isEmpty(list)) return Collections.emptyMap();
Map<K, T> map = new HashMap<>(list.size());
for (T t : list) {
K key = selector.select(t);
if (key != null) map.put(key, t);
}
return map;
}
public static <T, K> Map<K, List<T>> groupBy(List<T> list, FieldSelector<T, K> selector) {
if (CollectionUtils.isEmpty(list)) return Collections.emptyMap();
Map<K, List<T>> map = new HashMap<>();
for (T t : list) {
K key = selector.select(t);
if (key == null) continue;
if (!map.containsKey(key)) {
map.put(key, new ArrayList<T>());
}
map.get(key).add(t);
}
return map;
}
public static <T, K> List<K> select(List<T> list, FieldSelector<T, K> selector) {
if (CollectionUtils.isEmpty(list)) return Collections.emptyList();
List<K> filedList = new ArrayList<>(list.size());
for (T t : list) {
K key = selector.select(t);
if (key != null) filedList.add(key);
}
return filedList;
}
public static <T, K> List<K> distinctSelect(List<T> list, FieldSelector<T, K> selector) {
if (CollectionUtils.isEmpty(list)) return Collections.emptyList();
Set<K> filedSet = new HashSet<>();
for (T t : list) {
K key = selector.select(t);
if (key != null) filedSet.add(key);
}
return new ArrayList<>(filedSet);
}
@SafeVarargs
public static <T> List<T> unionWithoutDuplicate(List<T>... values) {
if (null == values || values.length <= 0) return Collections.emptyList();
Set<T> unionFiledSet = new HashSet<>();
for (List<T> value : values) {
if (!CollectionUtils.isEmpty(value)) {
unionFiledSet.addAll(value);
}
}
return new ArrayList<>(unionFiledSet);
}
public static <T, K> List<T> skipDuplicateKey(List<T> list, FieldSelector<T, K> selector) {
if (CollectionUtils.isEmpty(list)) return Collections.emptyList();
List<T> filedList = new ArrayList<>(list.size());
Map<K, T> map = toMap(list, selector);
for (K key : map.keySet()) {
filedList.add(map.get(key));
}
return filedList;
}
}

@ -0,0 +1,7 @@
package com.emr.util;
public interface PropertySetter<T> {
void apply(T t);
}

@ -0,0 +1,14 @@
package com.emr.util;
import java.util.List;
public class Setters<T> {
public static <T> Setters<T> instance() {
return new Setters<>();
}
public ListPropertySetter<T> list(List<T> values) {
return new ListPropertySetter<>(values);
}
}

@ -0,0 +1,52 @@
package com.emr.vo;
import lombok.Data;
/**
* @ClassName AatchApplyDetailsVo
* @Description
* @Author linjj
* @Date 2023/9/4 11:13
* @Version 1.0
*/
@Data
public class BatchApplyDetailsVo {
private int id;
//批次id
private int batchId;
//申请者
private String applyName;
//申请时间
private String applyTime;
//有效日期
private String effectiveTime;
//申请理由
private String applyReason;
//申请类型1.借阅申请2.纸质申请
private int applyFlag;
//经办人
private String handlingName;
//申请科室
private String applyDate;
//申请状态:1.已通过2.申请中3.驳回
private int applyStatc;
//出院时间
private String disTime;
//申请天数
private int effectiveDay;
//住院号
private String inpatientNo;
//住院次数
private Short admissTimes;
//患者姓名
private String patientName;
//审批人姓名
private String examineName;
//审批时间
private String examineTime;
}

@ -0,0 +1,35 @@
package com.emr.vo;
import lombok.Data;
/**
* @ClassName BatchApplyVo
* @Description
* @Author linjj
* @Date 2023/8/28 17:03
* @Version 1.0
*/
@Data
public class BatchApplyVo {
private int id;
//批次名称
private String batchName;
//借阅数量
private Integer borrowingNum;
//0.未审批1.已审批2.审批中
private Integer statc;
//已审批数量
private Integer readNum;
//创建人
private String createName;
//开始时间
private String startTime1;
//结束时间
private String endTime1;
//创建时间
private String createDate;
//申请人工号
private String applyName;
}

@ -0,0 +1,28 @@
package com.emr.vo;
import lombok.Data;
/**
* @ClassName batchBorrowingVo
* @Description
* @Author linjj
* @Date 2023/9/6 15:13
* @Version 1.0
*/
@Data
public class BatchBorrowingVo {
//patientId主键
private String patientIds;
//申请理由
private String applyReason;
//申请类型1.借阅申请2.纸质申请
private int applyFlag;
//申请天数
private int effectiveDay;
//批次id
private int batchId;
//申请人姓名
private String applyName;
}

@ -18,6 +18,8 @@ public class Msg {
private int code;
//提示信息
private String msg;
//数据
private Object data;
//用户要返回给浏览器的数据
private Map<String,Object> extend=new HashMap<String,Object>();
@ -27,6 +29,25 @@ public class Msg {
result.setMsg("success");
return result;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public static Msg successData(Object data){
Msg result=new Msg();
result.setCode(100);
result.setMsg("success");
result.setData(data);
return result;
}
public static Msg fail(){
Msg result=new Msg();
@ -35,6 +56,8 @@ public class Msg {
return result;
}
public static Msg fail(String msg){
Msg result=new Msg();
result.setCode(200);
@ -42,6 +65,13 @@ public class Msg {
return result;
}
public static Msg success(String msg){
Msg result=new Msg();
result.setCode(100);
result.setMsg(msg);
return result;
}
public Msg add(String key,Object value){
this.getExtend().put(key, value);
return this;

@ -0,0 +1,27 @@
package com.emr.vo;
import lombok.Data;
/**
* @ClassName picListVo
* @Description
* @Author linjj
* @Date 2023/9/8 10:48
* @Version 1.0
*/
@Data
public class PicListVo {
//图片路径
private String picUrl;
//分段id
private String assortId;
//分段名称
private String assortName;
}

@ -0,0 +1,81 @@
package com.emr.vo;
import lombok.Data;
import java.util.Date;
@Data
public class PushRcvBasicDTO {
private Long id;
private String patientId;
private Integer admissTimes;
private String inpatientNo;
private String jzh;
private String admissId;
private String name;
private String serialNumber;
private Date admissDate;
private String admissDept;
private String admissDeptName;
private Date disDate;
private String disDept;
private String disDeptName;
private Integer admissDays;
private String attendingName;
private Integer fileSource;
private RecoveryStateEnum recoveryState;
private PushStateEnum pushState;
private Date revoveryTime;
private String revoveryUser;
private Date updateTime;
private Date createTime;
}

@ -0,0 +1,19 @@
package com.emr.vo;
/**
*
*/
public enum PushStateEnum {
PUSH_WAITING(0, "待发布"),
PUSH_ALREADY(1, "已发布");
private Integer value;
private String display;
PushStateEnum(Integer value, String display) {
this.value = value;
this.display = display;
}
}

@ -0,0 +1,92 @@
package com.emr.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
*
*
* @author AutoGenerator
* @since 2023-09-13
*/
@Data
public class RcvBasic implements Serializable {
private Long id;
private String patientId;
private Integer admissTimes;
private String inpatientNo;
private String jzh;
private String admissId;
private String name;
private String serialNumber;
private Date admissDate;
private String admissDept;
private String admissDeptName;
private Date disDate;
private String disDept;
private String disDeptName;
private Integer admissDays;
private String attendingName;
private Integer fileSource;
private RecoveryStateEnum recoveryState;
private PushStateEnum pushState;
private Date revoveryTime;
private String revoveryUser;
private Date updateTime;
private Date createTime;
}

@ -0,0 +1,21 @@
package com.emr.vo;
/**
*
*/
public enum RecoveryStateEnum {
RECYCLED_WAITING(0, "待回收"),
RECYCLED_ALREADY(1, "已回收");
private Integer value;
private String display;
RecoveryStateEnum(Integer value, String display) {
this.value = value;
this.display = display;
}
}

@ -0,0 +1,29 @@
package com.emr.vo;
import lombok.Data;
import java.util.List;
/**
* @ClassName ZhFyimageVo
* @Description
* @Author linjj
* @Date 2023/9/8 10:46
* @Version 1.0
*/
@Data
public class ZhFyImageVo {
//住院号
private String inpatientNo;
//住院次数
private int admissTimes;
//出院时间
private String disDate;
//图片信息集合
private List<PicListVo> picList;
}

@ -37,6 +37,14 @@ public class CommomVo {
private String attending;//主治医师
public String getApplyName() {
return applyName;
}
public void setApplyName(String applyName) {
this.applyName = applyName;
}
private String mainDiagCode;//主要诊断编码
private String mainDiagName;//主要诊断名称
@ -45,6 +53,8 @@ public class CommomVo {
private String memo;//病案备注
private String applyName;
private String country;//国籍
private String birthAddr;//出生地
@ -95,6 +105,25 @@ public class CommomVo {
private String clinicName;//门诊诊断名称
private int refreshTable;
public int getRefreshTable() {
return refreshTable;
}
public void setRefreshTable(int refreshTable) {
this.refreshTable = refreshTable;
}
public int getBatchId() {
return batchId;
}
public void setBatchId(int batchId) {
this.batchId = batchId;
}
private int batchId;
private String admissThing;//入院病情(暂无用)
private String pathologyCode;//病理诊断编码

@ -51,3 +51,6 @@ fullTextSearchUrl = http://172.16.11.90:57777/AppEngine3?wsdl
fullTextSearchMethod = SearchFulltext
#\u5168\u6587\u68C0\u7D22\u5173\u952E\u5B57\u4FDD\u7559\u5929\u6570
fullTextDays = 90
NEW_EMR_RECORD_JSP : http://192.168.16.122:8083/emr_record

@ -0,0 +1,108 @@
<?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.BatchApplyDetailsMapper">
<insert id="addBatchApplyDetails" parameterType="java.util.List">
insert into batch_apply_details (batch_id,apply_name,apply_time,apply_reason,apply_flag,
apply_date,apply_statc,dis_time,effective_day,patient_name,inpatient_no,admiss_times,handling_name
)
values
<foreach collection="list" item="item" separator=",">(#{item.batchId},#{item.applyName},#{item.applyTime},
#{item.applyReason},#{item.applyFlag},#{item.applyDate},#{item.applyStatc},
#{item.disTime},#{item.effectiveDay},#{item.patientName},#{item.inpatientNo},#{item.admissTimes},#{item.handlingName}
)
</foreach>
</insert>
<update id="upadteApplyDetails">
update batch_apply_details
<set>
<if test="effectiveTime != null">
effective_time = #{effectiveTime},
</if>
<if test="handlingName != null">
handling_name = #{handlingName},
</if>
<if test="examineName != null">
examine_name = #{examineName},
</if>
<if test="examineTime != null">
examine_time = #{examineTime},
</if>
<if test="applyStatc != null">
apply_statc=#{applyStatc},
</if>
</set>
where id = #{id}
</update>
<update id="upadteApplyDetailsList">
<foreach collection="list" item="item" index="index" separator=";">
UPDATE batch_apply_details
<set>
<if test="item.effectiveTime != null and item.effectiveTime != ''" >
effective_time = #{item.effectiveTime},
</if>
<if test="item.handlingName != null" >
handling_name = #{item.handlingName},
</if>
<if test="item.examineName != null" >
examine_name = #{item.examineName},
</if>
<if test="item.examineTime != null" >
examine_time = #{item.examineTime},
</if>
<if test="item.applyStatc != null" >
apply_statc = #{item.applyStatc},
</if>
</set>
where id = #{item.id}
</foreach>
</update>
<!-- <update id="upadteApplyDetailsList">-->
<!-- UPDATE batch_apply_details-->
<!-- <set>-->
<!-- <if test="effectiveTime != null and effectiveTime != ''">-->
<!-- effective_time = #{item.effectiveTime},-->
<!-- </if>-->
<!-- <if test="handlingName != null">-->
<!-- handling_name = #{handlingName},-->
<!-- </if>-->
<!-- <if test="examineName != null">-->
<!-- examine_name = #{examineName},-->
<!-- </if>-->
<!-- <if test="examineTime != null">-->
<!-- examine_time = #{examineTime},-->
<!-- </if>-->
<!-- <if test="applyStatc != null">-->
<!-- apply_statc = #{applyStatc},-->
<!-- </if>-->
<!-- </set>-->
<!-- where id = #{id}-->
<!-- </update>-->
<delete id="deleteByBatchId">
delete from batch_apply_details where batch_id=#{batchId}
</delete>
<delete id="deleteById">
delete from batch_apply_details where id=#{id}
</delete>
<select id="getEffectiveTime" resultType="java.lang.String">
SELECT MAX(b.date) effectiveTime
FROM (SELECT TOP(SELECT effective_day FROM batch_apply_details WHERE id = #{ids} ) DATE
FROM emr_holiday_set
WHERE DATE > #{examineTimes} AND flag = 1) b
</select>
<select id="getBatchApplyDetails" resultType="com.emr.entity.BatchApplyDetails">
select * from batch_apply_details
<where> 1=1
<if test="batchId !=null and batchId != ''">
and batch_id=#{batchId}
</if>
<if test="inpatientNo != null and inpatientNo != ''">
and inpatient_no=#{inpatientNo}
</if>
</where>
</select>
</mapper>

@ -0,0 +1,114 @@
<?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.BatchApplyMapper">
<insert id="insertBatch">
insert into batch_apply
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="batchName != null" >
batch_name,
</if>
<if test="borrowingNum != null" >
borrowing_num,
</if>
<if test="statc != null" >
statc,
</if>
<if test="readNum != null" >
read_num,
</if>
<if test="createName != null" >
create_name,
</if>
<if test="createDate != null" >
create_date,
</if>
<if test="applyName != null" >
apply_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="batchName != null" >
#{batchName},
</if>
<if test="borrowingNum != null" >
#{borrowingNum},
</if>
<if test="statc != null" >
#{statc},
</if>
<if test="readNum != null" >
#{readNum},
</if>
<if test="createName != null" >
#{createName},
</if>
<if test="createDate != null" >
#{createDate},
</if>
<if test="applyName != null" >
#{applyName},
</if>
</trim>
</insert>
<update id="updateBatch">
update batch_apply set batch_name=#{batchName} where id=#{id}
</update>
<update id="updateBorrowingNum">
update batch_apply set borrowing_num=#{borrowingNum} where id=#{batchId}
</update>
<delete id="deleteById">
DELETE FROM batch_apply WHERE id =#{id}
</delete>
<select id="selectBatchApply" resultType="com.emr.entity.BatchApply">
select * from batch_apply
<where> 1=1
<if test="batchName != null and batchName != ''">
and batch_name=#{batchName}
</if>
<if test="createName != null and createName != ''">
AND create_name=#{createName}
</if>
<if test="startTime1 != null and startTime1 != ''">
AND create_date > #{startTime1}
</if>
<if test="endTime1 != null and endTime1 != ''">
AND create_date &lt; #{endTime1}
</if>
</where>
order by create_date DESC
</select>
<select id="getCommomVo" resultType="com.emr.vo.commomSearch.CommomVo">
select patient_id,inpatient_no,admiss_times,dis_dept,dis_date,name from commomtable
<where> 1=1
<if test="inpatientNo != null and inpatientNo != ''">
and inpatient_no=#{inpatientNo}
</if>
<if test="admissTimes != null and admissTimes != ''">
and admiss_times=#{admissTimes}
</if>
<if test="disDept != null and disDept != ''">
and dis_dept=#{disDept}
</if>
<if test="startTime != null and startTime != ''">
AND dis_date > #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND dis_date &lt; #{endTime}
</if>
</where>
</select>
<select id="getBorrowingNum" resultType="com.emr.vo.BatchApplyVo">
select borrowing_num from batch_apply where id=#{batchId}
</select>
<select id="getCommomVoByPatientIds" resultType="com.emr.vo.commomSearch.CommomVo">
select patient_id,inpatient_no,admiss_times,dis_dept,dis_date,name from commomtable
WHERE
patient_id in
<foreach item="item" collection="patientIds.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>

@ -2,65 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.emr.dao.CommomMapper">
<resultMap id="BaseResultMap" type="com.emr.vo.commomSearch.CommomVo">
<!--<result column="patient_id" property="patientId" jdbcType="VARCHAR" />
<result column="admiss_times" property="admissTimes" jdbcType="SMALLINT" />
<result column="inpatient_no" property="inpatientNo" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="admiss_id" property="admissId" jdbcType="VARCHAR" />
<result column="sex" property="sex" jdbcType="NVARCHAR" />
<result column="age" property="age" jdbcType="SMALLINT" />
<result column="age_month" property="ageMonth" jdbcType="SMALLINT" />
<result column="age_day" property="ageDay" jdbcType="SMALLINT" />
<result column="home_addr" property="homeAddr" jdbcType="NVARCHAR" />
<result column="name_cym" property="nameCym" jdbcType="CHAR" />
<result column="admiss_date" property="admissDate" jdbcType="TIMESTAMP" />
<result column="dis_date" property="disDate" jdbcType="TIMESTAMP" />
<result column="admiss_days" property="admissDays" jdbcType="INTEGER" />
<result column="dis_dept" property="disDept" jdbcType="NVARCHAR" />
<result column="is_oper" property="isOper" jdbcType="VARCHAR" />
<result column="attending" property="attending" jdbcType="VARCHAR" />
<result column="main_diag_name" property="mainDiagName" jdbcType="VARCHAR" />
<result column="main_dis_thing" property="mainDisThing" jdbcType="NVARCHAR" />
<result column="country" property="country" jdbcType="NVARCHAR" />
<result column="birth_addr" property="birthAddr" jdbcType="NVARCHAR" />
<result column="id_card" property="idCard" jdbcType="NVARCHAR" />
<result column="job" property="job" jdbcType="NVARCHAR" />
<result column="marriage" property="marriage" jdbcType="NVARCHAR" />
<result column="home_tel" property="homeTel" jdbcType="NVARCHAR" />
<result column="home_zip" property="homeZip" jdbcType="NVARCHAR" />
<result column="work_addr" property="workAddr" jdbcType="NVARCHAR" />
<result column="work_tel" property="workTel" jdbcType="NVARCHAR" />
<result column="work_zip" property="workZip" jdbcType="NVARCHAR" />
<result column="linkman" property="linkman" jdbcType="NVARCHAR" />
<result column="relation" property="relation" jdbcType="NVARCHAR" />
<result column="rel_addr" property="relAddr" jdbcType="VARCHAR" />
<result column="rel_tel" property="relTel" jdbcType="NVARCHAR" />
<result column="pay_type" property="payType" jdbcType="NVARCHAR" />
<result column="birthday" property="birthday" jdbcType="TIMESTAMP" />
<result column="avoirdupois" property="avoirdupois" jdbcType="DECIMAL" />
<result column="admiss_type" property="admissType" jdbcType="NVARCHAR" />
<result column="admiss_dept" property="admissDept" jdbcType="NVARCHAR" />
<result column="admiss_ward" property="admissWard" jdbcType="NVARCHAR" />
<result column="change_dept" property="changeDept" jdbcType="NVARCHAR" />
<result column="dis_ward" property="disWard" jdbcType="NVARCHAR" />
<result column="clinic_diag" property="clinicDiag" jdbcType="VARCHAR" />
<result column="clinic_name" property="clinicName" jdbcType="VARCHAR" />
<result column="admiss_thing" property="admissThing" jdbcType="NVARCHAR" />
<result column="medicine" property="medicine" jdbcType="VARCHAR" />
<result column="is_medicine" property="isMedicine" jdbcType="VARCHAR" />
<result column="emit_pathology" property="emitPathology" jdbcType="NVARCHAR" />
<result column="dept_director" property="deptDirector" jdbcType="VARCHAR" />
<result column="director" property="director" jdbcType="VARCHAR" />
<result column="admiss_doctor" property="admissDoctor" jdbcType="VARCHAR" />
<result column="refresher" property="refresher" jdbcType="VARCHAR" />
<result column="praxis" property="praxis" jdbcType="VARCHAR" />
<result column="coding" property="coding" jdbcType="VARCHAR" />
<result column="quality" property="quality" jdbcType="NVARCHAR" />
<result column="control" property="control" jdbcType="VARCHAR" />
<result column="nurses" property="nurses" jdbcType="VARCHAR" />
<result column="quality_date" property="qualityDate" jdbcType="TIMESTAMP" />
<result column="blood_type" property="bloodType" jdbcType="NVARCHAR" />
<result column="RH" property="rh" jdbcType="VARCHAR" />-->
</resultMap>
<!--查询树接收集合-->
<resultMap id="BaseResultMap1" type="com.emr.vo.commomSearch.CommomTree">
@ -1287,14 +1228,14 @@
</select>
<!--根据病案号查询-->
<select id="selectCommomByInpatientNo" resultMap="BaseResultMap">
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept,main_diag_name
from commomtable
where inpatient_no like '%${inpatientNo}%'
order by admiss_times desc
</select>
<!--根据病案号查询-->
<select id="selectCommomByInpatientNo2" resultMap="BaseResultMap">
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept
select patient_id,inpatient_no,name,admiss_id,admiss_times,dis_date,dis_dept,sex,id_card,main_diag_name
from commomtable
<where> 1=1
<if test="inpatientNo != null and inpatientNo != ''">
@ -1304,7 +1245,7 @@
AND id_card = #{idCard}
</if>
</where>
order by admiss_times desc
order by dis_date desc
</select>
<select id="selectMasterByInpatientNo" resultType="com.emr.vo.commomSearch.CommomVo">
SELECT

@ -0,0 +1,9 @@
<?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.PushRcvBasicMapper">
<insert id="addRcvBasic">
</insert>
</mapper>

@ -22,6 +22,22 @@
<result column="file_path" property="filePath" jdbcType="VARCHAR" />
<result column="scan_page" property="scanPage" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="ZhFyImagetMap" type="com.emr.vo.ZhFyImageVo" >
<result column="inpatient_No" property="inpatientNo" jdbcType="VARCHAR" />
<result column="admiss_times" property="admissTimes" jdbcType="VARCHAR" />
<result column="dis_date" property="disDate" jdbcType="VARCHAR" />
<collection property="picList" resultMap="PicListMap"/>
</resultMap>
<resultMap id="PicListMap" type="com.emr.vo.PicListVo">
<result column="picUrl" property="picUrl"/>
<result column="assort_id" property="assortId"/>
<result column="assort_name" property="assortName"/>
</resultMap>
<insert id="insert" parameterType="com.emr.entity.tScanAssort.T_Scan_Assort" >
insert into t_scan_assort (patient_id, assort_id, scan_page
)
@ -199,6 +215,37 @@
ORDER BY
zd_assort.assort_sort
</select>
<select id="getPathListByInpatientNo" resultMap="ZhFyImagetMap">
SELECT
rtrim(c.inpatient_no) AS inpatient_no,c.admiss_times,c.dis_date,c.file_path+'\'+t.scan_page as picUrl,t.assort_id,z.assort_name
FROM
commomtable c
LEFT JOIN t_scan_assort t on c.patient_id=t.patient_id
LEFT JOIN zd_assort z on z.assort_id=t.assort_id
WHERE
inpatient_no = #{inpatientNo}
AND admiss_times =#{admissTimes}
ORDER BY z.assort_sort
</select>
<select id="getPathListByDisDate" resultMap="ZhFyImagetMap">
SELECT
rtrim(c.inpatient_no) AS inpatient_no,c.admiss_times,c.dis_date,c.file_path+'\'+t.scan_page as picUrl,t.assort_id,z.assort_name
FROM
commomtable c
LEFT JOIN t_scan_assort t on c.patient_id=t.patient_id
LEFT JOIN zd_assort z on z.assort_id=t.assort_id
<where> 1=1
<if test="startTime != null and startTime != ''">
AND dis_date > #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND dis_date &lt; #{endTime}
</if>
</where>
ORDER BY z.assort_sort
</select>
<!--修改图片集合为未删除-->
<update id="recoverPic">
update t_scan_assort set is_del = 0 where patient_id = #{patientId}

@ -0,0 +1,235 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>批量申请借阅</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<![endif]-->
<script>
var path = "${path}";
</script>
<style type="text/css">
.mainDiv {
background-color: #fff;
}
.modal-header2 {
height: 30px;
text-align: center !important;
vertical-align: middle !important;
background-color: #3c8dbc !important;
color: #fff;
font-size: 16px;
font-weight: bold;
padding: 5px 5px 5px 5px !important;
}
/**搜索区*/
.searchDiv {
padding-top: 1%;
height: 30px;
}
.searchDiv1 {
padding-top: 2%;
height: 30px;
}
.tableDiv {
width: 100%;
background-color: #fff;
margin-left: 1%;
}
.dateSearchDiv {
width: 29%;
}
.dateSearchInput {
width: 30%;
margin-left: 3%;
}
.dateLabelDiv {
width: 30%;
text-align: right;
}
.searchInput {
width: 22%;
}
.searchElement {
width: 40%;
}
.searchInputElement {
width: 60%;
text-align: right;
}
.labelDiv {
padding-top: 4%;
margin-left: 2%;
}
/**查询按钮组*/
.btnsDiv {
height: 5%;
}
.btn {
margin-right: 5px;
margin-left: 10px;
}
/**批准驳回按钮组*/
.approveBtns {
margin-left: 110px;
}
/*模态框头*/
.modal-header {
background-color: #199ED8;
text-align: center;
}
</style>
</head>
<body>
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
批量申请借阅
</span>
</div>
</div>
<div class="mainDiv">
<!--搜索区-->
<div class="searchDiv">
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">批次名称:</label>
</div>
<div class="searchInputElement left">
<input type="test" class="form-control input-sm" id="batchName" maxlength="16">
</div>
</div>
<c:if test="${createNameFlag == '0'}">
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">创建人:</label>
</div>
<div class="searchInputElement left">
<input type="test" class="form-control input-sm" id="createName" maxlength="16">
</div>
</div>
</c:if>
<div class="dateSearchDiv left">
<div class="dateLabelDiv left">
<label class="labelDiv">创建日期:</label>
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="startTime1" placeholder="开始时间"
autocomplete="off">
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="endTime1" placeholder="结束时间"
autocomplete="off">
</div>
</div>
<div class="btnsDiv">
<button type="button" class="btn btn-sm btn-primary" onclick="refreshTable()">查询</button>
<button type="button" class="btn btn-sm btn-primary" onclick="empty()">清空</button>
<button class="btn btn-sm btn-warning btns" data-toggle="modal" data-target="#myModal">新增批次</button>
</div>
</div>
<div id="tableDiv" class="table-responsive tableDiv">
<table id="mytab" class="table text-nowrap table-bordered">
</table>
</div>
</div>
</div>
<%--新增批次弹窗--%>
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<font size="30">&times;</font>
</button>
<h4 class="modal-title" style="font-weight: bold">
新增批次
</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="batchName" class="col-form-label">批次名称:</label>
<input type="text" autofocus class="form-control" id="batchNotes">
</div>
<div class="form-group">
<label for="batchName" class="col-form-label">申请人工号:</label>
<input type="text" autofocus class="form-control" id="applyName">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" onclick="insertBatch()">确定</button>
</div>
</div>
</div>
</div>
<%--修改批次弹窗--%>
<div class="modal fade" id="myModal1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<font size="30">&times;</font>
</button>
<h4 class="modal-title" style="font-weight: bold">
修改批次
</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="batchName" class="col-form-label">批次名称:</label>
<input type="text" autofocus class="form-control" id="updateId" style="display: none" >
<input type="text" autofocus class="form-control" id="updateBatchName" >
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary" onclick="saveBatch()">确定</button>
</div>
</div>
</div>
</div>
<script src="${path}/static/js/batchApply/batchApply.js?t=2021-08-20"></script>
<script src="${path}/static/js/commom.js"></script>
<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script src="${path}/static/js/dateUtil.js"></script>
</body>
</html>

@ -0,0 +1,336 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>借阅详情</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv=X-UA-Compatible IE=EmulateIE7>
<!--[if lt IE 9]>
<script type="text/javascript" src="${path}/static/js/html5shiv.min.js"></script>
<script type="text/javascript" src="${path}/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="${path}/static/js/respond.min.js"></script>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.css" type="text/css">
<link href="${path}/static/bootstrap-3.3.7/bower_components/select2/dist/css/select2.min.css" rel="stylesheet"/>
<script type="text/javascript"
src="${path}/static/bootstrap-3.3.7/bootstrap-table-fixed-columns.js?time=2019-12-25"></script>
<script type="text/javascript" src="${path}/static/js/pinying.js"></script>
<script src="${path}/static/bootstrap-3.3.7/bower_components/select2/dist/js/select2.min.js"></script>
<![endif]-->
<script>
var path = "${path}";
</script>
<style type="text/css">
.mainDiv {
background-color: #fff;
}
/**搜索区*/
.searchDiv {
padding-top: 1%;
height: 30px;
}
.searchDiv1 {
padding-top: 2%;
height: 30px;
}
.tableDiv {
width: 100%;
background-color: #fff;
margin-left: 1%;
}
.dateSearchDiv {
width: 29%;
}
.dateSearchInput {
width: 30%;
margin-left: 3%;
}
.dateLabelDiv {
width: 30%;
text-align: right;
}
.searchInput {
width: 22%;
}
.searchElement {
width: 40%;
}
.searchInputElement {
width: 60%;
text-align: right;
}
.labelDiv {
padding-top: 4%;
margin-left: 2%;
}
/**查询按钮组*/
.btnsDiv {
height: 5%;
}
.btn {
margin-right: 5px;
margin-left: 10px;
}
</style>
</head>
<body>
<input type="hidden" id="checks">
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
借阅详情
</span>
</div>
</div>
<div class="mainDiv">
<!--搜索区-->
<div class="searchDiv">
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">病案号:</label>
</div>
<div class="searchInputElement left">
<input type="test" class="form-control input-sm" id="inpatientNo" maxlength="16">
</div>
</div>
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">住院次数:</label>
</div>
<div class="searchInputElement left">
<input type="test" class="form-control input-sm" id="admissTimes" maxlength="16">
</div>
</div>
<div class="dateSearchDiv left">
<div class="dateLabelDiv left">
<label class="labelDiv">出院日期:</label>
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="startTime1" placeholder="开始时间"
autocomplete="off">
</div>
<div class="dateSearchInput left">
<input type="text" class="form-control input-sm" id="endTime1" placeholder="结束时间"
autocomplete="off">
</div>
</div>
<div class="btnsDiv">
<button type="button" class="btn btn-sm btn-primary" onclick="refreshTable()">查询</button>
<button type="button" class="btn btn-sm btn-primary" onclick="empty()">清空</button>
<button class="btn btn-sm btn-warning btns" id="borrowings" data-toggle="modal" data-target="#borrowingModal" onclick="addApprovesMore()">批量添加</button>
</div>
</div>
<div class="searchDiv1">
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">出院科室:</label>
</div>
<div class="searchInputElement left">
<select class="form-control input-sm" id="dis_dept">
</select>
</div>
</div>
</div>
<div id="tableDiv" class="table-responsive tableDiv">
<table id="mytab" class="table text-nowrap table-bordered">
</table>
</div>
</div>
</div>
<!-- 模态框1Modal借阅申请 -->
<div class="modal fade" id="borrowingModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<font size="30">&times;</font>
</button>
<h4 class="modal-title" style="font-weight: bold">
申请信息
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请天数:</label>
<div class="col-sm-7">
<input type="number" class="form-control input-sm input" id="effeDays"
name="effeDays">
</div>
<div class="col-sm-1"></div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请类型:</label>
<div class="col-sm-7">
<input type="text" class="form-control input-sm input" id="applyFlag"
name="applyFlag" ovalue="1" placeholder="借阅申请" readonly="readonly">
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-4 control-label">申请理由:</label>
<div class="col-sm-7">
<textarea class="form-control input-sm input" id="applyReason" name="applyReason"
maxlength="250"></textarea>
</div>
<div class="col-sm-1"></div>
</div>
</div>
</form>
<div id="tabDiv" style="height: 490px;overflow: auto;">
<table id="moreApproveTable" class="table table-striped" bgcolor="#FFFAFA" border="0" cellspacing="0" cellpadding="0">
<caption>所选批量申请借阅信息</caption>
<thead>
<tr>
<th>病案号</th>
<th>姓名</th>
<th>住院次数</th>
<th>出院科室</th>
</tr>
</thead>
<tbody id="moreApproveBody">
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button>
<button type="button" class="btn btn-sm btn-primary" onclick="add()">
确认提交
</button>
</div>
</div>
</div>
</div>
<!--申请借阅列表-->
<%--<div class="main">--%>
<%-- <div class="headDiv">--%>
<%-- <div class="headSpanDiv">--%>
<%-- <span class="headspan">--%>
<%-- 申请借阅列表--%>
<%-- </span>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="mainDiv">--%>
<%-- --%>
<%-- <div id="borrowingDiv" class="table-responsive tableDiv">--%>
<%-- <table id="borrowingTab" class="table text-nowrap table-bordered">--%>
<%-- </table>--%>
<%-- </div>--%>
<%-- </div>--%>
<%--</div>--%>
<div class="main">
<div class="headDiv">
<div class="headSpanDiv">
<span class="headspan">
申请借阅列表
</span>
</div>
</div>
<div class="mainDiv">
<!--搜索区-->
<div class="searchDiv">
<div class="searchInput left" style="margin-left: 10px;">
<div class="searchElement left">
<label class="labelDiv">病案号:</label>
</div>
<div class="searchInputElement left">
<input type="test" class="form-control input-sm" id="inpatientNo1" maxlength="16">
</div>
</div>
<!--操作区-->
<div class="btnsDiv">
<button type="button" class="btn btn-sm btn-primary" onclick="refreshBorrowingTab()">查询</button>
<button type="button" class="btn btn-sm btn-primary" onclick="borrowingEmpty()">清空</button>
<button class="btn btn-sm btn-warning btns" id="addApprove" data-toggle="modal" data-target="#approveModal" onclick="batchApprove()">批量审核</button>
</div>
</div>
<div id="borrowingDiv" class="table-responsive tableDiv">
<table id="borrowingTab" class="table text-nowrap table-bordered">
</table>
</div>
</div>
</div>
<!-- 模态框2Modal批量审核申请 -->
<div class="modal fade" id="approveModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<font size="30">&times;</font>
</button>
<h4 class="modal-title" style="font-weight: bold">
审核信息
</h4>
</div>
<div class="modal-body">
<div id="approveTabDiv" style="height: 490px;overflow: auto;">
<table id="approveTable" class="table table-striped" bgcolor="#FFFAFA" border="0" cellspacing="0" cellpadding="0">
<caption>所选批量审核信息</caption>
<thead>
<tr>
<th>病案号</th>
<th>姓名</th>
<th>住院次数</th>
<th>申请天数</th>
</tr>
</thead>
<tbody id="approveBody">
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button>
<button type="button" class="btn btn-sm btn-primary" onclick="addApprove()">
确认提交
</button>
</div>
</div>
</div>
</div>
<script src="${path}/static/js/batchApply/batchApplyDetails.js?t=2021-08-20"></script>
<script src="${path}/static/js/commom.js"></script>
<script src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script src="${path}/static/js/dateUtil.js"></script>
</body>
</html>

@ -279,19 +279,12 @@
<div class="form-group">
<div class="col-sm-4 labelDiv">
<label class="control-label">病案号:</label>
<%-- <span--%>
<%-- class="glyphicon glyphicon-question-sign" rel="drevil"--%>
<%-- data-container="body" data-toggle="popover" data-placement="bottom"--%>
<%-- data-content="精准查询病案号要求8位">--%>
<%-- </span>--%>
</div>
<%-- <div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no"
onkeyup="getInpatientNoContents('inpatient_no')"
onfocus="getInpatientNoContents('inpatient_no')"
onblur="clearContent('inpatient_no')">
<div id="inpatient_noDiv" style="position: absolute;z-index: 2000">
<table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0">
<tbody id="inpatient_noContent"></tbody>
</table>
</div>
</div>--%>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no"
maxlength="16">
@ -720,7 +713,7 @@
<label class="col-sm-4 control-label">申请天数:</label>
<div class="col-sm-7">
<input type="number" class="form-control input-sm input" id="effeDays"
name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)" >
name="effeDays" oninput="if(value.length>3)value=value.slice(0,3)">
</div>
<div class="col-sm-1"></div>
</div>
@ -751,9 +744,9 @@
<button type="button" class="btn btn-sm btn-default" data-dismiss="modal">
关闭
</button>
<%-- <button type="button" class="btn btn-sm btn-primary" onclick="save()">--%>
<%-- 暂时保存--%>
<%-- </button>--%>
<%-- <button type="button" class="btn btn-sm btn-primary" onclick="save()">--%>
<%-- 暂时保存--%>
<%-- </button>--%>
<button type="button" class="btn btn-sm btn-primary" onclick="add()">
确认提交
</button>
@ -868,8 +861,10 @@
$(".modal-dialog").draggable();//为模态对话框添加拖拽
})
</script>
<script type="text/javascript" src="${path}/static/js/recordManage/templateSearch/searchCommomMethodqf.js?time=2021-11-28"></script>
<script type="text/javascript" src="${path}/static/js/recordManage/commomSearch/commomListqf.js?time=2022-02-21_1"></script>
<script type="text/javascript"
src="${path}/static/js/recordManage/templateSearch/searchCommomMethodqf.js?time=2021-11-28"></script>
<script type="text/javascript"
src="${path}/static/js/recordManage/commomSearch/commomListqf.js?time=2022-02-21_1"></script>
<script type="text/javascript" src="${path}/static/js/dateUtil.js"></script>
<script type="text/javascript" src="${path}/static/js/approveManage/approveList/approveDateCommmomMethod.js"></script>
<script type="text/javascript" src="${path}/static/js/commom.js"></script>

@ -91,11 +91,11 @@
<button type="button" class="btn btn-sm btn-primary" onclick="onloadJpgForPdf()">下载PDF</button>
</div>
</c:if>
<c:if test="${CURRENT_USER.userEmail == '1' || isDownload == '1'}">
<div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" onclick="printCurrent()">打印当前页</button>
</div>
</c:if>
<%-- <c:if test="${CURRENT_USER.userEmail == '1' || isDownload == '1'}">--%>
<%-- <div class="col-sm-2">--%>
<%-- <button type="button" class="btn btn-sm btn-primary" onclick="printCurrent()">打印当前页</button>--%>
<%-- </div>--%>
<%-- </c:if>--%>
<c:if test="${moveFlag == '1'}">
<div class="col-sm-2">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal1">移动PDF

@ -763,7 +763,6 @@
$(this).data(visibleColumns[$(this).data('field')]);
});
this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) {
debugger
if (that.options.sortable && $(this).parent().data().sortable) {
that.onSort(event);
}

@ -0,0 +1,260 @@
$('#mytab').bootstrapTable({
height: $(window).height,
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText: '上一页',
paginationNextText: '下一页',
fixedColumns: true,
fixedNumber: 4,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 5, //每页的记录行数(*
pageList: [5, 10, 15, 20, 30, 50],//可供选择的每页的行数(*
height: $(window).height() -134, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns: [
{
title: '全选',
field: 'select',
checkbox: true,
width: 25,
align: 'center',
valign: 'middle'
},
{
field: 'no',
title: '序号',
sortable: true,
formatter: function (value, row, index) {
//获取每页显示的数量
var pageSize = $('#mytab').bootstrapTable('getOptions').pageSize;
//获取当前是第几页
var pageNumber = $('#mytab').bootstrapTable('getOptions').pageNumber;
//返回序号注意index是从0开始的所以要加上1
return pageSize * (pageNumber - 1) + index + 1;
}
},
{
title: '批次名称',
field: 'batchName',
},
{
title: '借阅数量',
field: 'borrowingNum',
},
{
title: '审批状态',
field: 'statc',
formatter: function (value, row, index) {
var spanValue;
if (value == 1) {
spanValue = '<p style="color:green">已审批</p>';
} else if (value == 0) {
spanValue = '<p style="color:red">未审批</p>';
} else if (value == 2) {
spanValue = '<p style="color:orange">审批中</p>';
}
return spanValue;
}
},
{
title: '已审批数量',
field: 'readNum',
},
{
title: '申请人工号',
field: 'applyName',
},
{
title: '创建人',
field: 'createName',
},
{
title: '创建时间',
field: 'createDate',
formatter: crtTimeFtt
},
{
title: '操作',
formatter: function (value, row, index) {
var id = row.id;
var applyName = row.applyName;
var editanddrop = '';
editanddrop += '<a type="button" href="' + path + '/applyDetails/batchApplyDetails?batchId='+id+'&applyName='+applyName+'" class="btn btn-danger TableView btn-sm" target="_blank">查看详情</a>';
editanddrop += '<button class="btn btn-sm btn-warning btns" onclick="updateBatch('+id+')" data-toggle="modal" data-target="#myModal1">修改批次</button>';
editanddrop += '&nbsp&nbsp&nbsp<button type="button" onclick="deleteById('+row.id+')" class="btn btn-sm btn-danger">删除</button>';
return editanddrop;
}
}
],
locale: 'zh-CN',//中文支持,
url: path + '/batchApply/selectBatchApply',//排序方式
queryParams: function (params) {
return {
limit: params.limit, // 每页显示数量
offset: params.offset, // SQL语句起始索引
page: (params.offset / params.limit) + 1, //当前页码,
applyer: $("#applyerSearch").val(),
startTime1: $("#startTime1").val(),
endTime1: $("#endTime1").val(),
batchName: $("#batchName").val(),
createName: $("#createName").val()
}
},
responseHandler: function (res) {
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total: res.total, rows: res.list});
return nres[0];
},
onLoadSuccess: function () {
$(".page-list").show();
$(".fixed-table-body").css("overflow", "auto");
},
//监听分页点击事件
onPageChange: function (num, type) {
pageNumber = num;
},
//选中单个复选框
onCheck: function (row) {
var checks = $("#checks").val();
$("#checks").val(checks += "'" + row.id + "',");
},
//取消单个复选框
onUncheck: function (row) {
var checks = $("#checks").val();
checks = checks.replace("'" + row.id + "',", "");
$("#checks").val(checks);
},
//全选
onCheckAll: function (rows) {
$("#checks").val("");
var checks = '';
for (var i = 0; i < rows.length; i++) {
checks += "'" + rows[i].id + "',"
}
$("#checks").val(checks);
},
//全不选
onUncheckAll: function (rows) {
$("#checks").val("");
}
})
function crtTimeFtt(val) {
if (val != null) {
var date = new Date(val);
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
}
}
//删除分配
function deleteById(id){
Common.confirm({
title: "提示",
message: "请确认是否删除此批次?",
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + '/batchApply/deleteById/',
data:{id:id},
dataType: 'json',
success: function (data) {
console
if (data == 1) {
toastr.success("删除成功!");
refreshTable();
$('#mytab').bootstrapTable('selectPage', pageNumber);
} else {
toastr.warning("删除失败");
}
}
})
}
}
})
}
//修改批次给隐藏的id赋值
function updateBatch(id){
$("#updateId").val(id);
}
//修改批次
function saveBatch(){
var batchName = $("#updateBatchName").val();
var updateId = $("#updateId").val();
if (batchName == '') {
return toastr.warning("批次名称不能为空!");
}
$.ajax({
type:'post',
url:path+'/batchApply/updateBatch',
data:{id:updateId,batchName:batchName},
dataType:'json',
success:function(data){
if (data==0){
return toastr.warning("修改批次失败!");
}
if (data==1){
toastr.success("修改批次成功!");
$('#myModal1').modal('hide');
reLoadTable();
}
}
})
}
//查询按钮
function refreshTable() {
$("#checks").val("");
$('#mytab').bootstrapTable('refresh', {
url: path + '/batchApply/selectBatchApply',//排序方式
})
}
function empty() {
$(":input").val("")
refreshTable();
}
//新增批次
function insertBatch() {
var batchName = $("#batchNotes").val();
var applyName = $("#applyName").val();
if (batchName == '') {
return toastr.warning("批次名称不能为空!");
}
if (applyName == '') {
return toastr.warning("申请人工号不能为空!");
}
$.ajax({
type:'post',
url:path+'/batchApply/insertBatch',
data:{batchName:batchName,applyName:applyName},
dataType:'json',
success:function(data){
if (data==0){
return toastr.warning("新增批次失败!");
}
if (data==1){
toastr.success("新增批次成功!");
$('#myModal').modal('hide');
reLoadTable();
}
}
})
}
function reLoadTable(){
$("#batchNotes").val("");
$("#mytab").bootstrapTable('refresh',path + '/batchApply/selectBatchApply');//排序方式
}
$(function () {
initDateInput(1);
initDateInput(2);
})

@ -0,0 +1,735 @@
//------------------------------------------查询结果---------------------------------------------------------
let bomIds = []
$('#mytab').bootstrapTable({
height: $(window).height,
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
checkboxHeader: true,
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText: '上一页',
paginationNextText: '下一页',
fixedColumns: true,
uniqueId: "patientId",
fixedNumber: 4,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 20, //每页的记录行数(*
pageList: [5, 10, 15, 20, 30, 50],//可供选择的每页的行数(*
height: 300, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns: [
{
width: 25,
title: '全选',
field: 'check',
checkbox: true,
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
if (bomIds.indexOf(row['patientId']) >= 0) {
return {checked: true};
}
}
},
{
field: 'no',
title: '序号',
sortable: true,
formatter: function (value, row, index) {
//获取每页显示的数量
var pageSize = $('#mytab').bootstrapTable('getOptions').pageSize;
//获取当前是第几页
var pageNumber = $('#mytab').bootstrapTable('getOptions').pageNumber;
//返回序号注意index是从0开始的所以要加上1
return pageSize * (pageNumber - 1) + index + 1;
}
},
{
title: '住院号',
field: 'inpatientNo',
},
{
title: '住院次数',
field: 'admissTimes',
},
{
title: '出院科室',
field: 'disDept',
},
{
title: '出院时间',
field: 'disDate',
formatter: crtTimeFtt
}
],
locale: 'zh-CN',//中文支持,
url: path + '/applyDetails/getCommomVo',//排序方式
queryParams: function (params) {
return {
limit: params.limit, // 每页显示数量
offset: params.offset, // SQL语句起始索引
page: (params.offset / params.limit) + 1, //当前页码,
inpatientNo: $("#inpatientNo").val(),
startTime: $("#startTime1").val(),
endTime: $("#endTime1").val(),
admissTimes: $("#admissTimes").val(),
disDept: $("#dis_dept").val(),
batchId: getUrlParam('batchId'),
applyName: getUrlParam('applyName')
}
},
responseHandler: function (res) {
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total: res.total, rows: res.list});
return nres[0];
},
onLoadSuccess: function () {
$(".page-list").show();
$(".fixed-table-body").css("overflow", "auto");
},
//监听分页点击事件
onPageChange: function (num, type) {
pageNumber = num;
},
//选中单个复选框
onCheck: function (row) {
bomIds.push(row.patientId)
var checks = $("#checks").val();
$("#checks").val(checks += "'" + row.id + "',");
},
//取消单个复选框
onUncheck: function (row) {
const findIndex = bomIds.findIndex(rowIndex => rowIndex == row.patientId)
if (findIndex != -1) {
bomIds.splice(findIndex, 1)
}
var checks = $("#checks").val();
checks = checks.replace("'" + row.id + "',", "");
$("#checks").val(checks);
},
//全选
onCheckAll: function (rows) {
bomIds = rows.map(rowData => rowData.patientId)
$("#checks").val("");
var checks = '';
for (var i = 0; i < rows.length; i++) {
checks += "'" + rows[i].id + "',"
}
$("#checks").val(checks);
},
//全不选
onUncheckAll: function (rows) {
bomIds = []
$("#checks").val("");
}
})
function crtTimeFtt(val) {
if (val != null) {
var date = new Date(val);
return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
}
}
//键盘回车查询
$(document).keyup(function(event){
if(event.keyCode ==13){
refreshTable();
}
});
//查询按钮
function refreshTable() {
$("#checks").val("");
$('#mytab').bootstrapTable('refresh', {
url: path + '/applyDetails/getCommomVo',
})
var inpatientNo = $("#inpatientNo").val();
var startTime= $("#startTime1").val();
var endTime= $("#endTime1").val();
var admissTimes= $("#admissTimes").val();
var disDept= $("#dis_dept").val();
var batchId=getUrlParam('batchId');
var applyName=getUrlParam('applyName')
$.ajax({
type:'post',
url:path+'/applyDetails/getCommomVo',
data:{inpatientNo:inpatientNo,startTime:startTime,endTime:endTime,admissTimes:admissTimes,disDept:disDept,batchId:batchId,refreshTable:1,applyName:applyName},
dataType:'json',
success:function(data){
if (data.size==1){
reLoadBorrowingTab();
toastr.success("当前查询只有一条记录已自动帮你添加到批次中!");
}
}
})
}
function empty() {
$(":input").val("")
refreshTable();
}
$(function () {
initDateInput(1);
initDateInput(2);
})
//加载科室
loadDept();
//加载科室
function loadDept() {
$.ajax({
type: 'get',
url: path + '/commom/getDept',
dataType: 'json',
success: function (data) {
if (null != data) {
$("#dis_dept").empty();
var html = '<option value="">全部</option>';
for (var i = 0; i < data.length; i++) {
if (data[i].name != '') {
var name = data[i].name;
var code = data[i].code;
html += '<option data-tokens="' + name + '|' + '|' + name + '" value="' + code + '">' + name + '</option>';
}
}
$("#dis_dept").append(html);
}
}
})
}
//批量添加
function addApprovesMore() {
//先清除上次数据
clearContent();
//批量添加选择信息
tabChecks = getChecked();
}
//保存批量申请
function add() {
var effeDays = $("#effeDays").val();
var applyReason = $("#applyReason").val();
var applyName = $("#applyName").val();
var patientIds = bomIds.join();
var batchId = getUrlParam('batchId');
var applyName = getUrlParam('applyName')
if (bomIds.length == 0) {
return toastr.warning("至少选择一条以上");
}
if (effeDays == "") {
return toastr.warning("申请天数不能为空");
}
if (applyReason == "") {
return toastr.warning("申请理由不能为空");
}
$.ajax({
type: 'post',
url: path + '/applyDetails/addBatchBorrowing',
data: {
effectiveDay: effeDays,
applyReason: applyReason,
applyName: applyName,
applyFlag: 1,
patientIds: patientIds,
batchId: batchId
},
dataType: 'json',
success: function (data) {
console.log(data.code)
if (data.code == 200) {
return toastr.warning("批量借阅申请失败!");
}
if (data.code == 100) {
toastr.success("批量借阅申请成功!");
$('#borrowingModal').modal('hide');
//刷新申请借阅列表
reLoadBorrowingTab();
}
}
})
}
//获取选中行信息
function getChecked() {
tabChecks = "";
var inpatientNoArray = new Array();
var admissTimesArray = new Array();
var nameArray = new Array();
var disDeptArray = new Array();
var idlist = $('#mytab').bootstrapTable('getAllSelections');
if (idlist.length > 0) {
for (var i = 0; i < idlist.length; i++) {
tabChecks += idlist[i].id + ",";
inpatientNoArray.push(idlist[i].inpatientNo);
admissTimesArray.push(idlist[i].admissTimes);
nameArray.push(idlist[i].name);
disDeptArray.push(idlist[i].disDept);
}
$("#checks").val(checks);
}
insertContent(inpatientNoArray, admissTimesArray, nameArray, disDeptArray);
if (null != tabChecks) {
tabChecks = tabChecks.substring(0, tabChecks.length - 1);
}
return tabChecks;
}
//添加内容tr td
function insertContent(inpatientNoArray, admissTimesArray, nameArray, disDeptArray) {
for (var i = 0; i < inpatientNoArray.length; i++) {
var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td");
var td3 = document.createElement("td");
var td4 = document.createElement("td");
td1.innerHTML = inpatientNoArray[i];
td2.innerHTML = nameArray[i];
td3.innerHTML = admissTimesArray[i];
td4.innerHTML = disDeptArray[i];
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
tr.appendChild(td4);
document.getElementById("moreApproveBody").appendChild(tr);
}
}
//清楚内容方法
function clearContent() {
$('#addApprovesMore').removeAttr("data-target", "#borrowingModal");
var table = document.getElementById("moreApproveBody");
var len = table.childNodes.length;
for (var i = len - 1; i >= 0; i--) {
table.removeChild(table.childNodes[i]);
}
}
//------------------------------------------申请借阅列表---------------------------------------------------------
borrowingTab()
let borrowingIds = []
function borrowingTab() {
$('#borrowingTab').bootstrapTable({
height: $(window).height,
toolbar: '#toolbar', //工具按钮用哪个容器
striped: true, //是否显示行间隔色
cache: false, //是否使用缓存默认为true所以一般情况下需要设置一下这个属性*
pagination: true, //是否显示分页(*
sidePagination: "server", //分页方式client客户端分页server服务端分页*
paginationPreText: '上一页',
paginationNextText: '下一页',
fixedColumns: true,
fixedNumber: 4,
pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 20, //每页的记录行数(*
pageList: [5, 10, 15, 20, 30, 50],//可供选择的每页的行数(*
height: 350, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns: [
{
title: '全选',
field: 'select',
checkbox: true,
width: 25,
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
if (borrowingIds.indexOf(row['id']) >= 0) {
return {checked: true};
}
var applyStatc = row.applyStatc;
if (applyStatc == 1 || applyStatc == 4 || applyStatc === 3) {
return { disabled : true}
}
}
},
{
field: 'no',
title: '序号',
sortable: true,
formatter: function (value, row, index) {
//获取每页显示的数量
var pageSize = $('#borrowingTab').bootstrapTable('getOptions').pageSize;
//获取当前是第几页
var pageNumber = $('#borrowingTab').bootstrapTable('getOptions').pageNumber;
//返回序号注意index是从0开始的所以要加上1
return pageSize * (pageNumber - 1) + index + 1;
}
},
{
title: '申请日期',
field: 'applyTime',
formatter: crtTimeFtt
},
{
title: '申请天数',
field: 'effectiveDay',
},
{
title: '有效日期',
field: 'effectiveTime',
formatter: crtTimeFtt
},
{
title: '病案号',
field: 'inpatientNo',
},
{
title: '住院次数',
field: 'admissTimes',
},
{
title: '患者姓名',
field: 'patientName',
},
{
title: '出院日期',
field: 'disTime',
formatter: crtTimeFtt
},
{
title: '申请理由',
field: 'applyReason',
},
{
title: '申请类型',
field: 'applyFlag',
formatter: function (value, row, index) {
var spanValue;
if (value == 1) {
spanValue = '<p style="color:#0d6aad">借阅申请</p>';
} else if (value == 2) {
spanValue = '<p style="color:green">纸质申请</p>';
}
return spanValue;
}
},
{
title: '申请状态',
field: 'applyStatc',
formatter: function (value, row, index) {
var spanValue;
if (value == 1) {
spanValue = '<p style="color:green">已通过</p>';
} else if (value == 2) {
spanValue = '<p style="color:orange">申请中</p>';
} else if (value == 3) {
spanValue = '<p style="color:red">驳回</p>';
}else if (value == 4) {
spanValue = '<p style="color:royalblue">已过期</p>';
}
return spanValue;
}
},
{
title: '经办人',
field: 'handlingName',
},
{
title: '审批人姓名',
field: 'examineName',
},
{
title: '审批时间',
field: 'examineTime',
formatter: crtTimeFtt
},
{
title: '操作',
formatter: function (value, row, index) {
var applyStatc = row.applyStatc;
var editanddrop = '';
if (applyStatc != 1 && applyStatc != 4&& applyStatc != 3) {
editanddrop += '&nbsp&nbsp&nbsp<button type="button" onclick="approveById(' + row.id +',' + row.effectiveDay +')" class="btn btn-sm btn-danger">借阅审批</button>';
}
editanddrop += '&nbsp&nbsp&nbsp<button type="button" onclick="deleteById(' + row.id + ')" class="btn btn-sm btn-danger">删除</button>';
if (applyStatc != 3 && applyStatc != 4) {
editanddrop += '&nbsp&nbsp&nbsp<button type="button" onclick="rejectById(' + row.id + ')" class="btn btn-sm btn-danger">驳回</button>';
}
return editanddrop;
}
}
],
locale: 'zh-CN',//中文支持,
url: path + '/applyDetails/getBatchApplyDetails',//排序方式
queryParams: function (params) {
return {
limit: params.limit, // 每页显示数量
offset: params.offset, // SQL语句起始索引
page: (params.offset / params.limit) + 1, //当前页码,
batchId: getUrlParam('batchId'),
inpatientNo: $("#inpatientNo1").val(),
}
},
responseHandler: function (res) {
//在ajax获取到数据渲染表格之前修改数据源
var nres = [];
nres.push({total: res.total, rows: res.list});
return nres[0];
},
onLoadSuccess: function () {
$(".page-list").show();
$(".fixed-table-body").css("overflow", "auto");
},
//监听分页点击事件
onPageChange: function (num, type) {
pageNumber = num;
},
//选中单个复选框
onCheck: function (row) {
borrowingIds.push(row.id)
var checks = $("#checks").val();
$("#checks").val(checks += "'" + row.id + "',");
},
//取消单个复选框
onUncheck: function (row) {
const findIndex = borrowingIds.findIndex(rowIndex => rowIndex == row.id)
if (findIndex != -1) {
borrowingIds.splice(findIndex, 1)
}
var checks = $("#checks").val();
checks = checks.replace("'" + row.id + "',", "");
$("#checks").val(checks);
},
//全选
onCheckAll: function (rows) {
borrowingIds = rows.map(rowData => rowData.id)
$("#checks").val("");
var checks = '';
for (var i = 0; i < rows.length; i++) {
checks += "'" + rows[i].id + "',"
}
$("#checks").val(checks);
},
//全不选
onUncheckAll: function (rows) {
borrowingIds = []
$("#checks").val("");
}
})
}
//截取路径后参数
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数
if (r != null) return unescape(r[2]);
return null; //返回参数值
}
//删除分配
function deleteById(id) {
Common.confirm({
title: "提示",
message: "请确认是否删除此申请?",
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + '/applyDetails/deleteById',
data: {id: id,batchId: getUrlParam('batchId'),},
dataType: 'json',
success: function (data) {
console
if (data == 1) {
toastr.success("删除成功!");
reLoadBorrowingTab();
$('#mytab').bootstrapTable('selectPage', pageNumber);
} else {
toastr.warning("删除失败");
}
}
})
}
}
})
}
//借阅审批
function approveById(id,effectiveDay) {
console.log(id,effectiveDay)
Common.confirm({
title: "提示",
message: "请确认是否通过此申请?",
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + '/applyDetails/agreeById/',
data: {ids: id,effectiveDay:effectiveDay},
dataType: 'json',
success: function (data) {
console
if (data == 1) {
toastr.success("通过成功!");
reLoadBorrowingTab();
$('#mytab').bootstrapTable('selectPage', pageNumber);
} else {
toastr.warning("通过失败");
}
}
})
}
}
})
}
//批量审核
function batchApprove() {
//先清除上次数据
clearContentApprove();
//批量添加选择信息
tabChecks = getApproveChecked();
}
//获取申请借阅列表选中行信息
function getApproveChecked() {
tabChecks = "";
var inpatientNoArray = new Array();
var admissTimesArray = new Array();
var nameArray = new Array();
var effectiveDayArray = new Array();
var idlist = $('#borrowingTab').bootstrapTable('getAllSelections');
if (idlist.length > 0) {
for (var i = 0; i < idlist.length; i++) {
tabChecks += idlist[i].id + ",";
inpatientNoArray.push(idlist[i].inpatientNo);
admissTimesArray.push(idlist[i].admissTimes);
nameArray.push(idlist[i].patientName);
effectiveDayArray.push(idlist[i].effectiveDay);
}
$("#checks").val(checks);
}
insertApproveContent(inpatientNoArray, admissTimesArray, nameArray,effectiveDayArray);
if (null != tabChecks) {
tabChecks = tabChecks.substring(0, tabChecks.length - 1);
}
return tabChecks;
}
//添加内容tr td
function insertApproveContent(inpatientNoArray, admissTimesArray, nameArray,effectiveDayArray) {
for (var i = 0; i < inpatientNoArray.length; i++) {
var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td");
var td3 = document.createElement("td");
var td5 = document.createElement("td");
td1.innerHTML = inpatientNoArray[i];
td2.innerHTML = nameArray[i];
td3.innerHTML = admissTimesArray[i];
td5.innerHTML = effectiveDayArray[i];
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
tr.appendChild(td5);
document.getElementById("approveBody").appendChild(tr);
}
}
//清楚内容方法
function clearContentApprove() {
$('#batchApprove').removeAttr("data-target", "#approveModal");
var table = document.getElementById("approveBody");
var len = table.childNodes.length;
for (var i = len - 1; i >= 0; i--) {
table.removeChild(table.childNodes[i]);
}
}
//驳回
function rejectById(id) {
Common.confirm({
title: "提示",
message: "请确认是否驳回此申请?",
operate: function (reselt) {
if (reselt) {
$.ajax({
type: 'post',
url: path + '/applyDetails/rejectById/',
data: {id: id},
dataType: 'json',
success: function (data) {
console
if (data == 1) {
toastr.success("驳回成功!");
reLoadBorrowingTab();
$('#mytab').bootstrapTable('selectPage', pageNumber);
} else {
toastr.warning("驳回失败");
}
}
})
}
}
})
}
//情况
function borrowingEmpty() {
$(":input").val("")
refreshBorrowingTab();
}
//申请借阅列表查询按钮
function refreshBorrowingTab() {
$("#checks").val("");
$('#borrowingTab').bootstrapTable('refresh', {
url: path + '/applyDetails/getBatchApplyDetails',//排序方式
})
}
//保存批量申请
function addApprove() {
var ids = borrowingIds.join();
if (borrowingIds.length == 0) {
return toastr.warning("至少选择一条以上");
}
$.ajax({
type: 'post',
url: path + '/applyDetails/agreeById',
data: {
ids: ids,
},
dataType: 'json',
success: function (data) {
if (data.code == 200) {
return toastr.warning("批量借阅申请失败!");
}
if (data.code == 100) {
toastr.success("批量借阅申请成功!");
// $('#borrowingModal').modal('hide');
// //刷新申请借阅列表
// reLoadBorrowingTab();
}
}
})
}
//批量申请确认提交后刷新页面
function reLoadBorrowingTab() {
$("#borrowingTab").bootstrapTable('refresh', path + '/applyDetails/getBatchApplyDetails');//排序方式
}

@ -41,11 +41,18 @@ $('#mytab').bootstrapTable({
title:'姓名',
field:'name',
},
{
title:'住院次数',
field:'admissTimes',
title:'性别',
field:'sex',
},
{
title:'身份证号',
field:'idCard',
},
// {
// title:'住院次数',
// field:'admissTimes',
// },
{
title:'出院日期',
field:'disDate',
@ -54,6 +61,10 @@ $('#mytab').bootstrapTable({
title:'出院科室',
field:'disDept',
},
{
title:'主要诊断',
field:'mainDiagName',
},
{
title:'操作',
formatter: function(value,row){

@ -488,3 +488,4 @@ function arraySearch(l1) {
}
return false;
}

@ -791,3 +791,26 @@ function setLocation(id) {
$(function () { $("[data-toggle='popover']").popover(); });
$("[rel=drevil]").popover({
trigger:'manual',
html: 'true',
animation: false
}).on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(this).siblings(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide")
}
}, );
}); 

@ -136,21 +136,22 @@ function onloadPdf(scanPages, sources) {
datType: 'json',
success: function (data) {
if (data.code == 0) {
var str = path + "/commom/getRecordContentBlood?patientId=" + patientId;
if (sources.includes("99")){
$("#iframe1").attr("src", path + "/static/pdfjs/web/viewer.html?file=" + encodeURIComponent(str))
}else {
$("#iframe1").attr("src", path + "/static/pdfjs/web/viewer2.html?file=" + encodeURIComponent(str))
var rootPaths = parent.$("#rootPaths").val();
var print = $("#print").val();
if (print == 1){
selectPrintPic(patientId, rootPaths, scanPages, sources);
}
var str = path + "/commom/getRecordContentBlood?patientId=" + patientId;
if (sources.includes("99") ||sources.includes("服务") ||sources.includes("null")||sources.includes("pacs")||sources.includes("扫描上传")) {
$("#iframe1").attr("src", path + "/static/pdfjs/web/viewer.html?file=" + encodeURIComponent(str))
} else {
$("#iframe1").attr("src", path + "/static/pdfjs/web/viewer2.html?file=" + encodeURIComponent(str))
var rootPaths = parent.$("#rootPaths").val();
var print = $("#print").val();
if (print == 1) {
selectPrintPic(patientId, rootPaths, scanPages, sources);
}
}
}
}
})
}
/*function onloadPdf(scanPages, sources) {
$("#iframeLoad").val("");
$("#printPicLoaded").val("");
@ -309,14 +310,14 @@ if (iframe.attachEvent) {
function onloadJpgForPdf() {
var typeId = $("#typeId").val();
if (typeId == undefined) {
typeId = '';
typeId = 1;
}
Common.confirm({
title: "提示",
message: "确认将左侧树选中的图片下载pdf?",
operate: function (reselt) {
if (reselt) {
var patientId = $("#patientId").val();
var patientId = $("#patientId").val();
var assortIds = $("#assortIds").val();
var flag = parent.$("#flag").val();
post(path + '/template/downloadPdfBlood', {
@ -400,9 +401,11 @@ function delPic() {
}
})
}
function printCurrent(){
function printCurrent() {
PDFJS.workerSrc = '../static/pdfjs/viewer2.js';//加载核心库
}
//记录打印记录
function printInfoBlood() {
var patientId = "'" + $("#patientId").val() + "'";
@ -506,7 +509,7 @@ function search() {
var inpatientNo = row.inpatientNo.replace(/\s+/g, "");
var name = row.name;
var admissTimes = row.admissTimes;
var info = "'" + patientId+ "," + inpatientNo + "," + name + "," + admissTimes + "'";
var info = "'" + patientId + "," + inpatientNo + "," + name + "," + admissTimes + "'";
var editanddrop = '<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#myModal2" onclick="showInfo(' + info + ')">选择分段</button>';
return editanddrop;
}
@ -590,7 +593,7 @@ function movePdf() {
var newAssortId = $("#moveAssortId").val();
if (oldPatientId == '' || newPatientId == '' || assortIds == '' || newAssortId == '') {
toastr.warning("程序出现错误,请联系管理员!");
} else {
} else {
$.ajax({
type: 'post',
url: path + '/template/movePdfBlood',
@ -612,5 +615,4 @@ function movePdf() {
}
}

Loading…
Cancel
Save