This commit is contained in:
hejinbo
2023-11-01 18:05:01 +08:00
8 changed files with 173 additions and 91 deletions
@@ -211,13 +211,16 @@ public class SysDeptServiceImpl implements ISysDeptService
@Override @Override
public int insertDept(SysDept dept) public int insertDept(SysDept dept)
{ {
SysDept info = deptMapper.selectDeptById(dept.getParentId()); Long parentId = dept.getParentId();
// 如果父节点不为正常状态,则不允许新增子节点 if(parentId!=null){
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) SysDept info = deptMapper.selectDeptById(dept.getParentId());
{ // 如果父节点不为正常状态,则不允许新增子节点
throw new ServiceException("部门停用,不允许新增"); if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
{
throw new ServiceException("部门停用,不允许新增");
}
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
} }
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
return deptMapper.insertDept(dept); return deptMapper.insertDept(dept);
} }
@@ -29,6 +29,18 @@ public class CaseApplication extends BaseEntity {
private Date registerDate; private Date registerDate;
/** 仲裁方式 */ /** 仲裁方式 */
private Integer arbitratMethod; private Integer arbitratMethod;
/**
* 是否导入,0手动录入,1导入,默认0
*/
private Integer importFlag;
public Integer getImportFlag() {
return importFlag;
}
public void setImportFlag(Integer importFlag) {
this.importFlag = importFlag;
}
public String getSelectCaseStatus() { public String getSelectCaseStatus() {
return selectCaseStatus; return selectCaseStatus;
@@ -91,6 +103,13 @@ public class CaseApplication extends BaseEntity {
/** 申请人主张违约金 */ /** 申请人主张违约金 */
@Excel(name = "申请人主张违约金") @Excel(name = "申请人主张违约金")
private BigDecimal claimLiquidDamag; private BigDecimal claimLiquidDamag;
/** 申请人请求仲裁庭裁决 */
@Excel(name = "申请人请求仲裁庭裁决",width = 36)
private String requestRule;
/** 是否财产保全申请 */
@Excel(name = "是否财产保全申请",width = 26,combo= {"是","否"},readConverterExp = "0=否,1=是")
private Integer properPreser;
/** 申请人仲裁请求及事实和理由 */ /** 申请人仲裁请求及事实和理由 */
@Excel(name = "申请人仲裁请求及事实和理由",width = 36) @Excel(name = "申请人仲裁请求及事实和理由",width = 36)
private String arbitratClaims; private String arbitratClaims;
@@ -132,13 +151,10 @@ public class CaseApplication extends BaseEntity {
/** 是否需要开庭审理 */ /** 是否需要开庭审理 */
private Integer openCourtHear; private Integer openCourtHear;
/** 申请人请求仲裁庭裁决 */
@Excel(name = "申请人请求仲裁庭裁决",width = 36)
private String requestRule;
/** 是否仲裁反请求 */ /** 是否仲裁反请求 */
private Integer adjudicaCounter; private Integer adjudicaCounter;
/** 是否财产保全申请 */
private Integer properPreser;
/** 被申请人是否缺席 */ /** 被申请人是否缺席 */
private Integer isAbsence; private Integer isAbsence;
/** 是否管辖异议申请 */ /** 是否管辖异议申请 */
@@ -582,14 +598,19 @@ public class CaseApplication extends BaseEntity {
/** 姓名 */ /** 姓名 */
@Excel(name = "申请人主体信息-申请人(机构)",width = 26) @Excel(name = "申请人主体信息-申请人(机构)",width = 26)
private String name; private String name;
/** 身份证号 */
@Excel(name = "申请人主体信息-代码",width = 26)
private String identityNum;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人",width = 26)
private String compLegalPerson;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人职位",width = 26)
private String compLegalperPost;
/** /**
* 申请人主体信息-申请人(机构)id * 申请人主体信息-申请人(机构)id
*/ */
private String nameId; private String nameId;
/** 身份证号 */
@Excel(name = "申请人主体信息-代码",width = 26)
private String identityNum;
/** 联系电话 */ /** 联系电话 */
@Excel(name = "申请人主体信息-联系电话",width = 26) @Excel(name = "申请人主体信息-联系电话",width = 26)
@@ -603,12 +624,7 @@ public class CaseApplication extends BaseEntity {
/** 单位地址 */ /** 单位地址 */
@Excel(name = "申请人主体信息-单位地址",width = 26) @Excel(name = "申请人主体信息-单位地址",width = 26)
private String workAddress; private String workAddress;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人",width = 26)
private String compLegalPerson;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人职位",width = 26)
private String compLegalperPost;
/** 申请人住所 */ /** 申请人住所 */
@Excel(name = "申请人主体信息-住所",width = 26) @Excel(name = "申请人主体信息-住所",width = 26)
private String residenAffiliAppli; private String residenAffiliAppli;
@@ -664,7 +680,7 @@ public class CaseApplication extends BaseEntity {
@Excel(name = "被申请人主体信息-身份证号",width = 26) @Excel(name = "被申请人主体信息-身份证号",width = 26)
private String debtorIdentityNum; private String debtorIdentityNum;
/** 被申请人主体信息-性别 */ /** 被申请人主体信息-性别 */
@Excel(name = "被申请人主体信息-性别",width = 26) @Excel(name = "被申请人主体信息-性别",width = 26,combo= {"男","女"},readConverterExp = "0=男,女=1")
private String responSex; private String responSex;
public Date getResponBirth() { public Date getResponBirth() {
@@ -44,6 +44,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.*; import java.io.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.StandardCopyOption; import java.nio.file.StandardCopyOption;
@@ -905,8 +906,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
public int editCaseApplication(CaseApplication caseApplication) { public int editCaseApplication(CaseApplication caseApplication) {
//根据仲裁费用计费规则计算应缴费用 //根据仲裁费用计费规则计算应缴费用
//暂时设置计费比率为0.01 //暂时设置计费比率为0.01
BigDecimal feeRate = new BigDecimal(0.01); BigDecimal feeRate = new BigDecimal("0.01");
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP); BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
caseApplication.setFeePayable(feePayable); caseApplication.setFeePayable(feePayable);
caseApplication.setUpdateBy(getUsername()); caseApplication.setUpdateBy(getUsername());
@@ -969,6 +970,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
return rows; return rows;
} }
/** /**
* 组装申请代理人信息 * 组装申请代理人信息
* @param caseAffiliate * @param caseAffiliate
@@ -1176,34 +1178,21 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
CaseApplication caseApplication = caseApplicationList.get(i); CaseApplication caseApplication = caseApplicationList.get(i);
// 导入校验 // 导入校验
importValid(caseApplication); importValid(caseApplication,deptMap);
// 校验成功的数据 // 校验成功的数据
if(StrUtil.isEmpty(caseApplication.getErrorMsg())) { if(StrUtil.isEmpty(caseApplication.getErrorMsg())) {
//根据仲裁费用计费规则计算应缴费用 //根据仲裁费用计费规则计算应缴费用
//暂时设置计费比率为0.01 //暂时设置计费比率为0.01
BigDecimal feeRate = new BigDecimal(0.01); BigDecimal feeRate = new BigDecimal("0.01");
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
caseApplication.setFeePayable(feePayable); caseApplication.setFeePayable(feePayable);
//赋值CaseApplication的案件关联人信息 //赋值CaseApplication的案件关联人信息
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>(); List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
// 组装案件关联人信息 // 组装案件关联人信息
assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap,roleId); assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap,roleId);
caseApplication.setImportFlag(1);
// int caseApplicationCount = selectCaseApplicationCount(caseApplication); caseApplicationListinsert.add(caseApplication);
// if(caseApplicationCount>0){
// failureNum++;
// failureMsg.append("<br/>" + failureNum + "、立案编号 " + caseApplication.getCaseNum() + " 已存在");
// }else {
// caseApplicationListinsert.add(caseApplication);
// }
if(StrUtil.isEmpty(caseApplication.getErrorMsg())) {
caseApplicationListinsert.add(caseApplication);
}else {
// 拼接错误信息
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
}
}else { }else {
// 拼接错误信息 // 拼接错误信息
failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString()); failureMsg.append("<br/>").append("第").append(i+2).append("行:").append(caseApplication.getErrorMsg().toString());
@@ -1283,7 +1272,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
* @param caseApplication * @param caseApplication
* @param * @param
*/ */
private void importValid(CaseApplication caseApplication) { private void importValid(CaseApplication caseApplication,Map<String, Long> deptMap) {
StringBuilder failureMsg=new StringBuilder(); StringBuilder failureMsg=new StringBuilder();
caseApplication.setErrorMsg(failureMsg); caseApplication.setErrorMsg(failureMsg);
// 校验基本字段 // 校验基本字段
@@ -1291,7 +1280,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 校验申请人信息 // 校验申请人信息
validApplicationColumn(caseApplication,failureMsg); validApplicationColumn(caseApplication,failureMsg);
// 校验申请人代理信息 // 校验申请人代理信息
validApplicationAgentColumn(caseApplication,failureMsg); validApplicationAgentColumn(caseApplication,failureMsg,deptMap);
// 校验被申请人信息 // 校验被申请人信息
validDebtorApplicationColumn(caseApplication,failureMsg); validDebtorApplicationColumn(caseApplication,failureMsg);
// 校验被申请人代理信息 // 校验被申请人代理信息
@@ -1382,7 +1371,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
* @param caseApplication * @param caseApplication
* @param failureMsg * @param failureMsg
*/ */
private void validApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg) { private void validApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg,Map<String, Long> deptMap) {
if( StrUtil.isEmpty(caseApplication.getNameAgent())){ if( StrUtil.isEmpty(caseApplication.getNameAgent())){
failureMsg.append("【申请人主体信息-代理人姓名】字段不能为空;"); failureMsg.append("【申请人主体信息-代理人姓名】字段不能为空;");
}else if(caseApplication.getNameAgent().length()>50){ }else if(caseApplication.getNameAgent().length()>50){
@@ -1393,6 +1382,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}else if(caseApplication.getIdentityNumAgent().length()>50){ }else if(caseApplication.getIdentityNumAgent().length()>50){
failureMsg.append("【申请人主体信息-代理人身份证号】字段超出指定长度,最大长度为50;"); failureMsg.append("【申请人主体信息-代理人身份证号】字段超出指定长度,最大长度为50;");
} }
validAgentInfo(caseApplication,failureMsg,deptMap);
String contactTelphoneAgent = caseApplication.getContactTelphoneAgent(); String contactTelphoneAgent = caseApplication.getContactTelphoneAgent();
if( StrUtil.isEmpty(contactTelphoneAgent)){ if( StrUtil.isEmpty(contactTelphoneAgent)){
failureMsg.append("【申请人主体信息-代理人联系电话】字段不能为空;"); failureMsg.append("【申请人主体信息-代理人联系电话】字段不能为空;");
@@ -1405,7 +1395,34 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
failureMsg.append("【申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;"); failureMsg.append("【申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
} }
} }
/**
* 校验代理人与组织机构关系
* @param caseApplication
* @param failureMsg
* @return
*/
private void validAgentInfo(CaseApplication caseApplication, StringBuilder failureMsg,Map<String, Long> deptMap) {
// 申请机构与代理人都不为空,校验代理人与组织机构关系(代理人必须在该部门下)
if (StrUtil.isNotEmpty(caseApplication.getName())&&StrUtil.isNotEmpty(caseApplication.getNameAgent())) {
String applicationOrganId="";
// 申请机构已经存在
if(deptMap.containsKey(caseApplication.getName())){
applicationOrganId=String.valueOf(deptMap.get(caseApplication.getName()));
}
// 根据代理人身份证去用户表查询
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseApplication.getIdentityNumAgent());
// 代理人的部门和申请机构不匹配
if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(applicationOrganId)) {
// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
failureMsg.append("该申请代理人已在【").append(agentUser.getDept().getDeptName()).append("】申请机构下存在,请检查填写信息是否正确");
} else {
failureMsg.append( "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确");
}
}
}
}
/** /**
* 校验申请人主题信息 * 校验申请人主题信息
* @param caseApplication * @param caseApplication
@@ -1806,33 +1823,47 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
*/ */
@Override @Override
public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) { public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(messageVO.getId(), 2); CaseAffiliate caseAffiliateSelect=new CaseAffiliate();
if(null==caseAffiliate){ caseAffiliateSelect.setCaseAppliId(messageVO.getId());
return "被申请人不存在"; List<CaseAffiliate> caseAffiliates= caseAffiliateMapper.selectCaseAffiliate(caseAffiliateSelect);
if(CollectionUtil.isEmpty(caseAffiliates)){
return "申请人、被申请人不存在";
} }
CaseApplication caseApplication = new CaseApplication(); CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(messageVO.getId()); caseApplication.setId(messageVO.getId());
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication); CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
String returnResult="短信发送成功";
//发送短信通知 //发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest(); SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1952136"); request.setTemplateId("1952136");
// 1948332 普通短信 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请在微信内打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。 for (CaseAffiliate caseAffiliate : caseAffiliates) {
request.setPhone(caseAffiliate.getContactTelphone()); request.setPhone(caseAffiliate.getContactTelphone());
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()}); request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
if (SmsUtils.sendSms(request)){ // 1948332 普通短信 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请在微信内打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。
//保存短信发送记录 if (SmsUtils.sendSms(request)){
SmsSendRecord smsSendRecord = new SmsSendRecord(); //保存短信发送记录
smsSendRecord.setCaseId(messageVO.getId()); SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseNum(caseApplicationselect.getCaseNum()); smsSendRecord.setCaseId(messageVO.getId());
smsSendRecord.setPhone(request.getPhone()); smsSendRecord.setCaseNum(caseApplicationselect.getCaseNum());
smsSendRecord.setSendTime(new Date()); smsSendRecord.setPhone(request.getPhone());
String content="尊敬的"+caseAffiliate.getName()+"用户,您的"+ caseApplicationselect.getCaseNum()+"仲裁案件,开庭审理房间号为"+ messageVO.getRoomNo()+",请在微信内打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。"; smsSendRecord.setSendTime(new Date());
smsSendRecord.setSendContent(content); String content="尊敬的"+caseAffiliate.getName()+"用户,您的"+ caseApplicationselect.getCaseNum()+"仲裁案件,开庭审理房间号为"+ messageVO.getRoomNo()+",请在微信内打开https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setCreateBy(getUsername()); smsSendRecord.setSendContent(content);
smsRecordMapper.saveSmsSendRecord(smsSendRecord); String userName;
try {
userName= getUsername();
} catch (Exception e) {
userName="admin";
}
smsSendRecord.setCreateBy(userName);
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}else {
returnResult= "短信发送失败";
}
} }
return "短信发送成功"; return returnResult;
} }
@Override @Override
@@ -2074,6 +2105,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplication.setFilearbitraUrl(filearbitraUrl); caseApplication.setFilearbitraUrl(filearbitraUrl);
} }
} }
return caseApplication; return caseApplication;
} }
@@ -2083,8 +2115,26 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Transactional @Transactional
public int pendTralSure(CaseApplication caseApplication) { public int pendTralSure(CaseApplication caseApplication) {
// caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD); // caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
caseApplication.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE); caseApplication.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
int rows = caseApplicationMapper.submitCaseApplication(caseApplication); Integer isAgreePendTral = caseApplication.getIsAgreePendTral();
int rows = 0;
//同意组庭
if(isAgreePendTral!=null&&isAgreePendTral==1){
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}else {
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
// 仲裁员信息
if(arbitrators!=null&&arbitrators.size()>0){
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
caseApplication.setArbitratorId(idstr);
caseApplication.setArbitratorName(arbitratorNamestr);
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
//发送短信通知 //发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest(); SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
@@ -36,6 +36,10 @@ public class CaseLogUtils
operLog.setCreateBy(sysUser.getUserName()); operLog.setCreateBy(sysUser.getUserName());
operLog.setCreateNickName(sysUser.getNickName()); operLog.setCreateNickName(sysUser.getNickName());
operLog.setUpdateBy(sysUser.getUserName()); operLog.setUpdateBy(sysUser.getUserName());
}else {
operLog.setCreateBy("admin");
operLog.setCreateNickName("管理员");
operLog.setUpdateBy("admin");
} }
operLog.setCaseAppliId(caseAppliId); operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(caseNode); operLog.setCaseNode(caseNode);
@@ -77,16 +77,17 @@ public class FixSelectFlowDetailUtils {
caseApplication.setId(sealSignRecord.getCaseAppliId()); caseApplication.setId(sealSignRecord.getCaseAppliId());
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication); CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION){ if(caseApplicationselect!=null){
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL); if((caseApplicationselect.getCaseStatus()!=null)&&(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION)){
caseApplicationMapper.submitCaseApplication(caseApplication); caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication);
//修改"签署用印记录表"的状态为待用印 //修改"签署用印记录表"的状态为待用印
sealSignRecord.setSignFlowStatus(2); sealSignRecord.setSignFlowStatus(2);
sealSignRecordMapper.updataSealSignRecord(sealSignRecord); sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
}
} }
} }
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){ if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
//更新立案申请状态为待送达 //更新立案申请状态为待送达
@@ -94,27 +95,30 @@ public class FixSelectFlowDetailUtils {
caseApplication.setId(sealSignRecord.getCaseAppliId()); caseApplication.setId(sealSignRecord.getCaseAppliId());
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication); CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){ if(caseApplicationselect!=null){
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY); if((caseApplicationselect.getCaseStatus()!=null)&&(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL)){
//下载审核完成的裁决书, caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
String signFlowId = sealSignRecord.getSignFlowid(); //下载审核完成的裁决书,
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId); String signFlowId = sealSignRecord.getSignFlowid();
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class); EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data"); JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray(); JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
if(filesArray!=null&&filesArray.size()>0){ JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
JsonObject fileObject = (JsonObject)filesArray.get(0); if(filesArray!=null&&filesArray.size()>0){
String fileDownloadUrl = fileObject.get("downloadUrl").toString(); JsonObject fileObject = (JsonObject)filesArray.get(0);
//修改"签署用印记录表"的状态为签署完成 String fileDownloadUrl = fileObject.get("downloadUrl").toString();
sealSignRecord.setSignFlowStatus(3); //修改"签署用印记录表"的状态为签署完成
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1,fileDownloadUrl.length()-1)); sealSignRecord.setSignFlowStatus(3);
sealSignRecordMapper.updataSealSignRecord(sealSignRecord); sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1,fileDownloadUrl.length()-1));
String filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1); sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
caseApplication.setFilearbitraUrl(filearbitraUrl); String filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
caseApplicationMapper.submitCaseApplication(caseApplication); caseApplication.setFilearbitraUrl(filearbitraUrl);
caseApplicationMapper.submitCaseApplication(caseApplication);
}
} }
} }
} }
} }
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" /> <result property="ancestors" column="ancestors" />
<result property="deptName" column="dept_name" /> <result property="deptName" column="dept_name" />
<result property="deptType" column="dept_type" />
<result property="orderNum" column="order_num" /> <result property="orderNum" column="order_num" />
<result property="leader" column="leader" /> <result property="leader" column="leader" />
<result property="phone" column="phone" /> <result property="phone" column="phone" />
@@ -23,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectDeptVo"> <sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_type,d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_dept d from sys_dept d
</sql> </sql>
@@ -59,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, select d.dept_id, d.parent_id, d.ancestors, d.dept_name,d.dept_type, d.order_num, d.leader, d.phone, d.email, d.status,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d from sys_dept d
where d.dept_id = #{deptId} where d.dept_id = #{deptId}
@@ -97,6 +97,7 @@
contact_telphone_agent = #{contactTelphoneAgent}, contact_telphone_agent = #{contactTelphoneAgent},
contact_address_agent = #{contactAddressAgent}, contact_address_agent = #{contactAddressAgent},
send_email = #{sendEmail}, send_email = #{sendEmail},
residen_affili = #{residenAffili},
track_num = #{trackNum} track_num = #{trackNum}
where id = #{id} where id = #{id}
@@ -402,6 +402,7 @@
<if test="properPreser != null ">proper_preser,</if> <if test="properPreser != null ">proper_preser,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="importFlag != null ">import_flag,</if>
create_time create_time
)values( )values(
<if test="caseNum != null and caseNum != ''">#{caseNum},</if> <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
@@ -428,6 +429,7 @@
<if test="properPreser != null ">#{properPreser},</if> <if test="properPreser != null ">#{properPreser},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="importFlag != null ">#{importFlag},</if>
sysdate() sysdate()
) )
</insert> </insert>
@@ -456,6 +458,7 @@
<if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if> <if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
<if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if> <if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
<if test="caseStatus != null">case_status = #{caseStatus},</if> <if test="caseStatus != null">case_status = #{caseStatus},</if>
<if test="properPreser != null">proper_preser = #{properPreser},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if> <if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>