更新版本20201105

master
zengwh 5 years ago
parent 569e5370f2
commit 99b981a314

@ -207,11 +207,6 @@
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.12</version>
</dependency>
<!-- 客户端 -->
<!-- axis 1.4 jar start -->
<dependency>
@ -236,12 +231,6 @@
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<!--<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>-->
</dependencies>
<build>

@ -1,8 +1,10 @@
package com.emr.controller;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.ipml.ArchiveOtherExtService;
import com.emr.service.ipml.ArchiveOtherService;
import com.emr.util.ExceptionPrintUtil;
import com.emr.util.Msg;
import com.emr.vo.ArchiveOtherExtVo;
@ -22,7 +24,8 @@ import java.util.List;
public class ArchiveOtherExtController {
@Autowired
private ArchiveOtherExtService archiveOtherExtService;
@Autowired
private ArchiveOtherService archiveOtherService;
/**
*
* @param offset
@ -91,8 +94,22 @@ public class ArchiveOtherExtController {
*/
@RequestMapping("selectSuccessByExtIds")
@ResponseBody
public Msg selectSuccessByExtIds(String ids) throws Exception{
List<ArchiveOtherExtSubmittime> list = archiveOtherExtService.selectSuccessByExtIds(ids);
return Msg.success().add("list",list);
public Msg selectSuccessByExtIds(String ids,String c1) throws Exception{
if(StringUtils.isNotBlank(ids)){
String[] split = ids.split(",");
StringBuilder temp = new StringBuilder();
for(String str : split){
if(StringUtils.isNotBlank(str)){
if(StringUtils.isNotBlank(temp)){
temp.append(",");
}
temp.append("'").append(str).append("'");
}
}
List<ArchiveOther> list = archiveOtherService.selectAllByC2(temp.toString(),c1);
return Msg.success().add("list",list);
}else{
return Msg.fail("参数ids不能为空");
}
}
}

@ -21,5 +21,7 @@ public interface ArchiveOtherExtMapper {
List<ArchiveOtherExtVo> getArchiveExtInfo(ArchiveOtherExtVo record);
int updateSubmit(@Param("ids")String ids);
List<ArchiveOtherExtVo> selectAllByIds(@Param("ids") String ids);
//int updateSubmit(@Param("ids")String ids);
}

@ -23,6 +23,4 @@ public interface ArchiveOtherExtSubmittimeMapper {
int createInfo(@Param("ids") String ids);
int updateInfo(@Param("ids") String ids);
List<ArchiveOtherExtSubmittime> selectSuccessByExtIds(@Param("ids")String ids);
}

@ -1,10 +1,11 @@
package com.emr.dao;
import com.emr.entity.ArchiveOther;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ArchiveOtherMapper {
public interface ArchiveOtherMapper extends CommomMapper{
int deleteByPrimaryKey(Long id);
int insert(ArchiveOther record);
@ -23,4 +24,16 @@ public interface ArchiveOtherMapper {
* @return
*/
List<ArchiveOther> selectExistByPatientId(String patientId);
/**
* c2
* @param c2s
* @return
*/
List<ArchiveOther> selectAllByC2(@Param("c2s")String c2s,@Param("c1")String c1);
/**
* c2c1
* @param c2s
* @return
*/
void updateBatchC1ByC2s(@Param("c2s")String c2s);
}

@ -35,6 +35,10 @@ public class Archive_Detail_Vo extends Archive_Detail{
private String pageCounts;
private String pdfPaths;
private String eTimeStr;
private String createTime;
}

@ -2,19 +2,23 @@ package com.emr.service.ipml;
import com.emr.dao.ArchiveOtherExtMapper;
import com.emr.dao.ArchiveOtherExtSubmittimeMapper;
import com.emr.entity.ArchiveOtherExt;
import com.emr.dao.ArchiveOtherMapper;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExtSubmittime;
import com.emr.vo.ArchiveOtherExtVo;
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;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@Service
@ -26,6 +30,10 @@ public class ArchiveOtherExtService {
private ArchiveOtherExtSubmittimeMapper archiveOtherExtSubmittimeMapper;
@Autowired
private ArchiveOtherService archiveOtherService;
@Autowired
private ArchiveOtherMapper archiveOtherMapper;
@Autowired
private CommomService commomService;
/**
* @param request
* @param archiveOtherExtVo
@ -111,26 +119,106 @@ public class ArchiveOtherExtService {
* @param sysFlag
*/
public void updateSubmit(String ids,String notNursingIds, String jzh, String masterId, Integer sysFlag) throws Exception{
String idsStr = SplitString2String(ids);
String idsStr = splitString2String(ids);
String idsTemp = idsStr;
//存在护理记录则调用护理按需采集功能
if(null != sysFlag && sysFlag == 1) {
//调用护理按需采集功能
archiveOtherService.updateArchiveOther(jzh, masterId);
//ext表更新非护理记录
if(StringUtils.isNotBlank(notNursingIds)){
String tempIds = SplitString2String(notNursingIds);
archiveOtherExtMapper.updateSubmit(tempIds);
idsTemp = splitString2String(notNursingIds);
}
}else{
//全部更新ext表
archiveOtherExtMapper.updateSubmit(idsStr);
}
//ext表更新非护理记录
if(StringUtils.isNotBlank(notNursingIds)){
updateCommomSubmit(idsTemp);
//archiveOtherExtMapper.updateSubmit(idsTemp);
}
//操作提交信息表
OperOtherExtSubmitInfo(ids, idsStr);
operOtherExtSubmitInfo(ids, idsStr);
}
/**
*
* 1.idsTemparchive_other
* 2.C1
* 3.
* @param idsTemp
*/
private void updateCommomSubmit(String idsTemp) throws Exception {
//根据other_ext的id查询存在c2字段值的集合
List<ArchiveOther> archiveOthers = archiveOtherService.selectAllByC2(idsTemp,null);
//定义需要新增的id集合
String notExistTemp = "";
if(!CollectionUtils.isEmpty(archiveOthers)){
String existTemp = "";
List<String> existOtherData = getExistOtherData(idsTemp, archiveOthers);
existTemp = existOtherData.get(0);
//批量更新
archiveOtherService.updateBatchC1ByC2s(existTemp);
notExistTemp = existOtherData.get(1);
}else{
notExistTemp = idsTemp;
}
//不存在的部门批量添加
//查询other_ext记录
if(StringUtils.isNotBlank(notExistTemp)) {
//定义批量新增的集合
List<ArchiveOther> batchInsertList = new ArrayList<>();
List<ArchiveOtherExtVo> archiveOtherExtVos = archiveOtherExtMapper.selectAllByIds(notExistTemp);
for (ArchiveOtherExtVo vo : archiveOtherExtVos){
batchInsertList.add(archiveOtherService.getArchiveOther(vo));
}
//批量新增
commomService.insertBatch("archive_other",batchInsertList,archiveOtherMapper);
}
}
/**
* list.get(0)list.get(1)
* other_ext
* @param idsTemp
* @param archiveOthers
* @return
*/
private List<String> getExistOtherData(String idsTemp, List<ArchiveOther> archiveOthers) {
String[] idList = idsTemp.split(",");
//定义存在的id集合
StringBuilder existTemp = new StringBuilder();
//定义不存在的id集合
StringBuilder notExistTemp = new StringBuilder();
//重新组织需要增加的id
for(String str : idList){ //定义是否存在
boolean existFlag = false;
for(ArchiveOther other : archiveOthers) {
String id = "'" + other.getC2() + "'";
if (StringUtils.isNotBlank(str) && str.equals(id)) {
existFlag = true;
break;
}
}
if(existFlag){
if(StringUtils.isNotBlank(existTemp)){
existTemp.append(",");
}
existTemp.append(str);
}else{
if(StringUtils.isNotBlank(notExistTemp)){
notExistTemp.append(",");
}
notExistTemp.append(str);
}
}
//定义返回集合
List<String> list = new LinkedList<>();
list.add(existTemp.toString());
list.add(notExistTemp.toString());
return list;
}
//带逗号的字符串加单引号
private String SplitString2String(String notNursingIds) {
private String splitString2String(String notNursingIds) {
String[] notNursingIdsArr = notNursingIds.split(",");
//批量更新ext表的statusFlag字段值为0
StringBuilder notNursingIdsBuilder = new StringBuilder();
@ -150,7 +238,7 @@ public class ArchiveOtherExtService {
* @param ids
* @param idsStr
*/
private void OperOtherExtSubmitInfo(String ids, String idsStr) {
private void operOtherExtSubmitInfo(String ids, String idsStr) {
//查询ext_id在ext_info表中是否存在
List<ArchiveOtherExtSubmittime> infoList = archiveOtherExtSubmittimeMapper.selectAllByExtId(idsStr);
//定义需要新增的id集合
@ -195,8 +283,4 @@ public class ArchiveOtherExtService {
archiveOtherExtSubmittimeMapper.createInfo(createStr.toString());
}
}
public List<ArchiveOtherExtSubmittime> selectSuccessByExtIds(String ids) {
return archiveOtherExtSubmittimeMapper.selectSuccessByExtIds(ids);
}
}

@ -2,7 +2,9 @@ package com.emr.service.ipml;
import com.emr.dao.ArchiveOtherMapper;
import com.emr.entity.ArchiveOther;
import com.emr.entity.ArchiveOtherExt;
import com.emr.util.IDHelper;
import com.emr.vo.ArchiveOtherExtVo;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.util.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,34 +48,96 @@ public class ArchiveOtherService {
archiveOtherMapper.updateByPrimaryKeySelective(archiveOther);
}else{
//不存在则新增
ArchiveOther archiveOther = new ArchiveOther();
long id = IDHelper.NewID();
archiveOther.setId(id);
archiveOther.setPid(patientId);
archiveOther.setCreatedtime(new Date());
archiveOther.setOtherinfo("护理系统按需采集");
archiveOther.setMasterid(masterId);
archiveOther.setDetailid("0");
archiveOther.setDtime(new Date());
archiveOther.setSysflag(-2);
archiveOther.setC1("");
archiveOther.setC2("");
archiveOther.setC3("");
archiveOther.setC4("");
archiveOther.setC5("");
archiveOther.setN1(BigDecimal.valueOf(0));
archiveOther.setN2(BigDecimal.valueOf(0));
archiveOther.setN3(BigDecimal.valueOf(0));
String date = "1801-02-03 00:00:00";
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
archiveOther.setT1(fmt.parse(date));
archiveOther.setT2(fmt.parse(date));
archiveOther.setT3(fmt.parse(date));
archiveOther.setIsfulltext(false);
ArchiveOtherExtVo extObj = new ArchiveOtherExtVo();
extObj.setJzh(patientId);
extObj.setMid(masterId);
//填充数据
ArchiveOther archiveOther = getArchiveOther(extObj);
archiveOtherMapper.insert(archiveOther);
}
}
/**
* ArchiveOtherExt
* @param extObj
* @return
* @throws Exception
*/
public ArchiveOther getArchiveOther(ArchiveOtherExtVo extObj) throws Exception {
ArchiveOther archiveOther = new ArchiveOther();
long id = IDHelper.NewID();
archiveOther.setId(id);
archiveOther.setCreatedtime(new Date());
archiveOther.setDetailid("0");
archiveOther.setDtime(new Date());
archiveOther.setC1("");
archiveOther.setC2("");
archiveOther.setC3("");
archiveOther.setC4("");
archiveOther.setC5("");
archiveOther.setN1(BigDecimal.valueOf(0));
archiveOther.setN2(BigDecimal.valueOf(0));
archiveOther.setN3(BigDecimal.valueOf(0));
String date = "1801-02-03 00:00:00";
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
archiveOther.setT1(fmt.parse(date));
archiveOther.setT2(fmt.parse(date));
archiveOther.setT3(fmt.parse(date));
archiveOther.setIsfulltext(false);
//不同部分
archiveOther.setPid(extObj.getJzh());
archiveOther.setMasterid(extObj.getMid());
Integer sysflag = extObj.getSysflag();
//定义不同的sysFlag
Integer sysFlagTemp = null;
String otherInfo = "";
if(sysflag == null){
//护理系统
sysFlagTemp = -2;
otherInfo = "护理";
}else{
//设置C2的值为other_ext表的id
archiveOther.setC2(extObj.getId().toString());
//2 His3 Pasc4 心电5 手麻6 Lis7 首页8 医嘱
//-2 护理,-3 Pasc-4 心电,-5 手麻,-6 Lis-7 首页,-8 医嘱,-9 His
switch (sysflag){
case 2:
sysFlagTemp = -9;
otherInfo = "His";
break;
case 3:
sysFlagTemp = -3;
otherInfo = "Pasc";
break;
case 4:
sysFlagTemp = -4;
otherInfo = "心电";
break;
case 5:
sysFlagTemp = -5;
otherInfo = "手麻";
break;
case 6:
sysFlagTemp = -6;
otherInfo = "Lis";
break;
case 7:
sysFlagTemp = -7;
otherInfo = "首页";
break;
case 8:
sysFlagTemp = -8;
otherInfo = "医嘱";
break;
default:
break;
}
}
archiveOther.setOtherinfo(otherInfo+"系统按需采集");
archiveOther.setSysflag(sysFlagTemp);
return archiveOther;
}
/**
* @param patientId
* @return
@ -93,4 +157,22 @@ public class ArchiveOtherService {
}
return 0;
}
/**
* c2
* @param c2s
* @param c1
* @return
*/
public List<ArchiveOther> selectAllByC2(String c2s,String c1){
return archiveOtherMapper.selectAllByC2(c2s,c1);
}
/**
*
* @param c2s
*/
public void updateBatchC1ByC2s(String c2s){
archiveOtherMapper.updateBatchC1ByC2s(c2s);
}
}

@ -62,7 +62,7 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
StringBuilder newPageCount = new StringBuilder();
for (int i = 0; i < pageCountArr.length; i++) {
String pageCountStr = pageCountArr[i];
if("0".equals(pageCountStr)){
/*if("0".equals(pageCountStr)){
String pathPath = pdfPathArr[i];
File file = new File(pathPath);
try{
@ -71,7 +71,7 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
}catch (Exception e){
e.printStackTrace();
}
}
}*/
if(StringUtils.isNotBlank(newPageCount)){
newPageCount.append(",");
}
@ -124,6 +124,10 @@ public class Archive_DetailServiceImpl implements Archive_DetailService {
if(StringUtils.isNotBlank(detailVo.getTitle()) &&
!detailVo.getTitle().contains(strTemp) && !detailVo.getTitle().contains(nurseTemp)) {
returnList.add(detailVo);
}else{
if(StringUtils.isBlank(detailVo.getTitle())){
returnList.add(detailVo);
}
}
}
}

@ -122,23 +122,28 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
//定义匹配分类成功次数
int successCount = 0;
for (Zd_Assort assortFor : assortList) {
//定义无匹配的分类
boolean flag = false;
for (Archive_Detail detail : details) {
//判断主键相同且分类id相同
if (master.getId().equals(detail.getMasterid()) && assortFor.getAssortId().equals(detail.getAssortid())) {
successCount++;
flag = true;
break;
}
}
//该分类无匹配直接跳出循环,改主键不完整
if (!flag) {
break;
}
}
//如果成功匹配个数和需校验分类个数相等,全部匹配
if (successCount == assortList.size()) {
//特殊情况验证完整性婴儿带B的住院号少验证三类病案首页、入(出、死亡)院记录
int verificationCount = 0;
String inpNo = master.getInpNo();
if(StringUtils.isNotBlank(inpNo)){
//最后一个字符带B的是婴儿
String lastChar = inpNo.substring(inpNo.length() - 1, inpNo.length());
if("B".equals(lastChar)){
verificationCount = assortList.size() - 2;
}else{
verificationCount = assortList.size();
}
}
if (verificationCount > 0 && successCount == verificationCount) {
//list的isSuccess字段值赋值1
master.setIsSuccess("1");
//不完整的批量更新为完整

@ -511,7 +511,10 @@
</where>
order by sysupdatetimeStr
</select>
<!--批量更新statusFlag = 0-->
<select id="selectAllByIds" resultMap="BaseResultMap">
select * from archive_other_ext where id in (${ids})
</select>
<!--&lt;!&ndash;批量更新statusFlag = 0&ndash;&gt;
<update id="updateSubmit">
update archive_other_ext
set statusFlag = 0,T2 = '1801-02-03'
@ -520,5 +523,5 @@
ID in (${ids})
</if>
</where>
</update>
</update>-->
</mapper>

@ -161,19 +161,4 @@
update archive_other_ext_submitTime set create_time = CONVERT(varchar(19),GETDATE(),120)
where other_ext_id in (${ids})
</update>
<!--根据ids查询采集成功比较提交时间和结束时间-->
<select id="selectSuccessByExtIds" resultMap="BaseResultMap">
SELECT
archive_other_ext_submitTime.other_ext_id
FROM
archive_other_ext_submitTime
INNER JOIN archive_other_ext ON archive_other_ext_submitTime.other_ext_id = archive_other_ext.ID
WHERE
archive_other_ext_submitTime.create_time &lt;= archive_other_ext.eTime
AND archive_other_ext.ID in (
<foreach collection="ids.split(',')" item="item" separator=",">
'${item}'
</foreach>
)
</select>
</mapper>

@ -268,4 +268,31 @@
<select id="selectExistByPatientId" resultMap="BaseResultMap">
select * from archive_other where sysFlag = -2 and pid = #{patientId}
</select>
<select id="selectAllByC2" resultMap="BaseResultMap">
select * from archive_other where C2 in (${c2s})
<if test="c1 != null and c1 != null">
AND C1 = 'done'
</if>
</select>
<update id="updateBatchC1ByC2s">
update archive_other set C1 = '' where C2 in (${c2s})
</update>
<!--批量新增-->
<insert id="insertBatch">
insert into archive_other(ID, pid, createdtime,
otherInfo, masterID, detailID,
dTime, sysFlag, C1,
C2, C3, C4, C5,
N1, N2, N3, T1,
T2, T3, IsFullText)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.pid,jdbcType=NVARCHAR}, #{item.createdtime,jdbcType=TIMESTAMP},
#{item.otherinfo,jdbcType=VARCHAR}, #{item.masterid,jdbcType=NVARCHAR}, #{item.detailid,jdbcType=NVARCHAR},
#{item.dtime,jdbcType=TIMESTAMP}, #{item.sysflag,jdbcType=INTEGER}, #{item.c1,jdbcType=NVARCHAR},
#{item.c2,jdbcType=NVARCHAR}, #{item.c3,jdbcType=NVARCHAR}, #{item.c4,jdbcType=NVARCHAR}, #{item.c5,jdbcType=NVARCHAR},
#{item.n1,jdbcType=DECIMAL}, #{item.n2,jdbcType=DECIMAL}, #{item.n3,jdbcType=DECIMAL}, #{item.t1,jdbcType=TIMESTAMP},
#{item.t2,jdbcType=TIMESTAMP}, #{item.t3,jdbcType=TIMESTAMP}, #{item.isfulltext,jdbcType=BIT})
</foreach>
</insert>
</mapper>

@ -19,6 +19,7 @@
<result column="MasterID" jdbcType="NVARCHAR" property="masterid"/>
<result column="UpLoadDateTime" jdbcType="NVARCHAR" property="uploaddatetime"/>
<result column="AssortID" jdbcType="NVARCHAR" property="assortid"/>
<result column="assort_id" jdbcType="NVARCHAR" property="assortId"/>
<result column="Source" jdbcType="NVARCHAR" property="source"/>
<result column="SubAssort" jdbcType="NVARCHAR" property="subassort"/>
<result column="Title" jdbcType="NVARCHAR" property="title"/>
@ -36,6 +37,7 @@
Sys
</sql>
<sql id="selectMasterAndAssortIds">
and flag = 0
<if test="patientId != null and patientId != ''">
and MasterID=#{patientId,jdbcType=VARCHAR}
</if>
@ -70,8 +72,7 @@
',' + CONVERT ( VARCHAR ( 255 ), isnull(PageCount,0) )
FROM
archive_detail
where
AssortID = z.assort_id
where AssortID = z.assort_id
<include refid="selectMasterAndAssortIds"></include>
FOR XML path ( '' )
),
@ -111,10 +112,16 @@
<!--分段详情文件列表-->
<select id="detailByClo" resultMap="BaseResultMap2" parameterType="com.emr.entity.Archive_Detail_Vo">
select
t.MasterID,t.id,t.PDF_PATH,t.Source,t.UpLoadDateTime,t.SubAssort,t.Title,t.flag,z.assort_id,z.assort_name,z.assort_sort,z.print_flag,isnull(t.PageCount,0) pageCounts,t.id ids,t.PDF_PATH pdfPaths
t.MasterID,t.id,t.PDF_PATH,t.Source,t.UpLoadDateTime,t.SubAssort,t.Title,t.flag,z.assort_id,z.assort_name,z.assort_sort,z.print_flag,isnull(t.PageCount,0) pageCounts,t.id ids,t.PDF_PATH pdfPaths,CONVERT(varchar(19),archive_other_ext.eTime,120) eTimeStr,archive_other_ext_submitTime.create_time
from zd_assort z
left join archive_detail t
on z.assort_id=t.AssortID
left join
archive_other_ext
on t.id = archive_other_ext.DID
left join
archive_other_ext_submitTime
on archive_other_ext_submitTime.other_ext_id = archive_other_ext.id
where 1=1
<if test="patientId != null">
and t.MasterID=#{patientId,jdbcType=VARCHAR}
@ -416,7 +423,7 @@
</select>
<!--根据masterId查询采集来源集合-->
<select id="getSourceByMasterId" resultMap="BaseResultMap">
select Source from archive_detail where MasterID = ${masterid} group by Source
select Source from archive_detail where MasterID = #{masterid} group by Source
</select>
<!--查询已扫描上传到masterId集合-->
<select id="selectIsScan" resultMap="BaseResultMap">

@ -263,45 +263,8 @@
count( 1 )
FROM
archive_master
LEFT JOIN (
SELECT
MasterID,
COUNT( AssortID ) count
FROM
(
SELECT
archive_detail.MasterID,
dbo.archive_detail.AssortID
FROM
dbo.archive_detail
INNER JOIN dbo.zd_assort ON dbo.archive_detail.AssortID = dbo.zd_assort.assort_id
AND dbo.zd_assort.print_flag = 0
AND dbo.zd_assort.is_check = 1
WHERE
( dbo.archive_detail.flag = 0 )
GROUP BY
archive_detail.MasterID,
dbo.archive_detail.AssortID
) temp
GROUP BY
MasterID
) temp ON archive_master.id = temp.MasterID
LEFT JOIN (
SELECT
MID,
COUNT( MID ) inspectionCount
FROM
archive_other_ext
WHERE
sysFlag IN ( 3, 6 )
AND ISNULL( DID, '' )= ''
AND ISNULL( MID, '' )!= ''
GROUP BY
MID
) archive_other_ext ON archive_master.id = archive_other_ext.MID
WHERE
ISNULL( count, 0 ) = ( SELECT COUNT( assort_id ) FROM zd_assort WHERE print_flag = 0 AND is_check = 1 )
AND inspectionCount IS NULL
<!--校验完整性-->
<include refid="verificationComplete"></include>
<include refid="selectByDate"></include>
) count3
</select>
@ -357,28 +320,49 @@
<include refid="formatDate"></include> disDate
FROM
archive_master
LEFT JOIN (
<!--校验完整性-->
<include refid="verificationComplete"></include>
<include refid="selectByDate1"></include>
GROUP BY
<include refid="formatDate"></include>
) t4 ON t1.disDate = t4.disDate
order by t1.disDate desc
</select>
<!--校验完整性-->
<sql id="verificationComplete">
LEFT JOIN (
SELECT
MasterID,
COUNT( AssortID ) count
case
when
substring(inp_no,len(inp_no),len(inp_no)+1) = 'B'
then
COUNT( AssortID ) + 2
else
COUNT( AssortID )
end count
FROM
(
SELECT
archive_detail.MasterID,
archive_master.inp_no,
dbo.archive_detail.AssortID
FROM
dbo.archive_detail
INNER JOIN dbo.zd_assort ON dbo.archive_detail.AssortID = dbo.zd_assort.assort_id
AND dbo.zd_assort.print_flag = 0
AND dbo.zd_assort.is_check = 1
inner join archive_master
on archive_detail.MasterID = archive_master.id
WHERE
( dbo.archive_detail.flag = 0 )
GROUP BY
archive_detail.MasterID,
archive_master.inp_no,
dbo.archive_detail.AssortID
) temp
GROUP BY
MasterID
MasterID,inp_no
) temp ON archive_master.id = temp.MasterID
LEFT JOIN (
SELECT
@ -396,12 +380,7 @@
WHERE
ISNULL( count, 0 ) = ( SELECT COUNT( assort_id ) FROM zd_assort WHERE print_flag = 0 AND is_check = 1 )
AND inspectionCount IS NULL
<include refid="selectByDate1"></include>
GROUP BY
<include refid="formatDate"></include>
) t4 ON t1.disDate = t4.disDate
order by t1.disDate desc
</select>
</sql>
<!---格式化时间-->
<sql id="formatDate">
<choose>

@ -772,7 +772,7 @@
</div>
</div>
</body>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-10-29"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-10-29"></script>
<script src="${path}/static/js/beHospList/beHospList.js?time=2020-11-03"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -448,5 +448,5 @@
</script>
<script src="${path}/static/js/inHospList/inHospList.js?time=2020-10-16"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-10-29"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
</html>

@ -644,7 +644,7 @@
</div>
</body>
<script src="${path}/static/js/lastVerifyList/lastVerifyList.js?time=2020-10-13"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-10-29"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
<script src="${path}/static/js/statistics/getDeptCommom.js"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -588,6 +588,6 @@
var path = "${path}";
</script>
<script src="${path}/static/js/unfileMedicalList/unfileMedicalList.js?time=2020-10-13"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-10-29"></script>
<script src="${path}/static/js/hospitalCommom/hospitalCommom.js?time=2020-11-03"></script>
<script src="${path}/static/js/hospitalLoadPdf/loadPdf.js?time=2020-10-16"></script>
</html>

@ -801,7 +801,7 @@ $("#checkSuccessBtn").click(function(){
var result = checkSuccessMethod(masterId);
if(result != ''){
//刷新表格
$('#table').bootstrapTable('refresh');
//$('#table').bootstrapTable('refresh');
$("#wzContent").text(result);
//增加完整性刷新后高亮状态
$("#wzContent").addClass("wzContent");

@ -630,12 +630,21 @@ function initTable2() {
valign: 'middle'
},
{
title: '上传时间',
title: '最近更新',
field: 'uploaddatetime',
align: 'left',
valign: 'middle',
sortable: true,
width: 150, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
//是否同步过
var createTime = row.createTime;
if(createTime != null){
return selectTimeColor(createTime,row.etimeStr);
}else{
return value;
}
}
},
{
title: '来源',
@ -923,6 +932,8 @@ $("#updateStateBtn").click(function () {
//刷新
$('#table2').bootstrapTable('refresh');
toastr.success("批量作废成功!");
//获取选中节点
initTree($("#idLab").html(),$("#checker").val());
} else {
toastr.error("批量作废失败,无记录!");
}
@ -970,6 +981,8 @@ $("#stateBtn").click(function () {
//刷新
$('#table2').bootstrapTable('refresh');
toastr.success("作废成功!");
//获取选中节点
initTree($("#idLab").html(),$("#checker").val());
} else {
toastr.error("作废失败,无该条记录!");
}
@ -1184,21 +1197,13 @@ function initTable5(data,sidePagination) {
valign: 'middle'
},
{
title: '最近提交',
title: '最近更新',
field: 'createTime',
align: 'center',
valign: 'middle',
sortable: true,
formatter: function (value, row, index) {
if(value != null){
var color = 'red';
if(row.etimeStr != null && row.etimeStr > value){
color = 'green';
}
return '<span style="color: '+color+'">'+value+'</span>';
}else{
return value;
}
return selectTimeColor(value,row.etimeStr);
}
},
{
@ -1278,6 +1283,18 @@ function initTable5(data,sidePagination) {
}
$("#table5").bootstrapTable(option);
}
//对比结束时间方法
function selectTimeColor(time,etimeStr){
if(time != null){
var color = 'red';
if(etimeStr != null && etimeStr > time){
color = 'green';
}
return '<span style="color: '+color+'">'+time+'</span>';
}else{
return time;
}
}
//定义刷新开始计时到超时时间为10分钟
var timeOut = 10 * 60 * 1000;
//定义查询间隔时间默认10秒
@ -1302,6 +1319,8 @@ function submitUpdate(ids,notNursingIds,sysFlag) {
initTable5('','server');
$("#loading").show();
var timeInterval = setInterval(function () {
//定义成功个数
var successCount = 0;
//10秒查询一次
if(sysFlag == 1){
//护理记录
@ -1313,25 +1332,39 @@ function submitUpdate(ids,notNursingIds,sysFlag) {
async:false,
success:function(result){
if(result.code == 100){
sysFlag = '';
ids = successMethod(idsArr,'',notNursingIds,sysFlag);
successCount = 1;
}
}
})
}
if(ids != '') {
//定义需要查询的other_ext_id集合
var idsTemp = '';
if(sysFlag == 1){
//存在护理
idsTemp = notNursingIds;
}else{
//不存在护理
idsTemp = ids;
}
if(idsTemp != '') {
//其他
$.ajax({
type: 'get',
url: path + '/archiveExt/selectSuccessByExtIds',
data: {ids: ids},
data: {ids: idsTemp,c1:'done'},
dataType: 'json',
success: function (result) {
if (result.code == 100) {
var successIds = result.extend.list;
if (successIds.length > 0) {
//返回成功id集合
ids = successMethod(ids.split(","), successIds, notNursingIds, sysFlag);
var data = result.extend.list.length;
if(successCount == 1 && idsTemp.split(",").length == data){
toastr.success("按需采集全部完成,页面将在" + times + "秒后自动刷新");
setTimeout(function(){
//刷新列表
initTable5('','server');
},times*1000);
//隐藏加载控件
$("#loading").hide();
clearInterval(timeInterval);
}
}
}
@ -1349,56 +1382,6 @@ function submitUpdate(ids,notNursingIds,sysFlag) {
}
})
}
//采集完成执行代码
function successMethod(idsArr,successIds,notNursingIds,sysFlag){
setTimeout(function(){
//刷新列表
initTable5('','server');
},times*1000);
var idsList = [];
//原来的个数
var idsArrLen = idsArr.length;
if(successIds != ''){
//不存在护理idsList = idsArr-successIds
idsList = getIdArr(idsArr,successIds);
}else{
//存在护理idsList = idsArr∩notNursingIds
var list2 = notNursingIds.split(",");
for (var i = 0; i < idsArr.length; i++) {
//定义是否包含关系
var idFlag = false;
for (var j = 0; j < list2.length; j++) {
if(idsArr[i] == list2[j]){
idsList.push(idsArr[i]);
idFlag = true;
}
}
//成功
if(!idFlag) {
toastr.warning("按需采集完成1个,剩余" + (idsArr.length - 1) + "个,页面将在" + times + "秒后自动刷新");
}
}
}
idsArr = idsList;
if(idsArr.length == 0){
//隐藏加载控件
$("#loading").hide();
clearInterval(timeInterval);
}
return idsArr.toString();
}
function getIdArr(idsArr,successIds){
for (var i = 0; i < idsArr.length; i++) {
for (var j = 0; j < successIds.length; j++) {
if(idsArr[i] == successIds[j].otherExtId){
//成功
toastr.warning("按需采集完成1个,剩余"+(idsArr.length-1)+"个,页面将在"+times+"秒后自动刷新");
idsArr.splice(i,1);
}
}
}
return idsArr;
}
//批量更新
$("#searchBtn6").click(function(){
var data =$("#table5").bootstrapTable('getSelections');
@ -1410,7 +1393,7 @@ $("#searchBtn6").click(function(){
var notNursingIds = '';
for (var i = 0; i < data.length; i++) {
var id = data[i].idTemp;
if(i != 0){
if(ids != ''){
ids += ',';
}
ids += id;

Loading…
Cancel
Save