Przeglądaj źródła

调整字段, 增加文件导入

攻心小虫 1 miesiąc temu
rodzic
commit
f326a12147
27 zmienionych plików z 1198 dodań i 2317 usunięć
  1. 50 7
      healsphere-buss/src/main/java/com/zdqz/data/controller/DataBaseController.java
  2. 91 185
      healsphere-buss/src/main/java/com/zdqz/data/domain/DataBase.java
  3. 4 0
      healsphere-buss/src/main/java/com/zdqz/data/mapper/DataBaseMapper.java
  4. 5 0
      healsphere-buss/src/main/java/com/zdqz/data/service/IDataBaseService.java
  5. 16 0
      healsphere-buss/src/main/java/com/zdqz/data/service/impl/DataBaseServiceImpl.java
  6. 7 8
      healsphere-buss/src/main/java/com/zdqz/read/domain/ReadData.java
  7. 142 582
      healsphere-buss/src/main/java/com/zdqz/report/controller/ReportController.java
  8. 5 57
      healsphere-buss/src/main/java/com/zdqz/report/domain/ReportBean.java
  9. 32 0
      healsphere-buss/src/main/java/com/zdqz/sample/controller/SamplePatientController.java
  10. 0 21
      healsphere-buss/src/main/java/com/zdqz/sample/domain/SampleInfo.java
  11. 393 958
      healsphere-buss/src/main/java/com/zdqz/sample/domain/SamplePatient.java
  12. 2 0
      healsphere-buss/src/main/java/com/zdqz/sample/mapper/SamplePatientMapper.java
  13. 4 0
      healsphere-buss/src/main/java/com/zdqz/sample/service/ISamplePatientService.java
  14. 5 1
      healsphere-buss/src/main/java/com/zdqz/sample/service/impl/SampleExperimentServiceImpl.java
  15. 39 2
      healsphere-buss/src/main/java/com/zdqz/sample/service/impl/SamplePatientServiceImpl.java
  16. 18 18
      healsphere-buss/src/main/java/com/zdqz/sample/tool/PdfTools.java
  17. 75 70
      healsphere-buss/src/main/java/com/zdqz/system/controller/SysReportConfigController.java
  18. 10 17
      healsphere-buss/src/main/java/com/zdqz/system/domain/SysReportConfig.java
  19. 2 0
      healsphere-buss/src/main/java/com/zdqz/system/mapper/SysCnareaMapper.java
  20. 2 0
      healsphere-buss/src/main/java/com/zdqz/system/service/ISysCnareaService.java
  21. 5 0
      healsphere-buss/src/main/java/com/zdqz/system/service/impl/SysCnareaServiceImpl.java
  22. 116 110
      healsphere-buss/src/main/resources/mapper/data/DataBaseMapper.xml
  23. 84 84
      healsphere-buss/src/main/resources/mapper/read/ReadDataMapper.xml
  24. 0 4
      healsphere-buss/src/main/resources/mapper/sample/SampleInfoMapper.xml
  25. 75 191
      healsphere-buss/src/main/resources/mapper/sample/SamplePatientMapper.xml
  26. 9 0
      healsphere-buss/src/main/resources/mapper/system/SysCnareaMapper.xml
  27. 7 2
      healsphere-buss/src/main/resources/mapper/system/SysReportConfigMapper.xml

+ 50 - 7
healsphere-buss/src/main/java/com/zdqz/data/controller/DataBaseController.java

@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestPart;
 import org.springframework.web.bind.annotation.RequestPart;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -18,10 +20,12 @@ import com.zdqz.common.core.controller.BaseController;
 import com.zdqz.common.core.domain.AjaxResult;
 import com.zdqz.common.core.domain.AjaxResult;
 import com.zdqz.common.core.page.TableDataInfo;
 import com.zdqz.common.core.page.TableDataInfo;
 import com.zdqz.common.enums.BusinessType;
 import com.zdqz.common.enums.BusinessType;
+import com.zdqz.common.utils.poi.ExcelUtil;
 import com.zdqz.data.domain.DataBase;
 import com.zdqz.data.domain.DataBase;
 import com.zdqz.data.service.IDataBaseService;
 import com.zdqz.data.service.IDataBaseService;
 
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 
 
 /**
 /**
@@ -32,7 +36,7 @@ import io.swagger.annotations.ApiOperation;
  */
  */
 @RestController
 @RestController
 @RequestMapping("/data/dataBase")
 @RequestMapping("/data/dataBase")
-@Api(value="基础数据管理接口",tags="基础数据接口标签")
+@Api(value = "基础数据管理接口", tags = "基础数据接口标签")
 public class DataBaseController extends BaseController {
 public class DataBaseController extends BaseController {
 	@Autowired
 	@Autowired
 	private IDataBaseService dataBaseService;
 	private IDataBaseService dataBaseService;
@@ -56,6 +60,26 @@ public class DataBaseController extends BaseController {
 		return success(dataBaseService.selectDataBaseById(id));
 		return success(dataBaseService.selectDataBaseById(id));
 	}
 	}
 
 
+	/**
+	 * 新增病原体历史统计
+	 */
+	@PreAuthorize("@ss.hasPermi('data:dataReportByt:add')")
+	@Log(title = "基础数据管理", businessType = BusinessType.INSERT)
+	@PostMapping
+	public AjaxResult add(@RequestBody DataBase dataBase) {
+		return toAjax(dataBaseService.insertDataBase(dataBase));
+	}
+
+	/**
+	 * 修改病原体历史统计
+	 */
+	@PreAuthorize("@ss.hasPermi('data:dataReportByt:edit')")
+	@Log(title = "基础数据管理", businessType = BusinessType.UPDATE)
+	@PutMapping
+	public AjaxResult edit(@RequestBody DataBase dataBase) {
+		return toAjax(dataBaseService.insertDataBase(dataBase));
+	}
+
 	/**
 	/**
 	 * 删除病原体管理
 	 * 删除病原体管理
 	 */
 	 */
@@ -64,15 +88,34 @@ public class DataBaseController extends BaseController {
 	public AjaxResult remove(@PathVariable String[] ids) {
 	public AjaxResult remove(@PathVariable String[] ids) {
 		return toAjax(dataBaseService.deleteDataBaseByIds(ids));
 		return toAjax(dataBaseService.deleteDataBaseByIds(ids));
 	}
 	}
-	
+
 	@PostMapping("/importData")
 	@PostMapping("/importData")
 	@ApiOperation("导入基础数据,新增覆盖原来的数据")
 	@ApiOperation("导入基础数据,新增覆盖原来的数据")
 	@Log(title = "基础数据管理", businessType = BusinessType.IMPORT)
 	@Log(title = "基础数据管理", businessType = BusinessType.IMPORT)
 	public AjaxResult importData(@RequestPart("file") MultipartFile file) throws Exception {
 	public AjaxResult importData(@RequestPart("file") MultipartFile file) throws Exception {
-//		ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
-//		List<SysUser> userList = util.importExcel(file.getInputStream());
-//		String operName = getUsername();
-//		String message = userService.importUser(userList, updateSupport, operName);
-		return success("后端还未实现,不用管");
+		ExcelUtil<DataBase> util = new ExcelUtil<DataBase>(DataBase.class);
+		List<DataBase> dataList = util.importExcel(file.getInputStream());
+		if(dataList != null && dataList.size() >0) {
+			dataBaseService.batchInsert(dataList, getUsername());
+		}
+		return success("导入成功");
+	}
+
+	@GetMapping("/loadTop20DataBase/{keyword}")
+	@ApiOperation("病原体编码或名称查找相关的病原体top20信息")
+	@ApiImplicitParam(name = "keyword", value = "身份证信息列表", required = true, dataType = "string", paramType = "path", dataTypeClass = String.class)
+	public AjaxResult loadTop20DataBase(@PathVariable("keyword") String keyword) {
+		try {
+			DataBase dataBase = new DataBase();
+			dataBase.setAssemblyAccession(keyword);
+			dataBase.setOrganismName(keyword);
+			dataBase.setDefined(keyword);
+			dataBase.setDljy(keyword);
+			dataBase.setNyjy(keyword);
+			dataBase.setDtpnyjy(keyword);
+			return success(dataBaseService.selectTop20DataBaseList(dataBase));
+		} catch (Exception e) {
+			return error(e.getMessage());
+		}
 	}
 	}
 }
 }

+ 91 - 185
healsphere-buss/src/main/java/com/zdqz/data/domain/DataBase.java

@@ -3,10 +3,6 @@ package com.zdqz.data.domain;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Date;
 
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zdqz.common.annotation.Excel;
 import com.zdqz.common.annotation.Excel;
 import com.zdqz.common.core.domain.BaseEntity;
 import com.zdqz.common.core.domain.BaseEntity;
 
 
@@ -20,170 +16,94 @@ public class DataBase extends BaseEntity {
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 
 
 	/** 编号 */
 	/** 编号 */
+	@Excel(name = "ID")
 	private Long id;
 	private Long id;
-
-	private Integer type;
-
-	
-	public DataBase() {
-		
-	}
-	
-	public DataBase(String  nameCn,String  genomeSize,String  organismName,String defined) {
-		this.nameCn = nameCn;
-		this.genomeSize = genomeSize;
-		this.organismName = organismName;
-		this.defined = defined;
-	}
-	
-	/** 唯一注册号 */
-	@Excel(name = "唯一注册号")
+	@Excel(name = "assembly_accession")
 	private String assemblyAccession;
 	private String assemblyAccession;
-
-	/** 参考基因组类型 */
-	@Excel(name = "参考基因组类型")
+	@Excel(name = "organism_name")
+	private String organismName;
+	@Excel(name = "group")
+	private String group;
+	@Excel(name = "group1")
+	private String group1;
+	@Excel(name = "中文解释")
+	private String defined;
+	@Excel(name = "解释的来源")
+	private String definedSource;
+	@Excel(name = "refseq_category")
 	private String refseqCategory;
 	private String refseqCategory;
-
-	/** 分类号 */
-	@Excel(name = "分类号")
+	@Excel(name = "taxid")
 	private String taxid;
 	private String taxid;
-
-	/** 种分类号 */
-	@Excel(name = "种分类号")
+	@Excel(name = "species_taxid")
 	private String speciesTaxid;
 	private String speciesTaxid;
-
-	/** 生物名称 */
-	@Excel(name = "生物名称")
-	private String organismName;
-
-	/** 亚种名称 */
-	@Excel(name = "亚种名称")
+	@Excel(name = "infraspecific_name")
 	private String infraspecificName;
 	private String infraspecificName;
-
-	/** 分类类型 */
-	@Excel(name = "分类类型")
+	@Excel(name = "isolate")
 	private String isolate;
 	private String isolate;
-
-	/** 拼装级别 */
-	@Excel(name = "拼装级别")
+	@Excel(name = "assembly_level")
 	private String assemblyLevel;
 	private String assemblyLevel;
-
-	/** 基因组级别 */
-	@Excel(name = "基因组级别")
+	@Excel(name = "genome_rep")
 	private String genomeRep;
 	private String genomeRep;
-
-	/** seq_rel_date */
-	@JsonFormat(pattern = "yyyy-MM-dd")
-	@Excel(name = "seq_rel_date", width = 30, dateFormat = "yyyy-MM-dd")
+	@Excel(name = "seq_rel_date")
 	private Date seqRelDate;
 	private Date seqRelDate;
-
-	/** ASM编号 */
-	@Excel(name = "ASM编号")
+	@Excel(name = "asm_name")
 	private String asmName;
 	private String asmName;
-
-	/** gbrs_paired_asm */
 	@Excel(name = "gbrs_paired_asm")
 	@Excel(name = "gbrs_paired_asm")
 	private String gbrsPairedAsm;
 	private String gbrsPairedAsm;
-
-	/** paired_asm_comp */
 	@Excel(name = "paired_asm_comp")
 	@Excel(name = "paired_asm_comp")
 	private String pairedAsmComp;
 	private String pairedAsmComp;
-
-	/** 来源地址 */
-	@Excel(name = "来源地址")
+	@Excel(name = "ftp_path")
 	private String ftpPath;
 	private String ftpPath;
-
-	/** excluded_from_refseq */
 	@Excel(name = "excluded_from_refseq")
 	@Excel(name = "excluded_from_refseq")
 	private String excludedFromRefseq;
 	private String excludedFromRefseq;
-
-	/** 装配类型 */
-	@Excel(name = "装配类型")
+	@Excel(name = "assembly_type")
 	private String assemblyType;
 	private String assemblyType;
-
-	/** 病源类型 */
-	@Excel(name = "病源类型")
-	private String group;
-
-	/** 基因组大小 */
-	@Excel(name = "基因组大小")
+	@Excel(name = "genome_size")
 	private String genomeSize;
 	private String genomeSize;
-
-	/** 基因组大小(无缺口) */
-	@Excel(name = "基因组大小", readConverterExp = "无=缺口")
+	@Excel(name = "genome_size_ungapped")
 	private String genomeSizeUngapped;
 	private String genomeSizeUngapped;
-
-	/** GC比例 */
-	@Excel(name = "GC比例")
+	@Excel(name = "gc_percent")
 	private BigDecimal gcPercent;
 	private BigDecimal gcPercent;
-
-	/** replicon_count */
 	@Excel(name = "replicon_count")
 	@Excel(name = "replicon_count")
 	private Long repliconCount;
 	private Long repliconCount;
-
-	/** scaffold_count */
 	@Excel(name = "scaffold_count")
 	@Excel(name = "scaffold_count")
 	private Long scaffoldCount;
 	private Long scaffoldCount;
-
-	/** contig_count */
 	@Excel(name = "contig_count")
 	@Excel(name = "contig_count")
 	private Long contigCount;
 	private Long contigCount;
-
-	/** 总基因数 */
-	@Excel(name = "总基因数")
+	@Excel(name = "total_gene_count")
 	private Long totalGeneCount;
 	private Long totalGeneCount;
-
-	/** 翻译蛋白基因数 */
-	@Excel(name = "翻译蛋白基因数")
+	@Excel(name = "protein_coding_gene_count")
 	private Long proteinCodingGeneCount;
 	private Long proteinCodingGeneCount;
-
-	/** 非编码基因数 */
-	@Excel(name = "非编码基因数")
+	@Excel(name = "non_coding_gene_count")
 	private Long nonCodingGeneCount;
 	private Long nonCodingGeneCount;
-
-	/** 中文名 */
-	@Excel(name = "中文名")
-	private String nameCn;
-
-	/** 定义 */
-	@Excel(name = "定义")
-	private String defined;
-
-	/** 序列来源 */
-	@Excel(name = "序列来源")
-	private String seqSource;
-
-	/** 解释来源 */
-	@Excel(name = "解释来源")
-	private String express;
-
-	/** 文件路径 */
-	@Excel(name = "文件路径")
-	private String filePath;
-
-	/** 点突变耐药基因 */
-	@Excel(name = "点突变耐药基因")
-	private String dtpnyjy;
-
-	/** 点突变耐药基因说明 */
-	@Excel(name = "点突变耐药基因说明")
-	private String dtpnyjyExpress;
-
-	/** 耐药基因 */
+	@Excel(name = "毒力基因")
+	private String dljy;
+	@Excel(name = "毒力基因解释")
+	private String dljyExpress;
+	@Excel(name = "毒力基因解释来源")
+	private String dljySource;
 	@Excel(name = "耐药基因")
 	@Excel(name = "耐药基因")
 	private String nyjy;
 	private String nyjy;
-
-	/** 耐药基因说明 */
-	@Excel(name = "耐药基因说明")
+	@Excel(name = "耐药基因解释")
 	private String nyjyExpress;
 	private String nyjyExpress;
+	@Excel(name = "耐药基因解释来源")
+	private String nyjySource;
+	@Excel(name = "点突变")
+	private String dtpnyjy;
+	@Excel(name = "点突变解释")
+	private String dtpnyjyExpress;
+	@Excel(name = "点突变解释来源")
+	private String dtpnyjySource;
 
 
-	/** 毒力基因 */
-	@Excel(name = "毒力基因")
-	private String dljy;
+	private Integer type;
 
 
-	/** 毒力基因说明 */
-	@Excel(name = "毒力基因说明")
-	private String dljyExpress;
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
 
 
 	public void setId(Long id) {
 	public void setId(Long id) {
 		this.id = id;
 		this.id = id;
@@ -193,14 +113,6 @@ public class DataBase extends BaseEntity {
 		return id;
 		return id;
 	}
 	}
 
 
-	public Integer getType() {
-		return type;
-	}
-
-	public void setType(Integer type) {
-		this.type = type;
-	}
-
 	public void setAssemblyAccession(String assemblyAccession) {
 	public void setAssemblyAccession(String assemblyAccession) {
 		this.assemblyAccession = assemblyAccession;
 		this.assemblyAccession = assemblyAccession;
 	}
 	}
@@ -409,14 +321,6 @@ public class DataBase extends BaseEntity {
 		return nonCodingGeneCount;
 		return nonCodingGeneCount;
 	}
 	}
 
 
-	public void setNameCn(String nameCn) {
-		this.nameCn = nameCn;
-	}
-
-	public String getNameCn() {
-		return nameCn;
-	}
-
 	public void setDefined(String defined) {
 	public void setDefined(String defined) {
 		this.defined = defined;
 		this.defined = defined;
 	}
 	}
@@ -425,29 +329,6 @@ public class DataBase extends BaseEntity {
 		return defined;
 		return defined;
 	}
 	}
 
 
-	public void setSeqSource(String seqSource) {
-		this.seqSource = seqSource;
-	}
-
-	public String getSeqSource() {
-		return seqSource;
-	}
-
-	public void setExpress(String express) {
-		this.express = express;
-	}
-
-	public String getExpress() {
-		return express;
-	}
-
-	public void setFilePath(String filePath) {
-		this.filePath = filePath;
-	}
-
-	public String getFilePath() {
-		return filePath;
-	}
 
 
 	public void setDtpnyjy(String dtpnyjy) {
 	public void setDtpnyjy(String dtpnyjy) {
 		this.dtpnyjy = dtpnyjy;
 		this.dtpnyjy = dtpnyjy;
@@ -497,19 +378,44 @@ public class DataBase extends BaseEntity {
 		return dljyExpress;
 		return dljyExpress;
 	}
 	}
 
 
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("assemblyAccession", getAssemblyAccession())
-				.append("refseqCategory", getRefseqCategory()).append("taxid", getTaxid()).append("speciesTaxid", getSpeciesTaxid()).append("organismName", getOrganismName())
-				.append("infraspecificName", getInfraspecificName()).append("isolate", getIsolate()).append("assemblyLevel", getAssemblyLevel()).append("genomeRep", getGenomeRep())
-				.append("seqRelDate", getSeqRelDate()).append("asmName", getAsmName()).append("gbrsPairedAsm", getGbrsPairedAsm()).append("pairedAsmComp", getPairedAsmComp())
-				.append("ftpPath", getFtpPath()).append("excludedFromRefseq", getExcludedFromRefseq()).append("assemblyType", getAssemblyType()).append("group", getGroup())
-				.append("genomeSize", getGenomeSize()).append("genomeSizeUngapped", getGenomeSizeUngapped()).append("gcPercent", getGcPercent())
-				.append("repliconCount", getRepliconCount()).append("scaffoldCount", getScaffoldCount()).append("contigCount", getContigCount())
-				.append("totalGeneCount", getTotalGeneCount()).append("proteinCodingGeneCount", getProteinCodingGeneCount()).append("nonCodingGeneCount", getNonCodingGeneCount())
-				.append("nameCn", getNameCn()).append("defined", getDefined()).append("seqSource", getSeqSource()).append("express", getExpress()).append("filePath", getFilePath())
-				.append("dtpnyjy", getDtpnyjy()).append("dtpnyjyExpress", getDtpnyjyExpress()).append("nyjy", getNyjy()).append("nyjyExpress", getNyjyExpress())
-				.append("dljy", getDljy()).append("dljyExpress", getDljyExpress()).append("createBy", getCreateBy()).append("createTime", getCreateTime())
-				.append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
+	public String getGroup1() {
+		return group1;
+	}
+
+	public void setGroup1(String group1) {
+		this.group1 = group1;
+	}
+
+	public String getDefinedSource() {
+		return definedSource;
+	}
+
+	public void setDefinedSource(String definedSource) {
+		this.definedSource = definedSource;
 	}
 	}
+
+	public String getDljySource() {
+		return dljySource;
+	}
+
+	public void setDljySource(String dljySource) {
+		this.dljySource = dljySource;
+	}
+
+	public String getNyjySource() {
+		return nyjySource;
+	}
+
+	public void setNyjySource(String nyjySource) {
+		this.nyjySource = nyjySource;
+	}
+
+	public String getDtpnyjySource() {
+		return dtpnyjySource;
+	}
+
+	public void setDtpnyjySource(String dtpnyjySource) {
+		this.dtpnyjySource = dtpnyjySource;
+	}
+
 }
 }

+ 4 - 0
healsphere-buss/src/main/java/com/zdqz/data/mapper/DataBaseMapper.java

@@ -25,6 +25,8 @@ public interface DataBaseMapper {
 	 * @return 病原体管理集合
 	 * @return 病原体管理集合
 	 */
 	 */
 	public List<DataBase> selectDataBaseList(DataBase dataBase);
 	public List<DataBase> selectDataBaseList(DataBase dataBase);
+	
+	public List<DataBase> selectTop20DataBaseList(DataBase dataBase);
 
 
 	/**
 	/**
 	 * 新增病原体管理
 	 * 新增病原体管理
@@ -42,4 +44,6 @@ public interface DataBaseMapper {
 	 * @return 结果
 	 * @return 结果
 	 */
 	 */
 	public int deleteDataBaseByIds(String[] ids);
 	public int deleteDataBaseByIds(String[] ids);
+
+	
 }
 }

+ 5 - 0
healsphere-buss/src/main/java/com/zdqz/data/service/IDataBaseService.java

@@ -26,6 +26,7 @@ public interface IDataBaseService {
 	 */
 	 */
 	public List<DataBase> selectDataBaseList(DataBase dataBase);
 	public List<DataBase> selectDataBaseList(DataBase dataBase);
 
 
+	public List<DataBase> selectTop20DataBaseList(DataBase dataBase);
 	/**
 	/**
 	 * 新增病原体管理
 	 * 新增病原体管理
 	 * 
 	 * 
@@ -42,4 +43,8 @@ public interface IDataBaseService {
 	 */
 	 */
 	public int deleteDataBaseByIds(String[] ids);
 	public int deleteDataBaseByIds(String[] ids);
 
 
+	public void batchInsert(List<DataBase> dataList,String name);
+
+	
+
 }
 }

+ 16 - 0
healsphere-buss/src/main/java/com/zdqz/data/service/impl/DataBaseServiceImpl.java

@@ -66,4 +66,20 @@ public class DataBaseServiceImpl implements IDataBaseService {
 		return dataBaseMapper.deleteDataBaseByIds(ids);
 		return dataBaseMapper.deleteDataBaseByIds(ids);
 	}
 	}
 
 
+	@Override
+	public List<DataBase> selectTop20DataBaseList(DataBase dataBase) {
+		return dataBaseMapper.selectTop20DataBaseList(dataBase);
+	}
+
+	@Override
+	public void batchInsert(List<DataBase> dataList,String name) {
+		for (DataBase dataBase : dataList) {
+			dataBase.setCreateTime(DateUtils.getNowDate());
+			dataBase.setCreateBy(name);
+			dataBase.setUpdateTime(DateUtils.getNowDate());
+			dataBase.setUpdateBy(name);
+			dataBaseMapper.insertDataBase(dataBase);
+		}
+	}
+
 }
 }

+ 7 - 8
healsphere-buss/src/main/java/com/zdqz/read/domain/ReadData.java

