This commit is contained in:
18792927508
2023-11-23 18:47:16 +08:00
parent d282515d64
commit 217dda4225
13 changed files with 205 additions and 230 deletions
@@ -392,7 +392,6 @@ public class CaseApplicationController extends BaseController {
* @param reservedConferenceVO * @param reservedConferenceVO
* @return * @return
*/ */
@Anonymous
@PostMapping("/reservedConference") @PostMapping("/reservedConference")
public AjaxResult reservedConference(@Validated @RequestBody ReservedConferenceVO reservedConferenceVO) throws Exception { public AjaxResult reservedConference(@Validated @RequestBody ReservedConferenceVO reservedConferenceVO) throws Exception {
@@ -430,5 +429,4 @@ public class CaseApplicationController extends BaseController {
return success(caseApplicationService.reserveConferenceList(caseId)); return success(caseApplicationService.reserveConferenceList(caseId));
} }
} }
@@ -78,7 +78,7 @@ public class VideoController extends BaseController {
@Anonymous @Anonymous
@PostMapping("/openCloudRecording") @PostMapping("/openCloudRecording")
private AjaxResult openCloudRecording( @RequestBody ReservedConferenceVO vo) { private AjaxResult openCloudRecording( @RequestBody ReservedConferenceVO vo) {
if(vo.getCaseId()==null || StrUtil.isEmpty(vo.getRoomId())){ if(vo.getCaseId()==null || vo.getRoomId()==null){
return AjaxResult.error("参数错误"); return AjaxResult.error("参数错误");
} }
return videoService.openCloudRecording(vo.getCaseId(),vo.getRoomId()); return videoService.openCloudRecording(vo.getCaseId(),vo.getRoomId());
@@ -93,5 +93,20 @@ public class VideoController extends BaseController {
public AjaxResult closeDeleteCloudRecording(@RequestParam("taskId") String taskId){ public AjaxResult closeDeleteCloudRecording(@RequestParam("taskId") String taskId){
return videoService.closeDeleteCloudRecording(taskId); return videoService.closeDeleteCloudRecording(taskId);
} }
/**
* 解散房间
* @param reservedConferenceVO
* @return
*/
@Anonymous
@PostMapping("/dissolveRoom")
public AjaxResult dissolveRoom( @RequestBody ReservedConferenceVO reservedConferenceVO) {
if( reservedConferenceVO.getRoomId()==null){
return error("参数校验失败");
}
return videoService.dissolveRoom(reservedConferenceVO.getRoomId());
}
} }
@@ -17,6 +17,10 @@ public class ReservedConference {
* id * id
*/ */
private Long id; private Long id;
/**
* 用户id
*/
private Long userId;
/** /**
* 案件id * 案件id
*/ */
@@ -24,7 +28,7 @@ public class ReservedConference {
/** /**
* 房间号 * 房间号
*/ */
private String roomId; private long roomId;
/** /**
* 预定会议开始时间 * 预定会议开始时间
*/ */
@@ -35,19 +39,17 @@ public class ReservedConference {
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleEndTime; private Date scheduleEndTime;
/**
* 会议类型,0-创建会议,1-预约会议
*/
private Integer roomType;
public ReservedConference() { public ReservedConference() {
} }
public ReservedConference(Long caseId, String roomId, Date scheduleStartTime, Date scheduleEndTime,Integer roomType) { public ReservedConference(Long caseId, Long userId, long roomId, Date scheduleStartTime, Date scheduleEndTime) {
this.caseId = caseId; this.caseId = caseId;
this.userId = userId;
this.roomId = roomId; this.roomId = roomId;
this.scheduleStartTime = scheduleStartTime; this.scheduleStartTime = scheduleStartTime;
this.scheduleEndTime = scheduleEndTime; this.scheduleEndTime = scheduleEndTime;
this.roomType = roomType;
} }
} }
@@ -15,18 +15,18 @@ import java.util.Date;
@Data @Data
public class ReservedConferenceVO { public class ReservedConferenceVO {
/** /**
* 房主id * 用户id
*/ */
@NotEmpty(message = "房主id不能为空")
private String ownerId; private String ownerId;
/** /**
* 房间号id * 房间号id
*/ */
private String roomId; private Long roomId;
@NotNull(message = "会议开始时间不能为空") @NotNull(message = "会议开始时间不能为空")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleStartTime; private Date scheduleStartTime;
@NotNull(message = "会议结束时间不能为空")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleEndTime; private Date scheduleEndTime;
@NotNull(message = "案件id不能为空") @NotNull(message = "案件id不能为空")
@@ -109,7 +109,7 @@ public interface CaseApplicationMapper {
* 查询最大房间号 * 查询最大房间号
* @return * @return
*/ */
Integer selectMaxRoomId(); Long selectMaxRoomId();
/** /**
* 修改案件版本号 * 修改案件版本号
@@ -101,7 +101,7 @@ public interface ICaseApplicationService {
* 腾讯云销毁房间回调 * 腾讯云销毁房间回调
* @return * @return
*/ */
String createRoomId(Long caseId); long createRoomId(Long caseId);
/** /**
* 根据案件id查询已预约的会议 * 根据案件id查询已预约的会议
@@ -111,4 +111,5 @@ public interface ICaseApplicationService {
List<ReservedConference> reserveConferenceList(Long caseId); List<ReservedConference> reserveConferenceList(Long caseId);
AjaxResult deleteRoom( String roomId); AjaxResult deleteRoom( String roomId);
} }
@@ -23,7 +23,14 @@ public interface VideoService {
* @param roomId * @param roomId
* @return * @return
*/ */
AjaxResult openCloudRecording(long caseId,String roomId); AjaxResult openCloudRecording(long caseId,long roomId);
AjaxResult closeDeleteCloudRecording(String taskId); AjaxResult closeDeleteCloudRecording(String taskId);
/**
* 解散房间
* @param roomId
* @return
*/
AjaxResult dissolveRoom( Long roomId);
} }
@@ -85,9 +85,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
}else { }else {
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode()); vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
// 修改日志表提交状态
caseApplicationLogMapper.updateStatus(vo);
} }
// 修改日志表提交状态
caseApplicationLogMapper.updateStatus(vo);
return AjaxResult.success(); return AjaxResult.success();
} }
@@ -117,7 +118,6 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
caseApplicationLogMapper.updateStatus(vo); caseApplicationLogMapper.updateStatus(vo);
// 根据caseLogId查询相关人员表 // 根据caseLogId查询相关人员表
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId()); List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
// 更新案件主表 // 更新案件主表
caseApplicationMapper.updataCaseApplication(caseApplicationLog); caseApplicationMapper.updataCaseApplication(caseApplicationLog);
@@ -142,9 +142,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
return AjaxResult.success(); return AjaxResult.success();
} else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) { } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
// 如果版本号为1,则直接返回 // 如果版本号为1,则直接返回
if(vo.getVersion() <= 1){
return AjaxResult.success();
}
// 审核修改撤销状态 // 审核修改撤销状态
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) { if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
agreeRevoke(vo); agreeRevoke(vo);
@@ -219,8 +217,11 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
compareCaseVO.setBeforeCase(beforeCase); compareCaseVO.setBeforeCase(beforeCase);
compareCaseVO.setAfterCase(afterCase); compareCaseVO.setAfterCase(afterCase);
// 对比两个版本修改的字段 // 对比两个版本修改的字段
String[] columns = {"caseLogId","caseSubjectAmount", "caseName"}; String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
String[] affiliateColumns = {"identityNum", "workAddress"}; "claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
"compLegalperPost","responSex","responBirth"};
StringBuilder changeColumn = new StringBuilder(); StringBuilder changeColumn = new StringBuilder();
for (String column : columns) { for (String column : columns) {
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column); String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
@@ -312,9 +313,15 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
* @param vo * @param vo
*/ */
private void agreeRevoke(UpdateSubmitVO vo) { private void agreeRevoke(UpdateSubmitVO vo) {
CaseApplication caseApplicationLog;
// 查询日志记录表上个版本未被拒绝数据 // 查询日志记录表上个版本未被拒绝数据
CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion()-1); if(vo.getVersion()<=1){
if (caseApplicationLog == null) { caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
}else {
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
}
if (caseApplicationLog == null) {
return; return;
} }
// 将日志表改版本的状态改为拒绝 // 将日志表改版本的状态改为拒绝
@@ -322,7 +329,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
caseApplicationLogMapper.updateStatus(vo); caseApplicationLogMapper.updateStatus(vo);
// 根据caseLogId查询相关人员表 // 根据caseLogId查询相关人员表
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId()); List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
caseApplicationLog.setId(caseApplicationLog.getCaseAppliId());
// 更新案件主表 // 更新案件主表
caseApplicationMapper.updataCaseApplication(caseApplicationLog); caseApplicationMapper.updataCaseApplication(caseApplicationLog);
@@ -188,7 +188,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplication.setDeptIds(deptIds); caseApplication.setDeptIds(deptIds);
} }
if ("申请人".equals(role.getRoleName())) { if ("申请人".equals(role.getRoleName())) {
caseApplication.setIsOtherRole(1); // caseApplication.setIsOtherRole(1);
// 查询有关的用户部门 // 查询有关的用户部门
caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId())); caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
} }
@@ -264,7 +264,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplication.setDeptIds(deptIds); caseApplication.setDeptIds(deptIds);
} }
if ("申请人".equals(role.getRoleName())) { if ("申请人".equals(role.getRoleName())) {
caseApplication.setIsOtherRole(1); // caseApplication.setIsOtherRole(1);
// 查询角色有关的用户部门 // 查询角色有关的用户部门
caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId())); caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
} }
@@ -1014,7 +1014,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplicationMapper.updataCaseApplication(caseApplication); caseApplicationMapper.updataCaseApplication(caseApplication);
// 修改记录表状态为同意提交修改的内容 // 修改记录表状态为同意提交修改的内容
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode()); caseApplication.setUpdateSubmitStatus(0);
}else { }else {
// 修改记录表状态为已提交修改的内容 // 修改记录表状态为已提交修改的内容
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode()); caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
@@ -1235,18 +1235,9 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Override @Override
public CaseApplication selectCaseApplication(CaseApplication caseApplication) { public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
CaseApplication caseApplicationselect=new CaseApplication(); CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
if(caseApplication.getVersion()!=null) { CaseAffiliate caseAffiliate = new CaseAffiliate();
caseApplicationselect=caseApplicationLogMapper.selectByCaseIdAndVersion(caseApplication.getId(),caseApplication.getVersion()); caseAffiliate.setCaseAppliId(caseApplication.getId());
}
else {
caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
}
caseApplicationselect.setId(caseApplication.getId());
ArbitrateRecord arbitrateRecord = new ArbitrateRecord(); ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
arbitrateRecord.setCaseAppliId(caseApplication.getId()); arbitrateRecord.setCaseAppliId(caseApplication.getId());
@@ -1275,16 +1266,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
} }
} }
caseApplicationselect.setCaseAttachList(caseAttachList); caseApplicationselect.setCaseAttachList(caseAttachList);
List<CaseAffiliate> caseAffiliatListeselect;
if(caseApplication.getVersion()!=null) {
caseAffiliatListeselect = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationselect.getCaseLogId());
}else {
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplication.getId());
caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
}
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if (caseAffiliatListeselect != null) { if (caseAffiliatListeselect != null) {
// 查询组织机构 // 查询组织机构
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept()); List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
@@ -1307,6 +1290,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
; ;
} else if (identityType == 2) { } else if (identityType == 2) {
respondentName.append(caseAffiliateselect.getName()).append(","); respondentName.append(caseAffiliateselect.getName()).append(",");
;
} }
} }
caseApplicationselect.setApplicantName(applicantName.toString()); caseApplicationselect.setApplicantName(applicantName.toString());
@@ -2708,70 +2692,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
*/ */
@Transactional @Transactional
@Override @Override
public AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) throws Exception { public AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) {
// 创建房间必须拿administrator生成usersig,否则调用腾讯云接口报7004,生成administrator的userSig
String administrator = "administrator";
String userSign = generateUserSign(administrator);
if (StrUtil.isEmpty(userSign)) {
return AjaxResult.error("生成userSign失败");
}
// 生成房间号id
String roomId = generateRoomId();
// String roomId = reservedConferenceVO.getRoomId();
Date startTime = reservedConferenceVO.getScheduleStartTime();
Date endTime = reservedConferenceVO.getScheduleEndTime();
Random rand = new Random();
int random = rand.nextInt(214748365);
String url = "https://roomkit.trtc.tencent-cloud.com/room_api/v1/roomctl/create?usersig=" + userSign + "&identifier=" + administrator + "&sdkappid=" + sdkAppId + "&random=" + random + "&contenttype=json";
HttpPost post = new HttpPost(url);
String result = "";
//添加参数
JSONObject bodyParams = new JSONObject();
JSONObject roomParams = new JSONObject();
bodyParams.put("ownerId", reservedConferenceVO.getOwnerId());
bodyParams.put("roomId", roomId);
bodyParams.put("scheduleStartTime", startTime);
bodyParams.put("scheduleEndTime", endTime);
bodyParams.put("scheduleStartTime", startTime.getTime() / 1000); // 新增预约会议表
bodyParams.put("scheduleEndTime", endTime.getTime() / 1000); ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(),SecurityUtils.getUserId(), reservedConferenceVO.getRoomId(),
roomParams.put("roomType", 1); reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime());
bodyParams.put("roomInfo", roomParams);
StringEntity postingString = new StringEntity(bodyParams.toString());
post.setEntity(postingString);
CloseableHttpClient client = HttpClients.createDefault();
//启动执行请求,并获得返回值
CloseableHttpResponse response = client.execute(post);
//得到返回的entity对象
HttpEntity entity = response.getEntity();
//把实体对象转换为string
result = EntityUtils.toString(entity, "UTF-8");
if (StrUtil.isNotEmpty(result)) {
JSONObject resJson = JSONObject.parseObject(result);
switch ((int) resJson.get("errorCode")) {
case 0:
// todo 不需要绑定,以后删 绑定房间号和案件id
caseApplicationMapper.bindCaseId(reservedConferenceVO.getCaseId(), roomId);
// 新增预约会议表 reservedConferenceMapper.insert(conference);
ReservedConference conference = new ReservedConference(reservedConferenceVO.getCaseId(), roomId, return success("预约会议成功");
reservedConferenceVO.getScheduleStartTime(), reservedConferenceVO.getScheduleEndTime(),1);
reservedConferenceMapper.insert(conference);
return success("预约会议成功");
case 42002:
return AjaxResult.error("预定会议无效");
case 42003:
return AjaxResult.error("预定会议必须是会议场景");
case 84005:
return AjaxResult.error("房间号已被占用");
default:
return AjaxResult.error(resJson.getString("errorMessage"));
}
} else {
return AjaxResult.error("预约会议失败");
}
} }
@@ -2780,14 +2708,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
*/ */
@Transactional @Transactional
@Override @Override
public String createRoomId(Long caseId) { public long createRoomId(Long caseId) {
String roomId = generateRoomId(); long roomId = generateRoomId();
// 新增预约会议表 // 新增预约会议表
ReservedConference conference = new ReservedConference(caseId, roomId, // ReservedConference conference = new ReservedConference(caseId, roomId,
null, null,0); // null, null,0);
reservedConferenceMapper.insert(conference); // reservedConferenceMapper.insert(conference);
// 绑定案件与房间号 // 绑定案件与房间号
caseApplicationMapper.bindCaseId(caseId, roomId); caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
return roomId; return roomId;
} }
@@ -2796,14 +2724,14 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
* *
* @return * @return
*/ */
public String generateRoomId() { public Long generateRoomId() {
// 查询最大房间号 // 查询最大房间号
Integer maxRoomId = caseApplicationMapper.selectMaxRoomId(); Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
if (null == maxRoomId || maxRoomId >999999) { if (null == maxRoomId || maxRoomId >4294967294L) {
return "000001"; return 1L;
} else { } else {
return String.format("%06d", maxRoomId); return maxRoomId+1;
} }
} }
@@ -171,7 +171,7 @@ public class VideoServiceImpl implements VideoService {
* @return * @return
*/ */
@Override @Override
public AjaxResult openCloudRecording(long caseId,String roomId) { public AjaxResult openCloudRecording(long caseId,long roomId) {
try { try {
String userId="recorder_"+roomId; String userId="recorder_"+roomId;
@@ -189,7 +189,7 @@ public class VideoServiceImpl implements VideoService {
// 实例化一个请求对象,每个接口都会对应一个request对象 // 实例化一个请求对象,每个接口都会对应一个request对象
CreateCloudRecordingRequest req = new CreateCloudRecordingRequest(); CreateCloudRecordingRequest req = new CreateCloudRecordingRequest();
req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同 req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同
req.setRoomId(roomId); // RoomId – TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId req.setRoomId(String.valueOf(roomId)); // RoomId – TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId
req.setRoomIdType(1L); req.setRoomIdType(1L);
/** /**
* 录制机器人用于进入TRTC房间拉流的[UserId](https://cloud.tencent.com/document/product/647/46351#userid), * 录制机器人用于进入TRTC房间拉流的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),
@@ -266,6 +266,29 @@ public class VideoServiceImpl implements VideoService {
} }
@Override
public AjaxResult dissolveRoom( Long roomId) {
Credential cred = new Credential(secretId, secretKey);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
DismissRoomRequest req = new DismissRoomRequest();
req.setSdkAppId(sdkAppId);
req.setRoomId(roomId);
try {
DismissRoomResponse resp = client.DismissRoom(req);
return AjaxResult.success((JSONObject) JSON.toJSON(resp));
} catch (TencentCloudSDKException e) {
return AjaxResult.error("解散房间失败");
}
}
/** /**
* 查询出音视频集合,并下载,在将云点播上面的音视频删除 * 查询出音视频集合,并下载,在将云点播上面的音视频删除
@@ -128,7 +128,7 @@
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult"> <select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date, 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, 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
FROM case_application_log FROM case_application_log
@@ -126,12 +126,12 @@
instr (t.arbitrator_id,#{userId})>0) instr (t.arbitrator_id,#{userId})>0)
</if> </if>
<!--申请人--> <!--申请人-->
<if test="applicationOrganId != null and applicationOrganId != ''"> <!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1 <!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
<!--暂时改为可以查询到生成裁决书之前所有的案件状态--> <!-- &lt;!&ndash;暂时改为可以查询到生成裁决书之前所有的案件状态&ndash;&gt;-->
and (t.case_status &lt;= 10 or t.case_status=31)) <!-- and (t.case_status &lt;= 10 or t.case_status=31))-->
</if> <!-- </if>-->
<!--部门长--> <!--部门长-->
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0"> <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
or (t.identity_type=1 and t.case_status in or (t.identity_type=1 and t.case_status in
@@ -158,61 +158,58 @@
</where> </where>
union union
</if> </if>
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">--> <if test="applicationOrganId != null and applicationOrganId != ''">
<!-- &lt;!&ndash;申请人案件&ndash;&gt;--> <!--申请人案件-->
<!-- 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 ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,
<!-- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'--> CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
<!-- ELSE '无审理方式'--> ELSE '无审理方式'
<!-- END arbitratMethodName,--> END arbitratMethodName,
<!-- c.case_status ,--> c.case_status ,
<!-- CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'--> CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
<!-- when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'--> when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
<!-- when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'--> when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
<!-- when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'--> when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
<!-- when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'--> when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
<!-- when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'--> when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
<!-- when 31 then '待修改开庭时间'--> when 31 then '待修改开庭时间'
<!-- ELSE '无案件状态'--> ELSE '无案件状态'
<!-- END caseStatusName,--> END caseStatusName,
<!-- c.hear_date ,l.arbitrat_claims ,--> 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.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag
<!-- ,l.fee_payable ,--> ,l.fee_payable ,
<!-- c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,--> c.begin_video_date ,c.online_video_person ,l.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--> c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
<!-- as--> as
<!-- applicantName,--> applicantName,
<!-- c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus--> c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,(select version from case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1) as updateSubmitStatus
<!-- from case_application c--> from case_application c
<!-- JOIN case_application_log l ON c.id = l.case_appli_id--> JOIN case_application_log l ON c.id = l.case_appli_id and c.version=l.version
<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1--> JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1
<!-- <where>--> <where>
<!-- (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1--> (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
<!-- and l.version=(SELECT-->
<!-- max( version ) version-->
<!-- FROM-->
<!-- case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))-->
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
<!-- AND ca.application_organ_id = #{applicationOrganId}-->
<!-- </if>-->
<!-- <if test="caseStatus != null">-->
<!-- AND c.case_status = #{caseStatus}-->
<!-- </if>-->
<!-- <if test="caseNum != null and caseNum != ''">-->
<!-- AND c.case_num = #{caseNum}-->
<!-- </if>-->
<!-- <if test="nameId != null and nameId != ''">-->
<!-- AND ca.application_organ_id=#{nameId}-->
<!-- </if>-->
<!-- <if test="lockStatus != null">--> <if test="applicationOrganId != null and applicationOrganId != ''">
<!-- AND c.lock_status = #{lockStatus}--> AND ca.application_organ_id = #{applicationOrganId}
<!-- </if>--> </if>
<!-- </where>--> <if test="caseStatus != null">
<!-- union--> AND c.case_status = #{caseStatus}
<!-- </if>--> </if>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="nameId != null and nameId != ''">
AND ca.application_organ_id=#{nameId}
</if>
<if test="lockStatus != null">
AND c.lock_status = #{lockStatus}
</if>
</where>
union
</if>
<!--秘书案件--> <!--秘书案件-->
<if test="deptIds != null and deptIds.size() > 0"> <if test="deptIds != null and deptIds.size() > 0">
@@ -447,7 +444,7 @@
FROM FROM
case_application_log case_application_log
WHERE WHERE
update_submit_status IN ( 1, 2 ) and c.id = case_appli_id) c.id = case_appli_id)
</if> </if>
</trim> </trim>
) t1 ) t1
@@ -679,13 +676,13 @@
<!-- </foreach> )--> <!-- </foreach> )-->
<!-- </if>--> <!-- </if>-->
<!--申请人--> <!--申请人-->
<if test="applicationOrganId != null and applicationOrganId != ''"> <!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1 <!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
<!--暂时改为可以查询到生成裁决书之前所有的案件状态--> <!-- &lt;!&ndash;暂时改为可以查询到生成裁决书之前所有的案件状态&ndash;&gt;-->
and (t.case_status &lt;= 10 or t.case_status=31)) <!-- and (t.case_status &lt;= 10 or t.case_status=31))-->
<!-- and t.case_status in (0,2,17))--> <!-- &lt;!&ndash; and t.case_status in (0,2,17))&ndash;&gt;-->
</if> <!-- </if>-->
<!--部门长--> <!--部门长-->
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0"> <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
or (t.identity_type=1 and t.case_status in or (t.identity_type=1 and t.case_status in
@@ -711,40 +708,37 @@
</where> </where>
union union
</if> </if>
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">--> <if test="applicationOrganId != null and applicationOrganId != ''">
<!-- &lt;!&ndash;申请人案件&ndash;&gt;--> <!--申请人案件-->
<!-- select l.case_appli_id id ,--> select l.case_appli_id id ,
<!-- c.case_status,ca.application_organ_id,--> c.case_status,ca.application_organ_id,
<!-- c.arbitrator_id,ca.identity_num , ca.identity_type--> c.arbitrator_id,ca.identity_num , ca.identity_type
<!-- from case_application c--> from case_application c
<!-- JOIN case_application_log l ON c.id = l.case_appli_id--> JOIN case_application_log l ON c.id = l.case_appli_id
<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1--> JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version
<!-- <where>--> <where>
<!-- (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1--> (c.case_status &lt;= 10 or c.case_status=31) AND ca.identity_type=1
<!-- and l.version=(SELECT-->
<!-- max( version ) version-->
<!-- FROM-->
<!-- case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))-->
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
<!-- AND ca.application_organ_id = #{applicationOrganId}-->
<!-- </if>-->
<!-- <if test="caseStatus != null">-->
<!-- AND c.case_status = #{caseStatus}-->
<!-- </if>-->
<!-- <if test="caseNum != null and caseNum != ''">-->
<!-- AND c.case_num = #{caseNum}-->
<!-- </if>-->
<!-- <if test="nameId != null and nameId != ''">-->
<!-- AND ca.application_organ_id=#{nameId}-->
<!-- </if>-->
<!-- <if test="lockStatus != null">--> <if test="applicationOrganId != null and applicationOrganId != ''">
<!-- AND c.lock_status = #{lockStatus}--> AND ca.application_organ_id = #{applicationOrganId}
<!-- </if>--> </if>
<!-- </where>--> <if test="caseStatus != null">
<!-- union--> AND c.case_status = #{caseStatus}
<!-- </if>--> </if>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="nameId != null and nameId != ''">
AND ca.application_organ_id=#{nameId}
</if>
<if test="lockStatus != null">
AND c.lock_status = #{lockStatus}
</if>
</where>
union
</if>
<!--秘书案件--> <!--秘书案件-->
<if test="deptIds != null and deptIds.size() > 0"> <if test="deptIds != null and deptIds.size() > 0">
@@ -794,7 +788,7 @@
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
AND ca.identity_type = 1 AND ca.identity_type = 1
WHERE WHERE
l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1 l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
<if test="deptIds != null and deptIds.size() > 0"> <if test="deptIds != null and deptIds.size() > 0">
and ca.application_organ_id in and ca.application_organ_id in
<foreach item="item" collection="deptIds" open="(" separator="," close=")"> <foreach item="item" collection="deptIds" open="(" separator="," close=")">
@@ -819,7 +813,7 @@
FROM FROM
case_application_log case_application_log
WHERE WHERE
update_submit_status IN ( 1, 4 ) and c.id = case_appli_id) c.id = case_appli_id)
</if> </if>
</trim> </trim>
@@ -1594,7 +1588,7 @@ order by c.create_time desc limit 1
from case_application where room_id like concat('%', #{roomId}, '%') limit 1 from case_application where room_id like concat('%', #{roomId}, '%') limit 1
</select> </select>
<select id="selectMaxRoomId" resultType="java.lang.Integer"> <select id="selectMaxRoomId" resultType="java.lang.Long">
select max(room_id+1) as maxRoomId select max(room_id+1) as maxRoomId
from reserved_conference ; from reserved_conference ;
</select> </select>
@@ -10,13 +10,13 @@
room_id, room_id,
schedule_start_time, schedule_start_time,
schedule_end_time, schedule_end_time,
room_type user_id
)values( )values(
#{caseId}, #{caseId},
#{roomId}, #{roomId},
#{scheduleStartTime}, #{scheduleStartTime},
#{scheduleEndTime}, #{scheduleEndTime},
#{roomType} #{userId}
) )
</insert> </insert>
<delete id="deleteByRoomId"> <delete id="deleteByRoomId">
@@ -29,8 +29,8 @@
</foreach> </foreach>
</delete> </delete>
<select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference"> <select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference">
select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime,user_id userId
from reserved_conference where case_id=#{caseId} and room_type=1 from reserved_conference where case_id=#{caseId}
</select> </select>