This commit is contained in:
2023-11-13 22:17:01 +08:00
parent fa2fe43ad0
commit 94984fafdd
3 changed files with 11 additions and 1 deletions

View File

@@ -193,9 +193,15 @@ public class CoalParameterDefService
inputStream, new TypeReference<List<CoalParameterDefEntity>>() {}); inputStream, new TypeReference<List<CoalParameterDefEntity>>() {});
coalParameterDefs.forEach(x -> x.setOrganizationId(orgId)); coalParameterDefs.forEach(x -> x.setOrganizationId(orgId));
coalParameterDefs.forEach(
x -> x.setInputType(StringUtils.defaultIfBlank(x.getInputType(), "0")));
this.repository.saveAll(coalParameterDefs); this.repository.saveAll(coalParameterDefs);
} }
this.repository.findAll().stream()
.filter(x -> StringUtils.equals(x.getInputType(), "1"))
.forEach(this::updateFormula);
} }
} }
} }

View File

@@ -37,6 +37,8 @@ public class OrganizationService extends BaseService<OrganizationEntity, Organiz
@Autowired CoalParameterDefService coalParameterDefService; @Autowired CoalParameterDefService coalParameterDefService;
@PostConstruct @PostConstruct
public void init() {} public void init() {}

View File

@@ -40,7 +40,9 @@
"parentName": "挥发分(Y)%", "parentName": "挥发分(Y)%",
"name": "干燥基", "name": "干燥基",
"sortKey": "6", "sortKey": "6",
"status": "1" "status": "1",
"inputType": "1",
"formula": "( param5/(100-0.5-param1) ) * 100"
}, },
{ {
"code": "param7", "code": "param7",