@@ -23,28 +23,27 @@ public class ReadData extends BaseEntity {
 	private Long experimentId;
 	private Long experimentId;
 
 
 	/** 唯一注册号 */
 	/** 唯一注册号 */
-	@Excel(name = "唯一注册号")
+	@Excel(name = "assembly_accession")
 	private String assemblyAccession;
 	private String assemblyAccession;
 
 
 	@Excel(name = "taxid")
 	@Excel(name = "taxid")
 	private String taxid;
 	private String taxid;
 
 
-	@Excel(name = "speciesTaxid")
+	@Excel(name = "species_taxid")
 	private String speciesTaxid;
 	private String speciesTaxid;
 
 
-	@Excel(name = "生物名称")
+	@Excel(name = "organism_name")
 	private String organismName;
 	private String organismName;
 
 
-	@Excel(name = "organismNameStd")
 	private String organismNameStd;
 	private String organismNameStd;
 
 
-	@Excel(name = "dHits")
+	@Excel(name = "D_Hits")
 	private Long dHits;
 	private Long dHits;
 
 
-	@Excel(name = "rHits")
+	@Excel(name = "R_Hits")
 	private Long rHits;
 	private Long rHits;
 
 
-	@Excel(name = "finalHits")
+	@Excel(name = "Final_Hits")
 	private Long finalHits;
 	private Long finalHits;
 
 
 	/** 中文名 */
 	/** 中文名 */
@@ -52,7 +51,7 @@ public class ReadData extends BaseEntity {
 	private String nameCn;
 	private String nameCn;
 
 
 	/** 定义 */
 	/** 定义 */
-	@Excel(name = "定义")
+	@Excel(name = "解释")
 	private String defined;
 	private String defined;
 
 
 	private Long delFlag;
 	private Long delFlag;

+ 142 - 582
healsphere-buss/src/main/java/com/zdqz/report/controller/ReportController.java

@@ -6,7 +6,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -18,11 +17,10 @@ import com.zdqz.common.core.controller.BaseController;
 import com.zdqz.common.core.domain.AjaxResult;
 import com.zdqz.common.core.domain.AjaxResult;
 import com.zdqz.common.utils.DateUtils;
 import com.zdqz.common.utils.DateUtils;
 import com.zdqz.report.domain.ReportBean;
 import com.zdqz.report.domain.ReportBean;
-import com.zdqz.sample.domain.SampleType;
-import com.zdqz.sample.service.ISampleTypeService;
 
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 
 
 /**
 /**
@@ -36,23 +34,80 @@ import io.swagger.annotations.ApiOperation;
 @Api(value="统计信息",tags="统计信息")
 @Api(value="统计信息",tags="统计信息")
 public class ReportController extends BaseController {
 public class ReportController extends BaseController {
 	
 	
-	@Autowired
-	private ISampleTypeService sampleTypeService;
 
 
-	@ApiOperation("1、获取样本统计信息")
-	@GetMapping("/ybtj/{type}")
-	@ApiImplicitParam(name = "type", value = "类型(1:近24小时;2:近3天(72小时);3:近7天;4:近30天)", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
-	public AjaxResult ybtj(@PathVariable("type") Integer type) {
-		try {
-			List<Map<String,Object>> data = new ArrayList<>();
-			Calendar cal = Calendar.getInstance();
+	@ApiOperation("1、根据病原体及时间获取阳性数(yxs)及阳性率(yxl)统计")
+	@GetMapping("/ybtj/{type}/{assemblyAccession}")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "type", value = "类型(1:近24小时;2:近3天(72小时);3:近7天;4:近30天)", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class),
+		@ApiImplicitParam(name = "assemblyAccession", value = "病原体注册编号", required = true, dataType = "string", paramType = "path", dataTypeClass = String.class)
+	})
+	public AjaxResult ybtj(@PathVariable("type") Integer type,@PathVariable("assemblyAccession") String assemblyAccession) {
+		List<Map<String,Object>> data = new ArrayList<>();
+		Calendar cal = Calendar.getInstance();
+		switch (type) {
+		case 1:
+			for (int i = 0; i < 24; i++) {
+				Map<String,Object> map = new HashMap<String, Object>();
+				map.put("hour",cal.get(Calendar.HOUR));
+				map.put("yxs",(int) (Math.random() * 100) + 1);
+				map.put("yxl",(int) (Math.random() * 100) + 1);
+				data.add(map);
+				cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
+			}
+			break;
+		case 2:
+			for (int i = 0; i < 72; i++) {
+				Map<String,Object> map = new HashMap<String, Object>();
+				map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH, cal.getTime()));
+				map.put("yxs",(int) (Math.random() * 100) + 1);
+				map.put("yxl",(int) (Math.random() * 100) + 1);
+				data.add(map);
+				cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
+			}
+			break;
+		case 3:
+			for (int i = 0; i < 7; i++) {
+				Map<String,Object> map = new HashMap<String, Object>();
+				map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
+				map.put("yxs",(int) (Math.random() * 100) + 1);
+				map.put("yxl",(int) (Math.random() * 100) + 1);
+				data.add(map);
+				cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
+			}
+			break;
+		case 4:
+			for (int i = 0; i < 30; i++) {
+				Map<String,Object> map = new HashMap<String, Object>();
+				map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
+				map.put("yxs",(int) (Math.random() * 100) + 1);
+				map.put("yxl",(int) (Math.random() * 100) + 1);
+				data.add(map);
+				cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
+			}
+			break;
+		}
+		return success(data);
+	}
+	
+	@ApiOperation("2、获取患者临床诊断的关键字关联的患者(检测患者数(total),带有关键字患者数(xds),带有关键字阳性患者数(xdsyx))的统计信息或者具体数值(散点数值)的统计")
+	@GetMapping("/yblxtj/{type}/{assemblyAccession}/{sysReportConfigId}")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "type", value = "类型(1:近24小时;2:近3天(72小时);3:近7天;4:近30天)", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class),
+		@ApiImplicitParam(name = "assemblyAccession", value = "病原体注册编号", required = true, dataType = "string", paramType = "path", dataTypeClass = String.class),
+		@ApiImplicitParam(name = "sysReportConfigId", value = "诊断统计设置编号", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
+	})
+	public AjaxResult yblxtj(@PathVariable("type") Integer type,@PathVariable("assemblyAccession") String assemblyAccession,@PathVariable("sysReportConfigId") Integer sysReportConfigId) {
+		List<Map<String,Object>> data = new ArrayList<>();
+		Calendar cal = Calendar.getInstance();
+		if(sysReportConfigId%2 == 0) {
 			switch (type) {
 			switch (type) {
 			case 1:
 			case 1:
 				for (int i = 0; i < 24; i++) {
 				for (int i = 0; i < 24; i++) {
 					Map<String,Object> map = new HashMap<String, Object>();
 					Map<String,Object> map = new HashMap<String, Object>();
 					map.put("hour",cal.get(Calendar.HOUR));
 					map.put("hour",cal.get(Calendar.HOUR));
-					map.put("ybl",(int) (Math.random() * 100) + 1);
-					map.put("fxl",(int) (Math.random() * 100) + 1);
+					map.put("total",(int) (Math.random() * 100) + 1);
+					map.put("xds",(int) (Math.random() * 100) + 1);
+					map.put("xdsyx",(int) (Math.random() * 100) + 1);
 					data.add(map);
 					data.add(map);
 					cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
 					cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
 				}
 				}
@@ -61,8 +116,9 @@ public class ReportController extends BaseController {
 				for (int i = 0; i < 72; i++) {
 				for (int i = 0; i < 72; i++) {
 					Map<String,Object> map = new HashMap<String, Object>();
 					Map<String,Object> map = new HashMap<String, Object>();
 					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH, cal.getTime()));
 					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH, cal.getTime()));
-					map.put("ybl",(int) (Math.random() * 100) + 1);
-					map.put("fxl",(int) (Math.random() * 100) + 1);
+					map.put("total",(int) (Math.random() * 100) + 1);
+					map.put("xds",(int) (Math.random() * 100) + 1);
+					map.put("xdsyx",(int) (Math.random() * 100) + 1);
 					data.add(map);
 					data.add(map);
 					cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
 					cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
 				}
 				}
@@ -71,8 +127,9 @@ public class ReportController extends BaseController {
 				for (int i = 0; i < 7; i++) {
 				for (int i = 0; i < 7; i++) {
 					Map<String,Object> map = new HashMap<String, Object>();
 					Map<String,Object> map = new HashMap<String, Object>();
 					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
 					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
-					map.put("ybl",(int) (Math.random() * 100) + 1);
-					map.put("fxl",(int) (Math.random() * 100) + 1);
+					map.put("total",(int) (Math.random() * 100) + 1);
+					map.put("xds",(int) (Math.random() * 100) + 1);
+					map.put("xdsyx",(int) (Math.random() * 100) + 1);
 					data.add(map);
 					data.add(map);
 					cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
 					cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
 				}
 				}
@@ -81,82 +138,80 @@ public class ReportController extends BaseController {
 				for (int i = 0; i < 30; i++) {
 				for (int i = 0; i < 30; i++) {
 					Map<String,Object> map = new HashMap<String, Object>();
 					Map<String,Object> map = new HashMap<String, Object>();
 					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
 					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
-					map.put("ybl",(int) (Math.random() * 100) + 1);
-					map.put("fxl",(int) (Math.random() * 100) + 1);
+					map.put("total",(int) (Math.random() * 100) + 1);
+					map.put("xds",(int) (Math.random() * 100) + 1);
+					map.put("xdsyx",(int) (Math.random() * 100) + 1);
 					data.add(map);
 					data.add(map);
 					cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
 					cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
 				}
 				}
 				break;
 				break;
 			}
 			}
-			return success(data);
-		}catch(Exception e) {
-			return error(e.getMessage());
-		}
-	}
-	
-	@ApiOperation("2、获取样本类型统计信息")
-	@GetMapping("/yblxtj/{type}")
-	@ApiImplicitParam(name = "type", value = "类型(1:近24小时;2:近3天(72小时);3:近7天;4:近30天)", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
-	public AjaxResult yblxtj(@PathVariable("type") Integer type) {
-		try {
-			SampleType sampleType = new SampleType();
-			sampleType.setStatus(0L);
-			List<SampleType> selectSampleTypeList = sampleTypeService.selectSampleTypeList(sampleType);
 			
 			
-			Map<String,Object> map = new HashMap<String, Object>();
-			for (SampleType sampleType2 : selectSampleTypeList) {
-				map.put(sampleType2.getName(),(int) (Math.random() * 100) + 1);
+		}else {
+			switch (type) {
+			case 1:
 				
 				
+				for (int i = 0; i < 24; i++) {
+					Map<String,Object> map = new HashMap<String, Object>();
+					map.put("hour",cal.get(Calendar.HOUR));
+					int items = (int) (Math.random() * 100) + 1;
+					List<Integer> aa = new ArrayList<Integer>();
+					for(int j=0;j<items;j++) {
+						aa.add((int) (Math.random() * 100) + 1);
+					}
+					map.put("y",aa.toArray());
+					data.add(map);
+					cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
+				}
+				break;
+			case 2:
+				for (int i = 0; i < 72; i++) {
+					Map<String,Object> map = new HashMap<String, Object>();
+					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH, cal.getTime()));
+					int items = (int) (Math.random() * 100) + 1;
+					List<Integer> aa = new ArrayList<Integer>();
+					for(int j=0;j<items;j++) {
+						aa.add((int) (Math.random() * 100) + 1);
+					}
+					map.put("y",aa.toArray());
+					data.add(map);
+					cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)-1);
+				}
+				break;
+			case 3:
+				for (int i = 0; i < 7; i++) {
+					Map<String,Object> map = new HashMap<String, Object>();
+					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
+					int items = (int) (Math.random() * 100) + 1;
+					List<Integer> aa = new ArrayList<Integer>();
+					for(int j=0;j<items;j++) {
+						aa.add((int) (Math.random() * 100) + 1);
+					}
+					map.put("y",aa.toArray());
+					data.add(map);
+					cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
+				}
+				break;
+			case 4:
+				for (int i = 0; i < 30; i++) {
+					Map<String,Object> map = new HashMap<String, Object>();
+					map.put("hour",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
+					int items = (int) (Math.random() * 100) + 1;
+					List<Integer> aa = new ArrayList<Integer>();
+					for(int j=0;j<items;j++) {
+						aa.add((int) (Math.random() * 100) + 1);
+					}
+					map.put("y",aa.toArray());
+					data.add(map);
+					cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-1);
+				}
+				break;
 			}
 			}
-			return success(map);
-		}catch(Exception e) {
-			return error(e.getMessage());
-		}
-	}
-	
-	@ApiOperation("3、获取检出物占比统计信息")
-	@GetMapping("/jcwzb/{type}")
-	@ApiImplicitParam(name = "type", value = "类型(1:近24小时;2:近3天(72小时);3:近7天;4:近30天)", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
-	public AjaxResult jcwzb(@PathVariable("type") Integer type) {
-		try {
-			Map<String,Object> map = new HashMap<String, Object>();
-			for (String s : new String[] {"细菌及耐药/毒力/点突变基因","真菌","病毒","寄生虫","特殊病原体","疑似人体定植微生物"}) {
-				map.put(s,(int) (Math.random() * 100) + 1);
-			}
-			return success(map);
-		}catch(Exception e) {
-			return error(e.getMessage());
-		}
-	}
-	
-	@ApiOperation("4、病原体占比情况")
-	@PostMapping("/bytzb")
-	public AjaxResult jcwzb(@RequestBody ReportBean filterBean) {
-		try {
-			List<Map<String,Object>> data = new ArrayList<>();
-			Calendar cal = Calendar.getInstance();
-			cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)-24);
-			List<Integer> tmp = new ArrayList<Integer>();
-			int sum = 0;
-			for (int i = 0; i < 24; i++) {
-				int aaa = (int) (Math.random() * 100) + 1;
-				sum += aaa;
-				tmp.add(aaa);
-			}
-			for (int i = 0; i < 24; i++) {
-				Map<String,Object> map = new HashMap<String, Object>();
-				map.put("day",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, cal.getTime()));
-				map.put("per",((int)(tmp.get(i)*10000/sum))/100);
-				data.add(map);
-				cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)+1);
-			}
-			return success(data);
-		}catch(Exception e) {
-			return error(e.getMessage());
 		}
 		}
+		return AjaxResult.success("XXX统计",data);
 	}
 	}
 	
 	
-	@ApiOperation("5、病原体柱状分布")
+	@ApiOperation("3、病原体柱状分布")
 	@PostMapping("/bytzzfb")
 	@PostMapping("/bytzzfb")
 	public AjaxResult bytzzfb(@RequestBody ReportBean filterBean) {
 	public AjaxResult bytzzfb(@RequestBody ReportBean filterBean) {
 		try {
 		try {
@@ -182,7 +237,7 @@ public class ReportController extends BaseController {
 	}
 	}
 	
 	
 	
 	
-	@ApiOperation("6、世界病原体总情况,")
+	@ApiOperation("4、世界病原体总情况,")
 	@PostMapping("/sjbytztqk")
 	@PostMapping("/sjbytztqk")
 	public AjaxResult sjbytztqk(@RequestBody ReportBean filterBean) {
 	public AjaxResult sjbytztqk(@RequestBody ReportBean filterBean) {
 		try {
 		try {
@@ -204,7 +259,7 @@ public class ReportController extends BaseController {
 		}
 		}
 	}
 	}
 	
 	
-	@ApiOperation("7、中国病原体总情况")
+	@ApiOperation("5、中国病原体总情况")
 	@PostMapping("/zgbytztqk")
 	@PostMapping("/zgbytztqk")
 	public AjaxResult zgbytztqk(@RequestBody ReportBean filterBean) {
 	public AjaxResult zgbytztqk(@RequestBody ReportBean filterBean) {
 		try {
 		try {
@@ -226,502 +281,7 @@ public class ReportController extends BaseController {
 		}
 		}
 	}
 	}
 	
 	
-	
-	@ApiOperation("8、病原体演化谱系图")
-	@PostMapping("/phylotreeData")
-	public AjaxResult phylotreeData(@RequestBody ReportBean filterBean) {
-		try {
-			String data = "[\n"
-					+ "    {\n"
-					+ "        \"name\": \"病毒A\",\n"
-					+ "        \"strain\": \"A\",\n"
-					+ "        \"year\": 2010,\n"
-					+ "        \"endYear\": 2022,\n"
-					+ "        \"children\": [\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒B\",\n"
-					+ "                \"strain\": \"B\",\n"
-					+ "                \"year\": 2013,\n"
-					+ "                \"endYear\": 2019,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒C\",\n"
-					+ "                        \"strain\": \"C\",\n"
-					+ "                        \"year\": 2014,\n"
-					+ "                        \"endYear\": 2018,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒D\",\n"
-					+ "                                \"strain\": \"D\",\n"
-					+ "                                \"year\": 2017,\n"
-					+ "                                \"endYear\": 2018,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒E\",\n"
-					+ "                                        \"strain\": \"E\",\n"
-					+ "                                        \"year\": 2017,\n"
-					+ "                                        \"endYear\": 2018,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒F\",\n"
-					+ "                                                \"strain\": \"F\",\n"
-					+ "                                                \"year\": 2017,\n"
-					+ "                                                \"endYear\": 2018,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒G\",\n"
-					+ "                                                \"strain\": \"G\",\n"
-					+ "                                                \"year\": 2017,\n"
-					+ "                                                \"endYear\": 2018,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            },\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒E\",\n"
-					+ "                                \"strain\": \"E\",\n"
-					+ "                                \"year\": 2015,\n"
-					+ "                                \"endYear\": 2018,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒F\",\n"
-					+ "                                        \"strain\": \"F\",\n"
-					+ "                                        \"year\": 2016,\n"
-					+ "                                        \"endYear\": 2018,\n"
-					+ "                                        \"children\": []\n"
-					+ "                                    },\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒G\",\n"
-					+ "                                        \"strain\": \"G\",\n"
-					+ "                                        \"year\": 2016,\n"
-					+ "                                        \"endYear\": 2018,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒H\",\n"
-					+ "                                                \"strain\": \"H\",\n"
-					+ "                                                \"year\": 2017,\n"
-					+ "                                                \"endYear\": 2018,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    },\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒D\",\n"
-					+ "                        \"strain\": \"D\",\n"
-					+ "                        \"year\": 2014,\n"
-					+ "                        \"endYear\": 2017,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒F\",\n"
-					+ "                                \"strain\": \"F\",\n"
-					+ "                                \"year\": 2015,\n"
-					+ "                                \"endYear\": 2017,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒H\",\n"
-					+ "                                        \"strain\": \"H\",\n"
-					+ "                                        \"year\": 2016,\n"
-					+ "                                        \"endYear\": 2017,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒I\",\n"
-					+ "                                                \"strain\": \"I\",\n"
-					+ "                                                \"year\": 2016,\n"
-					+ "                                                \"endYear\": 2017,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒J\",\n"
-					+ "                                                \"strain\": \"J\",\n"
-					+ "                                                \"year\": 2016,\n"
-					+ "                                                \"endYear\": 2017,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            }\n"
-					+ "        ]\n"
-					+ "    },\n"
-					+ "    {\n"
-					+ "        \"name\": \"病毒B\",\n"
-					+ "        \"strain\": \"B\",\n"
-					+ "        \"year\": 2011,\n"
-					+ "        \"endYear\": 2020,\n"
-					+ "        \"children\": [\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒C\",\n"
-					+ "                \"strain\": \"C\",\n"
-					+ "                \"year\": 2014,\n"
-					+ "                \"endYear\": 2020,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒D\",\n"
-					+ "                        \"strain\": \"D\",\n"
-					+ "                        \"year\": 2015,\n"
-					+ "                        \"endYear\": 2019,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒E\",\n"
-					+ "                                \"strain\": \"E\",\n"
-					+ "                                \"year\": 2017,\n"
-					+ "                                \"endYear\": 2019,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒F\",\n"
-					+ "                                        \"strain\": \"F\",\n"
-					+ "                                        \"year\": 2018,\n"
-					+ "                                        \"endYear\": 2019,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒G\",\n"
-					+ "                                                \"strain\": \"G\",\n"
-					+ "                                                \"year\": 2018,\n"
-					+ "                                                \"endYear\": 2019,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒H\",\n"
-					+ "                                                \"strain\": \"H\",\n"
-					+ "                                                \"year\": 2018,\n"
-					+ "                                                \"endYear\": 2019,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            },\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒F\",\n"
-					+ "                                \"strain\": \"F\",\n"
-					+ "                                \"year\": 2016,\n"
-					+ "                                \"endYear\": 2019,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒H\",\n"
-					+ "                                        \"strain\": \"H\",\n"
-					+ "                                        \"year\": 2017,\n"
-					+ "                                        \"endYear\": 2019,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒I\",\n"
-					+ "                                                \"strain\": \"I\",\n"
-					+ "                                                \"year\": 2018,\n"
-					+ "                                                \"endYear\": 2019,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒J\",\n"
-					+ "                                                \"strain\": \"J\",\n"
-					+ "                                                \"year\": 2018,\n"
-					+ "                                                \"endYear\": 2019,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    },\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒E\",\n"
-					+ "                        \"strain\": \"E\",\n"
-					+ "                        \"year\": 2015,\n"
-					+ "                        \"endYear\": 2020,\n"
-					+ "                        \"children\": []\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            },\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒D\",\n"
-					+ "                \"strain\": \"D\",\n"
-					+ "                \"year\": 2012,\n"
-					+ "                \"endYear\": 2016,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒E\",\n"
-					+ "                        \"strain\": \"E\",\n"
-					+ "                        \"year\": 2013,\n"
-					+ "                        \"endYear\": 2016,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒F\",\n"
-					+ "                                \"strain\": \"F\",\n"
-					+ "                                \"year\": 2015,\n"
-					+ "                                \"endYear\": 2016,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒G\",\n"
-					+ "                                        \"strain\": \"G\",\n"
-					+ "                                        \"year\": 2015,\n"
-					+ "                                        \"endYear\": 2016,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒H\",\n"
-					+ "                                                \"strain\": \"H\",\n"
-					+ "                                                \"year\": 2015,\n"
-					+ "                                                \"endYear\": 2016,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    },\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒F\",\n"
-					+ "                        \"strain\": \"F\",\n"
-					+ "                        \"year\": 2014,\n"
-					+ "                        \"endYear\": 2016,\n"
-					+ "                        \"children\": []\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            }\n"
-					+ "        ]\n"
-					+ "    },\n"
-					+ "    {\n"
-					+ "        \"name\": \"病毒C\",\n"
-					+ "        \"strain\": \"C\",\n"
-					+ "        \"year\": 2010,\n"
-					+ "        \"endYear\": 2022,\n"
-					+ "        \"children\": [\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒D\",\n"
-					+ "                \"strain\": \"D\",\n"
-					+ "                \"year\": 2011,\n"
-					+ "                \"endYear\": 2017,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒E\",\n"
-					+ "                        \"strain\": \"E\",\n"
-					+ "                        \"year\": 2014,\n"
-					+ "                        \"endYear\": 2017,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒F\",\n"
-					+ "                                \"strain\": \"F\",\n"
-					+ "                                \"year\": 2016,\n"
-					+ "                                \"endYear\": 2017,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒G\",\n"
-					+ "                                        \"strain\": \"G\",\n"
-					+ "                                        \"year\": 2016,\n"
-					+ "                                        \"endYear\": 2017,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒H\",\n"
-					+ "                                                \"strain\": \"H\",\n"
-					+ "                                                \"year\": 2016,\n"
-					+ "                                                \"endYear\": 2017,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒I\",\n"
-					+ "                                                \"strain\": \"I\",\n"
-					+ "                                                \"year\": 2016,\n"
-					+ "                                                \"endYear\": 2017,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    },\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒F\",\n"
-					+ "                        \"strain\": \"F\",\n"
-					+ "                        \"year\": 2013,\n"
-					+ "                        \"endYear\": 2017,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒G\",\n"
-					+ "                                \"strain\": \"G\",\n"
-					+ "                                \"year\": 2014,\n"
-					+ "                                \"endYear\": 2017,\n"
-					+ "                                \"children\": []\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            },\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒E\",\n"
-					+ "                \"strain\": \"E\",\n"
-					+ "                \"year\": 2011,\n"
-					+ "                \"endYear\": 2019,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒F\",\n"
-					+ "                        \"strain\": \"F\",\n"
-					+ "                        \"year\": 2014,\n"
-					+ "                        \"endYear\": 2019,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒G\",\n"
-					+ "                                \"strain\": \"G\",\n"
-					+ "                                \"year\": 2015,\n"
-					+ "                                \"endYear\": 2019,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒H\",\n"
-					+ "                                        \"strain\": \"H\",\n"
-					+ "                                        \"year\": 2017,\n"
-					+ "                                        \"endYear\": 2019,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒I\",\n"
-					+ "                                                \"strain\": \"I\",\n"
-					+ "                                                \"year\": 2018,\n"
-					+ "                                                \"endYear\": 2019,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒J\",\n"
-					+ "                                                \"strain\": \"J\",\n"
-					+ "                                                \"year\": 2018,\n"
-					+ "                                                \"endYear\": 2019,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            },\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒H\",\n"
-					+ "                                \"strain\": \"H\",\n"
-					+ "                                \"year\": 2015,\n"
-					+ "                                \"endYear\": 2019,\n"
-					+ "                                \"children\": []\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            }\n"
-					+ "        ]\n"
-					+ "    },\n"
-					+ "    {\n"
-					+ "        \"name\": \"病毒D\",\n"
-					+ "        \"strain\": \"D\",\n"
-					+ "        \"year\": 2011,\n"
-					+ "        \"endYear\": 2023,\n"
-					+ "        \"children\": [\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒E\",\n"
-					+ "                \"strain\": \"E\",\n"
-					+ "                \"year\": 2012,\n"
-					+ "                \"endYear\": 2015,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒F\",\n"
-					+ "                        \"strain\": \"F\",\n"
-					+ "                        \"year\": 2013,\n"
-					+ "                        \"endYear\": 2015,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒G\",\n"
-					+ "                                \"strain\": \"G\",\n"
-					+ "                                \"year\": 2014,\n"
-					+ "                                \"endYear\": 2015,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒H\",\n"
-					+ "                                        \"strain\": \"H\",\n"
-					+ "                                        \"year\": 2014,\n"
-					+ "                                        \"endYear\": 2015,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒I\",\n"
-					+ "                                                \"strain\": \"I\",\n"
-					+ "                                                \"year\": 2014,\n"
-					+ "                                                \"endYear\": 2015,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            },\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒J\",\n"
-					+ "                                                \"strain\": \"J\",\n"
-					+ "                                                \"year\": 2014,\n"
-					+ "                                                \"endYear\": 2015,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            }\n"
-					+ "        ]\n"
-					+ "    },\n"
-					+ "    {\n"
-					+ "        \"name\": \"病毒E\",\n"
-					+ "        \"strain\": \"E\",\n"
-					+ "        \"year\": 2011,\n"
-					+ "        \"endYear\": 2020,\n"
-					+ "        \"children\": [\n"
-					+ "            {\n"
-					+ "                \"name\": \"病毒F\",\n"
-					+ "                \"strain\": \"F\",\n"
-					+ "                \"year\": 2012,\n"
-					+ "                \"endYear\": 2016,\n"
-					+ "                \"children\": [\n"
-					+ "                    {\n"
-					+ "                        \"name\": \"病毒G\",\n"
-					+ "                        \"strain\": \"G\",\n"
-					+ "                        \"year\": 2014,\n"
-					+ "                        \"endYear\": 2016,\n"
-					+ "                        \"children\": [\n"
-					+ "                            {\n"
-					+ "                                \"name\": \"病毒H\",\n"
-					+ "                                \"strain\": \"H\",\n"
-					+ "                                \"year\": 2015,\n"
-					+ "                                \"endYear\": 2016,\n"
-					+ "                                \"children\": [\n"
-					+ "                                    {\n"
-					+ "                                        \"name\": \"病毒I\",\n"
-					+ "                                        \"strain\": \"I\",\n"
-					+ "                                        \"year\": 2015,\n"
-					+ "                                        \"endYear\": 2016,\n"
-					+ "                                        \"children\": [\n"
-					+ "                                            {\n"
-					+ "                                                \"name\": \"病毒J\",\n"
-					+ "                                                \"strain\": \"J\",\n"
-					+ "                                                \"year\": 2015,\n"
-					+ "                                                \"endYear\": 2016,\n"
-					+ "                                                \"children\": []\n"
-					+ "                                            }\n"
-					+ "                                        ]\n"
-					+ "                                    }\n"
-					+ "                                ]\n"
-					+ "                            }\n"
-					+ "                        ]\n"
-					+ "                    }\n"
-					+ "                ]\n"
-					+ "            }\n"
-					+ "        ]\n"
-					+ "    }\n"
-					+ "]";
-			return success(data);
-		}catch(Exception e) {
-			return error(e.getMessage());
-		}
-	}
-	
-	@ApiOperation("9、世界病原体分支占比情况")
+	@ApiOperation("6、世界病原体分支占比情况")
 	@PostMapping("/sjbytfzzbqk")
 	@PostMapping("/sjbytfzzbqk")
 	public AjaxResult sjbytfzzbqk(@RequestBody ReportBean filterBean) {
 	public AjaxResult sjbytfzzbqk(@RequestBody ReportBean filterBean) {
 		try {
 		try {
@@ -749,7 +309,7 @@ public class ReportController extends BaseController {
 	}
 	}
 	
 	
 	
 	
-	@ApiOperation("10、中国病原体分支占比情况,")
+	@ApiOperation("7、中国病原体分支占比情况,")
 	@PostMapping("/zgbytfzzbqk")
 	@PostMapping("/zgbytfzzbqk")
 	public AjaxResult zgbytfzzbqk(@RequestBody ReportBean filterBean) {
 	public AjaxResult zgbytfzzbqk(@RequestBody ReportBean filterBean) {
 		try {
 		try {

+ 5 - 57
healsphere-buss/src/main/java/com/zdqz/report/domain/ReportBean.java

@@ -17,22 +17,9 @@ public class ReportBean implements Serializable {
 	@ApiModelProperty(value="开始时间",name="endDate")
 	@ApiModelProperty(value="开始时间",name="endDate")
 	private Date endDate;
 	private Date endDate;
 	
 	
-	@ApiModelProperty(value="型号",name="model")
-	private String model;
-	
-	
-	@ApiModelProperty(value="分支",name="batch")
-	private String batch;
-	
 	@ApiModelProperty(value="病原体名称",name="bytName")
 	@ApiModelProperty(value="病原体名称",name="bytName")
-	private String bytName;
-	
-	@ApiModelProperty(value="国家",name="country")
-	private String country;
+	private String assemblyAccession;
 	
 	
-	@ApiModelProperty(value="中国省份(国家是中国时才有)",name="province")
-	private String province;
-
 	public Date getStartDate() {
 	public Date getStartDate() {
 		return startDate;
 		return startDate;
 	}
 	}
@@ -49,51 +36,12 @@ public class ReportBean implements Serializable {
 		this.endDate = endDate;
 		this.endDate = endDate;
 	}
 	}
 
 
-	public String getModel() {
-		return model;
-	}
-
-	public void setModel(String model) {
-		this.model = model;
-	}
-
-	public String getBatch() {
-		return batch;
-	}
-
-	public void setBatch(String batch) {
-		this.batch = batch;
-	}
-
-	public String getBytName() {
-		return bytName;
+	public String getAssemblyAccession() {
+		return assemblyAccession;
 	}
 	}
 
 
-	public void setBytName(String bytName) {
-		this.bytName = bytName;
+	public void setAssemblyAccession(String assemblyAccession) {
+		this.assemblyAccession = assemblyAccession;
 	}
 	}
-
-	public String getCountry() {
-		return country;
-	}
-
-	public void setCountry(String country) {
-		this.country = country;
-	}
-
-	public String getProvince() {
-		return province;
-	}
-
-	public void setProvince(String province) {
-		this.province = province;
-	}
-
-	public static long getSerialversionuid() {
-		return serialVersionUID;
-	}
-	
-
-	
 	
 	
 }
 }

+ 32 - 0
healsphere-buss/src/main/java/com/zdqz/sample/controller/SamplePatientController.java

@@ -13,8 +13,11 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestPart;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
 
 
+import com.alibaba.fastjson2.JSON;
 import com.zdqz.common.annotation.Log;
 import com.zdqz.common.annotation.Log;
 import com.zdqz.common.core.controller.BaseController;
 import com.zdqz.common.core.controller.BaseController;
 import com.zdqz.common.core.domain.AjaxResult;
 import com.zdqz.common.core.domain.AjaxResult;
@@ -24,6 +27,9 @@ import com.zdqz.common.utils.poi.ExcelUtil;
 import com.zdqz.sample.domain.SamplePatient;
 import com.zdqz.sample.domain.SamplePatient;
 import com.zdqz.sample.service.ISamplePatientService;
 import com.zdqz.sample.service.ISamplePatientService;
 
 
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+
 /**
 /**
  * 样本患者信息Controller
  * 样本患者信息Controller
  * 
  * 
@@ -97,4 +103,30 @@ public class SamplePatientController extends BaseController {
 	public AjaxResult remove(@PathVariable Long[] ids) {
 	public AjaxResult remove(@PathVariable Long[] ids) {
 		return toAjax(samplePatientService.deleteSamplePatientByIds(ids));
 		return toAjax(samplePatientService.deleteSamplePatientByIds(ids));
 	}
 	}
+	
+	
+	@GetMapping("/loadDataByIdCard/{idCard}")
+	@ApiOperation("根据身份证信息获取患者信息列表,按照创建时间排序")
+	@ApiImplicitParam(name = "idCard", value = "身份证信息列表", required = true, dataType = "string", paramType = "path", dataTypeClass = String.class)
+	public AjaxResult loadDataByIdCard(@PathVariable("idCard") String idCard) {
+		try {
+			return success(samplePatientService.loadDataByIdCard(idCard));
+		}catch(Exception e) {
+			return error(e.getMessage());
+		}
+	}
+	
+	
+	@PostMapping("/importData")
+	@ApiOperation("导入患者数据,每次均新增")
+	@Log(title = "患者数据管理", businessType = BusinessType.IMPORT)
+	public AjaxResult importData(@RequestPart("file") MultipartFile file) throws Exception {
+		ExcelUtil<SamplePatient> util = new ExcelUtil<SamplePatient>(SamplePatient.class);
+		List<SamplePatient> dataList = util.importExcel(file.getInputStream(),1);
+		if(dataList != null && dataList.size() >0) {
+			System.out.println(JSON.toJSONString(dataList));
+			samplePatientService.batchInsert(dataList,getUsername());
+		}
+		return success("导入成功");
+	}
 }
 }

+ 0 - 21
healsphere-buss/src/main/java/com/zdqz/sample/domain/SampleInfo.java

@@ -1,7 +1,5 @@
 package com.zdqz.sample.domain;
 package com.zdqz.sample.domain;
 
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.zdqz.common.annotation.Excel;
 import com.zdqz.common.annotation.Excel;
 import com.zdqz.common.core.domain.BaseEntity;
 import com.zdqz.common.core.domain.BaseEntity;
 
 
@@ -27,10 +25,6 @@ public class SampleInfo extends BaseEntity {
 	@Excel(name = "患者名称")
 	@Excel(name = "患者名称")
 	private String patientName;
 	private String patientName;
 
 
-	/** 患者电话 */
-	@Excel(name = "患者电话")
-	private String patientPhone;
-
 	/** 样本类型 */
 	/** 样本类型 */
 	private Long sampleTypeId;
 	private Long sampleTypeId;
 	
 	
@@ -85,14 +79,6 @@ public class SampleInfo extends BaseEntity {
 		this.patientName = patientName;
 		this.patientName = patientName;
 	}
 	}
 
 
-	public void setPatientPhone(String patientPhone) {
-		this.patientPhone = patientPhone;
-	}
-
-	public String getPatientPhone() {
-		return patientPhone;
-	}
-
 	public void setSampleTypeId(Long sampleTypeId) {
 	public void setSampleTypeId(Long sampleTypeId) {
 		this.sampleTypeId = sampleTypeId;
 		this.sampleTypeId = sampleTypeId;
 	}
 	}
@@ -150,11 +136,4 @@ public class SampleInfo extends BaseEntity {
 		this.sampleDeptName = sampleDeptName;
 		this.sampleDeptName = sampleDeptName;
 	}
 	}
 
 
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("sampleCode", getSampleCode()).append("patientId", getPatientId())
-				.append("patientPhone", getPatientPhone()).append("sampleTypeId", getSampleTypeId()).append("sampleHospitalId", getSampleHospitalId())
-				.append("sampleDeptId", getSampleDeptId()).append("doctorName", getDoctorName()).append("createBy", getCreateBy()).append("createTime", getCreateTime())
-				.append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
-	}
 }
 }

Plik diff jest za duży
+ 393 - 958
healsphere-buss/src/main/java/com/zdqz/sample/domain/SamplePatient.java


+ 2 - 0
healsphere-buss/src/main/java/com/zdqz/sample/mapper/SamplePatientMapper.java

@@ -23,4 +23,6 @@ public interface SamplePatientMapper {
 	public int deleteSamplePatientByIds(Long[] ids);
 	public int deleteSamplePatientByIds(Long[] ids);
 
 
 	public SamplePatient selectSamplePatientByExperiment(Long experimentid);
 	public SamplePatient selectSamplePatientByExperiment(Long experimentid);
+
+	public List<SamplePatient> loadDataByIdCard(String idCard);
 }
 }

+ 4 - 0
healsphere-buss/src/main/java/com/zdqz/sample/service/ISamplePatientService.java

@@ -61,4 +61,8 @@ public interface ISamplePatientService
     
     
 
 
 	public SamplePatient selectSamplePatientByExperiment(Long experimentid);
 	public SamplePatient selectSamplePatientByExperiment(Long experimentid);
+
+	public List<SamplePatient> loadDataByIdCard(String idCard);
+
+	public void batchInsert(List<SamplePatient> dataList, String username);
 }
 }

+ 5 - 1
healsphere-buss/src/main/java/com/zdqz/sample/service/impl/SampleExperimentServiceImpl.java

