@ -21,13 +21,13 @@ import org.apache.shiro.SecurityUtils;
import org.apache.shiro.util.CollectionUtils ;
import org.springframework.beans.BeanUtils ;
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 ;
import org.springframework.web.context.request.RequestContextHolder ;
import org.springframework.web.context.request.ServletRequestAttributes ;
import javax.servlet.http.HttpServletRequest ;
import java.text.ParseException ;
import java.text.SimpleDateFormat ;
import java.util.* ;
@ -37,6 +37,8 @@ import java.util.*;
@Service
@Transactional
public class Archive_MasterServiceImpl implements Archive_MasterService {
@Value ( "${notJudgeTasks}" )
private String notJudgeTasks ;
private static Logger log = Logger . getLogger ( "myLog" ) ;
@Autowired
private Archive_MasterMapper archiveMasterMapper ;
@ -1372,16 +1374,20 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
if ( ! complete ) {
//不完整添加进提示语句
if ( StringUtils . isNotBlank ( failResult ) ) {
failResult . append ( "," ) ;
//最终判断是否添加进校验提示名单
if ( judgeIsNotJudgeTask ( showName ) ) {
//不完整添加进提示语句
if ( StringUtils . isNotBlank ( failResult ) ) {
failResult . append ( "," ) ;
}
failResult . append ( showName ) ;
}
failResult . append ( showName ) ;
}
}
}
} catch ( Exception e ) {
e . printStackTrace ( ) ;
return Msg . fail ( "请求护理文书平台失败" ) ;
}
//判断电子病历是否完成sysFlag = 2
//查询电子病历采集任务
@ -1423,16 +1429,21 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
}
if ( ! complete ) {
//不完整添加进提示语句
if ( StringUtils . isNotBlank ( failResult ) ) {
failResult . append ( "," ) ;
String fentryName = ( String ) map1 . get ( "FENTRY_NAME" ) ;
//最终判断是否添加进校验提示名单
if ( judgeIsNotJudgeTask ( fentryName ) ) {
//不完整添加进提示语句
if ( StringUtils . isNotBlank ( failResult ) ) {
failResult . append ( "," ) ;
}
failResult . append ( fentryName ) ;
}
failResult . append ( map1 . get ( "FENTRY_NAME" ) ) ;
}
}
}
} catch ( Exception e ) {
e . printStackTrace ( ) ;
return Msg . fail ( "请求电子病历平台失败" ) ;
}
if ( StringUtils . isNotBlank ( failResult ) ) {
failResult . append ( "采集未完成不允许提交" ) ;
@ -1440,6 +1451,23 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
}
return Msg . success ( ) ;
}
/ * *
* 判 断 是 否 需 要 添 加 进 校 验 提 示 名 单
* @param task
* @return
* /
private boolean judgeIsNotJudgeTask ( String task ) {
if ( StringUtils . isNotBlank ( task ) & & StringUtils . isNotBlank ( notJudgeTasks ) ) {
String [ ] tasks = notJudgeTasks . split ( "," ) ;
for ( String taskTemp : tasks ) {
if ( taskTemp . equals ( task ) ) {
return false ;
}
}
}
return true ;
}
}