@ -56,7 +56,7 @@ public class RegService {
return null ;
return null ;
}
}
// 挂号类型:1:预约挂号,2:现场挂号,3:分时段预约挂号,4:分时段现场 挂号
// 挂号类型:1:预约挂号,2:今日挂号,3:分时段预约挂号,4:分时段今日 挂号
if ( isSplitTime ) {
if ( isSplitTime ) {
return DateHelper . isToday ( regDate ) ? "4" : "3" ; // 判断是否是今天
return DateHelper . isToday ( regDate ) ? "4" : "3" ; // 判断是否是今天
}
}
@ -135,7 +135,7 @@ public class RegService {
reg . setBankTransNo ( bankTransNo ) ;
reg . setBankTransNo ( bankTransNo ) ;
reg . setTradeNo ( tradeNo ) ;
reg . setTradeNo ( tradeNo ) ;
// 挂号类型:1:预约挂号,2:现场挂号;3:分时段预约挂号,4:分时段现场 挂号
// 挂号类型:1:预约挂号,2:今日挂号;3:分时段预约挂号,4:分时段今日 挂号
regType = reg . getRegType ( ) ;
regType = reg . getRegType ( ) ;
patientId = reg . getPatientId ( ) ;
patientId = reg . getPatientId ( ) ;
if ( ObjectUtils . isEmpty ( patientId ) | | ObjectUtils . isEmpty ( regType ) | | ObjectUtils . isEmpty ( reg . getRegDate ( ) ) ) {
if ( ObjectUtils . isEmpty ( patientId ) | | ObjectUtils . isEmpty ( regType ) | | ObjectUtils . isEmpty ( reg . getRegDate ( ) ) ) {
@ -155,7 +155,7 @@ public class RegService {
log . info ( "{} 开始调用HIS挂号:patientId={}, bankTransNo={}" , merchantEnum . NAME , patientId , bankTransNo ) ;
log . info ( "{} 开始调用HIS挂号:patientId={}, bankTransNo={}" , merchantEnum . NAME , patientId , bankTransNo ) ;
String hisTransNo = null , treatNum = null , hisQueueNo , callNum = null , invoiceTransNo = null ;
String hisTransNo = null , treatNum = null , hisQueueNo , callNum = null , invoiceTransNo = null ;
// 挂号类型:1:预约挂号,2:现场挂号;3:分时段预约挂号,4:分时段现场 挂号
// 挂号类型:1:预约挂号,2:今日挂号;3:分时段预约挂号,4:分时段今日 挂号
JsonResult jsonResult ;
JsonResult jsonResult ;
if ( "1" . equals ( regType ) | | "2" . equals ( regType ) ) { // 挂号
if ( "1" . equals ( regType ) | | "2" . equals ( regType ) ) { // 挂号
log . info ( "[挂号]开始执行" ) ;
log . info ( "[挂号]开始执行" ) ;
@ -827,7 +827,7 @@ public class RegService {
* /
* /
public Register queryRegByHisInfo ( String patientId , String tradeNo , String hisTransNo ) throws ServiceException {
public Register queryRegByHisInfo ( String patientId , String tradeNo , String hisTransNo ) throws ServiceException {
Register register ;
Register register ;
log . info ( "[挂号订单]根据信息查询订单 patientId={}, hisTransNo={} tradeNo={}" , patientId , hisTransNo , tradeNo ) ;
log . info ( "[挂号订单]根据信息查询订单 patientId={}, hisTransNo={}, tradeNo={}" , patientId , hisTransNo , tradeNo ) ;
if ( ObjectUtils . isEmpty ( patientId ) ) {
if ( ObjectUtils . isEmpty ( patientId ) ) {
return null ;
return null ;
}
}
@ -966,20 +966,20 @@ public class RegService {
* @param openId openId
* @param openId openId
* /
* /
public boolean completeRegTreatNum ( String treatNum , String openId , String patientId , String tradeNo , String hisTransNo , String orderFromOwner ) throws ServiceException {
public boolean completeRegTreatNum ( String treatNum , String openId , String patientId , String tradeNo , String hisTransNo , String orderFromOwner ) throws ServiceException {
if ( ! ObjectUtils . isEmpty ( orderFromOwner ) & & ! "蓝旗" . equals ( orderFromOwner ) ) {
if ( ! ObjectUtils . isEmpty ( orderFromOwner ) & & ! "蓝旗" . equals ( orderFromOwner ) ) { // 不是线上挂号
return true ;
return true ;
}
}
RegisterDao regDao = new RegisterDao ( ) ;
RegisterDao regDao = new RegisterDao ( ) ;
Register findInfo = queryRegByHisInfo ( patientId , tradeNo , hisTransNo ) ;
Register findInfo = queryRegByHisInfo ( patientId , tradeNo , hisTransNo ) ;
if ( findInfo = = null ) {
if ( findInfo = = null ) {
throw new ServiceException ( "未找到挂号信息" ) ;
throw new ServiceException ( "未找到线上 挂号信息" ) ; // 本地数据中未找到
}
}
Long id = findInfo . getId ( ) ;
Long id = findInfo . getId ( ) ;
String curDate = DateHelper . getCurDate ( ) ;
String curDate = DateHelper . getCurDate ( ) ;
if ( ! curDate . equals ( findInfo . getRegDate ( ) ) ) {
if ( ! curDate . equals ( findInfo . getRegDate ( ) ) ) {
throw new ServiceException ( "不是今日就诊" ) ;
throw new ServiceException ( "不是今日就诊" ) ;
}
}
if ( ! ObjectUtils . isEmpty ( findInfo . getTreatNum ( ) ) ) { //就诊号不为空=>无需补充门诊号
if ( ! ObjectUtils . isEmpty ( findInfo . getTreatNum ( ) ) ) { // 就诊号不为空=>无需补充门诊号
return true ;
return true ;
}
}
return regDao . updateTreatNum ( id , treatNum ) > 0 ;
return regDao . updateTreatNum ( id , treatNum ) > 0 ;