- ExamApplyController: 使用前端传入的performDeptCode查询科室ID - 优先使用执行科室代码,查询不到时使用当前用户科室 - 两处ServiceRequest创建位置均已修复 【guanyu】
This commit is contained in:
@@ -22,6 +22,8 @@ import com.openhis.common.enums.ChargeItemStatus;
|
||||
import com.openhis.common.enums.GenerateSource;
|
||||
import com.openhis.common.enums.ItemType;
|
||||
import com.openhis.common.enums.RequestStatus;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.web.check.dto.ExamApplyDto;
|
||||
import com.openhis.web.check.dto.ExamApplyItemDto;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
@@ -66,6 +68,8 @@ public class ExamApplyController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
@Autowired
|
||||
private IOrganizationService organizationService;
|
||||
|
||||
/**
|
||||
* 查询检查申请单列表
|
||||
@@ -232,7 +236,16 @@ public class ExamApplyController extends BaseController {
|
||||
}
|
||||
|
||||
serviceRequest.setRequesterId(currentUserId); // 开单医生
|
||||
serviceRequest.setOrgId(currentOrgId); // 执行科室
|
||||
// 53d15f8079d15ba4Ff1a4f1851484f7f7528524d7aef4f20516576846267884c79d15ba44ee37801Ff0c542652194f7f75285f53524d7528623779d15ba4
|
||||
Long performDeptId = currentOrgId;
|
||||
if (dto.getPerformDeptCode() != null && !dto.getPerformDeptCode().isEmpty()) {
|
||||
Organization performDept = organizationService.getOne(
|
||||
new LambdaQueryWrapper<Organization>().eq(Organization::getBusNo, dto.getPerformDeptCode()).last("limit 1"));
|
||||
if (performDept != null) {
|
||||
performDeptId = performDept.getId();
|
||||
}
|
||||
}
|
||||
serviceRequest.setOrgId(performDeptId); // 6267884c79d15ba4
|
||||
serviceRequest.setAuthoredTime(now); // 签发时间
|
||||
// 🔧 Bug Fix: 不设置门诊类型,保留上面已设置的 categoryEnum=3(诊疗类型)
|
||||
// EncounterClass.AMB.getValue()=2 表示门诊类型,会覆盖诊疗类型导致医嘱被错误归类
|
||||
@@ -419,7 +432,16 @@ public class ExamApplyController extends BaseController {
|
||||
serviceRequest.setEncounterId(dto.getEncounterId());
|
||||
}
|
||||
serviceRequest.setRequesterId(currentUserId);
|
||||
serviceRequest.setOrgId(currentOrgId);
|
||||
// 53d15f8079d15ba4Ff1a4f1851484f7f7528524d7aef4f20516576846267884c79d15ba44ee37801Ff0c542652194f7f75285f53524d7528623779d15ba4
|
||||
Long performDeptId2 = currentOrgId;
|
||||
if (dto.getPerformDeptCode() != null && !dto.getPerformDeptCode().isEmpty()) {
|
||||
Organization performDept2 = organizationService.getOne(
|
||||
new LambdaQueryWrapper<Organization>().eq(Organization::getBusNo, dto.getPerformDeptCode()).last("limit 1"));
|
||||
if (performDept2 != null) {
|
||||
performDeptId2 = performDept2.getId();
|
||||
}
|
||||
}
|
||||
serviceRequest.setOrgId(performDeptId2); // 6267884c79d15ba4
|
||||
serviceRequest.setAuthoredTime(now);
|
||||
// 🔧 Bug Fix: 不设置门诊类型,保留上面已设置的 categoryEnum=3(诊疗类型)
|
||||
// EncounterClass.AMB.getValue()=2 表示门诊类型,会覆盖诊疗类型导致医嘱被错误归类
|
||||
|
||||
Reference in New Issue
Block a user