2020-10-20更新版本备份

master
zengwh 5 years ago
parent a83df7c586
commit b194b5ab4d

@ -7,7 +7,6 @@
package com.emr.controller;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.Emr_Fault_Type;
import com.emr.service.Emr_DictionaryService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
@ -82,7 +81,7 @@ public class DictionaryController {
emrDictionary.setCreater(username);
emrDictionary.setCreateTime(nowTime);
//判断类别代码或代码是否已经存在
if(emrDictionary.getCode()!=null && emrDictionary.getCode()!=""){
if(emrDictionary.getCode()!=null && !"".equals(emrDictionary.getCode())){
dic2.setCode(emrDictionary.getCode());
dic2.setParentId(emrDictionary.getParentId());
//根据代码查询该父类下是否存在是否已经存在

@ -1,29 +1,18 @@
package com.emr.controller;
import com.alibaba.fastjson.JSONObject;
import com.emr.entity.Power_User;
import com.emr.util.ActionScopeUtils;
import com.emr.util.HttpClientUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.StringUtils;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
/**
* @author HJL
@ -63,6 +52,7 @@ public class LoginController {
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
client.destroy();
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session

@ -67,6 +67,7 @@ public class UrlInterceptor implements HandlerInterceptor {
JAXDynamicClientFactory dcf = JAXDynamicClientFactory.newInstance();
Client client = dcf.createClient(POWER_URLHEAD + "/WebService/PowerWebService?wsdl");
Object[] objects = client.invoke("getInfosByUserId", token, "emr_medical_record");
client.destroy();
ObjectMapper mapper = new ObjectMapper();
Power_User powerUser = mapper.readValue(objects[0].toString(), Power_User.class);
//设置进session

@ -9,7 +9,6 @@ package com.emr.controller;
import com.alibaba.fastjson.JSON;
import com.emr.dao.ArchiveSumbitdateInfoMapper;
import com.emr.dao.Archive_DetailMapper;
import com.emr.dao.Archive_MasterMapper;
import com.emr.dao.EmrPatientMapper;
import com.emr.entity.*;
import com.emr.service.Archive_MasterService;
@ -167,6 +166,7 @@ public class beHospitaledController {
Client client = factory.createClient(endpoint);
Object[] res = null;
res = client.invoke(method, archiveDetailId);
client.destroy();
result = (String) res[0];
} catch (Exception e) {
System.err.println(e.toString());

@ -17,7 +17,6 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Arrays;
@ -78,7 +77,7 @@ public class faultController {
List<Emr_Fault_Type> typeLis= emrFaultTypeService.selectByCol(obj);
for(int i=0;i<list.size();i++){
String assortId = list.get(i).getAssortId();
if (assortId != "" && assortId != null) {
if (!"".equals(assortId) && assortId != null) {
String[] assorArr = assortId.split(",");
//替换类别
for (int j = 0; j < typeLis.size(); j++) {

@ -7,7 +7,6 @@
package com.emr.controller;
import com.emr.entity.Emr_Fault_Type;
import com.emr.entity.Emr_Fault_Vo;
import com.emr.service.Emr_Fault_TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@ -13,18 +13,15 @@ import com.emr.service.Emr_DictionaryService;
import com.emr.service.Emr_PictureService;
import com.emr.util.ExportExcelUtil;
import com.emr.util.Jpg2PdfUtil;
import com.emr.util.PDFUtils;
import com.emr.util.PrintToPdfUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
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.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
@ -33,7 +30,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;

@ -169,6 +169,7 @@ public class lastVerifyController {
Client client = clientFactory.createClient(RETURNWEBSERVICE);
QName qname = new QName(RETURNPARM1, RETURNPARM2);
Object[] result = client.invoke(qname, msg);
client.destroy();
Document document = DocumentHelper.parseText(result[0].toString());
Element rootElement = document.getRootElement();
Iterator iterator = rootElement.elementIterator();

@ -1,6 +1,5 @@
package com.emr.util;
import com.ctc.wstx.util.StringUtil;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.Image;
@ -10,7 +9,6 @@ import com.lowagie.text.pdf.codec.TiffImage;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
@ -159,17 +157,11 @@ public class Jpg2PdfUtil {
Iterator<String> iterator = files.iterator();
while (iterator.hasNext()) {
String fileStr = iterator.next();
File file = new File(fileStr);
if(file.isFile()){
boolean flag = false;
flag = check(fileStr);
if(!flag){
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件损坏");
}
}else{
boolean flag = false;
flag = check(fileStr);
if(!flag){
iterator.remove();
System.out.println(fmt.format(new Date())+":"+file+"文件不存在");
System.out.println(fmt.format(new Date())+":"+fileStr+"文件损坏");
}
}
if(null != files && !files.isEmpty()){
@ -209,16 +201,17 @@ public class Jpg2PdfUtil {
e.printStackTrace();
}finally {
try{
if(null != copy){
copy.close();
}
if(pdfReader != null){
pdfReader.close();
}
if(null != reader){
reader.close();
}
if(null != copy){
copy.close();
}
if(null != bos){
bos.flush();
bos.close();
}
if(null != document){
@ -272,10 +265,10 @@ public class Jpg2PdfUtil {
content.setColorFill(Color.BLACK);
content.setFontAndSize(base, 8);
}
stamper.close();
if(null != reader){
reader.close();
}
stamper.close();
}
/**
* h>whw>hw=h

@ -35,9 +35,10 @@ public class PrintToPdfUtil {
* @param imageFolderPath
* @param pdfPath PDF
*/
public static void toPdf(String imageFolderPath, String pdfPath,List dirList) {
public static void toPdf(String imageFolderPath, String pdfPath,List dirList) throws IOException {
// 创建文档
Document doc = new Document(null, 0, 0, 0, 0);
FileOutputStream fos = null;
try {
//判断文件夹是否存在
String pdfStr = pdfPath.substring(0, pdfPath.lastIndexOf("\\"));
@ -58,7 +59,7 @@ public class PrintToPdfUtil {
}
// 输入流
FileOutputStream fos = new FileOutputStream(pdfPath);
fos = new FileOutputStream(pdfPath);
//doc.open();
// 写入PDF文档
@ -73,6 +74,10 @@ public class PrintToPdfUtil {
} catch (Exception e) {
e.printStackTrace();
}finally {
if(null != fos){
fos.flush();
fos.close();
}
if (doc.isOpen()) {
// 关闭文档
doc.close();
@ -82,8 +87,6 @@ public class PrintToPdfUtil {
public static void imgFun(String imageFolderPath,File file, List dirList, Document doc){
// 图片地址
String imagePath = null;
// 读取图片流
BufferedImage img = null;
// 实例化图片
@ -137,7 +140,7 @@ public class PrintToPdfUtil {
} catch(Exception e){
e.printStackTrace();
} finally {
img.flush();
if (doc.isOpen()) {
// 关闭文档
doc.close();
@ -286,9 +289,10 @@ public class PrintToPdfUtil {
public static boolean mergePdfFiles(List files, String newfile) {
boolean retValue = false;
Document document = null;
PdfCopy copy = 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());
@ -306,6 +310,7 @@ public class PrintToPdfUtil {
} catch (Exception e) {
e.printStackTrace();
} finally {
copy.close();
document.close();
}
return retValue;

@ -102,6 +102,7 @@ public class test {
// }
Object[] res = null;
res = client.invoke("CheckData","02e4ba493dc643c9926926662327995e");
client.destroy();
String xml = (String) res[0];
System.err.println("@@@@@@@@@@@@@@@@@" + xml);
}

@ -1,5 +1,9 @@
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record
#jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=emr_record
#jdbc.username=sa
#jdbc.password=xjgs+docus911
jdbc.url=jdbc\:sqlserver\://localhost:1433;databaseName=yd_record
jdbc.username=sa
jdbc.password=docus702
@ -25,9 +29,9 @@ pictureUrl=src\\main\\webapp
#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://localhost:8080/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://localhost:8080/power
POWER_JSP=http://localhost:8080/power
powerUrl=http://10.36.116.108:8080/power/font/getMenusByUserIdAndSysFlag
POWER_URLHEAD=http://10.36.116.108:8080/power
POWER_JSP=http://10.36.116.108:8080/power
recallReason=医院需要这份文档
HomepageDictionary=http://10.36.116.108:8080/filing/services/HomepageDictionary?wsdl
HomepageMethod=CheckData

@ -298,7 +298,7 @@
</div>
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 20200928
<b>Version</b> 20201020
</div>
<strong>Copyright &copy; 2019-2090 厦门嘉时软件.</strong> All rights
reserved.

Loading…
Cancel
Save