修改法规预警默认时间为空,添加三年内选项

This commit is contained in:
高嵩
2023-05-30 19:05:28 +08:00
parent 4c5232a4f6
commit b253d5c794
6 changed files with 35 additions and 22 deletions
@@ -4373,25 +4373,25 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
//处理法规预警模块预警时间查询条件 flag = 0(新车实施日期), flag = 1(在产车实施日期)
String warnTime = (String) parameter.get("WarnTime");
if(StringUtils.isNotBlank(warnTime)){
if("0".equals(flag)){
//日期(区分单日期还时间范围)
if (warnTime.contains(",")) {
conditionSb.append(" and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') >= '" + warnTime.split(",")[0] + "'"
+ " and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') <= '" + warnTime.split(",")[1] + "'");
} else {
conditionSb.append(" and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') = '" + warnTime + "'");
}
}else{
//日期(区分单日期还时间范围)
if (warnTime.contains(",")) {
conditionSb.append(" and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') >= '" + warnTime.split(",")[0] + "'"
+ " and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') <= '" + warnTime.split(",")[1] + "'");
} else {
conditionSb.append(" and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') = '" + warnTime + "'");
}
}
}
// if(StringUtils.isNotBlank(warnTime)){
// if("0".equals(flag)){
// //日期(区分单日期还时间范围)
// if (warnTime.contains(",")) {
// conditionSb.append(" and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') >= '" + warnTime.split(",")[0] + "'"
// + " and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') <= '" + warnTime.split(",")[1] + "'");
// } else {
// conditionSb.append(" and " + "date_format(" + "xin1_che1_xing2_shi2_shi1_ri4_qi1" + ",'%Y-%m-%d') = '" + warnTime + "'");
// }
// }else{
// //日期(区分单日期还时间范围)
// if (warnTime.contains(",")) {
// conditionSb.append(" and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') >= '" + warnTime.split(",")[0] + "'"
// + " and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') <= '" + warnTime.split(",")[1] + "'");
// } else {
// conditionSb.append(" and " + "date_format(" + "implement_time" + ",'%Y-%m-%d') = '" + warnTime + "'");
// }
// }
// }
//高级搜索 queryConditionVOList List<QueryConditionVO>
if(ObjectUtils.isNotEmpty(parameter.get("queryConditionVOList"))){
@@ -102,7 +102,7 @@ public class LawsWarnService {
} else if(StringUtils.equals(flag,"1")){
parameter.put("implement_time",parameter.get("WarnTime"));
}
parameter.remove("WarnTime");
// parameter.remove("WarnTime");
String cut = (String) parameter.get("cut");//中英文切换标识
List<OnlCgformField> onlCgformFieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue());
@@ -122,6 +122,8 @@ public class LawsWarnService {
fieldListNew.add(fieldTemp);
}
}
//封装查询条件
String condition = bussDocumentLibraryEOService.getConditionStr(parameter);
int pageNo = Integer.parseInt(parameter.get("pageNo").toString());
+1
View File
@@ -1333,6 +1333,7 @@ module.exports = {
inRecentMonths6:'In recent 6 months',
inRecentYear1:'In recent 1 year',
inRecentYear2:'In recent 2 year',
inRecentYear3:'In recent 3 year',
selectAll:'Select All',
importLocalDisassemblyOrder:'Import local disassembly order',
notExport:'Not exported',
+1
View File
@@ -1435,6 +1435,7 @@ module.exports = {
inRecentMonths6: '近6个月内',
inRecentYear1: '近1年内',
inRecentYear2: '近2年内',
inRecentYear3: '近3年内',
selectAll: '全选',
importLocalDisassemblyOrder: '导入本地拆解单',
notExport: '未导出',
+4 -1
View File
@@ -245,7 +245,7 @@
if (this.isDefault) {
let startTime = moment(new Date()).format('YYYY-MM-DD')
// this.queryParam['WarnTimeText'] = '2'
let endTime = this.getNowdate()
let endTime = '2099-01-01'
this.queryParam['WarnTime'] = [startTime, endTime]
this.queryParam = { ...this.queryParam }
}
@@ -295,6 +295,9 @@
}else if (this.queryParam['WarnTimeText'] == '5') {
monthData = 7
yearData = -1
}else if (this.queryParam['WarnTimeText'] == '6') {
monthData = 37
yearData = 3
}
if(this.queryParam['WarnTimeText'] == '5'){
var time = new Date();
@@ -155,7 +155,10 @@
value: '4',
name: this.$t('inRecentYear2')
},
{
value: '6',
name: this.$t('inRecentYear3')
},
]
}
],
@@ -338,6 +341,9 @@
} else if (this.searchParmes['WarnTimeText'] == '4') {
monthData = 25
yearData = 2
}else if (this.queryParam['WarnTimeText'] == '6') {
monthData = 37
yearData = 3
}
var date_now = new Date()//获取当前时间
var year = date_now.getFullYear()//获取当前时间的年份