anderx 4 år sedan
förälder
incheckning
69afe6fd6f

+ 246 - 240
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -6,7 +6,7 @@ import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.DateUtils;
 
 public class EmailBo {
-	
+
 	//收件地址
 	//收件人
 	//部门
@@ -39,14 +39,14 @@ public class EmailBo {
 	 */
 	private String content;
 	private String end = "详情请登录科德业务管理系统查看,谢谢!";
-	
-	
-	
-	
+
+
+
+
 	public EmailBo() {
 	}
-	
-	
+
+
 	/**
 	 * 专利提醒模版接口
 	 * @param subject
@@ -59,7 +59,7 @@ public class EmailBo {
 	 * @param amount
 	 * @param date
 	 */
-	
+
 	public  EmailBo(String subject, String address, String addressee,
 			String deptname, String sender,String patentName,String patentNo,String amount,Date date) {
 		this.subject = subject;
@@ -67,15 +67,15 @@ public class EmailBo {
 		this.addressee = addressee;
 		this.deptname = deptname;
 		this.sender = sender;
-		long now = new Date().getTime(); 
-		long end = date.getTime(); 
+		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)); 
+		Integer days = (int)((end - now) / (1000 * 60 * 60 *24));
 		this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, endStr,days);
 	}
-	
+
 	/**
-	 *  
+	 *
 	 * @param subject	标题
 	 * @param address	收件地址
 	 * @param deptname		发起人部门
@@ -88,7 +88,7 @@ public class EmailBo {
 	 * @param userName		用户名称
 	 * @param type		类型 0订单提醒 1催款 2付款催款
 	 * @param approval   null 非特批
-	 * @return 
+	 * @return
 	 */
 	public  EmailBo(String subject, String address, String deptname, String sender,
 			String content , String orderNo,String contractNo,String date ,String dunStatusName,String adminName,String userName,Integer type,Integer approval) {
@@ -102,7 +102,7 @@ public class EmailBo {
 		if(type==1)this.content=setDunFormat( addressee, sender, deptname,orderNo,contractNo, date , dunStatusName,adminName,userName,0);
 		if(type==2)this.content=setDunFormat( addressee, sender, deptname,orderNo,contractNo, date , dunStatusName,adminName,userName,1);
 	}
-	
+
 	/**
 	 * 通用模版
 	 * @param subject
@@ -120,7 +120,7 @@ public class EmailBo {
 		if (end!=null) this.end=end;
 		this.content = setGeneralFormat();
 	}
-	
+
 	public  EmailBo(String subject, String address, String deptname, String sender,
 			 String orderNo,String adminName) {
 		this.subject = subject;
@@ -129,9 +129,15 @@ public class EmailBo {
 		this.deptname = deptname;
 		this.sender = sender;
 		this.content = setGeneralFormat();
-		
+
 	}
 
+	/**
+	 *
+	 * @param subject 标题
+	 * @param address 邮件地址
+	 * @param content 内容
+	 */
 	public EmailBo(String subject, String address, String content) {
 		this.subject = subject;
 		this.address = address;
@@ -202,51 +208,51 @@ public class EmailBo {
 		String str1 = "",str2= "",str3= "";
 		if (i==0) str1="催收时间";str2="催收科目";str3="催收状态";
 		if (i==1) str1="付款时间";str2="付款科目";str3="催收状态";
-		
-		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
-				"    		<tbody><tr>\r\n" + 
-				"		        <td>\r\n" + 
-				"		             <table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"40\"></table>\r\n" + 
-				"		        </td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"			\r\n" + 
-				"    		<tr>\r\n" + 
-				"        		<td>\r\n" + 
-				"            		\r\n" + 
-				"            		<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1C5299\" height=\"48\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
-				"              			<tbody><tr>\r\n" + 
-				"                			<td height=\"48\" border=\"0\" align=\"center\" valign=\"middle\" style=\"padding-left:20px; color: white; font-size: 20px;\">\r\n" + 
-				"                				"+subject+"\r\n" + 
-				"        					</td>\r\n" + 
-				"              			</tr>\r\n" + 
-				"		            </tbody></table>\r\n" + 
-				"		            \r\n" + 
-				"        		</td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"		    \r\n" + 
-				"   			<tr>\r\n" + 
-				"        		<td>\r\n" + 
-				"		            \r\n" + 
-				"		        <table width=\"800\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\" style=\" border:1px solid #edecec; border-top:none; padding:0 20px;font-size:14px;color:#333333;\">\r\n" + 
-				"	               		<tbody><tr>\r\n" + 
-				"                <td width=\"760\" height=\"56\" border=\"0\" align=\"left\" colspan=\"2\" style=\" font-size:16px;vertical-align:bottom;\">亲爱的"+adminName+":</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"760\" height=\"30\" border=\"0\" align=\"left\" colspan=\"2\" style=\"text-indent: 2em\">您好!</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"                      <tr>\r\n" + 
-				"                <td width=\"40\" height=\"32\" border=\"0\" align=\"left\" valign=\"middle\" style=\" width:40px; text-align:left;vertical-align:middle; line-height:32px; float:left;\">&nbsp;</td>\r\n" + 
-				"                <td width=\"720\" height=\"32\" border=\"0\" align=\"left\" style=\" width:720px; text-align:left;vertical-align:middle;line-height:32px;\"><span style=\"font-weight: 900\">您收到一条由["+deptname+"] 的 ["+sender+"] 发起的 ["+subject+"] !</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px; font-size: 12px;\"><span style=\"color: red;\">如已缴费,请您忽略此短信!</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              \r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px; font-weight: 900; padding-top: 10px;\">催收信息:</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">客户名称:"+userName+"</td>\r\n" + 
+
+		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" +
+				"    		<tbody><tr>\r\n" +
+				"		        <td>\r\n" +
+				"		             <table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"40\"></table>\r\n" +
+				"		        </td>\r\n" +
+				"		    </tr>\r\n" +
+				"			\r\n" +
+				"    		<tr>\r\n" +
+				"        		<td>\r\n" +
+				"            		\r\n" +
+				"            		<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1C5299\" height=\"48\" style=\"font-family:'Microsoft YaHei';\">\r\n" +
+				"              			<tbody><tr>\r\n" +
+				"                			<td height=\"48\" border=\"0\" align=\"center\" valign=\"middle\" style=\"padding-left:20px; color: white; font-size: 20px;\">\r\n" +
+				"                				"+subject+"\r\n" +
+				"        					</td>\r\n" +
+				"              			</tr>\r\n" +
+				"		            </tbody></table>\r\n" +
+				"		            \r\n" +
+				"        		</td>\r\n" +
+				"		    </tr>\r\n" +
+				"		    \r\n" +
+				"   			<tr>\r\n" +
+				"        		<td>\r\n" +
+				"		            \r\n" +
+				"		        <table width=\"800\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\" style=\" border:1px solid #edecec; border-top:none; padding:0 20px;font-size:14px;color:#333333;\">\r\n" +
+				"	               		<tbody><tr>\r\n" +
+				"                <td width=\"760\" height=\"56\" border=\"0\" align=\"left\" colspan=\"2\" style=\" font-size:16px;vertical-align:bottom;\">亲爱的"+adminName+":</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"760\" height=\"30\" border=\"0\" align=\"left\" colspan=\"2\" style=\"text-indent: 2em\">您好!</td>\r\n" +
+				"              </tr>\r\n" +
+				"                      <tr>\r\n" +
+				"                <td width=\"40\" height=\"32\" border=\"0\" align=\"left\" valign=\"middle\" style=\" width:40px; text-align:left;vertical-align:middle; line-height:32px; float:left;\">&nbsp;</td>\r\n" +
+				"                <td width=\"720\" height=\"32\" border=\"0\" align=\"left\" style=\" width:720px; text-align:left;vertical-align:middle;line-height:32px;\"><span style=\"font-weight: 900\">您收到一条由["+deptname+"] 的 ["+sender+"] 发起的 ["+subject+"] !</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px; font-size: 12px;\"><span style=\"color: red;\">如已缴费,请您忽略此短信!</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              \r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px; font-weight: 900; padding-top: 10px;\">催收信息:</td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">客户名称:"+userName+"</td>\r\n" +
 				"              </tr>\r\n" +
 				"               <tr>\r\n" +
 				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">订单编号:"+orderNo+"</td>\r\n" +
@@ -254,101 +260,101 @@ public class EmailBo {
 				"               <tr>\r\n" +
 				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">合同编号:"+contractNo+"</td>\r\n" +
 				"              </tr>\r\n" +
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">"+str1+":"+date+"</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">"+str2+":"+dunStatusName+"</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">"+str3+":已启动</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">&nbsp;</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"font-weight: 900\">温馨提示:</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span>详情请登录<a href=\"http://bm.jishutao.com/admin/login\">科德业务管理系统</a>查看,谢谢!</span></td>\r\n" + 
-				"              </tr>\r\n" +  
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              \r\n" + 
-				"		               	<tr>\r\n" + 
-				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding-bottom:16px; border-bottom:1px dashed #e5e5e5;font-family:'Microsoft YaHei';\"><a href=\"http://www.kedexinxi.com/\">湖南科德信息咨询集团有限公司</a></td>\r\n" + 
-				"		              	</tr>\r\n" + 
-				"		               	<tr>\r\n" + 
-				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding:8px 0 28px;color:#999999; font-size:12px;font-family:'Microsoft YaHei';\">此为系统邮件请勿回复</td>\r\n" + 
-				"		              	</tr>\r\n" + 
-				"		            </tbody></table>\r\n" + 
-				"		            \r\n" + 
-				"        		</td>\r\n" + 
-				"		    </tr>\r\n" + 
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">"+str1+":"+date+"</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">"+str2+":"+dunStatusName+"</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">"+str3+":已启动</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">&nbsp;</td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"font-weight: 900\">温馨提示:</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span>详情请登录<a href=\"http://bm.jishutao.com/admin/login\">科德业务管理系统</a>查看,谢谢!</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" +
+				"              </tr>\r\n" +
+				"              \r\n" +
+				"		               	<tr>\r\n" +
+				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding-bottom:16px; border-bottom:1px dashed #e5e5e5;font-family:'Microsoft YaHei';\"><a href=\"http://www.kedexinxi.com/\">湖南科德信息咨询集团有限公司</a></td>\r\n" +
+				"		              	</tr>\r\n" +
+				"		               	<tr>\r\n" +
+				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding:8px 0 28px;color:#999999; font-size:12px;font-family:'Microsoft YaHei';\">此为系统邮件请勿回复</td>\r\n" +
+				"		              	</tr>\r\n" +
+				"		            </tbody></table>\r\n" +
+				"		            \r\n" +
+				"        		</td>\r\n" +
+				"		    </tr>\r\n" +
 				"		</tbody></table>";
 		return str;
 	}
-	
+
 	public String setGeneralFormat() {
-		
-		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
+
+		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" +
 				"    	<tbody><tr>\r\n" +
-				"		        <td>\r\n" + 
-				"		             <table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"40\"></table>\r\n" + 
-				"		        </td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"			\r\n" + 
-				"    		<tr>\r\n" + 
-				"        		<td>\r\n" + 
-				"            		\r\n" + 
-				"            		<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1C5299\" height=\"48\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
-				"              			<tbody><tr>\r\n" + 
-				"                			<td height=\"48\" border=\"0\" align=\"center\" valign=\"middle\" style=\"padding-left:20px; color: white; font-size: 20px;\">\r\n" + 
-				"                			"+this.subject + 
-				"        					</td>\r\n" + 
-				"              			</tr>\r\n" + 
-				"		            </tbody></table>\r\n" + 
-				"		            \r\n" + 
-				"        		</td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"		    \r\n" + 
-				"   		<tr>\r\n" + 
-				"        		<td>\r\n" + 
-				"		            \r\n" + 
-				"		        	<table width=\"800\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\" style=\" border:1px solid #edecec; border-top:none; padding:0 20px;font-size:14px;color:#333333;\">\r\n" + 
-				"	               		<tbody><tr>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"760\" height=\"30\" border=\"0\" align=\"left\" colspan=\"2\" style=\"text-indent: 2em\">您好!</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"                      <tr>\r\n" + 
-				"                <td width=\"40\" height=\"32\" border=\"0\" align=\"left\" valign=\"middle\" style=\" width:40px; text-align:left;vertical-align:middle; line-height:32px; float:left;\">&nbsp;</td>\r\n" + 
-				"                <td width=\"720\" height=\"32\" border=\"0\" align=\"left\" style=\" width:720px; text-align:left;vertical-align:middle;line-height:32px;\"><span style=\"font-weight: 900\">您收到一条由["+this.deptname+"] 的 ["+this.sender+"] 发起的 ["+this.subject+"] 通知</span></td>\r\n" + 
-				"              </tr>\r\n" +
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span>"+end+"</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              \r\n" + 
-				"		               	<tr>\r\n" + 
-				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding-bottom:16px; border-bottom:1px dashed #e5e5e5;font-family:'Microsoft YaHei';\"><a href=\"http://www.kedexinxi.com/\">湖南科德信息咨询集团有限公司</a></td>\r\n" + 
-				"		              	</tr>\r\n" + 
-				"		               	<tr>\r\n" + 
-				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding:8px 0 28px;color:#999999; font-size:12px;font-family:'Microsoft YaHei';\">此为系统邮件请勿回复</td>\r\n" + 
-				"		              	</tr>\r\n" + 
-				"		            </tbody></table>\r\n" + 
-				"		            \r\n" + 
-				"        		</td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"    </tbody>\r\n" + 
+				"		        <td>\r\n" +
+				"		             <table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"40\"></table>\r\n" +
+				"		        </td>\r\n" +
+				"		    </tr>\r\n" +
+				"			\r\n" +
+				"    		<tr>\r\n" +
+				"        		<td>\r\n" +
+				"            		\r\n" +
+				"            		<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1C5299\" height=\"48\" style=\"font-family:'Microsoft YaHei';\">\r\n" +
+				"              			<tbody><tr>\r\n" +
+				"                			<td height=\"48\" border=\"0\" align=\"center\" valign=\"middle\" style=\"padding-left:20px; color: white; font-size: 20px;\">\r\n" +
+				"                			"+this.subject +
+				"        					</td>\r\n" +
+				"              			</tr>\r\n" +
+				"		            </tbody></table>\r\n" +
+				"		            \r\n" +
+				"        		</td>\r\n" +
+				"		    </tr>\r\n" +
+				"		    \r\n" +
+				"   		<tr>\r\n" +
+				"        		<td>\r\n" +
+				"		            \r\n" +
+				"		        	<table width=\"800\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\" style=\" border:1px solid #edecec; border-top:none; padding:0 20px;font-size:14px;color:#333333;\">\r\n" +
+				"	               		<tbody><tr>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"760\" height=\"30\" border=\"0\" align=\"left\" colspan=\"2\" style=\"text-indent: 2em\">您好!</td>\r\n" +
+				"              </tr>\r\n" +
+				"                      <tr>\r\n" +
+				"                <td width=\"40\" height=\"32\" border=\"0\" align=\"left\" valign=\"middle\" style=\" width:40px; text-align:left;vertical-align:middle; line-height:32px; float:left;\">&nbsp;</td>\r\n" +
+				"                <td width=\"720\" height=\"32\" border=\"0\" align=\"left\" style=\" width:720px; text-align:left;vertical-align:middle;line-height:32px;\"><span style=\"font-weight: 900\">您收到一条由["+this.deptname+"] 的 ["+this.sender+"] 发起的 ["+this.subject+"] 通知</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span>"+end+"</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" +
+				"              </tr>\r\n" +
+				"              \r\n" +
+				"		               	<tr>\r\n" +
+				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding-bottom:16px; border-bottom:1px dashed #e5e5e5;font-family:'Microsoft YaHei';\"><a href=\"http://www.kedexinxi.com/\">湖南科德信息咨询集团有限公司</a></td>\r\n" +
+				"		              	</tr>\r\n" +
+				"		               	<tr>\r\n" +
+				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding:8px 0 28px;color:#999999; font-size:12px;font-family:'Microsoft YaHei';\">此为系统邮件请勿回复</td>\r\n" +
+				"		              	</tr>\r\n" +
+				"		            </tbody></table>\r\n" +
+				"		            \r\n" +
+				"        		</td>\r\n" +
+				"		    </tr>\r\n" +
+				"    </tbody>\r\n" +
 				"  </table>";
 		return str;
 	}
 
-	
+
 
 	public String getSubject() {
 		return subject;
@@ -388,101 +394,101 @@ public class EmailBo {
 	public void setContent(String content) {
 		this.content = content;
 	}
-	
+
 	public String format(String name){
         return  "<div>" + this.content + "</div>";
     }
-	
-	
-	
-	
+
+
+
+
 	public String setPatentFormat(String userName,String adminName,String patentName,String patentNo,String amount,String date,Integer days ){
-		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
-				"    		<tbody><tr>\r\n" + 
-				"		        <td>\r\n" + 
-				"		             <table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"40\"></table>\r\n" + 
-				"		        </td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"			\r\n" + 
-				"    		<tr>\r\n" + 
-				"        		<td>\r\n" + 
-				"            		\r\n" + 
-				"            		<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1C5299\" height=\"48\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
-				"              			<tbody><tr>\r\n" + 
-				"                			<td height=\"48\" border=\"0\" align=\"center\" valign=\"middle\" style=\"padding-left:20px; color: white; font-size: 20px;\">\r\n" + 
-				"                				专利提醒\r\n" + 
-				"        					</td>\r\n" + 
-				"              			</tr>\r\n" + 
-				"		            </tbody></table>\r\n" + 
-				"		            \r\n" + 
-				"        		</td>\r\n" + 
-				"		    </tr>\r\n" + 
-				"		    \r\n" + 
-				"   			<tr>\r\n" + 
-				"        		<td>\r\n" + 
-				"		            \r\n" + 
-				"		        <table width=\"800\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\" style=\" border:1px solid #edecec; border-top:none; padding:0 20px;font-size:14px;color:#333333;\">\r\n" + 
-				"	               		<tbody><tr>\r\n" + 
-				"                <td width=\"760\" height=\"56\" border=\"0\" align=\"left\" colspan=\"2\" style=\" font-size:16px;vertical-align:bottom;\">尊敬的客户 [" + userName + "]:</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"760\" height=\"30\" border=\"0\" align=\"left\" colspan=\"2\" style=\"text-indent: 2em\">您好!</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"                      <tr>\r\n" + 
-				"                <td width=\"40\" height=\"32\" border=\"0\" align=\"left\" valign=\"middle\" style=\" width:40px; text-align:left;vertical-align:middle; line-height:32px; float:left;\">&nbsp;</td>\r\n" + 
-				"                <td width=\"720\" height=\"32\" border=\"0\" align=\"left\" style=\" width:720px; text-align:left;vertical-align:middle;line-height:32px;\"><span style=\"font-weight: 900\">科德集团</span>【" + adminName + "】向您发起了专利缴费提醒!<span style=\"color: red\">如已缴费,请您忽略此邮件!</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"font-weight: 900\">专利信息</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              \r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">专利名称:" + patentName + "</td>\r\n" + 
-				"              </tr>\r\n" +
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">专利编号:" + patentNo + "</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">金额:" + amount + " <span style=\"color: red\">(本缴费金额仅供参考,实际缴费金额,请登录国知局官方网址<a href=\"http://cpquery.cnipa.gov.cn/\">cpquery.sipo.gov.cn</a>查询)</span></td>\r\n" + 
-				"              </tr>\r\n" +
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">剩余天数:" + days + "</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">到期时间:" + date + "</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"               <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">&nbsp;</td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"font-weight: 900\">温馨提示</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"color: red;\">依据【专利管理办法】规定:如未及时续费,您的专利将会失效!</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"color: black; font-weight: 900;\">请您尽快核实专利到期时间及缴费信息!</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span>如果您对此有更多疑问,请联系<span style=\"font-weight: 900\">科德集团</span>【" + adminName + "】,以获得方便快捷的服务</span></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              <tr>\r\n" + 
-				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" + 
-				"              </tr>\r\n" + 
-				"              \r\n" + 
-				"		               	<tr>\r\n" + 
-				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding-bottom:16px; border-bottom:1px dashed #e5e5e5;font-family:'Microsoft YaHei';\"><a href=\"http://www.kedexinxi.com/\">湖南科德信息咨询集团有限公司</a></td>\r\n" + 
-				"		              	</tr>\r\n" + 
-				"		               	<tr>\r\n" + 
-				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding:8px 0 28px;color:#999999; font-size:12px;font-family:'Microsoft YaHei';\">此为系统邮件请勿回复</td>\r\n" + 
-				"		              	</tr>\r\n" + 
-				"		            </tbody></table>\r\n" + 
-				"		            \r\n" + 
-				"        		</td>\r\n" + 
-				"		    </tr>\r\n" + 
+		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" +
+				"    		<tbody><tr>\r\n" +
+				"		        <td>\r\n" +
+				"		             <table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"40\"></table>\r\n" +
+				"		        </td>\r\n" +
+				"		    </tr>\r\n" +
+				"			\r\n" +
+				"    		<tr>\r\n" +
+				"        		<td>\r\n" +
+				"            		\r\n" +
+				"            		<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#1C5299\" height=\"48\" style=\"font-family:'Microsoft YaHei';\">\r\n" +
+				"              			<tbody><tr>\r\n" +
+				"                			<td height=\"48\" border=\"0\" align=\"center\" valign=\"middle\" style=\"padding-left:20px; color: white; font-size: 20px;\">\r\n" +
+				"                				专利提醒\r\n" +
+				"        					</td>\r\n" +
+				"              			</tr>\r\n" +
+				"		            </tbody></table>\r\n" +
+				"		            \r\n" +
+				"        		</td>\r\n" +
+				"		    </tr>\r\n" +
+				"		    \r\n" +
+				"   			<tr>\r\n" +
+				"        		<td>\r\n" +
+				"		            \r\n" +
+				"		        <table width=\"800\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\" style=\" border:1px solid #edecec; border-top:none; padding:0 20px;font-size:14px;color:#333333;\">\r\n" +
+				"	               		<tbody><tr>\r\n" +
+				"                <td width=\"760\" height=\"56\" border=\"0\" align=\"left\" colspan=\"2\" style=\" font-size:16px;vertical-align:bottom;\">尊敬的客户 [" + userName + "]:</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"760\" height=\"30\" border=\"0\" align=\"left\" colspan=\"2\" style=\"text-indent: 2em\">您好!</td>\r\n" +
+				"              </tr>\r\n" +
+				"                      <tr>\r\n" +
+				"                <td width=\"40\" height=\"32\" border=\"0\" align=\"left\" valign=\"middle\" style=\" width:40px; text-align:left;vertical-align:middle; line-height:32px; float:left;\">&nbsp;</td>\r\n" +
+				"                <td width=\"720\" height=\"32\" border=\"0\" align=\"left\" style=\" width:720px; text-align:left;vertical-align:middle;line-height:32px;\"><span style=\"font-weight: 900\">科德集团</span>【" + adminName + "】向您发起了专利缴费提醒!<span style=\"color: red\">如已缴费,请您忽略此邮件!</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"font-weight: 900\">专利信息</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              \r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">专利名称:" + patentName + "</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">专利编号:" + patentNo + "</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">金额:" + amount + " <span style=\"color: red\">(本缴费金额仅供参考,实际缴费金额,请登录国知局官方网址<a href=\"http://cpquery.cnipa.gov.cn/\">cpquery.sipo.gov.cn</a>查询)</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">剩余天数:" + days + "</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">到期时间:" + date + "</td>\r\n" +
+				"              </tr>\r\n" +
+				"               <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">&nbsp;</td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"font-weight: 900\">温馨提示</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"color: red;\">依据【专利管理办法】规定:如未及时续费,您的专利将会失效!</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span style=\"color: black; font-weight: 900;\">请您尽快核实专利到期时间及缴费信息!</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"><span>如果您对此有更多疑问,请联系<span style=\"font-weight: 900\">科德集团</span>【" + adminName + "】,以获得方便快捷的服务</span></td>\r\n" +
+				"              </tr>\r\n" +
+				"              <tr>\r\n" +
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\"></td>\r\n" +
+				"              </tr>\r\n" +
+				"              \r\n" +
+				"		               	<tr>\r\n" +
+				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding-bottom:16px; border-bottom:1px dashed #e5e5e5;font-family:'Microsoft YaHei';\"><a href=\"http://www.kedexinxi.com/\">湖南科德信息咨询集团有限公司</a></td>\r\n" +
+				"		              	</tr>\r\n" +
+				"		               	<tr>\r\n" +
+				"		                	<td width=\"720\" height=\"14\" colspan=\"2\" style=\"padding:8px 0 28px;color:#999999; font-size:12px;font-family:'Microsoft YaHei';\">此为系统邮件请勿回复</td>\r\n" +
+				"		              	</tr>\r\n" +
+				"		            </tbody></table>\r\n" +
+				"		            \r\n" +
+				"        		</td>\r\n" +
+				"		    </tr>\r\n" +
 				"		</tbody></table>";
         return  str;
     }
@@ -490,5 +496,5 @@ public class EmailBo {
 	public void SetEnd(String end) {
 		this.end = end;
 	}
-	
+
 }

+ 20 - 17
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -41,13 +41,13 @@ public class ReleaseUserTask {
 	private AsyncUtils	asyncUtils;
 	@Value(value = "${dev.name}")
 	private String devName=null;
-	
+
 
 	int pointsDataLimit = 50;
 
 	/**
 	 * 每天凌晨一点
-	 * 
+	 *
 	 * @throws InterruptedException
 	 */
 //	@Scheduled(cron = "0 55 15  * * ?")
@@ -75,11 +75,11 @@ public class ReleaseUserTask {
 			if (StringUtils.isNotBlank(u.getId())) {
 				userTmpList = customerService.selectReleaseUserDays(u.getId());
 				for (userDaysBo ub : userTmpList) {
-					String str=null;  
+					String str=null;
 					if (ub.getChannel() == 0) {
 						str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时%s!",
 								"私有", ub.getName(),ub.getType()==0?"跟进":"签单");
-						
+
 					}else {
 						str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时签单!", "渠道", ub.getName());
 					}
@@ -95,7 +95,7 @@ public class ReleaseUserTask {
 				userChannelList = customerService.selectChannelNotFollow(u.getId());
 			}
 			for (userDaysBo ub : userChannelList) {
-				String str=null;  
+				String str=null;
 				if (ub.getChannel() == 1) {
 					str = String.format("您的%s客户【%s】已经十五天未跟进,请及时跟进或者限时签单!", "渠道", ub.getName());
 				}
@@ -200,12 +200,12 @@ public class ReleaseUserTask {
 		if (lockList.size() > 0)
 			customerService.updateReleaseLock(releaseTime);
 	}
-	
+
 	public void addNotice(Notice n ) {
 		n.setType(NoticeTypes.getType(n.getNoticeType()));
 		noticeMapper.insertSelective(n);
 	}
-	
+
 	public void addNoticeBatch(List<Notice> ln) {
 		List<Notice> newList=new ArrayList<Notice>();
 		if (ln != null && ln.size() > 0) {
@@ -213,7 +213,10 @@ public class ReleaseUserTask {
 				ln.get(i).setType(NoticeTypes.getType(ln.get(i).getNoticeType()));
 				newList.add(ln.get(i));
 				if (50 == newList.size() || i == ln.size() - 1) {
-					if (newList.size() > 0) noticeMapper.insertBatch(newList);
+					if (newList.size() > 0) {
+						//发送站内信
+						noticeMapper.insertBatch(newList);
+					}
 					newList.clear();
 					try {
 						Thread.sleep(2000);
@@ -231,7 +234,7 @@ public class ReleaseUserTask {
 		if (!userTmpList.isEmpty()) {
 			for (LockingReleaseBo u : userTmpList) {
 				nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
-						NoticeStatus.CUSTOMER_LOSE30.getCode(), 
+						NoticeStatus.CUSTOMER_LOSE30.getCode(),
 						String.format("您的%s客户【%s】已经30天未跟进,已经自动释放!", "私有", u.getUserName()),
 						u.getUid()));
 			}
@@ -239,30 +242,30 @@ public class ReleaseUserTask {
 		if (!userTmpList2.isEmpty()) {
 			for (LockingReleaseBo u : userTmpList2) {
 				nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
-						NoticeStatus.CUSTOMER_LOSE270.getCode(), 
+						NoticeStatus.CUSTOMER_LOSE270.getCode(),
 						String.format("您的%s客户【%s】已经270天未签单,已经自动释放!", "私有", u.getUserName()),
 						u.getUid()));
 			}
 		}
 		if(!nl.isEmpty())addNoticeBatch(nl);
 	}
-	
-	
-	
-	
+
+
+
+
 
 	private void addChannelNotice(List<userDaysBo> hsList, List<userDaysBo> sfList) {
 		List<Notice> nl=new ArrayList<Notice>();
 		for (userDaysBo hs : hsList) {
 			nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, hs.getAid(),
-					NoticeStatus.CUSTOMER_CHENNEL_RECOVERY.getCode(), 
+					NoticeStatus.CUSTOMER_CHENNEL_RECOVERY.getCode(),
 					String.format("您的%s客户【%s】已经90天未跟进,已经自动回收!", "渠道", hs.getName()),
 					hs.getUid()));
 		}
-		
+
 		for (userDaysBo sf : sfList) {
 			nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, sf.getAid(),
-					NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode(), 
+					NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode(),
 					String.format("您的%s客户【%s】已经90天未跟进,已经自动释放!", "渠道", sf.getName()),
 					sf.getUid()));
 		}

+ 12 - 13
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -26,22 +26,22 @@ public class AsyncUtils {
 	private NoticeMapper noticeMapper;
 	@Autowired
 	private AdminMapper adminMapper;
-	
-	
 
-	
+
+
+
 	public void patentSend(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
 		SendEmailUtil.getInstance().patentSend(bo);
 	}
-	
+
 	public void sendList(List<EmailBo> list) throws MessagingException, UnsupportedEncodingException {
 		for (EmailBo emailBo : list) {
 					SendEmailUtil.getInstance().patentSend(emailBo);
 		}
-		
+
 	}
-	
-	
+
+
 	public void send(EmailBo bo){
 		try {
 			SendEmailUtil.getInstance().send(bo);
@@ -49,7 +49,7 @@ public class AsyncUtils {
 			e.printStackTrace();
 		}
 	}
-	
+
 	public void addNotice(Notice n ) {
 		n.setType(NoticeTypes.getType(n.getNoticeType()));
 		noticeMapper.insertSelective(n);
@@ -62,8 +62,8 @@ public class AsyncUtils {
 		noticeMapper.insertSelective(n);
 		send(bo);
 	}
-	
-	
+
+
 	public void addNoticeBatch(List<Notice> ln) {
 		List<Notice> newList=new ArrayList<Notice>();
 		if (ln != null && ln.size() > 0) {
@@ -81,8 +81,8 @@ public class AsyncUtils {
 				}
 			}
 		}
-			
-		
+
+
 	}
 
 
@@ -90,5 +90,4 @@ public class AsyncUtils {
 		noticeMapper.batchUpdateUnreaded(dl);
     }
 
-
 }

+ 4 - 3
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -155,7 +155,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public int createServiceOrder(String uid, Integer orderType) {
 		BigDecimal initial = new BigDecimal(0);
 		TOrderNew t=new TOrderNew();
-		String orderNo=idGenerator.generateId().toString();
+        Date date = new Date();
+        String orderNo=idGenerator.generateId().toString();
 		t.setOrderNo(orderNo);
 		t.setOrderType(orderType);
 		t.setOrderStatus(OrderNewState.DQD.getCode());
@@ -170,8 +171,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		t.setSalesmanId(TokenManager.getAdminId());
 		t.setCreater(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 		t.setOrderDep(adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getDepartmentId());
-		t.setCreateTime(new Date());
-		t.setUpdateTime(new Date());
+		t.setCreateTime(date);
+		t.setUpdateTime(date);
 		t.setBuyerId(uid);
 		User u=userMapper.selectByPrimaryKey(uid);
 		if(u.getShareType()!=null&&u.getShareType()==2){