Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
# Conflicts: # ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
This commit is contained in:
@@ -166,6 +166,10 @@ public class CaseApplication extends BaseEntity {
|
||||
|
||||
/** 是否仲裁反请求 */
|
||||
private Integer adjudicaCounter;
|
||||
/**
|
||||
* 仲裁反请求原因
|
||||
*/
|
||||
private String adjudicaCounterReason;
|
||||
|
||||
/** 被申请人是否缺席 */
|
||||
private Integer isAbsence;
|
||||
@@ -178,6 +182,14 @@ public class CaseApplication extends BaseEntity {
|
||||
/** 申请人是否缺席 */
|
||||
private Integer appliIsAbsen;
|
||||
|
||||
public String getAdjudicaCounterReason() {
|
||||
return adjudicaCounterReason;
|
||||
}
|
||||
|
||||
public void setAdjudicaCounterReason(String adjudicaCounterReason) {
|
||||
this.adjudicaCounterReason = adjudicaCounterReason;
|
||||
}
|
||||
|
||||
public Integer getAppliIsAbsen() {
|
||||
return appliIsAbsen;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@ public class CaseAttach {
|
||||
* 案件申请id
|
||||
*/
|
||||
private Long caseAppliId;
|
||||
/**
|
||||
* 案件记录id
|
||||
*/
|
||||
private Long caseAppliLogId;
|
||||
/**
|
||||
* 附件名称
|
||||
*/
|
||||
@@ -46,5 +50,9 @@ public class CaseAttach {
|
||||
* 印章状态(0未启用,1已启用)
|
||||
*/
|
||||
private Integer sealStatus;
|
||||
/**
|
||||
* 是否是证据上传,0-否,1-是
|
||||
*/
|
||||
private Integer isBatchUpload;
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ public class ReservedConference {
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 案件id
|
||||
*/
|
||||
@@ -39,6 +43,10 @@ public class ReservedConference {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scheduleEndTime;
|
||||
/**
|
||||
* 是否超过5分钟
|
||||
*/
|
||||
private Boolean isBeforeFiveMinutes;
|
||||
|
||||
|
||||
public ReservedConference() {
|
||||
|
||||
@@ -31,6 +31,10 @@ public class CaseEvidenceDTO {
|
||||
private Integer pendingAppointArbotrar;
|
||||
/** 是否仲裁反请求 */
|
||||
private Integer adjudicaCounter;
|
||||
/**
|
||||
* 仲裁反请求原因
|
||||
*/
|
||||
private String adjudicaCounterReason;
|
||||
/** 是否管辖异议申请 */
|
||||
private Integer objectiJuris;
|
||||
|
||||
|
||||
@@ -35,4 +35,10 @@ public interface CaseAffiliateMapper {
|
||||
* @param affiliateLogList
|
||||
*/
|
||||
void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
|
||||
|
||||
/**
|
||||
* 根据案件id删除
|
||||
* @param caseId
|
||||
*/
|
||||
void deleteByCaseId(@Param("caseAppliId") Long caseId);
|
||||
}
|
||||
|
||||
+1
@@ -43,4 +43,5 @@ public interface CaseApplicationLogMapper {
|
||||
*/
|
||||
void batchDeleteLog(@Param("ids") List<Long> ids);
|
||||
|
||||
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CaseAttachLogMapper {
|
||||
int save(CaseAttach caseAttach);
|
||||
|
||||
List<CaseAttach> queryAnnexPathByCaseId(Long id);
|
||||
|
||||
List<CaseAttach> queryCaseAttachList(CaseApplication caseApplication);
|
||||
|
||||
|
||||
int updateCaseAttach(CaseAttach caseAttach);
|
||||
|
||||
int updateCaseAttachBycaseid(CaseAttach caseAttach);
|
||||
|
||||
int deleteByFileIds(@Param("ids") List<Integer> fileIds);
|
||||
|
||||
List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
|
||||
|
||||
CaseAttach queryAnnexById(Integer annexId);
|
||||
|
||||
|
||||
}
|
||||
@@ -25,4 +25,11 @@ public interface CaseAttachMapper {
|
||||
List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
|
||||
|
||||
CaseAttach queryAnnexById(Integer annexId);
|
||||
|
||||
/**
|
||||
* 根据案件id和附件类型删除和上传类型
|
||||
* @param caseAppliId
|
||||
* @param annexType
|
||||
*/
|
||||
void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
|
||||
}
|
||||
|
||||
+99
-8
@@ -3,12 +3,14 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.enums.UpdateSubmitStatus;
|
||||
import com.ruoyi.common.enums.YesOrNoEnum;
|
||||
import com.ruoyi.common.utils.ObjectFieldUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
|
||||
@@ -22,6 +24,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
@@ -42,6 +45,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
@Autowired
|
||||
private CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private CaseAttachLogMapper caseAttachLogMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Override
|
||||
public int insert(CaseApplication caseApplicationLog) {
|
||||
@@ -105,6 +112,8 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
|
||||
// 如果版本号为1,则直接返回
|
||||
if(vo.getVersion() <= 1){
|
||||
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
|
||||
caseApplicationLogMapper.updateStatus(vo);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
// 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
|
||||
@@ -123,8 +132,24 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
|
||||
// 更新相关人员主表
|
||||
if(CollectionUtil.isNotEmpty(affiliateLogList)){
|
||||
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
|
||||
for (CaseAffiliate caseAffiliate : affiliateLogList) {
|
||||
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
||||
caseAffiliate.setCaseAppliId(vo.getCaseId());
|
||||
|
||||
}
|
||||
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
|
||||
}
|
||||
// // 根据caseLogId查询案件记录附件表
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
|
||||
caseApplication.setAnnexType(2);
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
@@ -177,7 +202,6 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
// todo 给申请人发送短信
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("1996949");
|
||||
request.setPhone(caseAffiliate.getContactTelphone());
|
||||
@@ -209,20 +233,29 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
|
||||
// 查询当前版本号和上一个版本号的案件
|
||||
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
|
||||
CaseApplication beforeCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
|
||||
CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
|
||||
// 查询案件关联人员
|
||||
beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
|
||||
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
|
||||
// 查询附件
|
||||
CaseAttach caseAttach = new CaseAttach();
|
||||
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
|
||||
caseAttach.setAnnexType(2);
|
||||
caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||
beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
|
||||
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
|
||||
CompareCaseVO compareCaseVO = new CompareCaseVO();
|
||||
compareCaseVO.setBeforeCase(beforeCase);
|
||||
compareCaseVO.setAfterCase(afterCase);
|
||||
// 对比两个版本修改的字段
|
||||
String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
|
||||
"claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
|
||||
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
|
||||
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
|
||||
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
|
||||
"compLegalperPost","responSex","responBirth"};
|
||||
StringBuilder changeColumn = new StringBuilder();
|
||||
// 对比基本字段
|
||||
for (String column : columns) {
|
||||
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
|
||||
String afterValue = ObjectFieldUtils.getValue(afterCase, column);
|
||||
@@ -241,6 +274,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
}
|
||||
|
||||
}
|
||||
// 对比人员字段
|
||||
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
|
||||
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
|
||||
Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
|
||||
@@ -257,8 +291,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
affiliateChangeColumn.append(column).append(",");
|
||||
}
|
||||
|
||||
}
|
||||
else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
|
||||
} else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
|
||||
affiliateChangeColumn = new StringBuilder();
|
||||
for (String column : affiliateColumns) {
|
||||
|
||||
@@ -302,8 +335,49 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(afterCase.getCaseAttachList());
|
||||
boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList());
|
||||
// 对比附件
|
||||
if(notEmptyFlag || emptyFlag){
|
||||
changeColumn.append("fileColumn");
|
||||
}else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
|
||||
if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){
|
||||
changeColumn.append("fileColumn");
|
||||
}else {
|
||||
Map<String, CaseAttach> afterAttachMap = afterCase.getCaseAttachList().stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
|
||||
|
||||
|
||||
for (CaseAttach beforeCaseAttach : beforeCase.getCaseAttachList()) {
|
||||
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
|
||||
changeColumn.append("fileColumn");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
compareCaseVO.setChangeColumn(changeColumn.toString());
|
||||
if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
|
||||
List<CaseAttach> caseAttachList = afterCase.getCaseAttachList();
|
||||
for (CaseAttach attach : caseAttachList) {
|
||||
String annexName = attach.getAnnexName();
|
||||
String prefix = "/profile";
|
||||
int startIndex = annexName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||
attach.setAnnexPath(annexPath);
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if (startIndexnew != -1) {
|
||||
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||
attach.setAnnexName(annexNamenew);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
afterCase.setCaseAttachList(caseAttachList);
|
||||
}
|
||||
|
||||
return AjaxResult.success(compareCaseVO);
|
||||
}
|
||||
@@ -319,7 +393,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
|
||||
|
||||
}else {
|
||||
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
|
||||
caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
|
||||
}
|
||||
if (caseApplicationLog == null) {
|
||||
return;
|
||||
@@ -330,13 +404,30 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
// 根据caseLogId查询相关人员表
|
||||
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
|
||||
|
||||
|
||||
// 更新案件主表
|
||||
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
|
||||
|
||||
// 更新相关人员主表
|
||||
if(CollectionUtil.isNotEmpty(affiliateLogList)){
|
||||
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
|
||||
for (CaseAffiliate caseAffiliate : affiliateLogList) {
|
||||
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
||||
caseAffiliate.setCaseAppliId(vo.getCaseId());
|
||||
|
||||
}
|
||||
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
|
||||
}
|
||||
// // 根据caseLogId查询案件记录附件表
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
|
||||
caseApplication.setAnnexType(2);
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
|
||||
+77
-20
@@ -127,6 +127,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
private CaseApplicationLogMapper caseApplicationLogMapper;
|
||||
@Autowired
|
||||
private CaseAffiliateLogMapper caseAffiliateLogMapper;
|
||||
@Autowired
|
||||
private CaseAttachLogMapper caseAttachLogMapper;
|
||||
|
||||
// 手机号正则
|
||||
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
|
||||
@@ -978,7 +980,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
|
||||
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
|
||||
// 插入案件日志人员相关表
|
||||
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
||||
if(CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
||||
// 插入日志附件表
|
||||
if(CollectionUtil.isNotEmpty(filterList)) {
|
||||
for (CaseAttach caseAttach : filterList) {
|
||||
// 查询附件表
|
||||
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
||||
attach.setCaseAppliLogId(caseApplication.getId());
|
||||
caseAttachLogMapper.save(attach);
|
||||
}
|
||||
}
|
||||
|
||||
} caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1083,11 +1097,24 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
}
|
||||
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
// 立案申请状态直接修改主表信息
|
||||
if (caseAttachList != null && caseAttachList.size() > 0
|
||||
&& caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
|
||||
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(filterList)){
|
||||
// 先删除2的附件在新增
|
||||
// caseAttachMapper.deleteByCasedIdAndType(caseApplication.getId(),2,0);
|
||||
// for (CaseAttach caseAttach : filterList) {
|
||||
// caseAttach.setCaseAppliId(caseApplication.getId());
|
||||
// caseAttachMapper.save(caseAttach);
|
||||
// }
|
||||
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
caseAttach.setCaseAppliId(caseApplication.getId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// 根据案件id查询最新版本号
|
||||
@@ -1103,13 +1130,32 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
|
||||
// 异步新增案件日志
|
||||
ThreadPoolUtil.execute(() -> {
|
||||
try {
|
||||
caseApplication.setCaseAppliId(caseApplication.getId());
|
||||
int insertRow = caseApplicationLogMapper.insert(caseApplication);
|
||||
if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
|
||||
if (insertRow != 0 ) {
|
||||
if( CollectionUtil.isNotEmpty(caseAffiliates)) {
|
||||
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
|
||||
// 插入案件日志人员相关表
|
||||
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
||||
// 插入日志附件表
|
||||
if(CollectionUtil.isNotEmpty(filterList)) {
|
||||
for (CaseAttach caseAttach : filterList) {
|
||||
// 查询附件表
|
||||
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
||||
attach.setCaseAppliLogId(caseApplication.getId());
|
||||
caseAttachLogMapper.save(attach);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
||||
return success();
|
||||
@@ -2722,8 +2768,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
public long createRoomId(Long caseId) {
|
||||
long roomId = generateRoomId();
|
||||
// 新增预约会议表
|
||||
// ReservedConference conference = new ReservedConference(caseId, roomId,
|
||||
// null, null,0);
|
||||
// ReservedConference conference = new ReservedConference(caseId, SecurityUtils.getUserId(),roomId,
|
||||
// null, null);
|
||||
// reservedConferenceMapper.insert(conference);
|
||||
// 绑定案件与房间号
|
||||
caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
|
||||
@@ -2757,25 +2803,36 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
@Transactional
|
||||
public List<ReservedConference> reserveConferenceList(Long caseId) {
|
||||
List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
|
||||
List<ReservedConference> result = new ArrayList<>();
|
||||
// 判断当前时间是否大于结束时间,如果大于,则把该房间删掉
|
||||
if (CollectionUtil.isNotEmpty(reservedConferences)) {
|
||||
List<Long> ids = new ArrayList<>();
|
||||
if (CollectionUtil.isEmpty(reservedConferences)) {
|
||||
return reservedConferences;
|
||||
}
|
||||
Map<Long,String> userIdMap = null;
|
||||
List<Long> userIds = reservedConferences.stream().map(ReservedConference::getUserId).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(userIds)){
|
||||
// 根据userids查询用户名
|
||||
List<SysUser> userList = sysUserMapper.selectUserListByIds(userIds);
|
||||
if(CollectionUtil.isNotEmpty(userList)){
|
||||
userIdMap = userList.stream().collect(Collectors.toMap(SysUser::getUserId,SysUser::getUserName));
|
||||
}
|
||||
}
|
||||
for (ReservedConference reservedConference : reservedConferences) {
|
||||
Date endTime = reservedConference.getScheduleEndTime();
|
||||
Date now = new Date();
|
||||
if (now.after(endTime)) {
|
||||
ids.add(reservedConference.getId());
|
||||
if(null!=reservedConference.getUserId() && null!=userIdMap){
|
||||
reservedConference.setUserName(userIdMap.get(reservedConference.getUserId()));
|
||||
}
|
||||
Date startTime = reservedConference.getScheduleStartTime();
|
||||
if (null == startTime) {
|
||||
continue;
|
||||
}
|
||||
long beforeMinutes = startTime.getTime() - 1000 * 60 * 5;
|
||||
if (System.currentTimeMillis() < beforeMinutes) {
|
||||
reservedConference.setIsBeforeFiveMinutes(true);
|
||||
} else {
|
||||
result.add(reservedConference);
|
||||
reservedConference.setIsBeforeFiveMinutes(false);
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(ids)) {
|
||||
// 根据id批量删除
|
||||
reservedConferenceMapper.batchDeleteByIds(ids);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
|
||||
return reservedConferences;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+10
-1
@@ -125,7 +125,14 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
}
|
||||
CaseAttach caseAttachselect = new CaseAttach();
|
||||
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
|
||||
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
|
||||
String annexName = caseAttach.getAnnexName();
|
||||
if(StrUtil.isNotEmpty(annexName)) {
|
||||
int startIndexnew = annexName.lastIndexOf("/");
|
||||
if (startIndexnew != -1) {
|
||||
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||
caseAttach.setAnnexName(annexNamenew);
|
||||
}
|
||||
}
|
||||
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
|
||||
return AjaxResult.success("上传成功", caseAttachselect);
|
||||
} catch (IOException e) {
|
||||
@@ -193,6 +200,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
caseApplication.setId(caseEvidenceDTO.getCaseId());
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 != null) {
|
||||
caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason());
|
||||
int caseStatus = caseApplication1.getCaseStatus();
|
||||
caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
|
||||
//默认书面审理
|
||||
@@ -246,6 +254,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
.annexType(annexType)
|
||||
.userId(userId)
|
||||
.userName(userName)
|
||||
.isBatchUpload(1)
|
||||
.build();
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
if (count > 0 && annexType != null && annexType != 8) {
|
||||
|
||||
+3
@@ -365,7 +365,9 @@ public class VideoServiceImpl implements VideoService {
|
||||
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
||||
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
|
||||
if(downloadFile>0) {
|
||||
log.info("下载成功roomId"+roomId);
|
||||
Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
|
||||
log.info("下载成功caseId"+caseId);
|
||||
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
||||
// 存入数据库
|
||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
|
||||
@@ -374,6 +376,7 @@ public class VideoServiceImpl implements VideoService {
|
||||
.annexType(9)
|
||||
.build();
|
||||
caseAttachMapper.save(caseAttach);
|
||||
log.info("保存附件号成功");
|
||||
return annexName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,9 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByCaseId">
|
||||
delete from case_affiliate where case_appli_id = #{caseAppliId}
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
+12
-2
@@ -48,6 +48,7 @@
|
||||
<result property="lockStatus" column="lock_status" />
|
||||
<result property="version" column="version" />
|
||||
<result property="updateSubmitStatus" column="update_submit_status" />
|
||||
<result property="properPreser" column="proper_preser" />
|
||||
</resultMap>
|
||||
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into case_application_log(
|
||||
@@ -69,6 +70,7 @@
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="version != null ">version,</if>
|
||||
<if test="updateSubmitStatus != null ">update_submit_status,</if>
|
||||
<if test="properPreser != null ">proper_preser,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="caseAppliId != null">#{caseAppliId},</if>
|
||||
@@ -89,6 +91,7 @@
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="version != null ">#{version},</if>
|
||||
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
|
||||
<if test="properPreser != null ">#{properPreser},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
@@ -130,7 +133,7 @@
|
||||
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
|
||||
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
||||
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
|
||||
create_by,version,update_submit_status,create_time
|
||||
create_by,version,update_submit_status,create_time,proper_preser
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} and version=#{version}
|
||||
</select>
|
||||
@@ -138,7 +141,7 @@
|
||||
<select id="selectLatestCase" resultMap="CaseApplicationResult">
|
||||
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
||||
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
|
||||
create_by,version,update_submit_status,create_time
|
||||
create_by,version,update_submit_status,create_time,proper_preser
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
|
||||
</select>
|
||||
@@ -153,6 +156,13 @@
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
|
||||
</select>
|
||||
<select id="selectBeforeCase" resultMap="CaseApplicationResult">
|
||||
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
|
||||
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
|
||||
create_by,version,update_submit_status,create_time,proper_preser
|
||||
FROM case_application_log
|
||||
WHERE case_appli_id = #{caseId} and version < #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
|
||||
<!--申请人案件-->
|
||||
select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
select c.id ,l.id AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
@@ -176,10 +176,10 @@
|
||||
when 31 then '待修改开庭时间'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date ,l.arbitrat_claims ,
|
||||
l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag
|
||||
,l.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,
|
||||
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.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
|
||||
as
|
||||
applicantName,
|
||||
@@ -335,8 +335,8 @@
|
||||
SELECT
|
||||
l.case_appli_id id,
|
||||
l.id AS caseLogId,
|
||||
l.case_num,
|
||||
l.case_subject_amount,
|
||||
c.case_num,
|
||||
c.case_subject_amount,
|
||||
c.register_date,
|
||||
c.arbitrat_method,
|
||||
CASE
|
||||
@@ -389,20 +389,20 @@
|
||||
'待修改开庭时间' ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date,
|
||||
l.arbitrat_claims,
|
||||
l.loan_start_date,
|
||||
l.loan_end_date,
|
||||
l.claim_princi_owed,
|
||||
l.claim_interest_owed,
|
||||
l.claim_liquid_damag,
|
||||
l.fee_payable,
|
||||
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.begin_video_date,
|
||||
c.online_video_person,
|
||||
l.contract_number,
|
||||
l.create_by,
|
||||
c.contract_number,
|
||||
c.create_by,
|
||||
c.create_time,
|
||||
l.update_by,
|
||||
l.update_time,
|
||||
c.update_by,
|
||||
c.update_time,
|
||||
c.arbitrator_name,
|
||||
ca.name,
|
||||
ca.application_organ_id ,
|
||||
@@ -1455,6 +1455,7 @@
|
||||
<if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
|
||||
<if test="hearDate != null">hear_date = #{hearDate},</if>
|
||||
<if test="filearbitraUrl != null and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
|
||||
<if test="adjudicaCounterReason != null and adjudicaCounterReason != ''">adjudica_counter_reason = #{adjudicaCounterReason},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -1468,9 +1469,9 @@
|
||||
update case_application set lock_status=#{lockStatus} where id = #{id}
|
||||
</update>
|
||||
<update id="bindCaseId">
|
||||
<!-- update case_application set room_id=#{roomId} where id = #{caseId} -->
|
||||
update case_application set room_id=#{roomId} where id = #{caseId}
|
||||
|
||||
update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId}
|
||||
<!-- update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId} -->
|
||||
</update>
|
||||
<update id="updateVersionById">
|
||||
update case_application set version = #{version} where id = #{id}
|
||||
@@ -1585,7 +1586,7 @@ order by c.create_time desc limit 1
|
||||
</select>
|
||||
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
||||
select id
|
||||
from case_application where room_id like concat('%', #{roomId}, '%') limit 1
|
||||
from case_application where room_id=#{roomId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectMaxRoomId" resultType="java.lang.Long">
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<?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.CaseAttachLogMapper">
|
||||
<resultMap type="CaseAttach" id="CaseAttachResult">
|
||||
<id property="annexId" column="annex_id" />
|
||||
<result property="caseAppliId" column="case_appli_id" />
|
||||
<result property="annexName" column="annex_name" />
|
||||
<result property="annexPath" column="annex_path" />
|
||||
<result property="annexType" column="annex_type" />
|
||||
<result property="note" column="note" />
|
||||
<result property="userId" column="use_id" />
|
||||
<result property="userName" column="use_account" />
|
||||
<result property="sealStatus" column="seal_status" />
|
||||
<result property="caseAppliLogId" column="case_appli_log_id" />
|
||||
</resultMap>
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
VALUES (#{caseAppliLogId},#{annexId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
|
||||
</insert>
|
||||
<delete id="deleteByFileIds">
|
||||
delete from case_attach_log
|
||||
where annex_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
where case_appli_log_id =#{id}
|
||||
</select>
|
||||
|
||||
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
<where>
|
||||
<if test="caseAppliLogId != null ">
|
||||
AND case_appli_log_id = #{caseAppliLogId}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
<where>
|
||||
<if test="caseLogId != null ">
|
||||
AND case_appli_log_id = #{caseLogId}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
<if test="annexTypeList != null and annexTypeList.size() > 0">
|
||||
and annex_type in
|
||||
<foreach item="annexType" collection="annexTypeList" open="(" separator="," close=")">
|
||||
#{annexType}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from case_attach_log
|
||||
<where>
|
||||
<if test="annexId != null ">
|
||||
AND annex_id = #{annexId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateCaseAttach" parameterType="CaseAttach">
|
||||
update case_attach_log
|
||||
set
|
||||
case_appli_log_id= #{caseAppliLogId}
|
||||
where annex_id = #{annexId}
|
||||
</update>
|
||||
|
||||
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
|
||||
update case_attach_log
|
||||
<set>
|
||||
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND case_appli_log_id = #{caseAppliLogId}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -15,8 +15,8 @@
|
||||
<result property="sealStatus" column="seal_status" />
|
||||
</resultMap>
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
|
||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus},#{isBatchUpload})
|
||||
</insert>
|
||||
<delete id="deleteByFileIds">
|
||||
delete from case_attach
|
||||
@@ -25,6 +25,14 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByCasedIdAndType">
|
||||
delete from case_attach
|
||||
where case_appli_id = #{caseAppliId}
|
||||
and annex_type = #{annexType}
|
||||
<if test="isBatchUpload != null ">
|
||||
AND is_batch_upload = #{isBatchUpload}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
@@ -64,7 +72,7 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from case_attach
|
||||
<where>
|
||||
<if test="annexId != null ">
|
||||
|
||||
Reference in New Issue
Block a user