fix:saveQCCheck异常

This commit is contained in:
nieziyan 2023-12-29 19:33:29 +08:00
parent ed00d25f4d
commit 947f3be7cc
3 changed files with 13 additions and 6 deletions

View File

@ -399,8 +399,13 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
private String bias(String url){
if (StrUtil.isBlank(url))
return null;
String regex = "/([^/?]+)\\?";
return ReUtil.getGroup1(regex, url);
String regex1 = "/([^/?]+)\\?";
String regex2 = ".*/(.*)";
String dbName = ReUtil.getGroup1(regex1, url);
if (StrUtil.isNotBlank(dbName))
return dbName;
dbName = ReUtil.getGroup1(regex2, url);
return dbName;
}
/*

View File

@ -848,7 +848,7 @@ public class Sample_G_Analysis {
GardsNuclIdedDto gardsNuclIdedDto = new GardsNuclIdedDto();
GardsNuclIded gardsNuclIded = new GardsNuclIded();
BeanUtil.copyProperties(middleData,gardsNuclIdedDto);
if (gardsNuclIdedDto.getNucl_ided_Nuclidename().size() > 0) {
if (!gardsNuclIdedDto.getNucl_ided_Nuclidename().isEmpty()) {
String base_NuclideName = "nucl_ided_Nuclidename";
List<GardsNuclIded> gardsNuclIdeds =
mapFields(gardsNuclIdedDto, gardsNuclIded, base_NuclideName, fieldMap);
@ -868,7 +868,7 @@ public class Sample_G_Analysis {
String base_QC = String.valueOf(qcItems.size());
QcCheckDto qcCheckDto = new QcCheckDto();
BeanUtil.copyProperties(middleData,qcCheckDto);
if (qcItems.size() > 0) {
if (!qcItems.isEmpty()) {
GardsQcCheck gardsQcCheck = new GardsQcCheck();
List<GardsQcCheck> gardsQcChecks = mapFields(qcCheckDto, gardsQcCheck,base_QC,fieldMap);
for (GardsQcCheck qcCheck : gardsQcChecks) {
@ -1131,7 +1131,8 @@ public class Sample_G_Analysis {
if (type == String.class) {
tartgetField.set(tartget, value);
} else if (type == Integer.class || type == int.class) {
tartgetField.set(tartget,Integer.valueOf(value));
// 避免类似0.000的String值转Integer时NumberFormatException
tartgetField.set(tartget, Double.valueOf(value).intValue());
} else if (type == Double.class || type == double.class) {
tartgetField.set(tartget, Double.valueOf(value));
} else if (type == Boolean.class || type == boolean.class) {

View File

@ -16,4 +16,5 @@ spring:
import:
- optional:nacos:armd.yaml
- optional:nacos:armd-@profile.name@.yaml
- optional:nacos:IDC-Data.yaml
- optional:nacos:armd-analysis-@profile.name@.yaml