소스 검색

1.特审提交申请邮件通知功能

liuhy 2 년 전
부모
커밋
e53ff4498d

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
db/电信北区稽核.pdma.json


+ 36 - 28
tnc-sms/src/main/java/org/jeecg/modules/smscheck/controller/SpecialExaminationContrller.java

@@ -28,6 +28,7 @@ import org.jeecg.modules.smscheck.configs.CheckTypeCode;
 import org.jeecg.modules.smscheck.entity.*;
 import org.jeecg.modules.smscheck.entity.excel.SpecialExaminationExport;
 import org.jeecg.modules.smscheck.enums.SpecialExaminationReopen;
+import org.jeecg.modules.smscheck.handle.impl.EmailSendMsgHandle;
 import org.jeecg.modules.smscheck.service.*;
 import org.jeecg.modules.smscheck.vo.SpecialExaminationCustomerVo;
 import org.jeecg.modules.smscheck.vo.SpecialExaminationVo;
@@ -67,7 +68,9 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
      */
     @Autowired
     private SmcSpecialCheckLogService smcSpecialCheckLogService;
-    /**特审复开稽核历史表*/
+    /**
+     * 特审复开稽核历史表
+     */
     @Autowired
     SmcSpecialCheckLogHistoryService smcSpecialCheckLogHistoryService;
     /**
@@ -195,11 +198,17 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
         //客户信息状态
         customerInfo.setCheckState(CheckStateCode.CHECK_STSTE_2);
         //获取关停标签
-        //String shutdownLabel = ShutdownLabelByCode.msg(specialExamination.getShutdownLabel().toString());
-        //customerInfo.setShutdownLabel(shutdownLabel);
         customerInfo.setShutdownLabel(specialExamination.getShutdownLabel().toString());
         customerInfo.setShutdownLabelDate(specialExamination.getShutdownTime());
-        infoService.updateById(customerInfo);
+        boolean updateById = infoService.updateById(customerInfo);
+        if (updateById) {
+            // 发送邮件
+            EmailSendMsgHandle emailSendMsgHandle = new EmailSendMsgHandle();
+            emailSendMsgHandle.SendMsg("liutt3.bj@chinatelecom.cn",
+                    customerInfo.getCreateBy() + "提交复开申请",
+                    "工号:" + customerInfo.getStaffNo() + " 工单创建人:" + customerInfo.getCreateBy() + " 提交了复开号码为" + customerInfo.getCustomerNo() + "的复开申请,请及时进行稽核。"
+            );
+        }
         return Result.OK("已成功提交申请");
     }
 
@@ -447,14 +456,14 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
                 List<String> deptName2 = iSmsCheckTaskService.getDeptNameByWorkNo("1", sysUser.getWorkNo());
                 List<String> deptName3 = iSmsCheckTaskService.getDeptNameByWorkNo("2", sysUser.getWorkNo());
                 List<String> deptName4 = iSmsCheckTaskService.getDeptNameByWorkNo("3", sysUser.getWorkNo());
-                if (deptName2 != null){
-                    info.setStaffDeptLevel2Name( Joiner.on(",").join(deptName2));
+                if (deptName2 != null) {
+                    info.setStaffDeptLevel2Name(Joiner.on(",").join(deptName2));
                 }
-                if (deptName3 != null){
-                    info.setStaffDeptLevel3Name( Joiner.on(",").join(deptName3));
+                if (deptName3 != null) {
+                    info.setStaffDeptLevel3Name(Joiner.on(",").join(deptName3));
                 }
-                if (deptName4 != null){
-                    info.setStaffDeptLevel4Name( Joiner.on(",").join(deptName4));
+                if (deptName4 != null) {
+                    info.setStaffDeptLevel4Name(Joiner.on(",").join(deptName4));
                 }
                 infoVo.setResult("1");
                 customerCount++;
@@ -502,7 +511,7 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
             queryWrapperData.eq(SmcSpecialCheckLog::getDataId, smcSpecialCheckLog.getDataId());
             List<SmcSpecialCheckLog> lotList = smcSpecialCheckLogService.list(queryWrapperData);
             SmcSpecialCheckLogHistory smcSpecialCheckLogHistory = new SmcSpecialCheckLogHistory();
-            BeanUtil.copyProperties(smcSpecialCheckLog,smcSpecialCheckLogHistory);
+            BeanUtil.copyProperties(smcSpecialCheckLog, smcSpecialCheckLogHistory);
             smcSpecialCheckLogHistory.setId(null);
             smcSpecialCheckLogHistoryService.save(smcSpecialCheckLogHistory);
             if (lotList.size() == 0) {
@@ -656,50 +665,49 @@ public class SpecialExaminationContrller extends JeecgController<SmsCheckCustome
             }
 
             List<SmcSpecialCheckLogHistory> historyList = smcSpecialCheckLogHistoryService.list(new LambdaQueryWrapper<SmcSpecialCheckLogHistory>().eq(SmcSpecialCheckLogHistory::getInfoId, specialExamination.getInfoId()));
-            if (historyList != null){
-                for (SmcSpecialCheckLogHistory smcSpecialCheckLogHistory : historyList){
-                    if (smcSpecialCheckLog.getNameFindComplianceState() != null && !smcSpecialCheckLog.getNameFindComplianceState().equals(smcSpecialCheckLogHistory.getNameFindComplianceState())){
+            if (historyList != null) {
+                for (SmcSpecialCheckLogHistory smcSpecialCheckLogHistory : historyList) {
+                    if (smcSpecialCheckLog.getNameFindComplianceState() != null && !smcSpecialCheckLog.getNameFindComplianceState().equals(smcSpecialCheckLogHistory.getNameFindComplianceState())) {
                         specialExaminationExport.setNameFindComplianceStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getSpecialReviewFormState() != null && !smcSpecialCheckLog.getSpecialReviewFormState().equals(smcSpecialCheckLogHistory.getSpecialReviewFormState())){
+                    if (smcSpecialCheckLog.getSpecialReviewFormState() != null && !smcSpecialCheckLog.getSpecialReviewFormState().equals(smcSpecialCheckLogHistory.getSpecialReviewFormState())) {
                         specialExaminationExport.setSpecialReviewFormStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getIdCardState() != null && !smcSpecialCheckLog.getIdCardState().equals(smcSpecialCheckLogHistory.getIdCardState())){
+                    if (smcSpecialCheckLog.getIdCardState() != null && !smcSpecialCheckLog.getIdCardState().equals(smcSpecialCheckLogHistory.getIdCardState())) {
                         specialExaminationExport.setIdCardStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getHandCertificateState() != null && !smcSpecialCheckLog.getHandCertificateState().equals(smcSpecialCheckLogHistory.getHandCertificateState())){
+                    if (smcSpecialCheckLog.getHandCertificateState() != null && !smcSpecialCheckLog.getHandCertificateState().equals(smcSpecialCheckLogHistory.getHandCertificateState())) {
                         specialExaminationExport.setHandCertificateStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getNumberCardState() != null &&  !smcSpecialCheckLog.getNumberCardState().equals(smcSpecialCheckLogHistory.getNumberCardState())){
+                    if (smcSpecialCheckLog.getNumberCardState() != null && !smcSpecialCheckLog.getNumberCardState().equals(smcSpecialCheckLogHistory.getNumberCardState())) {
                         specialExaminationExport.setNumberCardStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getHandNumberCardState() != null && !smcSpecialCheckLog.getHandNumberCardState().equals(smcSpecialCheckLogHistory.getHandNumberCardState())){
+                    if (smcSpecialCheckLog.getHandNumberCardState() != null && !smcSpecialCheckLog.getHandNumberCardState().equals(smcSpecialCheckLogHistory.getHandNumberCardState())) {
                         specialExaminationExport.setHandNumberCardStateIs(1);
 
-                    if (smcSpecialCheckLog.getLetterCommitmentState() != null && !smcSpecialCheckLog.getLetterCommitmentState().equals(smcSpecialCheckLogHistory.getLetterCommitmentState())){
-                        specialExaminationExport.setLetterCommitmentStateIs(1);
-                    }
+                        if (smcSpecialCheckLog.getLetterCommitmentState() != null && !smcSpecialCheckLog.getLetterCommitmentState().equals(smcSpecialCheckLogHistory.getLetterCommitmentState())) {
+                            specialExaminationExport.setLetterCommitmentStateIs(1);
+                        }
                     }
-                    if (smcSpecialCheckLog.getBusinessLicenseState() != null && !smcSpecialCheckLog.getBusinessLicenseState().equals(smcSpecialCheckLogHistory.getBusinessLicenseState())){
+                    if (smcSpecialCheckLog.getBusinessLicenseState() != null && !smcSpecialCheckLog.getBusinessLicenseState().equals(smcSpecialCheckLogHistory.getBusinessLicenseState())) {
                         specialExaminationExport.setBusinessLicenseStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getLetterIntroductionState() != null && !smcSpecialCheckLog.getLetterIntroductionState().equals(smcSpecialCheckLogHistory.getLetterIntroductionState())){
+                    if (smcSpecialCheckLog.getLetterIntroductionState() != null && !smcSpecialCheckLog.getLetterIntroductionState().equals(smcSpecialCheckLogHistory.getLetterIntroductionState())) {
                         specialExaminationExport.setLetterIntroductionStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getUserCertificateState() != null && !smcSpecialCheckLog.getUserCertificateState().equals(smcSpecialCheckLogHistory.getUserCertificateState())){
+                    if (smcSpecialCheckLog.getUserCertificateState() != null && !smcSpecialCheckLog.getUserCertificateState().equals(smcSpecialCheckLogHistory.getUserCertificateState())) {
                         specialExaminationExport.setUserCertificateStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getFraudPreventionState() != null && !smcSpecialCheckLog.getFraudPreventionState().equals(smcSpecialCheckLogHistory.getFraudPreventionState())){
+                    if (smcSpecialCheckLog.getFraudPreventionState() != null && !smcSpecialCheckLog.getFraudPreventionState().equals(smcSpecialCheckLogHistory.getFraudPreventionState())) {
                         specialExaminationExport.setFraudPreventionStateIs(1);
                     }
-                    if (smcSpecialCheckLog.getConsumptionVoucherState() != null && !smcSpecialCheckLog.getConsumptionVoucherState().equals(smcSpecialCheckLogHistory.getConsumptionVoucherState())){
+                    if (smcSpecialCheckLog.getConsumptionVoucherState() != null && !smcSpecialCheckLog.getConsumptionVoucherState().equals(smcSpecialCheckLogHistory.getConsumptionVoucherState())) {
                         specialExaminationExport.setConsumptionVoucherStateIs(1);
                     }
                 }
             }
 
 
-
             pageList.add(specialExaminationExport);
         }
 

+ 16 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/handle/ISendMsgHandle.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.smscheck.handle;
+
+/**
+ * @Description: 发送信息接口
+ * @author: jeecg-boot
+ */
+public interface ISendMsgHandle {
+
+    /**
+     * 发送信息
+     * @param es_receiver 发送人
+     * @param es_title 标题
+     * @param es_content 内容
+     */
+	void SendMsg(String es_receiver, String es_title, String es_content);
+}