@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
+import com.alibaba.fastjson2.JSON;
 import com.zdqz.common.config.ZdqzConfig;
 import com.zdqz.common.config.ZdqzConfig;
 import com.zdqz.common.utils.DateUtils;
 import com.zdqz.common.utils.DateUtils;
 import com.zdqz.common.utils.poi.ExcelUtil;
 import com.zdqz.common.utils.poi.ExcelUtil;
@@ -78,12 +79,15 @@ public class SampleExperimentServiceImpl implements ISampleExperimentService {
 			f.mkdirs();
 			f.mkdirs();
 		}
 		}
 		for (File ff : f.listFiles()) {
 		for (File ff : f.listFiles()) {
+			System.out.println(ff.getName());
 			if(ff.isFile() && ff.getName().indexOf(se.getExperimentCode()+"_") != -1) {	//说明是文件并且含有实验编号
 			if(ff.isFile() && ff.getName().indexOf(se.getExperimentCode()+"_") != -1) {	//说明是文件并且含有实验编号
 				//文件复制到备份地方
 				//文件复制到备份地方
 				FileUtils.copyFileToDirectory(ff, new File(ZdqzConfig.getBakPath()));
 				FileUtils.copyFileToDirectory(ff, new File(ZdqzConfig.getBakPath()));
 				//文件解析
 				//文件解析
 				FileInputStream fis = new FileInputStream(ff);
 				FileInputStream fis = new FileInputStream(ff);
-				readDataService.importData(se.getId(),new ExcelUtil<ReadData>(ReadData.class).importExcel(fis));
+				List<ReadData> importExcel = new ExcelUtil<ReadData>(ReadData.class).importExcel(fis);
+				System.out.println(JSON.toJSONString(importExcel));
+				readDataService.importData(se.getId(),importExcel);
 				fis.close();
 				fis.close();
 				// 文件删除
 				// 文件删除
 				ff.deleteOnExit();
 				ff.deleteOnExit();

+ 39 - 2
healsphere-buss/src/main/java/com/zdqz/sample/service/impl/SamplePatientServiceImpl.java

@@ -1,12 +1,20 @@
 package com.zdqz.sample.service.impl;
 package com.zdqz.sample.service.impl;
 
 
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.List;
-import com.zdqz.common.utils.DateUtils;
+import java.util.Map;
+import java.util.Set;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
-import com.zdqz.sample.mapper.SamplePatientMapper;
+
+import com.zdqz.common.utils.DateUtils;
 import com.zdqz.sample.domain.SamplePatient;
 import com.zdqz.sample.domain.SamplePatient;
+import com.zdqz.sample.mapper.SamplePatientMapper;
 import com.zdqz.sample.service.ISamplePatientService;
 import com.zdqz.sample.service.ISamplePatientService;
+import com.zdqz.system.domain.SysCnarea;
+import com.zdqz.system.service.ISysCnareaService;
 
 
 /**
 /**
  * 样本患者信息Service业务层处理
  * 样本患者信息Service业务层处理
@@ -19,6 +27,8 @@ public class SamplePatientServiceImpl implements ISamplePatientService {
 	@Autowired
 	@Autowired
 	private SamplePatientMapper samplePatientMapper;
 	private SamplePatientMapper samplePatientMapper;
 
 
+	@Autowired
+	private ISysCnareaService sysCnareaService;
 	/**
 	/**
 	 * 查询样本患者信息
 	 * 查询样本患者信息
 	 * 
 	 * 
@@ -91,4 +101,31 @@ public class SamplePatientServiceImpl implements ISamplePatientService {
 	public SamplePatient selectSamplePatientByExperiment(Long experimentid) {
 	public SamplePatient selectSamplePatientByExperiment(Long experimentid) {
 		return samplePatientMapper.selectSamplePatientByExperiment(experimentid);
 		return samplePatientMapper.selectSamplePatientByExperiment(experimentid);
 	}
 	}
+
+	@Override
+	public List<SamplePatient> loadDataByIdCard(String idCard) {
+		return samplePatientMapper.loadDataByIdCard(idCard);
+	}
+
+	@Override
+	public void batchInsert(List<SamplePatient> dataList, String username) {
+		Set<String> set = new HashSet<String>();
+		for (SamplePatient sp : dataList) {
+			set.add(sp.getAreaName());
+		}
+		List<SysCnarea> selectSysCnareaCodeList = sysCnareaService.selectSysCnareaCodeList(set.toArray(new String[0]));
+		Map<String,String> map = new HashMap<>();
+		for (SysCnarea sysCnarea : selectSysCnareaCodeList) {
+			map.put(sysCnarea.getMergerName(), sysCnarea.getAreaCode());
+		}
+		
+		for (SamplePatient sp : dataList) {
+			sp.setAreaId(map.get(sp.getAreaName()));
+			sp.setCreateBy(username);
+			sp.setUpdateBy(username);
+			sp.setCreateTime(DateUtils.getNowDate());
+			sp.setUpdateTime(DateUtils.getNowDate());
+			samplePatientMapper.insertSamplePatient(sp);
+		}
+	}
 }
 }

+ 18 - 18
healsphere-buss/src/main/java/com/zdqz/sample/tool/PdfTools.java

@@ -3,7 +3,7 @@ package com.zdqz.sample.tool;
 import java.io.File;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.IOException;
-import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FileUtils;
@@ -107,13 +107,13 @@ public class PdfTools {
 			
 			
 			
 			
 			//病原体列表
 			//病原体列表
-			List<DataBase> bytList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> bytList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//耐药基因列表
 			//耐药基因列表
-			List<DataBase> nyjyList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> nyjyList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//毒力基因列表
 			//毒力基因列表
-			List<DataBase> dljyList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> dljyList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//点突变耐药基因列表
 			//点突变耐药基因列表
-			List<DataBase> dtbjyList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> dtbjyList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			
 			
 			//细菌列表
 			//细菌列表
 			List<DataBaseForTable> xj2List = null;
 			List<DataBaseForTable> xj2List = null;
@@ -121,25 +121,25 @@ public class PdfTools {
 			List<DataBaseForTable> tsbytList = null;
 			List<DataBaseForTable> tsbytList = null;
 			
 			
 			//细菌列表
 			//细菌列表
-			List<DataBase> xjList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> xjList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//真菌列表
 			//真菌列表
-			List<DataBase> zjList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> zjList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//病毒列表
 			//病毒列表
-			List<DataBase> bdList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> bdList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//寄生虫列表
 			//寄生虫列表
-			List<DataBase> jscList = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> jscList = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			
 			
 			//病毒DNA
 			//病毒DNA
-			List<DataBase> bd_DNA = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> bd_DNA = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//病毒RNA
 			//病毒RNA
-			List<DataBase> bd_RNA = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> bd_RNA = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			
 			
 			//特殊病原体_结核分枝杆菌复合群列表
 			//特殊病原体_结核分枝杆菌复合群列表
-			List<DataBase> tsbyt_jhfzgjfhq = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> tsbyt_jhfzgjfhq = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//特殊病原体_非结核分枝杆菌列表
 			//特殊病原体_非结核分枝杆菌列表
-			List<DataBase> tsbyt_NTM = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> tsbyt_NTM = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			//特殊病原体_检出支/衣原体列表列表
 			//特殊病原体_检出支/衣原体列表列表
-			List<DataBase> tsbyt_zyyt = Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
+			List<DataBase> tsbyt_zyyt = new ArrayList<DataBase>();//Arrays.asList(new DataBase("微黄奈瑟球菌","137","Neisseria subflava","该菌是革兰氏阴性菌,是共生于上呼吸道粘膜的需氧病原宏基因组测序检测报告菌,一般认为是非致病性的,但在罕见情况下可导致脑膜炎、外科手术部位感染、急性胆道炎、心内膜炎、尿路感染及脓毒症。"));
 			
 			
 			
 			
 			
 			
@@ -200,7 +200,7 @@ public class PdfTools {
 	        
 	        
 	        for (DataBase dataBase : bytList) {
 	        for (DataBase dataBase : bytList) {
 	        	Paragraph  phrase = new Paragraph();
 	        	Paragraph  phrase = new Paragraph();
-	        	phrase.add(new Phrase(dataBase.getNameCn()+"("+dataBase.getOrganismName()+"):", bold_content_font));
+	        	phrase.add(new Phrase(dataBase.getOrganismName()+":", bold_content_font));
 	        	phrase.add(new Phrase(dataBase.getDefined(), content_font));
 	        	phrase.add(new Phrase(dataBase.getDefined(), content_font));
 	        	PdfPCell cell = new PdfPCell(phrase);
 	        	PdfPCell cell = new PdfPCell(phrase);
 	        	cell.setLeading(2f,1.5f);
 	        	cell.setLeading(2f,1.5f);
@@ -398,7 +398,7 @@ public class PdfTools {
         		
         		
         		for (DataBase dataBase : dataBaseForTable.getDatas()) {
         		for (DataBase dataBase : dataBaseForTable.getDatas()) {
         			
         			
-        			cell2 = new PdfPCell(new Phrase(dataBase.getNameCn()+"\n"+dataBase.getOrganismName(),new Font(baseFont, 12f)));
+        			cell2 = new PdfPCell(new Phrase(dataBase.getOrganismName()+"\n"+dataBase.getOrganismName(),new Font(baseFont, 12f)));
         			cell2.setBorderColor(new BaseColor(242,242,242));
         			cell2.setBorderColor(new BaseColor(242,242,242));
         			cell2.setHorizontalAlignment(Element.ALIGN_CENTER);
         			cell2.setHorizontalAlignment(Element.ALIGN_CENTER);
         			ppt.addCell(cell2);
         			ppt.addCell(cell2);
@@ -432,7 +432,7 @@ public class PdfTools {
         	sign = "未检出";
         	sign = "未检出";
         }else {
         }else {
         	for (int i = 0; i < data.size(); i++) {
         	for (int i = 0; i < data.size(); i++) {
-        		sign += data.get(i).getNameCn()+",";
+        		sign += data.get(i).getOrganismName()+",";
 			}
 			}
     		sign = sign.substring(0,sign.length()-1);
     		sign = sign.substring(0,sign.length()-1);
         }
         }
@@ -482,7 +482,7 @@ public class PdfTools {
         	sign = "未检出";
         	sign = "未检出";
         }else {
         }else {
         	for (int i = 0; i < data.size(); i++) {
         	for (int i = 0; i < data.size(); i++) {
-        		sign += data.get(i).getNameCn()+"("+data.get(i).getGenomeSize()+")";
+        		sign += data.get(i).getOrganismName()+"("+data.get(i).getGenomeSize()+")";
         		if(i == 6) {
         		if(i == 6) {
         			break;
         			break;
         		}else {
         		}else {

+ 75 - 70
healsphere-buss/src/main/java/com/zdqz/system/controller/SysReportConfigController.java

@@ -1,25 +1,30 @@
 package com.zdqz.system.controller;
 package com.zdqz.system.controller;
 
 
 import java.util.List;
 import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
-import org.springframework.security.access.prepost.PreAuthorize;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
+
 import com.zdqz.common.annotation.Log;
 import com.zdqz.common.annotation.Log;
 import com.zdqz.common.core.controller.BaseController;
 import com.zdqz.common.core.controller.BaseController;
 import com.zdqz.common.core.domain.AjaxResult;
 import com.zdqz.common.core.domain.AjaxResult;
+import com.zdqz.common.core.page.TableDataInfo;
 import com.zdqz.common.enums.BusinessType;
 import com.zdqz.common.enums.BusinessType;
+import com.zdqz.common.utils.poi.ExcelUtil;
 import com.zdqz.system.domain.SysReportConfig;
 import com.zdqz.system.domain.SysReportConfig;
 import com.zdqz.system.service.ISysReportConfigService;
 import com.zdqz.system.service.ISysReportConfigService;
-import com.zdqz.common.utils.poi.ExcelUtil;
-import com.zdqz.common.core.page.TableDataInfo;
+
+import io.swagger.annotations.ApiOperation;
 
 
 /**
 /**
  * 诊断统计设置Controller
  * 诊断统计设置Controller
@@ -29,76 +34,76 @@ import com.zdqz.common.core.page.TableDataInfo;
  */
  */
 @RestController
 @RestController
 @RequestMapping("/system/systemConfig")
 @RequestMapping("/system/systemConfig")
-public class SysReportConfigController extends BaseController
-{
-    @Autowired
-    private ISysReportConfigService sysReportConfigService;
+public class SysReportConfigController extends BaseController {
+	@Autowired
+	private ISysReportConfigService sysReportConfigService;
 
 
-    /**
-     * 查询诊断统计设置列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:systemConfig:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(SysReportConfig sysReportConfig)
-    {
-        startPage();
-        List<SysReportConfig> list = sysReportConfigService.selectSysReportConfigList(sysReportConfig);
-        return getDataTable(list);
-    }
+	/**
+	 * 查询诊断统计设置列表
+	 */
+	@PreAuthorize("@ss.hasPermi('system:systemConfig:list')")
+	@GetMapping("/list")
+	public TableDataInfo list(SysReportConfig sysReportConfig) {
+		startPage();
+		List<SysReportConfig> list = sysReportConfigService.selectSysReportConfigList(sysReportConfig);
+		return getDataTable(list);
+	}
 
 
-    /**
-     * 导出诊断统计设置列表
-     */
-    @PreAuthorize("@ss.hasPermi('system:systemConfig:export')")
-    @Log(title = "诊断统计设置", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, SysReportConfig sysReportConfig)
-    {
-        List<SysReportConfig> list = sysReportConfigService.selectSysReportConfigList(sysReportConfig);
-        ExcelUtil<SysReportConfig> util = new ExcelUtil<SysReportConfig>(SysReportConfig.class);
-        util.exportExcel(response, list, "诊断统计设置数据");
-    }
+	/**
+	 * 导出诊断统计设置列表
+	 */
+	@PreAuthorize("@ss.hasPermi('system:systemConfig:export')")
+	@Log(title = "诊断统计设置", businessType = BusinessType.EXPORT)
+	@PostMapping("/export")
+	public void export(HttpServletResponse response, SysReportConfig sysReportConfig) {
+		List<SysReportConfig> list = sysReportConfigService.selectSysReportConfigList(sysReportConfig);
+		ExcelUtil<SysReportConfig> util = new ExcelUtil<SysReportConfig>(SysReportConfig.class);
+		util.exportExcel(response, list, "诊断统计设置数据");
+	}
 
 
-    /**
-     * 获取诊断统计设置详细信息
-     */
-    @PreAuthorize("@ss.hasPermi('system:systemConfig:query')")
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
-        return success(sysReportConfigService.selectSysReportConfigById(id));
-    }
+	/**
+	 * 获取诊断统计设置详细信息
+	 */
+	@PreAuthorize("@ss.hasPermi('system:systemConfig:query')")
+	@GetMapping(value = "/{id}")
+	public AjaxResult getInfo(@PathVariable("id") Long id) {
+		return success(sysReportConfigService.selectSysReportConfigById(id));
+	}
 
 
-    /**
-     * 新增诊断统计设置
-     */
-    @PreAuthorize("@ss.hasPermi('system:systemConfig:add')")
-    @Log(title = "诊断统计设置", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody SysReportConfig sysReportConfig)
-    {
-        return toAjax(sysReportConfigService.insertSysReportConfig(sysReportConfig));
-    }
+	/**
+	 * 新增诊断统计设置
+	 */
+	@PreAuthorize("@ss.hasPermi('system:systemConfig:add')")
+	@Log(title = "诊断统计设置", businessType = BusinessType.INSERT)
+	@PostMapping
+	public AjaxResult add(@RequestBody SysReportConfig sysReportConfig) {
+		return toAjax(sysReportConfigService.insertSysReportConfig(sysReportConfig));
+	}
 
 
-    /**
-     * 修改诊断统计设置
-     */
-    @PreAuthorize("@ss.hasPermi('system:systemConfig:edit')")
-    @Log(title = "诊断统计设置", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody SysReportConfig sysReportConfig)
-    {
-        return toAjax(sysReportConfigService.updateSysReportConfig(sysReportConfig));
-    }
+	/**
+	 * 修改诊断统计设置
+	 */
+	@PreAuthorize("@ss.hasPermi('system:systemConfig:edit')")
+	@Log(title = "诊断统计设置", businessType = BusinessType.UPDATE)
+	@PutMapping
+	public AjaxResult edit(@RequestBody SysReportConfig sysReportConfig) {
+		return toAjax(sysReportConfigService.updateSysReportConfig(sysReportConfig));
+	}
 
 
-    /**
-     * 删除诊断统计设置
-     */
-    @PreAuthorize("@ss.hasPermi('system:systemConfig:remove')")
-    @Log(title = "诊断统计设置", businessType = BusinessType.DELETE)
+	/**
+	 * 删除诊断统计设置
+	 */
+	@PreAuthorize("@ss.hasPermi('system:systemConfig:remove')")
+	@Log(title = "诊断统计设置", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
 	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
-        return toAjax(sysReportConfigService.deleteSysReportConfigByIds(ids));
-    }
+	public AjaxResult remove(@PathVariable Long[] ids) {
+		return toAjax(sysReportConfigService.deleteSysReportConfigByIds(ids));
+	}
+	
+	
+	@ApiOperation("获取所有的统计配置文件")
+	@GetMapping("/getAll")
+	public AjaxResult getAll() {
+		return success(sysReportConfigService.selectSysReportConfigList(new SysReportConfig()));
+	}
 }
 }

+ 10 - 17
healsphere-buss/src/main/java/com/zdqz/system/domain/SysReportConfig.java

@@ -1,9 +1,5 @@
 package com.zdqz.system.domain;
 package com.zdqz.system.domain;
 
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import com.zdqz.common.annotation.Excel;
 import com.zdqz.common.core.domain.BaseEntity;
 import com.zdqz.common.core.domain.BaseEntity;
 
 
 /**
 /**
@@ -18,16 +14,12 @@ public class SysReportConfig extends BaseEntity {
 	/** 编号 */
 	/** 编号 */
 	private Long id;
 	private Long id;
 
 
-	/** 关键字 */
-	@Excel(name = "关键字")
 	private String keyword;
 	private String keyword;
 
 
-	/** 是否展示 */
-	@Excel(name = "是否展示")
+	private String title;
+	
 	private String defaultShow;
 	private String defaultShow;
 
 
-	/** 是否数值 */
-	@Excel(name = "是否数值")
 	private String isNum;
 	private String isNum;
 
 
 	public void setId(Long id) {
 	public void setId(Long id) {
@@ -46,6 +38,14 @@ public class SysReportConfig extends BaseEntity {
 		return keyword;
 		return keyword;
 	}
 	}
 
 
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
 	public void setDefaultShow(String defaultShow) {
 	public void setDefaultShow(String defaultShow) {
 		this.defaultShow = defaultShow;
 		this.defaultShow = defaultShow;
 	}
 	}
@@ -61,11 +61,4 @@ public class SysReportConfig extends BaseEntity {
 	public String getIsNum() {
 	public String getIsNum() {
 		return isNum;
 		return isNum;
 	}
 	}
-
-	@Override
-	public String toString() {
-		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("keyword", getKeyword()).append("defaultShow", getDefaultShow())
-				.append("isNum", getIsNum()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
-				.append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
-	}
 }
 }

+ 2 - 0
healsphere-buss/src/main/java/com/zdqz/system/mapper/SysCnareaMapper.java

@@ -58,4 +58,6 @@ public interface SysCnareaMapper
      * @return 结果
      * @return 结果
      */
      */
     public int deleteSysCnareaByIds(String[] ids);
     public int deleteSysCnareaByIds(String[] ids);
+
+	public List<SysCnarea> selectSysCnareaCodeList(String[] arrayName);
 }
 }

+ 2 - 0
healsphere-buss/src/main/java/com/zdqz/system/service/ISysCnareaService.java

@@ -61,4 +61,6 @@ public interface ISysCnareaService
     
     
 
 
 	public List<SysCnarea> getAreaByParentId(String parentId);
 	public List<SysCnarea> getAreaByParentId(String parentId);
+
+	public List<SysCnarea> selectSysCnareaCodeList(String[] array);
 }
 }

