if 1equalsitemgetProjectStatus if StringHelperisEmptyitemgetEndTime throw new RuntimeException竣工时间不能为空!; Date endTime = null; try endTime = formatterp
// 如果项目状态为"1"
if ("1".equals(item.getProjectStatus())) {
// 如果竣工时间为空,则抛出异常
if (StringHelper.isEmpty(item.getEndTime())) throw new RuntimeException("竣工时间不能为空!");
// 将竣工时间字符串转换为Date对象
Date endTime = null;
try {
endTime = formatter.parse(item.getEndTime());
} catch (ParseException e) {
throw new RuntimeException("时间转换异常");
}
// 如果转换后的竣工时间为空,则抛出异常
if (endTime == null) throw new RuntimeException("时间转换异常");
// 如果项目的开始时间晚于竣工时间,则抛出异常
if (project.getBegineat().after(endTime)) throw new RuntimeException("启动时间不能大于竣工时间");
// 查询项目相关的图片列表
List
原文地址: https://www.cveoy.top/t/topic/imBS 著作权归作者所有。请勿转载和采集!