|  |  |  | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.constant.DictTypeCode; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.DictData; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.service.DictDataService; | 
|---|
|  |  |  | import lombok.experimental.Accessors; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Accessors(chain = true) | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value= "ASN主单标识") | 
|---|
|  |  |  | private Long asnId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 平台标识(行号) | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value = "平台标识(行号)") | 
|---|
|  |  |  | private String platItemId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("客户订单号") | 
|---|
|  |  |  | private String platOrderCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("工单号") | 
|---|
|  |  |  | private String platWorkCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("项目号") | 
|---|
|  |  |  | private String projectCode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 扩展字段 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("合格数量") | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Double safeQty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("不合格数量") | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private Double disQty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getIsptResult$(){ | 
|---|
|  |  |  | if (null == this.isptResult){ return null; } | 
|---|
|  |  |  | switch (this.isptResult){ | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "未检"; | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "合格"; | 
|---|
|  |  |  | case 2: | 
|---|
|  |  |  | return "不合格"; | 
|---|
|  |  |  | case 3: | 
|---|
|  |  |  | return "待定"; | 
|---|
|  |  |  | case 4: | 
|---|
|  |  |  | return "部分合格"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Cools.isEmpty(this.isptResult)){ | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); | 
|---|
|  |  |  | DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>() | 
|---|
|  |  |  | .eq(DictData::getDictTypeCode, DictTypeCode.DICT_INSPECT_RESULT) | 
|---|
|  |  |  | .eq(DictData::getValue, this.isptResult)); | 
|---|
|  |  |  | if (Objects.isNull(dictData)) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return dictData.getLabel(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|