初始化贵阳禁毒检验鉴定
This commit is contained in:
47
dlp-drugtesting-api/pom.xml
Normal file
47
dlp-drugtesting-api/pom.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
<artifactId>dlp-drugtesting</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</parent>
|
||||
<artifactId>dlp-drugtesting-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>dlp-drugtesting-api</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--接口文档-->
|
||||
<dependency>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
<artifactId>dlp-common-swagger</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</dependency>
|
||||
<!--断路器依赖-->
|
||||
<dependency>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
<artifactId>dlp-common-feign</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</dependency>
|
||||
<!--mybatis 模块-->
|
||||
<dependency>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
<artifactId>dlp-common-mybatis</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>digital.laboratory.platform</groupId>
|
||||
<artifactId>dlp-admin-api</artifactId>
|
||||
<version>2022.10.11-snapshots</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,59 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/*
|
||||
*@title EntrustInfo
|
||||
*@description
|
||||
*@author xy
|
||||
*@version 1.0
|
||||
*@create 2023/12/7 14:58
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "b_entrustInfo", autoResultMap = true)
|
||||
@ApiModel(value = "委托信息", description = "委托信息")
|
||||
public class EntrustInfo extends BaseEntity {
|
||||
private String id;
|
||||
private String businessType;//业务类型
|
||||
private String caseName;//案件名称
|
||||
private String caseBrief;//案情简要
|
||||
private String entrustNo;//委托编号
|
||||
private String entrustDepartment;//委托单位
|
||||
private String identityDepartment;//鉴定单位
|
||||
private String acceptNo;//受理编号
|
||||
private LocalDateTime acceptDate;//受理日期
|
||||
private String deliver1Name;//送检人姓名
|
||||
private String deliver1Phone;//送检人电话
|
||||
private String deliver1Position;//送检人职务
|
||||
private String deliver1Cert;//证件类型
|
||||
private String deliver1No;//证件号码
|
||||
private String deliver2Name;//送检人姓名
|
||||
private String deliver2Phone;//送检人电话
|
||||
private String deliver2Position;//送检人职务
|
||||
private String deliver2Cert;//证件类型
|
||||
private String deliver2No;//证件号码
|
||||
private Integer source;//数据来源
|
||||
private String materialType;//检材类别(缴获物和生物样本)
|
||||
private String entrustRequirement;//鉴定要求,从检材中的鉴定要求提取组合而成 eg:对检材中四氢大麻酚进行定性定量分析,对合成大麻素类物质进行定性分析。
|
||||
private Integer status;//0:未分配 1:已分配 2:实验中 3:鉴定完毕
|
||||
private String reportReceiveMode; // 文书领取方式
|
||||
private String postAddress; // 邮寄地址
|
||||
private String synEntrustId;//送检受理系统中的委托ID
|
||||
@TableField(exist = false)
|
||||
private String businessTypeName;
|
||||
@TableField(exist = false)
|
||||
private Boolean isDistribution;//是否被分配
|
||||
|
||||
@ApiModelProperty(value="检材数量")
|
||||
@TableField(exist = false)
|
||||
private Integer materialNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @title IdentificationBookDTO 提供给文书系统的数据格式
|
||||
* @description
|
||||
* @create 2024/3/11 10:12
|
||||
*/
|
||||
@Data
|
||||
public class IdentificationBookDTO {
|
||||
private EntrustInfo entrustInfo;//委托信息
|
||||
private List<SampleInfo> sampleInfoList;//对应的检材
|
||||
private String testMethod;//检验方法
|
||||
private String testProcessDes;//检验过程
|
||||
private String testResult;//检验结果
|
||||
private String testOptUser;//检验人
|
||||
private String testStartDate;//检验开始日期
|
||||
private String testFinishDate;//检验完成日期
|
||||
|
||||
// eg:1号检材中未检出四氢大麻酚,检出合成大麻素类物质MDMB-4en-PINACA;
|
||||
// 2号检材中未检出四氢大麻酚,检出合成大麻素类物质MDMB-4en-PINACA。
|
||||
|
||||
private static String getNumberByMaterialNo(String materialNo){
|
||||
Pattern pattern = Pattern.compile("\\d+");
|
||||
|
||||
Matcher matcher = pattern.matcher(materialNo);
|
||||
|
||||
while (matcher.find()) {
|
||||
return matcher.group(0);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
List<TestResult> sampleList=new ArrayList<>();
|
||||
TestResult t1=new TestResult();
|
||||
t1.setMaterialNo("1号");
|
||||
t1.setCompoundName("化合物1");
|
||||
t1.setIsFind(1);
|
||||
t1.setOrderNo(1);
|
||||
TestResult t2=new TestResult();
|
||||
t2.setMaterialNo("1号");
|
||||
t2.setCompoundName("化合物2");
|
||||
t2.setIsFind(1);
|
||||
t2.setOrderNo(1);
|
||||
TestResult t3=new TestResult();
|
||||
t3.setMaterialNo("1号");
|
||||
t3.setCompoundName("化合物3");
|
||||
t3.setIsFind(0);
|
||||
t3.setOrderNo(1);
|
||||
sampleList.add(t1);
|
||||
sampleList.add(t2);
|
||||
sampleList.add(t3);
|
||||
TestResult t4=new TestResult();
|
||||
t4.setMaterialNo("2号");
|
||||
t4.setCompoundName("化合物1");
|
||||
t4.setIsFind(0);
|
||||
t4.setOrderNo(2);
|
||||
TestResult t5=new TestResult();
|
||||
t5.setMaterialNo("2号");
|
||||
t5.setCompoundName("化合物2");
|
||||
t5.setIsFind(0);
|
||||
t5.setOrderNo(2);
|
||||
TestResult t6=new TestResult();
|
||||
t6.setMaterialNo("2号");
|
||||
t6.setCompoundName("化合物3");
|
||||
t6.setIsFind(1);
|
||||
t6.setOrderNo(2);
|
||||
sampleList.add(t4);
|
||||
sampleList.add(t5);
|
||||
sampleList.add(t6);
|
||||
|
||||
TestResult t7=new TestResult();
|
||||
t7.setMaterialNo("3号");
|
||||
t7.setCompoundName("化合物1");
|
||||
t7.setIsFind(0);
|
||||
t7.setOrderNo(3);
|
||||
TestResult t8=new TestResult();
|
||||
t8.setMaterialNo("3号");
|
||||
t8.setCompoundName("化合物2");
|
||||
t8.setIsFind(0);
|
||||
t8.setOrderNo(3);
|
||||
TestResult t9=new TestResult();
|
||||
t9.setMaterialNo("3号");
|
||||
t9.setCompoundName("化合物3");
|
||||
t9.setIsFind(1);
|
||||
t9.setOrderNo(3);
|
||||
sampleList.add(t7);
|
||||
sampleList.add(t8);
|
||||
sampleList.add(t9);
|
||||
|
||||
//按照检材编号先分组,这样的话,如果有n个检材,m个化合物,那么就会分成n组,每组中就m条数据
|
||||
Map<String, List<TestResult>> collectMap = sampleList.stream().collect(Collectors.groupingBy(m -> m.getMaterialNo()));
|
||||
//我们把每组中的List 数据再次分组,分组按检出和未检出分,这样就会得到2个组,一个组是检出的,一个组是未检出的
|
||||
Map<String, Map<Integer, List<TestResult>>> ret=new HashMap<>();
|
||||
collectMap.forEach((k,v)->{
|
||||
Map<Integer, List<TestResult>> tmp1Map= v.stream().collect(Collectors.groupingBy(m -> m.getIsFind()));
|
||||
ret.put(k,tmp1Map);
|
||||
});
|
||||
|
||||
//将3条合并为一条
|
||||
//将检出和未检出合并成一条,创建一个对象来存储
|
||||
List<TestResultDetail> testResultDetailList=new ArrayList<>();
|
||||
ret.forEach((k,v)->{
|
||||
StringBuffer sb1=new StringBuffer();
|
||||
StringBuffer sb2=new StringBuffer();
|
||||
v.forEach((k1,v1)->{
|
||||
//这个map中只有2个值,第一个表示未检出的化合物,第2个表示检出的化合物
|
||||
if(k1==0){
|
||||
//未检出
|
||||
v1.forEach(item->{
|
||||
sb1.append(item.getCompoundName()).append(",");
|
||||
});
|
||||
}
|
||||
if(k1==1){
|
||||
//检出
|
||||
v1.forEach(item->{
|
||||
sb2.append(item.getCompoundName()).append(",");
|
||||
});
|
||||
}
|
||||
});
|
||||
if(sb1.length()>0){
|
||||
sb1.delete(sb1.length()-1,sb1.length());//删除最后一个 ,
|
||||
}
|
||||
if(sb2.length()>0){
|
||||
sb2.delete(sb2.length()-1,sb2.length());//删除最后一个 ,
|
||||
}
|
||||
//
|
||||
TestResultDetail eg=new TestResultDetail();
|
||||
eg.setMaterialNo(k);
|
||||
eg.setFindCompounds(sb2.toString());
|
||||
eg.setNoFindCompounds(sb1.toString());
|
||||
testResultDetailList.add(eg);
|
||||
});
|
||||
testResultDetailList.forEach(item->{
|
||||
String str1=item.getMaterialNo()+"检材中检出了"+item.getFindCompounds();
|
||||
String str2=item.getMaterialNo()+"检材中未检出"+item.getNoFindCompounds();
|
||||
System.out.println(str1);
|
||||
System.out.println(str2);
|
||||
System.out.println("-----------------------------");
|
||||
});
|
||||
//现在对上面的数据进行从新分组,按检出+化合物的形式
|
||||
Map<String, List<TestResultDetail>> temp2 = testResultDetailList.stream().collect(
|
||||
Collectors.groupingBy(m -> m.getFindCompounds() + m.getNoFindCompounds()));
|
||||
//这里需要排一个序,检材编号小的应该放在前面,大的放在后面,所以使用values中的值来给map进行排序
|
||||
List<Map.Entry<String, List<TestResultDetail>>> targetList=new ArrayList<Map.Entry<String, List<TestResultDetail>>>(temp2.entrySet());
|
||||
targetList.sort(new Comparator<Map.Entry<String, List<TestResultDetail>>>() {
|
||||
@Override
|
||||
public int compare(Map.Entry<String, List<TestResultDetail>> mp1, Map.Entry<String, List<TestResultDetail>> mp2) {
|
||||
int materialNo1 = getMinMaterialNo(mp1.getValue());
|
||||
int materialNo2 = getMinMaterialNo(mp2.getValue());
|
||||
return materialNo1-materialNo2;
|
||||
}
|
||||
});
|
||||
targetList.forEach((target)->{
|
||||
|
||||
StringBuffer sbNo=new StringBuffer();
|
||||
|
||||
target.getValue().forEach(item->{
|
||||
sbNo.append(item.getMaterialNo()).append(",");
|
||||
});
|
||||
if(sbNo.length()>0){
|
||||
sbNo.delete(sbNo.length()-1,sbNo.length());//删除最后一个 ,
|
||||
}
|
||||
System.out.println(sbNo.toString()+"检材未检出"+target.getValue().get(0).getNoFindCompounds()+"--- 检出了"+target.getValue().get(0).getFindCompounds());
|
||||
});
|
||||
}
|
||||
|
||||
//获取检材中最小的一个检材编号
|
||||
private static int getMinMaterialNo(List<TestResultDetail> materialList){
|
||||
materialList.sort(new Comparator<TestResultDetail>() {
|
||||
@Override
|
||||
public int compare(TestResultDetail t1, TestResultDetail t2) {
|
||||
int mNo1= Integer.parseInt(getNumberByMaterialNo(t1.getMaterialNo()));
|
||||
int mNo2= Integer.parseInt(getNumberByMaterialNo(t2.getMaterialNo()));
|
||||
return mNo1-mNo2;
|
||||
}
|
||||
});
|
||||
return Integer.parseInt(getNumberByMaterialNo(materialList.get(0).getMaterialNo()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import digital.laboratory.platform.sys.entity.DrugLite;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 检材信息
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "检材信息:用户接受其他系统提供的检材信息")
|
||||
public class MaterialDto extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 检材id
|
||||
*/
|
||||
@ApiModelProperty(value = "检材id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 检材编号
|
||||
*/
|
||||
@ApiModelProperty(value = "检材编号")
|
||||
private String imNo;
|
||||
|
||||
@ApiModelProperty(value = "委托id")
|
||||
private String entrustmentId;
|
||||
|
||||
/**
|
||||
* 检材名称
|
||||
*/
|
||||
@ApiModelProperty(value = "检材名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 检材类别:继承所取物证的类别或从物证类别选择
|
||||
*/
|
||||
@ApiModelProperty(value = "检材类别:继承所取物证的类别或从物证类别选择")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "检材颜色:继承所取物证颜色或手动填入")
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 检材性状:继承所取物证性状或从物证性状类别选择
|
||||
*/
|
||||
@ApiModelProperty(value = "检材性状:继承所取物证性状或从物证性状类别选择")
|
||||
private String form;
|
||||
|
||||
|
||||
/**
|
||||
* 检材情况之承载物数量, 例如 5 颗, 3包
|
||||
*/
|
||||
@ApiModelProperty(value = "检材情况之承载物数量, 例如 5 颗, 3包")
|
||||
private Integer fundQuantity;
|
||||
|
||||
/**
|
||||
* 检材情况之承载物单位, 例如 5 颗, 3包
|
||||
*/
|
||||
@ApiModelProperty(value = "检材情况之承载物单位, 例如 5 颗, 3包")
|
||||
private String fundUnit;
|
||||
|
||||
/**
|
||||
* 检材数量, 例如 3.8 克 或 4.5毫升
|
||||
*/
|
||||
@ApiModelProperty(value = "检材数量, 例如 3.8 克 或 4.5毫升")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/**
|
||||
* 计量单位, 例如 3.8 克 或 4.5毫升
|
||||
*/
|
||||
@ApiModelProperty(value = "计量单位, 例如 3.8 克 或 4.5毫升")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "检材受理编号")
|
||||
private String acceptNo;
|
||||
|
||||
/**
|
||||
* 候选毒品列表(drug 对象的 json array)
|
||||
*/
|
||||
@ApiModelProperty(value = "候选毒品列表(drug 对象的 json array)")
|
||||
private List<DrugLite> candidateDrugs;
|
||||
|
||||
private BigDecimal sample1Quantity;
|
||||
|
||||
private String sampleName;
|
||||
|
||||
private String sampleCode;
|
||||
|
||||
private Integer orderNo;
|
||||
|
||||
private BigDecimal sample1RepeatWeigh;
|
||||
|
||||
private String formName;
|
||||
|
||||
private Integer analysisOption;//分析项目,代替原来的定性分析,定量分析字段 1.定性分析 2.定量分析 3.定性定量分析 4.关联性判断 5。其他
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
/*
|
||||
*@title SampleInfo
|
||||
*@description
|
||||
*@author xy
|
||||
*@version 1.0
|
||||
*@create 2023/12/13 11:00
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName(value = "b_sampleInfo", autoResultMap = true)
|
||||
@ApiModel(value = "样本信息", description = "样本信息")
|
||||
public class SampleInfo extends BaseEntity {
|
||||
private String id;
|
||||
private String sampleName;
|
||||
private String acceptNo;
|
||||
private Double quality; //送检的时候送检质量
|
||||
private String unit;//单位
|
||||
private Double sampleQuality;//受理的时候的质量
|
||||
private String sampleQualityUnit;//受理的时候的质量单位
|
||||
private Integer source;//数据来源-手动录入或系统接口录入
|
||||
private String businessId;//业务ID
|
||||
private Integer status; // 0 未分配 1已分配
|
||||
private String businessType;//委托检验鉴定、任务检验鉴定、筛查检验鉴定
|
||||
private String form;//检材性状
|
||||
private String color;//检材颜色
|
||||
Integer analysisOption;//定量分析字段 1.定性分析 2.定量分析 3.定性定量分析 4.关联性判断 5。其他
|
||||
Integer orderNo;//委托中检材的序号
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<TargetObject> targetObject;//筛查物列表
|
||||
|
||||
//用来转换type类型的中文
|
||||
@TableField(exist = false)
|
||||
private String businessTypeName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Boolean isDistribution;//是否被分配
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TargetObject {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@ApiModelProperty(value = "Id")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@ApiModelProperty(value = "英文名")
|
||||
private String englishName;
|
||||
|
||||
/**
|
||||
* 毒品类型
|
||||
*/
|
||||
@ApiModelProperty(value = "毒品类型")
|
||||
private String drugType;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@ApiModelProperty(value = "发布时间")
|
||||
private String publishTime;
|
||||
|
||||
/**
|
||||
* 实行时间
|
||||
*/
|
||||
@ApiModelProperty(value = "实行时间")
|
||||
private String implementTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 毒品名称
|
||||
*/
|
||||
@ApiModelProperty(value = "毒品名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
@ApiModelProperty(value = "别名")
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* CAS号
|
||||
*/
|
||||
@ApiModelProperty(value = "CAS号")
|
||||
private String casCode;
|
||||
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
@ApiModelProperty(value = "来源")
|
||||
|
||||
private String source;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.alibaba.fastjson.annotation.JSONType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
*@title TestRecord
|
||||
*@description 检验记录
|
||||
*@author xy
|
||||
*@version 1.0
|
||||
*@create 2023/12/18 9:39
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "b_test_record", autoResultMap = true)
|
||||
@ApiModel(value = "检验记录", description = "检验记录")
|
||||
public class TestRecord extends BaseEntity {
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
@ApiModelProperty(value = "待检验样本ID")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> sampleTestList;//待检验样本ID
|
||||
@ApiModelProperty(value = "使用到的设备ID")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> deviceIdList;//使用到的设备ID
|
||||
|
||||
@ApiModelProperty(value = "使用到的试剂耗材")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> reagentConsumablesList;//使用到的试剂耗材
|
||||
|
||||
@ApiModelProperty(value = "使用到的标准溶液")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> standardSolution;//使用到的标准溶液
|
||||
|
||||
@ApiModelProperty(value = "使用到的样本溶液")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> sampleSolution;//使用到的样本溶液
|
||||
|
||||
@ApiModelProperty(value = "使用到的检验方法")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> testMethodList;//使用到的检验方法
|
||||
@ApiModelProperty(value = "仪器设备使用条件")
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<String> deviceUseCondition;//仪器设备使用条件
|
||||
@ApiModelProperty(value = "检验人")
|
||||
private String testUserId;//检验人
|
||||
|
||||
@ApiModelProperty(value = "检验编号")
|
||||
private String testSerialNumber;//检验编号
|
||||
|
||||
@ApiModelProperty(value = "样本溶液处理过程")
|
||||
private String sampleSolutionProcessing;//样本溶液处理过程
|
||||
|
||||
@ApiModelProperty(value = "标准溶液处理过程")
|
||||
private String standardSolutionProcessing;//标准溶液处理过程
|
||||
|
||||
@ApiModelProperty(value = "检验过程描述")
|
||||
private String testProcessDes;//检验过程描述
|
||||
|
||||
@ApiModelProperty(value = "模板名称")
|
||||
private String templateName;//模板名称
|
||||
|
||||
@ApiModelProperty(value =
|
||||
"创建实验:0\n" +
|
||||
"正在上机:1\n" +
|
||||
"结果分析:2\n" +
|
||||
"提交审核:3\n" +
|
||||
"提交审批:4\n" +
|
||||
"实验完成:5\n" +
|
||||
"出具文书:6")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "实验类型(业务类型)")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty(value = "实验图谱-存储图谱文件名,一般为pdf,格式为['p1.pdf,p2.pdf']")
|
||||
private String testAtlas;
|
||||
|
||||
@ApiModelProperty("实验开始时间")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd", timezone = "GMT+8")
|
||||
private LocalDate testStartDate;
|
||||
|
||||
@ApiModelProperty("实验结束时间")
|
||||
@JsonFormat(pattern = "yyyy/MM/dd", timezone = "GMT+8")
|
||||
private LocalDate testEndDate;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @title TestResult
|
||||
* @description
|
||||
* @create 2024/3/13 18:02
|
||||
*/
|
||||
@Data
|
||||
public class TestResult {
|
||||
private Integer orderNo;//检材序号
|
||||
private String materialNo;//检材名称
|
||||
private String compoundName;//化合物名称
|
||||
private Integer isFind;// 0 未检出 1 检出
|
||||
private String testId;
|
||||
|
||||
//private String findCompounds;//检出的化合物列表
|
||||
//private String noFindCompounds;//未检出的化合物列表
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package digital.laboratory.platform.inspetion.api.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @title TestResultDetail
|
||||
* @description
|
||||
* @create 2024/3/13 22:31
|
||||
*/
|
||||
@Data
|
||||
public class TestResultDetail {
|
||||
private String materialNo;
|
||||
private String findCompounds;
|
||||
private String noFindCompounds;
|
||||
private Integer isFind;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package digital.laboratory.platform.inspetion.api.feign;
|
||||
|
||||
import digital.laboratory.platform.inspetion.api.entity.IdentificationBookDTO;
|
||||
import digital.laboratory.platform.inspetion.api.feign.factory.RemoteTestToIdentifyServiceFallbackFactory;
|
||||
import digital.laboratory.platform.common.core.constant.SecurityConstants;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.inspetion.api.vo.TestRecordVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @title 检验系统对文书系统提供的接口
|
||||
* @description
|
||||
* @create 2024/2/26 15:01
|
||||
*/
|
||||
@FeignClient(contextId = "remoteTestToIdentifyService", value ="dlp-drugtesting-biz",
|
||||
fallbackFactory = RemoteTestToIdentifyServiceFallbackFactory.class)
|
||||
public interface RemoteTestToIdentifyService {
|
||||
/**
|
||||
* 提供读取实验数据的接口
|
||||
* @param businessId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value="/identifyBookData/getIdentifyBookDataByBusinessId", headers = SecurityConstants.HEADER_FROM_IN)
|
||||
public R getIdentifyBookDataByBusinessId(@RequestParam("businessId") String businessId);
|
||||
|
||||
@PostMapping(value="/identifyBookData/getTestFinishBusinessData", headers = SecurityConstants.HEADER_FROM_IN)
|
||||
public R getTestFinishBusinessData(@RequestBody List<String> synedIdList);
|
||||
|
||||
@PostMapping("/testRecord/queryTestRecordInfoByBusinessId")
|
||||
@ApiOperation("根据业务id获取实验信息")
|
||||
public R<Map<String, TestRecordVo>> queryTestRecordInfoByBusinessId(@RequestBody List<String> businessIds);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package digital.laboratory.platform.inspetion.api.feign.factory;
|
||||
|
||||
import digital.laboratory.platform.inspetion.api.feign.RemoteTestToIdentifyService;
|
||||
import digital.laboratory.platform.inspetion.api.feign.fallback.RemoteTestToIdentifyServiceFallbackImpl;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @title RemoteFlowManagerServiceFallbackFactory
|
||||
* @description
|
||||
* @create 2024/1/17 18:07
|
||||
*/
|
||||
@Component
|
||||
public class RemoteTestToIdentifyServiceFallbackFactory implements FallbackFactory<RemoteTestToIdentifyService> {
|
||||
@Override
|
||||
public RemoteTestToIdentifyService create(Throwable throwable) {
|
||||
RemoteTestToIdentifyServiceFallbackImpl remoteFlowManagerServiceFallback=new RemoteTestToIdentifyServiceFallbackImpl();
|
||||
remoteFlowManagerServiceFallback.setCause(throwable);
|
||||
return remoteFlowManagerServiceFallback;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package digital.laboratory.platform.inspetion.api.feign.fallback;
|
||||
|
||||
import digital.laboratory.platform.inspetion.api.entity.IdentificationBookDTO;
|
||||
import digital.laboratory.platform.inspetion.api.feign.RemoteTestToIdentifyService;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.inspetion.api.vo.TestRecordVo;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @title RemoteTestToIdentifyServiceFallbackImpl
|
||||
* @description
|
||||
* @create 2024/1/17 18:07
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RemoteTestToIdentifyServiceFallbackImpl implements RemoteTestToIdentifyService {
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public R getIdentifyBookDataByBusinessId(String businessId) {
|
||||
//log.error("feign 获取鉴定文书信息失败,请联系管理员:{}", identificationBookDTO.getCaseName(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R getTestFinishBusinessData(List<String> synedIdList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Map<String, TestRecordVo>> queryTestRecordInfoByBusinessId(List<String> businessIds) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package digital.laboratory.platform.inspetion.api.vo;
|
||||
|
||||
import digital.laboratory.platform.inspetion.api.entity.TestRecord;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TestRecordVo extends TestRecord {
|
||||
|
||||
private String testUserName;
|
||||
private List<String> testMethodName;
|
||||
|
||||
private String instrumentConditionUrl;
|
||||
|
||||
private String instrumentConditionFileName;
|
||||
|
||||
private String businessTypeName;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package digital.laboratory.platform;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user