|
|
@@ -1,5 +1,10 @@
|
|
|
package com.goafanti.common.bo;
|
|
|
|
|
|
+import java.util.Calendar;
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
+import com.goafanti.common.constant.AFTConstants;
|
|
|
+import com.goafanti.common.utils.DateUtils;
|
|
|
|
|
|
public class EmailBo {
|
|
|
|
|
|
@@ -41,19 +46,17 @@ public class EmailBo {
|
|
|
*/
|
|
|
|
|
|
public EmailBo(String subject, String address, String addressee,
|
|
|
- String deptname, String sender,String patentName,String patentNo,String amount,String date,Integer status) {
|
|
|
+ String deptname, String sender,String patentName,String patentNo,String amount,Date date) {
|
|
|
this.subject = subject;
|
|
|
this.address = address;
|
|
|
this.addressee = addressee;
|
|
|
this.deptname = deptname;
|
|
|
this.sender = sender;
|
|
|
- Integer days=0;
|
|
|
- if (status==1) days=90;
|
|
|
- else if (status==2) days=60;
|
|
|
- else if (status==3) days=30;
|
|
|
- else if (status==4) days=15;
|
|
|
- else if (status==5) days=7;
|
|
|
- this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, date,days);
|
|
|
+ long now = new Date().getTime();
|
|
|
+ long end = date.getTime();
|
|
|
+ String endStr=DateUtils.formatDate(date, AFTConstants.YYYYMMDD);
|
|
|
+ Integer days = (int)((end - now) / (1000 * 60 * 60 *24));
|
|
|
+ this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, endStr,days);
|
|
|
}
|
|
|
|
|
|
/**
|