Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0a035204e | ||
|
|
349b0453c8 | ||
|
|
3ddd74d679 | ||
|
|
9829843b3e | ||
|
|
0d95cc1341 | ||
|
|
1dfceeaf46 | ||
|
|
1b79df4f93 | ||
|
|
f62a280dfc | ||
|
|
e5d949a740 |
@@ -147,8 +147,8 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
for (OrganizationLocation organizationLocation : organizationLocationList)
|
for (OrganizationLocation organizationLocation : organizationLocationList)
|
||||||
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
||||||
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
||||||
Organization org = organizationService.getById(organizationLocation.getOrganizationId());
|
String organizationName =
|
||||||
String organizationName = org != null ? org.getName() : "未知科室";
|
organizationService.getById(organizationLocation.getOrganizationId()).getName();
|
||||||
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
||||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -511,6 +511,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
// 签发操作
|
// 签发操作
|
||||||
boolean is_sign = AdviceOpType.SIGN_ADVICE.getCode().equals(adviceOpType);
|
boolean is_sign = AdviceOpType.SIGN_ADVICE.getCode().equals(adviceOpType);
|
||||||
|
|
||||||
|
// 收集已处理的requestId,用于批量更新状态
|
||||||
|
List<Long> processedRequestIds = new ArrayList<>();
|
||||||
|
|
||||||
// 声明长期医嘱诊疗请求
|
// 声明长期医嘱诊疗请求
|
||||||
ServiceRequest longServiceRequest;
|
ServiceRequest longServiceRequest;
|
||||||
// 新增 + 修改 (长期医嘱)
|
// 新增 + 修改 (长期医嘱)
|
||||||
@@ -555,6 +558,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
iServiceRequestService.saveOrUpdate(longServiceRequest);
|
iServiceRequestService.saveOrUpdate(longServiceRequest);
|
||||||
|
if (longServiceRequest.getId() != null) {
|
||||||
|
processedRequestIds.add(longServiceRequest.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 声明临时医嘱诊疗请求
|
// 声明临时医嘱诊疗请求
|
||||||
@@ -603,6 +609,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
iServiceRequestService.saveOrUpdate(tempServiceRequest);
|
iServiceRequestService.saveOrUpdate(tempServiceRequest);
|
||||||
|
if (tempServiceRequest.getId() != null) {
|
||||||
|
processedRequestIds.add(tempServiceRequest.getId());
|
||||||
|
}
|
||||||
|
|
||||||
// 保存时,保存诊疗费用项
|
// 保存时,保存诊疗费用项
|
||||||
if (is_save) {
|
if (is_save) {
|
||||||
@@ -654,6 +663,14 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量更新诊疗医嘱状态(使用 update 确保状态字段必定更新)
|
||||||
|
if (!processedRequestIds.isEmpty()) {
|
||||||
|
iServiceRequestService.update(null,
|
||||||
|
new LambdaUpdateWrapper<ServiceRequest>()
|
||||||
|
.set(ServiceRequest::getStatusEnum,
|
||||||
|
is_save ? RequestStatus.DRAFT.getValue() : RequestStatus.ACTIVE.getValue())
|
||||||
|
.in(ServiceRequest::getId, processedRequestIds));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -132,10 +132,6 @@ function onCancel() {
|
|||||||
|
|
||||||
// 批量添加
|
// 批量添加
|
||||||
async function onConfirm() {
|
async function onConfirm() {
|
||||||
if (!props.organizationId) {
|
|
||||||
proxy.$message.error('请先在左侧选择科室');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.value.validate(async (valid) => {
|
formEl.value.validate(async (valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
|
|||||||
@@ -366,10 +366,6 @@ function handleBlur(row, index) {
|
|||||||
|
|
||||||
// 编辑或 保存当前行
|
// 编辑或 保存当前行
|
||||||
function openSaveImplementDepartment(row) {
|
function openSaveImplementDepartment(row) {
|
||||||
if (!organizationId.value) {
|
|
||||||
proxy.$message.error('请先在左侧选择科室');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const params = {
|
const params = {
|
||||||
// 科室id
|
// 科室id
|
||||||
organizationId: organizationId.value,
|
organizationId: organizationId.value,
|
||||||
@@ -456,12 +452,13 @@ function handleNodeClick(res, node) {
|
|||||||
|
|
||||||
// 实际的节点点击处理逻辑
|
// 实际的节点点击处理逻辑
|
||||||
function continueHandleNodeClick(node) {
|
function continueHandleNodeClick(node) {
|
||||||
// 检查节点是否有子节点
|
|
||||||
if (node.data.children && node.data.children.length > 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 新增按钮是否 disable
|
// 新增按钮是否 disable
|
||||||
isAddDisable.value = false;
|
isAddDisable.value = false;
|
||||||
|
// 检查节点是否有子节点
|
||||||
|
if (node.data.children && node.data.children.length > 0) {
|
||||||
|
// proxy.$message.warning("不能选择父节点");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 选中科室id
|
// 选中科室id
|
||||||
organizationId.value = node.data.id;
|
organizationId.value = node.data.id;
|
||||||
// 获取 右侧 table 信息
|
// 获取 右侧 table 信息
|
||||||
|
|||||||
Reference in New Issue
Block a user