bug修改
This commit is contained in:
@@ -9,6 +9,10 @@ import java.util.List;
|
||||
|
||||
public class CaseApplication extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 查询案件时区分是否待办案件,0待办案件,1已办案件
|
||||
*/
|
||||
private String selectCaseStatus;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
@@ -26,6 +30,14 @@ public class CaseApplication extends BaseEntity {
|
||||
/** 仲裁方式 */
|
||||
private Integer arbitratMethod;
|
||||
|
||||
public String getSelectCaseStatus() {
|
||||
return selectCaseStatus;
|
||||
}
|
||||
|
||||
public void setSelectCaseStatus(String selectCaseStatus) {
|
||||
this.selectCaseStatus = selectCaseStatus;
|
||||
}
|
||||
|
||||
public Integer getArbitratMethod() {
|
||||
return arbitratMethod;
|
||||
}
|
||||
@@ -355,6 +367,10 @@ public class CaseApplication extends BaseEntity {
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 登录用户用户名
|
||||
*/
|
||||
private String loginUserName;
|
||||
private List<Long> deptIds;
|
||||
/**
|
||||
* 部门长状态
|
||||
@@ -365,6 +381,14 @@ public class CaseApplication extends BaseEntity {
|
||||
*/
|
||||
private Integer financeStatus;
|
||||
|
||||
public String getLoginUserName() {
|
||||
return loginUserName;
|
||||
}
|
||||
|
||||
public void setLoginUserName(String loginUserName) {
|
||||
this.loginUserName = loginUserName;
|
||||
}
|
||||
|
||||
public Integer getFinanceStatus() {
|
||||
return financeStatus;
|
||||
}
|
||||
|
||||
@@ -97,4 +97,11 @@ public interface CaseApplicationMapper {
|
||||
* @return
|
||||
*/
|
||||
Long selectCaseIdByRoomId(@Param("roomId")String roomId);
|
||||
|
||||
/**
|
||||
* 查询已办案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
|
||||
}
|
||||
|
||||
+46
-40
@@ -112,50 +112,56 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
Long userId = user.getUserId();
|
||||
// 查询登录人身份证号
|
||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
List<SysRole> roles = sysUser.getRoles();
|
||||
// 没有角色不能查看案件列表
|
||||
if(CollectionUtil.isEmpty(roles)){
|
||||
throw new ServiceException("该用户没有角色权限");
|
||||
}
|
||||
startPage();
|
||||
for (SysRole role : roles) {
|
||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
if(role.getRoleName().equals("超级管理员")
|
||||
){
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
// 已办案件
|
||||
if(caseApplication.getSelectCaseStatus().equals("1")){
|
||||
caseApplication.setLoginUserName(sysUser.getUserName());
|
||||
return caseApplicationMapper.selectHandledCase(caseApplication);
|
||||
}else { // 待办案件
|
||||
List<SysRole> roles = sysUser.getRoles();
|
||||
// 没有角色不能查看案件列表
|
||||
if (CollectionUtil.isEmpty(roles)) {
|
||||
throw new ServiceException("该用户没有角色权限");
|
||||
}
|
||||
if(role.getRoleName().equals("仲裁委")
|
||||
||role.getRoleName().equals("部门长")){
|
||||
List<Integer> caseStatusList=new ArrayList<>();
|
||||
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
caseApplication.setDeptHeadStatus(caseStatusList);
|
||||
startPage();
|
||||
for (SysRole role : roles) {
|
||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
if (role.getRoleName().equals("超级管理员")
|
||||
) {
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
}
|
||||
if (role.getRoleName().equals("仲裁委")
|
||||
|| role.getRoleName().equals("部门长")) {
|
||||
List<Integer> caseStatusList = new ArrayList<>();
|
||||
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
caseApplication.setDeptHeadStatus(caseStatusList);
|
||||
}
|
||||
if (role.getRoleName().equals("仲裁员")) {
|
||||
caseApplication.setUserId(String.valueOf(userId));
|
||||
}
|
||||
if (role.getRoleName().equals("财务")) {
|
||||
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
}
|
||||
if (role.getRoleName().equals("法律顾问")) {
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
caseApplication.setDeptIds(deptIds);
|
||||
}
|
||||
if (StrUtil.isEmpty(caseApplication.getNameId()) && role.getRoleName().equals("申请人")) {
|
||||
// 查询角色有关的用户部门
|
||||
caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
|
||||
}
|
||||
if (role.getRoleName().equals("被申请人")) {
|
||||
//
|
||||
caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
||||
}
|
||||
}
|
||||
if(role.getRoleName().equals("仲裁员")){
|
||||
caseApplication.setUserId(String.valueOf(userId));
|
||||
}
|
||||
if(role.getRoleName().equals("财务")){
|
||||
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
}
|
||||
if(role.getRoleName().equals("法律顾问")){
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
caseApplication.setDeptIds(deptIds);
|
||||
}
|
||||
if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
|
||||
// 查询角色有关的用户部门
|
||||
caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
|
||||
}
|
||||
if(role.getRoleName().equals("被申请人")){
|
||||
//
|
||||
caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
|
||||
-3
@@ -215,7 +215,6 @@ public class VideoServiceImpl implements VideoService {
|
||||
@Transactional
|
||||
public String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
|
||||
String staticAndMksDir = null;
|
||||
log.info("fileUrl========");
|
||||
if (fileUrl != null) {
|
||||
//下载时文件名称
|
||||
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
|
||||
@@ -224,7 +223,6 @@ public class VideoServiceImpl implements VideoService {
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
|
||||
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
||||
HttpUtil.downloadFile(fileUrl, staticAndMksDir );
|
||||
log.info("selectCaseIdByRoomId========");
|
||||
Long caseId= caseApplicationMapper.selectCaseIdByRoomId(roomId);
|
||||
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
||||
// 存入数据库
|
||||
@@ -233,7 +231,6 @@ public class VideoServiceImpl implements VideoService {
|
||||
.annexPath(RuoYiConfig.getVideoUploadPath())
|
||||
.annexType(9)
|
||||
.build();
|
||||
log.info("视频保存========");
|
||||
caseAttachMapper.save(caseAttach);
|
||||
return annexName;
|
||||
}
|
||||
|
||||
+1
-2
@@ -130,7 +130,6 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
|
||||
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
|
||||
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
||||
|
||||
if(sysUser!=null){
|
||||
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
||||
sysUser.setNickName(ientityAuthentication.getName());
|
||||
@@ -147,7 +146,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
sysUser.setUserName(ientityAuthentication.getUserName());
|
||||
sysUser.setPhonenumber(ientityAuthentication.getPhone());
|
||||
sysUser.setEmail(ientityAuthentication.getEmail());
|
||||
sysUser.setCreateBy(ientityAuthentication.getPhone());
|
||||
sysUser.setCreateBy(ientityAuthentication.getUserName());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
||||
int row = sysUserMapper.insertUser(sysUser);
|
||||
if(row<1) {
|
||||
|
||||
Reference in New Issue
Block a user