完善市场法规库清单
This commit is contained in:
+2
-4
@@ -2837,8 +2837,6 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
String textValue = translateDictValue(code, text, table, key, listDict);
|
String textValue = translateDictValue(code, text, table, key, listDict);
|
||||||
if(StringUtils.isBlank(textValue)){
|
if(StringUtils.isBlank(textValue)){
|
||||||
msg.append(name).append("数据不存在;");
|
msg.append(name).append("数据不存在;");
|
||||||
}else{
|
|
||||||
item.put(field.getName(), textValue);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2866,9 +2864,9 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
continue; //跳过循环
|
continue; //跳过循环
|
||||||
}
|
}
|
||||||
if (!org.springframework.util.StringUtils.isEmpty(table)) {
|
if (!org.springframework.util.StringUtils.isEmpty(table)) {
|
||||||
tmpValue = sysBaseAPI.queryTableDictTextByKey(table, code, text, k.trim());
|
tmpValue = sysBaseAPI.queryTableDictTextByKey(table, text, code, k.trim());
|
||||||
} else {
|
} else {
|
||||||
List<SysDictItemCore> listNew = listDict.stream().filter(o -> Objects.equals(o.getDictCode(), code) && Objects.equals(o.getItemText(), k.trim())).collect(Collectors.toList());
|
List<SysDictItemCore> 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)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(listNew)) {
|
||||||
tmpValue = listNew.get(0).getItemText();
|
tmpValue = listNew.get(0).getItemText();
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-12
@@ -123,7 +123,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 国家
|
* 国家
|
||||||
*/
|
*/
|
||||||
@Excel(name = "*国家/地区", width = 15)
|
@Excel(name = "*国家/地区", width = 15,dicCode = "market_state")
|
||||||
@NotBlank(message = "国家/地区不能为空")
|
@NotBlank(message = "国家/地区不能为空")
|
||||||
@ApiModelProperty(value = "国家")
|
@ApiModelProperty(value = "国家")
|
||||||
@Dict(dicCode = "market_state")
|
@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")
|
@Dict(dicCode = "applicable_vehicle_type")
|
||||||
@ApiModelProperty(value = "适用车型")
|
@ApiModelProperty(value = "适用车型")
|
||||||
private String applicableVehicle;
|
private String applicableVehicle;
|
||||||
@@ -148,7 +148,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "认证对象")
|
@ApiModelProperty(value = "认证对象")
|
||||||
@Dict(dicCode = "authentication_object")
|
@Dict(dicCode = "authentication_object")
|
||||||
@Excel(name = "认证对象", width = 15)
|
@Excel(name = "认证对象", width = 15, dicCode = "authentication_object")
|
||||||
private String authenticationObject;
|
private String authenticationObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -162,7 +162,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
* 类型
|
* 类型
|
||||||
*/
|
*/
|
||||||
@Dict(dicCode = "type")
|
@Dict(dicCode = "type")
|
||||||
@Excel(name = "类型", width = 15)
|
@Excel(name = "类型", width = 15, dicCode = "type")
|
||||||
@ApiModelProperty(value = "类型")
|
@ApiModelProperty(value = "类型")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Dict(dicCode = "dynamic_type")
|
@Dict(dicCode = "dynamic_type")
|
||||||
@ApiModelProperty(value = "动力类型")
|
@ApiModelProperty(value = "动力类型")
|
||||||
@Excel(name = "动力类型", width = 15)
|
@Excel(name = "动力类型", width = 15, dicCode = "dynamic_type")
|
||||||
private String dynamicType;
|
private String dynamicType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -180,7 +180,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
@ApiModelProperty(value = "主控部门")
|
@ApiModelProperty(value = "主控部门")
|
||||||
@NotBlank(message = "主控部门不能为空")
|
@NotBlank(message = "主控部门不能为空")
|
||||||
@Excel(name = "*主控部门", width = 15)
|
@Excel(name = "*主控部门", width = 15,dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
private String mainDept;
|
private String mainDept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -189,7 +189,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
@ApiModelProperty(value = "主控部门专业模块")
|
@ApiModelProperty(value = "主控部门专业模块")
|
||||||
@NotBlank(message = "主控部门专业模块不能为空")
|
@NotBlank(message = "主控部门专业模块不能为空")
|
||||||
@Dict(dicCode = "professional_module")
|
@Dict(dicCode = "professional_module")
|
||||||
@Excel(name = "*主控部门专业模块", width = 15)
|
@Excel(name = "*主控部门专业模块", width = 15, dicCode = "professional_module")
|
||||||
private String mainDeptProfMode;
|
private String mainDeptProfMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -197,14 +197,14 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
@ApiModelProperty(value = "关联部门")
|
@ApiModelProperty(value = "关联部门")
|
||||||
@Excel(name = "关联部门", width = 15)
|
@Excel(name = "关联部门", width = 15,dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||||
private String associateDept;
|
private String associateDept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关联部门专业模块
|
* 关联部门专业模块
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "关联部门专业模块")
|
@ApiModelProperty(value = "关联部门专业模块")
|
||||||
@Excel(name = "关联部门专业模块", width = 15)
|
@Excel(name = "关联部门专业模块", width = 15, dicCode = "professional_module")
|
||||||
@Dict(dicCode = "professional_module")
|
@Dict(dicCode = "professional_module")
|
||||||
private String associateDeptProfMode;
|
private String associateDeptProfMode;
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
* 批量限制
|
* 批量限制
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "批量限制")
|
@ApiModelProperty(value = "批量限制")
|
||||||
@Excel(name = "批量限制", width = 15)
|
@Excel(name = "批量限制", width = 15, dicCode = "batch_restriction")
|
||||||
@Dict(dicCode = "batch_restriction")
|
@Dict(dicCode = "batch_restriction")
|
||||||
private String batchLimit;
|
private String batchLimit;
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Dict(dicCode = "automatic_driving_level")
|
@Dict(dicCode = "automatic_driving_level")
|
||||||
@ApiModelProperty(value = "自动驾驶等级")
|
@ApiModelProperty(value = "自动驾驶等级")
|
||||||
@Excel(name = "自动驾驶等级", width = 15)
|
@Excel(name = "自动驾驶等级", width = 15,dicCode = "automatic_driving_level")
|
||||||
private String autopilotLevel;
|
private String autopilotLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -229,7 +229,7 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Dict(dicCode = "requirement_type")
|
@Dict(dicCode = "requirement_type")
|
||||||
@ApiModelProperty(value = "要求类型")
|
@ApiModelProperty(value = "要求类型")
|
||||||
@Excel(name = "要求类型", width = 15)
|
@Excel(name = "要求类型", width = 15,dicCode = "requirement_type")
|
||||||
private String requireType;
|
private String requireType;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -75,7 +75,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
|||||||
return Result.error(NOT_DATA);
|
return Result.error(NOT_DATA);
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<LawsMarketStandard> queryLawsMarketStandard = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LawsMarketStandard> queryLawsMarketStandard = new LambdaQueryWrapper<>();
|
||||||
queryLawsMarketStandard.eq(LawsMarketStandard::getManifestNo,lawsMarketStandardOld.getManifestNo());
|
queryLawsMarketStandard.eq(LawsMarketStandard::getVersionFlag,lawsMarketStandardOld.getVersionFlag());
|
||||||
queryLawsMarketStandard.eq(LawsMarketStandard::getManifestVersion,manifestVersion);
|
queryLawsMarketStandard.eq(LawsMarketStandard::getManifestVersion,manifestVersion);
|
||||||
LawsMarketStandard lawsMarketStandard = marketStandardService.getOne(queryLawsMarketStandard,false);
|
LawsMarketStandard lawsMarketStandard = marketStandardService.getOne(queryLawsMarketStandard,false);
|
||||||
if(Objects.isNull(lawsMarketStandard)){
|
if(Objects.isNull(lawsMarketStandard)){
|
||||||
@@ -84,6 +84,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
|||||||
manifestId = lawsMarketStandard.getId();
|
manifestId = lawsMarketStandard.getId();
|
||||||
}
|
}
|
||||||
List<String> listIds = Arrays.asList(manifestId.split(","));
|
List<String> listIds = Arrays.asList(manifestId.split(","));
|
||||||
|
marketStandardDetail.setManifestId(null);
|
||||||
QueryWrapper<LawsMarketStandardDetail> queryWrapper =
|
QueryWrapper<LawsMarketStandardDetail> queryWrapper =
|
||||||
QueryGenerator.initQueryWrapper(marketStandardDetail, request.getParameterMap());
|
QueryGenerator.initQueryWrapper(marketStandardDetail, request.getParameterMap());
|
||||||
queryWrapper.in("manifest_id",listIds);
|
queryWrapper.in("manifest_id",listIds);
|
||||||
@@ -175,7 +176,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
|||||||
// 验证标准编号
|
// 验证标准编号
|
||||||
checkStandard(listIds, listStandardIds, listStandardIdRepeat, p, s);
|
checkStandard(listIds, listStandardIds, listStandardIdRepeat, p, s);
|
||||||
if(!StringUtils.isBlank(s.toString())){
|
if(!StringUtils.isBlank(s.toString())){
|
||||||
m.append("第").append(i + 4).append("行,").append(s.toString());
|
m.append("第").append(i + 1).append("行,").append(s.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +248,7 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
|||||||
@Override
|
@Override
|
||||||
public void downloadTemplate(HttpServletResponse response) {
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
// 模板存放地址
|
// 模板存放地址
|
||||||
ClassPathResource resource = new ClassPathResource("excelTemplate/导入模板-市场法规清单.xlsx");
|
ClassPathResource resource = new ClassPathResource("excelTemplate/导入模板-市场法规清单.xls");
|
||||||
try (InputStream inputStream = resource.getInputStream();
|
try (InputStream inputStream = resource.getInputStream();
|
||||||
OutputStream outputStream = response.getOutputStream()
|
OutputStream outputStream = response.getOutputStream()
|
||||||
) {
|
) {
|
||||||
|
|||||||
+2
-3
@@ -330,8 +330,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
|||||||
|
|
||||||
LambdaQueryWrapper<LawsMarketStandard> queryManifestNo = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LawsMarketStandard> queryManifestNo = new LambdaQueryWrapper<>();
|
||||||
queryManifestNo.select(LawsMarketStandard::getManifestVersion);
|
queryManifestNo.select(LawsMarketStandard::getManifestVersion);
|
||||||
queryManifestNo.isNotNull(LawsMarketStandard::getManifestNo);
|
queryManifestNo.eq(LawsMarketStandard::getVersionFlag,manifest.getVersionFlag());
|
||||||
queryManifestNo.eq(LawsMarketStandard::getManifestNo,manifest.getManifestNo());
|
|
||||||
queryManifestNo.isNotNull(LawsMarketStandard::getManifestVersion);
|
queryManifestNo.isNotNull(LawsMarketStandard::getManifestVersion);
|
||||||
queryManifestNo.orderByDesc(LawsMarketStandard::getManifestVersion);
|
queryManifestNo.orderByDesc(LawsMarketStandard::getManifestVersion);
|
||||||
List<LawsMarketStandard> listManifestNo = list(queryManifestNo);
|
List<LawsMarketStandard> listManifestNo = list(queryManifestNo);
|
||||||
@@ -382,7 +381,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
|||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
// 新数据版本设置为空,状态设置为编辑中
|
// 新数据版本设置为空,状态设置为编辑中
|
||||||
LambdaUpdateWrapper<LawsMarketStandard> update = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<LawsMarketStandard> update = new LambdaUpdateWrapper<>();
|
||||||
update.set(LawsMarketStandard::getManifestVersion,"");
|
update.set(LawsMarketStandard::getManifestVersion,null);
|
||||||
update.set(LawsMarketStandard::getManifestStatus,MarketStandardConstants.MANIFEST_STATUS_EDIT);
|
update.set(LawsMarketStandard::getManifestStatus,MarketStandardConstants.MANIFEST_STATUS_EDIT);
|
||||||
update.set(LawsMarketStandard::getUpdateTime,new Date());
|
update.set(LawsMarketStandard::getUpdateTime,new Date());
|
||||||
update.set(LawsMarketStandard::getUpdateBy,sysUser.getUsername());
|
update.set(LawsMarketStandard::getUpdateBy,sysUser.getUsername());
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user