parent
2728002cf3
commit
6e2e5fdd5b
@ -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 ); |
||||
} |
||||
} |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 164 KiB |
@ -0,0 +1,269 @@ |
||||
<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-biz</artifactId> |
||||
<packaging>jar</packaging> |
||||
<name>dlp-drugtesting-biz</name> |
||||
<properties> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
<maven.compiler.target>1.8</maven.compiler.target> |
||||
<maven.compiler.source>1.8</maven.compiler.source> |
||||
<junit.version>5.7.1</junit.version> |
||||
</properties> |
||||
<dependencies> |
||||
<!--注册中心客户端--> |
||||
<dependency> |
||||
<groupId>com.alibaba.cloud</groupId> |
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
||||
<version>2021.1</version> |
||||
</dependency> |
||||
<!--配置中心客户端--> |
||||
<dependency> |
||||
<groupId>com.alibaba.cloud</groupId> |
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> |
||||
<version>2021.1</version> |
||||
</dependency> |
||||
<!-- swagger --> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-swagger</artifactId> |
||||
</dependency> |
||||
<!-- <dependency>--> |
||||
<!-- <groupId>org.springframework.boot</groupId>--> |
||||
<!-- <artifactId>spring-boot-starter-web</artifactId>--> |
||||
<!-- <version>2.5.5</version>--> |
||||
<!-- </dependency>--> |
||||
<!--断路器依赖--> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-feign</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<!--security--> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-security</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<!--JDBC相关--> |
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-jdbc</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-test</artifactId> |
||||
<scope>test</scope> |
||||
</dependency> |
||||
<!--core 工具类--> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-core</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<!-- 数据库 mysql依赖 --> |
||||
<dependency> |
||||
<groupId>mysql</groupId> |
||||
<artifactId>mysql-connector-java</artifactId> |
||||
<version>8.0.28</version> |
||||
</dependency> |
||||
<!--undertow容器--> |
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-undertow</artifactId> |
||||
</dependency> |
||||
<!-- log --> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-log</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<!-- seata分布式事务--> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-seata</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>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-drugtesting-api</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-sewage-api</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-oss</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<!-- https://mvnrepository.com/artifact/commons-io/commons-io --> |
||||
<dependency> |
||||
<groupId>commons-io</groupId> |
||||
<artifactId>commons-io</artifactId> |
||||
<version>2.11.0</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-upload-api</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-basic-commonservice-api</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
|
||||
<!-- poi-tl word 模板处理器 http://deepoove.com/poi-tl --> |
||||
<dependency> |
||||
<groupId>com.deepoove</groupId> |
||||
<artifactId>poi-tl</artifactId> |
||||
<version>1.12.0</version> |
||||
</dependency> |
||||
<!-- 添加easyexcel依赖--> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>easyexcel</artifactId> |
||||
<version>3.1.3</version> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi</artifactId> |
||||
</exclusion> |
||||
<exclusion> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi-ooxml</artifactId> |
||||
</exclusion> |
||||
<exclusion> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi-ooxml-schemas</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>digital.laboratory.platform</groupId> |
||||
<artifactId>dlp-common-remote-word2pdf</artifactId> |
||||
<version>2022.10.11-snapshots</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi</artifactId> |
||||
<version>5.2.3</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi-ooxml</artifactId> |
||||
<version>5.2.3</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi-ooxml-schemas</artifactId> |
||||
<version>4.1.2</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.apache.poi</groupId> |
||||
<artifactId>poi-ooxml-full</artifactId> |
||||
<version>5.2.3</version> |
||||
</dependency> |
||||
</dependencies> |
||||
<build> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-compiler-plugin</artifactId> |
||||
<configuration> |
||||
<compilerArgument>-Xlint:unchecked</compilerArgument> |
||||
</configuration> |
||||
<version>3.8.1</version> |
||||
</plugin> |
||||
<plugin> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
</plugin> |
||||
<plugin> |
||||
<groupId>io.fabric8</groupId> |
||||
<artifactId>docker-maven-plugin</artifactId> |
||||
</plugin> |
||||
|
||||
<plugin> |
||||
<groupId>org.codehaus.mojo</groupId> |
||||
<artifactId>build-helper-maven-plugin</artifactId> |
||||
<version>3.3.0</version> |
||||
<executions> |
||||
<execution> |
||||
<id>timestamp-property</id> |
||||
<goals> |
||||
<goal>timestamp-property</goal> |
||||
</goals> |
||||
<configuration> |
||||
<name>timestamp</name> |
||||
<pattern>yyyy-MM-dd HH:mm:ss</pattern> |
||||
<locale>zh_CN</locale> |
||||
<timeZone>Asia/Shanghai</timeZone> |
||||
</configuration> |
||||
</execution> |
||||
</executions> |
||||
</plugin> |
||||
|
||||
|
||||
<plugin> |
||||
<artifactId>maven-resources-plugin</artifactId> |
||||
<version>3.1.0</version> |
||||
<configuration> |
||||
<encoding>UTF-8</encoding> |
||||
<!-- 过滤后缀文件 ,没有这个的话 读取resource下的文件使用会报错 java.util.zip.ZipException: invalid code lengths set--> |
||||
<nonFilteredFileExtensions> |
||||
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension> |
||||
<nonFilteredFileExtension>xls</nonFilteredFileExtension> |
||||
<nonFilteredFileExtension>docx</nonFilteredFileExtension> |
||||
</nonFilteredFileExtensions> |
||||
</configuration> |
||||
<executions> |
||||
<execution> |
||||
<id>copy-resource-one</id> |
||||
<phase>install</phase> |
||||
<goals> |
||||
<goal>copy-resources</goal> |
||||
</goals> |
||||
<configuration> |
||||
<outputDirectory>${basedir}/../../out</outputDirectory> |
||||
<resources> |
||||
<resource> |
||||
<directory>${basedir}/target</directory> |
||||
<includes> |
||||
<include>${project.artifactId}.jar</include> |
||||
</includes> |
||||
</resource> |
||||
</resources> |
||||
</configuration> |
||||
</execution> |
||||
</executions> |
||||
</plugin> |
||||
|
||||
</plugins> |
||||
<resources> |
||||
<resource> |
||||
<directory>${project.basedir}/src/main/resources</directory> |
||||
<filtering>true</filtering> |
||||
</resource> |
||||
</resources> |
||||
</build> |
||||
</project> |
@ -0,0 +1,23 @@ |
||||
package digital.laboratory.platform.inspection; |
||||
|
||||
import digital.laboratory.platform.common.feign.annotation.EnableDLPFeignClients; |
||||
import digital.laboratory.platform.common.security.annotation.EnableDLPResourceServer; |
||||
import digital.laboratory.platform.common.swagger.annotation.EnableDLPSwagger2; |
||||
import org.springframework.boot.SpringApplication; |
||||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.scheduling.annotation.EnableAsync; |
||||
|
||||
@Configuration |
||||
@EnableDLPSwagger2 |
||||
@EnableDLPFeignClients |
||||
@EnableDiscoveryClient |
||||
@EnableDLPResourceServer |
||||
@SpringBootApplication(scanBasePackages="digital.laboratory.platform") |
||||
public class DlpDrugTestingApplication { |
||||
|
||||
public static void main(String[] args) { |
||||
SpringApplication.run(DlpDrugTestingApplication.class, args); |
||||
} |
||||
} |
@ -0,0 +1,37 @@ |
||||
package digital.laboratory.platform.inspection.Interceptor; |
||||
|
||||
import feign.RequestInterceptor; |
||||
import feign.RequestTemplate; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.security.core.Authentication; |
||||
import org.springframework.security.core.context.SecurityContext; |
||||
import org.springframework.security.core.context.SecurityContextHolder; |
||||
import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetails; |
||||
|
||||
/** |
||||
* Feign 请求拦截器 |
||||
* Feign Client 向业务系统发出请求的时候, 把 Token 带上, 以用户自己的身份调用业务系统。 |
||||
* 目的是在业务系统中识别用户是谁, 允许或禁止用户进行对应的操作。 |
||||
*/ |
||||
|
||||
|
||||
@Configuration |
||||
public class FeignOauth2RequestInterceptor implements RequestInterceptor { |
||||
|
||||
private final String AUTHORIZATION_HEADER = "Authorization"; |
||||
private final String BEARER_TOKEN_TYPE = "Bearer"; |
||||
|
||||
@Override |
||||
public void apply(RequestTemplate requestTemplate) { |
||||
System.out.println(String.format("dlp-entrustment, FeignOauth2RequestInterceptor()...")); |
||||
SecurityContext securityContext = SecurityContextHolder.getContext(); |
||||
Authentication authentication = securityContext.getAuthentication(); |
||||
if (authentication != null && authentication.getDetails() instanceof OAuth2AuthenticationDetails) { |
||||
OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) authentication.getDetails(); |
||||
System.out.println(String.format("FeignOauth2RequestInterceptor() Authorization, token=%s", details.getTokenValue())); |
||||
requestTemplate.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER_TOKEN_TYPE, details.getTokenValue())); |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
@ -0,0 +1,38 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
@Getter |
||||
public enum BusinessType { |
||||
NPS_CASE("10001", "缴获物检验"), |
||||
BOINT_CASE("10002", "生物样本案件"), |
||||
|
||||
|
||||
BOINT_JOB("20001", "毛发任务"), |
||||
SEWAGE_JOB("20002", "污水任务"), |
||||
SCREENING_EVENT("30001", "筛查事件"); |
||||
|
||||
BusinessType(String businessType, String businessTypeName) { |
||||
this.businessType = businessType; |
||||
this.businessTypeName = businessTypeName; |
||||
} |
||||
private final String businessType; |
||||
private final String businessTypeName; |
||||
|
||||
public static String getBusinessTypeName(String businessType) { |
||||
for (BusinessType type : values()) { |
||||
if (businessType.equals(type.businessType)) { |
||||
return type.businessTypeName; |
||||
} |
||||
} |
||||
throw new RuntimeException(String.format("没有获取到%s相关的Name", businessType)); |
||||
} |
||||
public static BusinessType getBusinessTypeByType(String businessType) { |
||||
for (BusinessType type : values()) { |
||||
if (businessType.equals(type.businessType)) { |
||||
return type; |
||||
} |
||||
} |
||||
throw new RuntimeException(String.format("没有获取到%s相关的Name", businessType)); |
||||
} |
||||
} |
@ -0,0 +1,45 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title compoundMassKV 化合物名称与Mass的对应关系 |
||||
* @description |
||||
* @create 2024/2/18 18:02 |
||||
*/ |
||||
|
||||
public enum CompoundMassKV { |
||||
COMPOUND_ABFUBINACA("AB-FUBINACA", 109), |
||||
COMPOUND_2FA("2-FA", 44), |
||||
COMPOUND_3FA("3-FA", 44), |
||||
COMPOUND_4FA("4-FA", 44), |
||||
COMPOUND_Phentermine("Phentermine", 58), |
||||
COMPOUND_MPA("MPA", 58), |
||||
COMPOUND_2FMA("2-FMA", 58), |
||||
COMPOUND_3FMA("3-FMA", 58), |
||||
COMPOUND_4FMA("4-FMA", 58), |
||||
COMPOUND_HEROIN("Heroin", 327), |
||||
COMPOUND_MEDETOMIDINE("Medetomidine", 0), |
||||
; |
||||
|
||||
private String name; |
||||
private int code; |
||||
CompoundMassKV(String _name , int _code) { |
||||
this.name=_name; |
||||
this.code=_code; |
||||
} |
||||
public int getCode() { |
||||
return code; |
||||
} |
||||
public String getCompoundName() { |
||||
return name; |
||||
} |
||||
public static int getCodeByName(String _name) { |
||||
for (CompoundMassKV enumObj : CompoundMassKV.values()) { |
||||
if (enumObj.getCompoundName().equals(_name)) { |
||||
return enumObj.code; |
||||
} |
||||
} |
||||
return -1; |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
public enum MaterialType { |
||||
|
||||
BIOLOGICAL_SAMPLE("inVivo"),//生物样本
|
||||
SEIZURE("inVitro"),//缴获物
|
||||
OTHER("other");//其他
|
||||
private final String type; |
||||
MaterialType(String type) { |
||||
this.type = type; |
||||
} |
||||
public String getType() { |
||||
return type; |
||||
} |
||||
} |
@ -0,0 +1,45 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
@Getter |
||||
public enum NumberTransferHanZi { |
||||
ZERO(0, "零"), |
||||
ONE(1, "一"), |
||||
|
||||
|
||||
TWO(2, "二"), |
||||
THREE(3, "三"), |
||||
FOUR(4, "四"), |
||||
FIVE(5, "五"), |
||||
SIX(6, "六"), |
||||
|
||||
|
||||
SEVEN(7, "七"), |
||||
EIGHT(8, "八"), |
||||
NINE(9, "九"), |
||||
TEN(10, "十"), |
||||
ELEVEN(11, "十一一"), |
||||
|
||||
|
||||
TWELVE(12, "十二"), |
||||
THIRTEEN(13, "十三"), |
||||
FOURTEEN(14, "十四"), |
||||
; |
||||
|
||||
NumberTransferHanZi(int number, String hanZi) { |
||||
this.number = number; |
||||
this.hanZi = hanZi; |
||||
} |
||||
private final int number; |
||||
private final String hanZi; |
||||
|
||||
public static String getHanZiNameByNumber(int number) { |
||||
for (NumberTransferHanZi type : values()) { |
||||
if (number == type.number) { |
||||
return type.hanZi; |
||||
} |
||||
} |
||||
throw new RuntimeException(String.format("没有获取到%s相关的汉字", number)); |
||||
} |
||||
} |
@ -0,0 +1,281 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import com.alibaba.fastjson.JSON; |
||||
import com.alibaba.fastjson.JSONArray; |
||||
|
||||
/** 相关导出进样位置信息中excel 中对应的类型type |
||||
* date: 2024/2/19 15:30 |
||||
* @author: Chen |
||||
* @since JDK 1.8 |
||||
* Description: |
||||
*/ |
||||
public interface SampleInjectorConstant { |
||||
|
||||
// 进样类型
|
||||
String BLANK = "Blank"; |
||||
|
||||
String STANDARD = "Standard"; |
||||
|
||||
String QC = "QC"; |
||||
|
||||
String ANALYTE = "Analyte"; |
||||
|
||||
// 溶液名称
|
||||
String BLANK_NAME = "空白溶液"; |
||||
String STANDARD_NAME = "标准溶液"; |
||||
String QC_NAME = "质控溶液"; |
||||
|
||||
String MIX_STANDARD_NAME = "标准混合溶液"; |
||||
|
||||
String NORMAL_NAME = "样本溶液"; |
||||
|
||||
/**************************************************进样方盘的初始数据********************************************************************/ |
||||
JSONArray P_1 = JSON.parseArray("[" + |
||||
"{ name: 'A1', value: ['A', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A2', value: ['A', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A3', value: ['A', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A4', value: ['A', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A5', value: ['A', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A6', value: ['A', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A7', value: ['A', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A8', value: ['A', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
"{ name: 'A9', value: ['A', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1' }," + |
||||
|
||||
"{ name: 'B1', value: ['B', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B2', value: ['B', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B3', value: ['B', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B4', value: ['B', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B5', value: ['B', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B6', value: ['B', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B7', value: ['B', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B8', value: ['B', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'B9', value: ['B', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
|
||||
"{ name: 'C1', value: ['C', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C2', value: ['C', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C3', value: ['C', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C4', value: ['C', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C5', value: ['C', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C6', value: ['C', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C7', value: ['C', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C8', value: ['C', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'C9', value: ['C', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
|
||||
"{ name: 'D1', value: ['D', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D2', value: ['D', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D3', value: ['D', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D4', value: ['D', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D5', value: ['D', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D6', value: ['D', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D7', value: ['D', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D8', value: ['D', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'D9', value: ['D', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
|
||||
"{ name: 'E1', value: ['E', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E2', value: ['E', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E3', value: ['E', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E4', value: ['E', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E5', value: ['E', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E6', value: ['E', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E7', value: ['E', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E8', value: ['E', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
"{ name: 'E9', value: ['E', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-1'}," + |
||||
|
||||
"{ name: 'F1', value: ['F', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F2', value: ['F', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F3', value: ['F', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F4', value: ['F', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F5', value: ['F', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F6', value: ['F', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F7', value: ['F', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F8', value: ['F', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"{ name: 'F9', value: ['F', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-1'}," + |
||||
"]"); |
||||
|
||||
JSONArray P_2 = JSON.parseArray("[" + |
||||
"{ name: 'A1', value: ['A', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A2', value: ['A', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A3', value: ['A', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A4', value: ['A', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A5', value: ['A', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A6', value: ['A', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A7', value: ['A', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A8', value: ['A', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
"{ name: 'A9', value: ['A', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2' }," + |
||||
|
||||
"{ name: 'B1', value: ['B', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B2', value: ['B', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B3', value: ['B', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B4', value: ['B', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B5', value: ['B', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B6', value: ['B', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B7', value: ['B', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B8', value: ['B', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'B9', value: ['B', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
|
||||
"{ name: 'C1', value: ['C', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C2', value: ['C', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C3', value: ['C', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C4', value: ['C', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C5', value: ['C', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C6', value: ['C', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C7', value: ['C', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C8', value: ['C', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'C9', value: ['C', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
|
||||
"{ name: 'D1', value: ['D', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D2', value: ['D', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D3', value: ['D', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D4', value: ['D', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D5', value: ['D', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D6', value: ['D', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D7', value: ['D', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D8', value: ['D', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'D9', value: ['D', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
|
||||
"{ name: 'E1', value: ['E', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E2', value: ['E', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E3', value: ['E', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E4', value: ['E', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E5', value: ['E', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E6', value: ['E', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E7', value: ['E', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E8', value: ['E', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
"{ name: 'E9', value: ['E', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-2'}," + |
||||
|
||||
"{ name: 'F1', value: ['F', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F2', value: ['F', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F3', value: ['F', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F4', value: ['F', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F5', value: ['F', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F6', value: ['F', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F7', value: ['F', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F8', value: ['F', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"{ name: 'F9', value: ['F', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-2'}," + |
||||
"]"); |
||||
|
||||
JSONArray P_3 = JSON.parseArray("[" + |
||||
"{ name: 'A1', value: ['A', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A2', value: ['A', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A3', value: ['A', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A4', value: ['A', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A5', value: ['A', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A6', value: ['A', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A7', value: ['A', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A8', value: ['A', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
"{ name: 'A9', value: ['A', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3' }," + |
||||
|
||||
"{ name: 'B1', value: ['B', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B2', value: ['B', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B3', value: ['B', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B4', value: ['B', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B5', value: ['B', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B6', value: ['B', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B7', value: ['B', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B8', value: ['B', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'B9', value: ['B', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
|
||||
"{ name: 'C1', value: ['C', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C2', value: ['C', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C3', value: ['C', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C4', value: ['C', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C5', value: ['C', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C6', value: ['C', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C7', value: ['C', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C8', value: ['C', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'C9', value: ['C', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
|
||||
"{ name: 'D1', value: ['D', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D2', value: ['D', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D3', value: ['D', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D4', value: ['D', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D5', value: ['D', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D6', value: ['D', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D7', value: ['D', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D8', value: ['D', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'D9', value: ['D', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
|
||||
"{ name: 'E1', value: ['E', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E2', value: ['E', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E3', value: ['E', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E4', value: ['E', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E5', value: ['E', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E6', value: ['E', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E7', value: ['E', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E8', value: ['E', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
"{ name: 'E9', value: ['E', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-3'}," + |
||||
|
||||
"{ name: 'F1', value: ['F', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F2', value: ['F', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F3', value: ['F', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F4', value: ['F', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F5', value: ['F', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F6', value: ['F', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F7', value: ['F', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F8', value: ['F', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"{ name: 'F9', value: ['F', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-3'}," + |
||||
"]"); |
||||
|
||||
JSONArray P_4 = JSONArray.parseArray("[" + |
||||
"{ name: 'A1', value: ['A', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A2', value: ['A', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A3', value: ['A', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A4', value: ['A', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A5', value: ['A', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A6', value: ['A', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A7', value: ['A', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A8', value: ['A', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
"{ name: 'A9', value: ['A', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4' }," + |
||||
|
||||
"{ name: 'B1', value: ['B', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B2', value: ['B', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B3', value: ['B', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B4', value: ['B', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B5', value: ['B', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B6', value: ['B', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B7', value: ['B', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B8', value: ['B', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'B9', value: ['B', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
|
||||
"{ name: 'C1', value: ['C', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C2', value: ['C', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C3', value: ['C', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C4', value: ['C', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C5', value: ['C', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C6', value: ['C', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C7', value: ['C', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C8', value: ['C', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'C9', value: ['C', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
|
||||
"{ name: 'D1', value: ['D', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D2', value: ['D', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D3', value: ['D', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D4', value: ['D', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D5', value: ['D', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D6', value: ['D', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D7', value: ['D', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D8', value: ['D', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'D9', value: ['D', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
|
||||
"{ name: 'E1', value: ['E', '1'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E2', value: ['E', '2'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E3', value: ['E', '3'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E4', value: ['E', '4'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E5', value: ['E', '5'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E6', value: ['E', '6'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E7', value: ['E', '7'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E8', value: ['E', '8'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
"{ name: 'E9', value: ['E', '9'], active: false,injectorCount: 1,sampleNo: \"\" ,frameNumber:'P-4'}," + |
||||
|
||||
"{ name: 'F1', value: ['F', '1'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F2', value: ['F', '2'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F3', value: ['F', '3'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F4', value: ['F', '4'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F5', value: ['F', '5'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F6', value: ['F', '6'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F7', value: ['F', '7'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F8', value: ['F', '8'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"{ name: 'F9', value: ['F', '9'], active: false,injectorCount: 1,sampleNo: \"\",frameNumber:'P-4'}," + |
||||
"]"); |
||||
|
||||
} |
@ -0,0 +1,62 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
/** |
||||
* 转换化合物名称和大数据平台上传的名称一致 |
||||
*/ |
||||
@Getter |
||||
public enum SewageCompoundNameTransform { |
||||
|
||||
Methamphetamine("MA,AM","冰毒"), // 甲基苯丙胺、苯丙胺(甲基苯丙胺代谢物)
|
||||
|
||||
Heroin("Mor,O6", "海洛因"), // 吗啡(海洛因二级代谢产物)、O6-单乙酰吗啡(海洛因一级代谢产物)
|
||||
|
||||
Codeine("Cod","可待因"), // 可待因
|
||||
|
||||
Cocaine("Coc,BZE", "可卡因"), // 可卡因、苯甲酰爱康宁(可卡因代谢物)
|
||||
|
||||
MDMA("MDMA,MDA","摇头丸"), // 3,4-亚甲基二氧甲基苯丙胺(摇头丸MDMA)、3,4-亚甲基二氧基苯丙胺(摇头丸代谢物)
|
||||
|
||||
Ketamine("Keta,NK","氯胺酮"), // 氯胺酮、去甲氯胺酮(氯胺酮代谢物)
|
||||
|
||||
Fentanyl("Fen", "芬太尼"), |
||||
|
||||
; |
||||
|
||||
private String targetName; |
||||
private String describe; |
||||
|
||||
SewageCompoundNameTransform(String targetName, String describe) { |
||||
this.targetName = targetName; |
||||
this.describe = describe; |
||||
} |
||||
|
||||
/** |
||||
* 根据sourceName 获取转换的大数据平台化合物名称,如果没有,则返回原始值 |
||||
* @param sourceName |
||||
* @return |
||||
*/ |
||||
public static String transferName(String sourceName) { |
||||
for (SewageCompoundNameTransform enumObj : SewageCompoundNameTransform.values()) { |
||||
if (enumObj.getTargetName().contains(sourceName)) { |
||||
return enumObj.describe; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 根据sourceName 获取枚举 |
||||
* @param sourceName |
||||
* @return |
||||
*/ |
||||
public static SewageCompoundNameTransform getEnumBySourceName(String sourceName) { |
||||
for (SewageCompoundNameTransform enumObj : SewageCompoundNameTransform.values()) { |
||||
if (enumObj.getTargetName().equals(sourceName)) { |
||||
return enumObj; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,72 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
@AllArgsConstructor |
||||
public enum SewageReportColumn { |
||||
COLUMN_1("样品编号", "red", ""), |
||||
COLUMN_2("污水处理厂名称", "red", ""), |
||||
COLUMN_3("所在地(省)", "red", ""), |
||||
COLUMN_4("所在地(市)", "red", ""), |
||||
COLUMN_5("所在地(区/县)", "", ""), |
||||
COLUMN_6("采样时间", "", ""), |
||||
COLUMN_7("污水厂服务人口(万人)", "", ""), |
||||
COLUMN_8("生活污水占比", "", ""), |
||||
COLUMN_9("流量(万立方米/天)", "", ""), |
||||
COLUMN_10("人均日吸烟(支)", "", ""), |
||||
COLUMN_11("可替宁排泄量(mg/千人天)", "", ""), |
||||
COLUMN_12("测算人口(千人)", "", ""), |
||||
COLUMN_13("可替宁(ng/L)", "red", ""), |
||||
COLUMN_14("可待因(ng/L)", "red", ""), |
||||
COLUMN_15("MDA(ng/L)", "red", ""), |
||||
COLUMN_16("MDMA(ng/L)", "red", ""), |
||||
COLUMN_17("可卡因(ng/L)", "red", ""), |
||||
COLUMN_18("苯甲酰爱康宁(ng/L)", "red", ""), |
||||
COLUMN_19("吗啡(ng/L)", "red", ""), |
||||
COLUMN_20("O6-单乙酰吗啡(ng/L)", "red", ""), |
||||
COLUMN_21("甲基苯丙胺(ng/L)", "red", "red"), |
||||
COLUMN_22("苯丙胺(ng/L)", "red", ""), |
||||
COLUMN_23("氯胺酮(ng/L)", "red", "red"), |
||||
COLUMN_24("去甲氯胺酮(ng/L)", "red", ""), |
||||
COLUMN_25("四氢大麻酸(ng/L)", "red", ""), |
||||
COLUMN_26("", "", ""), |
||||
COLUMN_27("吗啡负荷量(mg/千人﹒天)", "", ""), |
||||
COLUMN_28("可待因负荷量(mg/千人﹒天)", "", ""), |
||||
COLUMN_29("可待因转化为吗啡负荷量(mg/千人﹒天)", "", ""), |
||||
COLUMN_30("医用吗啡负荷量(mg/千人﹒天)", "", ""), |
||||
COLUMN_31("MA/AM", "red", "red"), |
||||
COLUMN_32("K/NK", "red", "red"), |
||||
COLUMN_33("", "", ""), |
||||
COLUMN_34("人均消耗量(mg/千人﹒天)", "", "pink"), |
||||
COLUMN_35("Heroin", "", ""), |
||||
COLUMN_36("MA", "", ""), |
||||
COLUMN_37("K", "", ""), |
||||
COLUMN_38("MDMA", "", ""), |
||||
COLUMN_39("COC", "", ""), |
||||
COLUMN_40("THC", "", ""), |
||||
COLUMN_41("", "", ""), |
||||
COLUMN_42("", "", ""), |
||||
COLUMN_43("总消耗量", "", "pink"), |
||||
COLUMN_44("Heroin", "", ""), |
||||
COLUMN_45("MA", "", ""), |
||||
COLUMN_46("K", "", ""), |
||||
COLUMN_47("MDMA", "", ""), |
||||
COLUMN_48("COC", "", ""), |
||||
COLUMN_49("THC", "", ""); |
||||
private final String columnName; |
||||
private final String fontColor; |
||||
private final String backgroundColor; |
||||
|
||||
public String getColumnName() { |
||||
return columnName; |
||||
} |
||||
|
||||
public String getFontColor() { |
||||
return fontColor; |
||||
} |
||||
|
||||
public String getBackgroundColor() { |
||||
return backgroundColor; |
||||
} |
||||
} |
@ -0,0 +1,18 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
public enum StdSolutionNum { |
||||
SIMPLE_SOLUTION("Sin"), |
||||
MIXED_SOLUTION("Mix"), |
||||
BLANK_SOLUTION("BLK"), |
||||
QC_SOLUTION("QC"), |
||||
BLANK_SAMPLE_SOLUTION("BLS"); |
||||
private final String prefix; |
||||
|
||||
StdSolutionNum(String prefix) { |
||||
this.prefix = prefix; |
||||
} |
||||
|
||||
public String getPrefix() { |
||||
return prefix; |
||||
} |
||||
} |
@ -0,0 +1,52 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
/** |
||||
* 任务审核状态 |
||||
*/ |
||||
@Getter |
||||
public enum TaskTestDataStatus { |
||||
|
||||
REJECT(-1, "审核审批不通过"), |
||||
WAIT_REVIEW(0, "待审核"), |
||||
REVIEWED(1, "已审核"), |
||||
APPROVED(2, "已审批"), |
||||
UPLOADED(3, "已上传") |
||||
; |
||||
private int code; |
||||
private String message; |
||||
|
||||
TaskTestDataStatus(int code, String message) { |
||||
this.code = code; |
||||
this.message = message; |
||||
} |
||||
|
||||
/** |
||||
* 根据code 值获取状态名称 |
||||
* @param code |
||||
* @return |
||||
*/ |
||||
public static String getStatusNameByCode(int code) { |
||||
for (TaskTestDataStatus status : values()) { |
||||
if (code == status.getCode()) { |
||||
return status.getMessage(); |
||||
} |
||||
} |
||||
throw new RuntimeException(String.format("没有获取到code 为 %s相关的状态名", code)); |
||||
} |
||||
|
||||
/*** |
||||
* 根据code 获取enum |
||||
* @param code |
||||
* @return |
||||
*/ |
||||
public static TaskTestDataStatus getEnumByCode(int code) { |
||||
for (TaskTestDataStatus status : values()) { |
||||
if (code == status.getCode()) { |
||||
return status; |
||||
} |
||||
} |
||||
throw new RuntimeException(String.format("没有获取到code 为 %s相关的枚举", code)); |
||||
} |
||||
} |
@ -0,0 +1,17 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import java.util.Arrays; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestDataFileStructConstant |
||||
* @description |
||||
* @create 2024/1/9 14:40 |
||||
*/ |
||||
|
||||
public class TestDataFileStructConstant { |
||||
public static List<String> TEST_DATA_FILE_NPS_STRUCT= Arrays.asList("Header","File Information", |
||||
"Sample Information","Original Files","File Description","MS Quantitative Results"); |
||||
} |
@ -0,0 +1,50 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestDataType 检验数据的格式类型枚举 |
||||
* @description |
||||
* @create 2024/1/9 10:23 |
||||
*/ |
||||
|
||||
public enum TestDataType { |
||||
//这三种是沃特斯的数据文件的格式类型
|
||||
WaterS_QuantifyCompoundSummaryReport(10001,"WATERS Quantify Compound Summary Report"), |
||||
WaterS_QuantifySampleSummaryReport(10002, "WATERS Quantify Sample Summary Report"), |
||||
WaterS_TabSeparator(10003, "WATERS 液相色谱导出的 tab 分隔数据文件"), |
||||
//这三种是岛津的数据文件的格式
|
||||
Shimadzu_Common_File(20000, "岛津通用格式"), |
||||
Shimadzu_MCPeakTable(20001, "岛津 定性峰表 SHIMADZU MC Peak Table"), |
||||
Shimadzu_MSQuantitativeResults(20002, "岛津 组分定量结果 SHIMADZU MS Quantitative Results"), |
||||
//这2种是安捷伦的数据文件格式
|
||||
Angient_TSV(30001, "ANGIENT TSV"), |
||||
Angient_CSV(30002, "ANGIENT CSV"); |
||||
private int eCode; |
||||
private String description; |
||||
TestDataType(int _code,String _description){ |
||||
this.description=_description; |
||||
this.eCode=_code; |
||||
} |
||||
|
||||
public int getECode() { |
||||
return eCode; |
||||
} |
||||
|
||||
public String getDescription() { |
||||
return description; |
||||
} |
||||
/** |
||||
* 根据code 获取对应的描述 |
||||
* @param _code |
||||
* @return |
||||
*/ |
||||
public static String getDescriptionByCode(int _code) { |
||||
for (TestDataType enumObj : TestDataType.values()) { |
||||
if (enumObj.getECode() == _code) { |
||||
return enumObj.description; |
||||
} |
||||
} |
||||
return "未知数据格式"; |
||||
} |
||||
} |
@ -0,0 +1,30 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
@Getter |
||||
public enum TestRecordArgumentType { |
||||
|
||||
TEST_RECORD_ARGUMENT_INSTRUMENT("testRecordInstrument"),//实验仪器
|
||||
TEST_RECORD_ARGUMENT_INSTRUMENT_CONDITION("testRecordInstrumentCondition"),//实验仪器条件
|
||||
TEST_RECORD_ARGUMENT_METHOD("testRecordMethod"),//实验方法
|
||||
TEST_RECORD_ARGUMENT_REAGENT("testRecordReagent"),//实验试剂耗材、标准物质
|
||||
TEST_RECORD_ARGUMENT_SAMPLE_DATA("testRecordSampleData"),//实验样本
|
||||
TEST_RECORD_ARGUMENT_SAMPLE_SOLUTION("testRecordSampleSolution"),//实验样本溶液
|
||||
TEST_RECORD_ARGUMENT_STANDARD_SOLUTION("testRecordStandardSolution");//实验标准溶液
|
||||
|
||||
private final String type; |
||||
|
||||
TestRecordArgumentType(String type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public static String getType(String type) { |
||||
for (TestRecordArgumentType constans : values()) { |
||||
if (constans.getType().equals(type)) { |
||||
return constans.getType(); |
||||
} |
||||
} |
||||
return ""; |
||||
} |
||||
} |
@ -0,0 +1,26 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
@Getter |
||||
public enum TestRecordFileUrl { |
||||
|
||||
TEMPORARY_PATH("C:\\tmp\\upload\\"), |
||||
TEST_RECORD_BIOLOGICAL_SAMPLE_TEMPLATE("template/生物样本检验记录模板.docx"), |
||||
TEST_RECORD_BIOLOGICAL_SAMPLE_INSTRUMENT_CONDITION_TEMPLATE("template/生物样本仪器条件模板.docx"), |
||||
TEST_RECORD_SEIZURE_TEMPLATE("template/缴获物检验记录模板.docx"), |
||||
TEST_RECORD_SEIZURE_INSTRUMENT_CONDITION_TEMPLATE("template/缴获物仪器条件模板.docx"), |
||||
TEST_RECORD_CATALOGUE("document" + "/" + "testRecord"), |
||||
TEST_TEMPLATE_CATALOGUE("document" + "/" + "testTemplate"), |
||||
TEST_ATLAS_PATH("testRecord/testAtlas/") |
||||
; |
||||
private final String fileUrl; |
||||
|
||||
TestRecordFileUrl(String fileUrl) { |
||||
this.fileUrl = fileUrl; |
||||
} |
||||
|
||||
public String getFileUrl() { |
||||
return fileUrl; |
||||
} |
||||
} |
@ -0,0 +1,62 @@ |
||||
package digital.laboratory.platform.inspection.constant; |
||||
|
||||
/** |
||||
* 关于计算检验数据中的相对误差、离子丰度比相对误差的一些常量数据 |
||||
*/ |
||||
public interface TestRecordSampleDataConstant { |
||||
// 毛发案件
|
||||
double HAIR_CASE_POSITIVE_RT_ERROR = 2.5; // 保留时间相对误差(正负2.5%) +
|
||||
|
||||
double HAIR_CASE_NEGATIVE_RT_ERROR = -2.5; // 保留时间相对误差(正负2.5%) -
|
||||
|
||||
double HAIR_CASE_ION_ABUNDANCE_RATIO_1 = 0.5; // 离子丰度比 中的比较值1 50%
|
||||
|
||||
double HAIR_CASE_ION_ABUNDANCE_RATIO_2 = 0.2; // 离子丰度比 中的比较值2 20%
|
||||
|
||||
double HAIR_CASE_ION_ABUNDANCE_RATIO_3 = 0.1; // 离子丰度比 中的比较值3 10%
|
||||
|
||||
double HAIR_CASE_POSITIVE_MAX_ALLOW_ERROR_1 = 20d; // 离子丰度比 > 50% 的最大允许偏差范围(正负20%) +
|
||||
|
||||
double HAIR_CASE_NEGATIVE_MAX_ALLOW_ERROR_1 = -20d; // 离子丰度比 > 50% 的最大允许偏差范围(正负20%) -
|
||||
|
||||
double HAIR_CASE_POSITIVE_MAX_ALLOW_ERROR_2 = 25d; // 20% < 离子丰度比 < 50% 的最大允许偏差范围(正负25%) +
|
||||
|
||||
double HAIR_CASE_NEGATIVE_MAX_ALLOW_ERROR_2 = -25d; // 20% < 离子丰度比 < 50% 的最大允许偏差范围(正负25%) -
|
||||
|
||||
double HAIR_CASE_POSITIVE_MAX_ALLOW_ERROR_3 = 30d; // 10% < 离子丰度比 < 20% 的最大允许偏差范围(正负30%) +
|
||||
|
||||
double HAIR_CASE_NEGATIVE_MAX_ALLOW_ERROR_3 = -30d; // 10% < 离子丰度比 < 20% 的最大允许偏差范围(正负30%) -
|
||||
|
||||
double HAIR_CASE_POSITIVE_MAX_ALLOW_ERROR_4 = 50d; // 离子丰度比 < 10% 的最大允许偏差范围(正负50%) +
|
||||
|
||||
double HAIR_CASE_NEGATIVE_MAX_ALLOW_ERROR_4 = -50d; // 离子丰度比 < 10% 的最大允许偏差范围(正负50%) -
|
||||
|
||||
|
||||
/**********************************************关于溶液类型的常量值*******************************************************************/ |
||||
|
||||
String SAMPLE_TYPE_QC = "QC"; // 质控样品
|
||||
|
||||
String SAMPLE_TYPE_ANALYTE = "Analyte"; // 检材样本
|
||||
|
||||
String SAMPLE_TYPE_STD = "STD"; // 标准物质
|
||||
|
||||
/******************************************管理 判断是否符合 的常量****************************************************/ |
||||
String IS = "是"; |
||||
|
||||
String NO = "否"; |
||||
|
||||
/************************************************ 检出 或 未检出 常量属性 *****************************************************************/ |
||||
String CHECK_OUT = "检出"; |
||||
|
||||
String NOT_CHECK_OUT = "未检出"; |
||||
|
||||
/***********************************************组装数据时常用的自定义健**********************************************************/ |
||||
String LABEL = "label"; // 对应的中午
|
||||
|
||||
String PROP = "prop"; // 对应的英文值名称
|
||||
|
||||
/**************************************************化合物基峰的字典类型值******************************************************************/ |
||||
|
||||
String COMPOUND_BASIC_PEAK = "compound_basic_peak"; |
||||
|
||||
} |
@ -0,0 +1,148 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||
import digital.laboratory.platform.inspection.dto.AssignmentInfoDto; |
||||
import digital.laboratory.platform.inspection.entity.AssignmentInfo; |
||||
import digital.laboratory.platform.inspection.entity.TaskInfo; |
||||
import digital.laboratory.platform.inspection.service.AssignmentInfoService; |
||||
import digital.laboratory.platform.inspection.service.TaskInfoService; |
||||
import digital.laboratory.platform.inspection.vo.AssignmentInfoVo; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.security.Principal; |
||||
import java.util.List; |
||||
|
||||
/* |
||||
*@title TaskInfoController |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/8 11:24 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/assignmentInfo") |
||||
@Api(tags = "05-分配信息管理", description = "分配信息管理") |
||||
public class AssignmentInfoController { |
||||
@Resource |
||||
private AssignmentInfoService assignmentInfoService; |
||||
|
||||
//添加接口
|
||||
@PostMapping("/addAssignmentInfo") |
||||
@ApiOperation(value = "添加分配信息", notes = "添加分配信息") |
||||
public R addAssignmentInfo(@RequestBody List<AssignmentInfoDto> assignmentInfoDtoList, HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
assignmentInfoDtoList.forEach(item -> { |
||||
item.setAssignUser(dlpUser.getId()); |
||||
item.setAssignUserName(dlpUser.getName()); |
||||
}); |
||||
|
||||
List<AssignmentInfo> assignmentInfoList = null; |
||||
try { |
||||
assignmentInfoList = assignmentInfoService.addAssignmentInfo(assignmentInfoDtoList); |
||||
} catch (RuntimeException e) { |
||||
e.printStackTrace(); |
||||
return R.failed(e.getMessage()); |
||||
} |
||||
|
||||
if (assignmentInfoList != null) { |
||||
return R.ok(assignmentInfoList, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
} |
||||
|
||||
//修改接口
|
||||
@PostMapping("/cancelAssignmentInfo") |
||||
@ApiOperation(value = "撤销分配信息", notes = "") |
||||
public R cancelAssignmentInfo(@RequestBody List<AssignmentInfo> assignmentInfoList) { |
||||
boolean ret = assignmentInfoService.cancelAssignmentInfo(assignmentInfoList); |
||||
if (ret) { |
||||
return R.ok(ret, "撤销成功"); |
||||
} else { |
||||
return R.failed("false", "撤销失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@GetMapping("/deleteAssignmentInfo") |
||||
@ApiOperation(value = "删除分配信息", notes = "") |
||||
public R deleteAssignmentInfo(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = assignmentInfoService.deleteAssignmentInfo(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getAssignmentInfoPageList") |
||||
@ApiOperation(value = "获取分页数据", notes = "opCode 0:分配者查询已分配记录 1:接收者查询下发给自己的任务;") |
||||
public R getTaskPageList(Page page, AssignmentInfoDto assignmentInfoDto, HttpServletRequest httpServletRequest) { |
||||
//opCode 0:分配者查询已分配记录 1:接收者查询下发给自己的任务;
|
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
if (assignmentInfoDto.getOpCode() == 0) { |
||||
assignmentInfoDto.setAssignUser(dlpUser.getId()); |
||||
} else { |
||||
assignmentInfoDto.setTestUser(dlpUser.getId()); |
||||
} |
||||
return R.ok(assignmentInfoService.getAssignmentInfoPageList(page, assignmentInfoDto), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getAssignmentInfoList") |
||||
@ApiOperation(value = "获取列表", notes = "opCode 0:分配者查询已分配记录 1:接收者查询下发给自己的任务;") |
||||
public R getAssignmentInfoList(AssignmentInfoDto assignmentInfoDto, HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
if (assignmentInfoDto.getOpCode() == 0) { |
||||
assignmentInfoDto.setAssignUser(dlpUser.getId()); |
||||
} else { |
||||
assignmentInfoDto.setTestUser(dlpUser.getId()); |
||||
} |
||||
return R.ok(assignmentInfoService.getAssignmentInfoList(assignmentInfoDto), "获取数据成功"); |
||||
} |
||||
|
||||
/** |
||||
* 根据业务ID批量撤销分配信息 |
||||
* |
||||
* @param bussinessIdList |
||||
* @return |
||||
*/ |
||||
@PostMapping("/cancelByBusiness") |
||||
@ApiOperation(value = "根据业务ID批量撤销分配信息", notes = "根据业务ID批量撤销分配信息") |
||||
public R cancelByBusiness(@RequestBody List<String> bussinessIdList) { |
||||
boolean ret = assignmentInfoService.cancelByBusiness(bussinessIdList); |
||||
if (ret) { |
||||
return R.ok(ret, "撤销成功"); |
||||
} else { |
||||
return R.failed("false", "撤销失败"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 查询已分配的类别为委托的任务列表 |
||||
* |
||||
* @param page |
||||
* @param keywords 查询参数 |
||||
* @return |
||||
*/ |
||||
@GetMapping("/getCancelEntrustPage") |
||||
@ApiOperation(value = "查询已分配的类别为委托的任务列表", notes = "查询已分配的类别为委托的任务列表") |
||||
public R<IPage<AssignmentInfoVo>> getAssignedEntrustPage(Page page, String keywords) { |
||||
return R.ok(assignmentInfoService.getAssignedEntrustPage(page, keywords), "查询成功!"); |
||||
} |
||||
} |
@ -0,0 +1,132 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.common.oss.service.OssFile; |
||||
import digital.laboratory.platform.inspection.constant.BusinessType; |
||||
import digital.laboratory.platform.inspection.constant.TestRecordFileUrl; |
||||
import digital.laboratory.platform.inspection.dto.EntrustInfoDto; |
||||
import digital.laboratory.platform.inspetion.api.entity.EntrustInfo; |
||||
import digital.laboratory.platform.inspection.service.EntrustInfoService; |
||||
import digital.laboratory.platform.inspection.service.TestRecordService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
|
||||
/* |
||||
*@title EntrustInfoController |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/7 15:31 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/entrustInfo") |
||||
@Api(tags = "01-委托基本信息管理", description = "委托基本信息管理") |
||||
public class EntrustInfoController { |
||||
@Resource |
||||
private EntrustInfoService entrustInfoService; |
||||
|
||||
@Resource |
||||
private TestRecordService testRecordService; |
||||
|
||||
@Resource |
||||
private OssFile ossFile; |
||||
|
||||
//添加接口
|
||||
@PostMapping("/addEntrustInfo") |
||||
@ApiOperation(value = "添加委托基本信息", notes = "添加委托基本信息,同时也作为其他系统调用的外部接口") |
||||
public R addEntrustInfo(@RequestBody EntrustInfoDto entrustInfo) { |
||||
EntrustInfo ret = entrustInfoService.addEntrustInfo(entrustInfo); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
|
||||
} |
||||
|
||||
//修改接口
|
||||
@PostMapping("/updateEntrustInfo") |
||||
@ApiOperation(value = "修改委托基本信息", notes = "") |
||||
public R updateEntrustInfo(@RequestBody EntrustInfo entrustInfo) { |
||||
EntrustInfo ret = entrustInfoService.updateEntrustInfo(entrustInfo); |
||||
if (ret != null) { |
||||
return R.ok(ret, "修改成功"); |
||||
} else { |
||||
return R.failed("false", "修改失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@DeleteMapping("/deleteEntrustInfo") |
||||
@ApiOperation(value = "删除委托基本信息", notes = "") |
||||
public R deleteEntrustInfo(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = entrustInfoService.deleteEntrustInfo(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getEntrustPageList") |
||||
@ApiOperation(value = "获取分页数据", notes = "") |
||||
public R<IPage<EntrustInfo>> getEntrustPageList(Page page, Integer status, EntrustInfo entrustInfo, String keywords) { |
||||
if (entrustInfo == null) { |
||||
entrustInfo = new EntrustInfo(); |
||||
} |
||||
return R.ok(entrustInfoService.getEntrustPageList(page, status, entrustInfo, keywords), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getEntrustList") |
||||
@ApiOperation(value = "获取列表", notes = "") |
||||
public R getEntrustList(EntrustInfo entrustInfo) { |
||||
if (entrustInfo == null) { |
||||
entrustInfo = new EntrustInfo(); |
||||
} |
||||
return R.ok(entrustInfoService.getEntrustList(entrustInfo), "获取数据成功"); |
||||
} |
||||
|
||||
//检查是否有重复编号
|
||||
@GetMapping("/checkRepeatNo") |
||||
@ApiOperation(value = "检查是否有重复编号", notes = "检查是否有重复编号") |
||||
public R checkRepeatNo(String acceptNo, String id) { |
||||
return R.ok(entrustInfoService.checkRepeatNo(acceptNo, id)); |
||||
} |
||||
|
||||
@GetMapping("/createInspectionRecord") |
||||
@ApiOperation(value = "生成检验记录", notes = "参数 :businessId、businessType:10001 或 10002") |
||||
public R getPrintData(String businessId, String businessType) throws Exception { |
||||
String fileName = ""; |
||||
if (businessType.equals(BusinessType.BOINT_CASE.getBusinessType())) { |
||||
fileName = "生物样本检验记录.docx"; |
||||
} else { |
||||
fileName = "缴获物检验记录.docx"; |
||||
} |
||||
//判断是否生成了检验记录
|
||||
List<String> fileNameList = ossFile.fileList(TestRecordFileUrl.TEST_RECORD_CATALOGUE.getFileUrl() + "/" + businessId); |
||||
boolean isCreate = fileNameList.contains(fileName); |
||||
//如果生成了 就直接返回word地址
|
||||
if (isCreate) { |
||||
return R.ok(TestRecordFileUrl.TEST_RECORD_CATALOGUE.getFileUrl() + "/" + businessId + "/" + fileName, "创建成功!"); |
||||
} |
||||
//如果没有生成,那么现在创建检验记录
|
||||
boolean ret = testRecordService.createInspectionRecord(businessId); |
||||
if (ret) { |
||||
return R.ok(TestRecordFileUrl.TEST_RECORD_CATALOGUE.getFileUrl() + "/" + businessId + "/" + fileName, "创建成功!"); |
||||
|
||||
} else { |
||||
return R.failed("创建失败!"); |
||||
} |
||||
} |
||||
} |
||||
|
@ -0,0 +1,36 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.service.IdentifyBookDataService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title 鉴定文书数据接口,主要为文书系统提供接口 |
||||
* @description |
||||
* @create 2024/3/13 11:01 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/identifyBookData") |
||||
@Api(tags = "16-鉴定报告数据提供服务接口", description = "鉴定报告数据提供服务接口") |
||||
public class IdentifyBookController { |
||||
@Resource |
||||
private IdentifyBookDataService identifyBookDataService; |
||||
//对文书系统提供获取实验数据
|
||||
@GetMapping("/getIdentifyBookDataByBusinessId") |
||||
@ApiOperation(value = "获取检验数据") |
||||
public R getIdentifyBookDataByBusinessId(String businessId){ |
||||
return identifyBookDataService.getIdentifyBookDataByBusinessId(businessId); |
||||
} |
||||
@PostMapping("/getTestFinishBusinessData") |
||||
@ApiOperation(value = "获取待制作文书列表") |
||||
public R getTestFinishBusinessData(@RequestBody List<String> synedIdList){ |
||||
return identifyBookDataService.getTestFinishBusinessData(synedIdList); |
||||
} |
||||
} |
@ -0,0 +1,105 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto; |
||||
import digital.laboratory.platform.inspetion.api.entity.SampleInfo; |
||||
import digital.laboratory.platform.inspection.service.SampleInfoService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.security.Principal; |
||||
|
||||
/* |
||||
*@title TaskInfoController |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/8 11:24 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/sampleInfo") |
||||
@Api(tags = "04-样本基本信息管理", description = "样本基本信息管理") |
||||
public class SampleInfoController { |
||||
@Resource |
||||
private SampleInfoService sampleInfoService; |
||||
|
||||
//添加接口
|
||||
@PostMapping("/addSampleInfo") |
||||
@ApiOperation(value = "添加样本基本信息", notes = "添加样本基本信息,同时也作为其他系统调用的外部接口") |
||||
public R addSampleInfo(@RequestBody SampleInfo sampleInfo) { |
||||
SampleInfo ret = sampleInfoService.addSampleInfo(sampleInfo); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
|
||||
} |
||||
|
||||
//修改接口
|
||||
@PostMapping("/updateSampleInfo") |
||||
@ApiOperation(value = "修改任务基本信息", notes = "") |
||||
public R updateSampleInfo(@RequestBody SampleInfo sampleInfo) { |
||||
SampleInfo ret = sampleInfoService.updateSampleInfo(sampleInfo); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@DeleteMapping("/deleteSampleInfo") |
||||
@ApiOperation(value = "删除样本基本信息", notes = "") |
||||
public R deleteSampleInfo(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = sampleInfoService.deleteSampleInfo(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getSampleInfoPageList") |
||||
@ApiOperation(value = "获取分页数据", notes = "") |
||||
public R getSampleInfoPageList(Page page, SampleInfo sampleInfo) { |
||||
return R.ok(sampleInfoService.getSampleInfoPageList(page, sampleInfo), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getSampleInfoList") |
||||
@ApiOperation(value = "获取列表", notes = "") |
||||
public R getSampleInfoList(SampleInfo sampleInfo) { |
||||
return R.ok(sampleInfoService.getSampleInfoList(sampleInfo), "获取数据成功"); |
||||
} |
||||
|
||||
@GetMapping("/getPageForTestRecord") |
||||
@ApiOperation(value = "在实验阶段获取该用户获得分配的检材列表", notes = "在实验阶段获取该用户获得分配的检材列表") |
||||
public R getPageForTestRecord(Page page, String testId, String keywords, HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(sampleInfoService.getPageForTestRecord(page, dlpUser, testId,keywords), "获取数据成功"); |
||||
} |
||||
|
||||
|
||||
@PutMapping("/useSample") |
||||
@ApiOperation(value = "在实验阶段使用检材或取消使用检材", notes = "在实验阶段使用检材或取消使用检材") |
||||
public R useTestRecordSample(@RequestBody TestRecordArgumentDto argumentDto) { |
||||
return sampleInfoService.useTestRecordSample(argumentDto) ? R.ok("操作成功!") : R.failed("操作失败!"); |
||||
} |
||||
|
||||
@GetMapping("/checkRepeatNo") |
||||
@ApiOperation(value = "检查是否有重复编号", notes = "检查是否有重复编号") |
||||
public R checkRepeatNo(String acceptNo,String id) { |
||||
return sampleInfoService.checkRepeatNo(acceptNo,id) ? R.ok(true,"操作成功!") : R.failed(false,"操作失败!"); |
||||
} |
||||
} |
@ -0,0 +1,120 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.ResetSampleInjectorDTO; |
||||
import digital.laboratory.platform.inspection.entity.SampleInjector; |
||||
import digital.laboratory.platform.inspection.service.SampleInjectorService; |
||||
import digital.laboratory.platform.inspection.vo.TestRecordSolutionVO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import javax.validation.Valid; |
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@RequestMapping("/sampleInjector") |
||||
@Api(tags = "14-进样器信息相关接口管理", description = "14-进样器信息相关接口管理") |
||||
public class SampleInjectorController { |
||||
|
||||
@Resource |
||||
private SampleInjectorService sampleInjectorService; |
||||
|
||||
@GetMapping |
||||
@ApiOperation(value = "根据实验id获取进样信息", notes = "根据实验id获取进样信息") |
||||
@ApiImplicitParam(name = "testId", value = "实验id", required = true) |
||||
public R<SampleInjector> getByTestId(@RequestParam("testId") String testId) { |
||||
SampleInjector one = null; |
||||
try { |
||||
one = sampleInjectorService.getByTestId(testId); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("进样信息查询失败!"); |
||||
} |
||||
return R.ok(one); |
||||
} |
||||
|
||||
@GetMapping("/materialList") |
||||
@ApiOperation(value = "检材列表", notes = "检材列表") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "testId", value = "实验id", required = true), |
||||
@ApiImplicitParam(name = "key", value = "查询数据字段, 仅支持编号查询", required = false) |
||||
}) |
||||
public R<List<TestRecordSolutionVO>> queryMaterialList(@RequestParam("testId") String testId, |
||||
@RequestParam(value = "key", required = false) String key) { |
||||
List<TestRecordSolutionVO> resultList = null; |
||||
try { |
||||
resultList = sampleInjectorService.queryMaterialList(testId, key); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("查询列表失败!"); |
||||
} |
||||
return R.ok(resultList); |
||||
} |
||||
|
||||
@PostMapping("/saveSampleInjector") |
||||
@ApiOperation(value = "保存进样信息", notes = "保存进样信息,进样位置信息使用json存储,直方图(方盘有4个json数组,外层是个大数组): [\n" + |
||||
" [{ sampleNo: '', injectorCount: '', name: 'A1', value: ['A', '1'], active: false, frameNumber: '' },\n" + |
||||
" { sampleNo: '', injectorCount: '', name: 'A2', value: ['A', '2'], active: false, frameNumber: '' }]," + |
||||
" [{ sampleNo: '', injectorCount: '', name: 'A1', value: ['A', '1'], active: false, frameNumber: '' },\\n\" +\n" + |
||||
" { sampleNo: '', injectorCount: '', name: 'A2', value: ['A', '2'], active: false, frameNumber: '' }]],\n" + |
||||
" 圆盘:[\n" + |
||||
" {\n" + |
||||
" \"sampleNo\": ''," + |
||||
" \"injectorCount\": ''," + |
||||
" \"frameNumber\": ''," + |
||||
" \"index\": 1,\n" + |
||||
" \"active\": false,\n" + |
||||
" \"title\": 1\n" + |
||||
" },\n" + |
||||
" {\n" + |
||||
" \"sampleNo\": ''," + |
||||
" \"injectorCount\": ''," + |
||||
" \"frameNumber\": ''," + |
||||
" \"index\": 2,\n" + |
||||
" \"active\": false,\n" + |
||||
" \"title\": 6\n" + |
||||
" }]; sampleNo 溶液编号、injectorCount 进样次数、frameNumber 架号") |
||||
public R<SampleInjector> saveSampleInjector(@Valid @RequestBody SampleInjector sampleInjector) { |
||||
SampleInjector resultInfo = null; |
||||
try { |
||||
resultInfo = sampleInjectorService.saveSampleInjector(sampleInjector); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
if (e instanceof RuntimeException) { |
||||
return R.failed(e.getMessage()); |
||||
} |
||||
return R.failed("保存失败!"); |
||||
} |
||||
return R.ok(resultInfo); |
||||
} |
||||
|
||||
@PutMapping("/reset") |
||||
@ApiOperation(value = "重置进样信息", notes = "重置进样信息") |
||||
public R<SampleInjector> reset(@Valid @RequestBody ResetSampleInjectorDTO dto) { |
||||
SampleInjector resultInfo = null; |
||||
try { |
||||
resultInfo = sampleInjectorService.reset(dto); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("重置失败!"); |
||||
} |
||||
return R.ok(resultInfo); |
||||
} |
||||
|
||||
@GetMapping("/export") |
||||
@ApiOperation(value = "进样信息导出", notes = "根据实验id查询对应的进样信息导出") |
||||
@ApiImplicitParam(name = "id", value = "进样信息的id", required = true) |
||||
public void exportSampleInjectorInfoToExcel(@RequestParam("id") String id, HttpServletResponse response) { |
||||
try { |
||||
sampleInjectorService.exportSampleInjectorInfoToExcel(id, response); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,76 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.entity.ScreenInfo; |
||||
import digital.laboratory.platform.inspection.entity.TaskInfo; |
||||
import digital.laboratory.platform.inspection.service.ScreenInfoService; |
||||
import digital.laboratory.platform.inspection.service.TaskInfoService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/* |
||||
*@title TaskInfoController |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/8 11:24 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/screenInfo") |
||||
@Api(tags = "03-筛查基本信息管理", description = "筛查基本信息管理") |
||||
public class ScreenInfoController { |
||||
@Resource |
||||
private ScreenInfoService screenInfoService; |
||||
//添加接口
|
||||
@PostMapping("/addScreenInfo") |
||||
@ApiOperation(value = "添加筛查基本信息",notes = "添加筛查基本信息,同时也作为其他系统调用的外部接口") |
||||
public R addScreenInfo(@RequestBody ScreenInfo screenInfo){ |
||||
ScreenInfo ret=screenInfoService.addScreenInfo(screenInfo); |
||||
if(ret!=null){ |
||||
return R.ok(ret,"添加成功"); |
||||
}else { |
||||
return R.failed("false","添加失败"); |
||||
} |
||||
|
||||
} |
||||
//修改接口
|
||||
@PostMapping("/updateScreenInfo") |
||||
@ApiOperation(value = "修改筛查基本信息",notes = "") |
||||
public R updateScreenInfo(@RequestBody ScreenInfo screenInfo){ |
||||
ScreenInfo ret=screenInfoService.updateScreenInfo(screenInfo); |
||||
if(ret!=null){ |
||||
return R.ok(ret,"添加成功"); |
||||
}else { |
||||
return R.failed("false","添加失败"); |
||||
} |
||||
} |
||||
//删除数据
|
||||
@DeleteMapping("/deleteScreenInfo") |
||||
@ApiOperation(value = "删除筛查基本信息",notes = "") |
||||
public R deleteScreenInfo(String id){ |
||||
Assert.notBlank(id,"参数id不能为空"); |
||||
boolean ret=screenInfoService.deleteScreenInfo(id); |
||||
if(ret){ |
||||
return R.ok("true","删除成功"); |
||||
}else { |
||||
return R.failed("false","删除成功"); |
||||
} |
||||
} |
||||
//显示列表分页
|
||||
@GetMapping("/getScreenPageList") |
||||
@ApiOperation(value = "获取分页数据",notes = "") |
||||
public R getScreenPageList(Page page,ScreenInfo screenInfo,String keywords){ |
||||
return R.ok(screenInfoService.getScreenPageList(page,screenInfo,keywords),"获取数据成功"); |
||||
} |
||||
//显示列表
|
||||
@GetMapping("/getScreenList") |
||||
@ApiOperation(value = "获取列表",notes = "") |
||||
public R getScreenList(ScreenInfo screenInfo,String keywords){ |
||||
return R.ok(screenInfoService.getScreenList(screenInfo,keywords),"获取数据成功"); |
||||
} |
||||
} |
@ -0,0 +1,64 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.ExportSewageAnalystReportsDTO; |
||||
import digital.laboratory.platform.inspection.dto.SewageDataDto; |
||||
import digital.laboratory.platform.inspection.dto.TaskInfoDto; |
||||
import digital.laboratory.platform.inspection.entity.TaskInfo; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordSampleData; |
||||
import digital.laboratory.platform.inspection.service.SewageDrugInspectReportService; |
||||
import digital.laboratory.platform.inspection.service.TaskInfoService; |
||||
import digital.laboratory.platform.inspection.service.TestRecordSampleDataService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.io.IOException; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
*@title TaskInfoController |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/8 11:24 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/sewageReport") |
||||
@Api(tags = "17-污水专项检测毒品分析报告", description = "污水专项检测毒品分析报告") |
||||
public class SewageDrugInspectReportController { |
||||
@Resource |
||||
private SewageDrugInspectReportService sewageDrugInspectReportService; |
||||
|
||||
@Resource |
||||
private TestRecordSampleDataService testRecordSampleDataService; |
||||
|
||||
@ApiOperation(value = "导出污水专项检测毒品分析报告") |
||||
@PostMapping("/exportSewageAnalystReports") |
||||
public R exportSewageAnalystReports(@RequestBody ExportSewageAnalystReportsDTO dto){ |
||||
try { |
||||
String reportWord = sewageDrugInspectReportService.generateSewageDrugInspectReportWord(dto); |
||||
return R.ok(reportWord); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
return R.failed(); |
||||
} |
||||
//
|
||||
// @ApiOperation(value = "更新数据")
|
||||
// @PostMapping("/updateData")
|
||||
// public R updateData(){
|
||||
// boolean update = testRecordSampleDataService
|
||||
// .update(Wrappers.<TestRecordSampleData>lambdaUpdate()
|
||||
// .eq(TestRecordSampleData::getTestId, "BC4234B2FF08F7E8CE1ED881DB374EA8")
|
||||
// .eq(TestRecordSampleData::getSampleConcentration, 0)
|
||||
// .set(TestRecordSampleData::getSampleConcentration, 2.123));
|
||||
// return R.ok(update);
|
||||
// }
|
||||
|
||||
|
||||
} |
@ -0,0 +1,101 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.ExportSewageAnalystReportsDTO; |
||||
import digital.laboratory.platform.inspection.dto.SewageDataDto; |
||||
import digital.laboratory.platform.inspection.dto.TaskInfoDto; |
||||
import digital.laboratory.platform.inspection.entity.TaskInfo; |
||||
import digital.laboratory.platform.inspection.service.TaskInfoService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.time.LocalDate; |
||||
import java.io.IOException; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TaskInfoController |
||||
* @description |
||||
* @create 2023/12/8 11:24 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/taskInfo") |
||||
@Api(tags = "02-任务基本信息管理", description = "任务基本信息管理") |
||||
public class TaskInfoController { |
||||
@Resource |
||||
private TaskInfoService taskInfoService; |
||||
|
||||
//添加接口
|
||||
@PostMapping("/addTaskInfo") |
||||
@ApiOperation(value = "添加任务基本信息", notes = "添加任务基本信息,同时也作为其他系统调用的外部接口") |
||||
public R addTaskInfo(@RequestBody TaskInfoDto taskInfo) { |
||||
TaskInfo ret = taskInfoService.addTaskInfo(taskInfo); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
|
||||
} |
||||
|
||||
//修改接口
|
||||
@PostMapping("/updateTaskInfo") |
||||
@ApiOperation(value = "修改任务基本信息", notes = "") |
||||
public R updateTaskInfo(@RequestBody TaskInfo taskInfo) { |
||||
TaskInfo ret = taskInfoService.updateTaskInfo(taskInfo); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@GetMapping("/deleteTaskInfo") |
||||
@ApiOperation(value = "删除任务基本信息", notes = "") |
||||
public R deleteTaskInfo(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = taskInfoService.deleteTaskInfo(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getTaskPageList") |
||||
@ApiOperation(value = "获取分页数据", notes = "") |
||||
public R getTaskPageList(Page page, TaskInfo taskInfo, String keywords) { |
||||
return R.ok(taskInfoService.getTaskPageList(page, taskInfo, keywords), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getTaskList") |
||||
@ApiOperation(value = "获取列表", notes = "") |
||||
public R getTaskList(TaskInfo taskInfo, String keywords) { |
||||
return R.ok(taskInfoService.getTaskList(taskInfo, keywords), "获取数据成功"); |
||||
} |
||||
|
||||
@PostMapping("/create/sewageReport") |
||||
@ApiOperation(value = "导出污水消费量计算Excel,参数:dailySmokingPerCapita为人均日吸烟量(支)") |
||||
public R createSewageReport(String taskId, Double dailySmokingPerCapita) throws IOException { |
||||
List<SewageDataDto> sewageReportData = taskInfoService.createSewageReportData(taskId, dailySmokingPerCapita); |
||||
String filePath = taskInfoService.createSewageReportExcel(sewageReportData, taskId); |
||||
return R.ok(filePath, "生成成功!"); |
||||
} |
||||
|
||||
@PostMapping("/exportSewageAnalystReports") |
||||
@ApiOperation(value = "导出污水专项检测毒品分析报告", notes = "按月份导出") |
||||
public R exportSewageAnalystReports(@RequestBody ExportSewageAnalystReportsDTO dto) { |
||||
return taskInfoService.exportSewageAnalystReports(dto); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,215 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.amazonaws.services.s3.model.AmazonS3Exception; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||
import digital.laboratory.platform.common.oss.service.OssFile; |
||||
import digital.laboratory.platform.inspection.dto.DeleteTestAtlasDTO; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordDto; |
||||
import digital.laboratory.platform.inspetion.api.entity.TestRecord; |
||||
import digital.laboratory.platform.inspection.service.TestRecordService; |
||||
import digital.laboratory.platform.inspection.vo.ProcedureVo; |
||||
import digital.laboratory.platform.inspetion.api.vo.TestRecordVo; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import javax.activation.MimetypesFileTypeMap; |
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import javax.validation.Valid; |
||||
import java.io.IOException; |
||||
import java.security.Principal; |
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordController |
||||
* @description 检验记录控制器 |
||||
* @create 2023/12/19 11:50 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/testRecord") |
||||
@Api(tags = "06-检验记录管理", description = "检验记录管理") |
||||
public class TestRecordController { |
||||
|
||||
@Resource |
||||
private TestRecordService testRecordService; |
||||
|
||||
@Resource |
||||
private OssFile ossFile; |
||||
|
||||
/** |
||||
* 创建实验记录 |
||||
*/ |
||||
@PostMapping("/createTestInstance") |
||||
@ApiOperation(value = "创建实验", notes = "创建实验") |
||||
public R createTestInstance(@RequestBody TestRecordDto testRecord, HttpServletRequest httpServletRequest) throws Exception { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
TestRecord testInstance = testRecordService.createTestInstance(testRecord, dlpUser); |
||||
return testInstance != null ? R.ok(testInstance, "创建成功!") : R.failed("创建失败!"); |
||||
} |
||||
|
||||
@PutMapping("/updateTestInstance") |
||||
@ApiOperation(value = "修改实验", notes = "修改实验") |
||||
public R updateTestInstance(@RequestBody TestRecord testRecord) { |
||||
TestRecord testInstance = testRecordService.updateTestInstance(testRecord); |
||||
return testInstance != null ? R.ok(testInstance, "修改成功!") : R.failed("修改失败!"); |
||||
} |
||||
|
||||
@GetMapping("/getById") |
||||
@ApiOperation(value = "通过实验Id查询实验信息", notes = "通过实验Id查询实验信息") |
||||
public R<TestRecordVo> getTestRecord(String id, HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(testRecordService.getTestRecord(id, dlpUser), "查询成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getByIdTest") |
||||
@ApiOperation(value = "通过实验Id查询实验信息", notes = "通过实验Id查询实验信息") |
||||
public R getByIdTest(String id, HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(testRecordService.getById(id), "查询成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getPage") |
||||
@ApiOperation(value = "分页查询实验信息", notes = "分页查询实验信息") |
||||
public R<IPage<TestRecordVo>> getTestRecordPageList(Page page, HttpServletRequest httpServletRequest, |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") LocalDateTime startTime, |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") LocalDateTime endTime, |
||||
String businessType) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(testRecordService.getTestRecordPageList(page, dlpUser, startTime, endTime, businessType), "查询成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getList") |
||||
@ApiOperation(value = "列表查询实验信息", notes = "列表查询实验信息") |
||||
public R<List<TestRecordVo>> getTestRecordList(HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(testRecordService.getTestRecordList(dlpUser), "查询成功!"); |
||||
} |
||||
|
||||
@PutMapping("/useTemplate") |
||||
@ApiOperation(value = "使用模板", notes = "使用模板") |
||||
public R useTemplate(String testId, String templateId) throws Exception { |
||||
return R.ok(testRecordService.useTemplate(testId, templateId), "使用成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getProcedure") |
||||
@ApiOperation(value = "获取步骤是否完成的参数") |
||||
public R<ProcedureVo> getProcedure(String testId) { |
||||
return R.ok(testRecordService.getProcedure(testId), "数据获取成功!"); |
||||
} |
||||
|
||||
|
||||
@GetMapping("/solutionPage") |
||||
@ApiOperation(value = "分页查询实验中所有溶液编号") |
||||
public R getResultSolutionPage(Page page, String testId) { |
||||
return R.ok(testRecordService.getResultSolutionPage(page, testId), "数据获取成功!"); |
||||
} |
||||
|
||||
@DeleteMapping |
||||
@ApiOperation(value = "通过实验ID删除这个实验") |
||||
public R delTestRecord(String testId) { |
||||
return testRecordService.delTestRecord(testId) ? R.ok("删除成功!") : R.failed(" 删除失败!"); |
||||
} |
||||
|
||||
@PostMapping("/uploadTestAtlas") |
||||
@ApiOperation(value = "上传该实验的实验图谱") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "testId", value = "实验id", required = true) |
||||
}) |
||||
public R uploadTestAtlas(@RequestParam("testId") String testId, @RequestPart("file") MultipartFile file) { |
||||
// ? R.ok("上传实验图谱成功!") : R.failed("上传实验图谱删除失败!")
|
||||
try { |
||||
return testRecordService.uploadTestAtlas(testId, file); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("系统出错,请联系管理员!"); |
||||
} |
||||
} |
||||
|
||||
@GetMapping("/getTestAtlasList") |
||||
@ApiOperation(value = "获取图谱列表") |
||||
@ApiImplicitParam(name = "testId", value = "该实验图谱关联的实验id") |
||||
public R getTestAtlasList(@RequestParam("testId") String testId) { |
||||
return testRecordService.getTestAtlasList(testId); |
||||
} |
||||
|
||||
@GetMapping("/getTestAtlasListByBusinessId") |
||||
@ApiOperation(value = "根据业务id获取图谱列表") |
||||
@ApiImplicitParam(name = "businessId", value = "该实验图谱关联的实验id") |
||||
public R getTestAtlasListByBusinessId(@RequestParam("businessId") String businessId) { |
||||
try { |
||||
return testRecordService.getTestAtlasListByBusinessId(businessId); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("系统出错,请联系管理员!"); |
||||
} |
||||
} |
||||
|
||||
@DeleteMapping("/deleteTestAtlas") |
||||
@ApiOperation(value = "删除图谱,支持批量删除") |
||||
public R deleteTestAtlas(@RequestBody @Valid DeleteTestAtlasDTO dto) { |
||||
try { |
||||
return testRecordService.deleteTestAtlas(dto); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed(e.getMessage()); |
||||
} |
||||
} |
||||
|
||||
@GetMapping("/getTestAtlasByFileId") |
||||
@ApiOperation(value = "根据实验id和文件id获取图片") |
||||
@ApiImplicitParam(name = "testId", value = "该实验图谱关联的实验id") |
||||
public void getTestAtlasByFileId(@RequestParam("testId") String testId, |
||||
@RequestParam("fileId") String fileId, |
||||
HttpServletResponse httpServletResponse) throws IOException { |
||||
try { |
||||
TestRecord testRecord = testRecordService.getById(testId); |
||||
JSONArray jsonArray = JSONArray.parseArray(testRecord.getTestAtlas()); |
||||
for (int i = 0; i < jsonArray.size(); i++) { |
||||
JSONObject object = jsonArray.getJSONObject(i); |
||||
if (object.getString("fileId").equals(fileId)) { |
||||
ossFile.fileGet(object.getString("path"), httpServletResponse.getOutputStream()); |
||||
httpServletResponse.setContentType(new MimetypesFileTypeMap().getContentType(object.getString("fileName"))); |
||||
break; |
||||
} |
||||
} |
||||
}catch (AmazonS3Exception s3e) { |
||||
httpServletResponse.sendError(s3e.getStatusCode(), s3e.toString()); |
||||
} catch (Exception e) { |
||||
httpServletResponse.sendError(501, e.toString()); |
||||
} |
||||
// return R.ok(ossFile.fileList(TestRecordFileUrl.TEST_ATLAS_PATH.getFileUrl()+testId));
|
||||
} |
||||
|
||||
@PostMapping("/queryTestRecordInfoByBusinessId") |
||||
@ApiOperation("根据业务id获取实验信息") |
||||
public R<Map<String, TestRecordVo>> queryTestRecordInfoByBusinessId(@RequestBody List<String> businessIds) { |
||||
try { |
||||
return testRecordService.queryTestRecordInfoByBusinessId(businessIds); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed(e.getMessage()); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,82 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.constant.TestRecordFileUrl; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordInstrumentCondition; |
||||
import digital.laboratory.platform.inspection.service.TestRecordInstrumentConditionService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
@RestController |
||||
@RequestMapping("/testRecord_instrumentCondition") |
||||
@Api(tags = "12-检验记录-仪器的使用条件", description = "检验记录-仪器的使用条件") |
||||
public class TestRecordInstrumentConditionController { |
||||
|
||||
@Resource |
||||
private TestRecordInstrumentConditionService testRecordInstrumentConditionService; |
||||
|
||||
|
||||
@ApiOperation(value = "添加实验仪器条件", notes = "添加实验仪器条件") |
||||
@PostMapping("/addInstrumentCondition") |
||||
public R addInstrumentCondition(@RequestBody TestRecordInstrumentCondition testRecordInstrumentCondition) { |
||||
TestRecordInstrumentCondition instrumentCondition = testRecordInstrumentConditionService.addInstrumentCondition(testRecordInstrumentCondition); |
||||
return instrumentCondition != null ? R.ok(instrumentCondition, "添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@ApiOperation(value = "选择不同的模板类型,为实验创建仪器条件模板", notes = "type 1:(生物样本模板),-1 :(缴获物样本模板)") |
||||
@PostMapping("/createWord") |
||||
public R createConditionWordByTest(String testId) throws Exception { |
||||
boolean ret = testRecordInstrumentConditionService.createConditionWordByTest(testId); |
||||
return ret ? R.ok(TestRecordFileUrl.TEST_RECORD_CATALOGUE.getFileUrl() + "/" + testId + "/" + "仪器条件.docx", "创建成功!") : R.failed("创建失败!"); |
||||
} |
||||
|
||||
@ApiOperation(value = "选择不同的模板类型,为模板创建仪器条件模板", notes = "type 1:(生物样本模板),-1 :(缴获物样本模板)") |
||||
@PostMapping("/createWordTem") |
||||
public R createConditionWordByTemplate(String templateId) throws Exception { |
||||
boolean ret = testRecordInstrumentConditionService.createConditionWordByTemplate(templateId); |
||||
return ret ? R.ok(TestRecordFileUrl.TEST_RECORD_CATALOGUE.getFileUrl() + "/" + templateId + "/" + "仪器条件.docx", "创建成功!") : R.failed("创建失败!"); |
||||
} |
||||
|
||||
@ApiOperation(value = "修改实验仪器条件", notes = "修改实验仪器条件") |
||||
@PostMapping("/updateInstrumentCondition") |
||||
public R updateInstrumentCondition(@RequestBody TestRecordInstrumentCondition testRecordInstrumentCondition) { |
||||
TestRecordInstrumentCondition instrumentCondition = testRecordInstrumentConditionService.updateInstrumentCondition(testRecordInstrumentCondition); |
||||
return instrumentCondition != null ? R.ok(instrumentCondition, "修改成功!") : R.failed("修改失败!"); |
||||
} |
||||
|
||||
@ApiOperation(value = "删除实验仪器条件", notes = "删除实验仪器条件") |
||||
@DeleteMapping("/delInstrumentCondition") |
||||
public R delInstrumentCondition(String id) { |
||||
return testRecordInstrumentConditionService.delInstrumentCondition(id) ? R.ok("删除成功!") : R.failed("删除失败!"); |
||||
} |
||||
|
||||
@ApiOperation(value = "通过ID查询仪器条件") |
||||
@GetMapping("/getConditionById") |
||||
public R getInstrumentConditionById(String testId) { |
||||
return R.ok(testRecordInstrumentConditionService.getInstrumentConditionByTestId(testId)); |
||||
} |
||||
|
||||
|
||||
@ApiOperation(value = "为模板添加或移除仪器条件", notes = "为模板添加或移除仪器条件") |
||||
@PutMapping("/useConditionToTemplate") |
||||
public R useInstrumentConditionToTemplate(@RequestBody TestRecordArgumentDto argumentDto) { |
||||
return testRecordInstrumentConditionService.useInstrumentConditionToTemplate(argumentDto) ? R.ok("添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@PutMapping("/merge") |
||||
public R mergeFileByBiologicalSample(String testId) throws Exception { |
||||
return testRecordInstrumentConditionService.mergeFile(testId) ? R.ok("合并成功!") : R.failed("合并失败!"); |
||||
} |
||||
|
||||
@GetMapping("/generatedOrNot") |
||||
@ApiOperation(value = "判断是否创建了仪器条件模板", notes = "判断是否创建了仪器条件模板") |
||||
public R generatedOrNot(String testId) { |
||||
String filePath = testRecordInstrumentConditionService.generatedOrNot(testId); |
||||
return StrUtil.isNotBlank(filePath) ? R.ok(filePath) : R.failed("没有创建好仪器条件模板!"); |
||||
} |
||||
} |
@ -0,0 +1,98 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto; |
||||
import digital.laboratory.platform.inspection.entity.TaskInfo; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordInstrument; |
||||
import digital.laboratory.platform.inspection.service.TestRecordInstrumentService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordInstrumentController |
||||
* @description 实验中使用到的仪器设备 |
||||
* @create 2023/12/19 11:48 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/testRecord_instrument") |
||||
@Api(tags = "07-检验记录-使用仪器管理", description = "检验记录-使用仪器管理") |
||||
public class TestRecordInstrumentController { |
||||
@Resource |
||||
private TestRecordInstrumentService testRecordInstrumentService; |
||||
|
||||
//添加
|
||||
@PostMapping("/addInstrument") |
||||
@ApiOperation(value = "添加设备仪器", notes = "添加设备仪器") |
||||
public R addInstrument(@RequestBody TestRecordInstrument testRecordInstrument) { |
||||
TestRecordInstrument ret = testRecordInstrumentService.addTestRecordInstrument(testRecordInstrument); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加实验仪器设备成功"); |
||||
} else { |
||||
return R.failed("false", "添加实验仪器设备失败"); |
||||
} |
||||
} |
||||
|
||||
//修改接口
|
||||
@PostMapping("/updateInstrument") |
||||
@ApiOperation(value = "修改实验设备仪器", notes = "") |
||||
public R updateInstrument(@RequestBody TestRecordInstrument testRecordInstrument) { |
||||
TestRecordInstrument ret = testRecordInstrumentService.updateTestRecordInstrument(testRecordInstrument); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@DeleteMapping("/deleteInstrument") |
||||
@ApiOperation(value = "删除实验设备仪器信息", notes = "") |
||||
public R deleteInstrument(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = testRecordInstrumentService.deleteTestRecordInstrument(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getInstrumentPageList") |
||||
@ApiOperation(value = "获取实验中仪器设备分页数据", notes = "") |
||||
public R getInstrumentPageList(Page page, String testId, String keywords, Integer opCode) { |
||||
return R.ok(testRecordInstrumentService.getTestRecordInstrumentPageList(page, testId,keywords,opCode), "获取数据成功"); |
||||
} |
||||
|
||||
@GetMapping("/getInstrumentToTemplatePage") |
||||
@ApiOperation(value = "获取模板中仪器设备分页数据", notes = "") |
||||
public R getTemplateInstrumentPageList(Page page, String templateId, String keywords, Integer opCode) { |
||||
return R.ok(testRecordInstrumentService.getTemplateInstrumentPageList(page, templateId,keywords,opCode), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getInstrumentList") |
||||
@ApiOperation(value = "获取列表", notes = "") |
||||
public R getInstrumentList(TestRecordInstrument testRecordInstrument) { |
||||
return R.ok(testRecordInstrumentService.getTestRecordInstrumentList(testRecordInstrument), "获取数据成功"); |
||||
} |
||||
|
||||
@PutMapping("/useInstrument") |
||||
@ApiOperation(value = "添加或移除实验过程中使用的仪器设备", notes = "添加或移除实验过程中使用的仪器设备") |
||||
public R useTestRecordInstrument(@RequestBody TestRecordArgumentDto testRecordArgumentDto) { |
||||
return testRecordInstrumentService.useTestRecordInstrument(testRecordArgumentDto) ? R.ok("添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@PutMapping("/useInstrumentToTemplate") |
||||
@ApiOperation(value = "添加或移除模板中使用的仪器设备", notes = "添加或移除模板中使用的仪器设备") |
||||
public R useTemplateInstrument(@RequestBody TestRecordArgumentDto testRecordArgumentDto) { |
||||
return testRecordInstrumentService.useTemplateInstrument(testRecordArgumentDto) ? R.ok("添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
} |
@ -0,0 +1,91 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordMethod; |
||||
import digital.laboratory.platform.inspection.service.TestRecordMethodService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordMethodController |
||||
* @description |
||||
* @create 2023/12/19 15:25 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/testRecord_method") |
||||
@Api(tags = "08-检验记录-使用方法管理", description = "检验记录-使用方法管理") |
||||
public class TestRecordMethodController { |
||||
@Resource |
||||
private TestRecordMethodService testRecordMethodService; |
||||
|
||||
//添加
|
||||
@PostMapping("/addMethod") |
||||
@ApiOperation(value = "添加实验使用方法", notes = "添加设备仪器") |
||||
public R addMethod(@RequestBody TestRecordMethod testRecordMethod) { |
||||
TestRecordMethod ret = testRecordMethodService.addTestRecordMethod(testRecordMethod); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加实验方法成功"); |
||||
} else { |
||||
return R.failed("false", "添加实验方法失败"); |
||||
} |
||||
} |
||||
|
||||
//修改接口
|
||||
@PostMapping("/updateMethod") |
||||
@ApiOperation(value = "修改实验使用方法", notes = "") |
||||
public R updateMethod(@RequestBody TestRecordMethod testRecordMethod) { |
||||
TestRecordMethod ret = testRecordMethodService.updateTestRecordMethod(testRecordMethod); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@DeleteMapping("/deleteMethod") |
||||
@ApiOperation(value = "删除实验使用方法", notes = "") |
||||
public R deleteMethod(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = testRecordMethodService.deleteTestRecordMethod(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getMethodPageList") |
||||
@ApiOperation(value = "获取分页数据", notes = "") |
||||
public R getMethodPageList(Page page, TestRecordMethod testRecordMethod) { |
||||
return R.ok(testRecordMethodService.getTestRecordMethodPageList(page, testRecordMethod), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getMethodList") |
||||
@ApiOperation(value = "获取列表", notes = "") |
||||
public R getMethodList(TestRecordMethod testRecordMethod) { |
||||
return R.ok(testRecordMethodService.getTestRecordMethodList(testRecordMethod), "获取数据成功"); |
||||
} |
||||
|
||||
@PutMapping("/useMethod") |
||||
@ApiOperation(value = "使用方法、取消使用方法", notes = "testRecordId:实验ID、methodId:方法ID、opCode:1使用,-1取消使用") |
||||
public R useTestRecordMethod(@RequestBody TestRecordArgumentDto argumentDto) { |
||||
return testRecordMethodService.useTestRecordMethod(argumentDto) ? R.ok("操作成功!") : R.failed("操作失败!"); |
||||
} |
||||
|
||||
@PutMapping("/useMethodToTemplate") |
||||
@ApiOperation(value = "针对模板使用方法、取消使用方法", notes = "templateId:模板ID、methodId:方法ID、opCode:1使用,-1取消使用") |
||||
public R useTemplateMethod(@RequestBody TestRecordArgumentDto argumentDto) { |
||||
return testRecordMethodService.useTemplateMethod(argumentDto) ? R.ok("操作成功!") : R.failed("操作失败!"); |
||||
} |
||||
} |
@ -0,0 +1,99 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.lang.Assert; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordArgumentDto; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordMethod; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordReagent; |
||||
import digital.laboratory.platform.inspection.service.TestRecordMethodService; |
||||
import digital.laboratory.platform.inspection.service.TestRecordReagentService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordReagent |
||||
* @description 实验用到的试剂耗材,标准物质 |
||||
* @create 2023/12/20 10:07 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/testRecord_reagent") |
||||
@Api(tags = "09-检验记录-使用的试剂耗材,标准物质管理", description = "检验记录-使用的试剂耗材,标准物质管理") |
||||
public class TestRecordReagentController { |
||||
@Resource |
||||
private TestRecordReagentService testRecordReagentService; |
||||
|
||||
//添加
|
||||
@PostMapping("/addReagent") |
||||
@ApiOperation(value = "添加实验使用的试剂耗材、标准物质", notes = "添加实验使用的试剂耗材、标准物质") |
||||
public R addReagent(@RequestBody TestRecordReagent testRecordReagent) { |
||||
TestRecordReagent ret = testRecordReagentService.addTestRecordReagent(testRecordReagent); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加数据成功"); |
||||
} else { |
||||
return R.failed("false", "添加数据失败"); |
||||
} |
||||
} |
||||
|
||||
//修改接口
|
||||
@PutMapping("/updateReagent") |
||||
@ApiOperation(value = "修改实验使用试剂耗材、标准物质", notes = "") |
||||
public R updateReagent(@RequestBody TestRecordReagent testRecordReagent) { |
||||
TestRecordReagent ret = testRecordReagentService.updateTestRecordReagent(testRecordReagent); |
||||
if (ret != null) { |
||||
return R.ok(ret, "添加成功"); |
||||
} else { |
||||
return R.failed("false", "添加失败"); |
||||
} |
||||
} |
||||
|
||||
//删除数据
|
||||
@DeleteMapping("/deleteReagent") |
||||
@ApiOperation(value = "删除实验使用试剂耗材、标准物质", notes = "") |
||||
public R deleteReagent(String id) { |
||||
Assert.notBlank(id, "参数id不能为空"); |
||||
boolean ret = testRecordReagentService.deleteTestRecordReagent(id); |
||||
if (ret) { |
||||
return R.ok("true", "删除成功"); |
||||
} else { |
||||
return R.failed("false", "删除成功"); |
||||
} |
||||
} |
||||
|
||||
//显示列表分页
|
||||
@GetMapping("/getReagentPageList") |
||||
@ApiOperation(value = "获取实验中试剂耗材分页数据", notes = "参数:" + "\n" + "1.testId:实验ID" + "\n" + "2.keywords:查询参数" + "\n" + "3.category:试剂耗材类别(传入试剂耗材/标准物质二选一即可)" + "\n" + "4.opCode:传入1或-1(1是查询所有(去重),-1是查询这个实验下的所有)") |
||||
public R getReagentPageList(Page page, String testId, String keywords, String category, Integer opCode) { |
||||
return R.ok(testRecordReagentService.getTestRecordReagentPageList(page, testId, keywords, category, opCode), "获取数据成功"); |
||||
} |
||||
|
||||
//显示列表
|
||||
@GetMapping("/getReagentList") |
||||
@ApiOperation(value = "获取实验中试剂耗材列表数据", notes = "获取实验中试剂耗材列表数据") |
||||
public R getReagentList(String testId, String category) { |
||||
return R.ok(testRecordReagentService.getTestRecordReagentList(testId, category), "获取数据成功"); |
||||
} |
||||
|
||||
@PutMapping("/useReagent") |
||||
@ApiOperation(value = "添加或移除实验过程中的试剂耗材", notes = "testRecordId:实验ID、reagentId:试剂耗材ID、opCode:1使用,-1取消使用") |
||||
public R useTestRecordReagent(@RequestBody TestRecordArgumentDto testRecordArgumentDto) { |
||||
return testRecordReagentService.useTestRecordReagent(testRecordArgumentDto) ? R.ok("添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@PutMapping("/useReagentToTemplate") |
||||
@ApiOperation(value = "添加或移除模板中的试剂耗材", notes = "testRecordId:实验ID、reagentId:试剂耗材ID、opCode:1使用,-1取消使用") |
||||
public R useTestTemplateReagent(@RequestBody TestRecordArgumentDto testRecordArgumentDto) { |
||||
return testRecordReagentService.useTestTemplateReagent(testRecordArgumentDto) ? R.ok("添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@GetMapping("/getReagentToTemplatePage") |
||||
@ApiOperation(value = "获取模板中试剂耗材分页数据", notes = "参数:" + "\n" + "1.templateId:模板ID" + "\n" + "2.keywords:查询参数" + "\n" + "3.category:试剂耗材类别(传入试剂耗材/标准物质二选一即可)" + "\n" + "4.opCode:传入1或-1(1是查询所有(去重),-1是查询这个模板下的所有)") |
||||
public R getReagentToTemplatePageList(Page page, String templateId, String keywords, String category, Integer opCode) { |
||||
return R.ok(testRecordReagentService.getTestTemplateReagentPageList(page, templateId, keywords, category, opCode), "获取数据成功"); |
||||
} |
||||
} |
@ -0,0 +1,302 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.collection.CollUtil; |
||||
import com.alibaba.fastjson.JSONArray; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||
import digital.laboratory.platform.inspection.constant.BusinessType; |
||||
import digital.laboratory.platform.inspection.dto.*; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordSampleData; |
||||
import digital.laboratory.platform.inspection.service.TestRecordSampleDataService; |
||||
import digital.laboratory.platform.inspection.utils.TestDataFileUtil; |
||||
import digital.laboratory.platform.inspection.utils.datafile.hair.HairSewageCompoundData; |
||||
import digital.laboratory.platform.inspection.utils.datafile.nps.NPSDataFileStruct; |
||||
import digital.laboratory.platform.inspection.vo.TestResultBusinessVO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.apache.ibatis.exceptions.TooManyResultsException; |
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.validation.Valid; |
||||
import java.security.Principal; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordSampleDataController 实验数据控制器 |
||||
* @description |
||||
* @create 2024/1/19 15:57 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/testRecord_TestData") |
||||
@Api(tags = "15-检验记录-实验数据管理服务", description = "检验记录-实验数据管理服务接口") |
||||
public class TestRecordSampleDataController { |
||||
|
||||
@Resource |
||||
private TestRecordSampleDataService testRecordSampleDataService; |
||||
|
||||
//解析数据文件
|
||||
@PostMapping("/parseTestData") |
||||
@ApiOperation(value = "上传检验数据文件", notes = "上传检验数据文件") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "fileTypeCode", value = "上传的文件格式,10001 岛津 | 10002 沃特斯毛发案件 | 20002 沃特斯任务 | 20001 沃特斯毛发任务", required = true), |
||||
@ApiImplicitParam(name = "testId", value = "实验id", required = true) |
||||
}) |
||||
public R parseTestData(@RequestPart("file") MultipartFile file, |
||||
@RequestParam("fileTypeCode") String fileTypeCode, |
||||
@RequestParam("testId") String testId) { |
||||
try { |
||||
testRecordSampleDataService.validateTestStatus(testId); |
||||
switch (BusinessType.getBusinessTypeByType(fileTypeCode)) { |
||||
case SCREENING_EVENT: |
||||
case NPS_CASE: { |
||||
List<NPSDataFileStruct> retDataList = TestDataFileUtil.analysisNpsDataFile(file);//NPS文件解析
|
||||
// 先删除这个实验id有关的数据在插入下新数据
|
||||
testRecordSampleDataService.remove(Wrappers.<TestRecordSampleData>lambdaQuery().eq(TestRecordSampleData::getTestId, testId)); |
||||
Boolean saveTestDataFromNps = testRecordSampleDataService.saveTestDataFromNps(retDataList, testId); |
||||
return saveTestDataFromNps ? R.ok(true, "上传数据成功") : R.failed(false, "上传数据失败!"); |
||||
} |
||||
case BOINT_CASE: { |
||||
Map<String, List<HairSewageCompoundData>> hairCompoundDataMap = TestDataFileUtil.analysisWtsDataFile(file, 1);//毛发案件文件解析 /毛发任务文件解析
|
||||
// 先删除这个实验id有关的数据在插入下新数据
|
||||
testRecordSampleDataService.remove(Wrappers.<TestRecordSampleData>lambdaQuery().eq(TestRecordSampleData::getTestId, testId)); |
||||
Boolean saveTestDataHairCase = testRecordSampleDataService.saveTestDataHairCase(hairCompoundDataMap, testId); |
||||
return saveTestDataHairCase ? R.ok(true, "上传数据成功") : R.failed(false, "上传数据失败!"); |
||||
} |
||||
case SEWAGE_JOB: { |
||||
// /污水任务文件解析
|
||||
Map<String, List<HairSewageCompoundData>> sewageCompoundDataMap = TestDataFileUtil.analysisWtsDataFile(file, 2);//毛发案件文件解析 /毛发任务文件解析
|
||||
// 先删除这个实验id有关的数据在插入下新数据
|
||||
testRecordSampleDataService.remove(Wrappers.<TestRecordSampleData>lambdaQuery().eq(TestRecordSampleData::getTestId, testId)); |
||||
Boolean saveTestDataHairCase = testRecordSampleDataService.saveTestDataHairSewageTask(sewageCompoundDataMap, testId, fileTypeCode); |
||||
return saveTestDataHairCase ? R.ok(true, "上传数据成功") : R.failed(false, "上传数据失败!"); |
||||
} |
||||
case BOINT_JOB: { |
||||
// /毛发任务文件解析
|
||||
Map<String, List<HairSewageCompoundData>> hairCompoundDataMap = TestDataFileUtil.analysisWtsDataFile(file, 1);//毛发案件文件解析 /毛发任务文件解析
|
||||
// 先删除这个实验id有关的数据在插入下新数据
|
||||
testRecordSampleDataService.remove(Wrappers.<TestRecordSampleData>lambdaQuery().eq(TestRecordSampleData::getTestId, testId)); |
||||
Boolean saveTestDataHairCase = testRecordSampleDataService.saveTestDataHairSewageTask(hairCompoundDataMap, testId, fileTypeCode); |
||||
return saveTestDataHairCase ? R.ok(true, "上传数据成功") : R.failed(false, "上传数据失败!"); |
||||
} |
||||
} |
||||
} catch (Exception err) { |
||||
err.printStackTrace(); |
||||
if (err instanceof RuntimeException) { |
||||
return R.failed(err.getMessage()); |
||||
} |
||||
return R.failed("上传文件异常,请检查数据文件"); |
||||
} |
||||
return R.failed("上传文件异常,请检查数据文件"); |
||||
} |
||||
|
||||
//手动录入结果的保存 -nps
|
||||
@PostMapping("/saveNpsManualData") |
||||
@ApiOperation(value = "保存手动录入的实验结果数据", notes = "保存手动录入的实验结果数据") |
||||
private R saveNpsManualData(@RequestBody List<NPSDataFileStruct> npsDataFileStruct, String testId) { |
||||
return R.ok(testRecordSampleDataService.saveTestDataFromNps(npsDataFileStruct, testId)); |
||||
} |
||||
|
||||
@PutMapping("/saveQuantitativeResults") |
||||
@ApiOperation(value = "保存实验数据的定量结果", notes = "保存实验数据的定量结果") |
||||
private R saveQuantitativeResults(@RequestBody SaveQuantitativeResultsDTO dto) { |
||||
boolean success = false; |
||||
try { |
||||
success = testRecordSampleDataService.saveQuantitativeResults(dto); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
if (e instanceof TooManyResultsException) { |
||||
return R.failed(String.format("在上样编号 %s 中检测化合物 %s 在不同的实验中出现重复!", dto.getSampleName(), dto.getCompoundName())); |
||||
} else if (e instanceof RuntimeException) { |
||||
return R.failed(e.getMessage()); |
||||
} |
||||
return R.failed("系统出错,请联系管理员!"); |
||||
} |
||||
return R.ok(success); |
||||
} |
||||
|
||||
@DeleteMapping("/deleteQuantitativeResults") |
||||
@ApiOperation(value = "删除实验数据的定量结果", notes = "删除实验数据的定量结果, 这里的删除只是把定量结果制空") |
||||
private R deleteQuantitativeResults(@RequestParam("testSampleDataId") String testSampleDataId) { |
||||
boolean deleted = false; |
||||
try { |
||||
deleted = testRecordSampleDataService.deleteQuantitativeResults(testSampleDataId); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
if (e instanceof RuntimeException) { |
||||
return R.failed("删除失败!" + e.getMessage()); |
||||
} |
||||
return R.failed("删除失败!"); |
||||
} |
||||
return R.ok(deleted); |
||||
} |
||||
|
||||
@PutMapping("/updateEntrustTestData") |
||||
@ApiOperation(value = "修改导入的实验数据", notes = "修改导入的实验数据") |
||||
private R updateEntrustTestData(@RequestBody UpdateEntrustTestDataDTO dto) { |
||||
try { |
||||
testRecordSampleDataService.validateTestStatus(dto.getTestId()); |
||||
List<UpdateEntrustTestDataDTO> list = dto.getList(); |
||||
if (CollUtil.isNotEmpty(list)) { |
||||
for (UpdateEntrustTestDataDTO updateEntrustTestDataDTO : list) { |
||||
testRecordSampleDataService.updateEntrustTestData(updateEntrustTestDataDTO); |
||||
} |
||||
return R.ok("实验数据保存成功"); |
||||
} else { |
||||
return R.ok(testRecordSampleDataService.updateEntrustTestData(dto)); |
||||
} |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
if (e instanceof RuntimeException) { |
||||
return R.failed("实验数据保存失败!" + e.getMessage()); |
||||
} |
||||
return R.failed("实验数据保存失败!"); |
||||
} |
||||
} |
||||
|
||||
//分析获取检验结果
|
||||
@GetMapping("/getAnalysisTestResult") |
||||
@ApiOperation(value = "获取实验结果", notes = "获取实验结果, 其中 " + |
||||
"targetRtTime 目标物保留时间," + |
||||
"stdRtTime 标准物保留时间," + |
||||
"rtTimeError 保留时间相对误差," + |
||||
"rtTimeWithinError 保留时间是否在误差范围内") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "testId", value = "实验id", required = true), |
||||
@ApiImplicitParam(name = "type", value = "检验数据的类型,比如说是nps的还是毛发案件的", required = true) |
||||
}) |
||||
public R getAnalysisTestResult(@RequestParam("testId") String testId, @RequestParam("type") String type) { |
||||
if (type.equals(BusinessType.BOINT_CASE.getBusinessType()) |
||||
|| type.equals(BusinessType.NPS_CASE.getBusinessType()) |
||||
|| type.equals(BusinessType.SCREENING_EVENT.getBusinessType())) { |
||||
return R.ok(testRecordSampleDataService.getSampleTestDataByTestId(testId, type)); |
||||
} else { |
||||
// 任务实验数据
|
||||
Map<String, JSONArray> map = testRecordSampleDataService.queryTaskTestResult(testId); |
||||
return R.ok(map); |
||||
} |
||||
} |
||||
|
||||
@PostMapping("/getAnalysisTestResultPage") |
||||
@ApiOperation(value = "分页查询-获取实验结果", notes = "分页查询-获取实验结果") |
||||
public R<Page<Object>> getAnalysisTestResultPage(@RequestBody @Valid AnalysisTestResultPageDTO pageDTO) { |
||||
Page<Object> page = null; |
||||
try { |
||||
page = testRecordSampleDataService.getSampleTestDataByTestIdPage(pageDTO); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("查询失败,系统异常!"); |
||||
} |
||||
return R.ok(page); |
||||
} |
||||
|
||||
@GetMapping("/getSampleTestDataByBusinessId") |
||||
@ApiOperation(value = "根据业务id查询检验数据, 这里的业务id可能是委托id 、 筛查id、 任务id", notes = "根据业务id查询检验数据, 这里的业务id可能是委托id 、 筛查id、 任务id") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "businessId", value = "业务id", required = true), |
||||
@ApiImplicitParam(name = "type", value = "查询的业务类型, 10000 委托 | 20000 任务 | 30000 筛查", required = false) |
||||
}) |
||||
public R getSampleTestDataByBusiness(@RequestParam("businessId") String businessId, Integer type) { |
||||
List<?> sampleTestDataByBusiness = null; |
||||
try { |
||||
if (type != null && type.equals(20000)) { |
||||
// 20000 代表该业务id是任务的
|
||||
Map<String, JSONArray> map = testRecordSampleDataService.queryTaskTestResultByBusiness(businessId); |
||||
return R.ok(map); |
||||
} |
||||
sampleTestDataByBusiness = testRecordSampleDataService.getSampleTestDataByBusiness(businessId); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
if (e.getMessage().contains("Duplicate key")) { |
||||
return R.failed("查询失败,系统异常,数据中在同一个化合物中有重复编号存在!"); |
||||
} else if (e instanceof RuntimeException) { |
||||
return R.failed("查询失败,系统异常!" + e.getMessage()); |
||||
} |
||||
return R.failed("查询失败,系统异常!"); |
||||
} |
||||
return R.ok(sampleTestDataByBusiness); |
||||
} |
||||
|
||||
// 实验结果等相关接口
|
||||
@PostMapping("/queryTestResultPage") |
||||
@ApiOperation(value = "实验结果查询中分页查询", notes = "实验结果查询中分页查询, 10000 委托、20000 任务、 30000 筛查") |
||||
public R<IPage<TestResultBusinessVO>> queryTestResultPage(@RequestBody QueryTestResultPageDTO dto, HttpServletRequest theHttpServletRequest) { |
||||
Principal principal = theHttpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
IPage<TestResultBusinessVO> resultPage = null; |
||||
try { |
||||
resultPage = testRecordSampleDataService.queryTestResultPage( |
||||
new Page<TestResultBusinessVO>(dto.getCurrent(), dto.getSize()), |
||||
dto, dlpUser); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("分页查询出错,详细信息请查看控制台!"); |
||||
} |
||||
|
||||
return R.ok(resultPage); |
||||
} |
||||
|
||||
@PostMapping("/finishTest") |
||||
@ApiOperation(value = "完成实验", notes = "完成实验") |
||||
@ApiImplicitParam(name = "testId", value = "实验id", required = true) |
||||
public R finishTest(@RequestParam("testId") String testId) { |
||||
// testRecordSampleDataService.finishTest(testId);
|
||||
try { |
||||
return testRecordSampleDataService.finishTest(testId); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed(e.getMessage()); |
||||
} |
||||
} |
||||
|
||||
@PostMapping("/queryWaitApproveTaskTestDataPage") |
||||
@ApiOperation(value = "分页查询-获取审核的任务检验数据", notes = "分页查询-获取审核的任务检验数据") |
||||
public R queryWaitApproveTaskTestDataPage(@RequestBody @Valid TaskTestDataPageDTO pageDTO) { |
||||
Map<String, Object> map = null; |
||||
try { |
||||
map = testRecordSampleDataService.queryWaitApproveTaskTestDataPage(pageDTO); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
return R.failed("查询失败,系统异常!"); |
||||
} |
||||
return R.ok(map); |
||||
} |
||||
|
||||
@PutMapping("/audit") |
||||
@ApiOperation(value = "审核审批数据", notes = "审核审批数据") |
||||
public R audit(@RequestBody @Valid AuditDataDTO auditDataDTO, HttpServletRequest httpServletRequest) { |
||||
return testRecordSampleDataService.auditTaskTestData(auditDataDTO, httpServletRequest); |
||||
} |
||||
|
||||
|
||||
private void NPSTestResultAnalysis(List<NPSDataFileStruct> npsDataFileStructList) { |
||||
//NPS的分析暂时只考虑定性分析,定性分析的逻辑如下
|
||||
// 1、获取定性分析的条件, 2、循环该实验下的所有检材的数据,根据定性条件判断获取分析结果
|
||||
|
||||
} |
||||
|
||||
|
||||
@PutMapping("/updateCompoundCnName") |
||||
@ApiOperation(value = "添加中文化合物名称", notes = "添加中文化合物名称") |
||||
public R updateCompoundCnName(@RequestBody UpdateCompoundCnNameDto dto) { |
||||
List<TestRecordSampleData> list = testRecordSampleDataService.list(Wrappers.<TestRecordSampleData>lambdaQuery() |
||||
.in(TestRecordSampleData::getId, dto.getIdList())); |
||||
|
||||
list.forEach(testRecordSampleData -> { |
||||
testRecordSampleData.setCompoundCnName(dto.getCompoundCnName()); |
||||
testRecordSampleDataService.updateById(testRecordSampleData); |
||||
}); |
||||
return R.ok("更新成功!"); |
||||
} |
||||
} |
@ -0,0 +1,80 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordSampleSolutionDto; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordSampleSolution; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordStandardSolution; |
||||
import digital.laboratory.platform.inspection.service.TestRecordSampleSolutionService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@RequestMapping("/testRecord_sampleSolution") |
||||
@Api(tags = "10-检验记录-使用的样本溶液,样本溶液管理", description = "检验记录-使用的样本溶液,样本溶液管理") |
||||
public class TestRecordSampleSolutionController { |
||||
|
||||
@Resource |
||||
private TestRecordSampleSolutionService testRecordSampleSolutionService; |
||||
|
||||
@PostMapping("/addSolution") |
||||
@ApiOperation(value = "添加实验样本溶液", notes = "添加实验过程中使用的样本溶液") |
||||
public R<TestRecordSampleSolution> addTestRecordSampleSolution(@RequestBody TestRecordSampleSolutionDto testRecordSampleSolutionDto) { |
||||
TestRecordSampleSolution testRecordSampleSolution = testRecordSampleSolutionService.addTestRecordSampleSolution(testRecordSampleSolutionDto); |
||||
return testRecordSampleSolution != null ? R.ok(testRecordSampleSolution, "添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@DeleteMapping("/delSolution") |
||||
@ApiOperation(value = "删除实验样本溶液", notes = "删除实验过程中使用的样本溶液") |
||||
|
||||
public R delTestRecordSampleSolution(String id) { |
||||
return testRecordSampleSolutionService.delTestRecordSampleSolution(id) ? R.ok("删除成功!") : R.failed("删除失败!"); |
||||
} |
||||
|
||||
@PutMapping("/updateSolution") |
||||
@ApiOperation(value = "修改实验样本溶液", notes = "修改实验过程中使用的样本溶液") |
||||
public R<TestRecordSampleSolution> updateTestRecordSampleSolution(@RequestBody TestRecordSampleSolutionDto testRecordSampleSolutionDto) { |
||||
TestRecordSampleSolution testRecordSampleSolution = testRecordSampleSolutionService.updateTestRecordSampleSolution(testRecordSampleSolutionDto); |
||||
return testRecordSampleSolution != null ? R.ok(testRecordSampleSolution, "修改成功!") : R.failed("修改失败!"); |
||||
} |
||||
|
||||
@GetMapping("/getSolutionList") |
||||
@ApiOperation(value = "通过实验(检验)ID查询样本溶液集合", notes = "通过实验(检验)ID查询样本溶液集合") |
||||
public R<List<TestRecordSampleSolution>> getSolutionList(String testId, String keywords) { |
||||
return R.ok(testRecordSampleSolutionService.getSolutionList(testId, keywords), "查询成功"); |
||||
} |
||||
|
||||
@GetMapping("/getSolutionPage") |
||||
@ApiOperation(value = "通过实验(检验)ID查询样本溶液分页集合", notes = "通过实验(检验)ID查询样本溶液分页集合") |
||||
public R<IPage<TestRecordSampleSolution>> getSolutionPage(Page page, String testId, String keywords) { |
||||
return R.ok(testRecordSampleSolutionService.getSolutionPage(page, testId, keywords), "查询成功"); |
||||
} |
||||
|
||||
@PutMapping("/matchingWeighing") |
||||
@ApiOperation(value = "通过实验ID匹配样本溶液质量与计算浓度", notes = "通过实验ID匹配样本溶液质量与计算浓度") |
||||
public R<List<TestRecordSampleSolution>> matchingWeighing(String id) { |
||||
List<TestRecordSampleSolution> testRecordSampleSolutionList = testRecordSampleSolutionService.matchingWeighing(id); |
||||
return testRecordSampleSolutionList != null ? R.ok(testRecordSampleSolutionList, "匹配成功!") : R.failed("匹配失败!"); |
||||
} |
||||
|
||||
|
||||
@PostMapping("/createTaskSamSol") |
||||
@ApiOperation(value = "根据任务类型实验中选择的检材创建对应的样本溶液", notes = "根据任务类型实验中选择的检材创建对应的样本溶液") |
||||
public R createTaskSamSol(String testId) { |
||||
return testRecordSampleSolutionService.createTaskSamSol(testId) ? R.ok("创建成功!") : R.failed("创建失败!"); |
||||
} |
||||
|
||||
@PostMapping("/copy") |
||||
@ApiOperation(value = "根据已有样本溶液创建多个样本溶液",notes = "参数 testRecordSampleSolutionDto:已有样本溶液对象;testRecordSampleSolutionDto中的materialIdList:需要创建的对应检材ID集合") |
||||
public R copySolution(@RequestBody TestRecordSampleSolutionDto testRecordSampleSolutionDto) { |
||||
List<TestRecordSampleSolution> recordSampleSolutions = testRecordSampleSolutionService.copySolution(testRecordSampleSolutionDto); |
||||
return recordSampleSolutions != null ? R.ok(recordSampleSolutions, "创建成功!") : R.failed("创建失败!"); |
||||
} |
||||
} |
@ -0,0 +1,82 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.inspection.dto.TestRecordStandardSolutionDto; |
||||
import digital.laboratory.platform.inspection.entity.TestRecordStandardSolution; |
||||
import digital.laboratory.platform.inspection.service.TestRecordStandardSolutionService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@RequestMapping("/testRecord_standardSolution") |
||||
@Api(tags = "11-检验记录-使用的标准溶液,标准溶液", description = "检验记录-使用的标准溶液,标准溶液") |
||||
|
||||
public class TestRecordStandardSolutionController { |
||||
@Resource |
||||
private TestRecordStandardSolutionService testRecordStandardSolutionService; |
||||
|
||||
@PostMapping("/addSolution") |
||||
@ApiOperation(value = "添加实验标准溶液", notes = "添加实验过程中使用的标准溶液") |
||||
public R addTestRecordStandardSolution(@RequestBody TestRecordStandardSolutionDto testRecordStandardSolution) { |
||||
return testRecordStandardSolutionService.addTestRecordStandardSolution(testRecordStandardSolution) != null ? R.ok(testRecordStandardSolution, "添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@PostMapping("/addBlankSolution") |
||||
@ApiOperation(value = "添加空白溶剂、空白样品 type 1:空白溶剂 -1:空白样品", notes = "添加空白溶剂、空白样品 type 1:空白溶剂 -1:空白样品") |
||||
public R addBlankSolution(String testId,Integer type) { |
||||
TestRecordStandardSolution testRecordStandardSolution = testRecordStandardSolutionService.addBlankSolution(testId,type); |
||||
return testRecordStandardSolution != null ? R.ok(testRecordStandardSolution, "添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@PostMapping("/addQCSolution") |
||||
@ApiOperation(value = "添加质控溶液", notes = "添加质控溶液") |
||||
public R createQualityControlSol(String testId) { |
||||
List<TestRecordStandardSolution> qualityControlSol = testRecordStandardSolutionService.createQualityControlSol(testId); |
||||
return qualityControlSol.size()>0 ? R.ok(qualityControlSol, "添加成功!") : R.failed("添加失败!"); |
||||
} |
||||
|
||||
@DeleteMapping("/delSolution") |
||||
@ApiOperation(value = "删除实验标准溶液", notes = "删除实验过程中使用的标准溶液") |
||||
public R delTestRecordStandardSolution(String id) { |
||||
return testRecordStandardSolutionService.delTestRecordStandardSolution(id) ? R.ok("删除成功!") : R.failed("删除失败!"); |
||||
} |
||||
|
||||
@PutMapping("/updateSolution") |
||||
@ApiOperation(value = "修改实验标准溶液", notes = "修改实验过程中使用的标准溶液") |
||||
public R updateTestRecordStandardSolution(@RequestBody TestRecordStandardSolutionDto testRecordStandardSolutionDto) { |
||||
return testRecordStandardSolutionService.updateTestRecordStandardSolution(testRecordStandardSolutionDto) != null ? R.ok(testRecordStandardSolutionDto, "修改成功") : R.failed("修改失败!"); |
||||
} |
||||
|
||||
@GetMapping("/getSolutionPage") |
||||
@ApiOperation(value = "通过实验(检验)ID查询标准溶液分页集合", notes = "通过实验(检验)ID查询标准溶液分页集合") |
||||
public R<IPage<TestRecordStandardSolution>> getTestRecordStandardSolutionPage(Page<TestRecordStandardSolution> page, String testId, String keywords) { |
||||
return R.ok(testRecordStandardSolutionService.getTestRecordStandardSolutionPage(page, testId, keywords), "查询成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getSolutionList") |
||||
@ApiOperation(value = "通过实验(检验)ID查询标准溶液集合", notes = "通过实验(检验)ID查询标准溶液集合") |
||||
public R<List<TestRecordStandardSolution>> getTestRecordStandardSolutionList(String testId, String keywords) { |
||||
return R.ok(testRecordStandardSolutionService.getTestRecordStandardSolutionList(testId, keywords), "查询成功!"); |
||||
} |
||||
|
||||
@PutMapping("/matchingWeighing") |
||||
@ApiOperation(value = "通过实验ID匹配标准溶液质量与计算浓度", notes = "通过实验ID匹配标准溶液质量与计算浓度") |
||||
public R<List<TestRecordStandardSolution>> matchingWeighing(String id) { |
||||
List<TestRecordStandardSolution> testRecordStandardSolutions = testRecordStandardSolutionService.matchingWeighing(id); |
||||
return testRecordStandardSolutions != null ? R.ok(testRecordStandardSolutions, "匹配成功!") : R.failed("匹配失败!"); |
||||
} |
||||
|
||||
@GetMapping("/detection") |
||||
@ApiOperation(value = "判断实验中是否存在至少一瓶标准溶液", notes = "判断实验中是否存在至少一瓶标准溶液") |
||||
public R detection(String testId) { |
||||
return R.ok(testRecordStandardSolutionService.detection(testId)); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,87 @@ |
||||
package digital.laboratory.platform.inspection.controller; |
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import digital.laboratory.platform.common.core.util.R; |
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser; |
||||
import digital.laboratory.platform.inspection.dto.TemplateDeleteDto; |
||||
import digital.laboratory.platform.inspection.entity.TestTemplate; |
||||
import digital.laboratory.platform.inspection.service.TestTemplateService; |
||||
import digital.laboratory.platform.inspection.vo.TestTemplateVo; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.security.oauth2.provider.OAuth2Authentication; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.security.Principal; |
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@RequestMapping("/test_template") |
||||
@Api(tags = "13-实验模板", description = "实验模板") |
||||
public class TestTemplateController { |
||||
@Resource |
||||
private TestTemplateService testTemplateService; |
||||
|
||||
@PostMapping("/createTemplate/{testId}") |
||||
@ApiOperation(value = "根据实验创建模板") |
||||
public R createTemplate(@RequestBody TestTemplate testTemplate, HttpServletRequest httpServletRequest, @PathVariable String testId) throws Exception { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
TestTemplate template = testTemplateService.createTemplate(testTemplate, testId, dlpUser); |
||||
return template != null ? R.ok(template, "创建成功!") : R.failed("创建失败!"); |
||||
} |
||||
|
||||
@PutMapping("/editTemplate") |
||||
@ApiOperation(value = "修改模版信息") |
||||
public R editTemplate(TestTemplate testTemplate) { |
||||
return testTemplateService.editTemplate(testTemplate) != null ? R.ok(testTemplate, "修改成功!") : R.failed("修改失败!"); |
||||
} |
||||
|
||||
@PutMapping("/publishTemplate") |
||||
@ApiOperation(value = "通过ID发布模板") |
||||
public R publishTemplate(String id) { |
||||
TestTemplateVo template = testTemplateService.publishTemplate(id); |
||||
return template != null ? R.ok(template, "发布成功!") : R.failed("发布失败!"); |
||||
} |
||||
|
||||
@PutMapping("/blockTemplate") |
||||
@ApiOperation(value = "通过ID停用模板") |
||||
public R blockTemplate(String id) { |
||||
TestTemplateVo template = testTemplateService.blockTemplate(id); |
||||
return template != null ? R.ok(template, "停用成功!") : R.failed("停用失败!"); |
||||
} |
||||
|
||||
@GetMapping("/getTemplateById") |
||||
@ApiOperation(value = "通过ID查询模板信息") |
||||
public R getTemplateById(String id) { |
||||
return R.ok(testTemplateService.getTemplateById(id), "数据获取成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getTemplatePage") |
||||
@ApiOperation(value = "分页查询模板信息") |
||||
public R getTemplateVoPage(Page page, Integer opCode, HttpServletRequest httpServletRequest, String keywords) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(testTemplateService.getTemplateVoPage(page, opCode, dlpUser, keywords), "数据获取成功!"); |
||||
} |
||||
|
||||
@GetMapping("/getTemplateList") |
||||
@ApiOperation(value = "列表查询模板信息(创建实验时)") |
||||
public R getTemplateVoList(HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return R.ok(testTemplateService.getTemplateVoList(dlpUser), "数据获取成功!"); |
||||
} |
||||
|
||||
@DeleteMapping() |
||||
@ApiOperation(value = "根据ID删除模板") |
||||
public R delTemplate(@RequestBody List<String>idList, HttpServletRequest httpServletRequest) { |
||||
Principal principal = httpServletRequest.getUserPrincipal(); |
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal(); |
||||
return testTemplateService.delTemplate(idList, dlpUser) ? R.ok("删除成功!") : R.failed("删除失败!"); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,35 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
|
||||
/** |
||||
* 获取实验数据分页查询DTO类 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "AnalysisTestResultPageDTO", description = "获取实验数据分页查询DTO类") |
||||
public class AnalysisTestResultPageDTO { |
||||
|
||||
@ApiModelProperty("分页参数,每页多少条") |
||||
private long size = 10L; |
||||
|
||||
@ApiModelProperty("分页参数, 当前页") |
||||
private long current = 1L; |
||||
|
||||
@ApiModelProperty("实验id") |
||||
@NotBlank(message = "参数不全,请检查参数是否符合!") |
||||
private String testId; |
||||
|
||||
@ApiModelProperty("获取数据类型, 检验数据的类型,比如说是nps的还是毛发案件的") |
||||
private String type; |
||||
|
||||
// 搜索参数 待定
|
||||
@ApiModelProperty("关键字") |
||||
private String keyword; |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,13 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class AppraisalProcessDto { |
||||
|
||||
private String appraisalProcess; |
||||
|
||||
public AppraisalProcessDto(String appraisalProcess) { |
||||
this.appraisalProcess = appraisalProcess; |
||||
} |
||||
} |
@ -0,0 +1,19 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.entity.AssignmentInfo; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class AssignmentInfoDto extends AssignmentInfo { |
||||
|
||||
@ApiModelProperty(value = "类型 1 : 按业务分配 -1:按检材分配") |
||||
Integer type; |
||||
@ApiModelProperty(value = "查询参数") |
||||
private Integer opCode; |
||||
|
||||
@ApiModelProperty(value = "搜索参数") |
||||
private String keywords; |
||||
} |
@ -0,0 +1,28 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotEmpty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 审核数据请求参数DTO |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "AuditDataDTO", description = "审核数据请求参数DTO") |
||||
public class AuditDataDTO { |
||||
|
||||
@ApiModelProperty("任务检验数据的编号列表") |
||||
@NotEmpty(message = "未选择审核的数据!") |
||||
private List<String> sampleNoList; |
||||
|
||||
@ApiModelProperty("操作类型, -1 审核审批不通过 | 1 审核通过 | 2 审批通过 ") |
||||
@Min(value = -1, message = "操作值不匹配!") |
||||
@Max(value = 3, message = "操作值不匹配!") |
||||
private Integer opCode; |
||||
|
||||
} |
@ -0,0 +1,20 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 为了复用,通过BaseCaseDataDto 作为参数类型,在其中传递不同的具体子类对象 |
||||
*/ |
||||
public abstract class BaseCaseDataDto<T> { |
||||
// 定义抽象方法和属性
|
||||
public abstract String getTestId(); |
||||
public abstract String getTargetConcentration(); |
||||
public abstract String getStdConcentration(); |
||||
public abstract String getCompoundName(); |
||||
public abstract double getTargetRtTime(); |
||||
public abstract double getStdRtTime(); |
||||
public abstract String getRtTimeWithinError(); |
||||
public abstract List<T> getTestSampleDataList(); |
||||
public abstract int getIsDetected();//是否检出目标化合物
|
||||
public abstract String getSampleType();//样本类型- QC(质控) STD(标准品) Analyte(待测样品)
|
||||
} |
@ -0,0 +1,10 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class BusinessDto { |
||||
|
||||
private String businessId; |
||||
private String businessType; |
||||
} |
@ -0,0 +1,47 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 封装检验数据、样本溶液、检材连表查询的DTO类 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "DataSolutionSampleDTO", description = "封装检验数据、样本溶液、检材连表查询的DTO类") |
||||
public class DataSolutionSampleDTO { |
||||
|
||||
@ApiModelProperty("检验数据id") |
||||
private String sampleDataId; |
||||
|
||||
@ApiModelProperty("检验数据结果json") |
||||
private String dataResultJson; |
||||
|
||||
@ApiModelProperty("化合物名称") |
||||
private String compoundName; |
||||
|
||||
@ApiModelProperty("是否检出,是否检出该物质 1检出 0 未检出") |
||||
private Integer isDetected; |
||||
|
||||
@ApiModelProperty("溶液编号") |
||||
private String sampleNo; |
||||
|
||||
@ApiModelProperty("检验id") |
||||
private String testId; |
||||
|
||||
@ApiModelProperty("检材id") |
||||
private String materialId; |
||||
|
||||
@ApiModelProperty("检材名称") |
||||
private String sampleName; |
||||
|
||||
@ApiModelProperty("业务id") |
||||
private String businessId; |
||||
|
||||
@ApiModelProperty("化合物浓度") |
||||
private Double sampleConcentration; |
||||
|
||||
@ApiModelProperty("委托中检材的序号") |
||||
private Integer orderNo;//委托中检材的序号
|
||||
|
||||
} |
@ -0,0 +1,25 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
import javax.validation.constraints.NotEmpty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 删除图谱DTO参数 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "DeleteTestAtlasDTO", description = "删除图谱DTO参数") |
||||
public class DeleteTestAtlasDTO { |
||||
|
||||
@ApiModelProperty("检验id") |
||||
@NotBlank(message = "实验id不能为空!") |
||||
private String testId; |
||||
|
||||
@ApiModelProperty("删除的文件id列表") |
||||
@NotEmpty(message = "文件id不能为空!") |
||||
private List<String> fileIds; |
||||
} |
@ -0,0 +1,10 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
import digital.laboratory.platform.inspetion.api.entity.EntrustInfo; |
||||
import digital.laboratory.platform.inspetion.api.entity.MaterialDto; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
@Data |
||||
public class EntrustInfoDto extends EntrustInfo { |
||||
private List<MaterialDto> materialList; |
||||
} |
@ -0,0 +1,42 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
@ApiModel(value = "ExportSewageAnalystReportsDTO", description = "导出污水专项检测毒品分析报告") |
||||
public class ExportSewageAnalystReportsDTO { |
||||
|
||||
@ApiModelProperty("任务id") |
||||
String jobId; |
||||
|
||||
// @ApiModelProperty("月份")
|
||||
// LocalDate month;
|
||||
|
||||
@ApiModelProperty("省名称") |
||||
String provinceName = "陕西省"; |
||||
|
||||
@ApiModelProperty("省地区编码") |
||||
String provinceCode = "610000"; |
||||
|
||||
@ApiModelProperty("是否生成依托咪酯相关的数据, 默认不生成") |
||||
private Boolean generateEtomidateTable = false; |
||||
|
||||
@ApiModelProperty("人均日吸烟(支)") |
||||
private Double dailySmokingPerCapita; |
||||
|
||||
@ApiModelProperty("常见毒品及其代谢物") |
||||
private List<ReportConfigDTO> commonDrugAndMetabolites; |
||||
|
||||
@ApiModelProperty("人口标记物") |
||||
private List<ReportConfigDTO> populationMarkers; |
||||
|
||||
@ApiModelProperty("报告配置") |
||||
private JSONArray reportConfig; |
||||
} |
@ -0,0 +1,118 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.utils.datafile.hair.HairSewageCompoundData; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title HairCaseDataDto 毛发案件 数据文件解析信息 |
||||
* @description |
||||
* @create 2024/1/19 10:40 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "HairCaseDataDto", description = "毛发案件 数据文件解析信息") |
||||
public class HairSewageDataDto extends BaseCaseDataDto<HairSewageCompoundData> { |
||||
|
||||
@ApiModelProperty("对应的检验数据id") |
||||
private String testSampleDataId; |
||||
|
||||
@ApiModelProperty("目标物编号") |
||||
private String sampleNo; |
||||
|
||||
@ApiModelProperty("目标物名称") |
||||
private String sampleName; |
||||
|
||||
@ApiModelProperty("所属实验的ID") |
||||
private String testId;//所属实验的ID
|
||||
|
||||
@ApiModelProperty("目标物保留时间") |
||||
private double targetRtTime;//目标物保留时间
|
||||
|
||||
@ApiModelProperty("模板目标物保留时间") |
||||
private String tmpTargetRtTime;//模板目标物保留时间
|
||||
|
||||
@ApiModelProperty("目标物浓度 ng/mL") |
||||
private String targetConcentration;//目标物浓度 ng/mL
|
||||
|
||||
@ApiModelProperty("标准物保留时间") |
||||
private double stdRtTime;//标准物保留时间
|
||||
|
||||
@ApiModelProperty("标准物浓度") |
||||
private String stdConcentration;//标准物浓度
|
||||
|
||||
@ApiModelProperty("保留时间相对误差(%)") |
||||
private double rtTimeError;//保留时间相对偏差
|
||||
|
||||
@ApiModelProperty("模板保留时间相对误差(%)") |
||||
private String tmpRtTimeError;//保留时间相对偏差
|
||||
|
||||
@ApiModelProperty("保留时间是否在误差范围内, 是否符合") |
||||
private String rtTimeWithinError;//保留时间是否在误差范围内
|
||||
|
||||
@ApiModelProperty("定性离子对-上") |
||||
private String qualitativeIonPairUp; |
||||
|
||||
@ApiModelProperty("定性离子对-下") |
||||
private String qualitativeIonPairDown; |
||||
|
||||
@ApiModelProperty("峰面积-上") |
||||
private double peakAreaUp; |
||||
|
||||
@ApiModelProperty("模板峰面积-上") |
||||
private String tmpPeakAreaUp; |
||||
|
||||
@ApiModelProperty("峰面积-下") |
||||
private double peakAreaDown; |
||||
|
||||
@ApiModelProperty("模板峰面积-下") |
||||
private String tmpPeakAreaDown; |
||||
|
||||
@ApiModelProperty("离子丰度比") |
||||
private double ionAbundanceRatio; |
||||
|
||||
@ApiModelProperty("模板离子丰度比") |
||||
private String tmpIonAbundanceRatio; |
||||
|
||||
@ApiModelProperty("离子丰度比相对偏差(%)") |
||||
private double ionAbundanceRatioWithinError; |
||||
|
||||
@ApiModelProperty("模板离子丰度比相对偏差(%)") |
||||
private String tmpIonAbundanceRatioWithinError; |
||||
|
||||
@ApiModelProperty("是否检出") |
||||
private String whetherCheckOut; |
||||
|
||||
@ApiModelProperty("化合物名称") |
||||
private String compoundName; |
||||
|
||||
@ApiModelProperty("是否检出目标化合物") |
||||
private int isDetected;//是否检出目标化合物
|
||||
|
||||
@ApiModelProperty("样本类型- QC(质控) STD(标准品) Analyte(待测样品)") |
||||
private String sampleType;//样本类型- QC(质控) STD(标准品) Analyte(待测样品)
|
||||
|
||||
@ApiModelProperty("检验数据详情") |
||||
private List<HairSewageCompoundData> testSampleDataList;//检验数据详情
|
||||
|
||||
@ApiModelProperty("封装定性离子对和峰面积") |
||||
private List<Map<String, Object>> maps;//检验数据详情
|
||||
|
||||
@ApiModelProperty("业务类型") |
||||
private String businessType; |
||||
|
||||
@ApiModelProperty("定量结果") |
||||
private String quantitativeResults; |
||||
|
||||
@ApiModelProperty("化合物的中文名称") |
||||
private String compoundCnName; |
||||
|
||||
} |
||||
|
||||
|
||||
|
@ -0,0 +1,69 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.utils.datafile.nps.NPSTestDetailDataStruct; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title NPSCaseTestData NPS 案件定性数据文件对象--原始数据 |
||||
* @description |
||||
* @create 2024/1/19 10:39 |
||||
*/ |
||||
@Data |
||||
public class NPSCaseTestDataDto extends BaseCaseDataDto<NPSTestDetailDataStruct>{ |
||||
|
||||
@ApiModelProperty("对应的检验数据id") |
||||
private String testSampleDataId; |
||||
|
||||
private String sampleNo; |
||||
private String sampleName; |
||||
private String testId;//所属实验的ID
|
||||
private double targetRtTime;//目标物保留时间
|
||||
private String targetConcentration;//目标物浓度
|
||||
private double stdRtTime;//标准物保留时间
|
||||
private String stdConcentration;//标准物浓度
|
||||
private double rtTimeError;//保留时间相对偏差
|
||||
private String rtTimeWithinError;//保留时间是否在误差范围内
|
||||
private int isDetected;//是否检出目标化合物
|
||||
private String sampleType;//样本类型- QC(质控) STD(标准品) Analyte(待测样品)
|
||||
private List<NPSTestDetailDataStruct> testSampleDataList;//检验数据详情
|
||||
|
||||
@ApiModelProperty("是否检出") |
||||
private String whetherCheckOut; |
||||
|
||||
@ApiModelProperty("业务类型") |
||||
private String businessType; |
||||
|
||||
@ApiModelProperty("定量结果") |
||||
private String quantitativeResults; |
||||
|
||||
@ApiModelProperty("化合物名称") |
||||
private String compoundName; |
||||
|
||||
@ApiModelProperty("化合物的中文名称") |
||||
private String compoundCnName; |
||||
|
||||
//返回化合物名称
|
||||
/*public String getCompoundName(){ |
||||
String compoundName=""; |
||||
for (NPSTestDetailDataStruct npsTestDetailDataStruct : testSampleDataList) { |
||||
compoundName=npsTestDetailDataStruct.getName(); |
||||
break; |
||||
} |
||||
return compoundName; |
||||
}*/ |
||||
/*private String getDetectedResult(){ |
||||
if(isDetected==1){ |
||||
whetherCheckOut = "检出"+getCompoundName(); |
||||
return whetherCheckOut; |
||||
}else { |
||||
whetherCheckOut = "未检出"+getCompoundName(); |
||||
return whetherCheckOut; |
||||
} |
||||
|
||||
}*/ |
||||
} |
@ -0,0 +1,40 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title NPSCaseTestResultDto NPS 案件数据结果对象,这个需要加入标准溶液的数据信息 |
||||
* @description |
||||
* @create 2024/1/19 11:20 |
||||
*/ |
||||
@Data |
||||
public class NPSCaseTestResultDto { |
||||
|
||||
private String sampleId; |
||||
private String sampleName; |
||||
|
||||
private Double targetRetentionTime;//目标物保留时间
|
||||
private Double stdRetentionTime;//参考标准物质保留时间
|
||||
private Integer rtErrorValue;//保留时间误差值,就是目标物保留时间与参考标准物质保留时间的差值
|
||||
private Boolean isInErrorRange;//是否在误差范围内,true 在误差范围内,false 不在误差范围内
|
||||
|
||||
private Double stdIar2;//参考物质离子丰度比
|
||||
private Double stdIar3;//参考物质离子丰度比
|
||||
private Double stdIar4;//参考物质离子丰度比
|
||||
|
||||
private Double targetIar2;//检材离子丰度比2
|
||||
private Double targetIar3;//检材离子丰度比2
|
||||
private Double targetIar4;//检材离子丰度比2
|
||||
|
||||
private Double errorIarValue2;//碎片2的误差
|
||||
private Double errorIarValue3;//碎片3的误差
|
||||
private Double errorIarValue4;//碎片4的误差
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,35 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.utils.datafile.nps.NPSTestDetailDataStruct; |
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class NPSCaseTestSampleData { |
||||
private String sampleNo; |
||||
private String targetConcentration;//目标物浓度
|
||||
private String targetRtTime;//目标物保留时间
|
||||
private String stdRtTime;//标准物保留时间
|
||||
private String stdConcentration;//标准物浓度
|
||||
private String rtTimeError;//保留时间相对偏差
|
||||
private String rtTimeWithinError;//保留时间是否在误差范围内
|
||||
private String id; |
||||
private String name; |
||||
private String type; |
||||
private String mass;//mz 质荷比
|
||||
private String retTime;//保留时间
|
||||
private String startTime; |
||||
private String endTime; |
||||
private String area;//峰面积
|
||||
private String stdRetTime; |
||||
private String sn; |
||||
private String abundanceRatio;//丰度比,如果是基峰,我们设置为1,丰度比的公式为自己的峰面积/基峰峰面积
|
||||
private String abundanceRatio_std;// 标准物质的丰度比
|
||||
private String abundanceRatioError;//丰度比偏差,如果是基峰不需要比,公式是 (自己的丰度比-标准品的MZ对应丰度比)/标准品的MZ对应丰度比
|
||||
private String errorRange;//误差范围
|
||||
private String withinError;//丰度比偏差是否在误差范围内
|
||||
private int isBasePeak;//是否是基峰,0 不是基峰 1 是基峰
|
||||
|
||||
private String compoundName;//化合物名称
|
||||
private int isDetected;//是否检出 0:未检出 1:检出
|
||||
} |
||||
|
@ -0,0 +1,43 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import java.time.LocalDateTime; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 实验结果查询分页查询 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "QueryTestResultPageDTO", description = "实验结果查询分页查询的参数") |
||||
public class QueryTestResultPageDTO { |
||||
|
||||
@ApiModelProperty("分页参数,每页多少条") |
||||
private long size = 10L; |
||||
|
||||
@ApiModelProperty("分页参数, 当前页") |
||||
private long current = 1L; |
||||
|
||||
@ApiModelProperty("类型,10000 委托、20000 任务、 30000 筛查") |
||||
@NotNull(message = "参数不全, 请检查参数是否符合!") |
||||
private Integer type; |
||||
|
||||
@ApiModelProperty("关键字") |
||||
private String keyword; |
||||
|
||||
@ApiModelProperty("录入人-查询") |
||||
private String createBy; |
||||
|
||||
@ApiModelProperty("开始时间") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime startTime; |
||||
|
||||
@ApiModelProperty("结束时间") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime endTime; |
||||
|
||||
} |
@ -0,0 +1,59 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 各行政区主要毒品总消费量表 数据DTO 数据传输对象 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "RegionalDrugConsumptionDTO", description = "各行政区主要毒品总消费量表 数据DTO") |
||||
public class RegionalDrugConsumptionDTO { |
||||
|
||||
@ApiModelProperty("行政区域") |
||||
private String regional; |
||||
|
||||
@ApiModelProperty("人均消耗量Heroin 海洛因") |
||||
private String pccHeroin;//人均消耗量Heroin
|
||||
|
||||
@ApiModelProperty("人均消耗量MA 冰毒") |
||||
private String pccMa;//人均消耗量MA
|
||||
|
||||
@ApiModelProperty("人均消耗量K 氯胺酮") |
||||
private String pccK;//人均消耗量K
|
||||
|
||||
@ApiModelProperty("人均消耗量MDMA") |
||||
private String pccMdma;//人均消耗量MDMA
|
||||
|
||||
@ApiModelProperty("人均消耗量COC 可卡因") |
||||
private String pccCoc;//人均消耗量COC
|
||||
|
||||
@ApiModelProperty("人均消耗量Fen 芬太尼") |
||||
private String pccFen;//人均消耗量Fen
|
||||
|
||||
@ApiModelProperty("人均消耗量 - 综合") |
||||
private String pccTotal;//人均消耗量 - 综合
|
||||
|
||||
@ApiModelProperty("总消耗量Heroin 海洛因") |
||||
private String tcHeroin;//总消耗量Heroin
|
||||
|
||||
@ApiModelProperty("总消耗量MA 冰毒") |
||||
private String tcMa;//总消耗量MA
|
||||
|
||||
@ApiModelProperty("总消耗量K 氯胺酮") |
||||
private String tcK;//总消耗量K
|
||||
|
||||
@ApiModelProperty("总消耗量MDMA 摇头丸") |
||||
private String tcMdma;//总消耗量MDMA
|
||||
|
||||
@ApiModelProperty("总消耗量COC 可卡因") |
||||
private String tcCoc;//总消耗量COC
|
||||
|
||||
@ApiModelProperty("总消耗量Fen 芬太尼") |
||||
private String tcFen;//总消耗量Fen
|
||||
|
||||
@ApiModelProperty("总消费量(克/天) 综合") |
||||
private String tcTotal;//总消耗了THC
|
||||
|
||||
} |
@ -0,0 +1,26 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 生成污水报告或者毛发报告的配置信息 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "ReportConfigDTO", description = "生成污水报告或者毛发报告的配置信息") |
||||
public class ReportConfigDTO { |
||||
|
||||
@ApiModelProperty(value = "字典类型") |
||||
private String dictType; |
||||
|
||||
@ApiModelProperty(value = "字典名称") |
||||
private String dictLabel; |
||||
|
||||
@ApiModelProperty(value = "备注") |
||||
private String remark; |
||||
|
||||
@ApiModelProperty(value = "区分外层数据和里层的数据, 1 是外层 2 是里层或者为空") |
||||
private String type; |
||||
|
||||
} |
@ -0,0 +1,54 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
import javax.validation.constraints.NotNull; |
||||
|
||||
/** |
||||
* 重置进样信息位置请求参数 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "ResetSampleInjectorDTO", description = "重置进样信息位置请求参数") |
||||
public class ResetSampleInjectorDTO { |
||||
|
||||
@ApiModelProperty("进样信息的id") |
||||
@NotBlank(message = "参数不全,进样信息的id不能为空!") |
||||
private String id; |
||||
|
||||
|
||||
@ApiModelProperty("进样位置信息数组") |
||||
private JSONArray injectorInfo; |
||||
|
||||
/** |
||||
* 方盘-进样位置信息-1, 临时参数 |
||||
*//*
|
||||
@ApiModelProperty("方盘-进样位置信息-1, 临时参数") |
||||
@TableField(exist = false) |
||||
private JSONArray injectorInfo1; |
||||
|
||||
*//**
|
||||
* 方盘-进样位置信息-2, 临时参数 |
||||
*//*
|
||||
@ApiModelProperty("方盘-进样位置信息-2, 临时参数") |
||||
@TableField(exist = false) |
||||
private JSONArray injectorInfo2; |
||||
|
||||
*//**
|
||||
* 方盘-进样位置信息-3, 临时参数 |
||||
*//*
|
||||
@ApiModelProperty("方盘-进样位置信息-3, 临时参数") |
||||
@TableField(exist = false) |
||||
private JSONArray injectorInfo3; |
||||
|
||||
*//**
|
||||
* 方盘-进样位置信息-4, 临时参数 |
||||
*//*
|
||||
@ApiModelProperty("方盘-进样位置信息-4, 临时参数") |
||||
@TableField(exist = false) |
||||
private JSONArray injectorInfo4;*/ |
||||
} |
@ -0,0 +1,12 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title SCCaseDataDto |
||||
* @description |
||||
* @create 2024/1/19 10:41 |
||||
*/ |
||||
|
||||
public class SCCaseDataDto { |
||||
} |
@ -0,0 +1,87 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
@ApiModel(value = "SampleInjectorExcelDTO", description = "进样信息导出excel中的每一行数据DTO类") |
||||
public class SampleInjectorExcelDTO { |
||||
// @ExcelProperty:核心注解,value属性可用来设置表头名称,converter属性可以用来设置类型转换器;
|
||||
@ExcelProperty(value = "FILE_NAME") |
||||
@ApiModelProperty(value = "溶液编号") |
||||
private String fileName; |
||||
|
||||
@ExcelProperty(value = "FILE_TEXT") |
||||
@ApiModelProperty(value = "溶液浓度") |
||||
private String fileText; |
||||
|
||||
@ExcelProperty(value = "MS_FILE") |
||||
@ApiModelProperty("默认空白") |
||||
private String msFile; |
||||
|
||||
@ExcelProperty(value = "MS_TUNE_FILE") |
||||
@ApiModelProperty(value = "") |
||||
private String msTuneFile; |
||||
|
||||
@ExcelProperty(value = "INLET_FILE") |
||||
@ApiModelProperty(value = "") |
||||
private String inletFile; |
||||
|
||||
@ExcelProperty(value = "SAMPLE_LOCATION") |
||||
@ApiModelProperty("检材进样位置") |
||||
private String sampleLocation; |
||||
|
||||
@ExcelProperty(value = "SAMPLE_GROUP") |
||||
@ApiModelProperty(value = "") |
||||
private String sampleGroup; |
||||
|
||||
@ExcelProperty(value = "TYPE") |
||||
@ApiModelProperty(value = "溶液类型") |
||||
private String type; |
||||
|
||||
@ExcelProperty(value = "ID") |
||||
@ApiModelProperty("") |
||||
private String id; |
||||
|
||||
@ExcelProperty(value = "CONC_A") |
||||
@ApiModelProperty(value = "") |
||||
private String concA; |
||||
|
||||
@ExcelProperty(value = "CONC_B") |
||||
@ApiModelProperty(value = "") |
||||
private String concB; |
||||
|
||||
@ExcelProperty(value = "CONC_C") |
||||
@ApiModelProperty("") |
||||
private String concC; |
||||
|
||||
@ExcelProperty(value = "CONC_D") |
||||
@ApiModelProperty(value = "") |
||||
private String concD; |
||||
|
||||
@ExcelProperty(value = "CONC_E") |
||||
@ApiModelProperty(value = "") |
||||
private String concE; |
||||
|
||||
@ExcelProperty(value = "CONC_F") |
||||
@ApiModelProperty("") |
||||
private String concF; |
||||
|
||||
@ExcelProperty(value = "INJ_VOL") |
||||
@ApiModelProperty(value = "") |
||||
private String injVol; |
||||
|
||||
@ExcelProperty(value = "QUAN_REF") |
||||
@ApiModelProperty(value = "") |
||||
private String quanRef; |
||||
|
||||
@ExcelProperty(value = "METH_DB") |
||||
@ApiModelProperty("") |
||||
private String methDb; |
||||
|
||||
@ExcelProperty(value = "Index") |
||||
@ApiModelProperty(value = "") |
||||
private Integer index; |
||||
} |
@ -0,0 +1,33 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
|
||||
/** |
||||
* 保存实验数据的定量结果 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "SaveQuantitativeResultsDTO", description = "保存实验数据的定量结果") |
||||
public class SaveQuantitativeResultsDTO { |
||||
|
||||
@ApiModelProperty("目标物上样编号 --- 生物样本检验时的参数为上样编号") |
||||
private String sampleName; |
||||
|
||||
@ApiModelProperty("目标物检材编号 -- 缴获物检验时的参数为检材编号") |
||||
private String sampleNo; |
||||
|
||||
@ApiModelProperty("化合物名称") |
||||
@NotBlank(message = "参数不全,请检查参数!") |
||||
private String compoundName; |
||||
|
||||
@ApiModelProperty("定量结果") |
||||
@NotBlank(message = "参数不全,请检查参数!") |
||||
private String quantitativeResults; |
||||
|
||||
/*@ApiModelProperty("保存的数据类型") |
||||
@NotBlank(message = "参数不全,请检查参数!") |
||||
private String type;*/ |
||||
} |
@ -0,0 +1,51 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.sewage.vo.SewageJobIdentificationMaterialVO; |
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
@SuppressWarnings("all") |
||||
public class SewageDataDto extends SewageJobIdentificationMaterialVO { |
||||
private Double cotinineConcentration = 0.0;//可替宁(ng/L)
|
||||
private Double codeineConcentration = 0.0;//可待因(ng/L)
|
||||
private Double mdaConcentration = 0.0;//MDA(ng/L)
|
||||
private Double mdmaConcentration = 0.0;//MDMA(ng/L)
|
||||
private Double cocaineConcentration = 0.0;//可卡因(ng/L)
|
||||
private Double benzoylecgonineConcentration = 0.0;//苯甲酰爱康宁(ng/L)
|
||||
private Double morphineConcentration = 0.0;//吗啡(ng/L)
|
||||
private Double acetylmorphineConcentration = 0.0;//O6-单乙酰吗啡(ng/L)
|
||||
private Double methamphetamineConcentration = 0.0;//甲基苯丙胺(ng/L)
|
||||
private Double amphetamineConcentration = 0.0;//苯丙胺(ng/L)
|
||||
private Double ketamineConcentration = 0.0;//氯胺酮(ng/L)
|
||||
private Double norketamineConcentration = 0.0;//去甲氯胺酮(ng/L)
|
||||
private Double thcConcentration = 0.0;//四氢大麻酸(ng/L)
|
||||
private Double fenConcentration = 0.0;//芬太尼(ng/L)
|
||||
private Double etomidateConcentration = 0.0;//依托咪酯(ng/L)
|
||||
private Double dailySmokingPerCapita;//人均日吸烟
|
||||
private Double cotinineExcretion;//可替宁排泄量(mg/千人天)
|
||||
private Double estimatedPopulation;//测算人口(千人)
|
||||
private Double morphineLoad;//吗啡负荷量
|
||||
private Double codeineLoad;//可待因负荷量
|
||||
private Double codeineIsConvertedToMorphineLoad;//可待因转化为吗啡负荷量
|
||||
private Double medicalMorphineLoad;//医用吗啡负荷量
|
||||
private Double MA_AM; |
||||
private Double K_NK; |
||||
private Double pccHeroin;//人均消耗量Heroin
|
||||
private Double pccMa;//人均消耗量MA
|
||||
|
||||
private Double pccK;//人均消耗量K
|
||||
|
||||
private Double pccMdma;//人均消耗量MDMA
|
||||
private Double pccCoc;//人均消耗量COC
|
||||
private Double pccThc;//人均消耗量THC
|
||||
private Double pccFen;//人均消耗量Fen
|
||||
|
||||
private Double tcHeroin;//总消耗量Heroin
|
||||
private Double tcMa;//总消耗量MA
|
||||
private Double tcK;//总消耗量K
|
||||
private Double tcMdma;//总消耗量MDMA
|
||||
private Double tcCoc;//总消耗量COC
|
||||
private Double tcThc;//总消耗量THC
|
||||
private Double tcFen;//总消耗了Fen
|
||||
|
||||
} |
@ -0,0 +1,12 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.entity.TaskInfo; |
||||
import digital.laboratory.platform.inspetion.api.entity.MaterialDto; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class TaskInfoDto extends TaskInfo { |
||||
List<MaterialDto> materialList; |
||||
} |
@ -0,0 +1,61 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* 获取任务数据的DTO类 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "TaskTestDataDTO", description = "获取任务数据的DTO类") |
||||
public class TaskTestDataDTO { |
||||
|
||||
@ApiModelProperty("检验数据id") |
||||
private String sampleDataId; |
||||
|
||||
@ApiModelProperty("检验数据结果json") |
||||
private String dataResultJson; |
||||
|
||||
@ApiModelProperty("化合物名称") |
||||
private String compoundName; |
||||
|
||||
@ApiModelProperty("是否检出,是否检出该物质 1检出 0 未检出") |
||||
private Integer isDetected; |
||||
|
||||
@ApiModelProperty("溶液编号") |
||||
private String sampleNo; |
||||
|
||||
@ApiModelProperty("检验id") |
||||
private String testId; |
||||
|
||||
@ApiModelProperty("检材id") |
||||
private String materialId; |
||||
|
||||
@ApiModelProperty("检材名称") |
||||
private String sampleName; |
||||
|
||||
@ApiModelProperty("检材编号") |
||||
private String acceptNo; |
||||
|
||||
@ApiModelProperty("业务id") |
||||
private String businessId; |
||||
|
||||
@ApiModelProperty("任务名称") |
||||
private String taskName; |
||||
|
||||
@ApiModelProperty("业务类型") |
||||
private String businessType; |
||||
|
||||
@ApiModelProperty("任务数据审核状态") |
||||
private Integer status; |
||||
|
||||
@ApiModelProperty("对应的检材含这个化合物浓度") |
||||
private Double sampleConcentration; |
||||
|
||||
@ApiModelProperty("数据生成时间") |
||||
private LocalDateTime createTime; |
||||
|
||||
} |
@ -0,0 +1,38 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
|
||||
/** |
||||
* 获取任务审核数据时分页查询参数 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "TaskTestDataPageDTO", description = "获取任务审核数据时分页查询参数") |
||||
public class TaskTestDataPageDTO { |
||||
|
||||
@ApiModelProperty("分页参数,每页多少条") |
||||
@Min(value = 10, message = "每页条数不能小于10") |
||||
private int size = 10; |
||||
|
||||
@ApiModelProperty("分页参数, 当前页") |
||||
@Min(value = 1, message = "当前页不能小于1") |
||||
private int current = 1; |
||||
|
||||
// 搜索参数 待定
|
||||
@ApiModelProperty("关键字, 支持任务名称,检材名称") |
||||
private String keyword; |
||||
|
||||
// 搜索参数 待定
|
||||
@ApiModelProperty("业务类型") |
||||
private String businessType; |
||||
|
||||
// 状态值
|
||||
@ApiModelProperty("状态, 1 任务审核列表 | 2 任务审批列表") |
||||
@Max(value = 2, message = "最大值为2") |
||||
@Min(value = 1, message = "最小值不能小于1") |
||||
private Integer status; |
||||
} |
@ -0,0 +1,10 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
@Data |
||||
public class TemplateDeleteDto { |
||||
|
||||
List<String> idList; |
||||
} |
@ -0,0 +1,18 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class TestRecordArgumentDto { |
||||
|
||||
@ApiModelProperty(value = "实验ID") |
||||
private String testRecordId; |
||||
@ApiModelProperty("参数ID:例如试剂耗材ID、设备ID等") |
||||
private String argumentId; |
||||
@ApiModelProperty(value = "区分是添加还是移除 1:添加 -1:移除") |
||||
private Integer opCode; |
||||
|
||||
@ApiModelProperty(value = "模板ID") |
||||
private String templateId; |
||||
} |
@ -0,0 +1,14 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspetion.api.entity.TestRecord; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class TestRecordDto extends TestRecord { |
||||
|
||||
List<BusinessDto> businessDtoList; |
||||
|
||||
private String templateId; |
||||
} |
@ -0,0 +1,11 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.entity.TestRecordSampleSolution; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class TestRecordSampleSolutionDto extends TestRecordSampleSolution { |
||||
List<String> materialIdList; |
||||
} |
@ -0,0 +1,16 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import digital.laboratory.platform.inspection.entity.TestRecordStandardSolution; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class TestRecordStandardSolutionDto extends TestRecordStandardSolution { |
||||
@ApiModelProperty(value = "编号后缀,使用单个标准物质时必填") |
||||
private Integer orderNum; |
||||
|
||||
@ApiModelProperty(value = "混合标准溶液名称集合") |
||||
private List<String> standardNameList; |
||||
} |
@ -0,0 +1,12 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class UpdateCompoundCnNameDto { |
||||
|
||||
private List<String> idList; |
||||
private String compoundCnName; |
||||
} |
@ -0,0 +1,29 @@ |
||||
package digital.laboratory.platform.inspection.dto; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 修改导入的实验数据的参数DTO类 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "UpdateEntrustTestDataDTO", description = "修改导入的实验数据的参数DTO类") |
||||
public class UpdateEntrustTestDataDTO { |
||||
|
||||
@ApiModelProperty("保存的数据类型") |
||||
private String type; |
||||
|
||||
@ApiModelProperty("修改的具体数据信息") |
||||
private JSONObject param; |
||||
|
||||
@ApiModelProperty("修改的具体数据信息") |
||||
private String testId; |
||||
|
||||
@ApiModelProperty("只有该实验第一次保存数据时会接收这个参数,其他情况该参数为空") |
||||
List<UpdateEntrustTestDataDTO> list; |
||||
|
||||
} |
@ -0,0 +1,53 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
/* |
||||
*@title AssignmentInfo |
||||
*@description 分配信息 |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/13 10:50 |
||||
*/ |
||||
|
||||
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; |
||||
|
||||
@Data |
||||
@TableName(value = "b_assignmentInfo", autoResultMap = true) |
||||
@ApiModel(value = "分配信息", description = "分配信息") |
||||
public class AssignmentInfo extends BaseEntity { |
||||
private String id; |
||||
|
||||
@ApiModelProperty(value = "业务名称") |
||||
private String businessName; |
||||
|
||||
@ApiModelProperty(value = "业务类型") |
||||
private String businessType; |
||||
|
||||
@ApiModelProperty(value = "接收者Id") |
||||
private String testUser; |
||||
@ApiModelProperty(value = "分配者Id") |
||||
private String assignUser; |
||||
|
||||
@ApiModelProperty(value = "业务Id") |
||||
private String businessId; |
||||
|
||||
@ApiModelProperty(value = "样本ID") |
||||
private String sampleId; |
||||
|
||||
@ApiModelProperty(value = "样本名称") |
||||
private String sampleName; |
||||
|
||||
@ApiModelProperty(value = "接收者姓名") |
||||
private String testUserName; |
||||
|
||||
@ApiModelProperty(value = "分配者姓名") |
||||
private String assignUserName; |
||||
|
||||
//用来转换type类型的中文
|
||||
@TableField(exist = false) |
||||
private String businessTypeName; |
||||
|
||||
} |
@ -0,0 +1,95 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
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 io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import javax.validation.constraints.NotBlank; |
||||
import javax.validation.constraints.NotNull; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title 进样器管理 |
||||
* @description |
||||
* @create 2024/1/17 11:32 |
||||
*/ |
||||
@Data |
||||
@TableName(value = "b_sample_injector", autoResultMap = true) |
||||
@ApiModel(value = "进样器信息", description = "进样器信息") |
||||
public class SampleInjector extends BaseEntity { |
||||
|
||||
@ApiModelProperty("主键id") |
||||
private String id; |
||||
|
||||
/** |
||||
* 进样器类型 1、圆盘进样器,2、方盘进样器 |
||||
*/ |
||||
@ApiModelProperty("进样器类型 1、圆盘进样器,2、方盘进样器,0 未选择") |
||||
@NotNull(message = "请选择进样器类型!") |
||||
private Integer type = 0; |
||||
|
||||
/** |
||||
* 进样信息,位置信息,以json格式存储 |
||||
*/ |
||||
@ApiModelProperty("进样信息,位置信息,以json格式存储") |
||||
private String injectorInfo; |
||||
|
||||
/** |
||||
* 检验ID,进样信息是属于某次试验的进样信息 |
||||
*/ |
||||
@ApiModelProperty("检验ID,进样信息是属于某次试验的进样信息") |
||||
@NotBlank(message = "检验id不能为空!") |
||||
private String testId; |
||||
/** |
||||
* 空白起始位置 |
||||
*/ |
||||
@ApiModelProperty("空白起始位置") |
||||
private Integer blankStartPosition; |
||||
|
||||
/** |
||||
* 空白穿插次数 |
||||
*/ |
||||
@ApiModelProperty("空白穿插次数") |
||||
private Integer insertNumber; |
||||
|
||||
/** |
||||
* 是否已经保存, 默认false |
||||
*/ |
||||
@ApiModelProperty("是否可以重置标识, true 可以重置, false 不能重置") |
||||
private boolean resetFlag = true; |
||||
|
||||
// /**
|
||||
// * 方盘-进样位置信息-1, 临时参数
|
||||
// */
|
||||
// @ApiModelProperty("方盘-进样位置信息-1, 临时参数")
|
||||
// @TableField(exist = false)
|
||||
// private JSONArray injectorInfo1 = new JSONArray();
|
||||
//
|
||||
// /**
|
||||
// * 方盘-进样位置信息-2, 临时参数
|
||||
// */
|
||||
// @ApiModelProperty("方盘-进样位置信息-2, 临时参数")
|
||||
// @TableField(exist = false)
|
||||
// private JSONArray injectorInfo2 = new JSONArray();
|
||||
//
|
||||
// /**
|
||||
// * 方盘-进样位置信息-3, 临时参数
|
||||
// */
|
||||
// @ApiModelProperty("方盘-进样位置信息-3, 临时参数")
|
||||
// @TableField(exist = false)
|
||||
// private JSONArray injectorInfo3 = new JSONArray();
|
||||
//
|
||||
// /**
|
||||
// * 方盘-进样位置信息-4, 临时参数
|
||||
// */
|
||||
// @ApiModelProperty("方盘-进样位置信息-4, 临时参数")
|
||||
// @TableField(exist = false)
|
||||
// private JSONArray injectorInfo4 = new JSONArray();
|
||||
} |
@ -0,0 +1,38 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
||||
import digital.laboratory.platform.inspetion.api.entity.MaterialDto; |
||||
import io.swagger.annotations.ApiModel; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/* |
||||
*@title DrugScreen |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/8 11:33 |
||||
*/ |
||||
@Data |
||||
@TableName("b_case_screen") |
||||
@ApiModel(value = "案前筛查信息", description = "案前筛查信息") |
||||
public class ScreenInfo extends BaseEntity { |
||||
private String id; |
||||
private String caseName; |
||||
private LocalDateTime obtainTime; |
||||
private String businessType;//业务类型
|
||||
private Integer source; |
||||
private String distributionSituation; //区分是否已被分配以及分配的数量
|
||||
private String originalId;//原筛查ID
|
||||
@TableField(exist = false) |
||||
private String businessTypeName = "筛查事件"; |
||||
@TableField(exist = false) |
||||
private List<MaterialDto> materialList; |
||||
|
||||
@TableField(exist = false) |
||||
private Boolean isDistribution; |
||||
} |
@ -0,0 +1,55 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
import com.alibaba.fastjson.JSONArray; |
||||
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 digital.laboratory.platform.inspetion.api.entity.MaterialDto; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/* |
||||
*@title TaskInfo |
||||
*@description 任务信息实体 |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/7 15:17 |
||||
*/ |
||||
@Data |
||||
@TableName(value = "b_taskInfo", autoResultMap = true) |
||||
@ApiModel(value = "任务信息", description = "任务信息") |
||||
public class TaskInfo extends BaseEntity { |
||||
private String id; |
||||
private String taskName;//任务名称
|
||||
private String businessType;//业务类型
|
||||
private LocalDateTime taskStartDate;//任务开始日期
|
||||
private LocalDateTime taskEndDate;//任务截止日期
|
||||
private Integer source;//0,系统录入 1,手工录入
|
||||
private String originalId;//原任务ID 可能是污水任务或者毛发任务
|
||||
private String distributionSituation; //区分是否已被分配以及分配的数量
|
||||
|
||||
private String compounds;//[{"compound1":"aaaa","english":"ab-fui"}]
|
||||
|
||||
@ApiModelProperty(value = "生成报告的配置") |
||||
@TableField(value = "report_config", typeHandler = FastjsonTypeHandler.class) |
||||
private JSONArray reportConfig; |
||||
|
||||
@TableField(exist = false) |
||||
List<MaterialDto> materialList; |
||||
|
||||
@TableField(exist = false) |
||||
private String businessTypeName; |
||||
|
||||
@TableField(exist = false) |
||||
// 化合物json数组
|
||||
private JSONArray compoundsJsonArray; |
||||
|
||||
@TableField(exist = false) |
||||
private Boolean isDistribution; |
||||
|
||||
} |
@ -0,0 +1,28 @@ |
||||
package digital.laboratory.platform.inspection.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 lombok.Data; |
||||
|
||||
/* |
||||
*@title TestRecordInstrument |
||||
*@description |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/19 11:12 |
||||
*/ |
||||
@Data |
||||
@TableName("b_test_record_instrument") |
||||
@ApiModel(value = "实验中用到的仪器设备", description = "实验中用到的仪器设备") |
||||
public class TestRecordInstrument extends BaseEntity { |
||||
private String id; |
||||
private String instrumentNumber;//设备编号
|
||||
private String instrumentName;//设备名称
|
||||
private String instrumentProvider;//厂家名称
|
||||
private String instrumentTypeNo;//型号
|
||||
private Integer source;//来源,0 代表系统推送,1 代表手动录入
|
||||
|
||||
|
||||
} |
@ -0,0 +1,27 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
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; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordInstrumentCondition 仪器使用条件 |
||||
* @description |
||||
* @create 2024/1/11 9:39 |
||||
*/ |
||||
@Data |
||||
@TableName(value = "b_test_record_use_condition",autoResultMap = true) |
||||
@ApiModel(value = "实验中设备仪器条件", description = "实验中设备仪器条件") |
||||
public class TestRecordInstrumentCondition extends BaseEntity { |
||||
private String id; |
||||
private String testId;//检验ID
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class) |
||||
private String conditionData;//仪器条件内容(json 格式)
|
||||
private Integer businessFlag;//判断是7楼还是六楼的业务
|
||||
|
||||
} |
@ -0,0 +1,32 @@ |
||||
package digital.laboratory.platform.inspection.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 lombok.Data; |
||||
|
||||
import java.time.LocalDate; |
||||
|
||||
/* |
||||
*@title TestRecordInstrument |
||||
*@description 实验中用到的实验方法 |
||||
*@author xy |
||||
*@version 1.0 |
||||
*@create 2023/12/19 11:12 |
||||
*/ |
||||
@Data |
||||
@TableName("b_test_record_Method") |
||||
@ApiModel(value = "实验中用到的实验方法", description = "实验中用到的实验方法") |
||||
public class TestRecordMethod extends BaseEntity { |
||||
private String id; |
||||
private String methodName;//方法名称
|
||||
private String methodDescribe;//方法描述
|
||||
private String methodRange;//范围
|
||||
private String methodLevel;//方法等级(国际、行标等)
|
||||
private String methodFileNumber;//文件编号
|
||||
private LocalDate methodApprovalTime;//批准时间
|
||||
private LocalDate methodImplementTime;//实施时间
|
||||
private Integer source;//来源,0 代表系统推送,1 代表手动录入
|
||||
private String previewUrl;//方法Office地址
|
||||
} |
@ -0,0 +1,42 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @description |
||||
* 保留时间的最大误差允许范围是 正负1% |
||||
* <p/> |
||||
* 离子丰度比相对偏差(检材离子丰度比与标准物质离子丰度比之间的差值 d),根据文件中的规则设定,规则是: |
||||
* <p/> |
||||
* 1、d>50% 相对偏差为:正负 10% |
||||
* <p/> |
||||
* 2、d>20%~50% d小于等于50%,大于20% 相对偏差为:正负 15% |
||||
* <p/> |
||||
* 3、d>10%~20% 小于等于20%,大于10% 相对偏差为:正负 20% |
||||
* <p/> |
||||
* 4、d<=10% 小于等于10% 相对偏差为:正负 50% |
||||
* @create 2024/1/30 17:28 |
||||
* |
||||
*/ |
||||
@Data |
||||
@TableName(value = "b_test_record_qualitative_condition",autoResultMap = true) |
||||
public class TestRecordQualitativeCondition { |
||||
private String id; |
||||
@ApiModelProperty(value="保留时间相对误差") |
||||
private Double rtError; |
||||
@ApiModelProperty(value="是否包含保留时间上限: 0=不包含; 1=包含") |
||||
private Boolean includeRtErrorMax; |
||||
@ApiModelProperty(value="是否包含保留时间下限: 0=不包含; 1=包含") |
||||
private Boolean includeRtErrorMin; |
||||
@ApiModelProperty(value="是否包含离子丰度偏差下限: 0=不包含; 1=包含") |
||||
private Boolean includeRatioLow; |
||||
@ApiModelProperty(value="是否包含离子丰度偏差上限: 0=不包含; 1=包含") |
||||
private Boolean includeRatioHigh; |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,28 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity; |
||||
import io.swagger.annotations.ApiModel; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordReagent |
||||
* @description 试剂耗材 |
||||
* @create 2023/12/20 11:02 |
||||
*/ |
||||
@Data |
||||
@TableName("b_test_record_reagent_consumables") |
||||
@ApiModel(value = "实验中用到的试剂耗材", description = "实验中用到的试剂耗材") |
||||
public class TestRecordReagent extends BaseEntity { |
||||
private String id; |
||||
private String reagentConsumableName;//试剂耗材标准物质名称
|
||||
private String category;// 类别,表示是 试剂 还是 耗材 ,还是标准物质
|
||||
private String specifications; //型号规格
|
||||
private String purityGrade;//纯度等级,只有试剂有这个属性,当为耗材时为空
|
||||
private String number;//标准物质的编号,只有类型是标准物质的时候才设置
|
||||
private Integer sortIndex;// 排序
|
||||
private Integer source;//数据来源
|
||||
|
||||
} |
@ -0,0 +1,69 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
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; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordSampleSolution |
||||
* @description 实验结果数据 |
||||
* @create 2023/12/20 11:36 |
||||
*/ |
||||
@Data |
||||
@TableName(value = "b_test_record_sampledata", autoResultMap = true) |
||||
@ApiModel(value = "实验中样本检测结果数据", description = "实验中样本检测结果数据") |
||||
public class TestRecordSampleData extends BaseEntity { |
||||
private String id; |
||||
|
||||
private String testId;//实验ID,记录是哪次实验做的这个检材
|
||||
|
||||
@ApiModelProperty("数据从机器中导出的唯一标识, 目前只有生物样本案件需要") |
||||
private String name;//数据从机器中导出的唯一标识
|
||||
|
||||
private String sampleNo;//样本编号
|
||||
|
||||
private String compoundName;//检测的化合物(目标化合物)
|
||||
|
||||
private String stdConcentration;//标准品的浓度
|
||||
|
||||
private String sampleConcentration;//样本的浓度 ng/mL
|
||||
|
||||
private String rtTimeWithinError;//保留时间是否在误差范围 ±1 以内
|
||||
|
||||
private double targetRtTime;//目标物保留时间
|
||||
|
||||
private double stdRtTime;//标准物保留时间
|
||||
|
||||
private int isDetected;//是否检出目标化合物
|
||||
|
||||
private String sampleType;//样本类型- QC(质控) STD(标准品) Analyte(待测样品)
|
||||
|
||||
private String dataJson;//实验数据-原始数据,以JSON的形式来存储该样本的实验数据
|
||||
|
||||
private String dataResultJson;//检验数据结果
|
||||
|
||||
private String compoundCnName;//检测的化合物的中文名字
|
||||
|
||||
@ApiModelProperty("任务数据审核状态, 状态:\n" + |
||||
"0 待审核,\n" + |
||||
"1 已审核,\n" + |
||||
"2 已审批, \n" + |
||||
"3 已上传 \n" + |
||||
"上传到大数据平台(仅针对任务数据, 其他业务类型的数据默认0)") |
||||
private Integer status; |
||||
|
||||
private String getDetectedResult() { |
||||
if (isDetected == 1) { |
||||
return "检出" + compoundName; |
||||
} else { |
||||
return "未检出" + compoundName; |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,36 @@ |
||||
package digital.laboratory.platform.inspection.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 lombok.Data; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestRecordSampleSolution |
||||
* @description 样本溶液 |
||||
* @create 2023/12/20 11:36 |
||||
*/ |
||||
@Data |
||||
@TableName("b_test_record_sample_solution") |
||||
@ApiModel(value = "实验中配置的样本溶液", description = "实验中配置的样本溶液") |
||||
public class TestRecordSampleSolution extends BaseEntity { |
||||
private String id; |
||||
private String sampleNo;//样品编号
|
||||
private String sampleShape;//样品性状
|
||||
private String dilutionName;//稀释溶剂名称
|
||||
private String extractionName;//提取溶剂名称
|
||||
private String constantVolume;//定容体积
|
||||
private String dilutionFactor;//稀释倍数
|
||||
private String originalConcentration;//原始浓度
|
||||
private String resultConcentration;//结果浓度
|
||||
private String weighingValue;//称取质量
|
||||
private String testId;//检验Id
|
||||
private String materialId;//检材ID,表示这个溶液来自于 哪个检材
|
||||
@TableField(exist = false) |
||||
private String printSampleName;//打印检验记录中出现的名称:1号检材、2号检材
|
||||
private String remark; |
||||
|
||||
} |
@ -0,0 +1,83 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
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 io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 标准溶液实体类。 |
||||
* |
||||
* 该类表示在实验过程中配置的标准溶液的相关信息。 |
||||
*/ |
||||
@Data |
||||
@TableName(value = "b_test_record_standard_solution", autoResultMap = true) |
||||
@ApiModel(value = "TestRecordStandardSolution", description = "实验中配置的标准溶液") |
||||
public class TestRecordStandardSolution extends BaseEntity { |
||||
|
||||
@ApiModelProperty(value = "标准溶液ID") |
||||
private String id; |
||||
|
||||
@ApiModelProperty(value = "标准溶液编号") |
||||
private String number; |
||||
|
||||
@ApiModelProperty(value = "用到的标准物质名称,例如:甲基苯丙胺") |
||||
private String standardName; |
||||
|
||||
@ApiModelProperty(value = "稀释物质名称,例如:甲醇") |
||||
private String dilutionName; |
||||
|
||||
@ApiModelProperty(value = "定容体积") |
||||
private String constantVolume; |
||||
|
||||
@ApiModelProperty(value = "稀释倍数") |
||||
private String dilutionFactor; |
||||
|
||||
@ApiModelProperty(value = "原始浓度") |
||||
private String originalConcentration; |
||||
|
||||
@ApiModelProperty(value = "结果浓度") |
||||
private String resultConcentration; |
||||
|
||||
@ApiModelProperty(value = "结果浓度单位") |
||||
private String resultConcentrationUnit; |
||||
|
||||
@ApiModelProperty(value = "称取质量/移取体积") |
||||
private String weighingMoving; |
||||
|
||||
@ApiModelProperty(value = "检验ID") |
||||
private String testId; |
||||
|
||||
@ApiModelProperty(value = "选取标准物质数量(如果=1,则为单个标准物质溶液;如果>1,则为混合标准溶液;==0,则为空白溶液)") |
||||
private Integer standardSubstanceCount; |
||||
|
||||
@ApiModelProperty(value = "制备日期") |
||||
private LocalDateTime madeDate; |
||||
|
||||
@ApiModelProperty(value = "有效期") |
||||
private LocalDateTime expirationDate; |
||||
|
||||
@ApiModelProperty(value = "溶液类型(如质控溶液QC、标准工作溶液STD、空白溶液BLK)") |
||||
private String solutionType; |
||||
|
||||
@ApiModelProperty(value = "英文名,用于生成溶液编号") |
||||
private String englishName; |
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class) |
||||
@ApiModelProperty(value = "标准物质ID数组") |
||||
private List<String> standardSubstanceNumList; |
||||
|
||||
@TableField(exist = false) |
||||
@ApiModelProperty(value = "打印制备日期", hidden = true) |
||||
private String madeDatePrint; |
||||
|
||||
@TableField(exist = false) |
||||
@ApiModelProperty(value = "打印有效期", hidden = true) |
||||
private String expirationDatePrint; |
||||
} |
@ -0,0 +1,46 @@ |
||||
package digital.laboratory.platform.inspection.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; |
||||
import io.swagger.annotations.ApiModel; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author xy |
||||
* @version 1.0 |
||||
* @title TestTemplate 检验模板实体 |
||||
* @description |
||||
* @create 2024/1/11 9:44 |
||||
*/ |
||||
@TableName("b_test_template") |
||||
@ApiModel(value = "模板信息", description = "模板信息") |
||||
@Data |
||||
public class TestTemplate { |
||||
//仪器设备
|
||||
//试剂耗材
|
||||
//实验方法
|
||||
//仪器使用条件
|
||||
private String id; |
||||
private String name;//模板名称
|
||||
private boolean nature;//模板性质/公有-私有 0 =私有 1=公有
|
||||
private Integer status;//模板状态 0 =停用 1=启用
|
||||
private String author;//模板作者
|
||||
private Integer useCount;//模板被使用的次数
|
||||
private LocalDateTime createDate;//模板创建日期
|
||||
private LocalDateTime publishDate;//模板发布日期
|
||||
private String introduce;//模板介绍
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class) |
||||
private List<String> testMethods;//模板用到的实验方法
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class) |
||||
private List<String> deviceUseCondition;//仪器使用条件
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class) |
||||
private List<String> reagentConsumables;//使用的试剂耗材
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class) |
||||
private List<String> deviceIdList;//使用的仪器设备
|
||||
|
||||
private String businessType;//模板类型
|
||||
} |
@ -0,0 +1,24 @@ |
||||
package digital.laboratory.platform.inspection.event; |
||||
|
||||
import org.springframework.context.ApplicationEvent; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 审核数据 自定义事件 |
||||
*/ |
||||
|
||||
public class AuditDataExecutionEvent extends ApplicationEvent { |
||||
|
||||
private final List<String> sampleNoList; |
||||
|
||||
|
||||
public AuditDataExecutionEvent(Object source, List<String> sampleNoList) { |
||||
super(source); |
||||
this.sampleNoList = sampleNoList; |
||||
} |
||||
|
||||
public List<String> getSampleNoList() { |
||||
return sampleNoList; |
||||
} |
||||
} |
@ -0,0 +1,12 @@ |
||||
package digital.laboratory.platform.inspection.event; |
||||
|
||||
import org.springframework.context.ApplicationEvent; |
||||
|
||||
/** |
||||
* 监听实验完成 === 自定义事件类 |
||||
*/ |
||||
public class FinishTestExecutionEvent extends ApplicationEvent { |
||||
public FinishTestExecutionEvent(Object source) { |
||||
super(source); |
||||
} |
||||
} |
@ -0,0 +1,31 @@ |
||||
package digital.laboratory.platform.inspection.listener; |
||||
|
||||
import digital.laboratory.platform.inspection.event.AuditDataExecutionEvent; |
||||
import digital.laboratory.platform.inspection.service.TaskInfoService; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.context.ApplicationListener; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/*** |
||||
* 审核数据实验事件监听器 在审批数据成功后需要执行的方法 |
||||
*/ |
||||
@Slf4j |
||||
@Component |
||||
public class AuditDataExecutionEventListener implements ApplicationListener<AuditDataExecutionEvent> { |
||||
|
||||
@Resource |
||||
private TaskInfoService taskInfoService; |
||||
|
||||
|
||||
@Override |
||||
public void onApplicationEvent(AuditDataExecutionEvent event) { |
||||
log.info("审核数据 监听器执行中 .........................."); |
||||
try { |
||||
taskInfoService.createUploadItem(event.getSampleNoList()); |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,22 @@ |
||||
package digital.laboratory.platform.inspection.listener; |
||||
|
||||
import digital.laboratory.platform.inspection.event.FinishTestExecutionEvent; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.context.ApplicationListener; |
||||
import org.springframework.scheduling.annotation.Async; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
/*** |
||||
* 完成实验事件监听器 在完成实验后需要执行的方法 |
||||
*/ |
||||
@Slf4j |
||||
@Component |
||||
public class FinishTestExecutionEventListener implements ApplicationListener<FinishTestExecutionEvent> { |
||||
@Override |
||||
@Async |
||||
public void onApplicationEvent(FinishTestExecutionEvent event) { |
||||
|
||||
log.info("完成实验监听器执行中........"); |
||||
|
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue