解决修改部门报错

This commit is contained in:
18792927508
2024-04-26 09:14:11 +08:00
parent 86e209494f
commit e3fe728c6c
5 changed files with 17 additions and 18 deletions
@@ -271,7 +271,7 @@ public class CaseApplicationController extends BaseController {
@Log(title = "组庭审核", businessType = BusinessType.UPDATE) @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck") @PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralCheck(caseApplication)); return caseApplicationService.pendTralCheck(caseApplication);
} }
/** /**
@@ -315,13 +315,15 @@ public class SysUserServiceImpl implements ISysUserService {
Integer deptType = dept.getDeptType(); Integer deptType = dept.getDeptType();
if (deptType != null && deptType.intValue() == 1) { if (deptType != null && deptType.intValue() == 1) {
SysPost sysPost = postMapper.selectPostByPostCode("jbr"); SysPost sysPost = postMapper.selectPostByPostCode("jbr");
Long postId = sysPost.getPostId(); if(sysPost!=null) {
if (postIds.length > 0) { Long postId = sysPost.getPostId();
boolean isContain = Arrays.asList(postIds).contains(postId); if (postIds.length > 0) {
if (isContain) { boolean isContain = Arrays.asList(postIds).contains(postId);
List<SysUser> sysUsers = userMapper.selectUserByDeptId(deptId); if (isContain) {
if (sysUsers != null && sysUsers.size() > 0) { List<SysUser> sysUsers = userMapper.selectUserByDeptId(deptId);
return AjaxResult.error("部门类型为仲裁机构的部门的岗位为经办人的用户只能有一个!"); if (sysUsers != null && sysUsers.size() > 0) {
return AjaxResult.error("部门类型为仲裁机构的部门的岗位为经办人的用户只能有一个!");
}
} }
} }
} }
@@ -39,7 +39,7 @@ public interface ICaseApplicationService {
int pendingAppointArbotrar(CaseApplication caseApplication); int pendingAppointArbotrar(CaseApplication caseApplication);
int pendTralCheck(CaseApplication caseApplication); AjaxResult pendTralCheck(CaseApplication caseApplication);
int pendTralSure(CaseApplication caseApplication); int pendTralSure(CaseApplication caseApplication);
@@ -1802,7 +1802,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Override @Override
@Transactional @Transactional
public int pendTralCheck(CaseApplication caseApplication) { public AjaxResult pendTralCheck(CaseApplication caseApplication) {
// todo 需要传仲裁员id
Integer isAgreePendTral = caseApplication.getIsAgreePendTral(); Integer isAgreePendTral = caseApplication.getIsAgreePendTral();
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL); caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
int rows = 0; int rows = 0;
@@ -1841,7 +1842,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
} }
// 新增日志 // 新增日志
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, ""); insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
return rows; return success();
} }
@Override @Override
@@ -186,15 +186,11 @@ public class CaseZipImportImpl {
if(future.get()!=null){ if(future.get()!=null){
return success("导入成功"); return success("导入成功");
} }
} catch (InterruptedException e) { } catch (InterruptedException | ExecutionException e) {
e.printStackTrace(); e.printStackTrace();
return success("导入失败"); return error(e.getMessage());
} catch (ExecutionException e) {
e.printStackTrace();
return success("导入失败");
} }
return error("导入失败"); return error("导入失败");
} }