|
@@ -154,6 +154,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
|
|
|
@Autowired
|
|
|
SysUserRoleFacade sysUserRoleFacade;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ SysUserFacade sysUserFacade;
|
|
|
@Autowired
|
|
|
QcresultDetailFacade qcresultDetailFacade;
|
|
|
|
|
@@ -2229,8 +2232,35 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", qcRuleWarn.getBehospitalCode())
|
|
|
.eq("cases_entry_id", qcRuleWarn.getCasesEntryId()));
|
|
|
+
|
|
|
+ QcresultInfo qcresultInfo = qcresultInfoFacade.getOne(new QueryWrapper<QcresultInfo>()
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", qcRuleWarn.getBehospitalCode())
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
|
+ if (qcresultInfo == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历未评分!");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取病历信息
|
|
|
+ BehospitalInfo behospitalInfo = this.getOne(new QueryWrapper<BehospitalInfo>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", qcRuleWarn.getBehospitalCode()), false
|
|
|
+ );
|
|
|
+ String doctorId = behospitalInfo.getDoctorId();
|
|
|
+ String userID = "682";
|
|
|
+ if(StringUtil.isNotBlank(doctorId)){
|
|
|
+ SysUser user = sysUserFacade.getOne(new QueryWrapper<SysUser>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("username", doctorId));
|
|
|
+ if(user !=null){
|
|
|
+ userID = user.getId() +"";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (null == qcresultDetail) {
|
|
|
QcresultDetail q = new QcresultDetail();
|
|
|
+ q.setQcresultInfoId(qcresultInfo.getId());
|
|
|
q.setHospitalId(qcRuleWarn.getHospitalId());
|
|
|
q.setBehospitalCode(qcRuleWarn.getBehospitalCode());
|
|
|
q.setCasesId(qcRuleWarn.getCasesId());
|
|
@@ -2245,6 +2275,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
q.setIsDeleted(IsDeleteEnum.Y.getKey());
|
|
|
q.setGmtCreate(new Date());
|
|
|
q.setGmtModified(new Date());
|
|
|
+ q.setModifier(userID);
|
|
|
qcresultDetailServiceImpl.save(q);
|
|
|
} else {
|
|
|
qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
@@ -2255,7 +2286,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
.set("grade_type", 2)
|
|
|
.set("opt_type", 2)
|
|
|
.set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
- .set("gmt_modified", new Date()));
|
|
|
+ .set("gmt_modified", new Date())
|
|
|
+ .set("modifier", userID));
|
|
|
}
|
|
|
qcRuleWarnServiceImpl.update(new UpdateWrapper<QcRuleWarn>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|