Kaynağa Gözat

关闭发送短信

anderx 5 yıl önce
ebeveyn
işleme
cbf5497f1e

+ 2 - 0
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -168,4 +168,6 @@ public class AFTConstants {
 	
 	public static final String DEFAULT_RESULT="签单-自动触发";
 	
+	public static final String PROJECT_STATUS="0=未启动,1=进行中,2=项目交付,3=项目验收,4=项目完成,5=暂停";
+	
 }

+ 2 - 1
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1139,7 +1139,8 @@
 	0 as companyId, d.name as departmentName, a.final_receivables finalReceivables ,a.invoice_amount invoiceAmount ,
 	date_format(a.`final_Receivables_time`, '%Y-%m-%d %H:%i:%s')finalReceivablesTime,a.order_receivables orderReceivables,a.order_arrears orderArrears
 	from t_order_new o left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no 
-	left join (select * from  t_order_outsource where type=0) too on o.order_no=too.order_no where delete_sign != 1 and approval !=3 and outsource=   #{o.outsource,jdbcType=INTEGER}	
+	left join (select * from  t_order_outsource where type=0) too on o.order_no=too.order_no where delete_sign != 1 and approval !=3 
+	 and outsource=   #{o.outsource,jdbcType=INTEGER}	
   	 	<if test="o.processStatus == 3">
 	  	and o.process_status = #{o.processStatus,jdbcType=INTEGER}
 	  	</if>

+ 2 - 4
src/main/java/com/goafanti/common/model/TOrderTask.java

@@ -3,6 +3,7 @@ package com.goafanti.common.model;
 import java.math.BigDecimal;
 import java.util.Date;
 
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.Excel.Excel;
 
