|
|
@@ -16,6 +16,7 @@ import cn.hnthyy.thmz.service.his.mz.*;
|
|
|
import cn.hnthyy.thmz.service.his.zd.ZdChequeTypeService;
|
|
|
import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
|
|
|
import cn.hnthyy.thmz.service.thmz.TransactionService;
|
|
|
+import cn.hnthyy.thmz.service.thmz.UserDeptRelationService;
|
|
|
import cn.hnthyy.thmz.service.thmz.WindowsService;
|
|
|
import cn.hnthyy.thmz.vo.MzyReqrecVo;
|
|
|
import cn.hnthyy.thmz.vo.PageViewVo;
|
|
|
@@ -55,6 +56,8 @@ public class MzyReqrecController {
|
|
|
private TransactionService transactionService;
|
|
|
@Autowired
|
|
|
private ZdChequeTypeService zdChequeTypeService;
|
|
|
+ @Autowired
|
|
|
+ private UserDeptRelationService userDeptRelationService;
|
|
|
|
|
|
/**
|
|
|
* 保存挂号信息
|
|
|
@@ -862,13 +865,17 @@ public class MzyReqrecController {
|
|
|
Integer count = null;
|
|
|
if (Constants.EMERGENCY_WARD_CODE.equals(deptCode)) {
|
|
|
beforeDate = DateUtil.getDateFromNow(-3);
|
|
|
- count = mzyReqrecService.queryValidMzyReqrec(patientId, null, deptCode, beforeDate);
|
|
|
+ count = mzyReqrecService.queryValidMzyReqrec(patientId, null, deptCode, beforeDate,null);
|
|
|
} else {
|
|
|
beforeDate = DateUtil.getDateFromNow(-1);
|
|
|
if(Constants.JY_EXEC_CODE.equals(deptCode)){
|
|
|
- count = mzyReqrecService.queryValidMzyReqrec(patientId, tokenUser.getUserIdCode(), null, beforeDate);
|
|
|
+ count = mzyReqrecService.queryValidMzyReqrec(patientId, tokenUser.getUserIdCode(), null, beforeDate,null);
|
|
|
}else {
|
|
|
- count = mzyReqrecService.queryValidMzyReqrec(patientId, null, deptCode, beforeDate);
|
|
|
+ count = mzyReqrecService.queryValidMzyReqrec(patientId, tokenUser.getUserIdCode(), null, beforeDate,null);
|
|
|
+ if(count <=0 ){
|
|
|
+ List<String> deptNos = userDeptRelationService.queryAllByUserIdCode(tokenUser.getUserIdCode());
|
|
|
+ count = mzyReqrecService.queryValidMzyReqrec(patientId, null, null, beforeDate,deptNos);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (count == null) {
|