Commit e381f685 authored by 曹盼盼's avatar 曹盼盼

气瓶充装信息修改

parent 2014fa72
......@@ -75,7 +75,7 @@ public class TzCylinderFillingDto {
/**
* 异常情况
*/
private Integer abnormal;
private String abnormal;
/**
* 充装前检查结果
......@@ -119,4 +119,5 @@ public class TzCylinderFillingDto {
private String fillingDate;
}
package com.yeejoin.amos.boot.module.tzs.flc.api.enums;
import lombok.Getter;
@Getter
public enum CyclinderStatus {
NOHEGE("3139","不合格"),
HEGE("3140","合格");
private String code;
private String name;
CyclinderStatus(String code,String name){
this.code=code;
this.name=name;
}
public static String getName(String code){
for (CyclinderStatus value : CyclinderStatus.values()) {
if (value.code.equals(code)) {
return value.getName();
}
}
return null;
}
}
......@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.CylinderFileUrlDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.PageParam;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.CylinderInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.CyclinderStatus;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.TzCylinderMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.ITzCylinderService;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -26,6 +27,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 气瓶基本信息 服务实现类
......@@ -42,12 +44,11 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
@Override
public IPage<TzCylinderInfoDto> getCylinderInfoDtoList(PageParam pageParam, TzCylinderInfoDto tzCylinderInfoDto,
String key) {
String key) {
Page<TzCylinderInfoDto> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
System.out.println("key有值:" + key);
String superviseOrgCode = Privilege.companyClient.seleteOne(Long.valueOf(key)).getResult().getOrgCode();
......@@ -114,6 +115,9 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
}
for (TzCylinderFillingDto tzCylinderFillingDto : tzCylinderFillingDtoList) {
if (!ValidationUtil.isEmpty(tzCylinderFillingDto) && !ValidationUtil.isEmpty(tzCylinderFillingDto.getAbnormal())) {
tzCylinderFillingDto.setAbnormal(CyclinderStatus.getName(String.valueOf(tzCylinderFillingDto.getAbnormal())));
}
List<TzCylinderCheckDto> tzCylinderCheckDtoListResult = new ArrayList<>();
TzCylinderBeforeCheckDto tzcylinderBeforeCheckDto = tzCylinderMapper
.getTzCylinderBeforeCheck(tzCylinderFillingDto.getFillingBeforeId());
......@@ -164,6 +168,15 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
}
}
for (TzCylinderFillingDto tzCylinderFillingDto : tzCylinderFillingDtoList) {
List<TzCylinderCheckDto> collect = tzCylinderFillingDto.getTzCylinderAfterCheckDtoList().stream().filter(dto -> dto.getResult().equals("0")).collect(Collectors.toList());
if (collect.size() != 0) {
tzCylinderFillingDto.setCheckResultsAfter(CyclinderStatus.NOHEGE.getName());
}else {
tzCylinderFillingDto.setCheckResultsAfter(CyclinderStatus.HEGE.getName());
}
}
return new TzCylinderTraceDto(tzCylinderProduceDto, tzCylinderInfoDto, tzCylinderTagsDto,
tzCylinderInspectionDtoList, tzCylinderFillingDtoList);
}
......@@ -175,26 +188,26 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode);
CylinderFileUrlDto dto =new CylinderFileUrlDto();
if (!ValidationUtil.isEmpty(tzCylinderProduceDto)) {
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) {
String productQualified = tzCylinderProduceDto.getProductQualified();
List<Map> productQualifiedList = getMaps(productQualified);
dto.setProductQualified(productQualifiedList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProofQuality())) {
String proofQuality = tzCylinderProduceDto.getProofQuality();
List<Map> proofQualityList = getMaps(proofQuality);
dto.setProofQuality(proofQualityList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getSupervisionInspec())) {
String supervisionInspec = tzCylinderProduceDto.getSupervisionInspec();
List<Map> supervisionInspecList = getMaps(supervisionInspec);
dto.setSupervisionInspec(supervisionInspecList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getTypeExperiments())) {
String typeExperiments = tzCylinderProduceDto.getTypeExperiments();
List<Map> typeExperimentsList = getMaps(typeExperiments);
dto.setTypeExperiments(typeExperimentsList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProductQualified())) {
String productQualified = tzCylinderProduceDto.getProductQualified();
List<Map> productQualifiedList = getMaps(productQualified);
dto.setProductQualified(productQualifiedList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getProofQuality())) {
String proofQuality = tzCylinderProduceDto.getProofQuality();
List<Map> proofQualityList = getMaps(proofQuality);
dto.setProofQuality(proofQualityList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getSupervisionInspec())) {
String supervisionInspec = tzCylinderProduceDto.getSupervisionInspec();
List<Map> supervisionInspecList = getMaps(supervisionInspec);
dto.setSupervisionInspec(supervisionInspecList);
}
if (!ValidationUtil.isEmpty(tzCylinderProduceDto.getTypeExperiments())) {
String typeExperiments = tzCylinderProduceDto.getTypeExperiments();
List<Map> typeExperimentsList = getMaps(typeExperiments);
dto.setTypeExperiments(typeExperimentsList);
}
}
if (!ValidationUtil.isEmpty(tzCylinderTagsDto)&&!ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) {
String gasCylinderStamp = tzCylinderTagsDto.getGasCylinderStamp();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment