完善优化代码(可能出错)

master
zengwh 6 years ago
parent 44d4571c2e
commit 5174791347

@ -1,8 +1,8 @@
package com.emr.controller;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.ArchiveFlowInfoService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil1;
import com.emr.vo.ArchiveFlowInfoVo;
import com.github.pagehelper.Page;
@ -55,7 +55,7 @@ public class ArchiveFlowInfoController {
*/
@RequestMapping(value = "selectFlowInfoList")
@ResponseBody
public OffsetLimitPage selectFlowInfoList(Integer offset, Integer limit, ArchiveFlowInfoVo flowInfoVo,Integer isSearch) throws Exception{
public OffsetLimitPage selectFlowInfoList(Integer offset, Integer limit, ArchiveFlowInfoVo flowInfoVo,Integer isSearch){
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
flowInfoVo.setDisStartDate(null);
@ -64,8 +64,14 @@ public class ArchiveFlowInfoController {
flowInfoVo.setEndDate(null);
}
PageHelper.offsetPage(offset,limit);
List<ArchiveFlowInfoVo> list = flowInfoService.selectFlowInfoList(flowInfoVo,null);
return new OffsetLimitPage((Page) list);
try {
List<ArchiveFlowInfoVo> list = flowInfoService.selectFlowInfoList(flowInfoVo,null);
return new OffsetLimitPage((Page) list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
@ -78,7 +84,7 @@ public class ArchiveFlowInfoController {
*/
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcel(HttpServletResponse response, ArchiveFlowInfoVo flowInfoVo,String sql, Integer isSearch) throws Exception{
public void exportExcel(HttpServletResponse response, ArchiveFlowInfoVo flowInfoVo,String sql, Integer isSearch){
//全部明细
String tableThNames = "";
String fieldCns = "";
@ -92,12 +98,17 @@ public class ArchiveFlowInfoController {
flowInfoVo.setStartDate(null);
flowInfoVo.setEndDate(null);
}
List<ArchiveFlowInfoVo> list = flowInfoService.selectFlowInfoList(flowInfoVo,sql);
//文件名
String fileName = "审核流程明细(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<ArchiveFlowInfoVo> list = flowInfoService.selectFlowInfoList(flowInfoVo,sql);
//文件名
String fileName = "审核流程明细(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
}

@ -8,12 +8,12 @@ package com.emr.controller;
import com.emr.entity.Emr_Dictionary;
import com.emr.service.Emr_DictionaryService;
import com.emr.util.ExceptionPrintUtil;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
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;
@ -28,23 +28,34 @@ public class DictionaryController {
private Emr_DictionaryService emrDictionaryService;
@RequestMapping(value = "/dictionarys")
public String inHospitals(Model model) {
public String inHospitals() {
return "dictionaryDir/dictionary";
}
@ResponseBody
@RequestMapping(value = "/dicList")
public List<Emr_Dictionary> dicList(Emr_Dictionary emrDictionary) {
return emrDictionaryService.dicByClo(emrDictionary);
public List<Emr_Dictionary> dicList(Emr_Dictionary emrDictionary){
try {
return emrDictionaryService.dicByClo(emrDictionary);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/delById")
public int delById(Integer id) {
int bol = 0;
if (id != null) {
//删除
bol = emrDictionaryService.delById(id);
try {
if (id != null) {
//删除
bol = emrDictionaryService.delById(id);
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return bol;
}
@ -62,61 +73,61 @@ public class DictionaryController {
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
if(emrDictionary.getId()!=null){
//判断类别代码或代码是否已经存在
//存在修改
emrDictionary.setUpdater(username);
emrDictionary.setUpdateTime(nowTime);
try{
try{
if(emrDictionary.getId()!=null){
//判断类别代码或代码是否已经存在
//存在修改
emrDictionary.setUpdater(username);
emrDictionary.setUpdateTime(nowTime);
bol=emrDictionaryService.updateCloById(emrDictionary);
}catch (Exception e){
e.printStackTrace();
}
if (bol == 1) {
result = "修改成功!";
} else {
result = "修改失败!";
}
}else{
emrDictionary.setCreater(username);
emrDictionary.setCreateTime(nowTime);
//判断类别代码或代码是否已经存在
if(emrDictionary.getCode()!=null && emrDictionary.getCode()!=""){
dic2.setCode(emrDictionary.getCode());
dic2.setParentId(emrDictionary.getParentId());
//根据代码查询该父类下是否存在是否已经存在
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(dic2);
//添加叶子节点
if(list.size()<=0){
//添加叶子
bol = emrDictionaryService.insertSel(emrDictionary);
if(bol==1){
result = "添加成功!";
if (bol == 1) {
result = "修改成功!";
} else {
result = "修改失败!";
}
}else{
emrDictionary.setCreater(username);
emrDictionary.setCreateTime(nowTime);
//判断类别代码或代码是否已经存在
if(emrDictionary.getCode()!=null && emrDictionary.getCode()!=""){
dic2.setCode(emrDictionary.getCode());
dic2.setParentId(emrDictionary.getParentId());
//根据代码查询该父类下是否存在是否已经存在
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(dic2);
//添加叶子节点
if(list.size()<=0){
//添加叶子
bol = emrDictionaryService.insertSel(emrDictionary);
if(bol==1){
result = "添加成功!";
}else{
result = "添加失败!";
}
}else{
result = "添加失败";
result="代码已存在";
}
}else{
result="代码已存在!";
}
}else{
dic2.setTypecode(emrDictionary.getTypecode());
//根据代码查询是否已经存在
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(dic2);
//添加叶子节点
if (list.size() <= 0) {
//emrDictionary.setEffective(1);
//添加类别
bol = emrDictionaryService.insertSel(emrDictionary);
if (bol == 1) {
result = "添加成功!";
dic2.setTypecode(emrDictionary.getTypecode());
//根据代码查询是否已经存在
List<Emr_Dictionary> list = emrDictionaryService.dicByClo(dic2);
//添加叶子节点
if (list.size() <= 0) {
//emrDictionary.setEffective(1);
//添加类别
bol = emrDictionaryService.insertSel(emrDictionary);
if (bol == 1) {
result = "添加成功!";
} else {
result = "添加失败!";
}
} else {
result = "添加失败";
result = "代码已存在";
}
} else {
result = "代码已存在!";
}
}
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return result;
}

@ -8,6 +8,7 @@ import com.emr.service.Archive_MasterService;
import com.emr.service.ipml.ArchiveOtherService;
import com.emr.service.ipml.TPrintinfoService;
import com.emr.service.ipml.ZdAssortService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
@ -24,6 +25,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -53,21 +56,18 @@ public class FontController {
private ArchiveOtherService archiveOtherService;
@RequestMapping("selectIsPrintByPatienId")
@ResponseBody
public Msg selectIsPrintByPatienId(String patientId){
public Msg selectIsPrintByPatienId(String patientId) throws Exception{
if(StringUtils.isBlank(patientId)){
return Msg.fail("参数patientId不能为空");
}
return printinfoService.selectIsPrintByPatienId(patientId);
}
/***************************提供第三方按多个分段id和记账号查询病历pdf***********************************/
/**
* idpdf
* */
@RequestMapping("showRecordByPatientId")
public String showRecordByPatientId(String userName, String assortIds, String patientId, Model model) throws Exception{
public String showRecordByPatientId(String userName, String assortIds, String patientId, Model model){
//判断各参数
if(StringUtils.isBlank(userName)){
return retrunErrorPage(model,"工号不能为空!");
@ -80,23 +80,28 @@ public class FontController {
}
List<Archive_Master> list = new ArrayList<>();
//判断工号是否存在
String checkUserName = checkUserName(userName);
if(StringUtils.isNotBlank(checkUserName)){
return retrunErrorPage(model,checkUserName);
}
//判断分类id是否存在,协商assortIds = "00000000"为查询全部
if(!allAddortIds.equals(assortIds)) {
String checkAssortIds = checkAssortIds(assortIds);
if (StringUtils.isNotBlank(checkAssortIds)) {
return retrunErrorPage(model, checkAssortIds);
try {
String checkUserName = checkUserName(userName);
if(StringUtils.isNotBlank(checkUserName)){
return retrunErrorPage(model,checkUserName);
}
}
//判断记账号是否存在
Archive_Master master = new Archive_Master();
master.setPatientId(patientId);
list = archiveMasterService.selectByObject(master);
if(null == list || list.isEmpty()){
return retrunErrorPage(model,"记账号不存在!");
//判断分类id是否存在,协商assortIds = "00000000"为查询全部
if(!allAddortIds.equals(assortIds)) {
String checkAssortIds = checkAssortIds(assortIds);
if (StringUtils.isNotBlank(checkAssortIds)) {
return retrunErrorPage(model, checkAssortIds);
}
}
//判断记账号是否存在
Archive_Master master = new Archive_Master();
master.setPatientId(patientId);
list = archiveMasterService.selectByObject(master);
if(null == list || list.isEmpty()){
return retrunErrorPage(model,"记账号不存在!");
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
model.addAttribute("patientId",list.get(0).getId());
model.addAttribute("accountNumber",list.get(0).getPatientId());
@ -107,24 +112,29 @@ public class FontController {
/**
*
*/
private String checkUserName(String userName) throws Exception{
private String checkUserName(String userName){
String resultString = "";
String url = powerUrlHead + "/font/checkUserName?userName=" + userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
int temp = 200;
if (response.getStatusLine().getStatusCode() == temp) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
if (StringUtils.isNoneBlank(resultString)) {
JSONObject jsonObject = JSONObject.fromObject(resultString);
Integer code = jsonObject.getInt("code");
//code==200有错误信息
if(code == temp){
JSONObject extendObject1 = JSONObject.fromObject(jsonObject);
return extendObject1.getString("msg");
try {
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
int temp = 200;
if (response.getStatusLine().getStatusCode() == temp) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
if (StringUtils.isNoneBlank(resultString)) {
JSONObject jsonObject = JSONObject.fromObject(resultString);
int code = jsonObject.getInt("code");
//code==200有错误信息
if(code == temp){
JSONObject extendObject1 = JSONObject.fromObject(jsonObject);
return extendObject1.getString("msg");
}
}
} catch (IOException e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return null;
}
@ -135,21 +145,27 @@ public class FontController {
private String checkAssortIds(String assortIds){
Zd_Assort assort = new Zd_Assort();
assort.setPrintFlag("0");
List<Zd_Assort> assortList = assortService.selectAll(assort);
List<Zd_Assort> assortList = null;
try {
assortList = assortService.selectAll(assort);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
if(null != assortList && !assortList.isEmpty()){
String[] split = assortIds.split(",");
for (int i = 0; i < split.length; i++) {
for (String s : split) {
//定义分类存在
boolean exist = false;
if(StringUtils.isNotBlank(split[i])){
for (int j = 0; j < assortList.size(); j++) {
if(split[i].equals(assortList.get(j).getAssortId())){
if (StringUtils.isNotBlank(s)) {
for (Zd_Assort assort1 : assortList) {
if (s.equals(assort1.getAssortId())) {
exist = true;
break;
}
}
}
if(!exist){
if (!exist) {
return "病案分类Id有误!";
}
}
@ -174,28 +190,34 @@ public class FontController {
*/
@ResponseBody
@RequestMapping(value = "/getRecord")
public String getPdfToPdf(String masterId) throws Exception{
Archive_Master archiveMaster = archiveMasterService.selectByPrimaryKey(masterId);
//转换科室数据字典
if(StringUtils.isNotBlank(archiveMaster.getDeptName())){
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setCode(archiveMaster.getDeptName());
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
if(null != dictionaries && !dictionaries.isEmpty()){
archiveMaster.setDeptName(dictionaries.get(0).getName());
}
//判断出院日期
String dischargeDateTime = archiveMaster.getDischargeDateTime();
if(StringUtils.isNotBlank(dischargeDateTime)){
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
String time = fmt.format(fmt.parse(dischargeDateTime));
if("1801-02-03".equals(time)){
archiveMaster.setDischargeDateTime(null);
public String getPdfToPdf(String masterId){
try {
Archive_Master archiveMaster = archiveMasterService.selectByPrimaryKey(masterId);
//转换科室数据字典
if(StringUtils.isNotBlank(archiveMaster.getDeptName())){
Emr_Dictionary dictionary = new Emr_Dictionary();
dictionary.setCode(archiveMaster.getDeptName());
dictionary.setTypecode("dept_code");
List<Emr_Dictionary> dictionaries = dictionaryMapper.dicByTypeCode(dictionary);
if(null != dictionaries && !dictionaries.isEmpty()){
archiveMaster.setDeptName(dictionaries.get(0).getName());
}
//判断出院日期
String dischargeDateTime = archiveMaster.getDischargeDateTime();
if(StringUtils.isNotBlank(dischargeDateTime)){
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
String time = fmt.format(fmt.parse(dischargeDateTime));
if("1801-02-03".equals(time)){
archiveMaster.setDischargeDateTime(null);
}
}
}
return JSON.toJSONString(archiveMaster);
} catch (ParseException e) {
ExceptionPrintUtil.printException(e);
//e.printStackTrace();
return null;
}
return JSON.toJSONString(archiveMaster);
}
/**
@ -210,19 +232,24 @@ public class FontController {
if(StringUtils.isNotBlank(patientId) && StringUtils.isNotBlank(assortIds)){
List<Archive_Detail> list = new ArrayList<>();
//assortIds等于协商的全查的分类id全查
if(allAddortIds.equals(assortIds)){
list = archiveDetailService.selectTypeTreeByPatientIdAndAssortIds(patientId, null);
}else{
//否则按条件查
//分类id分别以单引号隔开
String assortIdStr = "";
String[] split = assortIds.split(",");
for (int i = 0; i < split.length; i++) {
assortIdStr += "'" + split[i] + "',";
try {
if(allAddortIds.equals(assortIds)){
list = archiveDetailService.selectTypeTreeByPatientIdAndAssortIds(patientId, null);
}else{
//否则按条件查
//分类id分别以单引号隔开
StringBuilder assortIdStr = new StringBuilder();
String[] split = assortIds.split(",");
for (String s : split) {
assortIdStr.append("'").append(s).append("',");
}
//去掉最后一个逗号
assortIdStr = new StringBuilder(assortIdStr.substring(0, assortIdStr.length() - 1));
list = archiveDetailService.selectTypeTreeByPatientIdAndAssortIds(patientId, assortIdStr.toString());
}
//去掉最后一个逗号
assortIdStr = assortIdStr.substring(0,assortIdStr.length()-1);
list = archiveDetailService.selectTypeTreeByPatientIdAndAssortIds(patientId,assortIdStr);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
if(null != list && !list.isEmpty()){
Set<String> assortList = new LinkedHashSet<>();
@ -289,7 +316,12 @@ public class FontController {
@ResponseBody
@RequestMapping(value = "/getPdfToPdf/{masterId}/{detailIds}")
public void getPdfToPdf(HttpServletResponse response,@PathVariable("detailIds") String detailIds, @PathVariable("masterId") String masterId){
archiveDetailService.selectPdfPathByIds(response, detailIds, masterId,pdfWater);
try {
archiveDetailService.selectPdfPathByIds(response, detailIds, masterId,pdfWater);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
//e.printStackTrace();
}
}
/**
*

@ -13,20 +13,17 @@ package com.emr.controller;
* @Version: 1.0
*/
import com.alibaba.fastjson.support.spring.FastJsonJsonView;
import org.apache.log4j.Logger;
import com.emr.util.ExceptionPrintUtil;
import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.Map;
@ControllerAdvice
public class GlobalExceptionHandler {
private static Logger log = Logger.getLogger("errorMsg");
@ExceptionHandler(value = Exception.class)//指定拦截的异常
public ModelAndView errorHandler(Exception e){
return returnMv(e,"服务器出错了,请联系系统管理员");
@ -48,11 +45,7 @@ public class GlobalExceptionHandler {
attributes.put("msg", msg);
view.setAttributesMap(attributes);
mv.setView(view);
//方法名
ByteArrayOutputStream baos = new ByteArrayOutputStream();
e.printStackTrace(new PrintStream(baos));
String exception = baos.toString();
log.error(exception);
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return mv;
}

@ -3,6 +3,7 @@ package com.emr.controller;
import com.emr.entity.EmrHolidaySetVo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.HolidaySetService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -22,7 +23,13 @@ public class HolidaySetController {
@ResponseBody
@RequestMapping(value = "getHolidaySetList")
public OffsetLimitPage getHolidaySetList(EmrHolidaySetVo holidaySetVo) {
return holidaySetService.selectByColumn(holidaySetVo);
try {
return holidaySetService.selectByColumn(holidaySetVo);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@RequestMapping("save")

@ -34,10 +34,6 @@ public class JAXDynamicClientFactory extends DynamicClientFactory {
return true;
}
public static JAXDynamicClientFactory newInstance(Bus b) {
return new JAXDynamicClientFactory(b);
}
public static JAXDynamicClientFactory newInstance() {
Bus bus = CXFBusFactory.getThreadDefaultBus();
return new JAXDynamicClientFactory(bus);

@ -49,15 +49,25 @@ public class LoginController {
String requestUrl = POWER_URLHEAD + "/font/getToken?userName="+userName+"&password="+token;
JSONObject obj = HttpClientUtils.httpGet(requestUrl);
if(obj!=null) {
if ((obj.getString("code")).equals("100")) {
if ("100".equals(obj.getString("code"))) {
JSONObject extend = obj.getJSONObject("extend");
token = extend.getString("token");
}
}
}
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
Object[] objects = new Object[0];
Client client = null;
try {
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
} catch (Exception e) {
e.printStackTrace();
} finally {
if(null != client) {
client.destroy();
}
}
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session

@ -10,6 +10,7 @@ import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.ipml.ArchiveCallbackInfoService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
import org.apache.commons.lang3.StringUtils;
@ -55,21 +56,32 @@ public class MedicalRecallController {
@RequestMapping(value = "/recallList")
public OffsetLimitPage recallList(Archive_Master_Vo master, Integer offset, Integer limit) {
//查询已归档记录
return archiveMasterService.selectFiled(master, offset, limit);
try {
return archiveMasterService.selectFiled(master, offset, limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo master) throws Exception {
public void exportExcel(HttpServletResponse response, Archive_Master_Vo master){
String tableThNames = "住院号,住院次数,名字,性别,入院科室,入院日期,出院科室,出院日期,上次召回状态,归档状态";
String fieldCns = "inpNo,visitId,name,sex,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,status,archivestate";
List<Archive_Master_Vo> list = archiveMasterMapper.selectFiled(master);
//文件名
String fileName = "归档记录" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<Archive_Master_Vo> list = archiveMasterMapper.selectFiled(master);
//文件名
String fileName = "归档记录" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
@ResponseBody

@ -3,6 +3,7 @@ package com.emr.controller;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.StatisticsService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil1;
import com.emr.vo.FinalAndFirstStatistics;
import com.emr.vo.TUuInfoVo;
@ -89,14 +90,20 @@ public class StatisticsController {
//终审按天统计
@RequestMapping("getFinalStatistics")
@ResponseBody
public OffsetLimitPage getFinalStatistics(HttpServletRequest request,Integer offset, Integer limit, String startDate, String endDate,Integer isSearch){
public OffsetLimitPage getFinalStatistics(Integer offset, Integer limit, String startDate, String endDate,Integer isSearch){
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
startDate = null;
endDate = null;
}
List<FinalAndFirstStatistics> list = statisticsService.getFinalStatistics(offset, limit, startDate, endDate,null);
return new OffsetLimitPage((Page)list);
try {
List<FinalAndFirstStatistics> list = statisticsService.getFinalStatistics(offset, limit, startDate, endDate,null);
return new OffsetLimitPage((Page)list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//初审按天统计
@ -108,11 +115,16 @@ public class StatisticsController {
startDate = null;
endDate = null;
}
List<FinalAndFirstStatistics> list = statisticsService.getFirstStatistics(request, offset, limit, startDate, endDate,null);
return new OffsetLimitPage((Page) list);
try {
List<FinalAndFirstStatistics> list = statisticsService.getFirstStatistics( offset, limit, startDate, endDate,null);
return new OffsetLimitPage((Page) list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//审核明细
@RequestMapping("getStatisticsDetail")
@ResponseBody
@ -124,13 +136,19 @@ public class StatisticsController {
archiveMasterVo.setStartDate(null);
archiveMasterVo.setEndDate(null);
}
return statisticsService.getStatisticsDetail(offset,limit,disStartDate,disEndDate,archiveMasterVo,flag);
try {
return statisticsService.getStatisticsDetail(offset,limit,disStartDate,disEndDate,archiveMasterVo,flag);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//导出终审统计
@RequestMapping("exportExcelFinalStatistics")
@ResponseBody
public void exportExcelFinalStatistics(HttpServletResponse response,Integer offset, Integer limit, String startDate, String endDate,String sql,Integer isSearch) throws Exception{
public void exportExcelFinalStatistics(HttpServletResponse response,Integer offset, Integer limit, String startDate, String endDate,String sql,Integer isSearch){
//全部明细
String tableThNames = "工号,姓名,终审日期,终审数量";
String fieldCns = "checkCode,checkName,createTime,count";
@ -139,19 +157,24 @@ public class StatisticsController {
startDate = null;
endDate = null;
}
List<FinalAndFirstStatistics> list = statisticsService.getFinalStatistics(offset, limit, startDate, endDate,sql);
//文件名
String fileName = "终审记录统计报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<FinalAndFirstStatistics> list = statisticsService.getFinalStatistics(offset, limit, startDate, endDate,sql);
//文件名
String fileName = "终审记录统计报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//导出初审统计
@RequestMapping("exportExcelFirstStatistics")
@ResponseBody
public void exportExcelFirstStatistics(HttpServletRequest request,HttpServletResponse response,Integer offset, Integer limit, String startDate, String endDate,String sql,Integer isSearch) throws Exception{
public void exportExcelFirstStatistics(HttpServletRequest request,HttpServletResponse response,Integer offset, Integer limit, String startDate, String endDate,String sql,Integer isSearch){
//全部明细
String tableThNames = "工号,姓名,审核日期,审核数量";
String fieldCns = "checkCode,checkName,createTime,count";
@ -160,19 +183,24 @@ public class StatisticsController {
startDate = null;
endDate = null;
}
List<FinalAndFirstStatistics> list = statisticsService.getFirstStatistics(request, offset, limit, startDate, endDate,sql);
//文件名
String fileName = "病案室审核记录统计表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<FinalAndFirstStatistics> list = statisticsService.getFirstStatistics(offset, limit, startDate, endDate,sql);
//文件名
String fileName = "病案室审核记录统计表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//导出审核明细
@RequestMapping("exportExcelDetail")
@ResponseBody
public void exportExcelDetail(HttpServletResponse response,String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo, Integer flag,String sql,Integer isSearch) throws Exception{
public void exportExcelDetail(HttpServletResponse response,String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo, Integer flag,String sql,Integer isSearch){
//全部明细
String tableThNames = "";
String fieldCns = "";
@ -191,13 +219,18 @@ public class StatisticsController {
archiveMasterVo.setStartDate(null);
archiveMasterVo.setEndDate(null);
}
List<Archive_Master_Vo> list = statisticsService.getDetailList(disStartDate, disEndDate, archiveMasterVo,flag,sql);
//文件名
String fileName = "病案室审核记录明细报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<Archive_Master_Vo> list = statisticsService.getDetailList(disStartDate, disEndDate, archiveMasterVo,flag,sql);
//文件名
String fileName = "病案室审核记录明细报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//复印记录报表
@ -208,8 +241,14 @@ public class StatisticsController {
PageHelper.offsetPage(offset, limit);
}
judgeIsSearch(search, isSearch);
List<TUuPrintVo> list = statisticsService.getPrintCount(search);
return new OffsetLimitPage((Page)list);
try {
List<TUuPrintVo> list = statisticsService.getPrintCount(search);
return new OffsetLimitPage((Page)list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//判断初始化查询是否按时间条件查询
@ -228,8 +267,14 @@ public class StatisticsController {
PageHelper.offsetPage(offset, limit);
}
judgeIsSearch(search, isSearch);
List<TUuPrintVo> list = statisticsService.getPrintInfo(search);
return new OffsetLimitPage((Page)list);
try {
List<TUuPrintVo> list = statisticsService.getPrintInfo(search);
return new OffsetLimitPage((Page)list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//扫描记录报表
@ -240,8 +285,14 @@ public class StatisticsController {
PageHelper.offsetPage(offset, limit);
}
judgeIsSearch(search, isSearch);
List<TUuInfoVo> list = statisticsService.getScanCount(search);
return new OffsetLimitPage((Page)list);
try {
List<TUuInfoVo> list = statisticsService.getScanCount(search);
return new OffsetLimitPage((Page)list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//扫描记录明细
@ -252,75 +303,101 @@ public class StatisticsController {
PageHelper.offsetPage(offset, limit);
}
judgeIsSearch(search, isSearch);
List<TUuInfoVo> list = statisticsService.getScanInfo(search);
return new OffsetLimitPage((Page)list);
try {
List<TUuInfoVo> list = statisticsService.getScanInfo(search);
return new OffsetLimitPage((Page)list);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
//导出复印记录报表
@RequestMapping("exportExcelPrintCount")
@ResponseBody
public void exportExcelPrintCount(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{
public void exportExcelPrintCount(HttpServletResponse response,TUuPrintSearch search,Integer isSearch){
judgeIsSearch(search, isSearch);
//全部明细
String tableThNames = "记账号,住院号,住院次数,患者,复印日期,操作人,复印次数";
String fieldCns = "patientId,inpNo,visitId,hzname,printTime,cpyuser,printCount";
List<TUuPrintVo> list = statisticsService.getPrintCount(search);
//文件名
String fileName = "复印记录报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<TUuPrintVo> list = statisticsService.getPrintCount(search);
//文件名
String fileName = "复印记录报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//导出复印记录明细
@RequestMapping("exportExcelPrintInfo")
@ResponseBody
public void exportExcelPrintInfo(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{
public void exportExcelPrintInfo(HttpServletResponse response,TUuPrintSearch search,Integer isSearch){
judgeIsSearch(search, isSearch);
//全部明细
String tableThNames = "记账号,住院号,住院次数,患者姓名,性别,入院时间,出院时间,出院科室,主管医生,复印内容,操作人,复印日期,修改标志";
String fieldCns = "patientId,inpNo,visitId,hzname,sex,admissionDateTime,dischargeDateTime,name,doctorInCharge,filetitle,cpyuser,printTime,flagCn";
List<TUuPrintVo> list = statisticsService.getPrintInfo(search);
//文件名
String fileName = "复印记录明细(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<TUuPrintVo> list = statisticsService.getPrintInfo(search);
//文件名
String fileName = "复印记录明细(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//导出扫描记录报表
@RequestMapping("exportExcelScanCount")
@ResponseBody
public void exportExcelScanCount(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{
public void exportExcelScanCount(HttpServletResponse response,TUuPrintSearch search,Integer isSearch){
judgeIsSearch(search, isSearch);
//全部明细
String tableThNames = "扫描人,扫描日期,扫描次数";
String fieldCns = "uuname,uploaddatetime,scanCount";
List<TUuInfoVo> list = statisticsService.getScanCount(search);
//文件名
String fileName = "扫描上传记录报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<TUuInfoVo> list = statisticsService.getScanCount(search);
//文件名
String fileName = "扫描上传记录报表(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//导出扫描记录明细
@RequestMapping("exportExcelScanInfo")
@ResponseBody
public void exportExcelScanInfo(HttpServletResponse response,TUuPrintSearch search,Integer isSearch) throws Exception{
public void exportExcelScanInfo(HttpServletResponse response,TUuPrintSearch search,Integer isSearch){
judgeIsSearch(search, isSearch);
//全部明细
String tableThNames = "记账号,住院号,住院次数,患者姓名,性别,入院时间,出院时间,出院科室,主管医生,扫描人,扫描时间";
String fieldCns = "patientId,inpNo,visitId,hzname,sex,admissionDateTime,dischargeDateTime,doctorDept,doctorInCharge,uuname,uploaddatetime";
List<TUuInfoVo> list = statisticsService.getScanInfo(search);
//文件名
String fileName = "扫描上传记录明细(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<TUuInfoVo> list = statisticsService.getScanInfo(search);
//文件名
String fileName = "扫描上传记录明细(" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ").xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
}

@ -6,6 +6,7 @@
*/
package com.emr.controller;
import com.emr.util.ExceptionPrintUtil;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -32,80 +33,92 @@ public class UploadFilesController {
* @throws IOException
*/
@RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
public void uploadImg(HttpServletResponse resp, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
public void uploadImg(HttpServletResponse resp, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file){
resp.setContentType("text/json");
resp.setCharacterEncoding("utf-8");
PrintWriter pw = null;
pw = resp.getWriter();
if (!file.isEmpty()) {
logger.info("成功获取照片");
String fileName = file.getOriginalFilename();
String path = null;
String type = null;
if (fileName != null) {
type = fileName.contains(".") ? fileName.substring(fileName.lastIndexOf(".") + 1) : null;
}
logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("PDF".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
// 自定义的文件名称
String trueFileName = System.currentTimeMillis() + fileName;
// 设置存放图片文件的路径
path = realPath + "/static/img/uploads/" + trueFileName;
logger.info("存放图片文件的路径:" + path);
file.transferTo(new File(path));
logger.info("文件成功上传到指定目录下");
try {
pw = resp.getWriter();
if (!file.isEmpty()) {
logger.info("成功获取照片");
String fileName = file.getOriginalFilename();
String type = null;
if (fileName != null) {
type = fileName.contains(".") ? fileName.substring(fileName.lastIndexOf(".") + 1) : null;
}
logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("PDF".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
// 自定义的文件名称
String trueFileName = System.currentTimeMillis() + fileName;
// 设置存放图片文件的路径
String path = realPath + "/static/img/uploads/" + trueFileName;
logger.info("存放图片文件的路径:" + path);
file.transferTo(new File(path));
logger.info("文件成功上传到指定目录下");
} else {
logger.info("不是PDF文件类型,请按要求重新上传");
pw.print("文件类型有误,请重新上传");
}
} else {
logger.info("不是PDF文件类型,请按要求重新上传");
pw.print("文件类型有误,请重新上传");
logger.info("文件类型为空");
pw.print("文件类型为空");
}
} else {
logger.info("文件类型为空");
pw.print("文件类型为空");
logger.info("没有找到相对应的文件");
pw.print("没有找到相对应的文件");
}
} catch (IOException e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}finally {
if(null != pw) {
pw.flush();
pw.close();
}
} else {
logger.info("没有找到相对应的文件");
pw.print("没有找到相对应的文件");
}
pw.flush();
}
@ResponseBody
@RequestMapping("upload")
public String upload(HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException {
request.setCharacterEncoding("UTF-8");
public String upload(HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file){
logger.info("执行图片上传");
String userId = request.getParameter("userId");
logger.info("userId:" + userId);
if (!file.isEmpty()) {
logger.info("成功获取照片");
String fileName = file.getOriginalFilename();
String path = null;
String type = null;
if (fileName != null) {
type = fileName.contains(".") ? fileName.substring(fileName.lastIndexOf(".") + 1) : null;
}
logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("GIF".equals(type.toUpperCase()) || "PNG".equals(type.toUpperCase()) || "JPG".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
// 自定义的文件名称
String trueFileName = System.currentTimeMillis() + fileName;
// 设置存放图片文件的路径
path = realPath + "/uploads/" + trueFileName;
logger.info("存放图片文件的路径:" + path);
file.transferTo(new File(path));
logger.info("文件成功上传到指定目录下");
try {
if (fileName != null) {
type = fileName.contains(".") ? fileName.substring(fileName.lastIndexOf(".") + 1) : null;
}
logger.info("图片初始名称为:" + fileName + " 类型为:" + type);
if (type != null) {
if ("GIF".equals(type.toUpperCase()) || "PNG".equals(type.toUpperCase()) || "JPG".equals(type.toUpperCase())) {
// 项目在容器中实际发布运行的根路径
String realPath = request.getSession().getServletContext().getRealPath("/");
// 自定义的文件名称
String trueFileName = System.currentTimeMillis() + fileName;
// 设置存放图片文件的路径
String path = realPath + "/uploads/" + trueFileName;
logger.info("存放图片文件的路径:" + path);
file.transferTo(new File(path));
logger.info("文件成功上传到指定目录下");
} else {
logger.info("不是我们想要的文件类型,请按要求重新上传");
return "error";
}
} else {
logger.info("不是我们想要的文件类型,请按要求重新上传");
logger.info("文件类型为空");
return "error";
}
} else {
logger.info("文件类型为空");
return "error";
} catch (IOException e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
} else {
logger.info("没有找到相对应的文件");

@ -6,7 +6,10 @@
*/
package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.emr.entity.Power_User;
import com.emr.util.HttpClientTool;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
@ -15,6 +18,8 @@ import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
public class UrlInterceptor implements HandlerInterceptor {
@Value("${POWER_URLHEAD}")
@ -29,29 +34,30 @@ public class UrlInterceptor implements HandlerInterceptor {
String token = (String) request.getSession().getAttribute("token");
if (!"/login".equals(url) && StringUtils.isNoneBlank(token)) {
try {
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session
request.getSession().setAttribute("CURRENT_USER", powerUser);
if (null == powerUser.getUserId()) {
response.sendRedirect( "/emr_medical_record/error.jsp");
return false;
// 创建url
String requestUrl = POWER_URLHEAD + "/font/checkToken";
// 执行请求
Map<String, String> params = new HashMap<>();
params.put("token", token);
String resultString = HttpClientTool.doPost(requestUrl, params);
String code = JSONArray.toJSONString(JSON.parseObject(resultString).get("code"));
if ("200".equals(code)) {
response.sendRedirect(POWER_URLHEAD + "/login");
}
//更新session
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
request.getSession().setAttribute("CURRENT_USER", user);
} catch (Exception e) {
try {
response.sendRedirect("/emr_medical_record/error.jsp");
}catch (Exception e1){}
e.printStackTrace();
return false;
try {
response.sendRedirect(POWER_URLHEAD + "/login");
}catch (Exception e1){
e1.printStackTrace();
}
}
}
return true;
}
}

@ -9,6 +9,7 @@ package com.emr.controller;
import com.emr.dao.Archive_MasterMapper;
import com.emr.entity.*;
import com.emr.service.*;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.ExportExcelUtil1;
import com.emr.vo.DeptStatistics;
@ -48,83 +49,105 @@ public class VCountController {
@ResponseBody
@RequestMapping(value = "/vCountList")
public OffsetLimitPage faultList(V_CountVo vCount, Integer offset, Integer limit) {
return v_countService.selectPageByClo(vCount,offset, limit);
try {
return v_countService.selectPageByClo(vCount,offset, limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/vCountNumList")
public List<V_Count> medicalCountDayList(V_CountVo vCount){
//统计列表
return v_countService.selectByCol(vCount);
try {
//统计列表
return v_countService.selectByCol(vCount);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, V_CountVo vCount) throws Exception {
public void exportExcel(HttpServletResponse response, V_CountVo vCount){
String tableThNames = "科室代码,科室名称,出院人数,已归档,未归档,死亡人数,归档率(%),2日率(%),3日率(%),7日率(%)";
String fieldCns = "deptCode,deptName,outNum,fileNum,unfileNum,deathNum,fileRate,day2Rate,day3Rate,day7Rate";
//构造excel的数据
List<V_Count> list = v_countService.selectByCol(vCount);
if(null != list && !list.isEmpty()){
for (V_Count count : list) {
Double fileRate = Double.valueOf(count.getFileRate())*100;
Double day2Rate = Double.valueOf(count.getDay2Rate())*100;
Double day3Rate = Double.valueOf(count.getDay3Rate())*100;
Double day7Rate = Double.valueOf(count.getDay7Rate())*100;
count.setFileRate(fileRate.intValue()+"%");
count.setDay2Rate(day2Rate.intValue()+"%");
count.setDay3Rate(day3Rate.intValue()+"%");
count.setDay7Rate(day7Rate.intValue()+"%");
try {
List<V_Count> list = v_countService.selectByCol(vCount);
if(null != list && !list.isEmpty()){
for (V_Count count : list) {
Double fileRate = Double.valueOf(count.getFileRate())*100;
Double day2Rate = Double.valueOf(count.getDay2Rate())*100;
Double day3Rate = Double.valueOf(count.getDay3Rate())*100;
Double day7Rate = Double.valueOf(count.getDay7Rate())*100;
count.setFileRate(fileRate.intValue()+"%");
count.setDay2Rate(day2Rate.intValue()+"%");
count.setDay3Rate(day3Rate.intValue()+"%");
count.setDay7Rate(day7Rate.intValue()+"%");
}
}
//文件名
String fileName = "统计数据" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
} catch (NumberFormatException e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
//文件名
String fileName = "统计数据" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil1 exportExcelUtil = new ExportExcelUtil1();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
}
@ResponseBody
@RequestMapping(value = "/exportExcel2")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo) throws Exception {
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo){
String tableThNames = "名字,入院科室,入院日期,出院科室,出院日期,主管医生";
String fieldCns = "name,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,doctorInCharge";
//构造excel的数据
List<Archive_Master_Vo> list = archiveMasterService.selectByUnfile(archiveMasterVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
for (int i = 0; i < list.size(); i++) {
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
//入院科室dept_admission_to
String dept2 = list.get(i).getDeptAdmissionTo();
if ((deptName != null && deptName.equals(dicList.get(k).getCode())) || (dept2 != null && dept2.equals(dicList.get(k).getCode()))) {
//出院科室
if(deptName != null) {
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
try {
List<Archive_Master_Vo> list = archiveMasterService.selectByUnfile(archiveMasterVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
for (int i = 0; i < list.size(); i++) {
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
//入院科室dept_admission_to
String dept2 = list.get(i).getDeptAdmissionTo();
if ((deptName != null && deptName.equals(dicList.get(k).getCode())) || (dept2 != null && dept2.equals(dicList.get(k).getCode()))) {
//出院科室
if(deptName != null) {
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
}
dept2 = dept2.replace(dept2, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(dept2);
}
dept2 = dept2.replace(dept2, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(dept2);
}
}
}
//文件名
String fileName = "未归档病历列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
//文件名
String fileName = "未归档病历列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
//跳转医生统计页面
@ -137,7 +160,13 @@ public class VCountController {
@RequestMapping("/getDoctorFileInfoIframe")
public String getDoctorFileInfoIframe(String deptCode,String doctor,String startTime,String endTime,Model model){
//科室医师明细
List<DoctorStatistics> list = archiveMasterMapper.getDoctorFileInfo(deptCode, doctor, startTime, endTime);
List<DoctorStatistics> list = null;
try {
list = archiveMasterMapper.getDoctorFileInfo(deptCode, doctor, startTime, endTime);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
//定义返回结果
List<DeptStatistics> deptList = new ArrayList<>();
if(null != list && !list.isEmpty()){

@ -31,9 +31,13 @@ public class WebServiceLoad {
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
try {
//动态调用getInfosByUserId方法
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
client.invoke("getInfosByUserId", token, "emr_medical_record");
} catch (Exception e) {
e.printStackTrace();
}finally {
if(null != client) {
client.destroy();
}
}
}).start();
}

@ -13,6 +13,7 @@ import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.service.ipml.ArchiveFlowInfoService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
import com.emr.util.OracleConnect;
@ -52,7 +53,7 @@ public class beHospitaledController {
@RequestMapping("getChecker")
@ResponseBody
public Msg getChecker(){
public Msg getChecker() throws Exception{
Msg role = archiveMasterService.getRole();
return Msg.success().add("checker",role.getCode());
}
@ -62,11 +63,10 @@ public class beHospitaledController {
*/
@RequestMapping("/getCurrentCodes")
@ResponseBody
public Msg getCurrentCodes(){
String result = "";
public Msg getCurrentCodes() throws Exception{
StringBuilder result = new StringBuilder();
Integer roleIndex = 0;
Msg role = new Msg();
role = archiveMasterService.getRole();
Msg role = archiveMasterService.getRole();
String currentCodes = role.getMsg();
if(StringUtils.isNotBlank(currentCodes)){
//查询集合
@ -78,16 +78,16 @@ public class beHospitaledController {
if(StringUtils.isNotBlank(code)) {
for (ArchiveFlowRole flowRole : archiveFlowRoles) {
if (StringUtils.isNotBlank(flowRole.getCode()) && code.equals(flowRole.getCode())) {
result += flowRole.getId() + ",";
result.append(flowRole.getId()).append(",");
roleIndex = flowRole.getStepIndex();
break;
}
}
}
}
if(result.endsWith(",")){
result = result.substring(0,result.length()-1);
role.setMsg(result);
if(result.toString().endsWith(",")){
result = new StringBuilder(result.substring(0, result.length() - 1));
role.setMsg(result.toString());
}
}
@ -97,18 +97,24 @@ public class beHospitaledController {
@ResponseBody
@RequestMapping(value = "/beHospList")
public OffsetLimitPage beHospList(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch) {
public OffsetLimitPage beHospList(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit,Integer isSearch){
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
return archiveMasterService.selectByColumn(archiveMasterVo, offset, limit);
try {
return archiveMasterService.selectByColumn(archiveMasterVo, offset, limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo,Integer isSearch) throws Exception {
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo,Integer isSearch){
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status";
//构造excel的数据
@ -116,13 +122,18 @@ public class beHospitaledController {
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
List<Archive_Master_Vo> list = archiveMasterService.selectByColumn(archiveMasterVo);
//文件名
String fileName = "出院浏览" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
try {
List<Archive_Master_Vo> list = archiveMasterService.selectByColumn(archiveMasterVo);
//文件名
String fileName = "出院浏览" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
}catch (Exception e){
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
/**
@ -140,122 +151,57 @@ public class beHospitaledController {
return archiveMasterService.updateStateByArchivId(master);
}
/*
@ResponseBody
@RequestMapping(value = "/updateStateByArchivId")
public String updateStateByArchivId(Emr_Fault_Detail emrFaultDetail) {
String result = "";
try{
//result = checkSuccessMethod(emrFaultDetail.getArchiveDetailId());
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(result.equals("完整")) {
//修改病案归档状态
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate(emrFaultDetail.getState());
//设置审核时间
archiveMaster.setCheckDatetime(format1.format(new Date()));
//设置审核人
archiveMaster.setCheckDoctor(username);
archiveMaster.setLockinfo(result);
int bol = archiveMasterService.updateByClo(archiveMaster);
//添加初审内容
if (bol == 1) {
String nowTime = format1.format(new Date());
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
emrFaultDetail.setState("未召回");
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}
}else{
//修改病案归档完整内容Lockinfo
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
//设置审核时间
archiveMaster.setCheckDatetime(format1.format(new Date()));
//设置审核人
archiveMaster.setCheckDoctor(username);
archiveMaster.setLockinfo(result);
archiveMasterService.updateByClo(archiveMaster);
}
return result;
}catch (Exception e){
e.printStackTrace();
}
return result;
}
*/
//校验完整性方法
//校验完整性
@ResponseBody
@RequestMapping(value = "/checkSuccess")
private String checkSuccessMethod(String archiveDetailId) throws Exception{
private String checkSuccessMethod(String archiveDetailId){
String result = "";
String endpoint = HomepageDictionary;
//String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
String method = HomepageMethod;
JAXDynamicClientFactory factory = JAXDynamicClientFactory.newInstance();
Client client = factory.createClient(endpoint);
Object[] res = null;
res = client.invoke(method, archiveDetailId);
result = (String) res[0];
//更新master表完整性字段
if(StringUtils.isNotBlank(result)){
//更新表
Archive_Master master = new Archive_Master();
master.setId(archiveDetailId);
master.setLockinfo(result);
archiveMasterService.updateByClo(master);
Client client = null;
try {
client = factory.createClient(endpoint);
Object[] res = client.invoke(method, archiveDetailId);
result = (String) res[0];
//更新master表完整性字段
if(StringUtils.isNotBlank(result)){
//更新表
Archive_Master master = new Archive_Master();
master.setId(archiveDetailId);
master.setLockinfo(result);
archiveMasterService.updateByClo(master);
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}finally {
if(null != client){
client.destroy();
}
}
return result;
}
/*@ResponseBody
@RequestMapping(value = "/forceWZ")
public String forceWZ(Emr_Fault_Detail emrFaultDetail) {
//修改病案归档状态
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate("初审");
archiveMaster.setLockinfo(emrFaultDetail.getContent());
try{
int bol = archiveMasterService.updateByClo(archiveMaster);
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
emrFaultDetail.setState("未召回");
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}catch (Exception e){
e.printStackTrace();
}
return "1";
}*/
//出院初审先查询his是否医生护士全部提交
@RequestMapping("getInfoFromHis")
@ResponseBody
//@DataSource(dataSource = "dataSource1")
public int getInfoFromHis(String patientId) throws Exception{
public int getInfoFromHis(String patientId){
String sql = "select fpatno from pacs.v_emrpatient where fpatno = '"+patientId+"'";
String str = OracleConnect.select(sql);
if(StringUtils.isNoneBlank(str)){
return 1;
}else{
try {
String str = OracleConnect.select(sql);
if(StringUtils.isNoneBlank(str)){
return 1;
}else{
return 0;
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return 0;
}
}
@ -267,10 +213,16 @@ public class beHospitaledController {
* @return
*/
@RequestMapping("toShowFlowInfo")
private String toShowFlowInfo(Archive_Master_Vo master,Model model){
private String toShowFlowInfo(Archive_Master_Vo master, Model model){
model.addAttribute("master",master);
//查询流程信息集合
List<ArchiveFlowInfoVo> list = flowInfoService.selectFlowInfoByMasterId(master.getId());
List<ArchiveFlowInfoVo> list = null;
try {
list = flowInfoService.selectFlowInfoByMasterId(master.getId());
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
model.addAttribute("list",list);
return "beHospitaledDir/timeLine";
}

@ -8,10 +8,10 @@ package com.emr.controller;
import com.emr.entity.*;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
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;
@ -38,11 +38,17 @@ public class faultController {
emrFaultVo.setStartDate(null);
emrFaultVo.setEndDate(null);
}
return emrFaultDetailService.selectByCol(emrFaultVo,offset, limit);
try {
return emrFaultDetailService.selectByCol(emrFaultVo,offset, limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Emr_Fault_Vo emrFaultVo,Integer isSearch) throws Exception{
public void exportExcel(HttpServletResponse response, Emr_Fault_Vo emrFaultVo,Integer isSearch){
String tableThNames = "住院号,住院次数,姓名,出院科室,出院日期,归档状态,评分,回退内容,缺陷选项,缺陷内容,创建时间,创建人";
String fieldCns = "inpNo,visitId,name,deptName,dischargeDateTime,archivestate,score,backContent,assortId,content,createTime,creater";
//构造excel的数据
@ -51,13 +57,18 @@ public class faultController {
emrFaultVo.setStartDate(null);
emrFaultVo.setEndDate(null);
}
List<Emr_Fault_Vo> list = emrFaultDetailService.selectByCol(emrFaultVo);
//文件名
String fileName = "缺陷信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
try {
List<Emr_Fault_Vo> list = emrFaultDetailService.selectByCol(emrFaultVo);
//文件名
String fileName = "缺陷信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
}

@ -8,6 +8,7 @@ package com.emr.controller;
import com.emr.entity.Emr_Fault_Type;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.util.ExceptionPrintUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -29,7 +30,13 @@ public class faultTypeController {
@ResponseBody
@RequestMapping(value = "/faultTypeList")
public List<Emr_Fault_Type> faultTypeList(Emr_Fault_Type emrFaultType) {
return emrFaultTypeService.selectByCol(emrFaultType);
try {
return emrFaultTypeService.selectByCol(emrFaultType);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@ -37,16 +44,21 @@ public class faultTypeController {
public int updateByClo(Emr_Fault_Type emrFaultType) {
int bol=0;
//判断id是否存在
if(emrFaultType.getId()!=null){
//判断是否存在记录
if (emrFaultTypeService.selectById(emrFaultType.getId()) != null) {
bol = emrFaultTypeService.updateByClo(emrFaultType);
try {
if(emrFaultType.getId()!=null){
//判断是否存在记录
if (emrFaultTypeService.selectById(emrFaultType.getId()) != null) {
bol = emrFaultTypeService.updateByClo(emrFaultType);
}
}else{
//不存在则添加缺陷类别记录
bol= emrFaultTypeService.insertClo(emrFaultType);
}
}else{
//不存在则添加缺陷类别记录
bol= emrFaultTypeService.insertClo(emrFaultType);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return bol;
return bol;
}
@ -54,10 +66,15 @@ public class faultTypeController {
@RequestMapping(value = "/delById")
public int delById(Integer id) {
int bol = 0;
//判断id是否存在
if (id!= null) {
//判断是否存在记录
bol = emrFaultTypeService.delById(id);
try {
//判断id是否存在
if (id!= null) {
//判断是否存在记录
bol = emrFaultTypeService.delById(id);
}
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
return bol;
}

File diff suppressed because it is too large Load Diff

@ -10,11 +10,11 @@ import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Msg;
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;
@ -36,7 +36,7 @@ public class lastVerifyController {
private Emr_Fault_DetailService emrFaultDetailService;
@RequestMapping(value = "/lastVerifys")
public String faults(Model model){
public String faults(){
return "lastVerifyDir/lastVerifyList";
}
@ -52,13 +52,18 @@ public class lastVerifyController {
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
OffsetLimitPage result = archiveMasterService.selectByLast(archiveMasterVo, offset, limit);
return result;
try {
return archiveMasterService.selectByLast(archiveMasterVo, offset, limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo,Integer isSearch) throws Exception {
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo,Integer isSearch){
//判断是否是初始化查询,是初始化查询把开始结束时间置空
if(isSearch == 0){
archiveMasterVo.setStartDateTo(null);
@ -66,30 +71,47 @@ public class lastVerifyController {
}
String tableThNames = "住院号,住院次数,名字,性别,出院科室,出院日期,主管医生,状态";
String fieldCns = "inpNo,visitId,name,sex,deptName,dischargeDateTime,doctorInCharge,status";
//构造excel的数据
List<Archive_Master_Vo> list = archiveMasterService.selectLastVerifyList(archiveMasterVo);
//文件名
String fileName = "病案室终审" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
try {
//构造excel的数据
List<Archive_Master_Vo> list = archiveMasterService.selectLastVerifyList(archiveMasterVo);
//文件名
String fileName = "病案室终审" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
response.setContentType("application/ms-excel;charset=gbk");
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
@ResponseBody
@RequestMapping(value = "/getFaultType")
public List<Emr_Fault_Type> getFaultType(Emr_Fault_Type emrFaultType) {
return emrFaultTypeService.selectByCol(emrFaultType);
try {
return emrFaultTypeService.selectByCol(emrFaultType);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/getDetailByArchId")
public Emr_Fault_Detail getDetailByArchId(Emr_Fault_Detail emrFaultDetail) {
return emrFaultDetailService.selectByArchiveDetailId(emrFaultDetail);
try {
return emrFaultDetailService.selectByArchiveDetailId(emrFaultDetail);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
/**
@ -110,39 +132,6 @@ public class lastVerifyController {
return Msg.success();
}
/*
@ResponseBody
@RequestMapping(value = "/updateDetailByArchivId")
public int updateDetailByArchivId(HttpServletRequest request, HttpServletResponse response, Emr_Fault_Detail emrFaultDetail) {
//修改病案归档状态:复审退回
Archive_Master archiveMaster = new Archive_Master();
archiveMaster.setId(emrFaultDetail.getArchiveDetailId());
archiveMaster.setArchivestate("复审退回");
int bol = archiveMasterService.updateByClo(archiveMaster);
//修改复审内容
if (bol == 1) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
//参数输入
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
emrFaultDetail.setUpdater(username);
emrFaultDetail.setUpdateTime(nowTime);
//修改复审内容
//1、查询出该病案的创建时间最近的缺陷记录
Emr_Fault_Detail entity= emrFaultDetailService.selectByArchiveDetailId(emrFaultDetail);
emrFaultDetail.setId(entity.getId());
//2、修改缺陷记录
bol = emrFaultDetailService.updateCloByPrimaryKey(emrFaultDetail);
}
return bol;
}
*/
//终审
@ResponseBody
@RequestMapping(value = "/updateStateByArchivId")

@ -9,6 +9,7 @@ package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.ArchiveCallbackInfoService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import com.emr.vo.ArchiveCallbackInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
@ -43,31 +44,42 @@ public class medicalRecallDateController {
@ResponseBody
@RequestMapping(value = "/recallDateList")
public OffsetLimitPage recallDateList(ArchiveCallbackInfoVo callbackInfo, Integer offset, Integer limit) {
return callbackInfoService.selectAll(callbackInfo,offset,limit);
try {
return callbackInfoService.selectAll(callbackInfo,offset,limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response,ArchiveCallbackInfoVo callbackInfo) throws Exception {
public void exportExcel(HttpServletResponse response,ArchiveCallbackInfoVo callbackInfo){
String tableThNames = "住院号,住院次数,姓名,出院科室,召回人,召回时间,召回原因,状态,归档状态";
String fieldCns = "inpNo,visitId,name,deptName,callbackUserName,startDate,callbackReason,status,archivestate";
List<ArchiveCallbackInfoVo> list = callbackInfoService.selectCallBackInfo(callbackInfo);
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(!CollectionUtils.isEmpty(list)){
for(ArchiveCallbackInfoVo callbackInfoVo : list){
Date callbackTime = callbackInfoVo.getCallbackTime();
if(null != callbackTime){
String date = fmt.format(callbackTime);
callbackInfoVo.setStartDate(date);
try {
List<ArchiveCallbackInfoVo> list = callbackInfoService.selectCallBackInfo(callbackInfo);
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if(!CollectionUtils.isEmpty(list)){
for(ArchiveCallbackInfoVo callbackInfoVo : list){
Date callbackTime = callbackInfoVo.getCallbackTime();
if(null != callbackTime){
String date = fmt.format(callbackTime);
callbackInfoVo.setStartDate(date);
}
}
}
//文件名
String fileName = "召回记录" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
//文件名
String fileName = "召回记录" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
}
@ResponseBody
@ -75,8 +87,14 @@ public class medicalRecallDateController {
public String lastBylogTitle(String id) {
ArchiveCallbackInfoVo vo = new ArchiveCallbackInfoVo();
vo.setMasterId(id);
List<ArchiveCallbackInfoVo> callbackInfoVos = callbackInfoService.selectCallBackInfo(vo);
return JSON.toJSONString(callbackInfoVos.get(0));
try {
List<ArchiveCallbackInfoVo> callbackInfoVos = callbackInfoService.selectCallBackInfo(vo);
return JSON.toJSONString(callbackInfoVos.get(0));
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
}

@ -9,6 +9,7 @@ package com.emr.controller;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.ExportExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -38,13 +39,19 @@ public class unfileMedicalController {
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
return archiveMasterService.selectByUnfile(archiveMasterVo, offset, limit);
try {
return archiveMasterService.selectByUnfile(archiveMasterVo, offset, limit);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
return null;
}
}
@ResponseBody
@RequestMapping(value = "/exportExcel")
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo,Integer isSearch) throws Exception {
public void exportExcel(HttpServletResponse response, Archive_Master_Vo archiveMasterVo,Integer isSearch){
String tableThNames = "住院号,住院次数,姓名,性别,入院科室,入院日期,出院科室,出院日期,主管医生,状态";
String fieldCns = "inpNo,visitId,name,sex,deptAdmissionTo,admissionDateTime,deptName,dischargeDateTime,doctorInCharge,status";
//构造excel的数据
@ -53,13 +60,18 @@ public class unfileMedicalController {
archiveMasterVo.setStartDateTo(null);
archiveMasterVo.setEndDateTo(null);
}
List<Archive_Master_Vo> list = archiveMasterService.selectByUnfile(archiveMasterVo);
//文件名
String fileName = "未归档病历列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
try {
List<Archive_Master_Vo> list = archiveMasterService.selectByUnfile(archiveMasterVo);
//文件名
String fileName = "未归档病历列表" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
//导出excel的操作
exportExcelUtil.expordExcel(tableThNames, fieldCns, list, fileName, response);
} catch (Exception e) {
ExceptionPrintUtil.printException(e);
e.printStackTrace();
}
}
}

@ -30,14 +30,6 @@ public interface Archive_MasterService {
*/
List<Archive_Master> selectByCol(Archive_Master_Vo archiveMasterVo);
/**
*
*
* @param archiveMasterVo
* @return
*/
List<Archive_Master_Vo> selectByLast(Archive_Master_Vo archiveMasterVo);
/**
* '','退'
*

@ -20,21 +20,14 @@ public interface Emr_Fault_DetailService {
* @param limit
* @return
*/
OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit);
OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) throws Exception;
/**
*
* @param emrFaultVo
* @return
*/
List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo emrFaultVo);
/**
* id
* @param emrFaultDetail
* @return
*/
int updateCloByPrimaryKey(Emr_Fault_Detail emrFaultDetail);
List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo emrFaultVo) throws Exception;
/**
* 退

@ -77,7 +77,7 @@ public class ArchiveCallbackInfoService {
callbackInfoMapper.deleteRecordByRecall(masterId);
}
private String getAddressIp(){
private String getAddressIp() throws Exception{
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 获取访问真实IP
String ipAddress = request.getHeader("x-forwarded-for");
@ -91,12 +91,7 @@ public class ArchiveCallbackInfoService {
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();
}
InetAddress inet = InetAddress.getLocalHost();
ipAddress= inet.getHostAddress();
}
}
@ -116,13 +111,13 @@ public class ArchiveCallbackInfoService {
* @param limit
* @return
*/
public OffsetLimitPage selectAll(ArchiveCallbackInfoVo callbackInfoVo, Integer offset, Integer limit) {
public OffsetLimitPage selectAll(ArchiveCallbackInfoVo callbackInfoVo, Integer offset, Integer limit) throws Exception{
PageHelper.offsetPage(offset, limit);
List<ArchiveCallbackInfoVo> list = selectCallBackInfo(callbackInfoVo);
return new OffsetLimitPage((Page) list);
}
public List<ArchiveCallbackInfoVo> selectCallBackInfo(ArchiveCallbackInfoVo callbackInfoVo){
public List<ArchiveCallbackInfoVo> selectCallBackInfo(ArchiveCallbackInfoVo callbackInfoVo) throws Exception{
List<ArchiveCallbackInfoVo> list = callbackInfoMapper.selectAll(callbackInfoVo);
if (!CollectionUtils.isEmpty(list)) {
//转换状态

@ -5,11 +5,9 @@ import com.emr.dao.ArchiveFlowRoleMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.EmrHolidaySetMapper;
import com.emr.entity.*;
import com.emr.service.Emr_Fault_DetailService;
import com.emr.service.Emr_Fault_TypeService;
import com.emr.vo.ArchiveFlowInfoVo;
import com.emr.vo.User;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.util.CollectionUtils;
@ -198,7 +196,7 @@ public class ArchiveFlowInfoService {
* @param id
* @return
*/
public List<ArchiveFlowInfoVo> selectFlowInfoByMasterId(String id) {
public List<ArchiveFlowInfoVo> selectFlowInfoByMasterId(String id) throws Exception{
List<ArchiveFlowInfoVo> list = flowInfoMapper.selectFlowInfoByMasterId(id);
if(!CollectionUtils.isEmpty(list)) {
//获取缺陷类别列表
@ -208,8 +206,7 @@ public class ArchiveFlowInfoService {
List<User> userList = statisticsService.getUserList();
//替换姓名
if (!CollectionUtils.isEmpty(userList)) {
for (int i = 0;i<list.size();i++) {
ArchiveFlowInfoVo infoVo = list.get(i);
for (ArchiveFlowInfoVo infoVo : list) {
//转换姓名
String userName = infoVo.getUserName();
for (User user : userList) {
@ -220,20 +217,20 @@ public class ArchiveFlowInfoService {
}
//转换缺陷类别
String faultAssortId = infoVo.getFaultAssortName();
if(StringUtils.isNotBlank(faultAssortId)) {
if (StringUtils.isNotBlank(faultAssortId)) {
String[] faultAssortIds = faultAssortId.split(",");
String falutAssortName = "";
StringBuilder falutAssortName = new StringBuilder();
for (String assortId : faultAssortIds) {
for (Emr_Fault_Type faultType : typeList) {
if(assortId.equals(faultType.getId()+"")){
falutAssortName += faultType.getTypeName() + ",";
if (assortId.equals(faultType.getId() + "")) {
falutAssortName.append(faultType.getTypeName()).append(",");
break;
}
}
}
if(falutAssortName.endsWith(",")){
falutAssortName = falutAssortName.substring(0,falutAssortName.length()-1);
infoVo.setFaultAssortName(falutAssortName);
if (falutAssortName.toString().endsWith(",")) {
falutAssortName = new StringBuilder(falutAssortName.substring(0, falutAssortName.length() - 1));
infoVo.setFaultAssortName(falutAssortName.toString());
}
}
}
@ -247,21 +244,21 @@ public class ArchiveFlowInfoService {
* @param flowInfoVo
* @return
*/
public List<ArchiveFlowInfoVo> selectFlowInfoList(ArchiveFlowInfoVo flowInfoVo,String sql) {
public List<ArchiveFlowInfoVo> selectFlowInfoList(ArchiveFlowInfoVo flowInfoVo,String sql) throws Exception{
//模糊搜索审核姓名转换工号
String checkName = flowInfoVo.getUserName();
if(StringUtils.isNoneBlank(checkName)){
//转换姓名
List<User> userList = statisticsService.getUserList();
String checkNames = "";
StringBuilder checkNames = new StringBuilder();
for(User user:userList){
if(StringUtils.isNoneBlank(user.getName()) && user.getName().contains(checkName)){
checkNames += "'" + user.getUserName() + "',";
checkNames.append("'").append(user.getUserName()).append("',");
}
}
if(StringUtils.isNotBlank(checkNames)){
checkNames = checkNames.substring(0,checkNames.length()-1);
flowInfoVo.setUserName(checkNames);
checkNames = new StringBuilder(checkNames.substring(0,checkNames.length()-1));
flowInfoVo.setUserName(checkNames.toString());
}else{
flowInfoVo.setUserName("'" + checkName + "'");
}
@ -271,8 +268,7 @@ public class ArchiveFlowInfoService {
if(!CollectionUtils.isEmpty(list)) {
List<User> userList = statisticsService.getUserList();
if (!CollectionUtils.isEmpty(userList)) {
for (int i = 0; i < list.size(); i++) {
ArchiveFlowInfoVo infoVo = list.get(i);
for (ArchiveFlowInfoVo infoVo : list) {
//转换姓名
String userName = infoVo.getUserName();
for (User user : userList) {

@ -77,49 +77,41 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
@Override
public void getPdfToPdf(HttpServletResponse response, String imgStr, String masterId,String pdfWater) {
if (masterId != "" && masterId != null) {
if (StringUtils.isNotBlank(masterId)) {
//获取废除的pdf文件名列表archive_detail
List pdfList = new ArrayList();
Archive_Detail archiveDetail = new Archive_Detail();
archiveDetail.setFlag("0");
archiveDetail.setMasterid(masterId.trim());
archiveDetail.setTitle(imgStr);
try {
List<Archive_Detail> arList = selectByCol(archiveDetail);
if (arList != null && !arList.isEmpty()) {
for (int m = 0; m < arList.size(); m++) {
String str = arList.get(m).getPdfPath();
if (StringUtils.isNoneBlank(str)) {
pdfList.add(str);
}
List<Archive_Detail> arList = selectByCol(archiveDetail);
if (arList != null && !arList.isEmpty()) {
for (Archive_Detail detail : arList) {
String str = detail.getPdfPath();
if (StringUtils.isNoneBlank(str)) {
pdfList.add(str);
}
}
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
} catch (Exception e) {
e.printStackTrace();
}
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
}
}
@Override
public void selectPdfPathByIds(HttpServletResponse response, String detailIds, String masterId,String pdfWater) {
if (masterId != "" && masterId != null) {
if (StringUtils.isNotBlank(masterId)) {
//获取废除的pdf文件名列表archive_detail
List pdfList = new ArrayList();
try {
List<Archive_Detail> arList = archiveDetailMapper.selectPdfPathByIds(masterId,detailIds);
if (arList != null && !arList.isEmpty()) {
for (int m = 0; m < arList.size(); m++) {
String str = arList.get(m).getPdfPath();
if (StringUtils.isNoneBlank(str)) {
pdfList.add(str);
}
List<Archive_Detail> arList = archiveDetailMapper.selectPdfPathByIds(masterId,detailIds);
if (arList != null && !arList.isEmpty()) {
for (Archive_Detail detail : arList) {
String str = detail.getPdfPath();
if (StringUtils.isNoneBlank(str)) {
pdfList.add(str);
}
}
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
} catch (Exception e) {
e.printStackTrace();
}
Jpg2PdfUtil.mulFile2One(response, pdfList, pdfWater);
}
}

@ -132,18 +132,18 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
//计算属于哪种审核角色
Msg role = getRole();
if(null != role) {
for (int i = 0; i < list.size(); i++) {
String archivestate = list.get(i).getArchivestate();
for (Archive_Master_Vo master_vo : list) {
String archivestate = master_vo.getArchivestate();
if (StringUtils.isNotBlank(archivestate)) {
//转换中文状态
boolean numeric = isNumeric(archivestate);
if(numeric) {
if (numeric) {
Integer status = Integer.valueOf(archivestate);
archivestate = EnumVerify.DocState.GetStepName(status, role.getCode());
list.get(i).setStatus(archivestate);
master_vo.setStatus(archivestate);
//获取审核按钮和退回按钮集合
String btns = getBtns(status, flowRoles, list.get(i).getId());
list.get(i).setBtns(btns);
String btns = getBtns(status, flowRoles, master_vo.getId());
master_vo.setBtns(btns);
}
}
}
@ -198,24 +198,24 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
//计算属于哪种审核角色
Msg role = getRole();
if(null != role) {
for (int i = 0; i < list.size(); i++) {
String archivestate = list.get(i).getArchivestate();
String dischargeDateTime = list.get(i).getDischargeDateTime();
for (Archive_Master_Vo master_vo : list) {
String archivestate = master_vo.getArchivestate();
String dischargeDateTime = master_vo.getDischargeDateTime();
//年份是1801定义为在院
//定义是否是在院病历
boolean flag = false;
if(StringUtils.isNotBlank(dischargeDateTime) && dischargeDateTime.length() >= 4){
if (StringUtils.isNotBlank(dischargeDateTime) && dischargeDateTime.length() >= 4) {
String year = dischargeDateTime.substring(0, 4);
if("1801".equals(year)){
if ("1801".equals(year)) {
flag = true;
list.get(i).setStatus("在院");
master_vo.setStatus("在院");
}
}
if (StringUtils.isNotBlank(archivestate) && !flag) {
//转换中文状态
Integer status = Integer.valueOf(archivestate);
archivestate = EnumVerify.DocState.GetStepName(status, role.getCode());
list.get(i).setStatus(archivestate);
master_vo.setStatus(archivestate);
}
}
}
@ -223,11 +223,6 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
return list;
}
@Override
public List<Archive_Master_Vo> selectByLast(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectByLast(archiveMasterVo);
}
/**
* 退
* */
@ -339,7 +334,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
//护士长
String masterId = '"' + id + '"';
//定义下个节点code
Integer targetCode = 0;
int targetCode = 0;
if(!EnumVerify.DocState.HasCurrentState(status,EnumVerify.DocState.HeadNurseCheck)){
//判断是否护士长审核
boolean headNurseCheckFlag = getHeadNurseCheckFlag(status,roles);
@ -721,41 +716,41 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
String nurseCheckSumbit = "/beHosp/nurseCheckSumbit";
int genegrateRole = 0;
//拼接有权限的code
String powerCode = "";
StringBuilder powerCode = new StringBuilder();
Integer role = 0;
//遍历判断拥有权限拥有护士长权限立即返回4拥有医生支线赋值doctorRole=1,拥有护士支线赋值nurseRole=1
for (String menu : menus) {
if(StringUtils.isNotBlank(menu)){
if(menu.equals(doctorSumbit)){
doctorRole = 1;
powerCode += EnumVerify.DocState.DortorSubmit.getCode() + ",";
powerCode.append(EnumVerify.DocState.DortorSubmit.getCode()).append(",");
}
if(menu.equals(doctorCheckSumbit)){
doctorRole = 1;
powerCode += EnumVerify.DocState.DortorCheck.getCode() + ",";
powerCode.append(EnumVerify.DocState.DortorCheck.getCode()).append(",");
}
if(menu.equals(directorCheckSumbit)){
doctorRole = 1;
powerCode += EnumVerify.DocState.DirectorCheck.getCode() + ",";
powerCode.append(EnumVerify.DocState.DirectorCheck.getCode()).append(",");
}
if(menu.equals(nurseSumbit)){
nurseRole = 1;
powerCode += EnumVerify.DocState.NurseSubmit.getCode() + ",";
powerCode.append(EnumVerify.DocState.NurseSubmit.getCode()).append(",");
}
if(menu.equals(nurseCheckSumbit)){
nurseRole = 1;
powerCode += EnumVerify.DocState.NurseCheck.getCode() + ",";
powerCode.append(EnumVerify.DocState.NurseCheck.getCode()).append(",");
}
if(menu.equals(headNurseCheck)){
genegrateRole = 1;
powerCode += EnumVerify.DocState.HeadNurseCheck.getCode() + ",";
powerCode.append(EnumVerify.DocState.HeadNurseCheck.getCode()).append(",");
}
}
}
if(powerCode.endsWith(",")){
powerCode = powerCode.substring(0,powerCode.length()-1);
if(powerCode.toString().endsWith(",")){
powerCode = new StringBuilder(powerCode.substring(0, powerCode.length() - 1));
}
msg.setMsg(powerCode);
msg.setMsg(powerCode.toString());
//判断属于哪个支线权限
if(doctorRole == 1 && nurseRole == 0){
msg.setCode(1);

@ -6,16 +6,11 @@
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Archive_DetailMapper;
import com.emr.service.Emr_Archive_DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class Emr_Archive_DetailServiceImpl implements Emr_Archive_DetailService {
@Autowired
private Emr_Archive_DetailMapper emrArchiveDetailMapper;
}

@ -6,7 +6,6 @@
*/
package com.emr.service.ipml;
import com.emr.dao.Emr_Archive_DetailMapper;
import com.emr.dao.Emr_DictionaryMapper;
import com.emr.entity.Emr_Dictionary;
import com.emr.service.Emr_DictionaryService;

@ -48,14 +48,13 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
* @return
*/
@Override
public OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) {
public OffsetLimitPage selectByCol(Emr_Fault_Vo emrFaultVo, Integer offset, Integer limit) throws Exception{
PageHelper.offsetPage(offset, limit);
List<Emr_Fault_Vo> list = selectByCol(emrFaultVo);
return new OffsetLimitPage((Page) list);
}
@Override
public List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo emrFaultVo) {
public List<Emr_Fault_Vo> selectByCol(Emr_Fault_Vo emrFaultVo) throws Exception{
List<Emr_Fault_Vo> list = emrFaultDetailMapper.selectByCol(emrFaultVo);
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
@ -69,51 +68,51 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
Msg role = archiveMasterService.getRole();
List<User> userList = statisticsService.getUserList();
if(null != role) {
for (int i = 0; i < list.size(); i++) {
for (Emr_Fault_Vo emr_fault_vo : list) {
//根据状态code转换状态及判断显示按钮
//计算属于哪种审核角色
String archivestate = list.get(i).getArchivestate();
String archivestate = emr_fault_vo.getArchivestate();
if (StringUtils.isNotBlank(archivestate)) {
//转换中文状态
Integer status = Integer.valueOf(archivestate);
archivestate = EnumVerify.DocState.GetStepName(status, role.getCode());
list.get(i).setArchivestate(archivestate);
emr_fault_vo.setArchivestate(archivestate);
}
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = list.get(i).getDeptName();
for (Emr_Dictionary dictionary : dicList) {
String deptName = emr_fault_vo.getDeptName();
//入院科室dept_admission_to
String dept2 = list.get(i).getDeptAdmissionTo();
String dept2 = emr_fault_vo.getDeptAdmissionTo();
if ((deptName != null && deptName.equals(dicList.get(k).getCode())) || (dept2 != null && dept2.equals(dicList.get(k).getCode()))) {
if ((deptName != null && deptName.equals(dictionary.getCode())) || (dept2 != null && dept2.equals(dictionary.getCode()))) {
//出院科室
deptName = deptName.replace(deptName, dicList.get(k).getName());
list.get(i).setDeptName(deptName);
deptName = deptName.replace(deptName, dictionary.getName());
emr_fault_vo.setDeptName(deptName);
dept2 = dept2.replace(dept2, dicList.get(k).getName());
list.get(i).setDeptAdmissionTo(dept2);
dept2 = dept2.replace(dept2, dictionary.getName());
emr_fault_vo.setDeptAdmissionTo(dept2);
}
}
String assortId = list.get(i).getAssortId();
if (assortId != "" && assortId != null) {
String assortId = emr_fault_vo.getAssortId();
if (StringUtils.isNotBlank(assortId)) {
String[] assorArr = assortId.split(",");
//替换类别
for (int j = 0; j < typeLis.size(); j++) {
String id = String.valueOf(typeLis.get(j).getId());
for (Emr_Fault_Type typeLi : typeLis) {
String id = String.valueOf(typeLi.getId());
if (Arrays.asList(assorArr).contains(id)) {
assortId = assortId.replace(id, typeLis.get(j).getTypeName());
list.get(i).setAssortId(assortId);
assortId = assortId.replace(id, typeLi.getTypeName());
emr_fault_vo.setAssortId(assortId);
}
}
}
//替换姓名
if(!CollectionUtils.isEmpty(userList)) {
if (!CollectionUtils.isEmpty(userList)) {
//转换姓名
String userName = list.get(i).getCreater();
String userName = emr_fault_vo.getCreater();
for (User user : userList) {
if (StringUtils.isNotBlank(userName) && userName.equals(user.getUserName())) {
list.get(i).setCreater(user.getName());
emr_fault_vo.setCreater(user.getName());
break;
}
}
@ -123,11 +122,6 @@ public class Emr_Fault_DetailServiceImpl implements Emr_Fault_DetailService {
return list;
}
@Override
public int updateCloByPrimaryKey(Emr_Fault_Detail emrFaultDetail) {
return emrFaultDetailMapper.updateCloByPrimaryKey(emrFaultDetail);
}
@Override
public Emr_Fault_Detail selectByArchiveDetailId(Emr_Fault_Detail record) {
return emrFaultDetailMapper.selectByArchiveDetailId(record);

@ -64,9 +64,6 @@ public class EnumVerify {
this.name = name;
}
DocState() {
}
public int getCode() {
return code;
}

@ -75,10 +75,10 @@ public class HolidaySetService {
//如果存在记录就区分更新部分还是添加部分
if(null != emrHolidaySets && !emrHolidaySets.isEmpty()){
boolean isExist = false;
for (int i = 0; i < emrHolidaySets.size(); i++) {
if(emrHolidaySets.get(i).getDate().equals(date)){
for (EmrHolidaySet emrHolidaySet : emrHolidaySets) {
if (emrHolidaySet.getDate().equals(date)) {
isExist = true;
holidaySet.setId(emrHolidaySets.get(i).getId());
holidaySet.setId(emrHolidaySet.getId());
break;
}
}
@ -96,7 +96,7 @@ public class HolidaySetService {
}
int colCount = holidaySetMapper.selectColByTableName("emr_holiday_set");
int simpleInsertCount = 2100/(colCount);
if(null != insertList && !insertList.isEmpty()){
if(!insertList.isEmpty()){
List<EmrHolidaySet> list = new ArrayList<>();
for (int i = 0; i < insertList.size(); i++) {
list.add(insertList.get(i));
@ -106,7 +106,7 @@ public class HolidaySetService {
}
}
}
if(null != updateList && !updateList.isEmpty()){
if(!updateList.isEmpty()){
List<EmrHolidaySet> list = new ArrayList<>();
for (int i = 0; i < updateList.size(); i++) {
list.add(updateList.get(i));

@ -6,7 +6,6 @@ import com.emr.dao.TUuInfoMapper;
import com.emr.dao.TUuPrintMapper;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.entity.TUuPrint;
import com.emr.vo.*;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@ -54,7 +53,7 @@ public class StatisticsService {
@Autowired
private TUuInfoMapper uuInfoMapper;
//终审按天统计
public List<FinalAndFirstStatistics> getFinalStatistics(Integer offset, Integer limit, String startDate, String endDate,String sql) {
public List<FinalAndFirstStatistics> getFinalStatistics(Integer offset, Integer limit, String startDate, String endDate,String sql) throws Exception{
if(null != offset && null != limit){
PageHelper.offsetPage(offset, limit);
}
@ -76,7 +75,7 @@ public class StatisticsService {
//初审按天统计
public List<FinalAndFirstStatistics> getFirstStatistics(HttpServletRequest request, Integer offset, Integer limit, String startDate, String endDate,String sql) {
public List<FinalAndFirstStatistics> getFirstStatistics(Integer offset, Integer limit, String startDate, String endDate,String sql) throws Exception{
if(null != offset && null != limit){
PageHelper.offsetPage(offset, limit);
}
@ -105,7 +104,7 @@ public class StatisticsService {
* @param archiveMasterVo
* @return
*/
public OffsetLimitPage getStatisticsDetail(Integer offset, Integer limit,String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo,Integer flag) {
public OffsetLimitPage getStatisticsDetail(Integer offset, Integer limit,String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo,Integer flag) throws Exception{
if(null != offset && null != limit){
PageHelper.offsetPage(offset, limit);
}
@ -113,21 +112,21 @@ public class StatisticsService {
return new OffsetLimitPage((Page) list);
}
public List<Archive_Master_Vo> getDetailList(String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo,Integer flag,String sql){
public List<Archive_Master_Vo> getDetailList(String disStartDate, String disEndDate, Archive_Master_Vo archiveMasterVo,Integer flag,String sql) throws Exception{
//转换姓名
List<User> userList = getUserList();
String checkDoctor = archiveMasterVo.getCheckDoctor();
//模糊搜索审核姓名转换工号
if(StringUtils.isNoneBlank(checkDoctor)){
String checkNames = "";
StringBuilder checkNames = new StringBuilder();
for(User user:userList){
if(StringUtils.isNoneBlank(user.getName()) && user.getName().contains(checkDoctor)){
checkNames += "'" + user.getUserName() + "',";
checkNames.append("'").append(user.getUserName()).append("',");
}
}
if(StringUtils.isNotBlank(checkNames)){
checkNames = checkNames.substring(0,checkNames.length()-1);
archiveMasterVo.setCheckDoctor(checkNames);
if(StringUtils.isNotBlank(checkNames.toString())){
checkNames = new StringBuilder(checkNames.substring(0, checkNames.length() - 1));
archiveMasterVo.setCheckDoctor(checkNames.toString());
}else{
archiveMasterVo.setCheckDoctor("'" + checkDoctor + "'");
}
@ -150,8 +149,7 @@ public class StatisticsService {
//复印记录报表
public List<TUuPrintVo> getPrintCount(TUuPrintSearch search){
List<TUuPrintVo> list = uuPrintMapper.getPrintCount(search);
return list;
return uuPrintMapper.getPrintCount(search);
}
//复印记录明细
@ -169,44 +167,36 @@ public class StatisticsService {
//扫描记录报表
public List<TUuInfoVo> getScanCount(TUuPrintSearch search){
List<TUuInfoVo> list = uuInfoMapper.getScanCount(search);
return list;
return uuInfoMapper.getScanCount(search);
}
//扫描记录明细
public List<TUuInfoVo> getScanInfo(TUuPrintSearch search){
List<TUuInfoVo> list = uuInfoMapper.getScanInfo(search);
return list;
return uuInfoMapper.getScanInfo(search);
}
public List<User> getUserList(){
public List<User> getUserList() throws Exception{
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
List<User> userList = new ArrayList<>();
try {
//查询缓存时候存在
userList = (List<User>)request.getSession().getAttribute("USER_LIST");
if(null == userList || userList.isEmpty()){
String userName = (String) request.getSession().getAttribute("userSession");
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
userList = (List<User>) JSON.parseArray(userList1,User.class);
//设置进session
request.getSession().setAttribute("USER_LIST",userList);
List<User> userList = (List<User>)request.getSession().getAttribute("USER_LIST");
if(null == userList || userList.isEmpty()){
String userName = (String) request.getSession().getAttribute("userSession");
//调用接口查询
String resultString = "";
// 创建uri
String url = POWER_URLHEAD+"/font/getUserList?userName="+userName;
// 执行请求
CloseableHttpResponse response = HttpClients.createDefault().execute(new HttpGet(url));
// 判断返回状态是否为200
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
}catch (Exception e){
e.printStackTrace();
JSONObject jsonObject = JSONObject.fromObject(resultString);
String extend = jsonObject.getString("extend");
JSONObject extendObject = JSONObject.fromObject(extend);
String userList1 = extendObject.getString("userList");
userList = JSON.parseArray(userList1,User.class);
//设置进session
request.getSession().setAttribute("USER_LIST",userList);
}
return userList;
}

@ -15,7 +15,6 @@ import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service
@ -25,8 +24,7 @@ public class V_CountServiceImpl implements V_CountService {
@Override
public List<V_Count> selectByCol(V_CountVo record) {
List<V_Count> v_counts = vCountMapper.selectByCol(record);
return v_counts;
return vCountMapper.selectByCol(record);
}
@Override

@ -1,42 +0,0 @@
package com.emr.util;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
*
* @Author:
* @Date:
* @Version 1.0
*/
public class ActionScopeUtils {
public static HttpSession getSession(HttpServletRequest request){
return request.getSession();
}
public static HttpServletRequest getRequest(){
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
public static void setSessionAttribute(String key,Object value){
getSession(getRequest()).setAttribute(key,value);
}
public static Object getSessionAttribute(String key){
return getSession(getRequest()).getAttribute(key);
}
public static void setRequestAttribute(String key,Object value){
getRequest().setAttribute(key,value);
}
public static Object getRequestAttribute(String key){
return getRequest().getAttribute(key);
}
}

@ -0,0 +1,36 @@
package com.emr.util;
import org.apache.log4j.Logger;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintStream;
/**
* @ProjectName:
* @Description:
* @Param
* @Return
* @Author:
* @CreateDate: 2020/8/4 14:18
* @UpdateUser:
* @UpdateDate: 2020/8/4 14:18
* @UpdateRemark:
* @Version: 1.0
*/
public class ExceptionPrintUtil {
private static Logger log = Logger.getLogger("errorMsg");
public static void printException(Exception e){
//方法名
ByteArrayOutputStream baos = new ByteArrayOutputStream();
e.printStackTrace(new PrintStream(baos));
String exception = baos.toString();
log.error(exception);
try {
baos.flush();
baos.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}

@ -10,8 +10,10 @@ import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@ -28,20 +30,18 @@ public class ExportExcelUtil {
private String fileName;
private HSSFWorkbook workBook = null;
public List<String> getFieldName(String tableThNames){
private List<String> getFieldName(String tableThNames){
String[] names = tableThNames.split(",");
List<String> fieldName = new ArrayList<>();
if (names != null) {
for (int i = 0; i < names.length; i++) {
if (StringUtils.isNoneBlank(names[i])) {
fieldName.add(names[i]);
}
for (String name : names) {
if (StringUtils.isNoneBlank(name)) {
fieldName.add(name);
}
}
return fieldName;
}
public List<List<String>> getFieldData(String fieldCns, Collection list){
private List<List<String>> getFieldData(String fieldCns, Collection list){
List<List<String>> fieldData = new ArrayList<List<String>>();
String[] fieldList = fieldCns.split(",");
Object[] objects = list.toArray();
@ -56,22 +56,34 @@ public class ExportExcelUtil {
}
return fieldData;
}
public void expordExcel(String tableThNames,String fieldCns,Collection list,String fileName,HttpServletResponse response) throws Exception {
this.fieldName = getFieldName(tableThNames);
this.fieldData = getFieldData(fieldCns,list);
public void expordExcel(String tableThNames,String fieldCns,Collection list,String fileName,HttpServletResponse response){
fieldName = getFieldName(tableThNames);
fieldData = getFieldData(fieldCns,list);
this.fileName = fileName;
OutputStream os = response.getOutputStream();
response.reset();
response.setContentType("application/OCTET-STREAM;charset=gbk");
response.setHeader("pragma", "no-cache");
fileName = new String(fileName.getBytes("utf-8"), "iso-8859-1");
response.setHeader("Content-disposition", "attachment;filename=\"" + fileName + "\"");
response.setBufferSize(1024);
workBook = createWorkbook();
workBook.write(os);
os.close();
OutputStream os = null;
try {
os = response.getOutputStream();
response.reset();
response.setContentType("application/OCTET-STREAM;charset=gbk");
response.setHeader("pragma", "no-cache");
fileName = new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
response.setHeader("Content-disposition", "attachment;filename=\"" + fileName + "\"");
response.setBufferSize(1024);
workBook = createWorkbook();
workBook.write(os);
} catch (IOException e) {
e.printStackTrace();
}finally {
try {
if(null != os){
os.close();
}
}catch (Exception e){
e.printStackTrace();
}
}
}
public HSSFWorkbook createWorkbook() {
private HSSFWorkbook createWorkbook() {
workBook = new HSSFWorkbook();
int rows = fieldData.size();
int sheetNum = 0;
@ -103,7 +115,7 @@ public class ExportExcelUtil {
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
if(fieldName.get(j) != null){
cell.setCellStyle(cellStyle);
cell.setCellValue((String) fieldName.get(j));
cell.setCellValue(fieldName.get(j));
}else{
cell.setCellValue("-");
}
@ -113,15 +125,16 @@ public class ExportExcelUtil {
cellStyle1.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
//数字格式
for (int k = 0; k < (rows < SPLIT_COUNT ? rows : SPLIT_COUNT); k++) {
if (((i - 1) * SPLIT_COUNT + k) >= rows)
if (((i - 1) * SPLIT_COUNT + k) >= rows) {
break;
}
HSSFRow row = sheet.createRow((short) (k + 1));
ArrayList<String> rowList = (ArrayList<String>) fieldData.get((i - 1) * SPLIT_COUNT + k);
for (int n = 0; n < rowList.size(); n++) {
HSSFCell cell = row.createCell( n);
if(rowList.get(n) != null){
cell.setCellStyle(cellStyle1);
cell.setCellValue((String) rowList.get(n).toString());
cell.setCellValue(rowList.get(n));
}else{
cell.setCellValue("");
}
@ -141,12 +154,12 @@ public class ExportExcelUtil {
return workBook;
}
public static String fieldToProperty(String field) {
private static String fieldToProperty(String field) {
if (null == field) {
return "";
}
char[] chars = field.toCharArray();
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (c == '_') {
@ -162,7 +175,7 @@ public class ExportExcelUtil {
return sb.toString();
}
public static String getFieldValueByFieldName(String fieldName, Object object) {
private static String getFieldValueByFieldName(String fieldName, Object object) {
try {
Class<?> clazz = object.getClass();
for (; clazz != Object.class; clazz = clazz.getSuperclass()) {

@ -9,6 +9,7 @@ import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
@ -27,20 +28,18 @@ public class ExportExcelUtil1 {
private String fileName;
private HSSFWorkbook workBook = null;
public List<String> getFieldName(String tableThNames){
private List<String> getFieldName(String tableThNames){
String[] names = tableThNames.split(",");
List<String> fieldName = new ArrayList<>();
if (names != null) {
for (int i = 0; i < names.length; i++) {
if (StringUtils.isNoneBlank(names[i])) {
fieldName.add(names[i]);
}
for (String name : names) {
if (StringUtils.isNoneBlank(name)) {
fieldName.add(name);
}
}
return fieldName;
}
public List<List<String>> getFieldData(String fieldCns, Collection list){
private List<List<String>> getFieldData(String fieldCns, Collection list){
List<List<String>> fieldData = new ArrayList<List<String>>();
String[] fieldList = fieldCns.split(",");
Object[] objects = list.toArray();
@ -55,22 +54,34 @@ public class ExportExcelUtil1 {
}
return fieldData;
}
public void expordExcel(String tableThNames,String fieldCns,Collection list,String fileName,HttpServletResponse response) throws Exception {
this.fieldName = getFieldName(tableThNames);
this.fieldData = getFieldData(fieldCns,list);
public void expordExcel(String tableThNames,String fieldCns,Collection list,String fileName,HttpServletResponse response){
fieldName = getFieldName(tableThNames);
fieldData = getFieldData(fieldCns,list);
this.fileName = fileName;
OutputStream os = response.getOutputStream();
response.reset();
response.setContentType("application/OCTET-STREAM;charset=gbk");
response.setHeader("pragma", "no-cache");
fileName = new String(fileName.getBytes("utf-8"), "iso-8859-1");
response.setHeader("Content-disposition", "attachment;filename=\"" + fileName + "\"");
response.setBufferSize(1024);
workBook = createWorkbook();
workBook.write(os);
os.close();
OutputStream os = null;
try {
os = response.getOutputStream();
response.reset();
response.setContentType("application/OCTET-STREAM;charset=gbk");
response.setHeader("pragma", "no-cache");
fileName = new String(fileName.getBytes("utf-8"), "iso-8859-1");
response.setHeader("Content-disposition", "attachment;filename=\"" + fileName + "\"");
response.setBufferSize(1024);
workBook = createWorkbook();
workBook.write(os);
} catch (IOException e) {
e.printStackTrace();
}finally {
if(null != os){
try {
os.close();
}catch (Exception e){
e.printStackTrace();
}
}
}
}
public HSSFWorkbook createWorkbook() {
private HSSFWorkbook createWorkbook() {
workBook = new HSSFWorkbook();
int rows = fieldData.size();
int sheetNum = 0;
@ -112,8 +123,9 @@ public class ExportExcelUtil1 {
cellStyle1.setAlignment(HSSFCellStyle.ALIGN_CENTER);
cellStyle1.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
for (int k = 0; k < (rows < SPLIT_COUNT ? rows : SPLIT_COUNT); k++) {
if (((i - 1) * SPLIT_COUNT + k) >= rows)
if (((i - 1) * SPLIT_COUNT + k) >= rows) {
break;
}
HSSFRow row = sheet.createRow((short) (k + 1));
ArrayList<String> rowList = (ArrayList<String>) fieldData.get((i - 1) * SPLIT_COUNT + k);
for (int n = 0; n < rowList.size(); n++) {
@ -137,12 +149,12 @@ public class ExportExcelUtil1 {
return workBook;
}
public static String fieldToProperty(String field) {
private static String fieldToProperty(String field) {
if (null == field) {
return "";
}
char[] chars = field.toCharArray();
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (c == '_') {
@ -158,7 +170,7 @@ public class ExportExcelUtil1 {
return sb.toString();
}
public static String getFieldValueByFieldName(String fieldName, Object object) {
private static String getFieldValueByFieldName(String fieldName, Object object) {
try {
Class<?> clazz = object.getClass();
for (; clazz != Object.class; clazz = clazz.getSuperclass()) {

@ -0,0 +1,139 @@
package com.emr.util;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.ParseException;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* httpclient 4.5 http
*
* @author
*
*/
public class HttpClientTool {
private static final CloseableHttpClient httpClient;
public static final String CHARSET = "UTF-8";
// 采用静态代码块初始化超时时间配置再根据配置生成默认httpClient对象
static {
RequestConfig config = RequestConfig.custom().setConnectTimeout(60000).setSocketTimeout(15000).build();
httpClient = HttpClientBuilder.create().setDefaultRequestConfig(config).build();
}
public static String doGet(String url, Map<String, String> params) {
return doGet(url, params, CHARSET);
}
public static String doPost(String url, Map<String, String> params) throws IOException {
return doPost(url, params, CHARSET);
}
/**
* HTTP Get
* @param url url ?
* @param params
* @param charset
* @return
*/
public static String doGet(String url, Map<String, String> params, String charset) {
if (StringUtils.isBlank(url)) {
return null;
}
try {
if (params != null && !params.isEmpty()) {
List<NameValuePair> pairs = new ArrayList<NameValuePair>(params.size());
for (Map.Entry<String, String> entry : params.entrySet()) {
String value = entry.getValue();
if (value != null) {
pairs.add(new BasicNameValuePair(entry.getKey(), value));
}
}
// 将请求参数和url进行拼接
url += "?" + EntityUtils.toString(new UrlEncodedFormEntity(pairs, charset));
}
HttpGet httpGet = new HttpGet(url);
CloseableHttpResponse response = httpClient.execute(httpGet);
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != 200) {
httpGet.abort();
throw new RuntimeException("HttpClient,error status code :" + statusCode);
}
HttpEntity entity = response.getEntity();
String result = null;
if (entity != null) {
result = EntityUtils.toString(entity, "utf-8");
}
EntityUtils.consume(entity);
response.close();
return result;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* HTTP Post
* @param url url ?
* @param params
* @param charset
* @return
* @throws IOException
*/
public static String doPost(String url, Map<String, String> params, String charset)
throws IOException {
if (StringUtils.isBlank(url)) {
return null;
}
List<NameValuePair> pairs = null;
if (params != null && !params.isEmpty()) {
pairs = new ArrayList<NameValuePair>(params.size());
for (Map.Entry<String, String> entry : params.entrySet()) {
String value = entry.getValue();
if (value != null) {
pairs.add(new BasicNameValuePair(entry.getKey(), value));
}
}
}
HttpPost httpPost = new HttpPost(url);
if (pairs != null && pairs.size() > 0) {
httpPost.setEntity(new UrlEncodedFormEntity(pairs, CHARSET));
}
CloseableHttpResponse response = null;
try {
response = httpClient.execute(httpPost);
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != 200) {
httpPost.abort();
throw new RuntimeException("HttpClient,error status code :" + statusCode);
}
HttpEntity entity = response.getEntity();
String result = null;
if (entity != null) {
result = EntityUtils.toString(entity, "utf-8");
}
EntityUtils.consume(entity);
return result;
} catch (ParseException e) {
e.printStackTrace();
} finally {
if (response != null)
response.close();
}
return null;
}
}

@ -1,9 +1,7 @@
package com.emr.util;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.*;
import com.lowagie.text.Image;
import com.lowagie.text.Utilities;
import com.lowagie.text.pdf.*;
import com.lowagie.text.pdf.codec.TiffImage;
import org.apache.commons.lang3.StringUtils;
@ -125,19 +123,13 @@ public class Jpg2PdfUtil {
* itextpdf
*/
public static boolean check(String file) {
boolean flag1 = false;
int n = 0;
Document document = null;
PdfReader pdfReader = null;
try {
File f = new File(file);
if(f.isFile()){
pdfReader = new PdfReader(file);
document = new Document(pdfReader.getPageSize(1));
document.open();
n = pdfReader.getNumberOfPages();
if (n != 0) {
flag1 = true;
if (pdfReader.getNumberOfPages() != 0) {
return true;
}
}
} catch (Exception e) {
@ -145,11 +137,8 @@ public class Jpg2PdfUtil {
if(null != pdfReader){
pdfReader.close();
}
if(null != document){
document.close();
}
}
return flag1;
return false;
}
public static void mulFile2One(HttpServletResponse response,List<String> files,String waterMarkName) {
@ -160,8 +149,7 @@ public class Jpg2PdfUtil {
String fileStr = iterator.next();
File file = new File(fileStr);
if(file.isFile()){
boolean flag = false;
flag = check(fileStr);
boolean flag = check(fileStr);
if(!flag){
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件损坏");
@ -171,7 +159,7 @@ public class Jpg2PdfUtil {
System.out.println(fmt.format(new Date())+":"+file+"文件不存在");
}
}
if(null != files && !files.isEmpty()){
if(!files.isEmpty()){
// pdf合并工具类
Document document = null;
ByteArrayOutputStream bos = null;
@ -184,21 +172,21 @@ public class Jpg2PdfUtil {
copy = new PdfCopy(document,response.getOutputStream());
document.open();
bos = new ByteArrayOutputStream();
for (int i = 0; i < files.size(); i++) {
for (String file : files) {
bos.flush();
//判断是否加水印
if(StringUtils.isNotBlank(waterMarkName)){
setWatermark(bos,files.get(i), waterMarkName, null);
if (StringUtils.isNotBlank(waterMarkName)) {
setWatermark(bos, file, waterMarkName, null);
}
reader = new PdfReader(files.get(i));
reader = new PdfReader(file);
int n = reader.getNumberOfPages();
pdfReader = new PdfReader(bos.toByteArray());
for (int j = 1; j <= n; j++) {
document.newPage();
PdfImportedPage page = null;
if(StringUtils.isNotBlank(waterMarkName)){
if (StringUtils.isNotBlank(waterMarkName)) {
page = copy.getImportedPage(pdfReader, j);
}else{
} else {
page = copy.getImportedPage(reader, j);
}
copy.addPage(page);
@ -207,24 +195,25 @@ public class Jpg2PdfUtil {
}catch (Exception e){
e.printStackTrace();
}finally {
try{
if(pdfReader != null){
pdfReader.close();
}
if(null != reader){
reader.close();
}
if(null != copy){
copy.close();
}
if(null != bos){
if(null != copy){
copy.close();
}
if(pdfReader != null){
pdfReader.close();
}
if(null != reader){
reader.close();
}
if(null != bos){
try {
bos.flush();
bos.close();
}catch (Exception e){
e.printStackTrace();
}
if(null != document){
document.close();
}
}catch (Exception e){
e.printStackTrace();
}
if(null != document){
document.close();
}
}
}
@ -232,50 +221,60 @@ public class Jpg2PdfUtil {
//加水印
private static void setWatermark(ByteArrayOutputStream bos, String input, String waterMarkName, String imgPath)
throws Exception{
PdfReader reader = new PdfReader(input);
PdfStamper stamper = new PdfStamper(reader, bos);
int total = reader.getNumberOfPages() + 1;
PdfContentByte content;
BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
PdfGState gs = new PdfGState();
for (int i = 1; i < total; i++) {
content = stamper.getOverContent(i);// 在内容上方加水印
//加文字水印
if(StringUtils.isNotBlank(waterMarkName)) {
private static void setWatermark(ByteArrayOutputStream bos, String input, String waterMarkName, String imgPath){
PdfReader reader = null;
PdfStamper stamper = null;
try {
reader = new PdfReader(input);
stamper = new PdfStamper(reader, bos);
int total = reader.getNumberOfPages() + 1;
PdfContentByte content;
BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
PdfGState gs = new PdfGState();
for (int i = 1; i < total; i++) {
content = stamper.getOverContent(i);// 在内容上方加水印
//加文字水印
if(StringUtils.isNotBlank(waterMarkName)) {
gs.setFillOpacity(0.3f);
gs.setStrokeOpacity(0.3f);
content.setGState(gs);
content.beginText();
content.setColorFill(Color.LIGHT_GRAY);
content.setFontAndSize(base, 50);
content.setTextMatrix(70, 200);
//v:距左 v1:距下 v2:
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 600, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 200, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 600, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 200, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 1100, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 1500, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 1100, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 1500, 40);
content.endText();
gs.setFillOpacity(0.3f);
gs.setStrokeOpacity(0.3f);
content.setGState(gs);
content.beginText();
content.setColorFill(Color.LIGHT_GRAY);
content.setFontAndSize(base, 50);
content.setTextMatrix(70, 200);
//v:距左 v1:距下 v2:
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 600, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 200, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 600, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 200, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 1100, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 300, 1500, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 1100, 40);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 800, 1500, 40);
content.endText();
}
if(StringUtils.isNotBlank(imgPath)){
Image image = Image.getInstance(imgPath);
image.setAbsolutePosition(200, 206); // set the first background
image.scaleToFit(200, 200);
content.addImage(image);
}
content.setColorFill(Color.BLACK);
content.setFontAndSize(base, 8);
}
if(StringUtils.isNotBlank(imgPath)){
Image image = Image.getInstance(imgPath);
image.setAbsolutePosition(200, 206); // set the first background
image.scaleToFit(200, 200);
content.addImage(image);
} catch (IOException | DocumentException e) {
e.printStackTrace();
} finally {
try {
assert stamper != null;
stamper.close();
reader.close();
} catch (DocumentException | IOException e) {
e.printStackTrace();
}
content.setColorFill(Color.BLACK);
content.setFontAndSize(base, 8);
}
if(null != reader){
reader.close();
}
stamper.close();
}
/**
* h>whw>hw=h
@ -283,7 +282,7 @@ public class Jpg2PdfUtil {
* @param w
* @return
*/
public static int getPercent(float h, float w) {
private static int getPercent(float h, float w) {
int p = 0;
float p2 = 0.0f;
if (h > w) {

@ -1,17 +1,10 @@
package com.emr.util;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.druid.pool.DruidDataSource;
@ -24,13 +17,13 @@ import com.alibaba.druid.pool.DruidDataSource;
*/
public class OracleConnect {
private static DruidDataSource dataSourceTest = null;
public static PreparedStatement pst = null;
private static PreparedStatement pst = null;
public static ResultSet rs = null;
/**
*
*/
public OracleConnect() {
private OracleConnect() {
try {
if (dataSourceTest == null) {
dataSourceTest = new DruidDataSource();
@ -68,7 +61,7 @@ public class OracleConnect {
* @param conn Connection
* @throws Exception
*/
public static void CloseConn(ResultSet rs, Statement stat, Connection conn)
private static void CloseConn(ResultSet rs, Statement stat, Connection conn)
throws Exception {
if (rs != null) {
rs.close();
@ -94,11 +87,7 @@ public class OracleConnect {
Connection conn = new OracleConnect().getConnect();
pst = conn.prepareStatement(arg0);
rs = pst.executeQuery();
List list = new ArrayList();
if (rs != null) {
ResultSetMetaData md = rs.getMetaData();
int columnCount = md.getColumnCount();
Map rowData = new HashMap();
while (rs.next()) {
str = rs.getString(1);
}

@ -9,14 +9,12 @@ package com.emr.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.pdf.PdfCopy;
import com.itextpdf.text.pdf.PdfImportedPage;
import com.itextpdf.text.pdf.PdfReader;
import org.springframework.beans.factory.annotation.Value;
public class PDFUtils {
@ -44,7 +42,7 @@ public class PDFUtils {
}
//删除指定文件夹下的所有文件
public static boolean delAllFile(String path) {
private static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
@ -55,17 +53,17 @@ public class PDFUtils {
}
String[] tempList = file.list();
File temp = null;
for (int i = 0; i < tempList.length; i++) {
for (String s : tempList) {
if (path.endsWith(File.separator)) {
temp = new File(path + tempList[i]);
temp = new File(path + s);
} else {
temp = new File(path + File.separator + tempList[i]);
temp = new File(path + File.separator + s);
}
if (temp.isFile()) {
temp.delete();
}
if (temp.isDirectory()) {
delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
delAllFile(path + "/" + s);//先删除文件夹里面的文件
//delFolder(path + "/" + tempList[i]);//再删除空文件夹
flag = true;
}
@ -73,53 +71,48 @@ public class PDFUtils {
return flag;
}
public static void getPdf(String filePath, List pathArr){
if(pathArr!=null) {
File[] pdfs = new File[pathArr.size()];
for (int i = 0; i < pathArr.size(); i++) {
pdfs[i] = new File(pathArr.get(i).toString());
}
File mergedPdf = new File(filePath);
try {
merge(pdfs, mergedPdf);
} catch (IOException | DocumentException e) {
e.printStackTrace();
}
}
}
/**
* @param pages
* @param pdffile
* @throws IOException
* @throws DocumentException
*/
public static void merge(File[] pages, File pdffile) throws IOException,
DocumentException {
if (!pdffile.exists()) {
pdffile.createNewFile();
}
if (pages.length < 1)
return;
Document document = new Document(new PdfReader(
((File) pages[0]).getAbsolutePath()).getPageSize(1));
PdfCopy copy = new PdfCopy(document, new FileOutputStream(pdffile));
document.open();
for (int i = 0; i < pages.length; i++) {
PdfReader reader = new PdfReader((pages[i]).getAbsolutePath());
int num = reader.getNumberOfPages();
for (int j = 1; j <= num; j++) {
document.newPage();
PdfImportedPage page = copy.getImportedPage(reader, j);
copy.addPage(page);
public static void merge(File[] pages, File pdffile){
Document document = null;
PdfCopy copy = null;
PdfReader reader = null;
try {
if (!pdffile.exists()) {
pdffile.createNewFile();
}
if (pages.length < 1) {
return;
}
document = new Document(new PdfReader(
(pages[0]).getAbsolutePath()).getPageSize(1));
copy = new PdfCopy(document, new FileOutputStream(pdffile));
document.open();
for (File page1 : pages) {
reader = new PdfReader((page1).getAbsolutePath());
int num = reader.getNumberOfPages();
for (int j = 1; j <= num; j++) {
PdfImportedPage page = copy.getImportedPage(reader, j);
copy.addPage(page);
}
}
} catch (IOException | DocumentException e) {
e.printStackTrace();
} finally {
if(null != copy){
copy.close();
}
if(null != document){
document.close();
}
if(null != reader){
reader.close();
}
}
copy.close();
document.close();
// for (File page : pages) {
// page.deleteOnExit();
// }
}
}

@ -1,141 +0,0 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/7/19 19:20
* Description:
*/
package com.emr.util;
import java.util.List;
public class PageBean<T> {
//已知数据
private int pageNum; //当前页,从请求那边传过来。
private int pageSize; //每页显示的数据条数。
private int totalRecord; //总的记录条数。查询数据库得到的数据
//需要计算得来
private int totalPage; //总页数通过totalRecord和pageSize计算可以得来
//开始索引也就是我们在数据库中要从第几行数据开始拿有了startIndex和pageSize
//就知道了limit语句的两个数据就能获得每页需要显示的数据了
private int startIndex;
//将每页要显示的数据放在list集合中
private List<T> list;
//分页显示的页数,比如在页面上显示12345页start就为1end就为5这个也是算过来的
private int start;
private int end;
//通过pageNumpageSizetotalRecord计算得来tatalPage和startIndex
//构造方法中将pageNumpageSizetotalRecord获得
public PageBean(int pageNum, int pageSize, int totalRecord) {
this.pageNum = pageNum;
this.pageSize = pageSize;
this.totalRecord = totalRecord;
//totalPage 总页数
if (totalRecord % pageSize == 0) {
//说明整除正好每页显示pageSize条数据没有多余一页要显示少于pageSize条数据的
this.totalPage = totalRecord / pageSize;
} else {
//不整除,就要在加一页,来显示多余的数据。
this.totalPage = totalRecord / pageSize + 1;
}
//开始索引
this.startIndex = (pageNum - 1) * pageSize;
//显示5页这里自己可以设置想显示几页就自己通过下面算法修改
this.start = 1;
this.end = 5;
//显示页数的算法
if (totalPage <= 5) {
//总页数都小于5那么end就为总页数的值了。
this.end = this.totalPage;
} else {
//总页数大于5那么就要根据当前是第几页来判断start和end为多少了
this.start = pageNum - 2;
this.end = pageNum + 2;
if (start < 0) {
//比如当前页是第1页或者第2页那么就不如和这个规则
this.start = 1;
this.end = 5;
}
if (end > this.totalPage) {
//比如当前页是倒数第2页或者最后一页也同样不符合上面这个规则
this.end = totalPage;
this.start = end - 5;
}
}
}
//get、set方法。
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalRecord() {
return totalRecord;
}
public void setTotalRecord(int totalRecord) {
this.totalRecord = totalRecord;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getStartIndex() {
return startIndex;
}
public void setStartIndex(int startIndex) {
this.startIndex = startIndex;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getEnd() {
return end;
}
public void setEnd(int end) {
this.end = end;
}
}

@ -14,7 +14,6 @@ import com.lowagie.text.pdf.PdfImportedPage;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfWriter;
import org.apache.commons.io.FileUtils;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
@ -38,6 +37,7 @@ public class PrintToPdfUtil {
public static void toPdf(String imageFolderPath, String pdfPath,List dirList) {
// 创建文档
Document doc = new Document(null, 0, 0, 0, 0);
FileOutputStream fos = null;
try {
//判断文件夹是否存在
String pdfStr = pdfPath.substring(0, pdfPath.lastIndexOf("\\"));
@ -54,36 +54,34 @@ public class PrintToPdfUtil {
System.out.println("文件正在被操作");
}
file1.delete();
System.gc();
}
// 输入流
FileOutputStream fos = new FileOutputStream(pdfPath);
fos = new FileOutputStream(pdfPath);
//doc.open();
// 写入PDF文档
PdfWriter.getInstance(doc, fos);
// 获取图片文件夹对象
File file = new File(imageFolderPath);
//imageFolderPath = file.getAbsolutePath() + "\\";
imgFun(imageFolderPath,file, dirList, doc);
imgFun(new File(imageFolderPath), dirList, doc);
} catch (Exception e) {
e.printStackTrace();
}finally {
if (doc.isOpen()) {
// 关闭文档
doc.close();
try {
assert fos != null;
fos.flush();
fos.close();
if(null != doc){
doc.close();
}
}catch (Exception e){
e.printStackTrace();
}
}
}
public static void imgFun(String imageFolderPath,File file, List dirList, Document doc){
public static void imgFun(File file, List dirList, Document doc){
// 图片地址
String imagePath = null;
// 读取图片流
BufferedImage img = null;
// 实例化图片
@ -96,7 +94,7 @@ public class PrintToPdfUtil {
if (file1.getName().endsWith(".png") || file1.getName().endsWith(".jpg") || file1.getName().endsWith(".gif")
|| file1.getName().endsWith(".jpeg") || file1.getName().endsWith(".tif")) {
imageFolderPath = file1.getAbsolutePath();
String imageFolderPath = file1.getAbsolutePath();
// 读取图片流
img = ImageIO.read(new File(imageFolderPath));
@ -120,117 +118,33 @@ public class PrintToPdfUtil {
if (file1.isDirectory()) {
if (dirList != null && dirList.size() > 0) {
if (dirList.indexOf(file1.getName()) != -1) {
imageFolderPath = file1.getAbsolutePath() + "\\";
imgFun(imageFolderPath, file1, dirList, doc);
imgFun(file1, dirList, doc);
}
} else {
imageFolderPath = file1.getAbsolutePath() + "\\";
imgFun(imageFolderPath, file1, dirList, doc);
imgFun(file1, dirList, doc);
}
}
}
} catch(Exception e){
e.printStackTrace();
} finally {
if (doc.isOpen()) {
// 关闭文档
doc.close();
}
if(null != img){
img.flush();
}
}
}else{
System.out.println("空文件夹");
}
}
public static void pdtToPdf(String pdfFolderPath, String pdfPath, List dirList, List pdfList) {
try {
// 输入流
// FileOutputStream fos = new FileOutputStream(pdfPath);
// // 创建文档
Document doc = new Document(null, 0, 0, 0, 0);
// //doc.open();
// // 写入PDF文档
// PdfWriter.getInstance(doc, fos);
//
// // 获取文件夹对象
File file = new File(pdfFolderPath);
PDFMergerUtility mergePdf = new PDFMergerUtility();
//imageFolderPath = file.getAbsolutePath() + "\\";
pdfFun(pdfFolderPath, file, dirList, pdfList, mergePdf);
mergePdf.setDestinationFileName(pdfPath);
mergePdf.mergeDocuments();
System.out.print("done");
// if (doc.isOpen()) {
// // 关闭文档
// doc.close();
// }
} catch (Exception e) {
e.printStackTrace();
}
}
public static void pdfFun(String pdfFolderPath, File file, List dirList,List pdfList, PDFMergerUtility mergePdf) {
try {
File[] files = file.listFiles();
if(file!=null) {
if (files.length > 0) {
// 循环获取图片文件夹内的图片
for (File file1 : files) {
if (file1.getName().endsWith(".pdf")) {
//System.out.println(file1.length());
if (pdfList != null && pdfList.size() > 0) {
System.out.println("文件名:" + file1.getName());
if (pdfList.indexOf(file1.getName()) != -1) {
} else {
if (file1.length() == 0) {
//file.delete();
} else {
pdfFolderPath = file1.getAbsolutePath();
mergePdf.addSource(pdfFolderPath);
}
}
} else {
if (file1.length() == 0) {
//file.delete();
} else {
pdfFolderPath = file1.getAbsolutePath();
mergePdf.addSource(pdfFolderPath);
}
}
}
if (file1.isDirectory()) {
if (dirList != null && dirList.size() > 0) {
if (dirList.indexOf(file1.getName()) != -1) {
pdfFolderPath = file1.getAbsolutePath() + "\\";
pdfFun(pdfFolderPath, file1, dirList, pdfList, mergePdf);
}
} else {
pdfFolderPath = file1.getAbsolutePath() + "\\";
pdfFun(pdfFolderPath, file1, dirList, pdfList, mergePdf);
}
}
}
} else {
System.out.println("空文件夹");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
*
@ -241,7 +155,6 @@ public class PrintToPdfUtil {
* @return boolean (true:;false:)
*/
public static boolean save(File file, String filename, String savepath) {
filename = filename;
File f = new File(savepath, filename);
try {
FileUtils.copyFile(file, f);
@ -283,27 +196,32 @@ public class PrintToPdfUtil {
public static boolean mergePdfFiles(List files, String newfile) {
boolean retValue = false;
Document document = null;
PdfCopy copy = null;
PdfReader reader = null;
try {
document = new Document(new PdfReader(files.get(0).toString()).getPageSize(1));
PdfCopy copy = new PdfCopy(document, new FileOutputStream(newfile));
copy = new PdfCopy(document, new FileOutputStream(newfile));
document.open();
for (int i = 0; i < files.size(); i++) {
PdfReader reader = new PdfReader(files.get(i).toString());
for (Object file : files) {
reader = new PdfReader(file.toString());
int n = reader.getNumberOfPages();
long start = System.currentTimeMillis();
for (int j = 1; j <= n; j++) {
document.newPage();
PdfImportedPage page = copy.getImportedPage(reader, j);
copy.addPage(page);
}
long end = System.currentTimeMillis();
System.out.println("合成pdf时间");
}
retValue = true;
} catch (Exception e) {
e.printStackTrace();
} finally {
document.close();
assert copy != null;
copy.close();
if(null != document) {
document.close();
}
if(null != reader){
reader.close();
}
}
return retValue;
}
@ -330,7 +248,6 @@ public class PrintToPdfUtil {
String savepath = "C:\\Users\\Administrator\\Desktop\\新建文件夹\\temp.pdf";
mergePdfFiles(list, savepath);
}
}

@ -26,11 +26,4 @@ public class PropertiesUtils {
}
return props.getProperty(key);
}
public static String getProperty(String key, String defaultValue) {
if (null == props) {
loadProps();
}
return props.getProperty(key, defaultValue);
}
}

@ -1,65 +0,0 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/1 10:54
* Description:
*/
package com.emr.util;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class ReadFile {
/*
*
*/
public void getFileList(String path,List divList) {
File file = new File(path);
File[] fileList = file.listFiles();
for (int i = 0; i < fileList.length; i++) {
if (fileList[i].isFile()) {
String fileName = fileList[i].getName();
System.out.println("文件:" + fileName);
}
if (fileList[i].isDirectory()) {
//if(divList.indexOf(fileList[i].getName())!=-1) {
String fileName = fileList[i].getName();
System.out.println("目录:" + fileName);
// }
}
}
}
public static void printFile(File file) {
if (file.isFile()) {
System.out.println("您给定的是一个文件"); // 判断给定目录是否是一个合法的目录,如果不是,输出提示
} else {
File[] fileLists = file.listFiles(); // 如果是目录,获取该目录下的内容集合
for (int i = 0; i < fileLists.length; i++) { // 循环遍历这个集合内容
System.out.println(fileLists[i].getName()); //输出元素名称
if (fileLists[i].isDirectory()) { //判断元素是不是一个目录
printFile(fileLists[i]); //如果是目录,继续调用本方法来输出其子目录
}
}
}
}
public static void main(String[] args) {
printFile(new File("D:\\"));
// ReadFile rf = new ReadFile();
// List list=new ArrayList();
// list.add("log");
// list.add("logs");
// rf.getFileList("D:\\", list);
}
}

@ -1,88 +0,0 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/14 15:06
* Description:urlJava
*/
package com.emr.util;
import java.util.HashMap;
import java.util.Map;
/**
* @author
* @description url
* @date
*/
public class UrlUtil {
public static class UrlEntity {
/**
* url
*/
public String baseUrl;
/**
* url
*/
public Map<String, String> params;
}
/**
* url
*
* @param url
* @return
*/
public static UrlEntity parse(String url) {
UrlEntity entity = new UrlEntity();
if (url == null) {
return entity;
}
url = url.trim();
if (url.equals("")) {
return entity;
}
String[] urlParts = url.split("\\?");
entity.baseUrl = urlParts[0];
//没有参数
if (urlParts.length == 1) {
return entity;
}
//有参数
String[] params = urlParts[1].split("&");
entity.params = new HashMap<>();
for (String param : params) {
String[] keyValue = param.split("=");
entity.params.put(keyValue[0], keyValue[1]);
}
return entity;
}
/**
*
*
* @param args
*/
public static void main(String[] args) {
/*
null
null
http://www.123.com
null
http://www.123.com
{id=1}
http://www.123.com
{name=, id=1}
*/
UrlEntity entity = parse(null);
System.out.println(entity.baseUrl + "\n" + entity.params);
entity = parse("http://www.123.com");
System.out.println(entity.baseUrl + "\n" + entity.params);
entity = parse("http://www.123.com?id=1");
System.out.println(entity.baseUrl + "\n" + entity.params);
entity = parse("http://www.123.com?id=1&name=小明");
System.out.println(entity.baseUrl + "\n" + entity.params);
}
}

@ -1,111 +0,0 @@
/**
* Copyright (C), 2015-2019
* Author: HJL
* Date: 2019/8/1 16:07
* Description:
*/
package com.emr.util;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.cxf.service.model.BindingInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.pdfbox.multipdf.PDFMergerUtility;
import javax.xml.namespace.QName;
import java.io.File;
import java.io.IOException;
public class test {
private static String[] getFiles(String folder) throws IOException {
File _folder = new File(folder);
String[] filesInFolder;
if (_folder.isDirectory()) {
filesInFolder = _folder.list();
return filesInFolder;
} else {
throw new IOException("Path is not a directory");
}
}
private static void pdfToPdf(String folder,String fileName) throws Exception {
PDFMergerUtility mergePdf = new PDFMergerUtility();
String[] filesInFolder = getFiles(folder);
for (int i = 0; i < filesInFolder.length; i++){
mergePdf.addSource(folder + File.separator + filesInFolder[i]);
System.out.println(filesInFolder[i]);
}
mergePdf.setDestinationFileName(folder + File.separator + fileName);
System.out.println(folder);
mergePdf.mergeDocuments();
System.out.print("done");
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
// String folder = "D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\pdfFiles";
// String fileName = "mergedTest.pdf";
//pdfToPdf(folder, fileName);
//String str = "D:\\project_js\\EMR_Medical_Record\\src\\main\\webapp\\static\\img\\uploads\\4\\a.jpg";
//获得第一个点的位置
// int index = str.indexOf("\\static");
//String result = str.substring(0,index+1);
//输出结果
///System.out.println(str.substring(index, str.length()));
// JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
// Client client = dcf.createClient(HomepageDictionary);
// Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
// System.out.println(client);
// try {
// String endpoint = "http://120.27.212.36:9999/filing/services/HomepageDictionary?wsdl";
// //String endpoint = "http://localhost:8080/ca3/services/caSynrochnized?wsdl";
// //直接引用远程的wsdl文件
// //以下都是套路
// Service service = new Service();
// Call call = (Call) service.createCall();
// call.setTargetEndpointAddress(endpoint);
// call.setOperationName(new QName("http://interfaces.ann.com/", "CheckData"));
//
// //call.setOperationName("CheckData");//WSDL里面描述的接口名称
// call.addParameter("masterId", org.apache.axis.encoding.XMLType.XSD_DATE, javax.xml.rpc.ParameterMode.IN);//接口的参数
// call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);//设置返回类型
// String temp = "02e4ba493dc643c9926926662327995e";
// String result = (String) call.invoke(new Object[]{temp});
// //给方法传递参数,并且调用方法
//
// System.out.println("result is " + result);
//
// } catch (Exception e) {
// System.err.println(e.toString());
//
// }
String method = "CheckData";
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
Client client = factory.createClient("http://120.27.212.36:9999/filing/services/HomepageDictionary?wsdl");
// Endpoint endpoint2 = client.getEndpoint();
// QName opName = new QName(endpoint2.getService().getName().getNamespaceURI(), method);
// BindingInfo bindingInfo = endpoint2.getEndpointInfo().getBinding();
// if (bindingInfo.getOperation(opName) == null) {
// for (BindingOperationInfo operationInfo : bindingInfo.getOperations()) {
// if (method.equals(operationInfo.getName().getLocalPart())) {
// opName = operationInfo.getName();
// break;
// }
// }
// }
Object[] res = null;
res = client.invoke("CheckData","02e4ba493dc643c9926926662327995e");
String xml = (String) res[0];
System.err.println("@@@@@@@@@@@@@@@@@" + xml);
}
}

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:activiti="http://activiti.org/bpmn" targetNamespace="Examples"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd">
<process id="leave_process" name="某公司请假流程">
<startEvent id="leave" name="请假申请"></startEvent>
<userTask id="dept_manager" name="部门经理审批"></userTask>
<userTask id="boss" name="总经理审批"></userTask>
<userTask id="hr" name="HR审批"></userTask>
<sequenceFlow id="flow1" sourceRef="leave" targetRef="dept_manager"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="dept_manager" targetRef="boss">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${day >= 3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow3" sourceRef="boss" targetRef="hr"></sequenceFlow>
<sequenceFlow id="flow4" sourceRef="dept_manager" targetRef="hr">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${day < 3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow5" sourceRef="hr" targetRef="end"></sequenceFlow>
<endEvent id="end" name="结束"></endEvent>
</process>
</definitions>

@ -1,7 +1,7 @@
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=gm_record
jdbc.username=sa
jdbc.password=AbcXyz123
jdbc.password=docus702
filters=stat
maxWait=60000
@ -24,9 +24,9 @@ hibernate.enable_lazy_load_no_trans=true
#powerUrl=http://120.27.212.36:8888/power/font/getMenusByUserIdAndSysFlag
#POWER_URLHEAD=http://120.27.212.36:8888/power
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934\u5982\uFF1Ahttp://192.168.1.3:8081/power
powerUrl=http://200.100.104.40:8081/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://200.100.104.40:8081/power
POWER_JSP=http://200.100.104.40:8081/power
powerUrl=http://192.168.1.3:8080/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://192.168.1.3:8080/power
POWER_JSP=http://192.168.1.3:8080/power
recallReason=\u533B\u9662\u9700\u8981\u8FD9\u4EFD\u6587\u6863
HomepageDictionary=http://200.100.104.40:8081/filing/services/HomepageDictionary?wsdl
HomepageMethod=CheckData

@ -1,106 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!-- 该配置文件说明插件需要如何生成,以及生成对应的包名,路径等信息。
还有重要的就是我们要生成的实体类所对应的的表或者试图 -->
<generatorConfiguration>
<properties resource="config/gennerator.properties" />
<classPathEntry location="${jdbc.driverLocation}"/>
<context id="MBG" targetRuntime="MyBatis3">
<!-- 注意以下标签的顺序:property*,plugin*,commentGenerator?,jdbcConnection,
javaTypeResolver?,javaModelGenerator,sqlMapGenerator?,
javaClientGenerator?,table+ -->
<!-- <plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin" /> -->
<!-- 这个插件给由MBG生成的Java模型对象增加了equals和hashCode方法 -->
<!-- <plugin type="org.mybatis.generator.plugins.EqualsHashCodePlugin"/> -->
<!-- com.github.pagehelper为PageHelper类所在包名 -->
<!-- 该属性仅在确实需要进行合并而不是覆盖的情况下使用且值要求为true -->
<property name="mergeable" value="true"></property>
<commentGenerator>
<!-- 是否去除自动生成的注释 true false:否 -->
<property name="suppressAllComments" value="true"/>
<!-- 不希望生成的注释中包含时间戳 -->
<property name="suppressDate" value="true" />
<!-- 是否 自动为每一个生成的类创建一个构造方法-->
<property name="constructorBased" value="true"/>
<!--分页参数合理化-->
<!--<property name="reasonable" value="true"/> -->
<property name="validationQuery" value="select * from dual"/>
</commentGenerator>
<!-- 数据库连接 -->
<jdbcConnection
driverClass="${jdbc.driver}"
connectionURL="${jdbc.url}"
userId="${jdbc.username}"
password="${jdbc.password}">
</jdbcConnection>
<!-- 指定生成的类型为java类型避免数据库中number等类型字段 -->
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成model模型对应的包存放位置可以指定具体的路径,如/ProjectName/src也可以使用MAVEN来自动生成 -->
<javaModelGenerator targetPackage="${modelPackage}" targetProject="${targetProject}">
<!-- 在targetPackage的基础上根据数据库的schema再生成一层package最终生成的类放在这个package下默认为false -->
<property name="enableSubPackages" value="true"/>
<!-- 设置是否在getter方法中对String类型字段调用trim()方法 -->
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!--对应的xml mapper文件 -->
<sqlMapGenerator targetPackage="${sqlMapperPackage}" targetProject="${targetProject2}" >
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 对应的dao接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="${daoMapperPackage}" targetProject="${targetProject}" >
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 表名对应生成的实体 -->
<!-- <table tableName="T_Role_Menu" domainObjectName="T_Role_Menu" /> -->
<!-- enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"> 指定是否生成操作数据库对应的方法 -->
<!--<table tableName="T_User" domainObjectName="T_User"/>-->
<!--<table tableName="T_Role" domainObjectName="T_Role"/>-->
<!-- <table tableName="T_User" domainObjectName="T_User" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="T_Role_Menu" domainObjectName="T_Role_Menu" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="T_Role" domainObjectName="T_Role" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="T_Menu" domainObjectName="T_Menu" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>-->
<!-- <table tableName="T_Menu" domainObjectName="T_Menu" enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>-->
<!--<table tableName="Archive_Master" domainObjectName="Archive_Master" enableCountByExample="false" enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Archive_Detail" domainObjectName="Archive_Detail" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Emr_Archive_Detail" domainObjectName="Emr_Archive_Detail" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Emr_Fault_Detail" domainObjectName="Emr_Fault_Detail" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<!--<table tableName="Emr_Picture" domainObjectName="Emr_Picture" enableCountByExample="false"-->
<!--enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false"/>-->
<table tableName="Emr_Fault_Type" domainObjectName="Emr_Fault_Type" enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"/>
</context>
</generatorConfiguration>

@ -116,7 +116,6 @@
delete from t_basic where patient_id = #{patientId};
delete from t_operate where patient_id = #{patientId};
delete from t_admiss_thing where patient_id = #{patientId};
delete from archive_archived where patient_id = (select patient_id from archive_master where id = #{patientId});
end
</delete>
</mapper>

@ -23,7 +23,7 @@
.divCss2 {
margin-top: 5px;
margin-left: 20px;
margin-left: 5px;
}
.divCss8 {
@ -180,20 +180,19 @@
<div class="form-inline">
<div class="form-group divCss8">
<label for="name">主管医生:</label>
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25"
placeholder="请输入主管医生姓名">
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25" placeholder="请输入主管医生姓名">
</div>
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数">
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数" maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓&emsp;&emsp;名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div class="form-group divCss8" id="deptDiv" style="height: 18px;margin-top: -7px;">
<label>出院科室:</label>
@ -205,9 +204,9 @@
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDateTo" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -312,7 +311,7 @@
<div class="divCss4"></div>
<div class="row">
<div class="row divCss3 ">病历清单</div>
<div class="col-sm-3 divCss2">
<div class="col-sm-3 divCss2" style="width: 25%">
<div class="row titleCss"></div>
<div class="row">
<div class="col-sm-9">
@ -336,7 +335,7 @@
</div>
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="col-sm-8 divCss5" style="width: 73%">
<div class="row btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="checkSuccessBtn">查看完整性</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
@ -377,7 +376,7 @@
<div class="form-group"><input id="fileUrlInp" hidden/>
<label class="col-sm-4 control-label">标题:</label>
<div class="col-sm-5">
<input type="text" class="input-sm form-control" id="inpTitle" name="inpTitle">
<input type="text" class="input-sm form-control" id="inpTitle" name="inpTitle" maxlength="100">
</div>
<div class="col-sm-1"></div>
</div>
@ -395,7 +394,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">来源:</label>
<div class="col-sm-5">
<input type="text" class="input-sm form-control" readonly id="inpSource" name="inpSource">
<input type="text" class="input-sm form-control" readonly id="inpSource" name="inpSource" maxlength="25">
</div>
<div class="col-sm-1"></div>
</div>

@ -86,7 +86,7 @@
&nbsp;字典列表
</div>
<div class="form-inline ">
<input type="text" id="key" value="" class="input-sm " style="width:70%" placeholder="字典名称"/>
<input type="text" id="key" value="" class="input-sm " style="width:70%" placeholder="字典名称" maxlength="25"/>
<button type="button" class="btn btn-primary btn-sm" id="searchBtn">查询</button>
</div>
<div class="row" style="margin-left: 5px;">
@ -115,7 +115,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">类别代码:</label>
<div class="col-sm-4"><input type="text" hidden id="id" name="id" value=""/>
<input type="text" class="input-sm form-control" id="typecode" name="typeFlag"/>
<input type="text" class="input-sm form-control" id="typecode" name="typeFlag" maxlength="25"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -124,7 +124,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">类别名称:</label>
<div class="col-sm-4">
<input type="text" class="input-sm form-control" id="typename" name="typename"/>
<input type="text" class="input-sm form-control" id="typename" name="typename" maxlength="25"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -134,7 +134,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">代码:</label>
<div class="col-sm-4">
<input type="text" class="input-sm form-control" id="code" name="code"/>
<input type="text" class="input-sm form-control" id="code" name="code" maxlength="25"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -143,7 +143,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-4">
<input type="text" class="input-sm form-control" id="name" name="name"/>
<input type="text" class="input-sm form-control" id="name" name="name" maxlength="25"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -152,7 +152,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">拼音码:</label>
<div class="col-sm-4">
<input type="text" readonly class="input-sm form-control" id="pyCode" name="pyCode"/>
<input type="text" readonly class="input-sm form-control" id="pyCode" name="pyCode" maxlength="25"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -161,7 +161,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">五笔码:</label>
<div class="col-sm-4">
<input type="text" readonly class="input-sm form-control" id="wbCode" name="wbCode"/>
<input type="text" readonly class="input-sm form-control" id="wbCode" name="wbCode" maxlength="25"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -170,7 +170,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">邮编:</label>
<div class="col-sm-4">
<input type="text" class="input-sm form-control" id="zipCode" name="zipCode"/>
<input type="text" class="input-sm form-control" id="zipCode" name="zipCode" maxlength="20"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -179,7 +179,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">国标码:</label>
<div class="col-sm-4">
<input type="text" class="input-sm form-control" id="gbCode" name="gbCode"/>
<input type="text" class="input-sm form-control" id="gbCode" name="gbCode" maxlength="20"/>
</div>
<div class="col-sm-1"></div>
</div>
@ -236,7 +236,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">说明:</label>
<div class="col-sm-6">
<textarea class="input-sm form-control" rows="5" id="cComment" name="cComment"></textarea>
<textarea class="input-sm form-control" rows="5" id="cComment" name="cComment" maxlength="25"></textarea>
</div>
<div class="col-sm-1"></div>
</div>
@ -245,7 +245,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-6">
<textarea class="input-sm form-control" rows="5" id="remark" name="recallReason"></textarea>
<textarea class="input-sm form-control" rows="5" id="remark" name="recallReason" maxlength="25"></textarea>
</div>
<div class="col-sm-1"></div>
</div>

@ -58,22 +58,22 @@
<div class="form-inline">
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数">
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数" maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDateTo" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">

@ -59,7 +59,7 @@
<div class="row">
<div class="col-sm-12">
<input type="text" id="key" value="" class="input-sm empty left" placeholder="缺陷类别名称"
style="width:70%"/>
style="width:70%" maxlength="25"/>
<button type="button" class="btn btn-primary btn-sm left" id="searchBtn" style="margin-left: 5px">查询
</button>
</div>
@ -91,7 +91,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">类别代码:</label>
<div class="col-sm-4"><input type="text" hidden id="id" name="id">
<input type="text" class="input-sm form-control" id="typeFlag" name="typeFlag">
<input type="text" class="input-sm form-control" id="typeFlag" name="typeFlag" maxlength="16">
</div>
<div class="col-sm-1"></div>
</div>
@ -100,7 +100,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">类别名称:</label>
<div class="col-sm-4">
<input type="text" class="input-sm form-control" id="typeName" name="typeName">
<input type="text" class="input-sm form-control" id="typeName" name="typeName" maxlength="25">
</div>
<div class="col-sm-1"></div>
</div>
@ -109,7 +109,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">类别排序:</label>
<div class="col-sm-4">
<input type="number" class="input-sm form-control" id="typeSort" name="typeSort">
<input type="number" class="input-sm form-control" id="typeSort" name="typeSort" min="0" maxlength="2">
</div>
<div class="col-sm-1"></div>
</div>
@ -131,7 +131,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-6">
<textarea class="input-sm form-control" rows="5" id="remark" name="recallReason"></textarea>
<textarea class="input-sm form-control" rows="5" id="remark" name="recallReason" maxlength="50"></textarea>
</div>
<div class="col-sm-1"></div>
</div>

@ -50,14 +50,14 @@
<div class="form-group divCss8">
<label>审核日期:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8">
<label>审核姓名:</label>
<input type="text" class="form-control input-sm" id="checkDoctor">
<input type="text" class="form-control input-sm" id="checkDoctor" maxlength="8">
</div>
<div class="form-group divCss8">
<label>出院科室:</label>
@ -70,9 +70,9 @@
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime2" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime2" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime2" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime2" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -86,11 +86,11 @@
</div>
<div class="form-group divCss8">
<label>患者姓名:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<div class="form-group divCss8">
<label>&emsp;住院号:</label>
<input type="text" class="form-control input-sm" id="inpNo">
<input type="text" class="form-control input-sm" id="inpNo" maxlength="25">
</div>
<div class="form-group divCss8">
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>

@ -49,9 +49,9 @@
<div class="form-group divCss8">
<label>设置日期:</label>
<div class="input-daterange input-group">
<input type="text" class="input-sm form-control" id="startTime2" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime2" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime2" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime2" maxlength="10" autocomplete="off"/>
</div>
</div>
</div>
@ -87,9 +87,9 @@
<div class="form-group divCss8">
<label>查询日期:</label>
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="startTime1" id="startTime1" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="startTime1" id="startTime1" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="endTime1" id="endTime1" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="endTime1" id="endTime1" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">

@ -23,7 +23,7 @@
.divCss2 {
margin-top: 5px;
margin-left: 20px;
margin-left: 5px;
}
@ -150,20 +150,19 @@
<div class="form-inline">
<div class="form-group divCss8">
<label for="name">主管医生:</label>
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25"
placeholder="请输入主管医生姓名">
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25" placeholder="请输入主管医生姓名">
</div>
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数">
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数" maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓&emsp;&emsp;名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div class="form-group divCss8" id="deptDiv" style="height: 18px;margin-top: -7px;">
<label>入院科室:</label>
@ -175,9 +174,9 @@
<div class="form-group divCss">
<label>入院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDateTo" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -260,7 +259,7 @@
<div class="divCss4"></div>
<div class="row">
<div class="row divCss3 ">病历清单</div>
<div class="col-sm-3 divCss2">
<div class="col-sm-3 divCss2" style="width: 25%">
<div class="row titleCss"></div>
<div class="row">
<div class="col-sm-9">
@ -284,7 +283,7 @@
</div>
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="col-sm-8 divCss5" style="width:73%">
<div class="row btnGroupCss">
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
@ -327,7 +326,7 @@
<div class="form-group"><input id="fileUrlInp" hidden/>
<label class="col-sm-4 control-label">标题:</label>
<div class="col-sm-5">
<input type="text" class="input-sm form-control" id="inpTitle" name="inpTitle">
<input type="text" class="input-sm form-control" id="inpTitle" name="inpTitle" maxlength="100">
</div>
<div class="col-sm-1"></div>
</div>

File diff suppressed because it is too large Load Diff

@ -24,7 +24,7 @@
.divCss2 {
margin-top: 5px;
margin-left: 20px;
margin-left: 5px;
}
.divCss22 {
@ -181,20 +181,19 @@
<div class="form-inline">
<div class="form-group divCss8">
<label for="name">主管医生:</label>
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25"
placeholder="请输入主管医生姓名">
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25" placeholder="请输入主管医生姓名">
</div>
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数">
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数" maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓&emsp;&emsp;名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div class="form-group divCss8" id="deptDiv" style="height: 18px;margin-top: -7px;">
<label>出院科室:</label>
@ -207,9 +206,9 @@
<div class="form-group divCss">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDateTo" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -309,7 +308,7 @@
<div class="divCss4"></div>
<div class="row">
<div class="row divCss3 ">病历清单</div>
<div class="col-sm-3 divCss2">
<div class="col-sm-3 divCss2" style="width: 25%">
<div class="row titleCss"></div>
<div class="row">
<div class="col-sm-9">
@ -333,7 +332,7 @@
</div>
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="col-sm-8 divCss5" style="width: 73%">
<div class="row btnGroupCss">
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
@ -375,7 +374,7 @@
<div class="form-group"><input id="fileUrlInp" hidden/>
<label class="col-sm-4 control-label">标题:</label>
<div class="col-sm-5">
<input type="text" class="input-sm form-control" id="inpTitle" name="inpTitle">
<input type="text" class="input-sm form-control" id="inpTitle" name="inpTitle" maxlength="100">
</div>
<div class="col-sm-1"></div>
</div>

@ -93,9 +93,9 @@
<div class="form-group divCss">
<label>召回日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDate" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDate" maxlength="10" autocomplete="off"/>
</div>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>

@ -63,19 +63,19 @@
<div class="form-inline">
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数">
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数" maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓&emsp;&emsp;名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div class="form-group divCss8">
<label for="name">身份证号:</label>
<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号">
<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号" maxlength="18">
</div>
<%--<div class="form-group divCss8">
<label for="archivestate">归档状态 :</label>

@ -1,42 +0,0 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<html>
<head>
<title>${name}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!-- 页面按原比例显示 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/WEB-INF/jspf/common.jspf" %>
<link rel="shortcut icon" href="../favicon.ico">
</head>
<body onkeydown="disabledPrint()">
<c:if test="${masterId != '' && masterId != null}">
<iframe width="100%" height="100%" src="${path}/static/pdfjs/web/viewer.html?file=${path}/inHosp/getPdfToPdf/${masterId}/${imgStr}"></iframe>
</c:if>
<c:if test="${masterId == '' || masterId == null}">
<iframe width="100%" height="100%" src="${path}/static/pdfjs/web/viewer.html?file=${path}/inHosp/getPdfById/${idStr}"></iframe>
</c:if>
<script type="text/javascript">
//屏蔽鼠标右键
document.oncontextmenu = function(e) {
var e = e || window.event;
e.returnValue = false;
return false;
}
//禁止快捷键打印
function disabledPrint(){
if(event.keyCode==80 && event.ctrlKey){
event.keyCode=0;
event.returnValue=false;
}
if (event.ctrlKey && event.keyCode == 83) {
event.preventDefault();
event.returnValue = false;
return false;
}
}
</script>
</body>
</html>

@ -51,11 +51,10 @@
<div class="form-group divCss">
<label>终审日期:</label>
<div class="input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startTime1"
style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endTime1"
style="text-align: center" autocomplete="off"/>
maxlength="10" style="text-align: center" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">

@ -47,14 +47,14 @@
<div class="form-group divCss8">
<label>审核日期:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8">
<label>审核姓名:</label>
<input type="text" class="form-control input-sm" id="checkDoctor">
<input type="text" class="form-control input-sm" id="checkDoctor" maxlength="8">
</div>
<div class="form-group divCss8">
<label >出院科室:</label>
@ -83,11 +83,11 @@
</div>
<div class="form-group divCss8">
<label>患者姓名:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<div class="form-group divCss8">
<label>&emsp;住院号:</label>
<input type="text" class="form-control input-sm" id="inpNo">
<input type="text" class="form-control input-sm" id="inpNo" maxlength="25">
</div>
<div class="form-group divCss8">
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>

@ -38,9 +38,9 @@
<div class="form-group divCss">
<label>审核日期:</label>
<div class="input-group" id="datepicker">
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">

@ -38,9 +38,9 @@
<div class="form-group divCss">
<label>起止日期:</label>
<div class="input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startTime1" maxlength="10" style="text-align: center" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endTime1" maxlength="10" style="text-align: center" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -54,7 +54,7 @@
</div>
<div class="form-group divCss8">
<label>操作人:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>

@ -38,9 +38,9 @@
<div class="form-group divCss">
<label>复印起止日期:</label>
<div class="input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -54,7 +54,7 @@
</div>
<div class="form-group divCss8">
<label>操作人:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>

@ -38,9 +38,9 @@
<div class="form-group divCss">
<label>起止日期:</label>
<div class="input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startTime1" maxlength="10" style="text-align: center" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -54,7 +54,7 @@
</div>
<div class="form-group divCss8">
<label>扫描人:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>

@ -38,9 +38,9 @@
<div class="form-group divCss">
<label>扫描起止日期:</label>
<div class="input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -54,7 +54,7 @@
</div>
<div class="form-group divCss8">
<label>扫描人:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
<button type="button" class="btn btn-info btn-sm divCss" id="excelBtn">条件导出</button>

@ -47,14 +47,14 @@
<div class="form-group divCss8">
<label>审核日期:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime1" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8">
<label>审核姓名:</label>
<input type="text" class="form-control input-sm" id="checkDoctor">
<input type="text" class="form-control input-sm" id="checkDoctor" maxlength="8">
</div>
<div class="form-group divCss8">
<label >出院科室:</label>
@ -67,9 +67,9 @@
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group">
<input type="text" class="input-sm form-control" id="startTime2" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="startTime2" style="text-align: center" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="endTime2" style="text-align: center" autocomplete="off"/>
<input type="text" class="input-sm form-control" id="endTime2" style="text-align: center" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -83,11 +83,11 @@
</div>
<div class="form-group divCss8">
<label>患者姓名:</label>
<input type="text" class="form-control input-sm" id="name">
<input type="text" class="form-control input-sm" id="name" maxlength="8">
</div>
<div class="form-group divCss8">
<label>&emsp;住院号:</label>
<input type="text" class="form-control input-sm" id="inpNo">
<input type="text" class="form-control input-sm" id="inpNo" maxlength="25">
</div>
<div class="form-group divCss8">
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>

@ -23,7 +23,7 @@
.divCss2 {
margin-top: 5px;
margin-left: 20px;
margin-left: 5px;
}
@ -170,42 +170,40 @@
<div class="form-inline">
<div class="form-group divCss8">
<label for="name">主管医生:</label>
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25"
placeholder="请输入主管医生姓名">
<input type="text" class="input-sm form-control" id="doctorInCharge" maxlength="25" placeholder="请输入主管医生姓名">
</div>
<div hidden="hidden">
<label for="id">病案号:</label>
<input type="text" class="input-sm form-control" id="id" placeholder="请输入病案号">
<input type="text" class="input-sm form-control" id="id" placeholder="请输入病案号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号">
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数">
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数" maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓&emsp;&emsp;名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名">
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div hidden="hidden">
<label for="name">身份证号:</label>
<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号">
<input type="text" class="input-sm form-control" id="idNo" placeholder="请输入身份证号" maxlength="20">
</div>
<div class="form-group divCss8" id="deptDiv" style="height: 18px;margin-top: -7px;">
<label>入院科室:</label>
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="deptAdmissionTo"
id="deptAdmissionTo" title="请输入入院科室">
<select class="selectpicker bla bla bli" multiple data-live-search="true" name="deptAdmissionTo" id="deptAdmissionTo" title="请输入入院科室">
<option value="">全部</option>
</select>
</div>
<div class="form-group divCss8">
<label>入院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDate" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDate" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8" style="height: 18px;margin-top: -7px;">
@ -218,9 +216,9 @@
<div class="form-group divCss8">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDateTo" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10" autocomplete="off"/>
</div>
</div>
<div class="form-group divCss">
@ -329,7 +327,7 @@
<div class="divCss4"></div>
<div class="row">
<div class="row divCss3 ">病历清单</div>
<div class="col-sm-3 divCss2">
<div class="col-sm-3 divCss2" style="width: 25%">
<div class="row titleCss"></div>
<div class="row">
<div class="col-sm-9">
@ -353,7 +351,7 @@
</div>
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="col-sm-8 divCss5" style="width: 73%">
<div class="row btnGroupCss">
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
@ -673,7 +671,7 @@
undefinedText: '---', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
height: getHeight(220), //定义表格的高度。
height: getHeight(260), //定义表格的高度。
searchTimeOut: 500,// 默认500 设置搜索超时时间。
toolbarAlign: 'right',// 指定 toolbar 水平方向的位置。'left' 或 'right'
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。

@ -67,9 +67,9 @@
<div class="form-group divCss">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDate" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDate" maxlength="10" autocomplete="off"/>
</div>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" onclick="searchBtn()">查询</button>

@ -73,9 +73,9 @@
<div class="form-group divCss">
<label>出院日期:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="start" id="startDate" maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDate" autocomplete="off"/>
<input type="text" class="input-sm form-control" name="end" id="endDate" maxlength="10" autocomplete="off"/>
</div>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save