修改法规预警默认时间为空,添加三年内选项
This commit is contained in:
+19
-19
@@ -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"))){
|
||||
|
||||
+3
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user