+ 48 - 0
tnc-sms/src/main/java/org/jeecg/modules/smscheck/handle/impl/EmailSendMsgHandle.java

@@ -0,0 +1,48 @@
+package org.jeecg.modules.smscheck.handle.impl;
+
+import org.jeecg.common.util.SpringContextUtils;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.config.StaticConfig;
+import org.jeecg.modules.smscheck.handle.ISendMsgHandle;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.mail.javamail.MimeMessageHelper;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.MimeMessage;
+
+/**
+ * @Description: 邮箱发送信息
+ * @author: jeecg-boot
+ */
+public class EmailSendMsgHandle implements ISendMsgHandle {
+    static String emailFrom;
+
+    public static void setEmailFrom(String emailFrom) {
+        EmailSendMsgHandle.emailFrom = emailFrom;
+    }
+
+    @Override
+    public void SendMsg(String es_receiver, String es_title, String es_content) {
+        JavaMailSender mailSender = (JavaMailSender) SpringContextUtils.getBean("mailSender");
+        MimeMessage message = mailSender.createMimeMessage();
+        MimeMessageHelper helper = null;
+        //update-begin-author:taoyan date:20200811 for:配置类数据获取
+        if(oConvertUtils.isEmpty(emailFrom)){
+            StaticConfig staticConfig = SpringContextUtils.getBean(StaticConfig.class);
+            setEmailFrom(staticConfig.getEmailFrom());
+        }
+        //update-end-author:taoyan date:20200811 for:配置类数据获取
+        try {
+            helper = new MimeMessageHelper(message, true);
+            // 设置发送方邮箱地址
+            helper.setFrom(emailFrom);
+            helper.setTo(es_receiver);
+            helper.setSubject(es_title);
+            helper.setText(es_content, true);
+            mailSender.send(message);
+        } catch (MessagingException e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 6 - 6
tnc-system/src/main/resources/application-dev.yml → tnc-system/src/main/resources/application-dx.yml

@@ -25,9 +25,9 @@ spring:
       max-file-size: 50MB
       max-request-size: 50MB
   mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
+    host: smtp.qq.com
+    username: 1556146884@qq.com
+    password: zaidmiapzmnziejh
     properties:
       mail:
         smtp:
@@ -154,8 +154,8 @@ spring:
     database: 0
     host: 127.0.0.1
     port: 6379
-    password: 123
-    #password:
+    Auth: 123
+    #password: 123
     lettuce:
       pool:
         max-active: 8   #最大连接数据库连接数,设 -1 为没有限制
@@ -176,7 +176,7 @@ mybatis-plus:
       table-underline: true
   configuration:
     # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     # 返回类型为Map,显示null对应的字段
     call-setters-on-nulls: true
 #jeecg专用配置

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.