病案浏览模块编码问题

master
hujl 4 years ago
parent 71f11c2f35
commit 7edf37a19c

@ -17,6 +17,7 @@ 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.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.text.ParseException;
@ -52,7 +53,9 @@ public class FontController {
* idpdf
* */
@RequestMapping("showRecordByPatientId")
public String showRecordByPatientId(String assortIds, String patientId,String visitId, Model model){
public String showRecordByPatientId( HttpServletResponse response, String assortIds, String patientId, String visitId, Model model){
response.setCharacterEncoding("utf-8");
System.out.println(System.getProperty("file.encoding"));//当前文件的编码方式
if(StringUtils.isBlank(assortIds)){
return retrunErrorPage(model,"病案分类Id不能为空!");
}
@ -95,6 +98,7 @@ public class FontController {
*
* */
private String retrunErrorPage(Model model, String errorMsg){
System.out.println(System.getProperty("file.encoding"));//当前文件的编码方式
model.addAttribute("errorMsg",errorMsg);
return "font/error";
}
@ -103,6 +107,7 @@ public class FontController {
* id
* */
private String checkAssortIds(String assortIds){
System.out.println(System.getProperty("file.encoding"));//当前文件的编码方式
Zd_Assort assort = new Zd_Assort();
assort.setPrintFlag("0");
List<Zd_Assort> assortList = null;
@ -187,7 +192,9 @@ public class FontController {
*/
@ResponseBody
@RequestMapping(value = "/getRecordTypeTree")
public String getRecordTypeTree(String patientId,String assortIds){
public String getRecordTypeTree(HttpServletResponse response,String patientId,String assortIds){
response.setCharacterEncoding("utf-8");
System.out.println(System.getProperty("file.encoding"));//当前文件的编码方式
List<AssortTypeTree> treeList = new ArrayList<>();
if(StringUtils.isNotBlank(patientId) && StringUtils.isNotBlank(assortIds)){
List<Archive_Detail> list = new ArrayList<>();
@ -328,6 +335,7 @@ public class FontController {
@ResponseBody
@RequestMapping(value = "/getPdfToPdf",method = RequestMethod.POST)
public Msg getPdfToPdf(HttpServletResponse response, String detailIds, HttpSession session){
response.setCharacterEncoding("utf-8");
try {
Archive_Detail detail = new Archive_Detail();
if(StringUtils.isNotBlank(detailIds)){
@ -348,6 +356,7 @@ public class FontController {
@ResponseBody
@RequestMapping(value = "showPdf")
public void showPdf(HttpServletResponse response, HttpSession session){
response.setCharacterEncoding("utf-8");
try {
archiveDetailService.showPdf(response,session,pdfWater);
} catch (Exception e) {

@ -114,6 +114,7 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
*/
@Override
public List<String> mulFile2OneById(HttpServletResponse response,List<Archive_Detail> arList) {
response.setCharacterEncoding("utf-8");
List<String> pdfList = new ArrayList<>();
if (arList != null && !arList.isEmpty()) {
//TODO 抽取首次病程记录

@ -1,27 +1,13 @@
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();

@ -126,7 +126,7 @@
from archive_detail
left join zd_assort
on zd_assort.assort_id = archive_detail.AssortID
where 1=1 and flag=0
where 1=1 and flag='0'
<if test="title != null and title!=''">
and id in (${title})
</if>

@ -1749,10 +1749,10 @@
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
files = fileList;
break;
}
}
files = fileList;
}
/**

@ -1510,10 +1510,11 @@
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
files = fileList;
break;
}
}
files = fileList;
}
/**

@ -1376,11 +1376,11 @@
//通过图片名判断图片在数组中的位置然后删除
if (fileList[j].name == filename) {
fileList.splice(j, 1);
files = fileList;
id--;
break;
}
}
files = fileList;
}
/**

@ -1379,10 +1379,10 @@
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
files = fileList;
break;
}
}
files = fileList;
}
/**

@ -206,10 +206,10 @@
</div>
<div class="row divCss2">
<div class="col-sm-6" style="text-align: center;">
<button type="button" class="btn btn-primary btn-sm" id="saveBtn" hidden>保存</button>
<button type="button" class="btn btn-primary btn-sm" id="saveBtn">保存</button>
</div>
<div class="col-sm-6">
<button type="button" class="btn btn-default btn-sm" id="clearBtn" hidden>清空</button>
<button type="button" class="btn btn-default btn-sm" id="clearBtn">清空</button>
</div>
</div>
</form>

@ -1540,10 +1540,10 @@
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
files = fileList;
break;
}
}
files = fileList;
}
/**

Loading…
Cancel
Save