测试,优化

master
zengwh 4 years ago
parent aff0f46b79
commit 96884419d8

Binary file not shown.

@ -1034,16 +1034,16 @@ public class CommomSearchController {
private static String toChinese(String str) {
String[] s1 = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
String[] s2 = {"十", "百", "千", "万", "十", "百", "千", "亿", "十", "百", "千"};
String result = "";
StringBuilder result = new StringBuilder();
int n = str.length();
for (int i = 0; i < n; i++) {
int num = str.charAt(i) - '0';
if (i != n - 1 && num != 0) {
result += s1[num] + s2[n - 2 - i];
result.append(s1[num]).append(s2[n - 2 - i]);
} else {
result += s1[num];
result.append(s1[num]);
}
}
return result;
return result.toString();
}
}

@ -346,9 +346,7 @@ public class DistributionController {
list.add(roleReader);
}
}
if(!CollectionUtils.isEmpty(list)) {
roleRearderService.SimpleInsert(list);
}
roleRearderService.SimpleInsert(list);
}
if(null != userId) {
//与角色分配表对比多出部分flag设为1减少部分flag设为0
@ -402,9 +400,7 @@ public class DistributionController {
}
}
}
if(!CollectionUtils.isEmpty(list)) {
userRearderService.SimpleInsert(list);
}
userRearderService.SimpleInsert(list);
}
return ResultUtil.ok();
}

