package com.fdkankan.fusion.response; import cn.hutool.core.date.DateUtil; import com.fdkankan.fusion.entity.CaseTag; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; @Data @AllArgsConstructor @NoArgsConstructor public class EvidenceVo { /** * 标题 */ private String title; /** * 遗留部位 */ private String leftPosition; /** * 特征描述 */ private String feature; /** * 提取方法 */ private String collectionModeName; /** * 提取时间 */ private String collectedTime; /** * 提取人 */ private String createAccount; /** * 委托状态 0未送检,1送检中,2完成送检 */ private Integer status ; private Integer hotIconId; public EvidenceVo(CaseTag caseTag) { this.title = caseTag.getTagTitle(); this.leftPosition = caseTag.getLeaveBehind(); this.feature = caseTag.getTagDescribe(); this.collectionModeName = caseTag.getGetMethod(); this.collectedTime = caseTag.getTqTime() != null ?String.valueOf(caseTag.getTqTime().getTime()) : null; this.createAccount = caseTag.getGetUser(); this.status = getTqStatus(caseTag.getTqStatus()); this.hotIconId = caseTag.getHotIconId(); } private Integer getTqStatus(String str){ if(StringUtils.isBlank(str)){ return 0; } switch (str){ case "未送检" : return 0; case "送检中" : return 1; case "完成送检" : return 2; default:return 0; } } }