增加生成贵阳市局鉴定报告的功能
This commit is contained in:
@@ -24,6 +24,8 @@ public class IdentificationBookDTO {
|
|||||||
private String testOptUser;//检验人
|
private String testOptUser;//检验人
|
||||||
private String testStartDate;//检验开始日期
|
private String testStartDate;//检验开始日期
|
||||||
private String testFinishDate;//检验完成日期
|
private String testFinishDate;//检验完成日期
|
||||||
|
private String materialCharacterDesc;//检材特征描述
|
||||||
|
private String materialIngredient;//鉴定要求
|
||||||
|
|
||||||
// eg:1号检材中未检出四氢大麻酚,检出合成大麻素类物质MDMB-4en-PINACA;
|
// eg:1号检材中未检出四氢大麻酚,检出合成大麻素类物质MDMB-4en-PINACA;
|
||||||
// 2号检材中未检出四氢大麻酚,检出合成大麻素类物质MDMB-4en-PINACA。
|
// 2号检材中未检出四氢大麻酚,检出合成大麻素类物质MDMB-4en-PINACA。
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ public class IdentifyBookDataServiceImpl implements IdentifyBookDataService {
|
|||||||
private TestRecordSampleDataService testRecordSampleDataService;//检验数据
|
private TestRecordSampleDataService testRecordSampleDataService;//检验数据
|
||||||
@Resource
|
@Resource
|
||||||
private TestRecordMethodService testRecordMethodService;//检验方法
|
private TestRecordMethodService testRecordMethodService;//检验方法
|
||||||
|
@Resource
|
||||||
|
private InspectRecordService inspectRecordService;
|
||||||
|
@Resource
|
||||||
|
private TestRecordReagentService testRecordReagentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取完成实验的数据/获取符合制作文书的数据
|
* 获取完成实验的数据/获取符合制作文书的数据
|
||||||
@@ -92,6 +96,11 @@ public class IdentifyBookDataServiceImpl implements IdentifyBookDataService {
|
|||||||
|
|
||||||
//构建文书数据
|
//构建文书数据
|
||||||
private IdentificationBookDTO buildBookDataDetail(String businessId) {
|
private IdentificationBookDTO buildBookDataDetail(String businessId) {
|
||||||
|
|
||||||
|
TestRecord testRecordInfo = testRecordService.lambdaQuery()
|
||||||
|
.eq(TestRecord::getBusinessId, businessId)
|
||||||
|
.one();
|
||||||
|
|
||||||
IdentificationBookDTO bookData = new IdentificationBookDTO();
|
IdentificationBookDTO bookData = new IdentificationBookDTO();
|
||||||
//委托信息
|
//委托信息
|
||||||
EntrustInfo entrustInfo = entrustInfoService.getById(businessId);
|
EntrustInfo entrustInfo = entrustInfoService.getById(businessId);
|
||||||
@@ -101,23 +110,26 @@ public class IdentifyBookDataServiceImpl implements IdentifyBookDataService {
|
|||||||
.eq(SampleInfo::getBusinessId, businessId).orderByAsc(SampleInfo::getAcceptNo));
|
.eq(SampleInfo::getBusinessId, businessId).orderByAsc(SampleInfo::getAcceptNo));
|
||||||
bookData.setSampleInfoList(sampleList);
|
bookData.setSampleInfoList(sampleList);
|
||||||
|
|
||||||
//设置检验结果
|
//设置检材性状描述
|
||||||
List<TestRecordSampleData> testRecordSampleDataList = getTestRecordSampleData(sampleList);//样本溶液对应的数据
|
bookData.setMaterialCharacterDesc(inspectRecordService.buildMaterialCharacterDesc(sampleList));
|
||||||
if (CollUtil.isEmpty(testRecordSampleDataList)) {
|
|
||||||
return null;
|
//设置使用的标准物质和试剂
|
||||||
}
|
List<TestRecordReagent> references = testRecordReagentService.list(Wrappers.<TestRecordReagent>lambdaQuery()
|
||||||
List<TestResult> testResultsList = buildTestResult(testRecordSampleDataList, sampleList);//构建检验结果
|
.in(TestRecordReagent::getId, testRecordInfo.getReagentConsumablesList())
|
||||||
TestRecord testRecordInfo = testRecordService.lambdaQuery()
|
.eq(TestRecordReagent::getCategory, "标准物质"));
|
||||||
.eq(TestRecord::getBusinessId, businessId)
|
|
||||||
.one();
|
//构建检材检出描述
|
||||||
|
bookData.setMaterialIngredient(references.stream()
|
||||||
|
.map(reagent -> reagent.getReagentConsumableName())
|
||||||
|
.collect(Collectors.joining("、")));
|
||||||
|
|
||||||
//实验信息
|
//实验信息
|
||||||
bookData.setTestMethod(getTestMethods(testRecordInfo));//设置用到的实验方法
|
bookData.setTestMethod(getTestMethods(testRecordInfo));//设置用到的实验方法
|
||||||
//设置检验过程
|
//设置检验过程
|
||||||
bookData.setTestProcessDes(testRecordInfo.getTestProcessDes());//设置检验过程
|
bookData.setTestProcessDes(testRecordInfo.getTestProcessDes());//设置检验过程
|
||||||
bookData.setTestResult(testRecordSampleDataService.generateQualitativeResults(businessId));
|
bookData.setTestResult(testRecordSampleDataService.generateQualitativeResults(businessId));
|
||||||
//bookData.setTestResult(buildTestResultDes(testResultsList));//检验结果
|
|
||||||
//检验日期
|
|
||||||
|
|
||||||
|
//检验日期
|
||||||
DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
|
DateTimeFormatter sdf = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
|
||||||
bookData.setTestStartDate(sdf.format(testRecordInfo.getCreateTime()));
|
bookData.setTestStartDate(sdf.format(testRecordInfo.getCreateTime()));
|
||||||
bookData.setTestOptUser(testRecordInfo.getTestUserId());
|
bookData.setTestOptUser(testRecordInfo.getTestUserId());
|
||||||
|
|||||||
Reference in New Issue
Block a user