@ -85,12 +85,7 @@ public class monitoringCenterController {
}
}
//查询总盘数
List<Integer> phNums = scanPathMapper.selectCountPh();
for (Integer phNum : phNums) {
if (0 != phNum) {
phCount += 1;
}
}
phCount = scanPathMapper.selectCountPh();
//查询图像总数
pdfCount = scanPathMapper.selectCountPdf();
} catch (ParseException e) {

@ -106,4 +106,6 @@ public interface CommomMapper {
*
*/
int updateRecordReMark(CommomVo commomVo);
void SimpleInsert(@Param("list")List list);
}

@ -24,7 +24,7 @@ public interface ScanPathMapper {
*
* @return
*/
List<Integer> selectCountPh();
Integer selectCountPh();
/**
*

@ -1,11 +1,12 @@
package com.emr.dao.emrCode;
import com.emr.dao.CommomMapper;
import com.emr.entity.emrCode.T_Diag;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface T_DiagMapper {
public interface T_DiagMapper extends CommomMapper {
int insert(T_Diag record);
int insertSelective(T_Diag record);
@ -16,7 +17,5 @@ public interface T_DiagMapper {
void deleteDiagByPatientIdAndDiagNo(@Param("patientId")String patientId,@Param("diagNos")String diagNos);
int SimpleInsert(@Param("list")List<T_Diag> list);
int SimpleUpdate(@Param("list")List<T_Diag> list);
}

@ -1,11 +1,12 @@
package com.emr.dao.emrCode;
import com.emr.dao.CommomMapper;
import com.emr.entity.emrCode.T_Operate;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface T_OperateMapper {
public interface T_OperateMapper extends CommomMapper {
int insert(T_Operate record);
int insertSelective();
@ -16,7 +17,5 @@ public interface T_OperateMapper {
void deleteOperCodeByPatientIdAndOperNo(@Param("patientId")String patientId,@Param("operateNo")String operateNo);
int SimpleInsert(@Param("list")List<T_Operate> list);
int SimpleUpdate(@Param("list")List<T_Operate> list);
}

@ -1,18 +1,17 @@
package com.emr.dao.emrPrintAndDownLoad;
import com.emr.dao.CommomMapper;
import com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo;
import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface EmrPrintDownloadInfoMapper {
public interface EmrPrintDownloadInfoMapper extends CommomMapper {
int insert(EmrPrintDownloadInfo record);
int insertSelective(EmrPrintDownloadInfo record);
int SimpleInsert(List<EmrPrintDownloadInfo> list);
List<EmrPrintOrDownLoadInfoVo> selectAll(@Param("record") EmrPrintOrDownLoadInfoVo record);
List<EmrPrintOrDownLoadInfoVo> selectAllByIds(@Param("ids")String ids,@Param("flag")String flag);

@ -1,11 +1,12 @@
package com.emr.dao.emrRoleReader;
import com.emr.dao.CommomMapper;
import com.emr.entity.emrRoleReader.Emr_Role_Reader;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface Emr_Role_ReaderMapper {
public interface Emr_Role_ReaderMapper extends CommomMapper {
int deleteByPrimaryKey(Integer id);
int insert(Emr_Role_Reader record);
@ -25,8 +26,4 @@ public interface Emr_Role_ReaderMapper {
*id
* */
List<Emr_Role_Reader> selectAllByRoleId(@Param("roleId") Integer roleId);
/**
*
* */
int SimpleInsert(@Param("list") List<Emr_Role_Reader> list);
}

@ -1,11 +1,12 @@
package com.emr.dao.emrUserReader;
import com.emr.dao.CommomMapper;
import com.emr.entity.emrUserReader.Emr_User_Reader;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface Emr_User_ReaderMapper {
public interface Emr_User_ReaderMapper extends CommomMapper {
int deleteByPrimaryKey(Integer id);
int insert(Emr_User_Reader record);
@ -22,8 +23,4 @@ public interface Emr_User_ReaderMapper {
* id
* */
void deleteReaderByUserId(@Param("userId") Integer userId);
/**
*
* */
int SimpleInsert(@Param("list") List<Emr_User_Reader> list);
}

@ -1,12 +1,13 @@
package com.emr.dao.tTumour;
import com.emr.dao.CommomMapper;
import com.emr.entity.tTumour.TTumourChemotherapy;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TTumourChemotherapyMapper {
public interface TTumourChemotherapyMapper extends CommomMapper {
int insert(TTumourChemotherapy record);
int insertSelective(TTumourChemotherapy record);
@ -14,6 +15,4 @@ public interface TTumourChemotherapyMapper {
List<TTumourChemotherapy> selectByPatientId(@Param("patientId")String patientId);
int deleteByPatientId(@Param("patientId")String patientId);
int SimpleInsert(@Param("list")List<TTumourChemotherapy> list);
}

@ -7,9 +7,11 @@ import com.emr.dao.emrPdfWaterSet.EmrPdfWaterSetMapper;
import com.emr.entity.EmrComomSet;
import com.emr.entity.Power_User;
import com.emr.entity.ResultUtil;
import com.emr.entity.approve.Emr_Apply_Approve;
import com.emr.entity.emrPdfWaterSet.EmrPdfWaterSet;
import com.emr.entity.tScanAssort.T_Scan_Assort;
import com.emr.service.tScanAssort.T_Scan_AssortService;
import com.emr.util.DateUtils;
import com.emr.util.img2PdfUtil;
import com.emr.vo.User;
import com.emr.vo.commomSearch.CommomVo;
@ -19,6 +21,7 @@ import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@ -676,4 +679,30 @@ public class CommomService {
}
return loadingPerson;
}
/**
*
* @param tableName
* @param commomMapper
* @param operList
*/
public void simpleInsert(String tableName,CommomMapper commomMapper,List operList){
if(!CollectionUtils.isEmpty(operList)) {
///查询表列数
int colCount = commomMapper.selectColByTableName(tableName);
List list = new ArrayList();
int simpleInsertCount = 2100 / colCount;
for (int i = 0; i < operList.size(); i++) {
//处理批量添加sql太长问题设定个数为180
if (i > 0 && list.size() % simpleInsertCount == 0) {
list.clear();
}
list.add(operList.get(i));
//是180的倍数或最后一个
if (list.size() % simpleInsertCount == 0 || i == operList.size() - 1) {
commomMapper.SimpleInsert(list);
}
}
}
}
}

@ -5,6 +5,7 @@ import com.emr.dao.Emr_DictionaryMapper;
import com.emr.dao.emrCode.T_DiagMapper;
import com.emr.entity.Emr_Dictionary;
import com.emr.entity.emrCode.T_Diag;
import com.emr.service.CommomService;
import com.emr.vo.commomSearch.CommomVo;
import com.lowagie.text.pdf.PdfStructureElement;
import org.apache.commons.lang3.StringUtils;
@ -38,6 +39,8 @@ public class DiagServiceImpl implements DiagService {
private Emr_DictionaryMapper dictionaryMapper;
@Autowired
private CommomMapper commomMapper;
@Autowired
private CommomService commomService;
@Override
public List<T_Diag> selectAllByPatientId(String patientId, Short diagNo) {
return diagMapper.selectAllByPatientId(patientId, diagNo);
@ -194,7 +197,7 @@ public class DiagServiceImpl implements DiagService {
}
//批量添加
if(!inserts.isEmpty()){
diagMapper.SimpleInsert(inserts);
commomService.simpleInsert("t_diag",diagMapper,inserts);
}
//批量更新
if(!updates.isEmpty()){

@ -3,6 +3,7 @@ package com.emr.service.emrCode;
import com.emr.dao.emrCode.T_OperateMapper;
import com.emr.entity.emrCode.T_Diag;
import com.emr.entity.emrCode.T_Operate;
import com.emr.service.CommomService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -27,9 +28,11 @@ import java.util.List;
*/
@Service
@Transactional
public class OperateServiceImpl implements OperateService {
public class OperateServiceImpl implements OperateService{
@Autowired
private T_OperateMapper operateMapper;
@Autowired
private CommomService commomService;
@Override
public List<T_Operate> selectAllByPatientId(String patientId,Short currentOperateNo) {
return operateMapper.selectAllByPatientId(patientId,currentOperateNo);
@ -213,9 +216,7 @@ public class OperateServiceImpl implements OperateService {
}
}
//批量添加
if(!inserts.isEmpty()){
operateMapper.SimpleInsert(inserts);
}
commomService.simpleInsert("t_operate",operateMapper,inserts);
//批量更新
if(!updates.isEmpty()){
operateMapper.SimpleUpdate(updates);

@ -7,6 +7,7 @@ import com.emr.dao.emrPrintAndDownLoad.EmrPrintDownloadInfoMapper;
import com.emr.entity.Power_User;
import com.emr.entity.Zd_Assort;
import com.emr.entity.emrPrintAndDownLoad.EmrPrintDownloadInfo;
import com.emr.service.CommomService;
import com.emr.vo.EmrPrintOrDownLoadInfo.EmrPrintOrDownLoadInfoVo;
import com.emr.vo.commomSearch.ScanPathVo;
import org.apache.commons.lang3.StringUtils;
@ -31,6 +32,8 @@ public class PrintOrDownLoadInfoService {
private EmrPrintDownloadInfoMapper printDownloadInfoMapper;
@Autowired
private Zd_AssortMapper assortMapper;
@Autowired
private CommomService commomService;
/**
*
* */
@ -86,7 +89,7 @@ public class PrintOrDownLoadInfoService {
batchInsertList.add(obj);
}
//批量插入
printDownloadInfoMapper.SimpleInsert(batchInsertList);
commomService.simpleInsert("emr_print_download_info",printDownloadInfoMapper,batchInsertList);
}
}

@ -3,6 +3,7 @@ package com.emr.service.emrRoleReader;
import com.emr.dao.emrRoleReader.Emr_Role_ReaderMapper;
import com.emr.entity.Power_User;
import com.emr.entity.emrRoleReader.Emr_Role_Reader;
import com.emr.service.CommomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -29,6 +30,8 @@ import java.util.List;
public class EmrRoleReaderServiceImpl implements EmrRoleRearderService{
@Autowired
private Emr_Role_ReaderMapper roleReaderMapper;
@Autowired
private CommomService commomService;
@Override
public int insert(Emr_Role_Reader record, HttpServletRequest request) {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
@ -52,7 +55,7 @@ public class EmrRoleReaderServiceImpl implements EmrRoleRearderService{
}
@Override
public int SimpleInsert(List<Emr_Role_Reader> list) {
return roleReaderMapper.SimpleInsert(list);
public void SimpleInsert(List<Emr_Role_Reader> list) {
commomService.simpleInsert("emr_role_reader",roleReaderMapper,list);
}
}

@ -12,5 +12,5 @@ public interface EmrRoleRearderService {
List<Emr_Role_Reader> selectAllByRoleId(Integer roleId);
int SimpleInsert(List<Emr_Role_Reader> list);
void SimpleInsert(List<Emr_Role_Reader> list);
}

@ -3,6 +3,7 @@ package com.emr.service.emrUserReader;
import com.emr.dao.emrUserReader.Emr_User_ReaderMapper;
import com.emr.entity.Power_User;
import com.emr.entity.emrUserReader.Emr_User_Reader;
import com.emr.service.CommomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -29,6 +30,8 @@ import java.util.List;
public class EmrUserReaderServiceImpl implements EmrUserRearderService {
@Autowired
private Emr_User_ReaderMapper userReaderMapper;
@Autowired
private CommomService commomService;
@Override
public int insert(Emr_User_Reader record, HttpServletRequest request) {
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
@ -47,7 +50,7 @@ public class EmrUserReaderServiceImpl implements EmrUserRearderService {
}
@Override
public int SimpleInsert(List<Emr_User_Reader> list) {
return userReaderMapper.SimpleInsert(list);
public void SimpleInsert(List<Emr_User_Reader> list) {
commomService.simpleInsert("emr_user_reader",userReaderMapper,list);
}
}

@ -10,5 +10,5 @@ public interface EmrUserRearderService {
void deleteReaderByUserId(Integer userId);
int SimpleInsert(List<Emr_User_Reader> list);
void SimpleInsert(List<Emr_User_Reader> list);
}

@ -5,6 +5,7 @@ import com.emr.dao.tTumour.TTumourChemotherapyMapper;
import com.emr.entity.Power_User;
import com.emr.entity.tTumour.TTumour;
import com.emr.entity.tTumour.TTumourChemotherapy;
import com.emr.service.CommomService;
import com.emr.vo.commomSearch.CommomVo;
import com.emr.vo.tTumourVo.TTumourVo;
import org.apache.commons.lang3.StringUtils;
@ -38,6 +39,8 @@ public class TTumourService {
private TTumourChemotherapyMapper tumourChemotherapyMapper;
@Autowired
private CommomMapper commomMapper;
@Autowired
private CommomService commomService;
public void saveTumour(TTumourVo tumourVo, HttpServletRequest request){
String patientId = tumourVo.getPatientId();
CommomVo commomVo = new CommomVo();
@ -83,7 +86,7 @@ public class TTumourService {
}
if(!list.isEmpty()){
tumourChemotherapyMapper.SimpleInsert(list);
commomService.simpleInsert("t_tumour_chemotherapy",tumourChemotherapyMapper,list);
}
}
}

@ -65,7 +65,7 @@
</if>
</where>
ORDER BY
dbo.zd_assort.assort_sort
dbo.zd_assort.assort_sort,t_scan_assort.scan_page
</select>
<update id="updateScanFileByPatientIdAndScanPage" parameterType="java.lang.String">
@ -73,7 +73,7 @@
</update>
<select id="selectCountPh" resultType="java.lang.Integer">
SELECT COUNT(*) FROM dbo.t_gdh_index GROUP BY ph
select count(ph) from (SELECT distinct ph FROM dbo.t_gdh_index where ph is not null) temp
</select>
<select id="selectCountPdf" resultType="java.lang.Integer">

@ -213,7 +213,7 @@
emr_comom_set
WHERE
id = 1
) COUNT(scan_page) printCount,
) COUNT(emr_print_download_info.id) printCount,
ISNULL(emr_type.type_name,'无') typeName,
CONVERT(varchar(100),emr_print_download_info.create_time,23) create_time,
emr_print_download_info.creater

@ -137,11 +137,11 @@
</update>
<insert id="SimpleInsert" parameterType="java.util.List">
insert into t_scan_assort(
patient_id, assort_id, scan_page,source
patient_id, assort_id, scan_page,source,is_del
)
<foreach collection="list" item="items" separator="union">
select
#{items.patientId,jdbcType=VARCHAR}, #{items.assortId,jdbcType=VARCHAR}, #{items.scanPage,jdbcType=VARCHAR}, #{items.source,jdbcType=SMALLINT}
#{items.patientId,jdbcType=VARCHAR}, #{items.assortId,jdbcType=VARCHAR}, #{items.scanPage,jdbcType=VARCHAR}, #{items.source,jdbcType=SMALLINT},#{items.isDel,jdbcType=SMALLINT}
</foreach>
</insert>
<!--根据patiengId和图片集合批量更新-->

@ -16,8 +16,7 @@
<script type="text/javascript" src="${path}/static/js/pinying.js"></script>
<script src="${path}/static/bootstrap-3.3.7/bower_components/select2/dist/js/select2.min.js"></script>
<script>
var path = "${path}";\
console.log(path);
var path = "${path}";
</script>
<style type="text/css">
.labelDiv {

@ -276,7 +276,7 @@
<div class="col-sm-4 labelDiv">
<label class="control-label">病案号:</label>
</div>
<div class="col-sm-8 inputDiv">
<%-- <div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no"
onkeyup="getInpatientNoContents('inpatient_no')"
onfocus="getInpatientNoContents('inpatient_no')"
@ -287,6 +287,10 @@
<tbody id="inpatient_noContent"></tbody>
</table>
</div>
</div>--%>
<div class="col-sm-8 inputDiv">
<input type="text" class="form-control input-sm inputValue" id="inpatient_no"
maxlength="16">
</div>
</div>
</div>

@ -313,7 +313,6 @@ function getSql() {
name = 'dis_date';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime2").val() + " 00:00:00' AND '" + $("#endTime2").val() + " 23:59:59' AND ";
}
debugger
//诊断名称
if ($("#diag_name").val() != '') {
name = 'main_diag_name';
@ -436,7 +435,7 @@ function getSql() {
$("#sql").val(sql);
$("#orderBys").val(orderBys);
}
console.log(sql);
//console.log(sql);
} else {
$("#sql").val("");
}

@ -6,7 +6,6 @@ var isIE = function(ver) {
}
//初始化函数
$(function(){
debugger
$('.contentDiv').css('height', '100%').css('height', '-=140px');
var ie = isIE(8);
if(ie) {

@ -8,10 +8,8 @@ var isIE = function(ver) {
$(function(){
$('.contentDiv').css('height', '100%').css('height', '-=140px');
var ie = isIE(8);
debugger
if(ie) {
//ie8加载iframe
console.log("ssd");
$("#iframe").prop("src",path+"/font/showRecordIframeFontSouth?patientId="+$("#patientId").val()+"&flag=file_path");
}else{
//谷歌

@ -424,7 +424,6 @@ function getSql() {
name = 'dis_date';
whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime2").val() + " 00:00:00' AND '" + $("#endTime2").val() + " 23:59:59' AND ";
}
debugger
//诊断名称
if ($("#diag_name").val() != '') {
name = 'main_diag_name';
@ -547,7 +546,7 @@ function getSql() {
$("#sql").val(sql);
$("#orderBys").val(orderBys);
}
console.log(sql);
//console.log(sql);
} else {
$("#sql").val("");
}
@ -624,12 +623,7 @@ function exportExcel() {
if (checks != '') {
//按选择框选择导出
checks = checks.substring(0, checks.length - 1);
var isInputValue = getInputValue();
if (isInputValue == '') {
sql += ' WHERE ' + commomtable + '.patient_id IN (' + checks + ')';
} else {
sql += ' AND ' + commomtable + '.patient_id IN (' + checks + ')';
}
sql += ' WHERE ' + commomtable + '.patient_id IN (' + checks + ')';
sql += orderBys;
var url = path + "/template/exportExcel";
post(url, {"sql": sql, "tableThNames": tableThNames, "fieldCns": fieldCns});

@ -297,7 +297,6 @@ function save(){
var assortId = $("#assortId").val();
if(assortId != ''){
if(file1.length > 0){
debugger
for (var i = 0; i < file1.length; i++) {
formData.append('files', file1[i]);
}

@ -417,7 +417,6 @@ function getUpdateCommomInfo(patientId) {
data:{patientId:patientId},
dataType:'json',
success:function(data){
console.log("data == " +data);
if(null != data){
$("#patientId").val(data.patientId);
$("#inpatientNo").val(data.inpatientNo);

@ -7,7 +7,6 @@ $(function(){
};
/*点击图片的文本框*/
$(".file").change(function(){
debugger
var idFile = $(this).attr("id");
var file = document.getElementById(idFile);
var imgContainer = $(this).parents(".z_photo"); //存放图片的父亲元素

@ -6861,7 +6861,6 @@ var PDFViewerApplication = {
},
afterPrint: function pdfViewSetupAfterPrint() {
console.log(2)
var div = document.getElementById('printContainer');
while (div.hasChildNodes()) {
div.removeChild(div.lastChild);

Loading…
Cancel
Save