+ 5 - 0
healsphere-buss/src/main/java/com/zdqz/system/service/impl/SysCnareaServiceImpl.java

@@ -93,4 +93,9 @@ public class SysCnareaServiceImpl implements ISysCnareaService {
 		sysCnarea.setParentCode(parentId);
 		sysCnarea.setParentCode(parentId);
 		return selectSysCnareaList(sysCnarea);
 		return selectSysCnareaList(sysCnarea);
 	}
 	}
+
+	@Override
+	public List<SysCnarea> selectSysCnareaCodeList(String[] array) {
+		return sysCnareaMapper.selectSysCnareaCodeList(array);
+	}
 }
 }

Plik diff jest za duży
+ 116 - 110
healsphere-buss/src/main/resources/mapper/data/DataBaseMapper.xml


+ 84 - 84
healsphere-buss/src/main/resources/mapper/read/ReadDataMapper.xml

@@ -38,48 +38,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     </resultMap>
     
     
     <resultMap type="DataBase" id="DataBaseResult">
     <resultMap type="DataBase" id="DataBaseResult">
-        <result property="assemblyAccession"    column="b_assembly_accession"    />
-        <result property="refseqCategory"    column="b_refseq_category"    />
-        <result property="taxid"    column="b_taxid"    />
-        <result property="speciesTaxid"    column="b_species_taxid"    />
-        <result property="organismName"    column="b_organism_name"    />
-        <result property="infraspecificName"    column="b_infraspecific_name"    />
-        <result property="isolate"    column="b_isolate"    />
-        <result property="assemblyLevel"    column="b_assembly_level"    />
-        <result property="genomeRep"    column="b_genome_rep"    />
-        <result property="seqRelDate"    column="b_seq_rel_date"    />
-        <result property="asmName"    column="b_asm_name"    />
-        <result property="gbrsPairedAsm"    column="b_gbrs_paired_asm"    />
-        <result property="pairedAsmComp"    column="b_paired_asm_comp"    />
-        <result property="ftpPath"    column="b_ftp_path"    />
-        <result property="excludedFromRefseq"    column="b_excluded_from_refseq"    />
-        <result property="assemblyType"    column="b_assembly_type"    />
-        <result property="group"    column="b_group"    />
-        <result property="genomeSize"    column="b_genome_size"    />
-        <result property="genomeSizeUngapped"    column="b_genome_size_ungapped"    />
-        <result property="gcPercent"    column="b_gc_percent"    />
-        <result property="repliconCount"    column="b_replicon_count"    />
-        <result property="scaffoldCount"    column="b_scaffold_count"    />
-        <result property="contigCount"    column="b_contig_count"    />
-        <result property="totalGeneCount"    column="b_total_gene_count"    />
-        <result property="proteinCodingGeneCount"    column="b_protein_coding_gene_count"    />
-        <result property="nonCodingGeneCount"    column="b_non_coding_gene_count"    />
-        <result property="nameCn"    column="b_name_cn"    />
-        <result property="defined"    column="b_defined"    />
-        <result property="seqSource"    column="b_seq_source"    />
-        <result property="express"    column="b_express"    />
-        <result property="filePath"    column="b_file_path"    />
-        <result property="dtpnyjy"    column="b_dtpnyjy"    />
-        <result property="dtpnyjyExpress"    column="b_dtpnyjy_express"    />
-        <result property="nyjy"    column="b_nyjy"    />
-        <result property="nyjyExpress"    column="b_nyjy_express"    />
-        <result property="dljy"    column="b_dljy"    />
-        <result property="dljyExpress"    column="b_dljy_express"    />
-        <result property="createBy"    column="b_create_by"    />
-        <result property="createTime"    column="b_create_time"    />
-        <result property="updateBy"    column="b_update_by"    />
-        <result property="updateTime"    column="b_update_time"    />
-        <result property="remark"    column="b_remark"    />
+        <result property="organismName" column="b_organism_name" />
+		<result property="group" column="b_group" />
+		<result property="group1" column="b_group1" />
+		<result property="defined" column="b_defined" />
+		<result property="definedSource" column="b_defined_source" />
+		<result property="refseqCategory" column="b_refseq_category" />
+		<result property="taxid" column="b_taxid" />
+		<result property="speciesTaxid" column="b_species_taxid" />
+		<result property="infraspecificName" column="b_infraspecific_name" />
+		<result property="isolate" column="b_isolate" />
+		<result property="assemblyLevel" column="b_assembly_level" />
+		<result property="genomeRep" column="b_genome_rep" />
+		<result property="seqRelDate" column="b_seq_rel_date" />
+		<result property="asmName" column="b_asm_name" />
+		<result property="gbrsPairedAsm" column="b_gbrs_paired_asm" />
+		<result property="pairedAsmComp" column="b_paired_asm_comp" />
+		<result property="ftpPath" column="b_ftp_path" />
+		<result property="excludedFromRefseq" column="b_excluded_from_refseq" />
+		<result property="assemblyType" column="b_assembly_type" />
+		<result property="genomeSize" column="b_genome_size" />
+		<result property="genomeSizeUngapped" column="b_genome_size_ungapped" />
+		<result property="gcPercent" column="b_gc_percent" />
+		<result property="repliconCount" column="b_replicon_count" />
+		<result property="scaffoldCount" column="b_scaffold_count" />
+		<result property="contigCount" column="b_contig_count" />
+		<result property="totalGeneCount" column="b_total_gene_count" />
+		<result property="proteinCodingGeneCount" column="b_protein_coding_gene_count" />
+		<result property="nonCodingGeneCount" column="b_non_coding_gene_count" />
+		<result property="dljy" column="b_dljy" />
+		<result property="dljyExpress" column="b_dljy_express" />
+		<result property="dljySource" column="b_dljy_source" />
+		<result property="nyjy" column="b_nyjy" />
+		<result property="nyjyExpress" column="b_nyjy_express" />
+		<result property="nyjySource" column="b_nyjy_source" />
+		<result property="dtpnyjy" column="b_dtpnyjy" />
+		<result property="dtpnyjyExpress" column="b_dtpnyjy_express" />
+		<result property="dtpnyjySource" column="b_dtpnyjy_source" />
+		<result property="createBy" column="b_create_by" />
+		<result property="createTime" column="b_create_time" />
+		<result property="updateBy" column="b_update_by" />
+		<result property="updateTime" column="b_update_time" />
+		<result property="remark" column="b_remark" />
     </resultMap>
     </resultMap>
     
     
 
 
