|
@@ -142,6 +142,7 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
|
|
|
public List<Material> allNoBack(List<Information> page) {
|
|
public List<Material> allNoBack(List<Information> page) {
|
|
List<Material> materialList = informationMapper.allNoBack(page);
|
|
List<Material> materialList = informationMapper.allNoBack(page);
|
|
|
|
+
|
|
return materialList;
|
|
return materialList;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -152,10 +153,76 @@ public class InformationService extends CrudService<InformationMapper, Informati
|
|
|
|
|
|
public List<Information> exportInfor(List<Information> list) {
|
|
public List<Information> exportInfor(List<Information> list) {
|
|
List<Information> informationList = informationMapper.exportInfor(list);
|
|
List<Information> informationList = informationMapper.exportInfor(list);
|
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
|
+ long between_days = 0;
|
|
|
|
+ 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 {
|
|
|
|
+ cal.setTime(new Date());
|
|
|
|
+ long nowDate = cal.getTimeInMillis();
|
|
|
|
+ between_days=(nowDate-appDay)/(1000*3600*24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return informationList;
|
|
return informationList;
|
|
}
|
|
}
|
|
|
|
|
|
public List<Information> export(List<Information> list) {
|
|
public List<Information> export(List<Information> list) {
|
|
- return informationMapper.export(list);
|
|
|
|
|
|
+ List<Information> export = informationMapper.export(list);
|
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
|
+ long between_days = 0;
|
|
|
|
+ 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 {
|
|
|
|
+ cal.setTime(new Date());
|
|
|
|
+ long nowDate = cal.getTimeInMillis();
|
|
|
|
+ between_days=(nowDate-appDay)/(1000*3600*24);
|
|
|
|
+ in.setFinishDate(String.valueOf(between_days)+"天");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return export;
|
|
}
|
|
}
|
|
}
|
|
}
|