fix: 车型生成BUG
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ public class ModelExcelVO {
|
||||
|
||||
|
||||
@Dict(dicCode = "model_status")
|
||||
@Excel(name = "车型状态", dicCode = "model_status")
|
||||
@Excel(name = "车型状态")
|
||||
private String modelState;
|
||||
|
||||
private String sort;
|
||||
|
||||
+9
-2
@@ -678,7 +678,7 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
||||
|
||||
private List<String> validationModelList(List<ModelExcelVO> list, List<SysDictItemCore> listDict) {
|
||||
List<String> errorMsgs = new ArrayList<>();
|
||||
int i = 4;
|
||||
int i = 2;
|
||||
Iterator<ModelExcelVO> iterator = list.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
ModelExcelVO data = iterator.next();
|
||||
@@ -1099,13 +1099,20 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
||||
// 批量检查数据是否有效
|
||||
errorMsgs = this.validationModelList(modelExcelVOList, listDict);
|
||||
if (!errorMsgs.isEmpty()) {
|
||||
String errorMsg = String.join("<br>", errorMsgs);
|
||||
String errorMsg = "<br>" + String.join("<br>", errorMsgs);
|
||||
throw new JeroBootException(ResultCommon.MODEL_IMPORT_DATA_ERROR, errorMsg);
|
||||
} else {
|
||||
this.transToDictValue(modelExcelVOList, listDict);
|
||||
}
|
||||
// 转换一下数据
|
||||
|
||||
return modelExcelVOList;
|
||||
}
|
||||
|
||||
private void transToDictValue(List<ModelExcelVO> list, List<SysDictItemCore> listDict) {
|
||||
list.forEach(item -> item.setModelState(excelUtils.translateDictValue("model_status", item.getModelState(), listDict)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDoNotDeleteStandardIdList() {
|
||||
List<ProcessStandardComplianceCheck> list = list();
|
||||
|
||||
@@ -618,7 +618,7 @@ public class ExcelUtils {
|
||||
return "";
|
||||
}
|
||||
// 检查排查结果
|
||||
if (!excelUtils.validDict("model_state", value, null, null, true, listDict)) {
|
||||
if (!excelUtils.validDict("model_status", value, null, null, true, listDict)) {
|
||||
return "'车型状态'无效。";
|
||||
}
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user