Merge remote-tracking branch 'origin/develop' into zhaoyun
This commit is contained in:
@@ -21,6 +21,17 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public class SecurityUtils {
|
||||
|
||||
/**
|
||||
* 获取医务人员ID
|
||||
**/
|
||||
public static Long getPractitionerId() {
|
||||
try {
|
||||
return getLoginUser().getPractitionerId();
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("获取医务人员ID异常", HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
**/
|
||||
|
||||
@@ -92,7 +92,7 @@ public class AdjustPriceServiceImpl implements IAdjustPriceService {
|
||||
// 单据号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||
// 当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 根据表单提交的tab 进入不同的 execute
|
||||
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||
@@ -122,7 +122,7 @@ public class AdjustPriceServiceImpl implements IAdjustPriceService {
|
||||
// 单据号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||
// 当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 根据表单提交的tab 进入不同的 execute
|
||||
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||
@@ -156,7 +156,7 @@ public class AdjustPriceServiceImpl implements IAdjustPriceService {
|
||||
@Override
|
||||
public R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||
Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
HashSet<String> searchFields = new HashSet<>();
|
||||
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||
// 构建查询条件
|
||||
|
||||
@@ -77,7 +77,7 @@ public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
|
||||
String todayStr = LocalDate.now().toString(); // yyyy-MM-dd
|
||||
|
||||
// 从 SecurityUtils 获取当前登录医生ID
|
||||
Long currentDoctorId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentDoctorId = SecurityUtils.getPractitionerId();
|
||||
|
||||
if (currentDoctorId != null) {
|
||||
List<DoctorScheduleWithDateDto> list = doctorScheduleMapper.selectTodayMySchedule(todayStr,
|
||||
|
||||
@@ -347,7 +347,7 @@ public class LocationAppServiceImpl implements ILocationAppService {
|
||||
}
|
||||
if (Whether.YES.getCode().equals(isInHospital)) {
|
||||
// 当前登录者的id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
List<Long> locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId);
|
||||
queryWrapper.in(Location::getId, locationIds);
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
@Override
|
||||
public List<SelectableOrgDto> getSelectableOrgList() {
|
||||
// 参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
return practitionerAppAppMapper.getSelectableOrgList(practitionerId);
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
@Override
|
||||
public R<?> switchOrg(Long orgId) {
|
||||
// 参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Practitioner practitioner = new Practitioner();
|
||||
practitioner.setId(practitionerId);
|
||||
practitioner.setOrgId(orgId);
|
||||
|
||||
@@ -82,8 +82,8 @@ public class ChargeItemFormData {
|
||||
this.statusEnum = ChargeItemStatus.PLANNED.getValue();
|
||||
this.contextEnum = ChargeItemContext.REGISTER.getValue();
|
||||
this.occurrenceTime = new Date();
|
||||
this.performerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
this.entererId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
this.performerId = SecurityUtils.getPractitionerId();
|
||||
this.entererId = SecurityUtils.getPractitionerId();
|
||||
this.enteredDate = new Date();
|
||||
this.serviceTable = CommonConstants.TableName.ADM_HEALTHCARE_SERVICE;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class PricingProjectDto {
|
||||
this.statusEnum = RequestStatus.ACTIVE.getValue();
|
||||
this.categoryEnum = EncounterClass.AMB.getValue();
|
||||
this.therapyEnum = TherapyTimeType.TEMPORARY.getValue();
|
||||
this.practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
this.practitionerId = SecurityUtils.getPractitionerId();
|
||||
this.orgId = SecurityUtils.getLoginUser().getOrgId(); // 开方人科室
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ public class ExamApplyController extends BaseController {
|
||||
Integer tenantId = null;
|
||||
String currentUsername = "system";
|
||||
try {
|
||||
currentUserId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
currentUserId = SecurityUtils.getPractitionerId();
|
||||
currentOrgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
currentUsername = SecurityUtils.getUsername();
|
||||
@@ -406,7 +406,7 @@ public class ExamApplyController extends BaseController {
|
||||
Integer tenantId = null;
|
||||
String currentUsername = "system";
|
||||
try {
|
||||
currentUserId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
currentUserId = SecurityUtils.getPractitionerId();
|
||||
currentOrgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
currentUsername = SecurityUtils.getUsername();
|
||||
|
||||
@@ -275,7 +275,7 @@ public class SurgeryAppServiceImpl implements ISurgeryAppService {
|
||||
// 当前登录账号的科室id
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
// 当前参与者ID
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 当前用户ID
|
||||
Long userId = SecurityUtils.getLoginUser().getUserId();
|
||||
// 当前时间
|
||||
|
||||
@@ -129,7 +129,7 @@ public class CommonServiceImpl implements ICommonService {
|
||||
public List<LocationDto> getInventoryPharmacyList() {
|
||||
|
||||
// 用户id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 根据用户id获得管理库房信息
|
||||
List<Long> locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId);
|
||||
|
||||
@@ -192,7 +192,7 @@ public class CommonServiceImpl implements ICommonService {
|
||||
@Override
|
||||
public List<LocationDto> getInventoryCabinetList() {
|
||||
// 用户id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 根据用户id获得管理库房信息
|
||||
List<Long> locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId);
|
||||
|
||||
@@ -465,7 +465,7 @@ public class CommonServiceImpl implements ICommonService {
|
||||
@Override
|
||||
public List<LocationDto> getPractitionerWard() {
|
||||
// 获取当前登录用户信息
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Long currentOrgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
|
||||
log.info("getPractitionerWard - practitionerId: {}, currentOrgId: {}", practitionerId, currentOrgId);
|
||||
|
||||
@@ -308,7 +308,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
|
||||
// 如果前端没有传递申请医生ID,使用当前登录用户
|
||||
if (entity.getRequestingPhysicianId() == null) {
|
||||
entity.setRequestingPhysicianId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
entity.setRequestingPhysicianId(SecurityUtils.getPractitionerId());
|
||||
}
|
||||
|
||||
// 设置邀请对象文本(拼接所有医生名称)
|
||||
@@ -333,7 +333,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
if (Boolean.TRUE.equals(dto.getSubmitFlag())) {
|
||||
entity.setConsultationStatus(ConsultationStatusEnum.SUBMITTED.getCode());
|
||||
entity.setConfirmingPhysician(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
entity.setConfirmingPhysicianId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
entity.setConfirmingPhysicianId(SecurityUtils.getPractitionerId());
|
||||
entity.setConfirmingDate(new Date());
|
||||
} else {
|
||||
entity.setConsultationStatus(ConsultationStatusEnum.NEW.getCode());
|
||||
@@ -414,7 +414,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
|
||||
// 设置提交会诊的医生信息
|
||||
entity.setConfirmingPhysician(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
entity.setConfirmingPhysicianId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
entity.setConfirmingPhysicianId(SecurityUtils.getPractitionerId());
|
||||
entity.setConfirmingDate(new Date());
|
||||
|
||||
consultationRequestMapper.updateById(entity);
|
||||
@@ -731,7 +731,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
public List<ConsultationRequestDto> getMyInvitations() {
|
||||
try {
|
||||
// 获取当前登录医生ID和租户ID
|
||||
Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPhysicianId = SecurityUtils.getPractitionerId();
|
||||
Long tenantId = SecurityUtils.getLoginUser().getTenantId().longValue();
|
||||
|
||||
// 查询邀请我的会诊申请
|
||||
@@ -1266,7 +1266,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
public List<ConsultationConfirmationDto> getPendingConfirmationList() {
|
||||
try {
|
||||
// 获取当前登录医生ID和租户ID
|
||||
Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPhysicianId = SecurityUtils.getPractitionerId();
|
||||
Long tenantId = SecurityUtils.getLoginUser().getTenantId().longValue();
|
||||
log.info("获取待确认会诊列表,当前医生ID: {}", currentPhysicianId);
|
||||
|
||||
@@ -1374,7 +1374,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
}
|
||||
|
||||
// 2. 获取当前登录医生信息
|
||||
Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPhysicianId = SecurityUtils.getPractitionerId();
|
||||
String currentPhysicianName = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
String currentDeptName = dto.getConfirmingDeptName(); // 前端传递
|
||||
|
||||
@@ -1459,7 +1459,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
private void createConfirmationRecord(ConsultationRequest request) {
|
||||
try {
|
||||
// 🎯 获取当前操作的医生信息(最后一个确认的医生)
|
||||
Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPhysicianId = SecurityUtils.getPractitionerId();
|
||||
String currentPhysicianName = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
|
||||
// 查询当前医生的邀请记录(获取科室信息)
|
||||
@@ -1572,7 +1572,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
|
||||
|
||||
// 2. 获取当前登录医生信息
|
||||
Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPhysicianId = SecurityUtils.getPractitionerId();
|
||||
|
||||
// 3. 查询当前医生的邀请记录
|
||||
LambdaQueryWrapper<ConsultationInvited> invitedWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -1651,7 +1651,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
||||
}
|
||||
|
||||
// 2. 获取当前登录医生信息
|
||||
Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPhysicianId = SecurityUtils.getPractitionerId();
|
||||
String currentPhysicianName = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
|
||||
// 3. 查询当前医生的邀请记录
|
||||
|
||||
@@ -1128,7 +1128,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
// 🔧 Bug Fix: 确保practitionerId不为null
|
||||
if (adviceSaveDto.getPractitionerId() == null) {
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
log.info("handMedication - 自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId());
|
||||
}
|
||||
|
||||
@@ -1615,7 +1615,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
// 🔧 Bug Fix: 确保practitionerId不为null
|
||||
if (adviceSaveDto.getPractitionerId() == null) {
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
log.info("自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId());
|
||||
}
|
||||
|
||||
@@ -2065,7 +2065,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
|
||||
// 🔧 Bug Fix: 确保practitionerId不为null
|
||||
if (adviceSaveDto.getPractitionerId() == null) {
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
adviceSaveDto.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
log.info("handService - 自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId());
|
||||
}
|
||||
|
||||
@@ -2308,7 +2308,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
@Override
|
||||
public R<?> getRequestBaseInfo(Long encounterId, Integer generateSourceEnum, String sourceBillNo) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 未指定generateSourceEnum时,默认只查询医生开立的医嘱
|
||||
int sourceEnum = (generateSourceEnum != null) ? generateSourceEnum : GenerateSource.DOCTOR_PRESCRIPTION.getValue();
|
||||
// 医嘱请求数据
|
||||
@@ -2440,7 +2440,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
@Override
|
||||
public R<?> getRequestHistoryInfo(Long patientId, Long encounterId) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 医嘱请求数据
|
||||
List<RequestBaseDto> requestBaseInfo = doctorStationAdviceAppMapper.getRequestBaseInfo(encounterId, patientId,
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
|
||||
@@ -191,7 +191,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
condition.setYbNo(saveDiagnosisChildParam.getYbNo());
|
||||
condition.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||
condition.setRecordedDatetime(new Date());
|
||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
// 设置租户ID,避免数据库约束错误
|
||||
condition.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
// 设置创建人,避免数据库约束错误
|
||||
@@ -287,7 +287,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
condition.setYbNo(saveDiagnosisChildParam.getYbNo());
|
||||
condition.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||
condition.setRecordedDatetime(new Date());
|
||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
// 设置租户ID,避免数据库约束错误
|
||||
condition.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
// 设置创建人,避免数据库约束错误
|
||||
@@ -659,7 +659,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
||||
chargeItem.setEncounterId(encounterId); // 就诊id
|
||||
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
||||
chargeItem.setEntererId(SecurityUtils.getPractitionerId());// 开立人ID
|
||||
chargeItem.setRequestingOrgId(orgId); // 开立科室
|
||||
chargeItem.setEnteredDate(curDate); // 开立时间
|
||||
chargeItem.setProductTable(activityAdviceBaseDto.getAdviceTableName());// 产品所在表
|
||||
@@ -712,7 +712,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
*/
|
||||
public R<?> getTcmRequestBaseInfo(Long encounterId) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 医嘱请求数据
|
||||
List<RequestBaseDto> requestBaseInfo = doctorStationChineseMedicalAppMapper.getTcmRequestBaseInfo(encounterId,
|
||||
null, CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
@@ -739,7 +739,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
@Override
|
||||
public R<?> getTcmRequestHistoryInfo(Long patientId, Long encounterId) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 医嘱请求数据
|
||||
List<RequestBaseDto> requestBaseInfo = doctorStationChineseMedicalAppMapper.getTcmRequestHistoryInfo(
|
||||
encounterId, patientId, CommonConstants.TableName.MED_MEDICATION_REQUEST,
|
||||
|
||||
@@ -232,7 +232,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
||||
condition.setDefinitionId(saveDiagnosisChildParam.getDefinitionId());
|
||||
condition.setYbNo(saveDiagnosisChildParam.getYbNo());
|
||||
condition.setRecordedDatetime(new Date());
|
||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
// 设置租户ID,避免数据库约束错误
|
||||
condition.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
// 设置创建人,避免数据库约束错误
|
||||
@@ -328,7 +328,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
||||
condition.setDefinitionId(saveDiagnosisChildParam.getDefinitionId());
|
||||
condition.setYbNo(saveDiagnosisChildParam.getYbNo());
|
||||
condition.setRecordedDatetime(new Date());
|
||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
|
||||
if(condition.getCreateBy() == null){
|
||||
condition.setCreateBy(username);
|
||||
@@ -435,7 +435,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
||||
this.handleConditionDefinitionMetadata(patientHistoryList);
|
||||
conditionDefinitionBusinessClass.setPatientHistoryList(patientHistoryList);
|
||||
// 医生常用诊断
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); // 当前参与者ID
|
||||
Long practitionerId = SecurityUtils.getPractitionerId(); // 当前参与者ID
|
||||
List<ConditionDefinitionMetadata> doctorCommonUseList =
|
||||
doctorStationDiagnosisAppMapper.getDoctorCommonUseList(PublicationStatus.ACTIVE.getValue(), practitionerId);
|
||||
this.handleConditionDefinitionMetadata(doctorCommonUseList);
|
||||
@@ -631,7 +631,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
||||
log.debug("传染病报告卡数据,DoctorId:{}", infectiousDiseaseReport.getDoctorId());
|
||||
if (infectiousDiseaseReport.getDoctorId() == null) {
|
||||
// 优先使用 practitionerId,如果没有则使用 userId
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
log.debug("传染病报告卡数据,PractitionerId:{}", practitionerId);
|
||||
if (practitionerId != null) {
|
||||
infectiousDiseaseReport.setDoctorId(practitionerId);
|
||||
|
||||
@@ -199,7 +199,7 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
EncounterParticipant encounterParticipant = new EncounterParticipant();
|
||||
encounterParticipant.setEncounterId(encounterId);
|
||||
encounterParticipant.setTypeCode(ParticipantType.ADMITTER.getCode());// 接诊医生
|
||||
encounterParticipant.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
encounterParticipant.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
encounterParticipant.setStatusEnum(EncounterActivityStatus.ACTIVE.getValue()); // 状态
|
||||
encounterParticipant.setTenantId(tenantId);
|
||||
encounterParticipant.setCreateBy(currentUsername);
|
||||
@@ -570,7 +570,7 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
|
||||
// 3. 核心更新:改回待诊+更新missed_time
|
||||
Date now = new Date();
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
int updateCount = encounterMapper.update(null,
|
||||
new LambdaUpdateWrapper<Encounter>()
|
||||
.eq(Encounter::getId, encounterId)
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ReservationRecordAppServiceImpl implements IReservationRecordAppSer
|
||||
if (reservationRecordDto.getPractitionerId() != null) {
|
||||
practitionerId = reservationRecordDto.getPractitionerId();
|
||||
} else {
|
||||
practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
practitionerId = SecurityUtils.getPractitionerId();
|
||||
}
|
||||
|
||||
ReservationRecord reservationRecord = new ReservationRecord();
|
||||
@@ -80,7 +80,7 @@ public class ReservationRecordAppServiceImpl implements IReservationRecordAppSer
|
||||
if (reservationRecordDto.getPractitionerId() != null) {
|
||||
practitionerId = reservationRecordDto.getPractitionerId();
|
||||
} else {
|
||||
practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
practitionerId = SecurityUtils.getPractitionerId();
|
||||
}
|
||||
|
||||
ReservationRecord reservationRecord = new ReservationRecord();
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TodayOutpatientServiceImpl implements ITodayOutpatientService {
|
||||
Long doctorId = SecurityUtils.getLoginUser().getUserId();
|
||||
Long departmentId = SecurityUtils.getLoginUser().getOrgId();
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
String today = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
|
||||
// 获取今日统计信息
|
||||
@@ -146,7 +146,7 @@ public class TodayOutpatientServiceImpl implements ITodayOutpatientService {
|
||||
queryWrapper.apply("enc.start_time::DATE <= CAST({0} AS DATE)", queryDate);
|
||||
|
||||
// 添加医生条件 - 查询当前医生的门诊患者
|
||||
queryWrapper.eq("ep.practitioner_id", SecurityUtils.getLoginUser().getPractitionerId());
|
||||
queryWrapper.eq("ep.practitioner_id", SecurityUtils.getPractitionerId());
|
||||
|
||||
// 添加状态条件
|
||||
if (ObjectUtil.isNotEmpty(statusEnum)) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PendingEmrController {
|
||||
@RequestParam(defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(required = false) String patientName) {
|
||||
if (doctorId == null) {
|
||||
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId();
|
||||
doctorId = com.core.common.utils.SecurityUtils.getPractitionerId();
|
||||
}
|
||||
return iDoctorStationEmrAppService.getPendingEmrList(doctorId, pageNum, pageSize, patientName);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class PendingEmrController {
|
||||
public R<?> getPendingEmrCount(@RequestParam(required = false) Long doctorId,
|
||||
@RequestParam(required = false) String patientName) {
|
||||
if (doctorId == null) {
|
||||
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId();
|
||||
doctorId = com.core.common.utils.SecurityUtils.getPractitionerId();
|
||||
}
|
||||
return iDoctorStationEmrAppService.getPendingEmrCount(doctorId, patientName);
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ public class AdviceSaveDto {
|
||||
this.chineseHerbsDoseQuantity = new BigDecimal("1");
|
||||
// 默认设置为长期医嘱,但前端应该明确传递正确的值
|
||||
this.therapyEnum = TherapyTimeType.LONG_TERM.getValue();
|
||||
this.practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
this.practitionerId = SecurityUtils.getPractitionerId();
|
||||
this.founderOrgId = SecurityUtils.getLoginUser().getOrgId(); // 开方人科室
|
||||
}
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ public class AdviceUtils {
|
||||
serviceRequest.setCategoryEnum(Integer.valueOf(activityAdviceBaseDto.getCategoryCode())); // 请求类型
|
||||
serviceRequest.setActivityId(activityAdviceBaseDto.getAdviceDefinitionId());// 诊疗定义id
|
||||
serviceRequest.setPatientId(activityChildrenJsonParams.getPatientId()); // 患者
|
||||
serviceRequest.setRequesterId(SecurityUtils.getLoginUser().getPractitionerId()); // 开方医生
|
||||
serviceRequest.setRequesterId(SecurityUtils.getPractitionerId()); // 开方医生
|
||||
serviceRequest.setEncounterId(activityChildrenJsonParams.getEncounterId()); // 就诊id
|
||||
serviceRequest.setAuthoredTime(curDate); // 请求签发时间
|
||||
serviceRequest.setOrgId(organizationId); // 执行科室
|
||||
@@ -466,7 +466,7 @@ public class AdviceUtils {
|
||||
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
||||
chargeItem.setEncounterId(activityChildrenJsonParams.getEncounterId()); // 就诊id
|
||||
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
||||
chargeItem.setEntererId(SecurityUtils.getPractitionerId());// 开立人ID
|
||||
chargeItem.setRequestingOrgId(orgId); // 开立科室
|
||||
chargeItem.setEnteredDate(curDate); // 开立时间
|
||||
chargeItem.setServiceTable(CommonConstants.TableName.WOR_SERVICE_REQUEST);// 医疗服务类型
|
||||
|
||||
@@ -5,7 +5,5 @@ import java.util.Map;
|
||||
|
||||
public interface IInfectionDetailAppService {
|
||||
|
||||
Map<String, Object> getInfectionRateByDept(Long deptId);
|
||||
|
||||
List<Map<String, Object>> getInfectionTrend(String startDate, String endDate);
|
||||
}
|
||||
|
||||
@@ -18,43 +18,6 @@ public class InfectionDetailAppServiceImpl implements IInfectionDetailAppService
|
||||
|
||||
private final IHirInfectionCaseService infectionCaseService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getInfectionRateByDept(Long deptId) {
|
||||
LambdaQueryWrapper<HirInfectionCase> wrapper = new LambdaQueryWrapper<>();
|
||||
if (deptId != null) {
|
||||
wrapper.eq(HirInfectionCase::getEncounterId, deptId);
|
||||
}
|
||||
List<HirInfectionCase> cases = infectionCaseService.list(wrapper);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("totalCases", cases.size());
|
||||
|
||||
long confirmed = cases.stream()
|
||||
.filter(c -> "CONFIRMED".equals(c.getStatus()))
|
||||
.count();
|
||||
result.put("confirmedCases", confirmed);
|
||||
|
||||
long reported = cases.stream()
|
||||
.filter(c -> "REPORTED".equals(c.getStatus()))
|
||||
.count();
|
||||
result.put("reportedCases", reported);
|
||||
|
||||
result.put("infectionRate", cases.isEmpty() ? 0 :
|
||||
Math.round(confirmed * 1000.0 / cases.size()) / 10.0);
|
||||
|
||||
Map<String, Long> byType = cases.stream()
|
||||
.filter(c -> c.getInfectionType() != null)
|
||||
.collect(Collectors.groupingBy(HirInfectionCase::getInfectionType, Collectors.counting()));
|
||||
result.put("byType", byType);
|
||||
|
||||
Map<String, Long> bySite = cases.stream()
|
||||
.filter(c -> c.getInfectionSite() != null)
|
||||
.collect(Collectors.groupingBy(HirInfectionCase::getInfectionSite, Collectors.counting()));
|
||||
result.put("bySite", bySite);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getInfectionTrend(String startDate, String endDate) {
|
||||
LambdaQueryWrapper<HirInfectionCase> wrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -21,14 +21,6 @@ public class InfectionDetailController {
|
||||
|
||||
private final IInfectionDetailAppService infectionDetailAppService;
|
||||
|
||||
@Operation(summary = "科室感染率统计")
|
||||
@PreAuthorize("@ss.hasPermi('infection:infection:list')")
|
||||
@GetMapping("/rate-by-dept")
|
||||
public R<Map<String, Object>> getInfectionRateByDept(
|
||||
@RequestParam(value = "deptId", required = false) Long deptId) {
|
||||
return R.ok(infectionDetailAppService.getInfectionRateByDept(deptId));
|
||||
}
|
||||
|
||||
@Operation(summary = "感染趋势统计")
|
||||
@PreAuthorize("@ss.hasPermi('infection:infection:list')")
|
||||
@GetMapping("/trend")
|
||||
|
||||
@@ -173,9 +173,9 @@ public class AdvancePaymentManageAppServiceImpl implements IAdvancePaymentManage
|
||||
payment.setPaymentEnum(paymentEnum); // 付款类别
|
||||
payment.setPaymentReconciliationId(advancePaymentInAndOutDto.getPatientId()); // 付款实体ID
|
||||
payment.setKindEnum(PaymentKind.HOSPITAL_DEPOSIT.getValue()); // 发起支付的工作流程类别-住院存款
|
||||
payment.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()); // 收款员
|
||||
payment.setEntererId(SecurityUtils.getPractitionerId()); // 收款员
|
||||
payment.setPatientId(advancePaymentInAndOutDto.getPatientId()); // 患者ID
|
||||
payment.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); // 请求支付责任人ID
|
||||
payment.setPractitionerId(SecurityUtils.getPractitionerId()); // 请求支付责任人ID
|
||||
payment.setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()); // 付款结果
|
||||
payment.setLocationId(-99L); // 支付位置
|
||||
payment.setExpirationDate(futureTime); // 到期时间
|
||||
|
||||
@@ -96,7 +96,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
@Override
|
||||
public R<?> registerByDoctor(InHospitalRegisterDto inHospitalRegisterDto) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 患者id
|
||||
Long patientId = inHospitalRegisterDto.getPatientId();
|
||||
// 门诊就诊id
|
||||
@@ -135,7 +135,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
zYCondition.setDefinitionId(inHospitalRegisterDto.getDiagnosisDefinitionId()); // 诊断定义Id
|
||||
zYCondition.setYbNo(inHospitalRegisterDto.getDiagnosisYbNo()); // 诊断对应的医保编码
|
||||
zYCondition.setRecordedDatetime(new Date()); // 记录时间
|
||||
zYCondition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
zYCondition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
iConditionService.save(zYCondition);
|
||||
Long conditionId = zYCondition.getId();// 诊断id
|
||||
|
||||
@@ -398,7 +398,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
encounter.setAdmitSourceCode(inHospitalInfoDto.getAdmitSourceCode()); // 入院类型
|
||||
encounter.setInWayCode(inHospitalInfoDto.getInWayCode()); // 入院方式
|
||||
encounter.setStartTime(inHospitalInfoDto.getStartTime()); // 入院日期
|
||||
encounter.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 登记员
|
||||
encounter.setRegistrarId(SecurityUtils.getPractitionerId()); // 登记员
|
||||
iEncounterService.saveOrUpdate(encounter);
|
||||
|
||||
// 更新病区信息
|
||||
@@ -532,7 +532,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
|
||||
// 设置状态为已作废
|
||||
encounter.setStatusEnum(EncounterZyStatus.VOIDED.getValue());
|
||||
encounter.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 作废操作人
|
||||
encounter.setRegistrarId(SecurityUtils.getPractitionerId()); // 作废操作人
|
||||
iEncounterService.saveOrUpdate(encounter);
|
||||
|
||||
// 清理账户记录
|
||||
@@ -591,7 +591,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
encounterReg.setAdmitSourceCode(inHospitalInfoDto.getAdmitSourceCode()); // 入院类型
|
||||
encounterReg.setInWayCode(inHospitalInfoDto.getInWayCode()); // 入院方式
|
||||
encounterReg.setStartTime(inHospitalInfoDto.getStartTime()); // 入院日期
|
||||
encounterReg.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 登记员id
|
||||
encounterReg.setRegistrarId(SecurityUtils.getPractitionerId()); // 登记员id
|
||||
iEncounterService.saveOrUpdate(encounterReg);
|
||||
|
||||
// 先查询当前就诊是否已经分配了病区
|
||||
@@ -654,9 +654,9 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
payment.setPaymentEnum(PaymentType.PAY.getValue()); // 付款类别
|
||||
payment.setPaymentReconciliationId(accountPersonalCash.getPatientId()); // 付款实体ID
|
||||
payment.setKindEnum(PaymentKind.HOSPITAL_DEPOSIT.getValue()); // 发起支付的工作流程类别-住院存款
|
||||
payment.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()); // 收款员
|
||||
payment.setEntererId(SecurityUtils.getPractitionerId()); // 收款员
|
||||
payment.setPatientId(accountPersonalCash.getPatientId()); // 患者ID
|
||||
payment.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); // 请求支付责任人ID
|
||||
payment.setPractitionerId(SecurityUtils.getPractitionerId()); // 请求支付责任人ID
|
||||
payment.setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()); // 付款结果
|
||||
payment.setLocationId(-99L); // 支付位置
|
||||
payment.setExpirationDate(futureTime); // 到期时间
|
||||
@@ -687,7 +687,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
zYCondition.setDefinitionId(inHospitalInfoDto.getDiagnosisDefinitionId()); // 诊断定义Id
|
||||
zYCondition.setYbNo(inHospitalInfoDto.getDiagnosisYbNo()); // 诊断对应的医保编码
|
||||
zYCondition.setRecordedDatetime(new Date()); // 记录时间
|
||||
zYCondition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
zYCondition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
iConditionService.save(zYCondition);
|
||||
Long conditionId = zYCondition.getId();// 诊断id
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
deviceRequestList.add(item);
|
||||
}
|
||||
}
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Date checkDate = new Date();
|
||||
if (!serviceRequestList.isEmpty()) {
|
||||
List<Long> serviceReqIds = serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList();
|
||||
@@ -574,7 +574,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
return R.fail("该药品已由药房发放,请先执行退药处理,不可直接退回");
|
||||
}
|
||||
}
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Date checkDate = new Date();
|
||||
// 从请求中提取退回原因(所有项目共享同一原因)
|
||||
String backReason = performInfoList.stream()
|
||||
@@ -977,7 +977,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
// 参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 长期
|
||||
MedicationRequest longMedicationRequest;
|
||||
ChargeItem chargeItem;
|
||||
@@ -1265,7 +1265,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
// 参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Date clickDate = new Date();
|
||||
|
||||
// 长期
|
||||
|
||||
@@ -74,7 +74,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer
|
||||
@Override
|
||||
public R<?> saveBinding(EncounterAutoRollSaveDto encounterAutoRollSaveDto) {
|
||||
// 当前登录账号参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 当前登录账号科室id
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
||||
Date now = medicineSummaryParamList.get(0).getExecuteTime() != null
|
||||
? medicineSummaryParamList.get(0).getExecuteTime() : DateUtils.getNowDate();
|
||||
// 申请人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 药品发放id
|
||||
List<Long> medDispenseIdList
|
||||
= medicineSummaryParamList.stream().map(MedicineSummaryParam::getDispenseId).toList();
|
||||
|
||||
@@ -205,7 +205,7 @@ public class OrgDeviceStockTakeAppServiceImpl implements IOrgDeviceStockTakeAppS
|
||||
// 申请时间
|
||||
Date now = DateUtils.getNowDate();
|
||||
// 申请人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
|
||||
for (OrgDeviceSummaryParam orgDeviceSummaryParam : orgDeviceSummaryParamList) {
|
||||
// 汇总单据号
|
||||
|
||||
@@ -129,7 +129,7 @@ public class DepositAppServiceImpl implements IDepositAppService {
|
||||
@Override
|
||||
public R<?> savePayment(PaymentDto paymentDto) {
|
||||
// 收款员id
|
||||
Long enterId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long enterId = SecurityUtils.getPractitionerId();
|
||||
|
||||
// 查询就诊信息(获取就诊ID)
|
||||
Encounter encounter = iEncounterService
|
||||
|
||||
@@ -149,7 +149,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<?> saveRecord(NursingRecordDto nursingRecordDto) {
|
||||
// 取得记录人员id
|
||||
Long recorderId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long recorderId = SecurityUtils.getPractitionerId();
|
||||
|
||||
Emr emr = new Emr();
|
||||
// 病历信息
|
||||
@@ -182,7 +182,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<?> updateRecord(NursingRecordDto nursingRecordDto) {
|
||||
// 取得记录人员id
|
||||
Long recordId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long recordId = SecurityUtils.getPractitionerId();
|
||||
|
||||
// 病历(记录单)保存
|
||||
Emr emr = new Emr();
|
||||
@@ -408,7 +408,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<?> batchSaveRecord(BatchNursingRecordDto batchDto) {
|
||||
Long recorderId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long recorderId = SecurityUtils.getPractitionerId();
|
||||
java.util.Map<String, Long> tempIdToRealIdMap = new java.util.HashMap<>();
|
||||
|
||||
// 1. 处理待删除记录 (物理删除记录及体征表对应数据)
|
||||
|
||||
@@ -253,7 +253,7 @@ public class LossReportFormAppServiceImpl implements ILossReportFormAppService {
|
||||
// 单据类型:报损单
|
||||
.setTypeEnum(SupplyType.LOSS_REPORT_FORM.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 制单日期
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
|
||||
@@ -279,7 +279,7 @@ public class ProductStocktakingAppServiceImpl implements IProductStocktakingAppS
|
||||
// 单据类型:商品盘点
|
||||
.setTypeEnum(SupplyType.PRODUCT_STOCKTAKING.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
@@ -388,7 +388,7 @@ public class ProductStocktakingAppServiceImpl implements IProductStocktakingAppS
|
||||
// 单据类型:商品批量盘点
|
||||
.setTypeEnum(SupplyType.PRODUCT_BATCH_STOCKTAKING.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
|
||||
@@ -260,7 +260,7 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
||||
.setId(null)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue())
|
||||
.setTypeEnum(SupplyType.PRODUCT_BATCH_TRANSFER.getValue())
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
.setApplyTime(DateUtils.getNowDate())
|
||||
.setTotalQuantity(productTransferDto.getTotalSourceQuantity());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
@@ -319,7 +319,7 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
||||
supplyRequest
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue())
|
||||
.setTypeEnum(SupplyType.PRODUCT_BATCH_TRANSFER.getValue())
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestService.save(supplyRequest);
|
||||
}
|
||||
@@ -439,7 +439,7 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
||||
// 单据类型:商品调拨
|
||||
.setTypeEnum(SupplyType.PRODUCT_TRANSFER.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
|
||||
@@ -232,7 +232,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
|
||||
// 单据类型:采购入库
|
||||
.setTypeEnum(SupplyType.PURCHASE_INVENTORY.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate())
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ public class PurchaseReturnAppServiceImpl implements IPurchaseReturnAppService {
|
||||
// 单据类型:采购退货
|
||||
.setTypeEnum(SupplyType.PRODUCT_RETURN.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
|
||||
@@ -212,7 +212,7 @@ public class RequisitionIssueAppServiceImpl implements IRequisitionIssueAppServi
|
||||
// 单据类型:领用出库
|
||||
.setTypeEnum(SupplyType.ISSUE_INVENTORY.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
|
||||
@@ -196,7 +196,7 @@ public class ReturnIssueAppServiceImpl implements IReturnIssueAppService {
|
||||
// 单据类型:退货出库
|
||||
.setTypeEnum(SupplyType.RETURN_ISSUE.getValue())
|
||||
// 制单人
|
||||
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApplicantId(SecurityUtils.getPractitionerId())
|
||||
// 申请时间
|
||||
.setApplyTime(DateUtils.getNowDate());
|
||||
supplyRequestList.add(supplyRequest);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ReviewPrescriptionRecordsAppServiceImpl implements IReviewPrescript
|
||||
@Override
|
||||
public R<?> reviewPrescription(ReviewPrescriptionRecordsDto reviewPrescriptionRecordsDto) {
|
||||
// 参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 就诊id
|
||||
Long encounterId = reviewPrescriptionRecordsDto.getEncounterId();
|
||||
// 处方号
|
||||
|
||||
@@ -4,8 +4,4 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IMrStatsDetailAppService {
|
||||
|
||||
Map<String, Object> getMrStatsByDept(Long deptId);
|
||||
|
||||
Map<String, Object> getMrStatsByDoctor(Long doctorId);
|
||||
}
|
||||
|
||||
@@ -1,95 +1,10 @@
|
||||
package com.healthlink.his.web.mrhomepage.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.healthlink.his.mrhomepage.domain.MrHomepage;
|
||||
import com.healthlink.his.mrhomepage.service.IMrHomepageService;
|
||||
import com.healthlink.his.web.mrhomepage.appservice.IMrStatsDetailAppService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MrStatsDetailAppServiceImpl implements IMrStatsDetailAppService {
|
||||
|
||||
private final IMrHomepageService mrHomepageService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getMrStatsByDept(Long deptId) {
|
||||
LambdaQueryWrapper<MrHomepage> wrapper = new LambdaQueryWrapper<>();
|
||||
if (deptId != null) {
|
||||
wrapper.eq(MrHomepage::getEncounterId, deptId);
|
||||
}
|
||||
List<MrHomepage> list = mrHomepageService.list(wrapper);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("totalCount", list.size());
|
||||
|
||||
BigDecimal totalCost = list.stream()
|
||||
.map(MrHomepage::getTotalCost)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
result.put("totalCost", totalCost);
|
||||
|
||||
result.put("avgCost", list.isEmpty() ? BigDecimal.ZERO :
|
||||
totalCost.divide(BigDecimal.valueOf(list.size()), 2, RoundingMode.HALF_UP));
|
||||
|
||||
Map<String, Long> byStatus = list.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
h -> h.getQualityStatus() != null ? h.getQualityStatus() : "UNKNOWN",
|
||||
Collectors.counting()));
|
||||
result.put("byStatus", byStatus);
|
||||
|
||||
Map<String, Long> byDrg = list.stream()
|
||||
.filter(h -> h.getDrgGroup() != null)
|
||||
.collect(Collectors.groupingBy(MrHomepage::getDrgGroup, Collectors.counting()));
|
||||
result.put("byDrg", byDrg);
|
||||
|
||||
long totalLos = list.stream()
|
||||
.mapToInt(h -> h.getLosDays() != null ? h.getLosDays() : 0)
|
||||
.sum();
|
||||
result.put("totalLosDays", totalLos);
|
||||
result.put("avgLosDays", list.isEmpty() ? 0 :
|
||||
Math.round(totalLos * 10.0 / list.size()) / 10.0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getMrStatsByDoctor(Long doctorId) {
|
||||
LambdaQueryWrapper<MrHomepage> wrapper = new LambdaQueryWrapper<>();
|
||||
if (doctorId != null) {
|
||||
wrapper.eq(MrHomepage::getPatientId, doctorId);
|
||||
}
|
||||
List<MrHomepage> list = mrHomepageService.list(wrapper);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("totalCount", list.size());
|
||||
|
||||
BigDecimal totalCost = list.stream()
|
||||
.map(MrHomepage::getTotalCost)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
result.put("totalCost", totalCost);
|
||||
|
||||
result.put("avgCost", list.isEmpty() ? BigDecimal.ZERO :
|
||||
totalCost.divide(BigDecimal.valueOf(list.size()), 2, RoundingMode.HALF_UP));
|
||||
|
||||
Map<String, Long> byStatus = list.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
h -> h.getQualityStatus() != null ? h.getQualityStatus() : "UNKNOWN",
|
||||
Collectors.counting()));
|
||||
result.put("byStatus", byStatus);
|
||||
|
||||
Map<String, Long> byDiagnosis = list.stream()
|
||||
.filter(h -> h.getPrimaryDiagnosisName() != null)
|
||||
.collect(Collectors.groupingBy(MrHomepage::getPrimaryDiagnosisName, Collectors.counting()));
|
||||
result.put("byDiagnosis", byDiagnosis);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
package com.healthlink.his.web.mrhomepage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.healthlink.his.web.mrhomepage.appservice.IMrStatsDetailAppService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Tag(name = "病案统计明细")
|
||||
@RestController
|
||||
@@ -19,20 +15,4 @@ import java.util.Map;
|
||||
public class MrStatsDetailController {
|
||||
|
||||
private final IMrStatsDetailAppService mrStatsDetailAppService;
|
||||
|
||||
@Operation(summary = "科室病案统计")
|
||||
@PreAuthorize("@ss.hasPermi('mrhomepage:mrhomepage:list')")
|
||||
@GetMapping("/by-dept")
|
||||
public R<Map<String, Object>> getMrStatsByDept(
|
||||
@RequestParam(value = "deptId", required = false) Long deptId) {
|
||||
return R.ok(mrStatsDetailAppService.getMrStatsByDept(deptId));
|
||||
}
|
||||
|
||||
@Operation(summary = "医生病案统计")
|
||||
@PreAuthorize("@ss.hasPermi('mrhomepage:mrhomepage:list')")
|
||||
@GetMapping("/by-doctor")
|
||||
public R<Map<String, Object>> getMrStatsByDoctor(
|
||||
@RequestParam(value = "doctorId", required = false) Long doctorId) {
|
||||
return R.ok(mrStatsDetailAppService.getMrStatsByDoctor(doctorId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public class OutpatientInfusionAppServiceImpl implements IOutpatientInfusionAppS
|
||||
// todo:查出对应的耗材并发放
|
||||
|
||||
// 获取执行人,执行科室,当前时间
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
Date now = DateUtils.getNowDate();
|
||||
List<ServiceRequest> serviceRequestList =
|
||||
@@ -244,7 +244,7 @@ public class OutpatientInfusionAppServiceImpl implements IOutpatientInfusionAppS
|
||||
// todo:查出对应的耗材并退回到药房
|
||||
|
||||
// 获取执行人,执行科室,当前时间
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
Date now = DateUtils.getNowDate();
|
||||
// 获取诊疗项目信息
|
||||
|
||||
@@ -370,7 +370,7 @@ public class OutpatientTreatmentAppServiceImpl implements IOutpatientTreatmentAp
|
||||
// 发药时间
|
||||
deviceDispense.setDispenseTime(DateUtils.getNowDate());
|
||||
// 发药人
|
||||
deviceDispense.setPerformerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
deviceDispense.setPerformerId(SecurityUtils.getPractitionerId());
|
||||
// 根据数量设置追溯码
|
||||
deviceDispense.setTraceNo(String.join(CommonConstants.Common.COMMA, Collections
|
||||
.nCopies(deviceDispense.getQuantity().intValue(), CommonConstants.Common.DEV_TRACE_NO)));
|
||||
|
||||
@@ -409,7 +409,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
// 新增支付信息
|
||||
PaymentReconciliation payment = new PaymentReconciliation();
|
||||
payment.setStatusEnum(PaymentStatus.DRAFT.getValue()).setPaymentNo(paymentNo).setYbSettleIds("")
|
||||
.setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getPractitionerId())
|
||||
.setPaymentReconciliationId(prePaymentDto.getPatientId()).setPatientId(prePaymentDto.getPatientId())
|
||||
.setKindEnum(PaymentKind.OUTPATIENT_CLINIC.getValue()).setPractitionerId(prePaymentDto.getEntererId())
|
||||
.setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()).setLocationId(-99l).setExpirationDate(futureTime)
|
||||
@@ -778,7 +778,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
@Override
|
||||
public R<?> cancelPayment(CancelPaymentDto cancelPaymentDto) {
|
||||
// 当前登录用户
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 查找付款实例
|
||||
PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(cancelPaymentDto.getId());
|
||||
if (paymentReconciliation == null) {
|
||||
@@ -1036,7 +1036,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
// SJQ:2025.04.01 确认locationId暂不做处理,location表只记录库房药房信息
|
||||
paymentReconciliation.setId(null).setStatusEnum(PaymentStatus.REFUND_ALL.getValue())
|
||||
.setPaymentEnum(PaymentType.UN_PAY.getValue()).setRelationId(id)
|
||||
.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()).setBillDate(new Date())
|
||||
.setEntererId(SecurityUtils.getPractitionerId()).setBillDate(new Date())
|
||||
.setTenderedAmount(paymentReconciliation.getTenderedAmount().negate())
|
||||
.setReturnedAmount(paymentReconciliation.getReturnedAmount().negate())
|
||||
.setDisplayAmount(paymentReconciliation.getDisplayAmount().negate())
|
||||
@@ -1983,7 +1983,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
calendar.add(Calendar.HOUR_OF_DAY, 24);
|
||||
Date futureTime = calendar.getTime();
|
||||
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
|
||||
// Bug #409:预约签到挂号时,修正 serviceTypeId 为预约类型而非挂号类型
|
||||
// 数据链:Order → ScheduleSlot → SchedulePool → HealthcareService
|
||||
@@ -2230,7 +2230,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
// 保存挂号费
|
||||
chargeItem.setEncounterId(encounterId);
|
||||
chargeItem.setAccountId(accountId);
|
||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
chargeItem.setEntererId(SecurityUtils.getPractitionerId());
|
||||
chargeItem.setQuantityValue(new BigDecimal("1"));
|
||||
iChargeItemService.saveChargeItemByRegister(chargeItem);
|
||||
// 处理诊疗费并返回对应的收费项目id集合用于医保结算
|
||||
@@ -2345,7 +2345,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
serviceRequest.setCategoryEnum(EncounterClass.AMB.getValue()); // 请求类型,默认-门诊
|
||||
serviceRequest.setActivityId(activityAdviceBaseDto.getAdviceDefinitionId());// 诊疗定义id
|
||||
serviceRequest.setPatientId(encounter.getPatientId()); // 患者
|
||||
serviceRequest.setRequesterId(SecurityUtils.getLoginUser().getPractitionerId()); // 开方医生
|
||||
serviceRequest.setRequesterId(SecurityUtils.getPractitionerId()); // 开方医生
|
||||
serviceRequest.setEncounterId(encounter.getId()); // 就诊id
|
||||
serviceRequest.setAuthoredTime(curDate); // 请求签发时间
|
||||
serviceRequest.setOrgId(organizationId); // 执行科室
|
||||
@@ -2360,7 +2360,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
||||
chargeItem.setEncounterId(encounter.getId()); // 就诊id
|
||||
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
||||
chargeItem.setEntererId(SecurityUtils.getPractitionerId());// 开立人ID
|
||||
chargeItem.setEnteredDate(curDate); // 开立时间
|
||||
chargeItem.setServiceTable(CommonConstants.TableName.WOR_SERVICE_REQUEST);// 医疗服务类型
|
||||
chargeItem.setServiceId(serviceRequest.getId()); // 医疗服务ID
|
||||
@@ -3054,10 +3054,10 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
String paymentNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.PAYMENT_NO.getPrefix(), 20);
|
||||
|
||||
payment.setStatusEnum(PaymentStatus.DRAFT.getValue()).setPaymentNo(paymentNo).setYbSettleIds("")
|
||||
.setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getPractitionerId())
|
||||
.setPaymentReconciliationId(chargeItemList.get(0).getPatientId())
|
||||
.setPatientId(chargeItemList.get(0).getPatientId()).setKindEnum(PaymentKind.INPATIENT_CLINIC.getValue())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPractitionerId(SecurityUtils.getPractitionerId())
|
||||
.setOutcomeEnum(PaymentOutcome.COMPLETED.getCode()).setLocationId(-99l).setExpirationDate(futureTime)
|
||||
.setBillDate(setlTime).setPrintCount(0)
|
||||
.setChargeItemIds(chargeItemList.stream().map(ChargeItemBaseInfoDto::getId).map(String::valueOf)
|
||||
@@ -3108,10 +3108,10 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
String paymentNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.PAYMENT_NO.getPrefix(), 20);
|
||||
|
||||
payment.setStatusEnum(PaymentStatus.DRAFT.getValue()).setPaymentNo(paymentNo).setYbSettleIds("")
|
||||
.setPaymentEnum(paymentType.getValue()).setEntererId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPaymentEnum(paymentType.getValue()).setEntererId(SecurityUtils.getPractitionerId())
|
||||
.setPaymentReconciliationId(oldPayment.getPatientId()).setPatientId(oldPayment.getPatientId())
|
||||
.setKindEnum(PaymentKind.HOSPITAL_DEPOSIT.getValue()).setRelationId(oldPayment.getId())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPractitionerId(SecurityUtils.getPractitionerId())
|
||||
.setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()).setLocationId(-99l).setExpirationDate(futureTime)
|
||||
.setBillDate(setlTime).setPrintCount(0).setChargeItemIds(oldPayment.getChargeItemIds())
|
||||
.setTenderedAmount(subtract.multiply(mul)).setDisplayAmount(subtract.multiply(mul))
|
||||
@@ -3150,7 +3150,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
@Override
|
||||
public String nenuBpcPay(NenuBpcPayDto nenuBpcPayDto) {
|
||||
|
||||
Practitioner practitioner = practitionerService.getById(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
Practitioner practitioner = practitionerService.getById(SecurityUtils.getPractitionerId());
|
||||
if (practitioner == null || practitioner.getPosNo() == null) {
|
||||
throw new ServiceException("未配置POS机编号!");
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class IOrderGroupAppServiceImpl implements IOrderGroupAppService {
|
||||
// 新增组套信息
|
||||
orderGroup.setName(orderGroupDto.getName()).setTypeEnum(orderGroupDto.getTypeEnum())
|
||||
.setRangeCode(orderGroupDto.getRangeCode())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPractitionerId(SecurityUtils.getPractitionerId())
|
||||
.setOrgId(SecurityUtils.getLoginUser().getOrgId()).setGroupJson(orderGroupDto.getGroupJson())
|
||||
.setVersionNo(orderGroupDto.getVersionNo());
|
||||
boolean result = orderGroupService.save(orderGroup);
|
||||
@@ -131,7 +131,7 @@ public class IOrderGroupAppServiceImpl implements IOrderGroupAppService {
|
||||
// 修改组套信息
|
||||
orderGroup.setId(orderGroup.getId()).setName(orderGroupDto.getName()).setTypeEnum(orderGroupDto.getTypeEnum())
|
||||
.setRangeCode(orderGroupDto.getRangeCode())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPractitionerId(SecurityUtils.getPractitionerId())
|
||||
.setOrgId(SecurityUtils.getLoginUser().getOrgId()).setGroupJson(orderGroupDto.getGroupJson())
|
||||
.setVersionNo(orderGroupDto.getVersionNo());
|
||||
boolean result = orderGroupService.saveOrUpdate(orderGroup);
|
||||
|
||||
@@ -65,7 +65,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS
|
||||
if (BindingType.PERSONAL.getValue().equals(packageTypeEnum)
|
||||
&& ordersGroupPackageSaveDto.getPractitionerId() == null) {
|
||||
// throw new ServiceException("个人组套需选择人员");
|
||||
ordersGroupPackageSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
ordersGroupPackageSaveDto.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
} else if (BindingType.ORGANIZATION.getValue().equals(packageTypeEnum)
|
||||
&& ordersGroupPackageSaveDto.getOrganizationId() == null) {
|
||||
// throw new ServiceException("科室组套需选择科室");
|
||||
@@ -168,7 +168,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS
|
||||
public OrdersGroupPackageUseDto getGroupPackageForOrder(Long organizationId, Integer tcmFlag) {
|
||||
OrdersGroupPackageUseDto ordersGroupPackageUseDto = new OrdersGroupPackageUseDto();
|
||||
// 当前参参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 当前登录账号的科室id
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturn
|
||||
// 退药时间
|
||||
medicationDispense.setDispenseTime(DateUtils.getNowDate());
|
||||
// 退药人
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
|
||||
// 设置库存变更参数(仅针对实际发过药的药品)
|
||||
if (!noInventoryUpdateMedIds.contains(medicationDispense.getId())) {
|
||||
|
||||
@@ -209,7 +209,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen
|
||||
public R<?> deviceDispense(List<DispenseItemDto> dispenseDeviceList) {
|
||||
// 配药人检查
|
||||
if (dispenseDeviceList.get(0).getPreparerId() == null
|
||||
|| dispenseDeviceList.get(0).getPreparerId().equals(SecurityUtils.getLoginUser().getPractitionerId())) {
|
||||
|| dispenseDeviceList.get(0).getPreparerId().equals(SecurityUtils.getPractitionerId())) {
|
||||
return R.fail("请选择调配药师");
|
||||
}
|
||||
// 获取发药单id列表
|
||||
@@ -292,7 +292,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen
|
||||
// 发药时间
|
||||
deviceDispense.setDispenseTime(DateUtils.getNowDate());
|
||||
// 发药人
|
||||
deviceDispense.setPerformerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
deviceDispense.setPerformerId(SecurityUtils.getPractitionerId());
|
||||
// 配药时间
|
||||
deviceDispense.setPrepareTime(DateUtils.getNowDate());
|
||||
// 配药人
|
||||
|
||||
@@ -277,7 +277,7 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService {
|
||||
// 退药时间
|
||||
medicationDispense.setDispenseTime(DateUtils.getNowDate());
|
||||
// 退药人
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
|
||||
// 设置库存变更参数
|
||||
SupplyItemDetailDto supplyItemDetailDto = new SupplyItemDetailDto();
|
||||
|
||||
@@ -193,7 +193,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe
|
||||
// 发药时间
|
||||
medicationDispense.setDispenseTime(now);
|
||||
// 发药人
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
medicationDispense.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
// 设置库存变更参数
|
||||
supplyItemDetailList.add(new SupplyItemDetailDto().setItemId(medicationDispense.getMedicationId())
|
||||
.setLotNumber(medicationDispense.getLotNumber())
|
||||
@@ -247,7 +247,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe
|
||||
// 发药时间
|
||||
supplyDelivery.setOccurrenceTime(now);
|
||||
// 发药人
|
||||
supplyDelivery.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
supplyDelivery.setPractitionerId(SecurityUtils.getPractitionerId());
|
||||
}
|
||||
supplyDeliveryService.updateBatchById(supplyDeliveryList);
|
||||
// 汇总发放申请更新
|
||||
@@ -255,7 +255,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe
|
||||
// 审核状态:已通过
|
||||
supplyRequest.setStatusEnum(SupplyStatus.AGREE.getValue())
|
||||
// 审核人
|
||||
.setApproverId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setApproverId(SecurityUtils.getPractitionerId())
|
||||
// 审核时间
|
||||
.setApprovalTime(now);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
||||
}
|
||||
// 配药人检查
|
||||
if (dispenseMedicineList.get(0).getPreparerId() == null
|
||||
|| dispenseMedicineList.get(0).getPreparerId().equals(SecurityUtils.getLoginUser().getPractitionerId())) {
|
||||
|| dispenseMedicineList.get(0).getPreparerId().equals(SecurityUtils.getPractitionerId())) {
|
||||
return R.fail("请选择调配药师");
|
||||
}
|
||||
// 获取发药单id列表
|
||||
@@ -426,7 +426,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
||||
// 当前时间
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
// 当前用户id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
|
||||
for (UnDispenseInventoryDto unDispenseInventoryDto : unDispenseInventoryList) {
|
||||
MedicationDispense medicationDispense = new MedicationDispense();
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.healthlink.his.web.quality.appservice.IEmrQualityAppService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
@Service
|
||||
@@ -83,6 +84,7 @@ public class EmrQualityAppServiceImpl implements IEmrQualityAppService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> startDefectRectify(Long defectId) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
EmrDefect defect = defectMapper.selectById(defectId);
|
||||
@@ -99,6 +101,7 @@ public class EmrQualityAppServiceImpl implements IEmrQualityAppService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Object> completeDefectRectify(Long defectId) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
EmrDefect defect = defectMapper.selectById(defectId);
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.healthlink.his.quality.domain.BusinessAnalytics;
|
||||
import com.healthlink.his.quality.service.IBusinessAnalyticsService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -23,6 +24,7 @@ public class QualityBusinessAnalyticsController {
|
||||
private final IBusinessAnalyticsService analyticsService;
|
||||
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@ss.hasPermi('infection:quality:list')")
|
||||
public R<?> getPage(
|
||||
@RequestParam(value = "departmentName", required = false) String deptName,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@@ -34,6 +36,7 @@ public class QualityBusinessAnalyticsController {
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@PreAuthorize("@ss.hasPermi('infection:quality:edit')")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<?> add(@RequestBody BusinessAnalytics analytics) {
|
||||
analytics.setCreateTime(new Date());
|
||||
@@ -42,6 +45,7 @@ public class QualityBusinessAnalyticsController {
|
||||
}
|
||||
|
||||
@GetMapping("/summary")
|
||||
@PreAuthorize("@ss.hasPermi('infection:quality:list')")
|
||||
public R<?> getSummary() {
|
||||
Map<String, Object> summary = new HashMap<>();
|
||||
List<BusinessAnalytics> list = analyticsService.list();
|
||||
|
||||
@@ -117,7 +117,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
queryWrapper.eq(currentUserOrganizationId != null, CommonConstants.FieldName.InHospitalOrgId,
|
||||
currentUserOrganizationId);
|
||||
IPage<RegPatientMainInfoDto> regPatientMainInfo = adviceManageAppMapper.getRegPatientMainInfo(
|
||||
new Page<>(pageNo, pageSize), SecurityUtils.getLoginUser().getPractitionerId(),
|
||||
new Page<>(pageNo, pageSize), SecurityUtils.getPractitionerId(),
|
||||
LocationForm.WARD.getValue(), LocationForm.HOUSE.getValue(), LocationForm.BED.getValue(),
|
||||
EncounterActivityStatus.ACTIVE.getValue(), EncounterClass.IMP.getValue(), Whether.YES.getValue(),
|
||||
AccountType.PERSONAL_CASH_ACCOUNT.getCode(), EncounterZyStatus.TO_BE_REGISTERED.getValue(),
|
||||
@@ -991,7 +991,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
@Override
|
||||
public R<?> getRegRequestBaseInfo(Long encounterId) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 住院医嘱请求数据
|
||||
List<RegRequestBaseDto> regRequestBaseInfo = adviceManageAppMapper.getRegRequestBaseInfo(encounterId, null,
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
@@ -1032,7 +1032,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
@Override
|
||||
public R<?> getRegRequestHistoryInfo(Long patientId, Long encounterId) {
|
||||
// 当前账号的参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 住院医嘱请求数据
|
||||
List<RegRequestBaseDto> regRequestBaseInfo = adviceManageAppMapper.getRegRequestBaseInfo(encounterId, patientId,
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
|
||||
@@ -53,7 +53,7 @@ public class NurseManageServiceImpl implements INurseManageService {
|
||||
public R<?> pricingBusiness(String searchKeyWord) {
|
||||
// TODO 一、基础数据 1、获取 当前护士负责的 病区 和 病区下的患者数据;2、护士点击 患者姓名时,获取患者基础数据(床号,姓名等);
|
||||
// 此处应该提供两个接口,策略模式, 如果从 门诊过来,new 门诊的用户来源,如果从 住院来,那么 new 住院的用户来源;
|
||||
// 获取当前人 SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 获取当前人 SecurityUtils.getPractitionerId();
|
||||
Long practitionerId = 2L;
|
||||
// 获取当前角色的负责的区域id数组
|
||||
List<Long> roleLocationIds = practitionerRoleService.searchPractitionerRoleLocationIds(practitionerId,
|
||||
@@ -112,7 +112,7 @@ public class NurseManageServiceImpl implements INurseManageService {
|
||||
@Override
|
||||
public R<?> medicalDeviceBusiness() {
|
||||
// 获取当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
|
||||
return null;
|
||||
}
|
||||
Long currentPractitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long currentPractitionerId = SecurityUtils.getPractitionerId();
|
||||
Long requesterId = requestForm.getRequesterId();
|
||||
if (currentPractitionerId == null || requesterId == null
|
||||
|| !currentPractitionerId.equals(requesterId)) {
|
||||
@@ -195,7 +195,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
// 当前登录账号的科室id
|
||||
Long orgId = SecurityUtils.getLoginUser().getOrgId();
|
||||
// 当前参与者ID
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 就诊ID
|
||||
Long encounterId = requestFormSaveDto.getEncounterId();
|
||||
// 患者ID
|
||||
|
||||
@@ -127,7 +127,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
@Override
|
||||
public R<?> saveNursingOrders(NursingOrdersSaveDto nursingOrdersSaveDto) {
|
||||
// 当前登录账号参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
// 医嘱开始时间
|
||||
@@ -312,7 +312,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
@Override
|
||||
public R<?> saveTransferOrganizationOrders(TransferOrganizationParam transferOrganizationParam) {
|
||||
// 当前登录账号参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
// 医嘱开始时间
|
||||
@@ -431,7 +431,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
@Override
|
||||
public R<?> saveLeaveHospitalOrders(LeaveHospitalParam leaveHospitalParam) {
|
||||
// 当前登录账号参与者id
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
// 当前时间
|
||||
Date curDate = new Date();
|
||||
// 计划出院时间
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -26,15 +27,15 @@ public class ReportDimensionAppServiceImpl implements IReportDimensionAppService
|
||||
String endDate = filters != null ? filters.get("endDate") : null;
|
||||
|
||||
if (StringUtils.hasText(startDate)) {
|
||||
LocalDate start = LocalDate.parse(startDate);
|
||||
allData = allData.stream()
|
||||
.filter(h -> h.getDischargeDate() != null &&
|
||||
h.getDischargeDate().toString().compareTo(startDate) >= 0)
|
||||
.filter(h -> h.getDischargeDate() != null && !h.getDischargeDate().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate().isBefore(start))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (StringUtils.hasText(endDate)) {
|
||||
LocalDate end = LocalDate.parse(endDate);
|
||||
allData = allData.stream()
|
||||
.filter(h -> h.getDischargeDate() != null &&
|
||||
h.getDischargeDate().toString().compareTo(endDate) <= 0)
|
||||
.filter(h -> h.getDischargeDate() != null && !h.getDischargeDate().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate().isAfter(end))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class HomeController {
|
||||
HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics();
|
||||
|
||||
// 获取待写病历数量
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(practitionerId, null);
|
||||
|
||||
// 将待写病历数量添加到统计数据中
|
||||
|
||||
@@ -713,7 +713,7 @@ public class YbElepBaseServiceImpl implements IYbEleBaseService {
|
||||
break;
|
||||
}
|
||||
|
||||
Practitioner practitioner = iPractitionerService.getById(SecurityUtils.getLoginUser().getPractitionerId());
|
||||
Practitioner practitioner = iPractitionerService.getById(SecurityUtils.getPractitionerId());
|
||||
|
||||
map.put("doctorName", practitioner.getName());
|
||||
map.put("medType", medicalContractName + medicalCareType);
|
||||
|
||||
@@ -1585,7 +1585,7 @@ public class YbServiceImpl implements IYbService {
|
||||
setlinfo.setSetlBegnDate(inpatientReg.getBegntime());
|
||||
setlinfo.setSetlEndDate(inpatientDischarge.getEndtime());
|
||||
//查询当前登陆人信息
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
|
||||
Practitioner practitioner = iPractitionerService.getById(practitionerId);
|
||||
if(practitioner==null){
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
ALTER TABLE clinical_pathway_variance RENAME COLUMN del_flag TO delete_flag;
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE clinical_pathway_variance RENAME COLUMN del_flag TO delete_flag;
|
||||
EXCEPTION WHEN undefined_column THEN
|
||||
RAISE NOTICE 'column del_flag does not exist, skipping rename';
|
||||
END $$;
|
||||
ALTER TABLE clinical_pathway_variance ALTER COLUMN tenant_id SET DATA TYPE BIGINT;
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
ALTER TABLE nursing_assessment RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE nursing_care_plan RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE nursing_handoff RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE critical_value RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE hir_infection_case RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE hir_occupational_exposure RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE antibiotic_class_rule RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE blood_transfusion_record RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE blood_transfusion_observation RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE emr_quality_score RENAME COLUMN del_flag TO delete_flag;
|
||||
ALTER TABLE emr_defect RENAME COLUMN del_flag TO delete_flag;
|
||||
|
||||
ALTER TABLE antibiotic_approval DROP COLUMN IF EXISTS del_flag;
|
||||
|
||||
ALTER TABLE sys_informed_consent RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE sys_informed_consent ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE sys_informed_consent SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE sys_informed_consent ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE sys_informed_consent ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE hir_outbreak_warning RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE hir_outbreak_warning ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE hir_outbreak_warning SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE hir_outbreak_warning ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE hir_outbreak_warning ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE hir_targeted_surveillance RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE hir_targeted_surveillance ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE hir_targeted_surveillance SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE hir_targeted_surveillance ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE hir_targeted_surveillance ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE hir_hand_hygiene RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE hir_hand_hygiene ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE hir_hand_hygiene SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE hir_hand_hygiene ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE hir_hand_hygiene ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE hir_multi_drug_resistant RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE hir_multi_drug_resistant ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE hir_multi_drug_resistant SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE hir_multi_drug_resistant ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE hir_multi_drug_resistant ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE hir_environmental_monitor RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE hir_environmental_monitor ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE hir_environmental_monitor SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE hir_environmental_monitor ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE hir_environmental_monitor ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE mr_borrowing RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE mr_borrowing ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE mr_borrowing SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE mr_borrowing ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE mr_borrowing ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE mr_sealing RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE mr_sealing ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE mr_sealing SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE mr_sealing ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE mr_sealing ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE mr_tracking RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE mr_tracking ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE mr_tracking SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE mr_tracking ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE mr_tracking ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE mr_death_discussion RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE mr_death_discussion ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE mr_death_discussion SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE mr_death_discussion ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE mr_death_discussion ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE nursing_assessment_reminder RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE nursing_assessment_reminder ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE nursing_assessment_reminder SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE nursing_assessment_reminder ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE nursing_assessment_reminder ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE nursing_care_plan DROP COLUMN IF EXISTS is_deleted;
|
||||
|
||||
ALTER TABLE esb_fhir_resource RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE esb_fhir_resource ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE esb_fhir_resource SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE esb_fhir_resource ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE esb_fhir_resource ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE esb_cda_document RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE esb_cda_document ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE esb_cda_document SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE esb_cda_document ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE esb_cda_document ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE esb_code_mapping RENAME COLUMN is_deleted TO delete_flag;
|
||||
ALTER TABLE esb_code_mapping ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE esb_code_mapping SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE esb_code_mapping ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE esb_code_mapping ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE cdss_rule ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE cdss_rule SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE cdss_rule ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE cdss_rule ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
ALTER TABLE cdss_alert ALTER COLUMN delete_flag TYPE VARCHAR(1);
|
||||
UPDATE cdss_alert SET delete_flag = '0' WHERE delete_flag IS NULL;
|
||||
ALTER TABLE cdss_alert ALTER COLUMN delete_flag SET DEFAULT '0';
|
||||
ALTER TABLE cdss_alert ALTER COLUMN delete_flag SET NOT NULL;
|
||||
|
||||
DROP INDEX IF EXISTS idx_cdss_rule_code;
|
||||
CREATE UNIQUE INDEX idx_cdss_rule_code ON cdss_rule(rule_code) WHERE delete_flag = '0';
|
||||
@@ -0,0 +1,32 @@
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE emr_quality_score ADD COLUMN total_score DECIMAL(5,2);
|
||||
ALTER TABLE emr_quality_score ADD COLUMN completeness_score DECIMAL(5,2);
|
||||
ALTER TABLE emr_quality_score ADD COLUMN timeliness_score DECIMAL(5,2);
|
||||
ALTER TABLE emr_quality_score ADD COLUMN accuracy_score DECIMAL(5,2);
|
||||
EXCEPTION WHEN duplicate_column THEN
|
||||
RAISE NOTICE 'emr_quality_score columns already exist';
|
||||
END $$;
|
||||
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE emr_quality_score ALTER COLUMN tenant_id TYPE BIGINT USING tenant_id::BIGINT;
|
||||
EXCEPTION WHEN undefined_column THEN
|
||||
RAISE NOTICE 'emr_quality_score.tenant_id does not exist';
|
||||
END $$;
|
||||
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE sys_esb_message ADD COLUMN delete_flag CHAR(1) DEFAULT '0';
|
||||
EXCEPTION WHEN duplicate_column THEN
|
||||
RAISE NOTICE 'sys_esb_message.delete_flag already exists';
|
||||
END $$;
|
||||
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE sys_esb_service_registry ADD COLUMN delete_flag CHAR(1) DEFAULT '0';
|
||||
EXCEPTION WHEN duplicate_column THEN
|
||||
RAISE NOTICE 'sys_esb_service_registry.delete_flag already exists';
|
||||
END $$;
|
||||
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE sys_esb_service_registry ADD COLUMN tenant_id INTEGER DEFAULT 0;
|
||||
EXCEPTION WHEN duplicate_column THEN
|
||||
RAISE NOTICE 'sys_esb_service_registry.tenant_id already exists';
|
||||
END $$;
|
||||
@@ -184,7 +184,7 @@
|
||||
LEFT JOIN fin_payment_reconciliation T13
|
||||
ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,','))
|
||||
AND T13.delete_flag = '0'
|
||||
AND T13.status_enum = ${paymentStatus}
|
||||
AND T13.status_enum = #{paymentStatus}
|
||||
-- 关联退号记录(当状态为退号时,通过relation_id关联原支付记录)
|
||||
LEFT JOIN fin_payment_reconciliation T14
|
||||
ON T13.id = T14.relation_id
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
)
|
||||
</if>
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
AND (t1.name ILIKE '%' || '${searchKey}' || '%' OR t1.py_str ILIKE '%' || '${searchKey}' || '%')
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
|
||||
AND t1.id IN
|
||||
@@ -190,7 +190,7 @@
|
||||
WHERE t1.delete_flag = '0'
|
||||
AND t1.status_enum = #{statusEnum}
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
AND (t1.name ILIKE '%' || '${searchKey}' || '%' OR t1.py_str ILIKE '%' || '${searchKey}' || '%')
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
<if test="categoryCode != null and categoryCode != ''">
|
||||
AND t1.category_code = #{categoryCode}
|
||||
@@ -287,7 +287,7 @@
|
||||
AND T1.category_code != '手术' AND T1.category_code != '24'
|
||||
</if>
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
AND (t1.name ILIKE '%' || '${searchKey}' || '%' OR t1.py_str ILIKE '%' || '${searchKey}' || '%')
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
<if test="categoryCode != null and categoryCode != ''">
|
||||
AND t1.category_code = #{categoryCode}
|
||||
@@ -380,7 +380,7 @@
|
||||
</if>
|
||||
AND T1.inventory_status_enum = #{status}
|
||||
AND T1.expiration_date > NOW()
|
||||
AND T1.item_table IN ( ${SqlCondition} )
|
||||
AND T1.item_table IN ('med_medication_definition', 'adm_device_definition')
|
||||
order by T1.expiration_date
|
||||
</select>
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
LEFT JOIN fin_payment_reconciliation T13
|
||||
ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,','))
|
||||
AND T13.delete_flag = '0'
|
||||
AND T13.status_enum = ${paymentStatus}
|
||||
AND T13.status_enum = #{paymentStatus}
|
||||
LEFT JOIN adm_invoice AS ai
|
||||
ON ai.reconciliation_id = T13.id AND ai.delete_flag = '0'
|
||||
LEFT JOIN order_main AS om ON T1.order_id = om.id AND om.delete_flag = '0'
|
||||
|
||||
@@ -87,7 +87,7 @@ public class ChangePriceRecordServiceImpl extends ServiceImpl<ChangePriceRecordM
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ChangePriceRecord>().eq(ChangePriceRecord::getBusNo, busNo)
|
||||
.set(ChangePriceRecord::getApprovalTime, now)
|
||||
.set(ChangePriceRecord::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(ChangePriceRecord::getApproverId, SecurityUtils.getPractitionerId())
|
||||
.set(ChangePriceRecord::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ChangePriceRecordServiceImpl extends ServiceImpl<ChangePriceRecordM
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ChangePriceRecord>().eq(ChangePriceRecord::getBusNo, busNo)
|
||||
.set(ChangePriceRecord::getApprovalTime, DateUtils.getNowDate())
|
||||
.set(ChangePriceRecord::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(ChangePriceRecord::getApproverId, SecurityUtils.getPractitionerId())
|
||||
.set(ChangePriceRecord::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class ChargeItemServiceImpl extends ServiceImpl<ChargeItemMapper, ChargeI
|
||||
int updatedRows = baseMapper.update(
|
||||
new ChargeItem()
|
||||
.setStatusEnum(value)
|
||||
.setPerformerId(SecurityUtils.getLoginUser().getPractitionerId()),
|
||||
.setPerformerId(SecurityUtils.getPractitionerId()),
|
||||
new LambdaUpdateWrapper<ChargeItem>()
|
||||
.eq(ChargeItem::getId, chargeItemId)
|
||||
.eq(ChargeItem::getStatusEnum, currentChargeItem.getStatusEnum()) // 使用当前状态作为条件
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ConditionServiceImpl extends ServiceImpl<ConditionMapper, Condition
|
||||
@Override
|
||||
public Long saveConditionByDoctor(Condition condition) {
|
||||
condition.setRecordedDatetime(new Date());
|
||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||
condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人
|
||||
if (condition.getId() == null) {
|
||||
baseMapper.insert(condition);
|
||||
} else {
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ProcedurePerformerServiceImpl extends ServiceImpl<ProcedurePerforme
|
||||
|
||||
@Override
|
||||
public boolean addPerformRecord(Long procedureId, Date now) {
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long practitionerId = SecurityUtils.getPractitionerId();
|
||||
ProcedurePerformer procedurePerformer = new ProcedurePerformer();
|
||||
procedurePerformer
|
||||
// 执行记录id
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateCompleteRequestStatus(List<Long> serReqIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.COMPLETED.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
.setPerformerCheckId(SecurityUtils.getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateCheckVerifiedStatus(List<Long> serReqIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.CHECK_VERIFIED.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
.setPerformerCheckId(SecurityUtils.getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
@@ -200,7 +200,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
public void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate, String backReason) {
|
||||
ServiceRequest updateEntity = new ServiceRequest()
|
||||
.setStatusEnum(RequestStatus.DRAFT.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPerformerCheckId(SecurityUtils.getPractitionerId())
|
||||
.setCheckTime(DateUtils.getNowDate());
|
||||
if (backReason != null && !backReason.isEmpty()) {
|
||||
updateEntity.setReasonText(backReason);
|
||||
|
||||
@@ -111,7 +111,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
public void updateCompletedStatusBatch(List<Long> supplyDeliveryIdList) {
|
||||
baseMapper.update(
|
||||
new SupplyDelivery().setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setPractitionerId(SecurityUtils.getPractitionerId())
|
||||
.setOccurrenceTime(DateUtils.getNowDate()).setReceiveTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyDelivery>().in(SupplyDelivery::getId, supplyDeliveryIdList));
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now)
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
// 返回单据详情
|
||||
return this.getSupplyByBusNo(busNo);
|
||||
@@ -190,7 +190,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public void updateCompletedStatusBatch(List<Long> supplyRequestIdList) {
|
||||
baseMapper.update(new SupplyRequest().setStatusEnum(SupplyStatus.AGREE.getValue())
|
||||
.setApproverId(SecurityUtils.getLoginUser().getPractitionerId()).setApprovalTime(DateUtils.getNowDate()),
|
||||
.setApproverId(SecurityUtils.getPractitionerId()).setApprovalTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().in(SupplyRequest::getId, supplyRequestIdList));
|
||||
}
|
||||
|
||||
|
||||
@@ -1116,7 +1116,7 @@ public class YbDao {
|
||||
FinancialApplyRecord financialApplyRecord = new FinancialApplyRecord();
|
||||
BeanUtils.copyProperties(financial3203AParam, financialApplyRecord);
|
||||
financialApplyRecord.setParam(JsonUtils.toJson(financial3203AParam)).setOutResult(s)
|
||||
.setPraId(SecurityUtils.getLoginUser().getPractitionerId()).setStatus("0");
|
||||
.setPraId(SecurityUtils.getPractitionerId()).setStatus("0");
|
||||
iFinancialApplyRecordService.save(financialApplyRecord);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +83,7 @@
|
||||
</div>
|
||||
<div
|
||||
class="detail-content"
|
||||
v-html="currentNotice.noticeContent"
|
||||
/>
|
||||
>{{ safeContent }}</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailVisible = false">
|
||||
@@ -106,6 +105,10 @@ const detailVisible = ref(false)
|
||||
const noticeList = ref([])
|
||||
const currentNotice = ref({})
|
||||
const readNoticeIds = ref(new Set())
|
||||
const safeContent = computed(() => {
|
||||
const content = currentNotice.value && currentNotice.value.noticeContent
|
||||
return content ? String(content).replace(/<[^>]*>/g, '') : ''
|
||||
})
|
||||
|
||||
// 打开公告/通知面板
|
||||
function open() {
|
||||
|
||||
@@ -112,8 +112,7 @@
|
||||
<el-divider />
|
||||
<div
|
||||
class="notice-detail-body"
|
||||
v-html="activeNotice.noticeContent"
|
||||
/>
|
||||
>{{ safeContent }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 未选择状态 -->
|
||||
@@ -156,6 +155,10 @@ const activeNotice = computed(() => {
|
||||
const unreadCount = computed(() => {
|
||||
return noticeList.value.filter(n => !n.isRead).length
|
||||
})
|
||||
const safeContent = computed(() => {
|
||||
const content = activeNotice.value && activeNotice.value.noticeContent
|
||||
return content ? String(content).replace(/<[^>]*>/g, '') : ''
|
||||
})
|
||||
|
||||
// 获取公告类型图标
|
||||
// noticeType: 1=通知, 2=公告
|
||||
|
||||
@@ -91,8 +91,7 @@
|
||||
<el-divider />
|
||||
<div
|
||||
class="notice-detail-body"
|
||||
v-html="activeNotice.noticeContent"
|
||||
/>
|
||||
>{{ safeContent }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 空状态 -->
|
||||
@@ -166,6 +165,10 @@ const unreadCount = computed(() => {
|
||||
const hasUnread = computed(() => {
|
||||
return unreadCount.value > 0
|
||||
})
|
||||
const safeContent = computed(() => {
|
||||
const content = activeNotice.value && activeNotice.value.noticeContent
|
||||
return content ? String(content).replace(/<[^>]*>/g, '') : ''
|
||||
})
|
||||
|
||||
// 获取公告类型图标
|
||||
// noticeType: 1=通知, 2=公告
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<el-dialog
|
||||
:model-value="props.openPrescription"
|
||||
:title="dialogTitle"
|
||||
@@ -580,7 +580,7 @@
|
||||
|
||||
<script setup>
|
||||
// import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import {reactive, ref} from 'vue';
|
||||
import {getCurrentInstance, reactive, ref} from 'vue';
|
||||
// import { useModal, useDict } from '@/hooks';
|
||||
import {formatNumber, parseTime} from '@/utils/his';
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user