提交merge1.3
This commit is contained in:
@@ -43,37 +43,29 @@ public interface IActivityDefinitionService extends IService<ActivityDefinition>
|
||||
|
||||
/**
|
||||
* Desc: 根据 项目id数组 加载 诊疗数据集合
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
*
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @param itemIds
|
||||
* @Author raymond
|
||||
* @Date 12:20 2025/10/18
|
||||
* @return java.util.List<com.openhis.workflow.domain.ActivityDefinition>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<ActivityDto> searchActivityDefinitionByIds(@Param("itemIds") List<Long> itemIds);
|
||||
<<<<<<< HEAD
|
||||
/**
|
||||
* Desc: 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
=======
|
||||
|
||||
/**
|
||||
* Desc: 根据关键字查询 如果关键字为空,查询10条,否则返回查询到的所有
|
||||
*
|
||||
>>>>>>> v1.3
|
||||
*
|
||||
* @param keyWord
|
||||
* @Author raymond
|
||||
* @Date 07:53 2025/10/22
|
||||
* @return java.util.List<com.openhis.medication.dto.AdjustPriceMedListDto>
|
||||
**/
|
||||
*
|
||||
*/
|
||||
List<AdjustPriceMedListDto> searchActivityListByKeyWord(String keyWord);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 查询某一类的服务
|
||||
*
|
||||
*
|
||||
* @param productIdList id集合
|
||||
* @param activityDefCategory 类型
|
||||
* @return 查询结果
|
||||
@@ -89,5 +81,4 @@ public interface IActivityDefinitionService extends IService<ActivityDefinition>
|
||||
*/
|
||||
List<ActivityDefinition> getListByTypeEnum(List<Long> productIdList, Integer typeEnum);
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.openhis.workflow.domain.DeviceRequest;
|
||||
*/
|
||||
public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
|
||||
|
||||
/**
|
||||
* 处理器材发放信息
|
||||
*
|
||||
@@ -37,9 +36,7 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @return 发放id
|
||||
*/
|
||||
Long generateDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
Date plannedDispenseTime);
|
||||
|
||||
/**
|
||||
* 医嘱执行生成耗材发放,状态为已发放
|
||||
@@ -51,12 +48,11 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @return 发放id
|
||||
*/
|
||||
Long generateIssuedDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime);
|
||||
>>>>>>> v1.3
|
||||
Date plannedDispenseTime);
|
||||
|
||||
/**
|
||||
* 删除器材发放信息
|
||||
*
|
||||
*
|
||||
* @param deviceReqId 器材请求id
|
||||
*/
|
||||
void deleteDeviceDispense(Long deviceReqId);
|
||||
@@ -87,7 +83,7 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @param quantity 发药数量
|
||||
*/
|
||||
DeviceDispense createCompletedDeviceDispense(DeviceDispense deviceDispense, Date now, Practitioner loginUser,
|
||||
String step, BigDecimal quantity);
|
||||
String step, BigDecimal quantity);
|
||||
|
||||
/**
|
||||
* 器材发放状态:已发药
|
||||
@@ -143,8 +139,6 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @param medDispenseId 发放id列表
|
||||
*/
|
||||
void updateDispenseStatusSummarized(List<Long> medDispenseId, String busNo);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 通过请求id获取耗材发放信息
|
||||
@@ -153,5 +147,4 @@ public interface IDeviceDispenseService extends IService<DeviceDispense> {
|
||||
* @return 发放信息
|
||||
*/
|
||||
List<DeviceDispense> selectByRequestIdList(List<Long> requestIdList);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
* @param step 执行次数
|
||||
*/
|
||||
ServiceRequest createCompletedServiceRequest(ServiceRequest serviceRequest, Date now, Practitioner loginUser,
|
||||
String step);
|
||||
String step);
|
||||
|
||||
/**
|
||||
* 服务申请状态:已完成
|
||||
@@ -113,13 +113,11 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
|
||||
/**
|
||||
* 查询诊疗对应的服务申请
|
||||
*
|
||||
*
|
||||
* @param activityId 诊疗id
|
||||
* @return 请求信息列表
|
||||
*/
|
||||
List<ServiceRequest> getServiceRequestByActivityId(Long activityId);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 查询诊疗对应的服务申请
|
||||
@@ -128,5 +126,4 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
* @return 请求信息列表
|
||||
*/
|
||||
List<ServiceRequest> getServiceRequestListByEncounterId(Long encounterId);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,7 @@ package com.openhis.workflow.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.medication.dto.AdjustPriceMedListDto;
|
||||
import com.openhis.workflow.dto.ActivityDto;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -33,12 +28,13 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitionMapper, ActivityDefinition>
|
||||
implements IActivityDefinitionService {
|
||||
implements IActivityDefinitionService {
|
||||
|
||||
private final ActivityDefinitionMapper activityDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 增加外来诊疗项目
|
||||
*
|
||||
*
|
||||
* @param activityDefinition 诊疗项目实体
|
||||
* @return
|
||||
*/
|
||||
@@ -46,9 +42,9 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addDiagnosisTreatment(ActivityDefinition activityDefinition) {
|
||||
// 根据诊疗编码判断诊疗项目是否存在
|
||||
List<ActivityDefinition> activityDefinitions =
|
||||
activityDefinitionMapper.selectList(new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo()));
|
||||
List<ActivityDefinition> activityDefinitions
|
||||
= activityDefinitionMapper.selectList(new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -86,8 +82,6 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
return this.activityDefinitionMapper.searchActivityListByKeyWord(keyWord);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@Override
|
||||
public List<ActivityDefinition> getListByIds(List<Long> productIdList, Integer activityDefCategory) {
|
||||
LambdaQueryWrapper<ActivityDefinition> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -95,7 +89,7 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
queryWrapper.eq(ActivityDefinition::getCategoryCode, activityDefCategory);
|
||||
}
|
||||
queryWrapper.in(ActivityDefinition::getId, productIdList).eq(ActivityDefinition::getDeleteFlag,
|
||||
DelFlag.NO.getCode());
|
||||
DelFlag.NO.getCode());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -109,5 +103,4 @@ public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitio
|
||||
DelFlag.NO.getCode());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.openhis.workflow.service.IDeviceDispenseService;
|
||||
*/
|
||||
@Service
|
||||
public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper, DeviceDispense>
|
||||
implements IDeviceDispenseService {
|
||||
implements IDeviceDispenseService {
|
||||
|
||||
@Resource
|
||||
AssignSeqUtil assignSeqUtil;
|
||||
@@ -89,14 +89,6 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
// 设置限制发药时间
|
||||
deviceDispense.setLimitTime(limitTime);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (DbOpType.INSERT.getCode().equals(dbOpType)) {
|
||||
baseMapper.insert(deviceDispense);
|
||||
} else if (DbOpType.UPDATE.getCode().equals(dbOpType)) {
|
||||
baseMapper.update(deviceDispense,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getDeviceReqId, deviceRequest.getId()));
|
||||
}
|
||||
=======
|
||||
baseMapper.insert(deviceDispense);
|
||||
|
||||
// if (DbOpType.INSERT.getCode().equals(dbOpType)) {
|
||||
@@ -105,8 +97,6 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
// baseMapper.update(deviceDispense,
|
||||
// new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getDeviceReqId, deviceRequest.getId()));
|
||||
// }
|
||||
>>>>>>> v1.3
|
||||
|
||||
return deviceDispense.getId();
|
||||
}
|
||||
|
||||
@@ -121,7 +111,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public Long generateDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime) {
|
||||
Date plannedDispenseTime) {
|
||||
DeviceDispense deviceDispense = new DeviceDispense();
|
||||
// 执行id
|
||||
deviceDispense.setProcedureId(procedureId);
|
||||
@@ -190,8 +180,8 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateStopDispenseStatus(List<Long> devDisIdList, Integer refund) {
|
||||
baseMapper.update(
|
||||
new DeviceDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<DeviceDispense>().in(DeviceDispense::getId, devDisIdList));
|
||||
new DeviceDispense().setStatusEnum(DispenseStatus.STOPPED.getValue()).setNotPerformedReasonEnum(refund),
|
||||
new LambdaUpdateWrapper<DeviceDispense>().in(DeviceDispense::getId, devDisIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,8 +193,8 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public List<DeviceDispense> getDevDispenseByProcedureId(List<Long> procedureIdList) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<DeviceDispense>().in(DeviceDispense::getProcedureId, procedureIdList)
|
||||
.eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.selectList(new LambdaQueryWrapper<DeviceDispense>().in(DeviceDispense::getProcedureId, procedureIdList)
|
||||
.eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,7 +208,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public DeviceDispense createCompletedDeviceDispense(DeviceDispense deviceDispense, Date now, Practitioner loginUser,
|
||||
String step, BigDecimal quantity) {
|
||||
String step, BigDecimal quantity) {
|
||||
// 服务请求编码
|
||||
deviceDispense.setBusNo(deviceDispense.getBusNo() + "." + step);
|
||||
// // 请求基于什么
|
||||
@@ -253,10 +243,10 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public boolean completedStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -270,10 +260,10 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public boolean cancelledStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.CANCELLED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.CANCELLED.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -287,10 +277,10 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public boolean inProgressStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.IN_PROGRESS.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
new LambdaUpdateWrapper<DeviceDispense>().eq(DeviceDispense::getId, id)
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.IN_PROGRESS.getValue())
|
||||
.set(DeviceDispense::getPerformerId, loginUser.getId())
|
||||
.set(DeviceDispense::getLocationId, loginUser.getOrgId()).set(DeviceDispense::getDispenseTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -302,9 +292,9 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updatePreparationDispenseStatus(List<Long> deviceRequestIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.in(DeviceDispense::getDeviceReqId, deviceRequestIdList));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.in(DeviceDispense::getDeviceReqId, deviceRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -315,9 +305,9 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateOnHoldDispenseStatus(List<Long> devReqIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.ON_HOLD.getValue())
|
||||
.in(DeviceDispense::getDeviceDefId, devReqIdList));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.ON_HOLD.getValue())
|
||||
.in(DeviceDispense::getDeviceDefId, devReqIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -328,9 +318,9 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> devDispenseId) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
.in(DeviceDispense::getId, devDispenseId));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
.in(DeviceDispense::getId, devDispenseId));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,15 +331,13 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public void updateDispenseStatusSummarized(List<Long> medDispenseId, String busNo) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
// TODO 数据库需要加字段
|
||||
// .set(DeviceDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
// .set(DeviceDispense::getSummaryNo, busNo)
|
||||
.in(DeviceDispense::getId, medDispenseId).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<DeviceDispense>()
|
||||
.set(DeviceDispense::getStatusEnum, DispenseStatus.SUMMARIZED.getValue())
|
||||
// TODO 数据库需要加字段
|
||||
// .set(DeviceDispense::getStatusChangedTime, DateUtils.getNowDate())
|
||||
// .set(DeviceDispense::getSummaryNo, busNo)
|
||||
.in(DeviceDispense::getId, medDispenseId).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 通过请求id获取耗材发放信息
|
||||
@@ -360,7 +348,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
@Override
|
||||
public List<DeviceDispense> selectByRequestIdList(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<DeviceDispense>()
|
||||
.in(DeviceDispense::getDeviceReqId, requestIdList).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.in(DeviceDispense::getDeviceReqId, requestIdList).eq(DeviceDispense::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -374,7 +362,7 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
*/
|
||||
@Override
|
||||
public Long generateIssuedDeviceDispense(DeviceRequest deviceRequest, Long procedureId, Long locationId,
|
||||
Date plannedDispenseTime) {
|
||||
Date plannedDispenseTime) {
|
||||
DeviceDispense deviceDispense = new DeviceDispense();
|
||||
// 执行id
|
||||
deviceDispense.setProcedureId(procedureId);
|
||||
@@ -427,5 +415,4 @@ public class DeviceDispenseServiceImpl extends ServiceImpl<DeviceDispenseMapper,
|
||||
|
||||
return deviceDispense.getId();
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
@@ -8,11 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.Practitioner;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.RequestStatus;
|
||||
import com.openhis.workflow.domain.DeviceRequest;
|
||||
import com.openhis.workflow.mapper.DeviceRequestMapper;
|
||||
@@ -26,7 +22,7 @@ import com.openhis.workflow.service.IDeviceRequestService;
|
||||
*/
|
||||
@Service
|
||||
public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, DeviceRequest>
|
||||
implements IDeviceRequestService {
|
||||
implements IDeviceRequestService {
|
||||
|
||||
/**
|
||||
* 器材请求状态:已完成
|
||||
@@ -37,10 +33,10 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public boolean completedStatusEnum(Long id, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -53,10 +49,10 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public boolean activeStatusEnum(Long id, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
new LambdaUpdateWrapper<DeviceRequest>().eq(DeviceRequest::getId, id)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(DeviceRequest::getPerformerId, loginUser.getId())
|
||||
.set(DeviceRequest::getLocationId, loginUser.getOrgId()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -68,7 +64,7 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public void updateCompletedStatusBatch(List<Long> devRequestIdList) {
|
||||
baseMapper.update(new DeviceRequest().setStatusEnum(RequestStatus.COMPLETED.getValue()),
|
||||
new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devRequestIdList));
|
||||
new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +75,7 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public void updateDraftStatusBatch(List<Long> devReqIdList) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devReqIdList)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.DRAFT.getValue()));
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.DRAFT.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,7 +86,7 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public void updateCancelledStatusBatch(List<Long> devReqIdList) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<DeviceRequest>().in(DeviceRequest::getId, devReqIdList)
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue()));
|
||||
.set(DeviceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,6 +98,6 @@ public class DeviceRequestServiceImpl extends ServiceImpl<DeviceRequestMapper, D
|
||||
@Override
|
||||
public List<DeviceRequest> getDevRequestByDeviceId(Long deviceId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<DeviceRequest>().eq(DeviceRequest::getDeviceDefId, deviceId)
|
||||
.eq(DeviceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(DeviceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.openhis.workflow.service.IInventoryItemService;
|
||||
*/
|
||||
@Service
|
||||
public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, InventoryItem>
|
||||
implements IInventoryItemService {
|
||||
implements IInventoryItemService {
|
||||
|
||||
/**
|
||||
* 入库
|
||||
@@ -52,7 +52,7 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
@Override
|
||||
public Boolean updateInventoryQuantity(Long id, BigDecimal quantity, Date now) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<InventoryItem>().eq(InventoryItem::getId, id)
|
||||
.set(InventoryItem::getUpdateTime, now).set(InventoryItem::getQuantity, quantity));
|
||||
.set(InventoryItem::getUpdateTime, now).set(InventoryItem::getQuantity, quantity));
|
||||
return updateCount > 0;
|
||||
|
||||
}
|
||||
@@ -68,11 +68,11 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryItem> selectInventoryByItemId(Long itemId, String lotNumber, Long locationId,
|
||||
Integer tenantId) {
|
||||
Integer tenantId) {
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper = new LambdaQueryWrapper<InventoryItem>()
|
||||
.eq(InventoryItem::getItemId, itemId).eq(InventoryItem::getLotNumber, lotNumber)
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
.eq(InventoryItem::getItemId, itemId).eq(InventoryItem::getLotNumber, lotNumber)
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
if (locationId != null) {
|
||||
queryWrapper.eq(InventoryItem::getLocationId, locationId);
|
||||
}
|
||||
@@ -89,14 +89,10 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryItem> selectInventoryByItemIdList(List<Long> itemIdList, Integer tenantId) {
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper =
|
||||
new LambdaQueryWrapper<InventoryItem>().in(InventoryItem::getItemId, itemIdList)
|
||||
<<<<<<< HEAD
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getValue())
|
||||
=======
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
>>>>>>> v1.3
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper
|
||||
= new LambdaQueryWrapper<InventoryItem>().in(InventoryItem::getItemId, itemIdList)
|
||||
.eq(InventoryItem::getTenantId, tenantId).eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(InventoryItem::getInventoryStatusEnum, PublicationStatus.ACTIVE.getValue());
|
||||
// 查询取库房信息
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
@@ -108,12 +104,8 @@ public class InventoryItemServiceImpl extends ServiceImpl<InventoryItemMapper, I
|
||||
*/
|
||||
@Override
|
||||
public List<InventoryItem> selectAllInventory() {
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper =
|
||||
<<<<<<< HEAD
|
||||
new LambdaQueryWrapper<InventoryItem>().eq(InventoryItem::getDeleteFlag, DelFlag.NO.getValue());
|
||||
=======
|
||||
new LambdaQueryWrapper<InventoryItem>().eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode());
|
||||
>>>>>>> v1.3
|
||||
LambdaQueryWrapper<InventoryItem> queryWrapper
|
||||
= new LambdaQueryWrapper<InventoryItem>().eq(InventoryItem::getDeleteFlag, DelFlag.NO.getCode());
|
||||
// 查询取库房信息
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.openhis.workflow.service.IServiceRequestService;
|
||||
*/
|
||||
@Service
|
||||
public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper, ServiceRequest>
|
||||
implements IServiceRequestService {
|
||||
implements IServiceRequestService {
|
||||
|
||||
/**
|
||||
* 查询服务申请管理中basedOnId相同的个数
|
||||
@@ -50,8 +50,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateStopRequestStatus(List<Long> serReqIdList) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.STOPPED.getValue()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,9 +62,9 @@ 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()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,8 +75,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public List<ServiceRequest> selectServiceRequestByBasedOnId(Long basedOnId) {
|
||||
return (baseMapper
|
||||
.selectList(new LambdaQueryWrapper<ServiceRequest>().eq(ServiceRequest::getBasedOnId, basedOnId)
|
||||
.eq(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())));
|
||||
.selectList(new LambdaQueryWrapper<ServiceRequest>().eq(ServiceRequest::getBasedOnId, basedOnId)
|
||||
.eq(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
*/
|
||||
@Override
|
||||
public ServiceRequest createCompletedServiceRequest(ServiceRequest serviceRequest, Date now, Practitioner loginUser,
|
||||
String step) {
|
||||
String step) {
|
||||
// 服务请求编码
|
||||
serviceRequest.setBusNo(serviceRequest.getBusNo() + "." + step);
|
||||
// 请求基于什么
|
||||
@@ -124,9 +124,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public boolean completedStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.COMPLETED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -142,10 +142,10 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public boolean updateCancelledStatus(Long serviceReqId, Date now, Long practitionerId, Long orgId) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ServiceRequest>().eq(ServiceRequest::getId, serviceReqId)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, practitionerId).set(ServiceRequest::getOrgId, orgId)
|
||||
.set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
new LambdaUpdateWrapper<ServiceRequest>().eq(ServiceRequest::getId, serviceReqId)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.CANCELLED.getValue())
|
||||
.set(ServiceRequest::getPerformerId, practitionerId).set(ServiceRequest::getOrgId, orgId)
|
||||
.set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -159,9 +159,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public boolean activeStatusEnum(Long id, Date now, Practitioner loginUser) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
.eq(ServiceRequest::getId, id).set(ServiceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(ServiceRequest::getPerformerId, loginUser.getId())
|
||||
.set(ServiceRequest::getLocationId, loginUser.getOrgId()).set(ServiceRequest::getOccurrenceStartTime, now));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -175,9 +175,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.DRAFT.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serviceRequestIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serviceRequestIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,8 +188,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public void updateDraftStatusBatch(List<Long> serReqIdList) {
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<ServiceRequest>().set(ServiceRequest::getStatusEnum, RequestStatus.DRAFT.getValue())
|
||||
.in(ServiceRequest::getId, serReqIdList));
|
||||
new LambdaUpdateWrapper<ServiceRequest>().set(ServiceRequest::getStatusEnum, RequestStatus.DRAFT.getValue())
|
||||
.in(ServiceRequest::getId, serReqIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -223,10 +223,8 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
@Override
|
||||
public List<ServiceRequest> getServiceRequestByActivityId(Long activityId) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getActivityId, activityId).eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(ServiceRequest::getActivityId, activityId).eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/**
|
||||
* 获取执行过的诊疗数据
|
||||
@@ -238,5 +236,4 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getEncounterId, encounterId).eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
import com.core.common.enums.DelFlag;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.DispenseStatus;
|
||||
import com.openhis.common.enums.SupplyType;
|
||||
import com.openhis.workflow.domain.SupplyDelivery;
|
||||
@@ -33,7 +29,7 @@ import com.openhis.workflow.service.ISupplyDeliveryService;
|
||||
*/
|
||||
@Service
|
||||
public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper, SupplyDelivery>
|
||||
implements ISupplyDeliveryService {
|
||||
implements ISupplyDeliveryService {
|
||||
|
||||
/**
|
||||
* 根据单据,发放物品
|
||||
@@ -50,38 +46,38 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
for (SupplyRequest supplyRequest : supplyRequestList) {
|
||||
SupplyDelivery supplyDelivery = new SupplyDelivery();
|
||||
supplyDelivery
|
||||
// 请求id
|
||||
.setRequestId(supplyRequest.getId())
|
||||
// 发放状态:已发放
|
||||
.setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
// 单据类型
|
||||
.setTypeEnum(supplyRequest.getTypeEnum())
|
||||
// 发放项目所在表
|
||||
.setItemTable(supplyRequest.getItemTable())
|
||||
// 发放物品id
|
||||
.setItemId(supplyRequest.getItemId())
|
||||
// 物品单位
|
||||
.setUnitCode(supplyRequest.getUnitCode())
|
||||
// 发放数量
|
||||
.setQuantity(supplyRequest.getItemQuantity())
|
||||
// 批次号
|
||||
.setLotNumber(supplyRequest.getLotNumber())
|
||||
// 追溯码
|
||||
.setTraceNo(supplyRequest.getTraceNo())
|
||||
// 供应商id
|
||||
.setSupplierId(supplyRequest.getSupplierId())
|
||||
// 审批人
|
||||
.setPractitionerId(supplyRequest.getApplicantId())
|
||||
// 发放时间
|
||||
.setOccurrenceTime(now)
|
||||
// 接收位置
|
||||
.setReceiverId(supplyRequest.getPurposeLocationId())
|
||||
// 接收时间
|
||||
.setReceiveTime(now)
|
||||
// 生产日期
|
||||
.setOccurrenceStartTime(supplyRequest.getStartTime())
|
||||
// 失效日期
|
||||
.setOccurrenceEndTime(supplyRequest.getEndTime());
|
||||
// 请求id
|
||||
.setRequestId(supplyRequest.getId())
|
||||
// 发放状态:已发放
|
||||
.setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
// 单据类型
|
||||
.setTypeEnum(supplyRequest.getTypeEnum())
|
||||
// 发放项目所在表
|
||||
.setItemTable(supplyRequest.getItemTable())
|
||||
// 发放物品id
|
||||
.setItemId(supplyRequest.getItemId())
|
||||
// 物品单位
|
||||
.setUnitCode(supplyRequest.getUnitCode())
|
||||
// 发放数量
|
||||
.setQuantity(supplyRequest.getItemQuantity())
|
||||
// 批次号
|
||||
.setLotNumber(supplyRequest.getLotNumber())
|
||||
// 追溯码
|
||||
.setTraceNo(supplyRequest.getTraceNo())
|
||||
// 供应商id
|
||||
.setSupplierId(supplyRequest.getSupplierId())
|
||||
// 审批人
|
||||
.setPractitionerId(supplyRequest.getApplicantId())
|
||||
// 发放时间
|
||||
.setOccurrenceTime(now)
|
||||
// 接收位置
|
||||
.setReceiverId(supplyRequest.getPurposeLocationId())
|
||||
// 接收时间
|
||||
.setReceiveTime(now)
|
||||
// 生产日期
|
||||
.setOccurrenceStartTime(supplyRequest.getStartTime())
|
||||
// 失效日期
|
||||
.setOccurrenceEndTime(supplyRequest.getEndTime());
|
||||
deliveryList.add(supplyDelivery);
|
||||
// 新增发放单据
|
||||
baseMapper.insert(supplyDelivery);
|
||||
@@ -99,7 +95,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
|
||||
// 根据请求id查询发放状态
|
||||
List<SupplyDelivery> deliveryList = baseMapper.selectList(new LambdaQueryWrapper<SupplyDelivery>()
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()).in(SupplyDelivery::getRequestId, supplyReqIdList));
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()).in(SupplyDelivery::getRequestId, supplyReqIdList));
|
||||
if (!deliveryList.isEmpty()) {
|
||||
List<Integer> deliveryStatusList = deliveryList.stream().map(SupplyDelivery::getStatusEnum).toList();
|
||||
return deliveryStatusList.stream().anyMatch(x -> x.equals(DispenseStatus.COMPLETED.getValue()));
|
||||
@@ -115,10 +111,10 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
@Override
|
||||
public void updateCompletedStatusBatch(List<Long> supplyDeliveryIdList) {
|
||||
baseMapper.update(
|
||||
new SupplyDelivery().setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setOccurrenceTime(DateUtils.getNowDate()).setReceiveTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyDelivery>().in(SupplyDelivery::getId, supplyDeliveryIdList));
|
||||
new SupplyDelivery().setStatusEnum(DispenseStatus.COMPLETED.getValue())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setOccurrenceTime(DateUtils.getNowDate()).setReceiveTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyDelivery>().in(SupplyDelivery::getId, supplyDeliveryIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +126,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
@Override
|
||||
public List<SupplyDelivery> selectByIdList(List<Long> deliveryIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyDelivery>().in(SupplyDelivery::getId, deliveryIdList)
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
.eq(SupplyDelivery::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +138,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
@Override
|
||||
public List<SupplyDelivery> selectByRequestIdList(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyDelivery>()
|
||||
.in(SupplyDelivery::getRequestId, requestIdList).eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.in(SupplyDelivery::getRequestId, requestIdList).eq(SupplyDelivery::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,16 +154,12 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
*/
|
||||
@Override
|
||||
public void createSummarySupplyDelivery(Long medicationId, String lotNumber, Long patientId, BigDecimal minQuantity,
|
||||
String minUnitCode, Long receiverId, Long supplyRequestId) {
|
||||
String minUnitCode, Long receiverId, Long supplyRequestId) {
|
||||
baseMapper.insert(new SupplyDelivery().setItemId(medicationId)
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setLotNumber(lotNumber)
|
||||
.setPatientId(patientId).setQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue()).setRequestId(supplyRequestId)
|
||||
<<<<<<< HEAD
|
||||
.setStatusEnum(DispenseStatus.IN_PROGRESS.getValue()).setReceiverId(receiverId));
|
||||
=======
|
||||
.setStatusEnum(DispenseStatus.PREPARATION.getValue()).setReceiverId(receiverId));
|
||||
>>>>>>> v1.3
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION).setLotNumber(lotNumber)
|
||||
.setPatientId(patientId).setQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue()).setRequestId(supplyRequestId)
|
||||
.setStatusEnum(DispenseStatus.PREPARATION.getValue()).setReceiverId(receiverId));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,11 +173,11 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl<SupplyDeliveryMapper,
|
||||
*/
|
||||
@Override
|
||||
public void createDeviceSummarySupplyDelivery(Long deviceId, String lotNumber, BigDecimal minQuantity,
|
||||
String minUnitCode, Long supplyRequestId) {
|
||||
String minUnitCode, Long supplyRequestId) {
|
||||
baseMapper.insert(new SupplyDelivery().setItemId(deviceId)
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setLotNumber(lotNumber)
|
||||
.setQuantity(minQuantity).setUnitCode(minUnitCode).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setRequestId(supplyRequestId).setStatusEnum(DispenseStatus.COMPLETED.getValue()));
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION).setLotNumber(lotNumber)
|
||||
.setQuantity(minQuantity).setUnitCode(minUnitCode).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setRequestId(supplyRequestId).setStatusEnum(DispenseStatus.COMPLETED.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,10 +16,6 @@ import com.core.common.enums.DelFlag;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.common.enums.DelFlag;
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.common.enums.SupplyCategory;
|
||||
import com.openhis.common.enums.SupplyStatus;
|
||||
import com.openhis.common.enums.SupplyType;
|
||||
@@ -42,7 +38,8 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, SupplyRequest>
|
||||
implements ISupplyRequestService {
|
||||
implements ISupplyRequestService {
|
||||
|
||||
@Resource
|
||||
private SupplyRequestMapper supplyRequestMapper;
|
||||
|
||||
@@ -55,8 +52,6 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> getSupplyByBusNo(String busNo) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +63,6 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> getSupplyByBusNoBatch(List<String> busNoList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, busNoList));
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +74,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> getSupplyByOriginalBusNo(String originalBusNo) {
|
||||
return baseMapper
|
||||
.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,10 +88,10 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public List<SupplyRequest> agreeRequest(String busNo, Date now) {
|
||||
// 更新单据状态
|
||||
baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now)
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, now)
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue()));
|
||||
// 返回单据详情
|
||||
return this.getSupplyByBusNo(busNo);
|
||||
}
|
||||
@@ -113,7 +107,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public List<SupplyRequest> addOriginalBusNo(String busNo, String originalBusNo) {
|
||||
// 更新单据状态
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
.set(SupplyRequest::getOriginalBusNo, originalBusNo));
|
||||
// 返回单据详情
|
||||
return this.getSupplyByBusNo(busNo);
|
||||
}
|
||||
@@ -127,7 +121,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean updateByBusNo(String busNo) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>()
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getOriginalBusNo, ""));
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getOriginalBusNo, ""));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -139,9 +133,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public boolean updateStatusEnumByBusNo(String busNo) {
|
||||
int updateCount =
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.EXPIRED_INVALIDATED.getValue()));
|
||||
int updateCount
|
||||
= baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.EXPIRED_INVALIDATED.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -154,9 +148,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean submitApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -169,9 +163,9 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean withdrawApproval(String busNo) {
|
||||
int updateCount = baseMapper.update(null,
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.WITHDRAW.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApplyTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.WITHDRAW.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -184,7 +178,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean removeByBusNo(String busNo) {
|
||||
int updateCount = baseMapper.update(null, new LambdaUpdateWrapper<SupplyRequest>()
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
.eq(SupplyRequest::getBusNo, busNo).set(SupplyRequest::getDeleteFlag, DelFlag.YES.getCode()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -197,10 +191,10 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public boolean rejectRequest(String busNo) {
|
||||
// 更新单据状态
|
||||
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::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
new LambdaUpdateWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo)
|
||||
.set(SupplyRequest::getApprovalTime, DateUtils.getNowDate())
|
||||
.set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.set(SupplyRequest::getStatusEnum, SupplyStatus.REJECT.getValue()));
|
||||
return updateCount > 0;
|
||||
}
|
||||
|
||||
@@ -235,8 +229,8 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public boolean supplyRequestValidation(String busNo) {
|
||||
|
||||
// 根据单据号查询请求状态
|
||||
List<SupplyRequest> requestList =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
List<SupplyRequest> requestList
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getBusNo, busNo));
|
||||
if (!requestList.isEmpty()) {
|
||||
for (SupplyRequest supplyRequest : requestList) {
|
||||
if (SupplyStatus.AGREE.getValue().equals(supplyRequest.getStatusEnum())) {
|
||||
@@ -256,8 +250,8 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public boolean verifyAbleEdit(Long itemId) {
|
||||
return baseMapper.exists(new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getItemId, itemId)
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.in(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue(), SupplyStatus.AGREE.getValue()));
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.in(SupplyRequest::getStatusEnum, SupplyStatus.APPROVAL.getValue(), SupplyStatus.AGREE.getValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,8 +275,8 @@ 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()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().in(SupplyRequest::getId, supplyRequestIdList));
|
||||
.setApproverId(SecurityUtils.getLoginUser().getPractitionerId()).setApprovalTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<SupplyRequest>().in(SupplyRequest::getId, supplyRequestIdList));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -294,7 +288,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<SupplyRequest> selectByIdList(List<Long> requestIdList) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getId, requestIdList)
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -317,13 +311,13 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public Long createSummarySupplyRequest(Long medicationId, Long locationId, String lotNumber, Long patientId,
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
SupplyRequest supplyRequest = new SupplyRequest().setItemId(medicationId).setSourceLocationId(locationId)
|
||||
.setLotNumber(lotNumber).setPatientId(patientId).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
.setLotNumber(lotNumber).setPatientId(patientId).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.setItemTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
baseMapper.insert(supplyRequest);
|
||||
return supplyRequest.getId();
|
||||
}
|
||||
@@ -342,13 +336,13 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
*/
|
||||
@Override
|
||||
public Long createDeviceSummarySupplyRequest(Long deviceId, Long locationId, String lotNumber,
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
BigDecimal minQuantity, String minUnitCode, Long practitionerId, Date now, String busNo) {
|
||||
SupplyRequest supplyRequest = new SupplyRequest().setItemId(deviceId).setSourceLocationId(locationId)
|
||||
.setLotNumber(lotNumber).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
.setLotNumber(lotNumber).setItemQuantity(minQuantity).setUnitCode(minUnitCode)
|
||||
.setApplicantId(practitionerId).setApplyTime(now).setBusNo(busNo)
|
||||
.setStatusEnum(SupplyStatus.SEND.getValue()).setTypeEnum(SupplyType.DEVICE_STOCKTAKING.getValue())
|
||||
.setItemTable(CommonConstants.TableName.ADM_DEVICE_DEFINITION)
|
||||
.setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue());
|
||||
baseMapper.insert(supplyRequest);
|
||||
return supplyRequest.getId();
|
||||
}
|
||||
@@ -402,13 +396,13 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
@Override
|
||||
public List<Long> cancelSummarySupplyRequest(List<String> summaryNoList) {
|
||||
// 查询汇总发药单
|
||||
List<SupplyRequest> supplyRequestList =
|
||||
baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, summaryNoList)
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
List<SupplyRequest> supplyRequestList
|
||||
= baseMapper.selectList(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, summaryNoList)
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue())
|
||||
.eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
// 软删除汇总发药单
|
||||
baseMapper.delete(new LambdaQueryWrapper<SupplyRequest>().in(SupplyRequest::getBusNo, summaryNoList)
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue()));
|
||||
.eq(SupplyRequest::getTypeEnum, SupplyType.SUMMARY_DISPENSE.getValue()));
|
||||
if (supplyRequestList != null && !supplyRequestList.isEmpty()) {
|
||||
return supplyRequestList.stream().map(SupplyRequest::getId).toList();
|
||||
}
|
||||
@@ -419,4 +413,4 @@ public class SupplyRequestServiceImpl extends ServiceImpl<SupplyRequestMapper, S
|
||||
public List<ChangePriceDto> searchGroupDataForBusNo(String busNo) {
|
||||
return this.supplyRequestMapper.searchGroupDataForBusNo(busNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user