|
@@ -52,34 +52,51 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
long between_days = 0;
|
|
long between_days = 0;
|
|
for (Information in : list) {
|
|
for (Information in : list) {
|
|
- if (in.getApprovalDate() != null) {
|
|
|
|
- cal.setTime(in.getApprovalDate());
|
|
|
|
- long appDay = cal.getTimeInMillis();
|
|
|
|
- if (in.getFirstFinishDate() != null && in.getSecondFinishDate() != null) {
|
|
|
|
- if (in.getSecondFinishDate() != null) {
|
|
|
|
- cal.setTime(in.getSecondFinishDate());
|
|
|
|
- long secondDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(secondDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
- if (between_days>14) {
|
|
|
|
- in.setOverdue("是");
|
|
|
|
- } else{
|
|
|
|
- in.setOverdue("否");
|
|
|
|
|
|
+ //判断审定日期是否为空
|
|
|
|
+// if (in.getApprovalDate() != null) {
|
|
|
|
+ //格式化审定日期
|
|
|
|
+
|
|
|
|
+ if ("否".equals(in.getFirstFinish()) || "否".equals(in.getSecondFinish())) {
|
|
|
|
+ in.setComplete("否");
|
|
|
|
+ if (in.getApprovalDate() != null) {
|
|
|
|
+ cal.setTime(in.getApprovalDate());
|
|
|
|
+ long appDay = cal.getTimeInMillis();
|
|
|
|
+ cal.setTime(new Date());
|
|
|
|
+ long nowDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (nowDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setNoFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ in.setComplete("是");
|
|
|
|
+ if (in.getApprovalDate() != null) {
|
|
|
|
+ cal.setTime(in.getApprovalDate());
|
|
|
|
+ long appDay = cal.getTimeInMillis();
|
|
|
|
+ if (in.getFirstFinishDate() != null || in.getSecondFinishDate() != null) {
|
|
|
|
+ if (in.getSecondFinishDate() != null) {
|
|
|
|
+ cal.setTime(in.getSecondFinishDate());
|
|
|
|
+ long secondDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (secondDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ if (between_days > 14) {
|
|
|
|
+ in.setOverdue("是");
|
|
|
|
+ } else {
|
|
|
|
+ in.setOverdue("否");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ cal.setTime(in.getFirstFinishDate());
|
|
|
|
+ long firstDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (firstDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ if (between_days > 14) {
|
|
|
|
+ in.setOverdue("是");
|
|
|
|
+ } else {
|
|
|
|
+ in.setOverdue("否");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- else {
|
|
|
|
- cal.setTime(in.getFirstFinishDate());
|
|
|
|
- long firstDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(firstDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- cal.setTime(new Date());
|
|
|
|
- long nowDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(nowDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+// }
|
|
}
|
|
}
|
|
|
|
|
|
return page1;
|
|
return page1;
|
|
@@ -149,32 +166,44 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
long between_days = 0;
|
|
long between_days = 0;
|
|
for (Information in : informationList) {
|
|
for (Information in : informationList) {
|
|
- if (in.getApprovalDate() != null) {
|
|
|
|
- cal.setTime(in.getApprovalDate());
|
|
|
|
- long appDay = cal.getTimeInMillis();
|
|
|
|
- if (in.getFirstFinishDate() != null && in.getSecondFinishDate() != null) {
|
|
|
|
- if (in.getSecondFinishDate() != null) {
|
|
|
|
- cal.setTime(in.getSecondFinishDate());
|
|
|
|
- long secondDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(secondDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
- if (between_days>14) {
|
|
|
|
- in.setOverdue("是");
|
|
|
|
- } else{
|
|
|
|
- in.setOverdue("否");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- cal.setTime(in.getFirstFinishDate());
|
|
|
|
- long firstDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(firstDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
|
|
+ if ("否".equals(in.getFirstFinish()) || "否".equals(in.getSecondFinish())) {
|
|
|
|
+ in.setComplete("否");
|
|
|
|
+ if (in.getApprovalDate() != null) {
|
|
|
|
+ cal.setTime(in.getApprovalDate());
|
|
|
|
+ long appDay = cal.getTimeInMillis();
|
|
cal.setTime(new Date());
|
|
cal.setTime(new Date());
|
|
long nowDate = cal.getTimeInMillis();
|
|
long nowDate = cal.getTimeInMillis();
|
|
- between_days=(nowDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
|
|
+ between_days = (nowDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setNoFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ in.setComplete("是");
|
|
|
|
+ if (in.getApprovalDate() != null) {
|
|
|
|
+ cal.setTime(in.getApprovalDate());
|
|
|
|
+ long appDay = cal.getTimeInMillis();
|
|
|
|
+ if (in.getFirstFinishDate() != null || in.getSecondFinishDate() != null) {
|
|
|
|
+ if (in.getSecondFinishDate() != null) {
|
|
|
|
+ cal.setTime(in.getSecondFinishDate());
|
|
|
|
+ long secondDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (secondDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ if (between_days > 14) {
|
|
|
|
+ in.setOverdue("是");
|
|
|
|
+ } else {
|
|
|
|
+ in.setOverdue("否");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ cal.setTime(in.getFirstFinishDate());
|
|
|
|
+ long firstDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (firstDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ if (between_days > 14) {
|
|
|
|
+ in.setOverdue("是");
|
|
|
|
+ } else {
|
|
|
|
+ in.setOverdue("否");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -186,32 +215,44 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
long between_days = 0;
|
|
long between_days = 0;
|
|
for (Information in : export) {
|
|
for (Information in : export) {
|
|
- if (in.getApprovalDate() != null) {
|
|
|
|
- cal.setTime(in.getApprovalDate());
|
|
|
|
- long appDay = cal.getTimeInMillis();
|
|
|
|
- if (in.getFirstFinishDate() != null && in.getSecondFinishDate() != null) {
|
|
|
|
- if (in.getSecondFinishDate() != null) {
|
|
|
|
- cal.setTime(in.getSecondFinishDate());
|
|
|
|
- long secondDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(secondDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
- if (between_days>14) {
|
|
|
|
- in.setOverdue("是");
|
|
|
|
- } else{
|
|
|
|
- in.setOverdue("否");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- cal.setTime(in.getFirstFinishDate());
|
|
|
|
- long firstDate = cal.getTimeInMillis();
|
|
|
|
- between_days=(firstDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
|
|
+ if ("否".equals(in.getFirstFinish()) || "否".equals(in.getSecondFinish())) {
|
|
|
|
+ in.setComplete("否");
|
|
|
|
+ if (in.getApprovalDate() != null) {
|
|
|
|
+ cal.setTime(in.getApprovalDate());
|
|
|
|
+ long appDay = cal.getTimeInMillis();
|
|
cal.setTime(new Date());
|
|
cal.setTime(new Date());
|
|
long nowDate = cal.getTimeInMillis();
|
|
long nowDate = cal.getTimeInMillis();
|
|
- between_days=(nowDate-appDay)/(1000*3600*24);
|
|
|
|
- in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
|
|
+ between_days = (nowDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setNoFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ in.setComplete("是");
|
|
|
|
+ if (in.getApprovalDate() != null) {
|
|
|
|
+ cal.setTime(in.getApprovalDate());
|
|
|
|
+ long appDay = cal.getTimeInMillis();
|
|
|
|
+ if (in.getFirstFinishDate() != null || in.getSecondFinishDate() != null) {
|
|
|
|
+ if (in.getSecondFinishDate() != null) {
|
|
|
|
+ cal.setTime(in.getSecondFinishDate());
|
|
|
|
+ long secondDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (secondDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ if (between_days > 14) {
|
|
|
|
+ in.setOverdue("是");
|
|
|
|
+ } else {
|
|
|
|
+ in.setOverdue("否");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ cal.setTime(in.getFirstFinishDate());
|
|
|
|
+ long firstDate = cal.getTimeInMillis();
|
|
|
|
+ between_days = (firstDate - appDay) / (1000 * 3600 * 24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days) + "天");
|
|
|
|
+ if (between_days > 14) {
|
|
|
|
+ in.setOverdue("是");
|
|
|
|
+ } else {
|
|
|
|
+ in.setOverdue("否");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|