@@ -185,48 +185,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
 	<sql id="selectReadData">
 	<sql id="selectReadData">
         select a.*, 
         select a.*, 
-	        b.assembly_accession b_assembly_accession, 
-	        b.refseq_category b_refseq_category, 
-	        b.taxid b_taxid, 
-	        b.species_taxid b_species_taxid, 
-	        b.organism_name b_organism_name, 
-	        b.infraspecific_name b_infraspecific_name, 
-	        b.isolate b_isolate, 
-	        b.assembly_level b_assembly_level, 
-	       	b.genome_rep b_genome_rep, 
-	        b.seq_rel_date b_seq_rel_date, 
-	        b.asm_name b_asm_name, 
-	        b.gbrs_paired_asm b_gbrs_paired_asm, 
-	        b.paired_asm_comp b_paired_asm_comp, 
-	        b.ftp_path b_ftp_path, 
-	        b.excluded_from_refseq b_excluded_from_refseq, 
-	        b.assembly_type b_assembly_type, 
-	        b.`group` b_group, 
-	        b.genome_size b_genome_size, 
-	        b.genome_size_ungapped b_genome_size_ungapped, 
-	        b.gc_percent b_gc_percent, 
-	        b.replicon_count b_replicon_count, 
-	        b.scaffold_count b_scaffold_count, 
-	        b.contig_count b_contig_count, 
-	        b.total_gene_count b_total_gene_count, 
-	        b.protein_coding_gene_count b_protein_coding_gene_count, 
-	        b.non_coding_gene_count b_non_coding_gene_count, 
-	        b.name_cn b_name_cn, 
-	        b.defined b_defined, 
-	        b.seq_source b_seq_source, 
-	        b.express b_express, 
-	        b.file_path b_file_path, 
-	        b.dtpnyjy b_dtpnyjy, 
-	        b.dtpnyjy_express b_dtpnyjy_express, 
-	        b.nyjy b_nyjy, 
-	        b.nyjy_express b_nyjy_express, 
-	        b.dljy b_dljy, 
-	        b.dljy_express b_dljy_express, 
-	        b.create_by b_create_by, 
-	        b.create_time b_create_time, 
-	        b.update_by b_update_by, 
-	        b.update_time b_update_time, 
-	        b.remark b_remark 
+        	b.organism_name b_organism_name,
+			b.group b_group,
+			b.group1 b_group1,
+			b.defined b_defined,
+			b.defined_source b_defined_source,
+			b.refseq_category b_refseq_category,
+			b.taxid b_taxid,
+			b.species_taxid b_species_taxid,
+			b.infraspecific_name b_infraspecific_name,
+			b.isolate b_isolate,
+			b.assembly_level b_assembly_level,
+			b.genome_rep b_genome_rep,
+			b.seq_rel_date b_seq_rel_date,
+			b.asm_name b_asm_name,
+			b.gbrs_paired_asm b_gbrs_paired_asm,
+			b.paired_asm_comp b_paired_asm_comp,
+			b.ftp_path b_ftp_path,
+			b.excluded_from_refseq b_excluded_from_refseq,
+			b.assembly_type b_assembly_type,
+			b.genome_size b_genome_size,
+			b.genome_size_ungapped b_genome_size_ungapped,
+			b.gc_percent b_gc_percent,
+			b.replicon_count b_replicon_count,
+			b.scaffold_count b_scaffold_count,
+			b.contig_count b_contig_count,
+			b.total_gene_count b_total_gene_count,
+			b.protein_coding_gene_count b_protein_coding_gene_count,
+			b.non_coding_gene_count b_non_coding_gene_count,
+			b.dljy b_dljy,
+			b.dljy_express b_dljy_express,
+			b.dljy_source b_dljy_source,
+			b.nyjy b_nyjy,
+			b.nyjy_express b_nyjy_express,
+			b.dtpnyjy b_dtpnyjy,
+			b.dtpnyjy_express b_dtpnyjy_express,
+			b.dtpnyjy_source b_dtpnyjy_source,
+			b.nyjy_source b_nyjy_source,
+			b.create_by b_create_by,
+			b.create_time b_create_time,
+			b.update_by b_update_by,
+			b.update_time b_update_time,
+			b.remark b_remark
         from read_data a
         from read_data a
     </sql>
     </sql>
     
     

