|
|
@ -13,15 +13,14 @@ import digital.laboratory.platform.common.feign.RemoteTemplate2htmlService; |
|
|
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
|
|
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
|
|
|
import digital.laboratory.platform.imr.dto.InRepositoryDTO; |
|
|
|
import digital.laboratory.platform.imr.dto.InRepositoryDTO; |
|
|
|
import digital.laboratory.platform.imr.entity.*; |
|
|
|
import digital.laboratory.platform.imr.entity.*; |
|
|
|
|
|
|
|
import digital.laboratory.platform.imr.enums.DrugMaterialStatus; |
|
|
|
import digital.laboratory.platform.imr.mapper.DrugMaterialInfoMapper; |
|
|
|
import digital.laboratory.platform.imr.mapper.DrugMaterialInfoMapper; |
|
|
|
import digital.laboratory.platform.imr.mapper.SampleStorageMapper; |
|
|
|
import digital.laboratory.platform.imr.mapper.SampleStorageMapper; |
|
|
|
import digital.laboratory.platform.imr.query.DrugDepotsQuery; |
|
|
|
import digital.laboratory.platform.imr.query.DrugDepotsQuery; |
|
|
|
import digital.laboratory.platform.imr.service.DrugMaterialInfoService; |
|
|
|
import digital.laboratory.platform.imr.service.*; |
|
|
|
import digital.laboratory.platform.imr.service.SampleInboundAndOutboundTableService; |
|
|
|
|
|
|
|
import digital.laboratory.platform.imr.service.SampleInboundRecordService; |
|
|
|
|
|
|
|
import digital.laboratory.platform.imr.service.SampleStorageService; |
|
|
|
|
|
|
|
import digital.laboratory.platform.imr.vo.DrugMaterialInfoVO; |
|
|
|
import digital.laboratory.platform.imr.vo.DrugMaterialInfoVO; |
|
|
|
import digital.laboratory.platform.imr.vo.OutSampleVO; |
|
|
|
import digital.laboratory.platform.imr.vo.OutSampleVO; |
|
|
|
|
|
|
|
import digital.laboratory.platform.sys.entity.Drug; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
@ -55,7 +54,8 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private SampleInboundRecordService sampleInboundRecordService; |
|
|
|
private SampleInboundRecordService sampleInboundRecordService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private CommonFeignService commonFeignService; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 批量生成毒品检材编号 |
|
|
|
* 批量生成毒品检材编号 |
|
|
|
* JC5201010020240001 |
|
|
|
* JC5201010020240001 |
|
|
@ -114,7 +114,13 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<DrugMaterialInfoVO> page(DrugDepotsQuery query) { |
|
|
|
public IPage<DrugMaterialInfoVO> page(DrugDepotsQuery query) { |
|
|
|
return baseMapper.getDrugMaterialVOPage(new Page<>(query.getCurrent(), query.getSize()), query); |
|
|
|
IPage<DrugMaterialInfoVO> drugMaterialVOPage = baseMapper.getDrugMaterialVOPage(new Page<>(query.getCurrent(), query.getSize()), query); |
|
|
|
|
|
|
|
List<DrugMaterialInfoVO> records = drugMaterialVOPage.getRecords(); |
|
|
|
|
|
|
|
records.parallelStream().forEach(record -> { |
|
|
|
|
|
|
|
record.setHandingOverOrgName(commonFeignService.remoteGetSysOrg(record.getHandingOverOrg()).getName()); |
|
|
|
|
|
|
|
record.setStatusName(DrugMaterialStatus.fromStatus(record.getStatus()).getDesc()); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return drugMaterialVOPage; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -123,9 +129,10 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
if (CollUtil.isEmpty(drugMaterialInfoVOList)) { |
|
|
|
if (CollUtil.isEmpty(drugMaterialInfoVOList)) { |
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的毒品检材", id)); |
|
|
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的毒品检材", id)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
DrugMaterialInfoVO drugMaterialInfoVO = drugMaterialInfoVOList.get(0); |
|
|
|
|
|
|
|
drugMaterialInfoVO.setHandingOverOrgName(commonFeignService.remoteGetSysOrg(drugMaterialInfoVO.getHandingOverOrg()).getName()); |
|
|
|
Map<String, Object> data = new HashMap<>(); |
|
|
|
Map<String, Object> data = new HashMap<>(); |
|
|
|
data.put("drugInfo", drugMaterialInfoVOList.get(0)); |
|
|
|
data.put("drugInfo", drugMaterialInfoVO); |
|
|
|
|
|
|
|
|
|
|
|
String templateFileName = "毒品库毒品检材条码模板.vm"; |
|
|
|
String templateFileName = "毒品库毒品检材条码模板.vm"; |
|
|
|
return remoteTemplate2htmlService.getHtml(templateFileName, data); |
|
|
|
return remoteTemplate2htmlService.getHtml(templateFileName, data); |
|
|
@ -144,14 +151,16 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
List<DrugMaterialInfoVO> drugMaterialInfoVOS = baseMapper |
|
|
|
List<DrugMaterialInfoVO> drugMaterialInfoVOS = baseMapper |
|
|
|
.getDrugMaterialVO(Wrappers.<DrugMaterialInfo>query() |
|
|
|
.getDrugMaterialVO(Wrappers.<DrugMaterialInfo>query() |
|
|
|
.in("drug_no", |
|
|
|
.in("drug_no", |
|
|
|
sample.stream().map(InRepositoryDTO::getSampleNo).collect(Collectors.toList()))); |
|
|
|
sample.stream().map(InRepositoryDTO::getSampleNo).collect(Collectors.toList())) |
|
|
|
|
|
|
|
.eq("dm.status", DrugMaterialStatus.ENTER_DRUG_INFO.getStatus())); // 状态为为未入库的
|
|
|
|
Map<String, DrugMaterialInfoVO> drugMaterialInfoVOMap = drugMaterialInfoVOS.stream() |
|
|
|
Map<String, DrugMaterialInfoVO> drugMaterialInfoVOMap = drugMaterialInfoVOS.stream() |
|
|
|
.collect(Collectors.toMap(DrugMaterialInfoVO::getDrugNo, Function.identity())); |
|
|
|
.collect(Collectors.toMap(DrugMaterialInfoVO::getDrugNo, Function.identity())); |
|
|
|
|
|
|
|
// 待操作的毒品检材id列表
|
|
|
|
|
|
|
|
List<String> waitOpDrugIds = drugMaterialInfoVOS.stream().map(DrugMaterialInfoVO::getId).collect(Collectors.toList()); |
|
|
|
Map<String, SampleStorage> sampleStorageMap = sampleStorageMapper |
|
|
|
Map<String, SampleStorage> sampleStorageMap = sampleStorageMapper |
|
|
|
.selectList(Wrappers.<SampleStorage>lambdaQuery() |
|
|
|
.selectList(Wrappers.<SampleStorage>lambdaQuery() |
|
|
|
.in(SampleStorage::getSampleId, |
|
|
|
.in(SampleStorage::getSampleId, |
|
|
|
drugMaterialInfoVOS.stream().map(DrugMaterialInfoVO::getId).collect(Collectors.toList()))) |
|
|
|
waitOpDrugIds)) |
|
|
|
.stream().collect(Collectors.toMap(SampleStorage::getSampleId, Function.identity())); |
|
|
|
.stream().collect(Collectors.toMap(SampleStorage::getSampleId, Function.identity())); |
|
|
|
// 存储需要批量保存的实体信息
|
|
|
|
// 存储需要批量保存的实体信息
|
|
|
|
List<SampleStorage> updateSampleStorageList = new ArrayList<>(); |
|
|
|
List<SampleStorage> updateSampleStorageList = new ArrayList<>(); |
|
|
@ -163,7 +172,8 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
//先通过样本编号查询出这个样本的基本信息(重点是获取到id)
|
|
|
|
//先通过样本编号查询出这个样本的基本信息(重点是获取到id)
|
|
|
|
DrugMaterialInfoVO drugMaterialInfoVO = drugMaterialInfoVOMap.get(dto.getSampleNo()); |
|
|
|
DrugMaterialInfoVO drugMaterialInfoVO = drugMaterialInfoVOMap.get(dto.getSampleNo()); |
|
|
|
if (drugMaterialInfoVO == null) { |
|
|
|
if (drugMaterialInfoVO == null) { |
|
|
|
throw new ValidateCodeException(String.format("毒品检材编号为 %s 的毒品信息不存在请重试!", dto.getSampleNo())); |
|
|
|
// throw new ValidateCodeException(String.format("毒品检材编号为 %s 的毒品信息不存在请重试!", dto.getSampleNo()));
|
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
if (drugMaterialInfoVO.getStatus() != 0) {// 判断检材是否是未入库状态
|
|
|
|
if (drugMaterialInfoVO.getStatus() != 0) {// 判断检材是否是未入库状态
|
|
|
|
throw new ValidateCodeException(String.format("编号为 %s 的样本当前状态不是入库状态!", dto.getSampleNo())); |
|
|
|
throw new ValidateCodeException(String.format("编号为 %s 的样本当前状态不是入库状态!", dto.getSampleNo())); |
|
|
@ -186,48 +196,20 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//新录入仓库样本(添加操作)
|
|
|
|
//新录入仓库样本(添加操作)
|
|
|
|
sampleStorage = new SampleStorage(); |
|
|
|
sampleStorage = getSampleStorage(dlpUser, dto, drugMaterialInfoVO); |
|
|
|
sampleStorage.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
sampleStorage.setStatus(1);//入库待存放
|
|
|
|
|
|
|
|
sampleStorage.setDepositorId(dlpUser.getId());//当前持有人变成入库人
|
|
|
|
|
|
|
|
sampleStorage.setInRepositoryDate(LocalDateTime.now());//入库时间
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//毒品和其他存储时间为长期(100年)
|
|
|
|
|
|
|
|
sampleStorage.setStorageDate(LocalDateTime.now().plusYears(100)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sampleStorage.setSampleId(drugMaterialInfoVO.getId()); //毒品检材id
|
|
|
|
|
|
|
|
sampleStorage.setEarlyWarning(0);//创建默认未到"销毁"
|
|
|
|
|
|
|
|
sampleStorage.setUnit(dto.getUnit());//单位
|
|
|
|
|
|
|
|
sampleStorage.setQuality(dto.getQuality());//入库时的质量
|
|
|
|
|
|
|
|
sampleStorage.setName(drugMaterialInfoVO.getDrugName()); |
|
|
|
|
|
|
|
sampleStorage.setSampleType("A");//样本类型
|
|
|
|
|
|
|
|
//数据存储
|
|
|
|
//数据存储
|
|
|
|
// sampleStorageMapper.insert(sampleStorage);
|
|
|
|
// sampleStorageMapper.insert(sampleStorage);
|
|
|
|
saveSampleStorageList.add(sampleStorage); |
|
|
|
saveSampleStorageList.add(sampleStorage); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//更新出入库登记表(这里因为只有入库,所以就创建部分数据;入库一定是添加数据)
|
|
|
|
//更新出入库登记表(这里因为只有入库,所以就创建部分数据;入库一定是添加数据)
|
|
|
|
SampleInboundAndOutboundTable table = new SampleInboundAndOutboundTable(); |
|
|
|
SampleInboundAndOutboundTable table = getSampleInboundAndOutboundTable(dlpUser, dto, drugMaterialInfoVO); |
|
|
|
table.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
table.setImAdministrators(dlpUser.getId()); |
|
|
|
|
|
|
|
table.setRecipient(dlpUser.getId());//持有人变入库人
|
|
|
|
|
|
|
|
table.setRemarks("检材入库"); |
|
|
|
|
|
|
|
table.setWarehousingDate(LocalDateTime.now());//入库时间
|
|
|
|
|
|
|
|
table.setSampleId(drugMaterialInfoVO.getId()); |
|
|
|
|
|
|
|
table.setInboundSupervisor(dto.getSupervisor());//入库监督人
|
|
|
|
|
|
|
|
// tableMapper.insert(table);
|
|
|
|
// tableMapper.insert(table);
|
|
|
|
saveSampleInboundAndOutboundTableList.add(table); |
|
|
|
saveSampleInboundAndOutboundTableList.add(table); |
|
|
|
//新出入库登记表
|
|
|
|
//新出入库登记表
|
|
|
|
|
|
|
|
|
|
|
|
//入库记录
|
|
|
|
//入库记录
|
|
|
|
SampleInboundRecord record = new SampleInboundRecord(); |
|
|
|
SampleInboundRecord record = getSampleInboundRecord(dlpUser, drugMaterialInfoVO); |
|
|
|
record.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
record.setWarehousingPersonId(dlpUser.getId());//入库人
|
|
|
|
|
|
|
|
record.setWarehousingDate(LocalDateTime.now()); |
|
|
|
|
|
|
|
record.setImAdministrators(dlpUser.getId()); |
|
|
|
|
|
|
|
record.setSampleId(drugMaterialInfoVO.getId()); |
|
|
|
|
|
|
|
record.setName(drugMaterialInfoVO.getDrugName()); |
|
|
|
|
|
|
|
record.setRemarks("检材入库"); |
|
|
|
|
|
|
|
// recordMapper.insert(record);
|
|
|
|
// recordMapper.insert(record);
|
|
|
|
saveSampleInboundRecordList.add(record); |
|
|
|
saveSampleInboundRecordList.add(record); |
|
|
|
|
|
|
|
|
|
|
@ -239,9 +221,12 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
sampleStorageService.saveBatch(saveSampleStorageList); |
|
|
|
sampleStorageService.saveBatch(saveSampleStorageList); |
|
|
|
sampleInboundAndOutboundTableService.saveBatch(saveSampleInboundAndOutboundTableList); |
|
|
|
sampleInboundAndOutboundTableService.saveBatch(saveSampleInboundAndOutboundTableList); |
|
|
|
sampleInboundRecordService.saveBatch(saveSampleInboundRecordList); |
|
|
|
sampleInboundRecordService.saveBatch(saveSampleInboundRecordList); |
|
|
|
|
|
|
|
// 修改当前修改过的毒品状态为待入库
|
|
|
|
|
|
|
|
super.update(Wrappers.<DrugMaterialInfo>lambdaUpdate().in(DrugMaterialInfo::getId, waitOpDrugIds).set(DrugMaterialInfo::getStatus, DrugMaterialStatus.WAIT_INBOUND.getStatus())); |
|
|
|
return sampleVOS; |
|
|
|
return sampleVOS; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 毒品检材封装 |
|
|
|
* 毒品检材封装 |
|
|
|
* @param sampleStorage |
|
|
|
* @param sampleStorage |
|
|
@ -257,6 +242,32 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
return getOutSampleVO(sampleStorage, drugMaterialVOs.get(0)); |
|
|
|
return getOutSampleVO(sampleStorage, drugMaterialVOs.get(0)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 删除毒品检材 |
|
|
|
|
|
|
|
* @param ids |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean delete(List<String> ids) { |
|
|
|
|
|
|
|
if (CollUtil.isEmpty(ids)) { |
|
|
|
|
|
|
|
throw new ValidateCodeException("未选择删除的检材!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<DrugMaterialInfo> drugMaterialInfos = super.list(Wrappers.<DrugMaterialInfo>lambdaQuery().in(DrugMaterialInfo::getId, ids)); |
|
|
|
|
|
|
|
for (DrugMaterialInfo drugMaterialInfo : drugMaterialInfos) { |
|
|
|
|
|
|
|
if (!drugMaterialInfo.getStatus().equals(DrugMaterialStatus.ENTER_DRUG_INFO.getStatus())) { |
|
|
|
|
|
|
|
throw new ValidateCodeException(String.format("检材编号为 %s 的检材不在可删除状态,不能删除!", drugMaterialInfo.getDrugNo())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return super.remove(Wrappers.<DrugMaterialInfo>lambdaQuery().in(DrugMaterialInfo::getId, ids)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据样本存储信息和药物材料信息生成出库样本对象 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param sampleStorage 样本存储信息 |
|
|
|
|
|
|
|
* @param drugMaterialInfoVO 药物材料信息对象 |
|
|
|
|
|
|
|
* @return 出库样本对象 |
|
|
|
|
|
|
|
*/ |
|
|
|
private OutSampleVO getOutSampleVO(SampleStorage sampleStorage, DrugMaterialInfoVO drugMaterialInfoVO) { |
|
|
|
private OutSampleVO getOutSampleVO(SampleStorage sampleStorage, DrugMaterialInfoVO drugMaterialInfoVO) { |
|
|
|
OutSampleVO outSampleVO = new OutSampleVO(); |
|
|
|
OutSampleVO outSampleVO = new OutSampleVO(); |
|
|
|
outSampleVO.setId(sampleStorage.getId()); |
|
|
|
outSampleVO.setId(sampleStorage.getId()); |
|
|
@ -269,6 +280,73 @@ public class DrugMaterialInfoServiceImpl extends ServiceImpl<DrugMaterialInfoMap |
|
|
|
outSampleVO.setSampleStatus(1); |
|
|
|
outSampleVO.setSampleStatus(1); |
|
|
|
return outSampleVO; |
|
|
|
return outSampleVO; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据提供的用户信息、入库DTO和药物材料信息对象获取样本存储对象 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param dlpUser 用户信息对象 |
|
|
|
|
|
|
|
* @param dto 入库DTO |
|
|
|
|
|
|
|
* @param drugMaterialInfoVO 药物材料信息对象 |
|
|
|
|
|
|
|
* @return 样本存储对象 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private SampleStorage getSampleStorage(DLPUser dlpUser, InRepositoryDTO dto, DrugMaterialInfoVO drugMaterialInfoVO) { |
|
|
|
|
|
|
|
SampleStorage sampleStorage; |
|
|
|
|
|
|
|
sampleStorage = new SampleStorage(); |
|
|
|
|
|
|
|
sampleStorage.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
sampleStorage.setStatus(1);//入库待存放
|
|
|
|
|
|
|
|
sampleStorage.setDepositorId(dlpUser.getId());//当前持有人变成入库人
|
|
|
|
|
|
|
|
sampleStorage.setInRepositoryDate(LocalDateTime.now());//入库时间
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//毒品和其他存储时间为长期(100年)
|
|
|
|
|
|
|
|
sampleStorage.setStorageDate(LocalDateTime.now().plusYears(100)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sampleStorage.setSampleId(drugMaterialInfoVO.getId()); //毒品检材id
|
|
|
|
|
|
|
|
sampleStorage.setEarlyWarning(0);//创建默认未到"销毁"
|
|
|
|
|
|
|
|
sampleStorage.setUnit(dto.getUnit());//单位
|
|
|
|
|
|
|
|
sampleStorage.setQuality(dto.getQuality());//入库时的质量
|
|
|
|
|
|
|
|
sampleStorage.setName(drugMaterialInfoVO.getDrugName()); |
|
|
|
|
|
|
|
sampleStorage.setSampleType("A");//样本类型
|
|
|
|
|
|
|
|
return sampleStorage; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据提供的用户信息、入库DTO和药物材料信息对象获取样本入库出库表对象 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param dlpUser 用户信息对象 |
|
|
|
|
|
|
|
* @param dto 入库DTO |
|
|
|
|
|
|
|
* @param drugMaterialInfoVO 药物材料信息对象 |
|
|
|
|
|
|
|
* @return 样本入库出库表对象 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private SampleInboundAndOutboundTable getSampleInboundAndOutboundTable(DLPUser dlpUser, InRepositoryDTO dto, DrugMaterialInfoVO drugMaterialInfoVO) { |
|
|
|
|
|
|
|
SampleInboundAndOutboundTable table = new SampleInboundAndOutboundTable(); |
|
|
|
|
|
|
|
table.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
table.setImAdministrators(dlpUser.getId()); |
|
|
|
|
|
|
|
table.setRecipient(dlpUser.getId());//持有人变入库人
|
|
|
|
|
|
|
|
table.setRemarks("检材入库"); |
|
|
|
|
|
|
|
table.setWarehousingDate(LocalDateTime.now());//入库时间
|
|
|
|
|
|
|
|
table.setSampleId(drugMaterialInfoVO.getId()); |
|
|
|
|
|
|
|
table.setInboundSupervisor(dto.getSupervisor());//入库监督人
|
|
|
|
|
|
|
|
return table; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 根据提供的用户信息和药物材料信息对象获取样本入库记录对象 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param dlpUser 用户信息对象 |
|
|
|
|
|
|
|
* @param drugMaterialInfoVO 药物材料信息对象 |
|
|
|
|
|
|
|
* @return 样本入库记录对象 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private SampleInboundRecord getSampleInboundRecord(DLPUser dlpUser, DrugMaterialInfoVO drugMaterialInfoVO) { |
|
|
|
|
|
|
|
SampleInboundRecord record = new SampleInboundRecord(); |
|
|
|
|
|
|
|
record.setId(IdWorker.get32UUID().toUpperCase()); |
|
|
|
|
|
|
|
record.setWarehousingPersonId(dlpUser.getId());//入库人
|
|
|
|
|
|
|
|
record.setWarehousingDate(LocalDateTime.now()); |
|
|
|
|
|
|
|
record.setImAdministrators(dlpUser.getId()); |
|
|
|
|
|
|
|
record.setSampleId(drugMaterialInfoVO.getId()); |
|
|
|
|
|
|
|
record.setName(drugMaterialInfoVO.getDrugName()); |
|
|
|
|
|
|
|
record.setRemarks("检材入库"); |
|
|
|
|
|
|
|
return record; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|