fix:87324
This commit is contained in:
-9
@@ -72,7 +72,6 @@ public class LawsMarketStandard implements Serializable {
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@Excel(name = "国家/地区", width = 15,dicCode = "market_state", needMerge = true)
|
||||
@Dict(dicCode = "market_state")
|
||||
@ApiModelProperty(value = "国家")
|
||||
private String country;
|
||||
@@ -81,14 +80,12 @@ public class LawsMarketStandard implements Serializable {
|
||||
* 清单编号
|
||||
*/
|
||||
@ApiModelProperty(value = "清单编号")
|
||||
@Excel(name = "清单编号", width = 15,needMerge = true)
|
||||
private String manifestNo;
|
||||
|
||||
/**
|
||||
* 清单名称
|
||||
*/
|
||||
@ApiModelProperty(value = "清单名称")
|
||||
@Excel(name = "清单名称", width = 15,needMerge = true)
|
||||
private String manifestName;
|
||||
|
||||
/**
|
||||
@@ -96,14 +93,12 @@ public class LawsMarketStandard implements Serializable {
|
||||
*/
|
||||
@Dict(dicCode = "drive_position")
|
||||
@ApiModelProperty(value = "驾驶位置")
|
||||
@Excel(name = "驾驶位置", width = 15,needMerge = true, dicCode = "drive_position")
|
||||
private String drivePosition;
|
||||
|
||||
/**
|
||||
* 清单版本
|
||||
*/
|
||||
@ApiModelProperty(value = "清单版本")
|
||||
@Excel(name = "清单版本", width = 15,needMerge = true)
|
||||
private String manifestVersion;
|
||||
|
||||
/**
|
||||
@@ -112,7 +107,6 @@ public class LawsMarketStandard implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "发布时间")
|
||||
@Excel(name = "发布时间", width = 15, needMerge = true, format = "yyyy-MM-dd")
|
||||
private Date releaseDate;
|
||||
|
||||
/**
|
||||
@@ -120,7 +114,6 @@ public class LawsMarketStandard implements Serializable {
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
|
||||
@ApiModelProperty(value = "作者")
|
||||
@Excel(name = "作者", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id" ,needMerge = true)
|
||||
private String author;
|
||||
|
||||
/**
|
||||
@@ -135,7 +128,6 @@ public class LawsMarketStandard implements Serializable {
|
||||
*/
|
||||
@Dict(dicCode = "manifest_status")
|
||||
@ApiModelProperty(value = "清单状态")
|
||||
@Excel(name = "清单状态", width = 15,dicCode = "manifest_status", needMerge = true)
|
||||
private String manifestStatus;
|
||||
|
||||
/**
|
||||
@@ -174,7 +166,6 @@ public class LawsMarketStandard implements Serializable {
|
||||
/**
|
||||
* 市场法规清单
|
||||
*/
|
||||
@ExcelCollection(name="市场法规清单")
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "市场法规清单")
|
||||
private List<LawsMarketStandardDetail> list;
|
||||
|
||||
+2
-2
@@ -125,8 +125,8 @@ public class LawsMarketStandardDetail implements Serializable {
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@Excel(name = "国家/地区", width = 15,dicCode = "market_state")
|
||||
@NotBlank(message = "国家/地区不能为空")
|
||||
@Excel(name = "适用国家/地区", width = 15,dicCode = "market_state")
|
||||
@NotBlank(message = "适用国家/地区不能为空")
|
||||
@ApiModelProperty(value = "国家")
|
||||
@Dict(dicCode = "market_state")
|
||||
private String country;
|
||||
|
||||
+2
-2
@@ -123,8 +123,8 @@ public class LawsMarketStandardDetailExcel implements Serializable {
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@Excel(name = "*国家/地区", width = 15,dicCode = "market_state")
|
||||
@NotBlank(message = "国家/地区不能为空")
|
||||
@Excel(name = "*适用国家/地区", width = 15,dicCode = "market_state")
|
||||
@NotBlank(message = "适用国家/地区不能为空")
|
||||
@ApiModelProperty(value = "国家")
|
||||
@Dict(dicCode = "market_state")
|
||||
private String country;
|
||||
|
||||
+2
-6
@@ -5,14 +5,10 @@
|
||||
<mapper namespace="com.jero.modules.laws.marketStandard.mapper.LawsMarketStandardDetailMapper">
|
||||
<select id="getStandardData"
|
||||
resultType="com.jero.modules.laws.marketStandard.entity.LawsMarketStandardDetail">
|
||||
select id as standard_id,standard_number,standard_name,standard_english_name,type from
|
||||
(select id, standard_number,standard_name,standard_english_name,type
|
||||
select id as standard_id, standard_number,standard_name,standard_english_name,type
|
||||
from laws_domestic_standard
|
||||
where del_flag = 0
|
||||
union all
|
||||
select id, standard_number,standard_name,standard_english_name,'' as type
|
||||
from laws_enterprise_standard
|
||||
where del_flag = 0) a where standard_number in
|
||||
and standard_number in
|
||||
<foreach collection="listNum" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
+24
-18
@@ -197,15 +197,12 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
||||
JSON.toJSONString(listLawsMarketStandardDetailExcel),LawsMarketStandardDetail.class);
|
||||
List<LawsMarketStandardDetail> listStandardNumberNotNull = listLawsMarketStandardDetail.stream().filter(o->
|
||||
!StringUtils.isBlank(o.getStandardNumber())).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(listStandardNumberNotNull)){
|
||||
return Result.error("标准编号不能为空");
|
||||
}
|
||||
List<String> listStandardNumber = listStandardNumberNotNull.stream()
|
||||
.map(LawsMarketStandardDetail::getStandardNumber).collect(Collectors.toList());
|
||||
// 根据标准编号获取标准id
|
||||
List<LawsMarketStandardDetail> listIdsStandard = lawsMarketStandardDetailMapper.getStandardData(listStandardNumber);
|
||||
if(CollectionUtils.isEmpty(listIdsStandard)){
|
||||
return Result.error("标准编号不存在");
|
||||
List<LawsMarketStandardDetail> listIdsStandard = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(listStandardNumberNotNull)){
|
||||
List<String> listStandardNumber = listStandardNumberNotNull.stream()
|
||||
.map(LawsMarketStandardDetail::getStandardNumber).collect(Collectors.toList());
|
||||
// 根据标准编号获取标准id
|
||||
listIdsStandard = lawsMarketStandardDetailMapper.getStandardData(listStandardNumber);
|
||||
}
|
||||
StringBuilder m = getStringBuilder(manifestId, listLawsMarketStandardDetail, listIdsStandard);
|
||||
|
||||
@@ -246,13 +243,16 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
||||
}
|
||||
// 验证标准编号
|
||||
if(!StringUtils.isBlank(p.getStandardNumber())){
|
||||
Optional<LawsMarketStandardDetail> op = listIdsStandard.stream().filter(o->
|
||||
Objects.equals(o.getStandardNumber(),p.getStandardNumber())).findFirst();
|
||||
if(!op.isPresent()){
|
||||
if(CollectionUtils.isEmpty(listIdsStandard)){
|
||||
s.append("标准编号不存在,");
|
||||
continue;
|
||||
}else{
|
||||
checkStandard(listStandardIds, listStandardIdRepeat, p, s, op);
|
||||
Optional<LawsMarketStandardDetail> op = listIdsStandard.stream().filter(o->
|
||||
Objects.equals(o.getStandardNumber(),p.getStandardNumber())).findFirst();
|
||||
if(!op.isPresent()){
|
||||
s.append("标准编号不存在,");
|
||||
}else{
|
||||
checkStandard(listStandardIds, listStandardIdRepeat, p, s, op);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!StringUtils.isBlank(s.toString())){
|
||||
@@ -280,7 +280,8 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
||||
s.append("标准名称错误,");
|
||||
}
|
||||
// 验证标准英文名称
|
||||
if(!Objects.equals(obj.getStandardEnglishName(), p.getStandardEnglishName())){
|
||||
if(!Objects.equals(StringUtils.isEmpty(obj.getStandardEnglishName()) ? "" : obj.getStandardEnglishName(),
|
||||
StringUtils.isEmpty(p.getStandardEnglishName()) ? "" : p.getStandardEnglishName())){
|
||||
s.append("标准英文名称错误,");
|
||||
}
|
||||
checkDate(p, s);
|
||||
@@ -320,9 +321,14 @@ public class LawsMarketStandardDetailServiceImpl extends ServiceImpl<LawsMarketS
|
||||
}
|
||||
}
|
||||
// 注册日期
|
||||
if(!StringUtils.isEmpty(p.getRegistrationDate()) &&
|
||||
!DateValidateUtil.isValidDate(p.getRegistrationDate(), format)){
|
||||
s.append("注册日期格式错误(请输入年-月-日格式),");
|
||||
if(!StringUtils.isEmpty(p.getRegistrationDate())){
|
||||
String[] str = p.getRegistrationDate().split(",");
|
||||
for (String s1 : str) {
|
||||
if (!DateValidateUtil.isValidDate(s1, format)) {
|
||||
s.append("注册日期格式错误(请输入年-月-日格式),");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user