修改bug

master
wangxh 6 years ago
commit ddc972d0d3

@ -1095,7 +1095,6 @@ public class CommomSearchController {
} else { } else {
commomVo = commomMapper.selectByPrimaryKey(patientId); commomVo = commomMapper.selectByPrimaryKey(patientId);
} }
String[] scanPaths = assortIds.split(","); String[] scanPaths = assortIds.split(",");
//组织图片地址集合 //组织图片地址集合
List<String> filePaths = new ArrayList<>(); List<String> filePaths = new ArrayList<>();

@ -9,6 +9,7 @@ import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.list.AbstractLinkedList;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -69,12 +70,22 @@ public class PrintOrDownLoadInfoController {
@ResponseBody @ResponseBody
public String getPrintInfoList(Integer page, Integer limit, EmrPrintOrDownLoadInfoVo emrPrintOrDownLoadInfoVo,String flag){ public String getPrintInfoList(Integer page, Integer limit, EmrPrintOrDownLoadInfoVo emrPrintOrDownLoadInfoVo,String flag){
try{ try{
if(null != page && null != limit){
PageHelper.startPage(page, limit);
}
//查询 //查询
List<EmrPrintOrDownLoadInfoVo> list = printOrDownLoadInfoService.selectAll(emrPrintOrDownLoadInfoVo,flag); List<EmrPrintOrDownLoadInfoVo> list = printOrDownLoadInfoService.selectAll(emrPrintOrDownLoadInfoVo,flag);
PageInfo pageInfo = new PageInfo<>(list); Long size = (long) list.size();
List<EmrPrintOrDownLoadInfoVo> updateList = new ArrayList<>();
if (size > 0) {
int pageCount = (int) ((size / limit) + ((size % limit > 0) ? 1 : 0));
int start = (page - 1) * limit;
int end = (int) (page == pageCount ? size : page * limit);
if (end < size) {
updateList = list.subList(start, end);
} else {
updateList = list.subList(start, size.intValue());
}
}
PageInfo pageInfo = new PageInfo<>(updateList);
pageInfo.setTotal(size);
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
String json = mapper.writeValueAsString(pageInfo); String json = mapper.writeValueAsString(pageInfo);
return json; return json;
@ -125,8 +136,8 @@ public class PrintOrDownLoadInfoController {
@OptionalLog(module = "导出excel",methods = "打印记录列表") @OptionalLog(module = "导出excel",methods = "打印记录列表")
@RequestMapping(value="/printInfoList/export",produces = {"text/json;charset=UTF-8"}) @RequestMapping(value="/printInfoList/export",produces = {"text/json;charset=UTF-8"})
@ResponseBody @ResponseBody
public void exportExcel(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, HttpServletRequest request, String checks,String flag){ public void exportExcel(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo,String checks,String flag){
Export(response, printOrDownLoadInfoVo, request, checks,flag); Export(response, printOrDownLoadInfoVo, checks,flag);
} }
/** /**
@ -145,15 +156,15 @@ public class PrintOrDownLoadInfoController {
@OptionalLog(module = "导出excel",methods = "下载记录列表") @OptionalLog(module = "导出excel",methods = "下载记录列表")
@RequestMapping(value="/downloadInfoList/export",produces = {"text/json;charset=UTF-8"}) @RequestMapping(value="/downloadInfoList/export",produces = {"text/json;charset=UTF-8"})
@ResponseBody @ResponseBody
public void exportExcel1(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, HttpServletRequest request, String checks,String flag){ public void exportExcel1(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo,String checks,String flag){
Export(response, printOrDownLoadInfoVo, request, checks,flag); Export(response, printOrDownLoadInfoVo,checks,flag);
} }
@RequiresPermissions("/printInfoList/export") @RequiresPermissions("/printInfoList/export")
@OptionalLog(module = "导出excel",methods = "打印记录列表") @OptionalLog(module = "导出excel",methods = "打印记录列表")
@RequestMapping(value="/printInfoList/export174",produces = {"text/json;charset=UTF-8"}) @RequestMapping(value="/printInfoList/export174",produces = {"text/json;charset=UTF-8"})
@ResponseBody @ResponseBody
public void export174(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, HttpServletRequest request, String checks,String flag){ public void export174(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo,String checks,String flag,Integer operType){
Export174(response, printOrDownLoadInfoVo, request, checks,flag); Export174(response, printOrDownLoadInfoVo,checks,flag,operType);
} }
/** /**
@ -172,11 +183,11 @@ public class PrintOrDownLoadInfoController {
@OptionalLog(module = "导出excel",methods = "下载记录列表") @OptionalLog(module = "导出excel",methods = "下载记录列表")
@RequestMapping(value="/downloadInfoList/export174",produces = {"text/json;charset=UTF-8"}) @RequestMapping(value="/downloadInfoList/export174",produces = {"text/json;charset=UTF-8"})
@ResponseBody @ResponseBody
public void export1741(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, HttpServletRequest request, String checks,String flag){ public void export1741(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, String checks,String flag,Integer operType){
Export174(response, printOrDownLoadInfoVo, request, checks,flag); Export174(response, printOrDownLoadInfoVo,checks,flag,operType);
} }
public void Export(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, HttpServletRequest request, String checks,String flag){ public void Export(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo,String checks,String flag){
String tableThNames = "操作人,产妇姓名,脐血编号,类别,文件名,用途,操作时间"; String tableThNames = "操作人,产妇姓名,脐血编号,类别,文件名,用途,操作时间";
String fieldCns = "creater,name,inpatientNo,assortName,scanAddr,typeName,createTime"; String fieldCns = "creater,name,inpatientNo,assortName,scanAddr,typeName,createTime";
//构造excel的数据 //构造excel的数据
@ -198,9 +209,9 @@ public class PrintOrDownLoadInfoController {
e.printStackTrace(); e.printStackTrace();
} }
} }
public void Export174(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo, HttpServletRequest request, String checks,String flag){ public void Export174(HttpServletResponse response,EmrPrintOrDownLoadInfoVo printOrDownLoadInfoVo,String checks,String flag,Integer operType){
String tableThNames = "操作人,姓名,病案号,住院次数,类别,文件名,用途,操作时间"; String tableThNames = "操作人,姓名,病案号,住院次数,类别,文件名,页数,用途,操作时间,ip地址";
String fieldCns = "creater,name,inpatientNo,admissTimes,assortName,scanAddr,typeName,createTime"; String fieldCns = "creater,name,inpatientNo,admissTimes,assortName,scanPage,printCount,typeName,createTime,ip";
//构造excel的数据 //构造excel的数据
try{ try{
List<EmrPrintOrDownLoadInfoVo> list = new ArrayList<>(); List<EmrPrintOrDownLoadInfoVo> list = new ArrayList<>();
@ -210,8 +221,14 @@ public class PrintOrDownLoadInfoController {
//查询 //查询
list = printOrDownLoadInfoService.selectAll(printOrDownLoadInfoVo,flag); list = printOrDownLoadInfoService.selectAll(printOrDownLoadInfoVo,flag);
} }
String fileName = "";
if(operType == 1){
fileName = "打印";
}else{
fileName = "下载";
}
//文件名 //文件名
String fileName = "打印记录列表导出数据(" + new SimpleDateFormat("yyyy-MM-dd HH_mm_ss").format(new Date()) + ").xls"; fileName += "记录列表导出数据(" + new SimpleDateFormat("yyyy-MM-dd HH_mm_ss").format(new Date()) + ").xls";
//ExportExcelUtil //ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil(); ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作 //导出excel的操作

@ -1377,6 +1377,9 @@ public class TemplateSearchController {
disDate = fmt.format(vo.getDisDate()); disDate = fmt.format(vo.getDisDate());
} }
String pdfName = vo.getInpatientNo() + "_" + vo.getName() + "_" + disDate + "("+fmt.format(new Date())+")";//每个文件名 String pdfName = vo.getInpatientNo() + "_" + vo.getName() + "_" + disDate + "("+fmt.format(new Date())+")";//每个文件名
//emrPdfWaterSet设置启用下载的状态
emrPdfWaterSet.setEffective(emrPdfWaterSet.getDownloadEffective());
emrPdfWaterSet.setIsImg(emrPdfWaterSet.getDownloadIsImg());
img2PdfUtil.imageToPdf(response,filePaths,pdfName,emrPdfWaterSet); img2PdfUtil.imageToPdf(response,filePaths,pdfName,emrPdfWaterSet);
} }
}catch (Exception e){ }catch (Exception e){

@ -7,6 +7,8 @@ public class EmrPdfWaterSet implements Serializable {
private Short effective; private Short effective;
private Short downloadEffective;
private Short upOrUnder; private Short upOrUnder;
private Float transparent; private Float transparent;
@ -25,6 +27,8 @@ public class EmrPdfWaterSet implements Serializable {
private Short isImg; private Short isImg;
private Short downloadIsImg;
private String imgFile; private String imgFile;
private Integer imgWidth; private Integer imgWidth;
@ -55,6 +59,14 @@ public class EmrPdfWaterSet implements Serializable {
this.effective = effective; this.effective = effective;
} }
public Short getDownloadEffective() {
return downloadEffective;
}
public void setDownloadEffective(Short downloadEffective) {
this.downloadEffective = downloadEffective;
}
public Short getUpOrUnder() { public Short getUpOrUnder() {
return upOrUnder; return upOrUnder;
} }
@ -127,6 +139,14 @@ public class EmrPdfWaterSet implements Serializable {
this.isImg = isImg; this.isImg = isImg;
} }
public Short getDownloadIsImg() {
return downloadIsImg;
}
public void setDownloadIsImg(Short downloadIsImg) {
this.downloadIsImg = downloadIsImg;
}
public String getImgFile() { public String getImgFile() {
return imgFile; return imgFile;
} }
@ -183,6 +203,7 @@ public class EmrPdfWaterSet implements Serializable {
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", effective=").append(effective); sb.append(", effective=").append(effective);
sb.append(", downloadEffective=").append(downloadEffective);
sb.append(", upOrUnder=").append(upOrUnder); sb.append(", upOrUnder=").append(upOrUnder);
sb.append(", transparent=").append(transparent); sb.append(", transparent=").append(transparent);
sb.append(", text=").append(text); sb.append(", text=").append(text);
@ -192,6 +213,7 @@ public class EmrPdfWaterSet implements Serializable {
sb.append(", textSize=").append(textSize); sb.append(", textSize=").append(textSize);
sb.append(", textRotation=").append(textRotation); sb.append(", textRotation=").append(textRotation);
sb.append(", isImg=").append(isImg); sb.append(", isImg=").append(isImg);
sb.append(", downloadIsImg=").append(downloadIsImg);
sb.append(", imgFile=").append(imgFile); sb.append(", imgFile=").append(imgFile);
sb.append(", imgWidth=").append(imgWidth); sb.append(", imgWidth=").append(imgWidth);
sb.append(", imgHeight=").append(imgHeight); sb.append(", imgHeight=").append(imgHeight);

@ -92,21 +92,25 @@ public class EmrPrintDownloadInfo implements Serializable {
} }
public void setIp(String ip) { public void setIp(String ip) {
this.ip = ip; this.ip = ip == null ? null : ip.trim();
} }
@Override @Override
public String toString() { public String toString() {
return "EmrPrintDownloadInfo{" + StringBuilder sb = new StringBuilder();
"id=" + id + sb.append(getClass().getSimpleName());
", patientId='" + patientId + '\'' + sb.append(" [");
", assortId='" + assortId + '\'' + sb.append("Hash = ").append(hashCode());
", scanPage='" + scanPage + '\'' + sb.append(", id=").append(id);
", typeId=" + typeId + sb.append(", patientId=").append(patientId);
", operType=" + operType + sb.append(", assortId=").append(assortId);
", createTime='" + createTime + '\'' + sb.append(", scanPage=").append(scanPage);
", creater='" + creater + '\'' + sb.append(", typeId=").append(typeId);
", ip='" + ip + '\'' + sb.append(", operType=").append(operType);
'}'; sb.append(", createTime=").append(createTime);
sb.append(", creater=").append(creater);
sb.append(", ip=").append(ip);
sb.append("]");
return sb.toString();
} }
} }

@ -13,10 +13,11 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
@Service @Service
@Transactional @Transactional
@ -49,6 +50,7 @@ public class PrintOrDownLoadInfoService {
obj.setOperType(operType); obj.setOperType(operType);
obj.setCreater(user.getUserName()); obj.setCreater(user.getUserName());
obj.setCreateTime(fmt.format(new Date())); obj.setCreateTime(fmt.format(new Date()));
obj.setIp(getOperIp());
list.add(obj); list.add(obj);
//是180的倍数或最后一个 //是180的倍数或最后一个
if(null != list && (list.size()%simpleInsertCount == 0 || i == scanPathVos.size() - 1)) { if(null != list && (list.size()%simpleInsertCount == 0 || i == scanPathVos.size() - 1)) {
@ -58,19 +60,92 @@ public class PrintOrDownLoadInfoService {
} }
} }
//获取操作人ip
private String getOperIp(){
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
// 获取访问真实IP
String ipAddress = request.getHeader("x-forwarded-for");
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("Proxy-Client-IP");
}
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("WL-Proxy-Client-IP");
}
if(ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getRemoteAddr();
if(ipAddress.equals("127.0.0.1") || ipAddress.equals("0:0:0:0:0:0:0:1")){
//根据网卡取本机配置的IP
InetAddress inet=null;
try {
inet = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
ipAddress= inet.getHostAddress();
}
}
//对于通过多个代理的情况第一个IP为客户端真实IP,多个IP按照','分割
if(ipAddress!=null && ipAddress.length()>15){ //"***.***.***.***".length() = 15
if(ipAddress.indexOf(",")>0){
ipAddress = ipAddress.substring(0,ipAddress.indexOf(","));
}
}
return ipAddress;
}
/** /**
* *
* */ * */
public List<EmrPrintOrDownLoadInfoVo> selectAll(EmrPrintOrDownLoadInfoVo emrPrintOrDownLoadInfoVo,String flag){ public List<EmrPrintOrDownLoadInfoVo> selectAll(EmrPrintOrDownLoadInfoVo emrPrintOrDownLoadInfoVo,String flag){
List<EmrPrintOrDownLoadInfoVo> list = printDownloadInfoMapper.selectAll(emrPrintOrDownLoadInfoVo,flag); List<EmrPrintOrDownLoadInfoVo> list = printDownloadInfoMapper.selectAll(emrPrintOrDownLoadInfoVo,flag);
return list; return getReturnList(list);
}
//组织数据
private List<EmrPrintOrDownLoadInfoVo> getReturnList(List<EmrPrintOrDownLoadInfoVo> list){
List<EmrPrintOrDownLoadInfoVo> returnList = new ArrayList<>();
if(null != list && !list.isEmpty()){
Map<String,EmrPrintOrDownLoadInfoVo> map = new LinkedHashMap<>();
for(EmrPrintOrDownLoadInfoVo vo : list){
String key = vo.getPatientId() + "," + vo.getCreateTime() + "," + vo.getCreateTime();
map.put(key,vo);
}
for(Map.Entry<String,EmrPrintOrDownLoadInfoVo> obj : map.entrySet()){
String ids = "";
String assortNames = "";
String scanPages = "";
int printCount = 0;
Set<String> assortNameSet = new LinkedHashSet<>();
for(EmrPrintOrDownLoadInfoVo vo : list){
String key = vo.getPatientId() + "," + vo.getCreateTime() + "," + vo.getCreateTime();
if(key.equals(obj.getKey())){
ids += vo.getId() + ",";
scanPages += vo.getScanPage() + ",";
assortNameSet.add(vo.getAssortName());
printCount++;
}
}
for(String assortName : assortNameSet){
assortNames += assortName + ",";
}
ids = ids.substring(0,ids.length() - 1);
assortNames = assortNames.substring(0,assortNames.length() - 1);
scanPages = scanPages.substring(0,scanPages.length() - 1);
EmrPrintOrDownLoadInfoVo emrPrintOrDownLoadInfoVo = obj.getValue();
emrPrintOrDownLoadInfoVo.setIds(ids);
emrPrintOrDownLoadInfoVo.setAssortName(assortNames);
emrPrintOrDownLoadInfoVo.setScanPage(scanPages);
emrPrintOrDownLoadInfoVo.setPrintCount(printCount);
returnList.add(emrPrintOrDownLoadInfoVo);
}
}
return returnList;
} }
/** /**
* *
* */ * */
public List<EmrPrintOrDownLoadInfoVo> selectAllByIds(String ids,String flag){ public List<EmrPrintOrDownLoadInfoVo> selectAllByIds(String ids,String flag){
List<EmrPrintOrDownLoadInfoVo> list = printDownloadInfoMapper.selectAllByIds(ids,flag); List<EmrPrintOrDownLoadInfoVo> list = printDownloadInfoMapper.selectAllByIds(ids,flag);
return list; return getReturnList(list);
} }
/** /**

@ -86,7 +86,6 @@ public class ExportExcelUtil {
for (int i = 1; i <= sheetNum; i++) { for (int i = 1; i <= sheetNum; i++) {
HSSFSheet sheet = workBook.createSheet("Sheet " + i); HSSFSheet sheet = workBook.createSheet("Sheet " + i);
HSSFRow headRow = sheet.createRow((short) 0); HSSFRow headRow = sheet.createRow((short) 0);
HSSFCellStyle cellStyle = workBook.createCellStyle(); HSSFCellStyle cellStyle = workBook.createCellStyle();
cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER); cellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
@ -130,8 +129,11 @@ public class ExportExcelUtil {
//设置自动列宽 //设置自动列宽
for (int j = 0; j < rows; j++) { for (int j = 0; j < rows; j++) {
sheet.autoSizeColumn(j); sheet.autoSizeColumn(j);
int width = sheet.getColumnWidth(j)*2;
if(width < 3000){
sheet.setColumnWidth(j,sheet.getColumnWidth(j)*17/10); sheet.setColumnWidth(j,sheet.getColumnWidth(j)*17/10);
} }
}
//冻结表头 //冻结表头
sheet.createFreezePane( 0, 1, 0, 1 ); sheet.createFreezePane( 0, 1, 0, 1 );
} }

@ -1,6 +1,5 @@
package com.emr.util; package com.emr.util;
import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet;
import com.lowagie.text.*; import com.lowagie.text.*;
import com.lowagie.text.Font; import com.lowagie.text.Font;
import com.lowagie.text.Image; import com.lowagie.text.Image;
@ -199,34 +198,21 @@ public class Jpg2PdfUtil {
ByteArrayOutputStream bos = new ByteArrayOutputStream(); ByteArrayOutputStream bos = new ByteArrayOutputStream();
for (int i = 0; i < files.size(); i++) { for (int i = 0; i < files.size(); i++) {
//判断是否加水印 //判断是否加水印
long start1 = System.currentTimeMillis();
if(StringUtils.isNotBlank(waterMarkName)){ if(StringUtils.isNotBlank(waterMarkName)){
setWatermark(bos,files.get(i), waterMarkName, null); setWatermark(bos,files.get(i), waterMarkName, null);
} }
long end1 = System.currentTimeMillis();
System.out.println("第"+(i+1)+"pdf加水印的时间"+(end1-start1)/1000.0+"s");
long start2 = System.currentTimeMillis();
PdfReader reader = new PdfReader(files.get(i)); PdfReader reader = new PdfReader(files.get(i));
long end2 = System.currentTimeMillis();
System.out.println("PdfReader第"+(i+1)+"pdf时间"+(end2-start2)/1000.0+"s");
int n = reader.getNumberOfPages(); int n = reader.getNumberOfPages();
long start3 = System.currentTimeMillis();
for (int j = 1; j <= n; j++) { for (int j = 1; j <= n; j++) {
document.newPage(); document.newPage();
PdfImportedPage page = null; PdfImportedPage page = null;
long start4 = System.currentTimeMillis();
if(StringUtils.isNotBlank(waterMarkName)){ if(StringUtils.isNotBlank(waterMarkName)){
page = copy.getImportedPage(new PdfReader(bos.toByteArray()), j); page = copy.getImportedPage(new PdfReader(bos.toByteArray()), j);
}else{ }else{
page = copy.getImportedPage(reader, j); page = copy.getImportedPage(reader, j);
} }
long end4 = System.currentTimeMillis();
System.out.println("getImportedPage PdfReader生成水印后第"+(i+1)+"pdf时间"+(end4-start4)/1000.0+"s");
copy.addPage(page); copy.addPage(page);
} }
long end3 = System.currentTimeMillis();
System.out.println("copy pdf时间"+(end3-start3)/1000.0+"s");
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
@ -252,8 +238,8 @@ public class Jpg2PdfUtil {
content = stamper.getUnderContent(i); content = stamper.getUnderContent(i);
//加文字水印 //加文字水印
if(StringUtils.isNotBlank(waterMarkName)) { if(StringUtils.isNotBlank(waterMarkName)) {
gs.setFillOpacity(0.3f); gs.setFillOpacity(0.2f);
gs.setStrokeOpacity(0.3f); gs.setStrokeOpacity(0.2f);
content.beginText(); content.beginText();
content.setColorFill(Color.LIGHT_GRAY); content.setColorFill(Color.LIGHT_GRAY);
content.setFontAndSize(base, 50); content.setFontAndSize(base, 50);

@ -76,13 +76,13 @@ public class img2PdfUtil {
//图片合成pdf //图片合成pdf
imgToPdf(document,filePaths); imgToPdf(document,filePaths);
//是否启用水印 //是否启用水印
Short effective = pdfWaterSet.getEffective(); Short effective = pdfWaterSet.getDownloadEffective();
Short isImg = pdfWaterSet.getIsImg(); Short isImg = pdfWaterSet.getDownloadIsImg();
if(effective == 1 || isImg == 1) { if(effective == 1 || isImg == 1) {
addWaterMark(bos, null, pdfWaterSet.getUpOrUnder(), pdfWaterSet.getTransparent(), addWaterMark(bos, null, pdfWaterSet.getUpOrUnder(), pdfWaterSet.getTransparent(),
pdfWaterSet.getText(), pdfWaterSet.getTextX(), pdfWaterSet.getTextY(), pdfWaterSet.getText(), pdfWaterSet.getTextX(), pdfWaterSet.getTextY(),
pdfWaterSet.getTextColor(), pdfWaterSet.getTextSize(), pdfWaterSet.getTextRotation(), pdfWaterSet.getTextColor(), pdfWaterSet.getTextSize(), pdfWaterSet.getTextRotation(),
pdfWaterSet.getEffective(),pdfWaterSet.getIsImg(),pdfWaterSet.getImgFile(), pdfWaterSet.getImgWidth(), effective,isImg,pdfWaterSet.getImgFile(), pdfWaterSet.getImgWidth(),
pdfWaterSet.getImgHeight(), pdfWaterSet.getImgX(), pdfWaterSet.getImgY()); pdfWaterSet.getImgHeight(), pdfWaterSet.getImgX(), pdfWaterSet.getImgY());
} }
} }

@ -5,7 +5,7 @@ import lombok.Data;
@Data @Data
public class EmrPrintOrDownLoadInfoVo extends EmrPrintDownloadInfo { public class EmrPrintOrDownLoadInfoVo extends EmrPrintDownloadInfo {
private String scanAddr; private String ids;
private String name; private String name;

@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" > <resultMap id="BaseResultMap" type="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
<id column="id" property="id" jdbcType="INTEGER" /> <id column="id" property="id" jdbcType="INTEGER" />
<result column="effective" property="effective" jdbcType="SMALLINT" /> <result column="effective" property="effective" jdbcType="SMALLINT" />
<result column="download_effective" property="downloadEffective" jdbcType="SMALLINT" />
<result column="up_or_under" property="upOrUnder" jdbcType="SMALLINT" /> <result column="up_or_under" property="upOrUnder" jdbcType="SMALLINT" />
<result column="transparent" property="transparent" jdbcType="REAL" /> <result column="transparent" property="transparent" jdbcType="REAL" />
<result column="text" property="text" jdbcType="NVARCHAR" /> <result column="text" property="text" jdbcType="NVARCHAR" />
@ -13,6 +14,7 @@
<result column="text_size" property="textSize" jdbcType="INTEGER" /> <result column="text_size" property="textSize" jdbcType="INTEGER" />
<result column="text_rotation" property="textRotation" jdbcType="INTEGER" /> <result column="text_rotation" property="textRotation" jdbcType="INTEGER" />
<result column="is_img" property="isImg" jdbcType="SMALLINT" /> <result column="is_img" property="isImg" jdbcType="SMALLINT" />
<result column="download_is_img" property="downloadIsImg" jdbcType="SMALLINT" />
<result column="img_file" property="imgFile" jdbcType="NVARCHAR" /> <result column="img_file" property="imgFile" jdbcType="NVARCHAR" />
<result column="img_width" property="imgWidth" jdbcType="INTEGER" /> <result column="img_width" property="imgWidth" jdbcType="INTEGER" />
<result column="img_height" property="imgHeight" jdbcType="INTEGER" /> <result column="img_height" property="imgHeight" jdbcType="INTEGER" />
@ -21,8 +23,9 @@
<result column="unique_id" property="uniqueId" jdbcType="NVARCHAR" /> <result column="unique_id" property="uniqueId" jdbcType="NVARCHAR" />
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, effective, up_or_under, transparent, text, text_x, text_y, text_color, text_size, id, effective, download_effective, up_or_under, transparent, text, text_x, text_y,
text_rotation, is_img, img_file, img_width, img_height, img_x, img_y, unique_id text_color, text_size, text_rotation, is_img, download_is_img, img_file, img_width,
img_height, img_x, img_y, unique_id
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
@ -35,18 +38,20 @@
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" > <insert id="insert" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
insert into emr_pdf_water_set (id, effective, up_or_under, insert into emr_pdf_water_set (id, effective, download_effective,
transparent, text, text_x, up_or_under, transparent, text,
text_y, text_color, text_size, text_x, text_y, text_color,
text_rotation, is_img, img_file, text_size, text_rotation, is_img,
img_width, img_height, img_x, download_is_img, img_file, img_width,
img_y, unique_id) img_height, img_x, img_y,
values (#{id,jdbcType=INTEGER}, #{effective,jdbcType=SMALLINT}, #{upOrUnder,jdbcType=SMALLINT}, unique_id)
#{transparent,jdbcType=REAL}, #{text,jdbcType=NVARCHAR}, #{textX,jdbcType=INTEGER}, values (#{id,jdbcType=INTEGER}, #{effective,jdbcType=SMALLINT}, #{downloadEffective,jdbcType=SMALLINT},
#{textY,jdbcType=INTEGER}, #{textColor,jdbcType=NVARCHAR}, #{textSize,jdbcType=INTEGER}, #{upOrUnder,jdbcType=SMALLINT}, #{transparent,jdbcType=REAL}, #{text,jdbcType=NVARCHAR},
#{textRotation,jdbcType=INTEGER}, #{isImg,jdbcType=SMALLINT}, #{imgFile,jdbcType=NVARCHAR}, #{textX,jdbcType=INTEGER}, #{textY,jdbcType=INTEGER}, #{textColor,jdbcType=NVARCHAR},
#{imgWidth,jdbcType=INTEGER}, #{imgHeight,jdbcType=INTEGER}, #{imgX,jdbcType=INTEGER}, #{textSize,jdbcType=INTEGER}, #{textRotation,jdbcType=INTEGER}, #{isImg,jdbcType=SMALLINT},
#{imgY,jdbcType=INTEGER}, #{uniqueId,jdbcType=NVARCHAR}) #{downloadIsImg,jdbcType=SMALLINT}, #{imgFile,jdbcType=NVARCHAR}, #{imgWidth,jdbcType=INTEGER},
#{imgHeight,jdbcType=INTEGER}, #{imgX,jdbcType=INTEGER}, #{imgY,jdbcType=INTEGER},
#{uniqueId,jdbcType=NVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" > <insert id="insertSelective" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
insert into emr_pdf_water_set insert into emr_pdf_water_set
@ -57,6 +62,9 @@
<if test="effective != null" > <if test="effective != null" >
effective, effective,
</if> </if>
<if test="downloadEffective != null" >
download_effective,
</if>
<if test="upOrUnder != null" > <if test="upOrUnder != null" >
up_or_under, up_or_under,
</if> </if>
@ -84,6 +92,9 @@
<if test="isImg != null" > <if test="isImg != null" >
is_img, is_img,
</if> </if>
<if test="downloadIsImg != null" >
download_is_img,
</if>
<if test="imgFile != null" > <if test="imgFile != null" >
img_file, img_file,
</if> </if>
@ -110,6 +121,9 @@
<if test="effective != null" > <if test="effective != null" >
#{effective,jdbcType=SMALLINT}, #{effective,jdbcType=SMALLINT},
</if> </if>
<if test="downloadEffective != null" >
#{downloadEffective,jdbcType=SMALLINT},
</if>
<if test="upOrUnder != null" > <if test="upOrUnder != null" >
#{upOrUnder,jdbcType=SMALLINT}, #{upOrUnder,jdbcType=SMALLINT},
</if> </if>
@ -137,6 +151,9 @@
<if test="isImg != null" > <if test="isImg != null" >
#{isImg,jdbcType=SMALLINT}, #{isImg,jdbcType=SMALLINT},
</if> </if>
<if test="downloadIsImg != null" >
#{downloadIsImg,jdbcType=SMALLINT},
</if>
<if test="imgFile != null" > <if test="imgFile != null" >
#{imgFile,jdbcType=NVARCHAR}, #{imgFile,jdbcType=NVARCHAR},
</if> </if>
@ -163,6 +180,9 @@
<if test="effective != null" > <if test="effective != null" >
effective = #{effective,jdbcType=SMALLINT}, effective = #{effective,jdbcType=SMALLINT},
</if> </if>
<if test="downloadEffective != null" >
download_effective = #{downloadEffective,jdbcType=SMALLINT},
</if>
<if test="upOrUnder != null" > <if test="upOrUnder != null" >
up_or_under = #{upOrUnder,jdbcType=SMALLINT}, up_or_under = #{upOrUnder,jdbcType=SMALLINT},
</if> </if>
@ -190,6 +210,9 @@
<if test="isImg != null" > <if test="isImg != null" >
is_img = #{isImg,jdbcType=SMALLINT}, is_img = #{isImg,jdbcType=SMALLINT},
</if> </if>
<if test="downloadIsImg != null" >
download_is_img = #{downloadIsImg,jdbcType=SMALLINT},
</if>
<if test="imgFile != null" > <if test="imgFile != null" >
img_file = #{imgFile,jdbcType=NVARCHAR}, img_file = #{imgFile,jdbcType=NVARCHAR},
</if> </if>
@ -214,9 +237,8 @@
<update id="updateByPrimaryKey" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" > <update id="updateByPrimaryKey" parameterType="com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet" >
update emr_pdf_water_set update emr_pdf_water_set
set effective = #{effective,jdbcType=SMALLINT}, set effective = #{effective,jdbcType=SMALLINT},
<if test="upOrUnder != null"> download_effective = #{downloadEffective,jdbcType=SMALLINT},
up_or_under = #{upOrUnder,jdbcType=SMALLINT}, up_or_under = #{upOrUnder,jdbcType=SMALLINT},
</if>
transparent = #{transparent,jdbcType=REAL}, transparent = #{transparent,jdbcType=REAL},
text = #{text,jdbcType=NVARCHAR}, text = #{text,jdbcType=NVARCHAR},
text_x = #{textX,jdbcType=INTEGER}, text_x = #{textX,jdbcType=INTEGER},
@ -225,6 +247,7 @@
text_size = #{textSize,jdbcType=INTEGER}, text_size = #{textSize,jdbcType=INTEGER},
text_rotation = #{textRotation,jdbcType=INTEGER}, text_rotation = #{textRotation,jdbcType=INTEGER},
is_img = #{isImg,jdbcType=SMALLINT}, is_img = #{isImg,jdbcType=SMALLINT},
download_is_img = #{downloadIsImg,jdbcType=SMALLINT},
img_file = #{imgFile,jdbcType=NVARCHAR}, img_file = #{imgFile,jdbcType=NVARCHAR},
img_width = #{imgWidth,jdbcType=INTEGER}, img_width = #{imgWidth,jdbcType=INTEGER},
img_height = #{imgHeight,jdbcType=INTEGER}, img_height = #{imgHeight,jdbcType=INTEGER},

@ -95,19 +95,16 @@
<insert id="SimpleInsert" parameterType="java.util.List"> <insert id="SimpleInsert" parameterType="java.util.List">
insert into emr_print_download_info (patient_id, scan_page,assort_id, insert into emr_print_download_info (patient_id, scan_page,assort_id,
type_id, oper_type, create_time, type_id, oper_type, create_time,
creater) creater,ip)
<foreach collection="list" item="items" separator="union"> <foreach collection="list" item="items" separator="union">
select #{items.patientId,jdbcType=NVARCHAR}, select #{items.patientId,jdbcType=NVARCHAR}, #{items.scanPage,jdbcType=NVARCHAR},#{items.assortId,jdbcType=VARCHAR},
#{items.scanPage,jdbcType=NVARCHAR},#{items.assortId,jdbcType=VARCHAR}, #{items.typeId,jdbcType=INTEGER}, #{items.operType,jdbcType=SMALLINT}, #{items.createTime,jdbcType=NVARCHAR},
#{items.typeId,jdbcType=INTEGER}, #{items.operType,jdbcType=SMALLINT}, #{items.creater,jdbcType=NVARCHAR}, #{items.ip,jdbcType=NVARCHAR}
#{items.createTime,jdbcType=NVARCHAR},
#{items.creater,jdbcType=NVARCHAR}
</foreach> </foreach>
</insert> </insert>
<!--查询列表--> <!--查询列表-->
<select id="selectAll" resultMap="BaseResultMapVo" <select id="selectAll" resultMap="BaseResultMapVo" parameterType="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo">
parameterType="com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo">
SELECT SELECT
emr_print_download_info.id, emr_print_download_info.id,
emr_print_download_info.create_time, emr_print_download_info.create_time,
@ -183,38 +180,13 @@
emr_comom_set emr_comom_set
WHERE WHERE
id = 1 id = 1
) ) COUNT(scan_page) printCount,
COUNT( ISNULL(emr_type.type_name,'无') typeName,
scan_page) CONVERT(varchar(100),emr_print_download_info.create_time,23) create_time,
printCount, emr_print_download_info.creater
ISNULL(
emr_type
.
type_name,
'无')
typeName,
CONVERT(
varchar(
100),
emr_print_download_info
.
create_time,
23)
create_time,
emr_print_download_info
.
creater
FROM FROM
emr_print_download_info emr_print_download_info
LEFT LEFT JOIN emr_type ON emr_print_download_info.type_id = emr_type.id
JOIN
emr_type
ON emr_print_download_info
.
type_id =
emr_type
.
id
WHERE WHERE
oper_type = 1 oper_type = 1
AND patient_id = #{patientId} AND patient_id = #{patientId}

@ -74,6 +74,13 @@
/**表格div*/ /**表格div*/
.tableDiv{ .tableDiv{
margin-left: 1%; margin-left: 1%;
margin-right: 1%;
}
.hidden-xs{
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
</style> </style>
</head> </head>

@ -62,10 +62,25 @@
</div> </div>
<form id="form" enctype="multipart/form-data"> <form id="form" enctype="multipart/form-data">
<input type="hidden" name="id" id="id" value="${pdfWaterSet.id}"> <input type="hidden" name="id" id="id" value="${pdfWaterSet.id}">
<input type="hidden" name="upOrUnder" id="upOrUnder" value="${pdfWaterSet.upOrUnder}">
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<div class="col-md-5 labelDiv"> <div class="col-md-5 labelDiv">
<label>是否启用文本水印:</label> <label>透明度:</label>
</div>
<div class="col-md-7">
<input type="text" id="transparent" class="form-control input-sm" name="transparent" value="${pdfWaterSet.transparent}"
onkeyup="if(isNaN(value)){execCommand('undo');toastr.warning('只能输入数字 !');}"
onafterpaste="if(isNaN(value))execCommand('undo')"
/>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-5">
<div class="col-md-5 labelDiv">
<label>浏览启用文本水印:</label>
</div> </div>
<div class="col-md-7"> <div class="col-md-7">
<select class="form-control input-sm" name="effective"> <select class="form-control input-sm" name="effective">
@ -76,13 +91,13 @@
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="col-md-5 labelDiv"> <div class="col-md-5 labelDiv">
<label>透明度</label> <label>下载启用文本水印</label>
</div> </div>
<div class="col-md-7"> <div class="col-md-7">
<input type="text" id="transparent" class="form-control input-sm" name="transparent" value="${pdfWaterSet.transparent}" <select class="form-control input-sm" name="downloadEffective">
onkeyup="if(isNaN(value)){execCommand('undo');toastr.warning('只能输入数字 !');}" <option value="1" <c:if test="${pdfWaterSet.downloadEffective == 1}">selected</c:if>>是</option>
onafterpaste="if(isNaN(value))execCommand('undo')" <option value="0" <c:if test="${pdfWaterSet.downloadEffective == 0}">selected</c:if>>否</option>
/> </select>
</div> </div>
</div> </div>
</div> </div>
@ -151,7 +166,7 @@
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<div class="col-md-5 labelDiv"> <div class="col-md-5 labelDiv">
<label>是否加水印图片:</label> <label>浏览启用水印图片:</label>
</div> </div>
<div class="col-md-7"> <div class="col-md-7">
<select class="form-control input-sm" name="isImg"> <select class="form-control input-sm" name="isImg">
@ -162,14 +177,13 @@
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="col-md-5 labelDiv"> <div class="col-md-5 labelDiv">
<label>选择图片:</label> <label>下载启用水印图片:</label>
</div> </div>
<div class="col-md-7"> <div class="col-md-7">
<input type="file" id="file" accept="image/jpg,image/jpeg,image/png,image/bmp"> <select class="form-control input-sm" name="downloadIsImg">
<input type="hidden" id="imgFile" name="imgFile" value="${pdfWaterSet.imgFile}"> <option <c:if test="${pdfWaterSet.downloadIsImg == 1}">selected</c:if> value="1">是</option>
<a href="${path}/static/pdfWaterSet/upload/${pdfWaterSet.imgFile}" target="_blank" id="aDiv"> <option <c:if test="${pdfWaterSet.downloadIsImg == 0}">selected</c:if> value="0">否</option>
<img width="100" height="100" src="${path}/static/pdfWaterSet/upload/${pdfWaterSet.imgFile}" id="imgDiv"/> </select>
</a>
</div> </div>
</div> </div>
</div> </div>
@ -213,6 +227,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-md-5">
<div class="col-md-5 labelDiv">
<label>选择图片:</label>
</div>
<div class="col-md-7">
<input type="file" id="file" accept="image/jpg,image/jpeg,image/png,image/bmp">
<input type="hidden" id="imgFile" name="imgFile" value="${pdfWaterSet.imgFile}">
<a href="${path}/static/pdfWaterSet/upload/${pdfWaterSet.imgFile}" target="_blank" id="aDiv">
<img width="100" height="100" src="${path}/static/pdfWaterSet/upload/${pdfWaterSet.imgFile}" id="imgDiv"/>
</a>
</div>
</div>
</div>
<div class="btnsDiv"> <div class="btnsDiv">
<shiro:hasPermission name="/pdfWaterSet/update"> <shiro:hasPermission name="/pdfWaterSet/update">
<button type="button" class="btn btn-sm btn-primary btns" onclick="save()">保存</button> <button type="button" class="btn btn-sm btn-primary btns" onclick="save()">保存</button>

@ -74,6 +74,13 @@
/**表格div*/ /**表格div*/
.tableDiv{ .tableDiv{
margin-left: 1%; margin-left: 1%;
margin-right: 1%;
}
.hidden-xs{
max-width: 250px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
</style> </style>
</head> </head>

@ -31,9 +31,9 @@
margin-right: -15px; margin-right: -15px;
margin-bottom: -15px; margin-bottom: -15px;
} }
.collapse{ /* .collapse{
overflow-y:scroll; overflow-y:scroll;
} }*/
.labelDiv{ .labelDiv{
padding-top: 2%; padding-top: 2%;
padding-right: 0; padding-right: 0;
@ -260,14 +260,14 @@
<label class="control-label">病案号:</label> <label class="control-label">病案号:</label>
</div> </div>
<div class="col-sm-8 inputDiv"> <div class="col-sm-8 inputDiv">
<select class="selectpicker form-control input-sm inputValue" id="inpatient_no" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select> <%--<select class="selectpicker form-control input-sm inputValue" id="inpatient_no" style="max-height:400px!important;overflow:scroll;" data-live-search="true"></select>--%>
<%--<input type="text" class="form-control input-sm inputValue" id="inpatient_no" onkeyup="getInpatientNoContents('inpatient_no')" onfocus="getInpatientNoContents('inpatient_no')" onblur="clearContent('inpatient_no')"> <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="overflow:auto;"> <div id="inpatient_noDiv" style="position: absolute;z-index: 2000">
<table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0" <table id="inpatient_noContent_table" bgcolor="#FFFAFA" border="0"
cellspacing="0" cellpadding="0"> cellspacing="0" cellpadding="0">
<tbody id="inpatient_noContent"></tbody> <tbody id="inpatient_noContent"></tbody>
</table> </table>
</div>--%> </div>
</div> </div>
</div> </div>
</div> </div>

@ -43,6 +43,10 @@ $('#mytab').bootstrapTable({
align:'center', align:'center',
valign:'middle' valign:'middle'
}, },
{
field:'ids',
visible: false
},
{ {
field: 'no', field: 'no',
title: '序号', title: '序号',
@ -75,10 +79,16 @@ $('#mytab').bootstrapTable({
{ {
title:'类别', title:'类别',
field:'assortName', field:'assortName',
formatter:paramsMatter,
}, },
{ {
title:'文件名', title:'文件名',
field:'scanAddr', field:'scanPage',
formatter:paramsMatter,
},
{
title:'页数',
field:'printCount',
}, },
{ {
title:'用途', title:'用途',
@ -88,6 +98,10 @@ $('#mytab').bootstrapTable({
title:'操作时间', title:'操作时间',
field:'createTime', field:'createTime',
}, },
{
title:'ip地址',
field:'ip',
},
/*{ /*{
title:'操作', title:'操作',
field:'id', field:'id',
@ -120,12 +134,12 @@ $('#mytab').bootstrapTable({
//选中单个复选框 //选中单个复选框
onCheck:function(row){ onCheck:function(row){
var checks = $("#checks").val(); var checks = $("#checks").val();
$("#checks").val(checks+=row.id + ","); $("#checks").val(checks+=row.ids + ",");
}, },
//取消单个复选框 //取消单个复选框
onUncheck:function(row){ onUncheck:function(row){
var checks = $("#checks").val(); var checks = $("#checks").val();
checks = checks.replace(row.id + ","); checks = checks.replace(row.ids + ",");
$("#checks").val(checks); $("#checks").val(checks);
}, },
//全选 //全选
@ -134,7 +148,7 @@ $('#mytab').bootstrapTable({
var checks = ''; var checks = '';
for(var i=0;i<rows.length;i++) for(var i=0;i<rows.length;i++)
{ {
checks += rows[i].id + "," checks += rows[i].ids + ","
} }
$("#checks").val(checks); $("#checks").val(checks);
}, },
@ -157,6 +171,11 @@ $('#mytab').bootstrapTable({
pageNumber = num; pageNumber = num;
} }
}) })
//格式化
function paramsMatter(value) {
value = '<p class="hidden-xs" title="'+value+'">'+value+'</p>'
return value;
}
//查询按钮 //查询按钮
function refreshTable(){ function refreshTable(){
$("#checks").val(""); $("#checks").val("");
@ -168,9 +187,10 @@ function refreshTable(){
//导出excel功能 //导出excel功能
function exportExcelCommom(reqUrl){ function exportExcelCommom(reqUrl){
var checks = $("#checks").val(); var checks = $("#checks").val();
var operType = $("#operType").val();
if(checks != '') { if(checks != '') {
checks = checks.substring(0, checks.length - 1); checks = checks.substring(0, checks.length - 1);
var url = path+reqUrl+"?checks="+checks+"&flag="+$("#flag").val(); var url = path+reqUrl+"?checks="+checks+"&flag="+$("#flag").val()+"&operType="+operType;
window.location.href = url; window.location.href = url;
}else{ }else{
Common.confirm({ Common.confirm({
@ -181,7 +201,7 @@ function exportExcelCommom(reqUrl){
var url = path+reqUrl+"?startTime="+$("#startTime1").val()+"&endTime="+$("#endTime1").val() var url = path+reqUrl+"?startTime="+$("#startTime1").val()+"&endTime="+$("#endTime1").val()
+"&creater="+$("#creater").val()+"&name="+$("#name").val() +"&creater="+$("#creater").val()+"&name="+$("#name").val()
+"&operType="+$("#operType").val()+"&assortId="+$("#assortId").val() +"&operType="+$("#operType").val()+"&assortId="+$("#assortId").val()
+"&inpatientNo="+$("#inpatientNo").val()+"&flag="+$("#flag").val(); +"&inpatientNo="+$("#inpatientNo").val()+"&flag="+$("#flag").val()+"&operType="+operType;
window.open(url); window.open(url);
} }
} }

@ -20,7 +20,7 @@ $(function () {
//加载手术字典 //加载手术字典
loadOperate(); loadOperate();
//加载inpatientNo //加载inpatientNo
loadInpatientNo(); //loadInpatientNo();
}); });
//加载性别 //加载性别
function loadSex() { function loadSex() {
@ -126,9 +126,9 @@ function loadDiag() {
url: path + '/commom/getIcdCodeList', url: path + '/commom/getIcdCodeList',
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
if (data != null) {
$("#diag_code").empty(); $("#diag_code").empty();
$("#diag_name").empty(); $("#diag_name").empty();
if (data != null) {
var codeHtml = '<option value=""></option>'; var codeHtml = '<option value=""></option>';
var nameHtml = '<option value=""></option>'; var nameHtml = '<option value=""></option>';
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save