仲裁bug修复

This commit is contained in:
18792927508
2024-05-21 13:49:08 +08:00
parent 06ef88126b
commit 0f8ee6e6fe
4 changed files with 31 additions and 12 deletions
@@ -39,7 +39,7 @@ public interface VideoService {
* @param userId
* @return
*/
AjaxResult secretaryRoleByUserId(Long userId);
AjaxResult secretaryRoleByUserId(Long userId,Long caseId);
/**
* 根据html字符串转pdf并和案件关联
@@ -321,11 +321,28 @@ public class VideoServiceImpl implements VideoService {
}
@Override
public AjaxResult secretaryRoleByUserId(Long userId) {
public AjaxResult secretaryRoleByUserId(Long userId,Long caseId) {
CaseApplication application = new CaseApplication();
application.setId(caseId);
// 根据案件id查询案件
CaseApplication caseApplication = caseApplicationMapper.selectCaseApplication(application);
if(caseApplication==null){
return AjaxResult.error("案件不存在");
}
List<SysRole> roles = roleMapper.selectRolePermissionByUserId(userId);
JSONObject jsonObject = new JSONObject();
boolean isSecretaryRole=false;
if(CollectionUtil.isNotEmpty(roles)){
if(caseApplication.getArbitratorId()!=null&& Objects.equals(userId, caseApplication.getArbitratorId())){
// 是调解员
if(CollectionUtil.isNotEmpty(roles)){
for (SysRole role : roles) {
if("仲裁员".equals(role.getRoleName())){
isSecretaryRole=true;
break;
}
}
}
}else if(CollectionUtil.isNotEmpty(roles)){
for (SysRole role : roles) {
if("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName())){
isSecretaryRole=true;
@@ -108,7 +108,8 @@
update case_attach
<set>
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath},</if>
<if test="onlyOfficeFileId != null and onlyOfficeFileId != ''">only_office_file_id = #{onlyOfficeFileId}</if>
</set>
<where>
<if test="caseAppliId != null ">
@@ -117,6 +118,7 @@
<if test="annexType != null ">
AND annex_type = #{annexType}
</if>
</where>
</update>