feat: 重汽国标外标增加备注字段
This commit is contained in:
+6
-3
@@ -1,8 +1,5 @@
|
||||
package com.jero.modules.laws.localTool.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -60,6 +57,12 @@ public class StandardEarlyWarning {
|
||||
@Excel(name = "在产车实施日期", width = 15)
|
||||
@ApiModelProperty(value = "在产车实施日期")
|
||||
private java.lang.String onTheProductionDate;
|
||||
/**在产车实施日期备注*/
|
||||
@ApiModelProperty(value = "在产车实施日期备注")
|
||||
private java.lang.String onTheProductionDateRemarks;
|
||||
/**新车型实施日期备注*/
|
||||
@ApiModelProperty(value = "新车型实施日期备注")
|
||||
private java.lang.String newModelImplementationDateRemarks;
|
||||
/**新车型实施日期*/
|
||||
@Excel(name = "新车型实施日期", width = 15)
|
||||
@ApiModelProperty(value = "新车型实施日期")
|
||||
|
||||
+10
-2
@@ -10,7 +10,9 @@
|
||||
dataInfo.standard_name,
|
||||
dataInfo.responsible_department,
|
||||
dataInfo.new_model_implementation_date,
|
||||
dataInfo.new_model_implementation_date_remarks,
|
||||
dataInfo.on_the_production_date,
|
||||
dataInfo.on_the_production_date_remarks,
|
||||
dataInfo.implementation_date
|
||||
FROM
|
||||
(SELECT DISTINCT
|
||||
@@ -33,6 +35,8 @@
|
||||
<if test="param.onTheProductionDate == null or param.onTheProductionDate == ''">
|
||||
standard.on_the_production_date,
|
||||
</if>
|
||||
standard.new_model_implementation_date_remarks,
|
||||
standard.on_the_production_date_remarks,
|
||||
standard.implementation_date
|
||||
FROM
|
||||
(
|
||||
@@ -44,7 +48,9 @@
|
||||
lds.responsible_department,
|
||||
lds.on_the_production_date,
|
||||
lds.new_model_implementation_date,
|
||||
lds.implementation_date
|
||||
lds.implementation_date,
|
||||
lds.on_the_production_date_remarks,
|
||||
lds.new_model_implementation_date_remarks
|
||||
FROM
|
||||
laws_domestic_standard lds
|
||||
WHERE
|
||||
@@ -57,7 +63,9 @@
|
||||
los.responsible_department,
|
||||
los.on_the_production_date,
|
||||
los.new_model_implementation_date,
|
||||
los.implementation_date
|
||||
los.implementation_date,
|
||||
los.on_the_production_date_remarks,
|
||||
los.new_model_implementation_date_remarks
|
||||
FROM
|
||||
laws_overseas_standard los
|
||||
WHERE
|
||||
|
||||
+32
@@ -81,6 +81,38 @@ public class LawsStandardEarlyWarningServiceImpl implements ILawsStandardEarlyWa
|
||||
standardEarlyWarning.setDayStrings(dayStrings);
|
||||
Page<StandardEarlyWarning> page = new Page<>(pageNo, pageSize);
|
||||
IPage<StandardEarlyWarning> pageList = lawsStandardEarlyWarningMapper.pageList(page, standardEarlyWarning);
|
||||
// 需要处理新车型实施日期备注
|
||||
if (CollectionUtils.isNotEmpty(pageList.getRecords())) {
|
||||
pageList.getRecords().forEach(data -> {
|
||||
try {
|
||||
String newModelImplementationDate = data.getNewModelImplementationDate();
|
||||
String newModelImplementationDateRemarks = data.getNewModelImplementationDateRemarks();
|
||||
String onTheProductionDate = data.getOnTheProductionDate();
|
||||
String onTheProductionDateRemarks = data.getOnTheProductionDateRemarks();
|
||||
// 根据字符串匹配找到对应的备注后去除前面的日期
|
||||
if (StringUtils.isNotBlank(newModelImplementationDateRemarks)) {
|
||||
String[] split = newModelImplementationDateRemarks.split(",");
|
||||
for (String s : split) {
|
||||
if (s.contains(newModelImplementationDate)) {
|
||||
data.setNewModelImplementationDateRemarks(
|
||||
s.replace(newModelImplementationDate, ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(onTheProductionDateRemarks)) {
|
||||
String[] split = onTheProductionDateRemarks.split(",");
|
||||
for (String s : split) {
|
||||
if (s.contains(onTheProductionDate)) {
|
||||
data.setOnTheProductionDateRemarks(
|
||||
s.replace(onTheProductionDate, ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("标准预警:处理备注异常", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user