更新版本20201201

master
zengwh 5 years ago
parent 99ce7c3637
commit 2019e2bb17

Binary file not shown.

@ -75,7 +75,7 @@ public class ArchiveOtherExtController {
*/
@RequestMapping("submitUpdate")
@ResponseBody
public Msg submitUpdate(String ids,String notNursingIds,String detailIds,String jzh,String masterId,Integer sysFlag) throws Exception{
public Msg submitUpdate(String ids,String notNursingIds,String detailIds,String jzh,String masterId,Integer sysFlag,HttpServletRequest request) throws Exception{
if(StringUtils.isBlank(ids)){
return Msg.fail("至少选中一个!");
}
@ -87,7 +87,7 @@ public class ArchiveOtherExtController {
return Msg.fail("masterId不能为空!");
}
}
archiveOtherExtService.updateSubmit(ids,notNursingIds,detailIds,jzh,masterId,sysFlag);
archiveOtherExtService.updateSubmit(ids,notNursingIds,detailIds,jzh,masterId,sysFlag,request);
return Msg.success();
}

@ -5,7 +5,7 @@ import java.io.Serializable;
public class ArchiveOtherExtSubmittime implements Serializable {
private Integer id;
private String otherExtId;
private Long otherExtId;
private String createTime;
@ -31,12 +31,12 @@ public class ArchiveOtherExtSubmittime implements Serializable {
this.id = id;
}
public String getOtherExtId() {
public Long getOtherExtId() {
return otherExtId;
}
public void setOtherExtId(String otherExtId) {
this.otherExtId = otherExtId == null ? null : otherExtId.trim();
public void setOtherExtId(Long otherExtId) {
this.otherExtId = otherExtId;
}
public String getCreateTime() {
@ -97,20 +97,16 @@ public class ArchiveOtherExtSubmittime implements Serializable {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", otherExtId=").append(otherExtId);
sb.append(", createTime=").append(createTime);
sb.append(", int1=").append(int1);
sb.append(", int2=").append(int2);
sb.append(", int3=").append(int3);
sb.append(", str1=").append(str1);
sb.append(", str2=").append(str2);
sb.append(", str3=").append(str3);
sb.append("]");
return sb.toString();
return "ArchiveOtherExtSubmittime{" +
"id=" + id +
", otherExtId=" + otherExtId +
", createTime='" + createTime + '\'' +
", int1=" + int1 +
", int2=" + int2 +
", int3=" + int3 +
", str1='" + str1 + '\'' +
", str2='" + str2 + '\'' +
", str3='" + str3 + '\'' +
'}';
}
}

@ -1,5 +1,6 @@
package com.emr.service.ipml;
import com.alibaba.fastjson.JSON;
import com.emr.dao.ArchiveOtherExtMapper;
import com.emr.dao.ArchiveOtherExtSubmittimeMapper;
import com.emr.dao.ArchiveOtherMapper;
@ -11,7 +12,6 @@ import com.emr.vo.KeyValue;
import net.sf.json.JSONArray;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -52,8 +52,10 @@ public class ArchiveOtherExtService {
//查询护理的最新采集完成时间
String maxETime = archiveOtherExtMapper.selectMaxETimeByNursingAndJzh(archiveOtherExtVo.getJzh());
for(ArchiveOtherExtVo vo : list){
if(StringUtils.isNotBlank(maxETime)){
vo.setTempTime(maxETime);
if(vo.getSysflag().equals(1)) {
if (StringUtils.isNotBlank(maxETime)) {
vo.setNursingEndTime(maxETime);
}
}
//presulit为Done转换为完成
String presult = vo.getPresult();
@ -107,14 +109,14 @@ public class ArchiveOtherExtService {
FileReader fileReader = new FileReader(jsonFile);
Reader reader = new InputStreamReader(new FileInputStream(jsonFile),"utf-8");
int ch = 0;
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
while ((ch = reader.read()) != -1) {
sb.append((char) ch);
}
fileReader.close();
reader.close();
String jsonStr = sb.toString();
List<KeyValue> list = (List<KeyValue>) net.sf.json.JSONArray.toList(JSONArray.fromObject(jsonStr), KeyValue.class);
List<KeyValue> list = JSON.parseArray(jsonStr,KeyValue.class);
return list;
}
@ -126,7 +128,7 @@ public class ArchiveOtherExtService {
* @param masterId
* @param sysFlag
*/
public void updateSubmit(String ids,String notNursingIds, String detailIds,String jzh, String masterId, Integer sysFlag) throws Exception{
public void updateSubmit(String ids,String notNursingIds, String detailIds,String jzh, String masterId, Integer sysFlag,HttpServletRequest request) throws Exception{
String idsStr = splitString2String(ids);
String idsTemp = idsStr;
//存在护理记录则调用护理按需采集功能
@ -143,7 +145,7 @@ public class ArchiveOtherExtService {
updateCommomSubmit(idsTemp);
}
//操作提交信息表
operOtherExtSubmitInfo(ids,idsStr,detailIds);
operOtherExtSubmitInfo(ids,idsStr,detailIds,request);
}
/**
@ -245,9 +247,13 @@ public class ArchiveOtherExtService {
* @param ids ext_id
* @param idsStr ext_id
*/
private void operOtherExtSubmitInfo(String ids,String idsStr,String detailIds) {
private void operOtherExtSubmitInfo(String ids,String idsStr,String detailIds,HttpServletRequest request) {
//查询ext_id在ext_info表中是否存在
List<ArchiveOtherExtSubmittime> infoList = archiveOtherExtSubmittimeMapper.selectAllByExtId(idsStr);
//根据ext_ids查询other_ext表的eTime
List<ArchiveOtherExtVo> archiveOtherExtVos = archiveOtherExtMapper.selectAllByIds(ids);
//获取用户名
String userName = commomService.getCurrentUserName(request);
//定义需要新增的集合
List<ArchiveOtherExtSubmittime> createList = new ArrayList<>();
//定义需要更新的集合
@ -260,21 +266,21 @@ public class ArchiveOtherExtService {
Date date = new Date();
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for(int i = 0;i < idArr.length;i++){
//定义需求操作的对象
String id = idArr[i];
ArchiveOtherExtSubmittime objTemp = new ArchiveOtherExtSubmittime();
objTemp.setCreateTime(fmt.format(date));
objTemp.setOtherExtId(id);
if(StringUtils.isNoneBlank(detailIdArr[i]) && !"null".equals(detailIdArr[i])) {
objTemp.setStr1(detailIdArr[i]);
}
if(StringUtils.isNotBlank(id)) {
if(StringUtils.isNotBlank(idArr[i])){
//定义需求操作的对象
Long id = Long.valueOf(idArr[i]);
ArchiveOtherExtSubmittime objTemp = new ArchiveOtherExtSubmittime();
objTemp.setCreateTime(fmt.format(date));
objTemp.setOtherExtId(id);
if(StringUtils.isNoneBlank(detailIdArr[i]) && !"null".equals(detailIdArr[i])) {
objTemp.setStr1(detailIdArr[i]);
}
//定义是否存在
boolean flag = false;
//判断存在
if(!CollectionUtils.isEmpty(infoList)){
for(ArchiveOtherExtSubmittime obj : infoList){
String otherExtId = obj.getOtherExtId();
Long otherExtId = obj.getOtherExtId();
if(id.equals(otherExtId)){
//存在赋值id
objTemp.setId(obj.getId());
@ -283,6 +289,15 @@ public class ArchiveOtherExtService {
}
}
}
//设置最新时间
for(ArchiveOtherExt archiveOtherExt : archiveOtherExtVos){
if(archiveOtherExt.getId().equals(id)){
Date etime = archiveOtherExt.getEtime();
objTemp.setStr2(fmt.format(etime));
}
}
//设置工号
objTemp.setStr3(userName);
//存在添加进updateStr,不存在添加进createStr
if(flag){
updateList.add(objTemp);
@ -301,6 +316,7 @@ public class ArchiveOtherExtService {
}
}
/**
* ids
* @param ids

@ -10,7 +10,6 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -38,8 +37,6 @@ import java.util.List;
public class CommomService {
@Value("${POWER_URLHEAD}")
private String POWER_URLHEAD;
@Autowired
private StatisticsService statisticsService;
/**
*
* @param tableName
@ -141,4 +138,28 @@ public class CommomService {
}
return null;
}
/**
*
* @param request
* @return
*/
public Power_User getCurrentUser(HttpServletRequest request){
Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER");
return user;
}
/**
*
* @param request
* @return
*/
public String getCurrentUserName(HttpServletRequest request){
Power_User currentUser = getCurrentUser(request);
if(null != currentUser){
return currentUser.getUserName();
}else{
return null;
}
}
}

@ -36,4 +36,6 @@ public class ArchiveOtherExtVo extends ArchiveOtherExt {
private String assortId;
private String tempTime;
private String nursingEndTime;
}

@ -2,7 +2,7 @@
#POWER_IP = 192.168.1.3
#POWER_PORT = 8081
POWER_IP = 200.100.104.40
POWER_IP = 200.100.104.43
POWER_PORT = 8081
#power\u6743\u9650\u7CFB\u7EDF\u7684\u670D\u52A1\u5668\u5730\u5740\u5934

@ -432,7 +432,8 @@
</if>
</sql>
<select id="getArchiveExtInfo" resultMap="BaseResultMap">
select temp.*,zd_assort.assort_name,zd_assort.assort_id from (
select temp.*,zd_assort.assort_name,zd_assort.assort_id,
archive_other_ext_submitTime.create_time,archive_other_ext_submitTime.str2 tempTime from (
select
archive_other_ext.ID idTemp,
SycTime,
@ -443,17 +444,13 @@
statusFlag,
pResult,
C1,
DID,
archive_other_ext_submitTime.create_time
DID
from archive_other_ext
left join
archive_other_ext_submitTime
on archive_other_ext_submitTime.other_ext_id = archive_other_ext.ID
<where>
C1 != '一般病程记录' and sysFlag != 5
<include refid="selectWhereSql"></include>
</where>
union all
union all
select
archive_other_ext.ID idTemp,
SycTime,
@ -464,17 +461,13 @@
statusFlag,
pResult,
C1,
DID,
archive_other_ext_submitTime.create_time
DID
from archive_other_ext
left join
archive_other_ext_submitTime
on archive_other_ext_submitTime.other_ext_id = archive_other_ext.ID
<where>
and sysFlag = 5 and (C1 = '术前访视' or C1 = '术后访视' or C1 = '麻醉记录' or C1 = '麻醉小结')
<include refid="selectWhereSql"></include>
</where>
union all
union all
select
top 1
archive_other_ext.ID idTemp,
@ -486,33 +479,29 @@
statusFlag,
pResult,
C1,
DID,
archive_other_ext_submitTime.create_time
DID
from archive_other_ext
left join
archive_other_ext_submitTime
on archive_other_ext_submitTime.other_ext_id = archive_other_ext.ID
<where>
C1 = '一般病程记录'
<include refid="selectWhereSql"></include>
</where>
order by sysUpdateTime desc
) temp
left join
archive_detail
on temp.DID = archive_detail.id
left join
zd_assort
on archive_detail.AssortID = zd_assort.assort_id
<where>
<if test="assortId != null and assortId != ''">
and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}
</if>
</where>
order by sysupdatetimeStr
) temp
LEFT JOIN archive_detail ON temp.DID = archive_detail.id
LEFT JOIN zd_assort ON archive_detail.AssortID = zd_assort.assort_id
LEFT JOIN archive_other_ext_submitTime
ON archive_other_ext_submitTime.other_ext_id = temp.idTemp
<where>
<if test="assortId != null and assortId != ''">
and zd_assort.assort_id = #{assortId,jdbcType=NVARCHAR}
</if>
</where>
order by sysupdatetimeStr
</select>
<select id="selectAllByIds" resultMap="BaseResultMap">
select * from archive_other_ext where id in (${ids})
select *,
CONVERT(varchar(19),eTime,120) etimeStr
from archive_other_ext where id in (${ids})
</select>
<!--&lt;!&ndash;批量更新statusFlag = 0&ndash;&gt;
<update id="updateSubmit">
@ -546,7 +535,7 @@
jzh
) ELSE eTime
END eTime,
ID
ID,sysFlag
FROM
archive_other_ext
WHERE
@ -554,7 +543,14 @@
archive_other_ext
INNER JOIN archive_other_ext_submitTime ON archive_other_ext.ID = archive_other_ext_submitTime.other_ext_id
WHERE
eTime > create_time
eTime >
case when
sysFlag = 1
then
archive_other_ext_submitTime.create_time
else
archive_other_ext_submitTime.str2
end
</select>
<!--查询未同步更新完成的文件名称集合-->
<select id="selectC1WithNotCollectFinishByPatientId" resultMap="BaseResultMap">
@ -590,7 +586,14 @@
archive_other_ext
INNER JOIN archive_other_ext_submitTime ON archive_other_ext.ID = archive_other_ext_submitTime.other_ext_id
WHERE
archive_other_ext_submitTime.create_time > archive_other_ext.eTime
eTime &lt;=
case when
sysFlag = 1
then
archive_other_ext_submitTime.create_time
else
archive_other_ext_submitTime.str2
end
</select>
<!--查询校验不完整的集合-->
<select id="selectNotCompleteMidList" resultMap="BaseResultMap">
@ -607,6 +610,6 @@
</select>
<!--根据记账号查询该病例护理记录的最新采集完成时间-->
<select id="selectMaxETimeByNursingAndJzh" resultType="java.lang.String">
select top 1 eTime from archive_other_ext where sysFlag = 1 and jzh = #{patientId} order by eTime desc
select top 1 convert(varchar(19),eTime,120) eTime from archive_other_ext where sysFlag = 1 and jzh = #{patientId} order by eTime desc
</select>
</mapper>

@ -3,7 +3,7 @@
<mapper namespace="com.emr.dao.ArchiveOtherExtSubmittimeMapper" >
<resultMap id="BaseResultMap" type="com.emr.entity.ArchiveOtherExtSubmittime" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="other_ext_id" property="otherExtId" jdbcType="VARCHAR" />
<result column="other_ext_id" property="otherExtId" jdbcType="BIGINT" />
<result column="create_time" property="createTime" jdbcType="VARCHAR" />
<result column="int1" property="int1" jdbcType="INTEGER" />
<result column="int2" property="int2" jdbcType="INTEGER" />
@ -16,7 +16,7 @@
id, other_ext_id, create_time, int1, int2, int3, str1, str2, str3
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
select
<include refid="Base_Column_List" />
from archive_other_ext_submitTime
where id = #{id,jdbcType=INTEGER}
@ -26,11 +26,11 @@
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.emr.entity.ArchiveOtherExtSubmittime" >
insert into archive_other_ext_submitTime (id, other_ext_id, create_time,
int1, int2, int3, str1,
insert into archive_other_ext_submitTime (id, other_ext_id, create_time,
int1, int2, int3, str1,
str2, str3)
values (#{id,jdbcType=INTEGER}, #{otherExtId,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR},
#{int1,jdbcType=INTEGER}, #{int2,jdbcType=INTEGER}, #{int3,jdbcType=INTEGER}, #{str1,jdbcType=NVARCHAR},
values (#{id,jdbcType=INTEGER}, #{otherExtId,jdbcType=BIGINT}, #{createTime,jdbcType=VARCHAR},
#{int1,jdbcType=INTEGER}, #{int2,jdbcType=INTEGER}, #{int3,jdbcType=INTEGER}, #{str1,jdbcType=NVARCHAR},
#{str2,jdbcType=NVARCHAR}, #{str3,jdbcType=NVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.emr.entity.ArchiveOtherExtSubmittime" >
@ -69,7 +69,7 @@
#{id,jdbcType=INTEGER},
</if>
<if test="otherExtId != null" >
#{otherExtId,jdbcType=VARCHAR},
#{otherExtId,jdbcType=BIGINT},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=VARCHAR},
@ -98,7 +98,7 @@
update archive_other_ext_submitTime
<set >
<if test="otherExtId != null" >
other_ext_id = #{otherExtId,jdbcType=VARCHAR},
other_ext_id = #{otherExtId,jdbcType=BIGINT},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=VARCHAR},
@ -126,7 +126,7 @@
</update>
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveOtherExtSubmittime" >
update archive_other_ext_submitTime
set other_ext_id = #{otherExtId,jdbcType=VARCHAR},
set other_ext_id = #{otherExtId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=VARCHAR},
int1 = #{int1,jdbcType=INTEGER},
int2 = #{int2,jdbcType=INTEGER},
@ -153,7 +153,7 @@
values
<foreach collection="list" item="item" separator=",">
(
#{item.otherExtId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=VARCHAR},
#{item.otherExtId,jdbcType=BIGINT}, #{item.createTime,jdbcType=VARCHAR},
#{item.int1,jdbcType=INTEGER}, #{item.int2,jdbcType=INTEGER}, #{item.int3,jdbcType=INTEGER}, #{item.str1,jdbcType=NVARCHAR},
#{item.str2,jdbcType=NVARCHAR}, #{item.str3,jdbcType=NVARCHAR}
)
@ -163,7 +163,7 @@
<update id="updateInfo">
<foreach collection="list" item="item" separator=";">
update archive_other_ext_submitTime
set other_ext_id = #{item.otherExtId,jdbcType=VARCHAR},
set other_ext_id = #{item.otherExtId,jdbcType=BIGINT},
create_time = #{item.createTime,jdbcType=VARCHAR},
int1 = #{item.int1,jdbcType=INTEGER},
int2 = #{item.int2,jdbcType=INTEGER},

@ -123,6 +123,9 @@
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
display: none;
}
.content-title {
text-align: center
}
</style>
<script>
var path = "${path}";
@ -774,10 +777,15 @@
任务详情
</h4>
</div>
<div class="modal-body divCss2">
<div class="modal-body" style="padding-top:0px!important">
<div id="loading" class="loading">正在采集,请稍等</div>
<div class="row">
<div class="col-sm-12">
<section class="content-title">
<h3>
<small id="workTitle"></small>
</h3>
</section>
<div class="form-inline">
<div class="form-group divCss8">
<label for="name">标题:</label>
@ -831,7 +839,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-11-25_3"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-27"></script>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-12-01"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-12-01"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

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

@ -1070,6 +1070,10 @@ $("#workDetail").click(function(){
console.log('查询出错了')
}
})
//赋值任务详情标题 姓名:住院号:住院次数: 出院日期:
$("#workTitle").text("");
var workTitle = "姓名:"+$("#nameLab").text()+";住院号:"+$("#inLab").text()+";住院次数:"+$("#inTimeLab").text()+";出院日期:"+$("#inDateLab1").text()+";";
$("#workTitle").text(workTitle);
})
//初始化选择框
function loadTable5Table(rows){
@ -1237,9 +1241,17 @@ function initTable5(data,sidePagination) {
valign: 'middle',
sortable: true,
formatter: function (value, row, index) {
//若是护理记录取护理最新采集完成时间,否则取正常采集完成时间
var etimeStr = row.sysflag == 1 ? row.tempTime : row.etimeStr;
return selectTimeColor(value,etimeStr,1);
if(value != null){
var color = '';
if(row.sysflag == 1){
//护理
color = selectTimeColor(value,row.nursingEndTime);
}else{
//非护理
color = selectTimeColor(row.tempTime,row.etimeStr);
}
return '<span style="color: ' + color + '">' + value + '</span>';
}
}
},
{
@ -1261,9 +1273,7 @@ function initTable5(data,sidePagination) {
if(value != null){
var color = '';
if(row.statusflag == 0){
if(row.createTime != null && row.etimeStr != null && row.etimeStr < row.createTime){
color = 'red';
}
color = selectTimeColor(row.tempTime,row.etimeStr);
}
return '<span style="color:'+color+'">'+value+'</span>';
}else{
@ -1325,25 +1335,17 @@ function initTable5(data,sidePagination) {
}
//对比结束时间方法
/**
* @param time 真实的时间
* @param createTime 开始真实的时间
* @param etimeStr 最后更新的时间
* @param type 区别type=1显示time值type=2显示最新更新的时间
* @returns {*}
*/
function selectTimeColor(time,etimeStr,type){
if(time != null){
var color = 'red';
if(etimeStr != null && etimeStr > time){
color = 'green';
}
if(type == 1) {
return '<span style="color: ' + color + '">' + time + '</span>';
}else{
return '<span style="color: ' + color + '">' + etimeStr + '</span>';
}
}else{
return time;
function selectTimeColor(createTime,etimeStr){
var color = 'red';
if(etimeStr != null && etimeStr > createTime){
color = 'green';
}
return color;
}
//定义刷新开始计时到超时时间为10分钟
var timeOut = 10 * 60 * 1000;

Loading…
Cancel
Save