+ 0 - 4
healsphere-buss/src/main/resources/mapper/sample/SampleInfoMapper.xml

@@ -8,7 +8,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="id"    column="id"    />
         <result property="sampleCode"    column="sample_code"    />
         <result property="sampleCode"    column="sample_code"    />
         <result property="patientId"    column="patient_id"    />
         <result property="patientId"    column="patient_id"    />
-        <result property="patientPhone"    column="patient_phone"    />
         <result property="sampleTypeId"    column="sample_type_id"    />
         <result property="sampleTypeId"    column="sample_type_id"    />
         <result property="sampleHospitalId"    column="sample_hospital_id"    />
         <result property="sampleHospitalId"    column="sample_hospital_id"    />
         <result property="sampleDeptId"    column="sample_dept_id"    />
         <result property="sampleDeptId"    column="sample_dept_id"    />
@@ -32,7 +31,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where a.patient_id = b.id and a.sample_type_id=c.id and a.sample_hospital_id =d.id and a.sample_dept_id = e.id
         where a.patient_id = b.id and a.sample_type_id=c.id and a.sample_hospital_id =d.id and a.sample_dept_id = e.id
         <if test="sampleCode != null  and sampleCode != ''"> and a.sample_code = #{sampleCode}</if>
         <if test="sampleCode != null  and sampleCode != ''"> and a.sample_code = #{sampleCode}</if>
         <if test="patientId != null "> and a.patient_id = #{patientId}</if>
         <if test="patientId != null "> and a.patient_id = #{patientId}</if>
-        <if test="patientPhone != null  and patientPhone != ''"> and a.patient_phone = #{patientPhone}</if>
         <if test="sampleTypeId != null "> and a.sample_type_id = #{sampleTypeId}</if>
         <if test="sampleTypeId != null "> and a.sample_type_id = #{sampleTypeId}</if>
         <if test="sampleHospitalId != null "> and a.sample_hospital_id = #{sampleHospitalId}</if>
         <if test="sampleHospitalId != null "> and a.sample_hospital_id = #{sampleHospitalId}</if>
         <if test="sampleDeptId != null "> and a.sample_dept_id = #{sampleDeptId}</if>
         <if test="sampleDeptId != null "> and a.sample_dept_id = #{sampleDeptId}</if>
@@ -57,7 +55,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="sampleCode != null">sample_code,</if>
             <if test="sampleCode != null">sample_code,</if>
             <if test="patientId != null">patient_id,</if>
             <if test="patientId != null">patient_id,</if>
-            <if test="patientPhone != null">patient_phone,</if>
             <if test="sampleTypeId != null">sample_type_id,</if>
             <if test="sampleTypeId != null">sample_type_id,</if>
             <if test="sampleHospitalId != null">sample_hospital_id,</if>
             <if test="sampleHospitalId != null">sample_hospital_id,</if>
             <if test="sampleDeptId != null">sample_dept_id,</if>
             <if test="sampleDeptId != null">sample_dept_id,</if>
@@ -89,7 +86,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="SET" suffixOverrides=",">
         <trim prefix="SET" suffixOverrides=",">
             <if test="sampleCode != null">sample_code = #{sampleCode},</if>
             <if test="sampleCode != null">sample_code = #{sampleCode},</if>
             <if test="patientId != null">patient_id = #{patientId},</if>
             <if test="patientId != null">patient_id = #{patientId},</if>
-            <if test="patientPhone != null">patient_phone = #{patientPhone},</if>
             <if test="sampleTypeId != null">sample_type_id = #{sampleTypeId},</if>
             <if test="sampleTypeId != null">sample_type_id = #{sampleTypeId},</if>
             <if test="sampleHospitalId != null">sample_hospital_id = #{sampleHospitalId},</if>
             <if test="sampleHospitalId != null">sample_hospital_id = #{sampleHospitalId},</if>
             <if test="sampleDeptId != null">sample_dept_id = #{sampleDeptId},</if>
             <if test="sampleDeptId != null">sample_dept_id = #{sampleDeptId},</if>

Plik diff jest za duży
+ 75 - 191
healsphere-buss/src/main/resources/mapper/sample/SamplePatientMapper.xml


+ 9 - 0
healsphere-buss/src/main/resources/mapper/system/SysCnareaMapper.xml

@@ -40,6 +40,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         </where>
     </select>
     </select>
     
     
+    <select id="selectSysCnareaCodeList" parameterType="SysCnarea" resultMap="SysCnareaResult">
+        <include refid="selectSysCnareaVo"/>
+        where merger_name in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+    
+    
     <select id="selectSysCnareaById" parameterType="String" resultMap="SysCnareaResult">
     <select id="selectSysCnareaById" parameterType="String" resultMap="SysCnareaResult">
         <include refid="selectSysCnareaVo"/>
         <include refid="selectSysCnareaVo"/>
         where id = #{id}
         where id = #{id}

+ 7 - 2
healsphere-buss/src/main/resources/mapper/system/SysReportConfigMapper.xml

@@ -7,6 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="SysReportConfig" id="SysReportConfigResult">
     <resultMap type="SysReportConfig" id="SysReportConfigResult">
         <result property="id"    column="id"    />
         <result property="id"    column="id"    />
         <result property="keyword"    column="keyword"    />
         <result property="keyword"    column="keyword"    />
+     	<result property="title"    column="title"    />
+        
         <result property="defaultShow"    column="default_show"    />
         <result property="defaultShow"    column="default_show"    />
         <result property="isNum"    column="is_num"    />
         <result property="isNum"    column="is_num"    />
         <result property="createBy"    column="create_by"    />
         <result property="createBy"    column="create_by"    />
@@ -17,13 +19,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     </resultMap>
 
 
     <sql id="selectSysReportConfigVo">
     <sql id="selectSysReportConfigVo">
-        select id, keyword, default_show, is_num, create_by, create_time, update_by, update_time, remark from sys_report_config
+        select id, keyword,title, default_show, is_num, create_by, create_time, update_by, update_time, remark from sys_report_config
     </sql>
     </sql>
 
 
     <select id="selectSysReportConfigList" parameterType="SysReportConfig" resultMap="SysReportConfigResult">
     <select id="selectSysReportConfigList" parameterType="SysReportConfig" resultMap="SysReportConfigResult">
         <include refid="selectSysReportConfigVo"/>
         <include refid="selectSysReportConfigVo"/>
         <where>  
         <where>  
-            <if test="keyword != null  and keyword != ''"> and keyword = #{keyword}</if>
+            <if test="keyword != null  and keyword != ''"> and keyword like concat('%',#{keyword},'%') </if>
             <if test="defaultShow != null "> and default_show = #{defaultShow}</if>
             <if test="defaultShow != null "> and default_show = #{defaultShow}</if>
             <if test="isNum != null "> and is_num = #{isNum}</if>
             <if test="isNum != null "> and is_num = #{isNum}</if>
         </where>
         </where>
@@ -38,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert into sys_report_config
         insert into sys_report_config
         <trim prefix="(" suffix=")" suffixOverrides=",">
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="keyword != null">keyword,</if>
             <if test="keyword != null">keyword,</if>
+         	<if test="title != null">title,</if>
             <if test="defaultShow != null">default_show,</if>
             <if test="defaultShow != null">default_show,</if>
             <if test="isNum != null">is_num,</if>
             <if test="isNum != null">is_num,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createBy != null">create_by,</if>
@@ -48,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="keyword != null">#{keyword},</if>
             <if test="keyword != null">#{keyword},</if>
+         	<if test="title != null">#{title},</if>
             <if test="defaultShow != null">#{defaultShow},</if>
             <if test="defaultShow != null">#{defaultShow},</if>
             <if test="isNum != null">#{isNum},</if>
             <if test="isNum != null">#{isNum},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -62,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         update sys_report_config
         update sys_report_config
         <trim prefix="SET" suffixOverrides=",">
         <trim prefix="SET" suffixOverrides=",">
             <if test="keyword != null">keyword = #{keyword},</if>
             <if test="keyword != null">keyword = #{keyword},</if>
+            <if test="title != null">title = #{title},</if>
             <if test="defaultShow != null">default_show = #{defaultShow},</if>
             <if test="defaultShow != null">default_show = #{defaultShow},</if>
             <if test="isNum != null">is_num = #{isNum},</if>
             <if test="isNum != null">is_num = #{isNum},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createBy != null">create_by = #{createBy},</if>