Commit 01d06d41 by ghxdhr

原始记录模板添加字段

parent b8128329
......@@ -646,7 +646,16 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
numSet = sampleVOList.stream().map(vo -> vo.getCode()).collect(Collectors.toSet());
}
/* 通过样品编号拿到所有的采集数据 */
List<LmsOriginalRecordInfo> records = originalRecordInfoService.list(Condition.create().in("sample_num", numSet).eq("contract_code", entrustCode));
if (template.getCollectionType() == null) {
RestAssert.fail("请在对应的原始记录模板中配置采集类型,不采集为无需采集!");
}
List<LmsOriginalRecordInfo> records = new ArrayList<>();
// 采集类型 0-无需采集; 1-文件采集-会带委托编号;2-盒子采集-不带委托编号
if (template.getCollectionType() == 1) {
records = originalRecordInfoService.list(Condition.create().in("sample_num", numSet).eq("contract_code", entrustCode));
} else if (template.getCollectionType() == 2) {
records = originalRecordInfoService.list(Condition.create().in("sample_num", numSet));
}
/* 按照样品编号和项目分开,来存放采集到的数据 record的data */
HashMap<String, List<String>> mapByNumItemName = new HashMap<>();
for (LmsOriginalRecordInfo record : records) {
......
-- ghx
-- ghx
ALTER TABLE "public"."original_template"
ADD COLUMN "collection_type" int2;
COMMENT ON COLUMN "public"."original_template"."collection_type" IS '0-无需采集;1-文件采集-会带委托编号;2-盒子采集-不带委托编号';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment