Browse Source

邮件增加去空

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
1411a30e02

+ 2 - 8
src/main/java/com/goafanti/common/mapper/TOrderBillNewMapper.xml

@@ -546,7 +546,7 @@
   	and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
   	</if>
   	<if test="b.departmentId != null and b.departmentId != &quot;&quot;">
-	and oa.department_id = #{b.departmentId,jdbcType=VARCHAR}
+	and  o.order_dep = #{b.departmentId,jdbcType=VARCHAR}
 	</if>
   	<if test="b.creater != null and b.creater != &quot;&quot;">
   	and b.creater = #{b.creater,jdbcType=VARCHAR}
@@ -559,9 +559,6 @@
   	<bind name="n" value="'%' + b.payeeName + '%'" />
   	and a.nickname like #{n,jdbcType=VARCHAR}
   	</if>
-  	<if test="b.departmentId != null and b.departmentId != &quot;&quot; ">
-  	and oa.department_id = #{b.departmentId,jdbcType=VARCHAR}
-  	</if>
   	<if test="b.startTime != null and b.startTime != &quot;&quot; and b.endTime != null and b.endTime != &quot;&quot;">
   	<bind name="a" value="b.startTime + ' 00:00:00'" />
   	<bind name="e" value="b.endTime + ' 23:59:59'" />
@@ -594,7 +591,7 @@
   	and b.creater = #{b.creater,jdbcType=VARCHAR}
   	</if>
   	<if test="b.departmentId != null and b.departmentId != &quot;&quot;">
-	and oa.department_id = #{b.departmentId,jdbcType=VARCHAR}
+	and  o.order_dep = #{b.departmentId,jdbcType=VARCHAR}
 	</if>
   	<if test="b.payerName != null and b.payerName != &quot;&quot;">
   	<bind name="nn" value="'%' + b.payerName + '%'" />
@@ -604,9 +601,6 @@
   	<bind name="n" value="'%' + b.payeeName + '%'" />
   	and a.nickname like #{n,jdbcType=VARCHAR}
   	</if>
-  	<if test="b.departmentId != null and b.departmentId != &quot;&quot; ">
-  	and oa.department_id = #{b.departmentId,jdbcType=VARCHAR}
-  	</if>
   	<if test="b.startTime != null and b.startTime != &quot;&quot; and b.endTime != null and b.endTime != &quot;&quot;">
   	<bind name="a" value="b.startTime + ' 00:00:00'" />
   	<bind name="e" value="b.endTime + ' 23:59:59'" />

+ 3 - 0
src/main/java/com/goafanti/common/model/TOrderBillNew.java

@@ -453,6 +453,9 @@ public class TOrderBillNew {
 	}
 
 	public String getPayeeName() {
+		if(payeeName==null) {
+			return "湖南科德信息咨询有限公司";
+		}
 		return payeeName;
 	}
 

+ 2 - 2
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -115,14 +115,14 @@ public class PatentTask {
 						 BigDecimal money=countMoney(y,p.getType());
 						ted.setTime(cst.getTime());
 						ted.add(Calendar.YEAR, y);
-						EmailBo emailBo = new EmailBo("专利提醒",p.getEmail(), p.getApplicant(), "科德集团", a.getName(),p.getName(), p.getPatentNo(), money.toString(), DateFormatUtils.format(ted, "yyyy-MM-dd"));
+						EmailBo emailBo = new EmailBo("专利提醒",p.getEmail().trim(), p.getApplicant(), "科德集团", a.getName(),p.getName(), p.getPatentNo(), money.toString(), DateFormatUtils.format(ted, "yyyy-MM-dd"));
 						SendEmailUtil.getInstance().patentSend(emailBo);
 						 p.setPatentAmount(money);
 						 p.setStatus(1);//提醒中
 						 p.setYears(y);
 						 patentNewService.updatePatenNew(p);
 						 PatentNewLog pl=new PatentNewLog();
-						 String str=StrToString("专利提醒",p.getEmail(), p.getApplicant(), a.getName(),p.getName(), p.getPatentNo(),
+						 String str=StrToString("专利提醒",p.getEmail().trim(), p.getApplicant(), a.getName(),p.getName(), p.getPatentNo(),
 								 money.toString(), DateFormatUtils.format(ted, "yyyy-MM-dd"));
 						 pl.setContent(str);
 						 pl.setCreateTime(new Date());