|
|
|
|
@@ -7,7 +7,6 @@ import com.core.common.utils.MessageUtils;
|
|
|
|
|
import com.openhis.administration.domain.Location;
|
|
|
|
|
import com.openhis.administration.domain.Organization;
|
|
|
|
|
import com.openhis.administration.domain.OrganizationLocation;
|
|
|
|
|
import com.openhis.workflow.domain.ActivityDefinition;
|
|
|
|
|
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
|
|
|
|
import com.openhis.administration.service.ILocationService;
|
|
|
|
|
import com.openhis.administration.service.IOrganizationLocationService;
|
|
|
|
|
@@ -71,7 +70,6 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|
|
|
|
// 获取科室下拉选列表
|
|
|
|
|
List<Organization> organizationList = organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null);
|
|
|
|
|
List<OrgLocInitDto.departmentOption> organizationOptions = organizationList.stream()
|
|
|
|
|
.filter(organization -> organization != null && organization.getName() != null)
|
|
|
|
|
.map(organization -> new OrgLocInitDto.departmentOption(organization.getId(), organization.getName()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
initDto.setLocationFormOptions(chargeItemStatusOptions).setDepartmentOptions(organizationOptions);
|
|
|
|
|
@@ -133,18 +131,12 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|
|
|
|
@Override
|
|
|
|
|
public R<?> addOrEditOrgLoc(OrgLocQueryDto orgLocQueryDto) {
|
|
|
|
|
|
|
|
|
|
// Validate required fields before processing
|
|
|
|
|
if (orgLocQueryDto.getOrganizationId() == null) {
|
|
|
|
|
return R.fail("请选择执行科室");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OrganizationLocation orgLoc = new OrganizationLocation();
|
|
|
|
|
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
|
|
|
|
|
|
|
|
|
Long activityDefinitionId = orgLoc.getActivityDefinitionId();
|
|
|
|
|
ActivityDefinition activityDef = activityDefinitionId != null
|
|
|
|
|
? activityDefinitionMapper.selectById(activityDefinitionId) : null;
|
|
|
|
|
String activityName = activityDef != null ? activityDef.getName() : "";
|
|
|
|
|
String activityName = activityDefinitionId != null
|
|
|
|
|
? activityDefinitionMapper.selectById(activityDefinitionId).getName() : "";
|
|
|
|
|
|
|
|
|
|
List<OrganizationLocation> organizationLocationList =
|
|
|
|
|
organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getActivityDefinitionId());
|
|
|
|
|
|