@@ -97,8 +98,7 @@ public class TOrderTask {
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_task.project_status
 	 * @mbg.generated  Thu Jun 11 09:59:01 CST 2020
 	 */
-	@Excel(name = "项目状态",readConverterExp = "0=项目待提交,1=项目已提交,2=项目评审,"
-			+ "3=项目立项,4=项目公示,5=项目抽查,6=项目备案,7=项目下证,8=项目验收,9=项目拨款",sort = 13)
+	@Excel(name = "项目状态",readConverterExp = AFTConstants.PROJECT_STATUS,sort = 13)
 	private Integer projectStatus;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_task.accept_time
@@ -175,13 +175,11 @@ public class TOrderTask {
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_task.outsource_name
 	 * @mbg.generated  Thu Jun 11 09:59:01 CST 2020
 	 */
-	@Excel(name = "外包(内部)公司",sort = 15)
 	private String outsourceName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_task.outsource_price
 	 * @mbg.generated  Thu Jun 11 09:59:01 CST 2020
 	 */
-	@Excel(name = "外包(内部)价格",sort = 16)
 	private BigDecimal outsourcePrice;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_task.consultant_id

+ 42 - 43
src/main/java/com/goafanti/common/utils/SendEmailUtil.java

@@ -22,6 +22,14 @@ import com.goafanti.common.bo.EmailBo;
 import com.sun.mail.util.MailSSLSocketFactory;
 
 public class SendEmailUtil {
+	//是否发邮件标识 0否 1是
+	private Integer	emailFlag			= 0;
+	public static final String HOST = "smtp.163.com";
+	public static final String PORT = "465";
+	public static final String AUTH_USER_NICKNAME = "湖南科德信息咨询有限公司";
+	public static final String FROM = "13875952633@163.com";// 发件人的email
+	public static final String PWD = "kede2018";// 发件人密码
+	public static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
 	private static Session session;
 	private static volatile SendEmailUtil singleton;
 	private SendEmailUtil() {}
@@ -36,12 +44,7 @@ public class SendEmailUtil {
       }
       return singleton;
   }
-	public static final String HOST = "smtp.163.com";
-	public static final String PORT = "465";
-	public static final String AUTH_USER_NICKNAME = "湖南科德信息咨询有限公司";
-	public static final String FROM = "13875952633@163.com";// 发件人的email
-	public static final String PWD = "kede2018";// 发件人密码
-	public static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
+
 	
 	
 
@@ -84,24 +87,24 @@ public class SendEmailUtil {
 	 * @throws MessagingException
 	 * @throws UnsupportedEncodingException
 	 */
-	public void send(EmailBo emailBo)
-			throws MessagingException, UnsupportedEncodingException {
-		// Session session = getSession();
-		// Instantiate a message
-		Message msg = new MimeMessage(session);
-		// Set message attributes
-		msg.setFrom(new InternetAddress(MimeUtility.encodeText(AUTH_USER_NICKNAME) +"<" +  FROM + ">"));
+	public void send(EmailBo emailBo) throws MessagingException, UnsupportedEncodingException {
+		if (emailFlag==1) {
+			// Instantiate a message
+			Message msg = new MimeMessage(session);
+			// Set message attributes
+			msg.setFrom(new InternetAddress(MimeUtility.encodeText(AUTH_USER_NICKNAME) +"<" +  FROM + ">"));
 //		msg.setFrom(new InternetAddress(FROM));
-		String[] adds =  emailBo.getAddress().split(",");
-		String[] ees =  emailBo.getAddressee().split(",");
-		for (int i = 0; i < adds.length; i++) {
-			InternetAddress internetAddress = new InternetAddress(adds[i]);
-			msg.setRecipient(Message.RecipientType.TO, internetAddress);
-			msg.setSubject(emailBo.getSubject());
-			msg.setSentDate(new Date());
-			msg.setContent(emailBo.format(ees[i]), "text/html;charset=utf-8");
-			// Send the message
-			Transport.send(msg);
+			String[] adds =  emailBo.getAddress().split(",");
+			String[] ees =  emailBo.getAddressee().split(",");
+			for (int i = 0; i < adds.length; i++) {
+				InternetAddress internetAddress = new InternetAddress(adds[i]);
+				msg.setRecipient(Message.RecipientType.TO, internetAddress);
+				msg.setSubject(emailBo.getSubject());
+				msg.setSentDate(new Date());
+				msg.setContent(emailBo.format(ees[i]), "text/html;charset=utf-8");
+				// Send the message
+				Transport.send(msg);
+			}
 		}
 	}
 	
@@ -111,26 +114,22 @@ public class SendEmailUtil {
 	 * @throws MessagingException
 	 * @throws UnsupportedEncodingException
 	 */
-	public void patentSend(EmailBo emailBo)
-			throws MessagingException, UnsupportedEncodingException {
-		// Session session = getSession();
-		// Instantiate a message
-		Message msg = new MimeMessage(session);
-
-		// Set message attributes
-		msg.setFrom(new InternetAddress(MimeUtility.encodeText(AUTH_USER_NICKNAME) +"<" +  FROM + ">"));
-		emailBo.SetEnd("");
-//		msg.setFrom(new InternetAddress(FROM));
-		String[] adds =  emailBo.getAddress().split(",");
-//		String[] ees =  emailBo.getAddressee().split(",");
-		for (int i = 0; i < adds.length; i++) {
-			InternetAddress internetAddress = new InternetAddress(adds[i]);
-			msg.setRecipient(Message.RecipientType.TO, internetAddress);
-			msg.setSubject(emailBo.getSubject());
-			msg.setSentDate(new Date());
-			msg.setContent(emailBo.getContent(), "text/html;charset=utf-8");
-			// Send the message
-			Transport.send(msg);
+	public void patentSend(EmailBo emailBo) throws MessagingException, UnsupportedEncodingException {
+		if (emailFlag==1) {
+			Message msg = new MimeMessage(session);
+			// Set message attributes
+			msg.setFrom(new InternetAddress(MimeUtility.encodeText(AUTH_USER_NICKNAME) +"<" +  FROM + ">"));
+			emailBo.SetEnd("");
+			String[] adds =  emailBo.getAddress().split(",");
+			for (int i = 0; i < adds.length; i++) {
+				InternetAddress internetAddress = new InternetAddress(adds[i]);
+				msg.setRecipient(Message.RecipientType.TO, internetAddress);
+				msg.setSubject(emailBo.getSubject());
+				msg.setSentDate(new Date());
+				msg.setContent(emailBo.getContent(), "text/html;charset=utf-8");
+				// Send the message
+				Transport.send(msg);
+			}
 		}
 	}
 	

+ 2 - 2
src/main/java/com/goafanti/order/bo/OutArrearsDunListBo.java

@@ -2,6 +2,7 @@ package com.goafanti.order.bo;
 
 import java.math.BigDecimal;
 
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.Excel.Excel;
 
 public class OutArrearsDunListBo {
@@ -18,8 +19,7 @@ public class OutArrearsDunListBo {
    	private String depName;
 	@Excel(name = "订单状态",readConverterExp = "0=待签单,1=签单待审,2=签单审核通过,3=签单审核拒绝,4=已结项,5=已驳回,6=退单中,7=已退单")
    	private Integer orderStatus;
-	@Excel(name = "项目状态",readConverterExp = "0=项目待提交,1=项目已提交,2=项目评审,"
-			+ "3=项目立项,4=项目公示,5=项目抽查,6=项目备案,7=项目下证,8=项目验收,9=项目拨款")
+	@Excel(name = "项目状态",readConverterExp = AFTConstants.PROJECT_STATUS)
 	private Integer projectStatus;
 	private String projectStatusName;
 	@Excel(name = "签单金额(万元)")

+ 1 - 0
src/main/java/com/goafanti/order/controller/AdminOrderReceivablesApiController.java

@@ -212,6 +212,7 @@ public class AdminOrderReceivablesApiController extends CertifyApiController {
      */
     @RequestMapping(value = "/exportReceivables" , method = RequestMethod.GET)
     public Result exportReceivables(HttpServletResponse response,OrderListBo o,Integer pageSize ,Integer pageNo)  {
+    	o.setOrderStatus(2);
     	@SuppressWarnings("unchecked")
     	Pagination<OrderListBo> p=(Pagination<OrderListBo>) fundManageOrderService.financeList(o, pageNo, pageSize).get("pagination");
 		@SuppressWarnings("unchecked")

+ 8 - 14
src/main/resources/props/config_local.properties

@@ -1,10 +1,10 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#本地
+#本地
 jdbc.url=jdbc\:mysql://localhost:3306/spms?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
 jdbc.password=123456
-#测试
+#测试
 #jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
 #jdbc.password=aftdev
@@ -55,25 +55,25 @@ session.validate.timespan=18000000
 
 app.name=AFT
 template.cacheable=false
-#最大领取客户
+#最大领取客户
 user.receive.max=10
 user.private.max=1000
-#客户提醒剩余天数
+#客户提醒剩余天数
 user_remind_days=15
 
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
-#连接开发
+#连接开发
 #static.host=//sb.jishutao.com:3000/1.1.58
 #avatar.host=//sb.jishutao.com
 
-#连测试
+#连测试
 #avatar.host=//static.jishutao.com
 #static.host=//static.jishutao.com/1.1.65
 #avatar.host=//172.16.0.253
-static.host=//172.16.0.253/1.1.65
+#static.host=//172.16.0.253/1.1.65
 avatar.host=//172.16.0.188:3000/
-#static.host=//172.16.0.188:3000/1.1.65
+static.host=//172.16.0.188:3000/1.1.65
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload
@@ -89,10 +89,4 @@ mobileCodeTemplate=SMS_37845022
 mobileRemindCodeTemplate=SMS_137421952
 patentTemplate=SMS_72005286
 
-easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
-easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
-easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
 
-jiguang.appKey=dbcea43366e038073452a04e
-jiguang.masterSecret=59792298288e4f635c737def
-jiguang.pushUrl=https://api.jpush.cn/v3/push