优化送达功能 #74
+1
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
|||||||
+1
@@ -7,6 +7,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseLogRecordVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseLogRecordVO;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface MsSignSealService {
|
public interface MsSignSealService {
|
||||||
|
|||||||
+17
-9
@@ -59,6 +59,7 @@ import tk.mybatis.mapper.entity.Example;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -522,7 +523,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult msCaseFile(List<Long> ids){
|
public AjaxResult msCaseFile(List<Long> ids){
|
||||||
try {
|
try {
|
||||||
for (Long id : ids) {
|
for (Long id : ids) {
|
||||||
@@ -615,9 +616,16 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
String appEmail = "";
|
String appEmail = "";
|
||||||
String resEmail = "";
|
String resEmail = "";
|
||||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
|
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
|
||||||
appEmail = caseAffiliate.getAgentEmail();
|
|
||||||
resEmail = caseAffiliate.getRespondentEmail();
|
|
||||||
|
|
||||||
|
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
|
||||||
|
if(organizeFlag!=null){
|
||||||
|
if(organizeFlag.intValue()==1){
|
||||||
|
appEmail = caseAffiliate.getAgentEmail();
|
||||||
|
}else {
|
||||||
|
appEmail = caseAffiliate.getApplicationEmail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resEmail = caseAffiliate.getRespondentEmail();
|
||||||
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
|
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
|
||||||
|
|
||||||
// SendMailRecord sendMailRecord = new SendMailRecord();
|
// SendMailRecord sendMailRecord = new SendMailRecord();
|
||||||
@@ -652,20 +660,20 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
// }
|
// }
|
||||||
// sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
|
// sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
|
||||||
if(!appEmailFlag&&!resEmailFlag){
|
if(!appEmailFlag&&!resEmailFlag){
|
||||||
throw new ServiceException("裁决书发送失败");
|
throw new ServiceException("调解书发送失败");
|
||||||
}
|
}
|
||||||
if(!appEmailFlag){
|
if(!appEmailFlag){
|
||||||
throw new ServiceException("申请人裁决书发送失败");
|
throw new ServiceException("申请人调解书发送失败");
|
||||||
}
|
}
|
||||||
if(!resEmailFlag){
|
if(!resEmailFlag){
|
||||||
throw new ServiceException("被申请人裁决书发送失败");
|
throw new ServiceException("被申请人调解书发送失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档");
|
CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error(e.getMessage());
|
throw new ServiceException("调解书发送失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("归档成功");
|
return AjaxResult.success("归档成功");
|
||||||
@@ -926,7 +934,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
|
|
||||||
if (file != null && file.exists()) {
|
if (file != null && file.exists()) {
|
||||||
try {
|
try {
|
||||||
Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的调解书在附件中请查阅", "签署后的调解书", fileList, null);
|
||||||
|
|
||||||
if (aBoolean) {
|
if (aBoolean) {
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user