Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SendMailRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.ISendMailRecordService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sendMailRecord")
|
||||||
|
public class SendMailRecordController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ISendMailRecordService sendMailRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询发送邮件记录列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SendMailRecord sendMailRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class SendMailRecord extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
/** 案件申请id */
|
||||||
|
private Long caseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件名称
|
||||||
|
*/
|
||||||
|
private String mailName;
|
||||||
|
/**
|
||||||
|
* 邮件内容
|
||||||
|
*/
|
||||||
|
private String mailContent;
|
||||||
|
/**
|
||||||
|
* 邮件地址
|
||||||
|
*/
|
||||||
|
private String mailAddress;
|
||||||
|
/**
|
||||||
|
* 发送时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date sendTime;
|
||||||
|
|
||||||
|
/** 案件编号 */
|
||||||
|
private String caseNum;
|
||||||
|
|
||||||
|
public String getCaseNum() {
|
||||||
|
return caseNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaseNum(String caseNum) {
|
||||||
|
this.caseNum = caseNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCaseId() {
|
||||||
|
return caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaseId(Long caseId) {
|
||||||
|
this.caseId = caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailName() {
|
||||||
|
return mailName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailName(String mailName) {
|
||||||
|
this.mailName = mailName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailContent() {
|
||||||
|
return mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailContent(String mailContent) {
|
||||||
|
this.mailContent = mailContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailAddress() {
|
||||||
|
return mailAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailAddress(String mailAddress) {
|
||||||
|
this.mailAddress = mailAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getSendTime() {
|
||||||
|
return sendTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendTime(Date sendTime) {
|
||||||
|
this.sendTime = sendTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SendMailRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface SendMailRecordMapper {
|
||||||
|
int saveSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
|
|
||||||
|
List<SendMailRecord> selectSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SendMailRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ISendMailRecordService {
|
||||||
|
|
||||||
|
|
||||||
|
List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord);
|
||||||
|
}
|
||||||
+24
@@ -34,6 +34,8 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AdjudicationServiceImpl implements IAdjudicationService {
|
public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||||
@@ -56,6 +58,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SendMailRecordMapper sendMailRecordMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult createDocument(CaseApplication caseApplication) {
|
public AjaxResult createDocument(CaseApplication caseApplication) {
|
||||||
@@ -336,10 +341,28 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
if (appEmail != null) {
|
if (appEmail != null) {
|
||||||
emailOutUtil.sendMessageCarryFile(appEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
emailOutUtil.sendMessageCarryFile(appEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
||||||
, "hjbjava@163.com", javaMailSender);
|
, "hjbjava@163.com", javaMailSender);
|
||||||
|
|
||||||
|
SendMailRecord sendMailRecord = new SendMailRecord();
|
||||||
|
sendMailRecord.setCaseId(id);
|
||||||
|
sendMailRecord.setMailAddress(appEmail);
|
||||||
|
sendMailRecord.setMailContent("您的裁决书已送达,详情请查阅附件");
|
||||||
|
sendMailRecord.setMailName("案件裁决书");
|
||||||
|
sendMailRecord.setSendTime(new Date());
|
||||||
|
sendMailRecord.setCreateBy(getUsername());
|
||||||
|
sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
||||||
}
|
}
|
||||||
if (resEmail != null) {
|
if (resEmail != null) {
|
||||||
emailOutUtil.sendMessageCarryFile(resEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
emailOutUtil.sendMessageCarryFile(resEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
||||||
, "hjbjava@163.com", javaMailSender);
|
, "hjbjava@163.com", javaMailSender);
|
||||||
|
|
||||||
|
SendMailRecord sendMailRecord = new SendMailRecord();
|
||||||
|
sendMailRecord.setCaseId(id);
|
||||||
|
sendMailRecord.setMailAddress(resEmail);
|
||||||
|
sendMailRecord.setMailContent("您的裁决书已送达,详情请查阅附件");
|
||||||
|
sendMailRecord.setMailName("案件裁决书");
|
||||||
|
sendMailRecord.setSendTime(new Date());
|
||||||
|
sendMailRecord.setCreateBy(getUsername());
|
||||||
|
sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
||||||
}
|
}
|
||||||
//修改案件状态
|
//修改案件状态
|
||||||
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
|
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
|
||||||
@@ -361,6 +384,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("仲裁文书送达成功");
|
return AjaxResult.success("仲裁文书送达成功");
|
||||||
} catch (MailSendException e) {
|
} catch (MailSendException e) {
|
||||||
return AjaxResult.error("发送失败,请检查文件路径");
|
return AjaxResult.error("发送失败,请检查文件路径");
|
||||||
|
|||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SendMailRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.SendMailRecordMapper;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.ISendMailRecordService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||||
|
@Autowired
|
||||||
|
private SendMailRecordMapper sendMailRecordMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord) {
|
||||||
|
List<SendMailRecord> records = sendMailRecordMapper.selectSendMailRecord(sendMailRecord);
|
||||||
|
return records;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SendMailRecordMapper">
|
||||||
|
|
||||||
|
<resultMap type="SendMailRecord" id="SendMailRecordResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="mailName" column="mail_name" />
|
||||||
|
<result property="mailContent" column="mail_content" />
|
||||||
|
<result property="mailAddress" column="mail_address" />
|
||||||
|
<result property="sendTime" column="send_time" />
|
||||||
|
<result property="caseId" column="case_id" />
|
||||||
|
<result property="caseNum" column="case_num" />
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectSendMailRecord" parameterType="SendMailRecord" resultMap="SendMailRecordResult">
|
||||||
|
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
|
||||||
|
s.update_by ,s.update_time ,c.case_num
|
||||||
|
from send_mail_record s left join case_application c
|
||||||
|
on s.case_id = c.id
|
||||||
|
<where>
|
||||||
|
<if test="caseNum != null and caseNum != ''">
|
||||||
|
AND c.case_num = #{caseNum}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="saveSendMailRecord">
|
||||||
|
insert into send_mail_record(
|
||||||
|
<if test="mailName != null and mailName != ''">mail_name,</if>
|
||||||
|
<if test="mailContent != null and mailContent != ''">mail_content,</if>
|
||||||
|
<if test="mailAddress != null and mailAddress != ''">mail_address,</if>
|
||||||
|
<if test="sendTime != null ">send_time,</if>
|
||||||
|
<if test="caseId != null ">case_id,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="mailName != null and mailName != ''">#{mailName},</if>
|
||||||
|
<if test="mailContent != null and mailContent != ''">#{mailContent},</if>
|
||||||
|
<if test="mailAddress != null and mailAddress != ''">#{mailAddress},</if>
|
||||||
|
<if test="sendTime != null ">#{sendTime},</if>
|
||||||
|
<if test="caseId != null ">#{caseId},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user