Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #30.
This commit is contained in:
+5
-2
@@ -29,11 +29,14 @@ public class AdjudicationController extends BaseController {
|
|||||||
* @param id 案件id
|
* @param id 案件id
|
||||||
* @param appEmail 申请人邮箱
|
* @param appEmail 申请人邮箱
|
||||||
* @param resEmail 被申请人邮箱
|
* @param resEmail 被申请人邮箱
|
||||||
|
* @param apptrackingNum 申请人快递单号
|
||||||
|
* @param restrackingNum 被申请人快递单号
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/delivery")
|
@PostMapping("/delivery")
|
||||||
public AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail){
|
public AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail
|
||||||
return adjudicationService.sendDocumentByEmail(id,appEmail,resEmail);
|
,String apptrackingNum,String restrackingNum){
|
||||||
|
return adjudicationService.sendDocumentByEmail(id,appEmail,resEmail,apptrackingNum,restrackingNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
|||||||
public interface IAdjudicationService {
|
public interface IAdjudicationService {
|
||||||
AjaxResult createDocument(CaseApplication caseApplication);
|
AjaxResult createDocument(CaseApplication caseApplication);
|
||||||
|
|
||||||
AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail);
|
AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
|
||||||
|
|
||||||
AjaxResult getLogisticsInfo(String trackingNum,Integer phoneLastFour);
|
AjaxResult getLogisticsInfo(String trackingNum,Integer phoneLastFour);
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-7
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.mail.MailSendException;
|
import org.springframework.mail.MailSendException;
|
||||||
import org.springframework.mail.javamail.JavaMailSender;
|
import org.springframework.mail.javamail.JavaMailSender;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
@@ -125,10 +126,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
datas.put("year", now.getYear());
|
datas.put("year", now.getYear());
|
||||||
datas.put("months", now.getMonthValue());
|
datas.put("months", now.getMonthValue());
|
||||||
datas.put("day", now.getDayOfMonth());
|
datas.put("day", now.getDayOfMonth());
|
||||||
//String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||||
String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
//String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||||
//String saveFolderPath = "/data/arbitrate-document/formal/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
String saveFolderPath = "/data/arbitrate-document/formal/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||||
String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
//String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
// 创建日期目录
|
// 创建日期目录
|
||||||
@@ -167,7 +168,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult sendDocumentByEmail(Long id, String appEmail, String resEmail) {
|
@Transactional
|
||||||
|
public AjaxResult sendDocumentByEmail(Long id, String appEmail, String resEmail ,String apptrackingNum,String restrackingNum) {
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
caseApplication.setId(id);
|
caseApplication.setId(id);
|
||||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
@@ -187,19 +189,40 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (fileList.size()<1){
|
||||||
|
return AjaxResult.error("未查询到裁决书");
|
||||||
|
}
|
||||||
|
File file = fileList.get(0);
|
||||||
//电子邮件送达
|
//电子邮件送达
|
||||||
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
|
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
|
||||||
if (appEmail != null) {
|
if (appEmail != null) {
|
||||||
emailOutUtil.sendMessageCarryFiles(appEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", fileList
|
emailOutUtil.sendMessageCarryFile(appEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
||||||
, "hjbjava@163.com", javaMailSender);
|
, "hjbjava@163.com", javaMailSender);
|
||||||
}
|
}
|
||||||
if (resEmail != null) {
|
if (resEmail != null) {
|
||||||
emailOutUtil.sendMessageCarryFiles(resEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", fileList
|
emailOutUtil.sendMessageCarryFile(resEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
||||||
, "hjbjava@163.com", javaMailSender);
|
, "hjbjava@163.com", javaMailSender);
|
||||||
}
|
}
|
||||||
//修改案件状态
|
//修改案件状态
|
||||||
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
|
caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
|
||||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||||
|
//保存邮箱信息和快递单号到关联人表
|
||||||
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
|
caseAffiliate.setCaseAppliId(id);
|
||||||
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||||
|
if (caseAffiliates!=null&&caseAffiliates.size()>0){
|
||||||
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||||
|
if (affiliate.getIdentityType() == 1){ //申请人
|
||||||
|
affiliate.setSendEmail(appEmail);
|
||||||
|
affiliate.setTrackNum(apptrackingNum);
|
||||||
|
caseAffiliateMapper.updataCaseAffiliate(affiliate);
|
||||||
|
}else {
|
||||||
|
affiliate.setSendEmail(resEmail);
|
||||||
|
affiliate.setTrackNum(restrackingNum);
|
||||||
|
caseAffiliateMapper.updataCaseAffiliate(affiliate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return AjaxResult.success("仲裁文书送达成功");
|
return AjaxResult.success("仲裁文书送达成功");
|
||||||
} catch (MailSendException e) {
|
} catch (MailSendException e) {
|
||||||
return AjaxResult.error("发送失败,请检查文件路径");
|
return AjaxResult.error("发送失败,请检查文件路径");
|
||||||
|
|||||||
@@ -60,7 +60,10 @@
|
|||||||
name_agent = #{nameAgent},
|
name_agent = #{nameAgent},
|
||||||
identity_num_agent = #{identityNumAgent},
|
identity_num_agent = #{identityNumAgent},
|
||||||
contact_telphone_agent = #{contactTelphoneAgent},
|
contact_telphone_agent = #{contactTelphoneAgent},
|
||||||
contact_address_agent = #{contactAddressAgent}
|
contact_address_agent = #{contactAddressAgent},
|
||||||
|
send_email = #{sendEmail},
|
||||||
|
track_num = #{trackNum}
|
||||||
|
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
c.hear_date ,c.arbitrat_claims ,
|
c.hear_date ,c.arbitrat_claims ,
|
||||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||||
c.update_by ,c.update_time
|
c.update_by ,c.update_time , c.arbitrator_name
|
||||||
from case_application c
|
from case_application c
|
||||||
<where>
|
<where>
|
||||||
<if test="caseStatus != null">
|
<if test="caseStatus != null">
|
||||||
|
|||||||
Reference in New Issue
Block a user