diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java index f9c2437f..fad9cd96 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java @@ -2837,8 +2837,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService { String textValue = translateDictValue(code, text, table, key, listDict); if(StringUtils.isBlank(textValue)){ msg.append(name).append("数据不存在;"); - }else{ - item.put(field.getName(), textValue); } } } @@ -2866,9 +2864,9 @@ public class LawsCommonServiceImpl implements ILawsCommonService { continue; //跳过循环 } if (!org.springframework.util.StringUtils.isEmpty(table)) { - tmpValue = sysBaseAPI.queryTableDictTextByKey(table, code, text, k.trim()); + tmpValue = sysBaseAPI.queryTableDictTextByKey(table, text, code, k.trim()); } else { - List listNew = listDict.stream().filter(o -> Objects.equals(o.getDictCode(), code) && Objects.equals(o.getItemText(), k.trim())).collect(Collectors.toList()); + List listNew = listDict.stream().filter(o -> Objects.equals(o.getDictCode(), code) && Objects.equals(o.getItemValue(), k.trim())).collect(Collectors.toList()); if (!org.springframework.util.CollectionUtils.isEmpty(listNew)) { tmpValue = listNew.get(0).getItemText(); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/entity/LawsMarketStandardDetailExcel.java b/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/entity/LawsMarketStandardDetailExcel.java index d1ab1d40..5450840d 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/entity/LawsMarketStandardDetailExcel.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/entity/LawsMarketStandardDetailExcel.java @@ -123,7 +123,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { /** * 国家 */ - @Excel(name = "*国家/地区", width = 15) + @Excel(name = "*国家/地区", width = 15,dicCode = "market_state") @NotBlank(message = "国家/地区不能为空") @ApiModelProperty(value = "国家") @Dict(dicCode = "market_state") @@ -132,7 +132,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { /** * 适用车型 */ - @Excel(name = "适用车型", width = 15) + @Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type") @Dict(dicCode = "applicable_vehicle_type") @ApiModelProperty(value = "适用车型") private String applicableVehicle; @@ -148,7 +148,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { */ @ApiModelProperty(value = "认证对象") @Dict(dicCode = "authentication_object") - @Excel(name = "认证对象", width = 15) + @Excel(name = "认证对象", width = 15, dicCode = "authentication_object") private String authenticationObject; /** @@ -162,7 +162,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { * 类型 */ @Dict(dicCode = "type") - @Excel(name = "类型", width = 15) + @Excel(name = "类型", width = 15, dicCode = "type") @ApiModelProperty(value = "类型") private String type; @@ -171,7 +171,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { */ @Dict(dicCode = "dynamic_type") @ApiModelProperty(value = "动力类型") - @Excel(name = "动力类型", width = 15) + @Excel(name = "动力类型", width = 15, dicCode = "dynamic_type") private String dynamicType; /** @@ -180,7 +180,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") @ApiModelProperty(value = "主控部门") @NotBlank(message = "主控部门不能为空") - @Excel(name = "*主控部门", width = 15) + @Excel(name = "*主控部门", width = 15,dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") private String mainDept; /** @@ -189,7 +189,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { @ApiModelProperty(value = "主控部门专业模块") @NotBlank(message = "主控部门专业模块不能为空") @Dict(dicCode = "professional_module") - @Excel(name = "*主控部门专业模块", width = 15) + @Excel(name = "*主控部门专业模块", width = 15, dicCode = "professional_module") private String mainDeptProfMode; /** @@ -197,14 +197,14 @@ public class LawsMarketStandardDetailExcel implements Serializable { */ @Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") @ApiModelProperty(value = "关联部门") - @Excel(name = "关联部门", width = 15) + @Excel(name = "关联部门", width = 15,dictTable = "sys_depart", dicCode = "id", dicText = "depart_name") private String associateDept; /** * 关联部门专业模块 */ @ApiModelProperty(value = "关联部门专业模块") - @Excel(name = "关联部门专业模块", width = 15) + @Excel(name = "关联部门专业模块", width = 15, dicCode = "professional_module") @Dict(dicCode = "professional_module") private String associateDeptProfMode; @@ -212,7 +212,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { * 批量限制 */ @ApiModelProperty(value = "批量限制") - @Excel(name = "批量限制", width = 15) + @Excel(name = "批量限制", width = 15, dicCode = "batch_restriction") @Dict(dicCode = "batch_restriction") private String batchLimit; @@ -221,7 +221,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { */ @Dict(dicCode = "automatic_driving_level") @ApiModelProperty(value = "自动驾驶等级") - @Excel(name = "自动驾驶等级", width = 15) + @Excel(name = "自动驾驶等级", width = 15,dicCode = "automatic_driving_level") private String autopilotLevel; /** @@ -229,7 +229,7 @@ public class LawsMarketStandardDetailExcel implements Serializable { */ @Dict(dicCode = "requirement_type") @ApiModelProperty(value = "要求类型") - @Excel(name = "要求类型", width = 15) + @Excel(name = "要求类型", width = 15,dicCode = "requirement_type") private String requireType; diff --git a/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/service/impl/LawsMarketStandardDetailServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/service/impl/LawsMarketStandardDetailServiceImpl.java index 00b8f370..91e06193 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/service/impl/LawsMarketStandardDetailServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/marketStandard/service/impl/LawsMarketStandardDetailServiceImpl.java @@ -75,7 +75,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl queryLawsMarketStandard = new LambdaQueryWrapper<>(); - queryLawsMarketStandard.eq(LawsMarketStandard::getManifestNo,lawsMarketStandardOld.getManifestNo()); + queryLawsMarketStandard.eq(LawsMarketStandard::getVersionFlag,lawsMarketStandardOld.getVersionFlag()); queryLawsMarketStandard.eq(LawsMarketStandard::getManifestVersion,manifestVersion); LawsMarketStandard lawsMarketStandard = marketStandardService.getOne(queryLawsMarketStandard,false); if(Objects.isNull(lawsMarketStandard)){ @@ -84,6 +84,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl listIds = Arrays.asList(manifestId.split(",")); + marketStandardDetail.setManifestId(null); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(marketStandardDetail, request.getParameterMap()); queryWrapper.in("manifest_id",listIds); @@ -175,7 +176,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl queryManifestNo = new LambdaQueryWrapper<>(); queryManifestNo.select(LawsMarketStandard::getManifestVersion); - queryManifestNo.isNotNull(LawsMarketStandard::getManifestNo); - queryManifestNo.eq(LawsMarketStandard::getManifestNo,manifest.getManifestNo()); + queryManifestNo.eq(LawsMarketStandard::getVersionFlag,manifest.getVersionFlag()); queryManifestNo.isNotNull(LawsMarketStandard::getManifestVersion); queryManifestNo.orderByDesc(LawsMarketStandard::getManifestVersion); List listManifestNo = list(queryManifestNo); @@ -382,7 +381,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl update = new LambdaUpdateWrapper<>(); - update.set(LawsMarketStandard::getManifestVersion,""); + update.set(LawsMarketStandard::getManifestVersion,null); update.set(LawsMarketStandard::getManifestStatus,MarketStandardConstants.MANIFEST_STATUS_EDIT); update.set(LawsMarketStandard::getUpdateTime,new Date()); update.set(LawsMarketStandard::getUpdateBy,sysUser.getUsername()); diff --git a/laws-modules/src/main/resources/excelTemplate/导入模板-市场法规清单.xls b/laws-modules/src/main/resources/excelTemplate/导入模板-市场法规清单.xls new file mode 100644 index 00000000..dc2a6138 Binary files /dev/null and b/laws-modules/src/main/resources/excelTemplate/导入模板-市场法规清单.xls differ diff --git a/laws-modules/src/main/resources/excelTemplate/导入模板-市场法规清单.xlsx b/laws-modules/src/main/resources/excelTemplate/导入模板-市场法规清单.xlsx deleted file mode 100644 index 6cb77aa0..00000000 Binary files a/laws-modules/src/main/resources/excelTemplate/导入模板-市场法规清单.xlsx and /dev/null differ