仲裁系统bug修复
This commit is contained in:
+24
-1
@@ -2,6 +2,7 @@ package com.ruoyi.web.controller.wisdomarbitrate;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
@@ -101,6 +102,18 @@ public class AdjudicationController extends BaseController {
|
|||||||
}
|
}
|
||||||
return adjudicationService.createDocument(caseApplication);
|
return adjudicationService.createDocument(caseApplication);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 开庭审理,确定审理结果,生成裁决书
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/caseJudgment")
|
||||||
|
public AjaxResult caseJudgment(@Validated @RequestBody CaseApplication caseApplication){
|
||||||
|
if (caseApplication.getId() == null) {
|
||||||
|
return AjaxResult.error("案件id不能为空");
|
||||||
|
}
|
||||||
|
return adjudicationService.caseJudgment(caseApplication);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 批量生成裁决书
|
* 批量生成裁决书
|
||||||
* @param caseApplication
|
* @param caseApplication
|
||||||
@@ -174,7 +187,7 @@ public class AdjudicationController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量归档(暂时只改案件状态)
|
* 批量归档(暂时只改案件状态)
|
||||||
* @param batchCaseApplication
|
* @param caseApplication
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/caseFileBatch")
|
@PostMapping("/caseFileBatch")
|
||||||
@@ -240,5 +253,15 @@ public class AdjudicationController extends BaseController {
|
|||||||
|
|
||||||
return adjudicationService.emailByCaseId(id);
|
return adjudicationService.emailByCaseId(id);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 开庭审理提交,只改变案件状态为CaseApplicationConstants.VERPRIF_ARBITRATION
|
||||||
|
* @param id 案件id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/changeCaseStatus")
|
||||||
|
public AjaxResult changeCaseStatus(@RequestParam("id") Long id){
|
||||||
|
|
||||||
|
return adjudicationService.changeCaseStatus(id, CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.system.mapper.SysUserMapper;
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
@@ -26,11 +27,13 @@ public class ArbitratorController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
|
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(Arbitrator arbitrator)
|
public AjaxResult list(Arbitrator arbitrator)
|
||||||
{
|
{
|
||||||
startPage();
|
if(arbitrator.getCaseId()==null){
|
||||||
|
return AjaxResult.error("案件id不能为空");
|
||||||
|
}
|
||||||
List<SysUser> list = sysUserService.selectUserListByAdRole(arbitrator);
|
List<SysUser> list = sysUserService.selectUserListByAdRole(arbitrator);
|
||||||
return getDataTable(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -48,8 +48,8 @@ public class CaseApplicationController extends BaseController {
|
|||||||
if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
|
if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
|
||||||
caseApplication.setSelectCaseStatus("0");
|
caseApplication.setSelectCaseStatus("0");
|
||||||
}
|
}
|
||||||
startPage();
|
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
|
||||||
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
|
List<CaseApplication> list = caseApplicationService.page(caseApplication);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,6 +271,9 @@ 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) {
|
||||||
|
if(StrUtil.isEmpty(caseApplication.getArbitratorId())|| StrUtil.isEmpty(caseApplication.getArbitratorName())){
|
||||||
|
return error("请选择仲裁员");
|
||||||
|
}
|
||||||
return caseApplicationService.pendTralCheck(caseApplication);
|
return caseApplicationService.pendTralCheck(caseApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-20
@@ -4,52 +4,52 @@ package com.ruoyi.common.constant;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class CaseApplicationConstants {
|
public class CaseApplicationConstants {
|
||||||
/** 立案申请 */
|
/** 申请人/代理人,立案申请 */
|
||||||
public static final int CASE_APPLICATION = 0;
|
public static final int CASE_APPLICATION = 0;
|
||||||
/** 案件修改 */
|
/** 申请人/代理人,案件修改 */
|
||||||
public static final int CASE_EDIT = -1;
|
public static final int CASE_EDIT = -1;
|
||||||
/** 待立案审查 */
|
/** 顾问,待立案审查 */
|
||||||
public static final int CASE_CHECK = 1;
|
public static final int CASE_CHECK = 1;
|
||||||
/** 待缴费 */
|
/** 申请人、代理人,待缴费 */
|
||||||
public static final int PENDING_PAYMENT = 2;
|
public static final int PENDING_PAYMENT = 2;
|
||||||
/** 待缴费确认 */
|
/** 财务,待缴费确认 */
|
||||||
public static final int PENDING_PAYMENT_CONFIRM = 3;
|
public static final int PENDING_PAYMENT_CONFIRM = 3;
|
||||||
/** 待案件质证 */
|
/** 被申,待案件质证 */
|
||||||
public static final int CASE_CROSSEXAMI = 4;
|
public static final int CASE_CROSSEXAMI = 4;
|
||||||
|
|
||||||
/** 待组庭 */
|
/** 待定,待组庭 */
|
||||||
public static final int PENDING_TRIAL = 26;
|
public static final int PENDING_TRIAL = 26;
|
||||||
/** 待组庭审核 */
|
/** 顾问,待组庭审核 */
|
||||||
public static final int CONFIRMDED_PENDING_TRIAL_SUBMMIT = 5;
|
public static final int CONFIRMDED_PENDING_TRIAL_SUBMMIT = 5;
|
||||||
/** 待组庭确定 */
|
/** 部门长,待组庭确定 */
|
||||||
public static final int CONFIRMDED_PENDING_TRIAL = 6;
|
public static final int CONFIRMDED_PENDING_TRIAL = 6;
|
||||||
|
|
||||||
/** 待审核仲裁方式 */
|
/** 仲裁员,待审核仲裁方式 */
|
||||||
public static final int CHECK_ARBITRATION_METHOD = 7;
|
public static final int CHECK_ARBITRATION_METHOD = 7;
|
||||||
/** 待开庭审理 */
|
/** 申请人,被申,顾问,仲裁员,待开庭审理 */
|
||||||
public static final int PENDING_OPENCOURT_HEAR = 8;
|
public static final int PENDING_OPENCOURT_HEAR = 8;
|
||||||
/** 待书面审理 */
|
/** 申请人,被申,顾问,仲裁员,待书面审理 */
|
||||||
public static final int PENDING_WRIITEN_HEAR = 9;
|
public static final int PENDING_WRIITEN_HEAR = 9;
|
||||||
/** 待生成裁决书 */
|
/** 待生成裁决书 */
|
||||||
public static final int GENERATED_ARBITRATION = 10;
|
public static final int GENERATED_ARBITRATION = 10;
|
||||||
/**待秘书核验裁决书*/
|
/**顾问,待秘书核验裁决书*/
|
||||||
public static final int VERPRIF_ARBITRATION = 11;
|
public static final int VERPRIF_ARBITRATION = 11;
|
||||||
/**待部门长审核裁决书*/
|
/**部门长,待部门长审核裁决书*/
|
||||||
public static final int CHECK_ARBITRATION = 12;
|
public static final int CHECK_ARBITRATION = 12;
|
||||||
/**待裁决书签名*/
|
/**仲裁员,待裁决书签名*/
|
||||||
public static final int SIGN_ARBITRATION = 13;
|
public static final int SIGN_ARBITRATION = 13;
|
||||||
/** 待裁决书用印 */
|
/** 顾问,待裁决书用印 */
|
||||||
public static final int ARBITRATED_SEAL = 14;
|
public static final int ARBITRATED_SEAL = 14;
|
||||||
/** 待裁决书送达 */
|
/** 顾问,待裁决书送达 */
|
||||||
public static final int ARBITRATION_DELIVERY = 15;
|
public static final int ARBITRATION_DELIVERY = 15;
|
||||||
/** 待案件归档*/
|
/** 顾问,待案件归档*/
|
||||||
public static final int CASE_FILING = 16;
|
public static final int CASE_FILING = 16;
|
||||||
/** 已归档*/
|
/** 已归档*/
|
||||||
public static final int CASE_ARCHIVED = 17;
|
public static final int CASE_ARCHIVED = 17;
|
||||||
|
|
||||||
/** 待修改开庭时间*/
|
/** 顾问,待修改开庭时间*/
|
||||||
public static final int MODIFY_HEARDATE = 31;
|
public static final int MODIFY_HEARDATE = 31;
|
||||||
/**待仲裁员审核裁决书*/
|
/**仲裁员,待仲裁员审核裁决书*/
|
||||||
public static final int HEAD_CHECK_ARBITRATION = 18;
|
public static final int HEAD_CHECK_ARBITRATION = 18;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ public interface ISysUserService
|
|||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
public List<SysUser> selectUserList(SysUser user);
|
public List<SysUser> selectUserList(SysUser user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询仲裁员
|
||||||
|
* @param arbitrator
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
|
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,11 +6,14 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.system.mapper.*;
|
import com.ruoyi.system.mapper.*;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -65,6 +68,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseApplicationMapper caseApplicationMapper;
|
private CaseApplicationMapper caseApplicationMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseAffiliateMapper caseAffiliateMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected Validator validator;
|
protected Validator validator;
|
||||||
@@ -81,21 +86,45 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
return userMapper.selectUserList(user);
|
return userMapper.selectUserList(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询仲裁员
|
||||||
|
* @param arbitrator
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
|
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
|
||||||
|
// 根据案件id查询案件
|
||||||
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
|
caseAffiliate.setCaseAppliId(arbitrator.getCaseId());
|
||||||
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||||
|
List<String> phoneList=new ArrayList<>();
|
||||||
|
if(CollectionUtil.isNotEmpty(caseAffiliates)){
|
||||||
|
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||||
|
if(StrUtil.isNotEmpty(affiliate.getContactTelphone())) {
|
||||||
|
phoneList.add(affiliate.getContactTelphone());
|
||||||
|
}
|
||||||
|
if(StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
||||||
|
phoneList.add(affiliate.getContactTelphoneAgent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
|
List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
|
||||||
if(sysUsers!=null&&sysUsers.size()>0){
|
List<SysUser> arbitrators = new ArrayList<>();
|
||||||
|
if(CollectionUtil.isNotEmpty(sysUsers)){
|
||||||
for(SysUser sysUser: sysUsers){
|
for(SysUser sysUser: sysUsers){
|
||||||
Long userId = sysUser.getUserId();
|
if(!phoneList.contains(sysUser.getPhonenumber())) {
|
||||||
int casenum = caseApplicationMapper.selectCasenum(userId.toString());
|
Long userId = sysUser.getUserId();
|
||||||
String nickName = sysUser.getNickName();
|
int todoCount = caseApplicationMapper.selectCasenum(userId.toString());
|
||||||
String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
|
String nickName = sysUser.getNickName();
|
||||||
sysUser.setNickNameAndNum(nickNamenew);
|
String nickNamenew = nickName + "(待办案件数量" + todoCount + "个)";
|
||||||
|
sysUser.setNickNameAndNum(nickNamenew);
|
||||||
|
arbitrators.add(sysUser);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sysUsers;
|
return arbitrators;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ public class Arbitrator extends BaseEntity {
|
|||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 案件id
|
||||||
|
*/
|
||||||
|
private Long caseId;
|
||||||
/** 仲裁员姓名 */
|
/** 仲裁员姓名 */
|
||||||
private String arbitratorName;
|
private String arbitratorName;
|
||||||
/** 职称 */
|
/** 职称 */
|
||||||
@@ -47,6 +51,14 @@ public class Arbitrator extends BaseEntity {
|
|||||||
/** 已结案数量 */
|
/** 已结案数量 */
|
||||||
private int closedCaseNum;
|
private int closedCaseNum;
|
||||||
|
|
||||||
|
public Long getCaseId() {
|
||||||
|
return caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCaseId(Long caseId) {
|
||||||
|
this.caseId = caseId;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,6 +193,10 @@ public class CaseApplication extends BaseEntity {
|
|||||||
* 登录用户用户名
|
* 登录用户用户名
|
||||||
*/
|
*/
|
||||||
private String loginUserName;
|
private String loginUserName;
|
||||||
|
/**
|
||||||
|
* 登录人电话
|
||||||
|
*/
|
||||||
|
private String loginUserPhone;
|
||||||
private List<Long> deptIds;
|
private List<Long> deptIds;
|
||||||
/**
|
/**
|
||||||
* 部门长状态
|
* 部门长状态
|
||||||
@@ -428,4 +432,8 @@ public class CaseApplication extends BaseEntity {
|
|||||||
private String userName;
|
private String userName;
|
||||||
// 缴费确认驳回原因
|
// 缴费确认驳回原因
|
||||||
private String payRejectReason;
|
private String payRejectReason;
|
||||||
|
/**
|
||||||
|
* 仲裁员确认裁决书驳回
|
||||||
|
*/
|
||||||
|
private String arbitrateReject;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-1
@@ -67,7 +67,9 @@ public interface CaseApplicationMapper {
|
|||||||
ToDoCount selectAdminCaseToDoCount();
|
ToDoCount selectAdminCaseToDoCount();
|
||||||
|
|
||||||
|
|
||||||
ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
|
ToDoCount selectTodoCountByRole(@Param("caseApplication") CaseApplication caseApplication,
|
||||||
|
@Param("caseStatusList") List<Integer> caseStatusList,
|
||||||
|
@Param("roleNames") List<String> roleNames);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改案件锁定状态
|
* 修改案件锁定状态
|
||||||
@@ -138,4 +140,13 @@ public interface CaseApplicationMapper {
|
|||||||
List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
|
List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
|
||||||
|
|
||||||
List<CaseApplication> selectAdminCaseApplicationListBatch1(CaseApplication caseApplication);
|
List<CaseApplication> selectAdminCaseApplicationListBatch1(CaseApplication caseApplication);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件列表查询
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
|
||||||
|
@Param("caseStatusList") List<Integer> caseStatusList,
|
||||||
|
@Param("roleNames") List<String> roleNames);
|
||||||
}
|
}
|
||||||
|
|||||||
+16
@@ -67,4 +67,20 @@ public interface IAdjudicationService {
|
|||||||
AjaxResult caseFileBatch(Integer batchNumber);
|
AjaxResult caseFileBatch(Integer batchNumber);
|
||||||
|
|
||||||
AjaxResult serviceBatch(Integer batchNumber) throws EsignDemoException, IOException;
|
AjaxResult serviceBatch(Integer batchNumber) throws EsignDemoException, IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开庭审理,确定审理结果,生成裁决书
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult caseJudgment(CaseApplication caseApplication);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件状态改变
|
||||||
|
* @param id 案件id
|
||||||
|
* @param caseStatus 案件状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
AjaxResult changeCaseStatus(Long id, Integer caseStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -139,6 +139,8 @@ public interface ICaseApplicationService {
|
|||||||
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
|
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
|
||||||
|
|
||||||
List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
|
List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
|
||||||
|
public List<CaseApplication> page(CaseApplication caseApplication) ;
|
||||||
|
|
||||||
|
|
||||||
int submitCaseApplicationBatch(String batchNumber);
|
int submitCaseApplicationBatch(String batchNumber);
|
||||||
|
|
||||||
|
|||||||
+153
-6
@@ -132,13 +132,18 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
// 日期格式化年月日
|
// 日期格式化年月日
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成裁决书
|
||||||
|
* @param caseApplicationReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult createDocument(CaseApplication caseApplicationReq) {
|
public AjaxResult createDocument(CaseApplication caseApplicationReq) {
|
||||||
|
// todo 生成裁决书单独出接口,即确定审理结果接口,提交按钮只改变案件状态和生成签名链接
|
||||||
String templatePath = "";
|
String templatePath = "";
|
||||||
String templateName = "";
|
String templateName = "";
|
||||||
String agentName = "";
|
|
||||||
String resName = "";
|
|
||||||
try {
|
try {
|
||||||
Map<String, Object> datas = new HashMap<>();
|
Map<String, Object> datas = new HashMap<>();
|
||||||
Long id = caseApplicationReq.getId();
|
Long id = caseApplicationReq.getId();
|
||||||
@@ -214,7 +219,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
// 遍历书签,给书签赋值
|
// 遍历书签,给书签赋值
|
||||||
replaceBookmark(bookmarkList, datas, valueMap);
|
replaceBookmark(bookmarkList, datas, valueMap);
|
||||||
// 根据条件替换书签
|
// 根据条件替换书签
|
||||||
conditionReplaceBookmark(caseApplicationById, datas, agentName, resName, arbitrateRecordSelect);
|
conditionReplaceBookmark(caseApplicationById, datas, "", "", arbitrateRecordSelect);
|
||||||
// 裁决书生成时间
|
// 裁决书生成时间
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
String year = Integer.toString(now.getYear());
|
String year = Integer.toString(now.getYear());
|
||||||
@@ -250,7 +255,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||||
// 保存裁决书附件
|
// 保存裁决书附件
|
||||||
saveArbitorFile(id, saveName, savePath, caseApplicationById, arbitrateRecordSelect);
|
saveArbitorFile(id, saveName, savePath, caseApplicationById, arbitrateRecordSelect,CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||||
|
|
||||||
return AjaxResult.success("裁决书已生成");
|
return AjaxResult.success("裁决书已生成");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -565,8 +570,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
* @param savePath 保存路径
|
* @param savePath 保存路径
|
||||||
* @param caseApplicationById 案件基本信息
|
* @param caseApplicationById 案件基本信息
|
||||||
* @param arbitrateRecordSelect 出裁决书生成记录
|
* @param arbitrateRecordSelect 出裁决书生成记录
|
||||||
|
* @param caseStatus 案件状态,不为空则更新案件状态
|
||||||
*/
|
*/
|
||||||
private void saveArbitorFile(Long id, String saveName, String savePath, CaseApplication caseApplicationById, ArbitrateRecord arbitrateRecordSelect) {
|
private void saveArbitorFile(Long id, String saveName, String savePath, CaseApplication caseApplicationById, ArbitrateRecord arbitrateRecordSelect,Integer caseStatus) {
|
||||||
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id).annexName(saveName).annexPath(savePath).annexType(3).build();
|
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id).annexName(saveName).annexPath(savePath).annexType(3).build();
|
||||||
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
|
||||||
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
|
||||||
@@ -586,7 +592,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//修改案件状态
|
//修改案件状态
|
||||||
caseApplicationById.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
if(caseStatus!=null) {
|
||||||
|
caseApplicationById.setCaseStatus(caseStatus);
|
||||||
|
}
|
||||||
Integer arbitratMethod = caseApplicationById.getArbitratMethod();
|
Integer arbitratMethod = caseApplicationById.getArbitratMethod();
|
||||||
if (arbitratMethod == 1) {
|
if (arbitratMethod == 1) {
|
||||||
caseApplicationById.setLockStatus(1);
|
caseApplicationById.setLockStatus(1);
|
||||||
@@ -1769,6 +1777,145 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
throw new ServiceException("这个批号没有批量送达裁决书的案件");
|
throw new ServiceException("这个批号没有批量送达裁决书的案件");
|
||||||
}
|
}
|
||||||
return AjaxResult.success("裁决书送达成功");
|
return AjaxResult.success("裁决书送达成功");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开庭审理,确定审理结果,生成裁决书
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult caseJudgment(CaseApplication req) {
|
||||||
|
//获取案件详细信息
|
||||||
|
CaseApplication caseApplicationById = caseApplicationService.selectCaseApplication(req);
|
||||||
|
if (caseApplicationById == null) {
|
||||||
|
return AjaxResult.error("案件不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (caseApplicationById.getTemplateId() == null) {
|
||||||
|
return AjaxResult.error("请先指定裁决书模板");
|
||||||
|
}
|
||||||
|
// 根据模板id查找对应的模板
|
||||||
|
TemplateManage templateManage = new TemplateManage();
|
||||||
|
templateManage.setId(caseApplicationById.getTemplateId());
|
||||||
|
List<TemplateManage> templateManages = templateManageMapper.selectTemplateList(templateManage);
|
||||||
|
if (CollectionUtil.isEmpty(templateManages)) {
|
||||||
|
return AjaxResult.error("请先指定裁决书模板");
|
||||||
|
}
|
||||||
|
String templatePath = templateManages.get(0).getTemOrigPath();
|
||||||
|
if (StrUtil.isEmpty(templatePath)) {
|
||||||
|
return AjaxResult.error("未找到该模板");
|
||||||
|
}
|
||||||
|
templatePath = "/home/ruoyi/" + templatePath;
|
||||||
|
try {
|
||||||
|
File file = new File(templatePath);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error("未找到该模板");
|
||||||
|
}
|
||||||
|
// 查询案件相关表信息
|
||||||
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
|
caseAffiliate.setCaseAppliId(req.getId());
|
||||||
|
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||||
|
if(CollectionUtil.isEmpty(caseAffiliates)){
|
||||||
|
return AjaxResult.error("未找到案件相关人员");
|
||||||
|
}
|
||||||
|
// 在系统表中查询案件内置字段
|
||||||
|
SysDictData sysDictData = new SysDictData();
|
||||||
|
sysDictData.setDictType("case_built_type");
|
||||||
|
List<SysDictData> dictDataList = dictDataMapper.selectDictDataList(sysDictData);
|
||||||
|
// 根据模板id查询抓取规则,判断从主表取值还是从columnValue值取
|
||||||
|
List<FatchRule> fatchRuleList = fatchRuleMapper.listByTemplateId(caseApplicationById.getTemplateId());
|
||||||
|
// 抓取规则,0-内置字段,1-自定义字段
|
||||||
|
Map<Integer, List<FatchRule>> fatchRuleMap = new HashMap<>();
|
||||||
|
// 裁决书需要的字段和内容,占位符需要配置成中文
|
||||||
|
Map<String, String> valueMap = new HashMap<>();
|
||||||
|
// 如果未设置抓取规则,则从主表取数据,设置内置字段值
|
||||||
|
if (CollectionUtil.isNotEmpty(fatchRuleList)) {
|
||||||
|
fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
|
||||||
|
}
|
||||||
|
// 自定义字段,从columnValue值取
|
||||||
|
if (fatchRuleMap.size() > 0 && fatchRuleMap.containsKey(1)) {
|
||||||
|
// 根据案件id查询key-value表
|
||||||
|
List<ColumnValue> columnValueList = columnValueMapper.listByCaseId(req.getId());
|
||||||
|
if (CollectionUtil.isNotEmpty(columnValueList)) {
|
||||||
|
columnValueList.forEach(columnValue -> valueMap.put(columnValue.getName(), columnValue.getValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 组装内置字段,在主表中查出内容
|
||||||
|
buildDefaultColumnValue(dictDataList, caseAffiliates, valueMap, caseApplicationById);
|
||||||
|
|
||||||
|
// 获取模板中的占位符key
|
||||||
|
List<String> bookmarkList = getBookmarkByDocx(templatePath);
|
||||||
|
if (CollectionUtil.isEmpty(bookmarkList)) {
|
||||||
|
return AjaxResult.success("请检查模板是否配置正确,未获取到占位符");
|
||||||
|
}
|
||||||
|
//获取仲裁记录表里的相关信息
|
||||||
|
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
|
||||||
|
arbitrateRecord.setCaseAppliId(req.getId());
|
||||||
|
ArbitrateRecord arbitrateRecordSelect = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||||
|
|
||||||
|
Map<String, Object> datas = new HashMap<>();
|
||||||
|
// 遍历书签,给书签赋值
|
||||||
|
replaceBookmark(bookmarkList, datas, valueMap);
|
||||||
|
// 根据条件替换书签
|
||||||
|
conditionReplaceBookmark(caseApplicationById, datas,"", "", arbitrateRecordSelect);
|
||||||
|
// 裁决书生成时间
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
String year = Integer.toString(now.getYear());
|
||||||
|
datas.put("裁决书生成时间", year);
|
||||||
|
//生成编码
|
||||||
|
String equipmentNo = getNewEquipmentNo();
|
||||||
|
// 裁决书编号
|
||||||
|
datas.put("裁决书编号", equipmentNo);
|
||||||
|
// 仲裁费
|
||||||
|
datas.put("仲裁费", caseApplicationById.getFeePayable() != null ? caseApplicationById.getFeePayable().toString() : "");
|
||||||
|
// 案件创建时间
|
||||||
|
Date createTime = caseApplicationById.getCreateTime();
|
||||||
|
// 将日期格式化为字符串
|
||||||
|
String createTimeStr = sdf.format(createTime);
|
||||||
|
datas.put("案件创建时间", createTimeStr);
|
||||||
|
// 立案日期
|
||||||
|
Date registerDate = caseApplicationById.getRegisterDate();
|
||||||
|
String registerDateStr = sdf.format(registerDate);
|
||||||
|
datas.put("立案日期", registerDateStr);
|
||||||
|
|
||||||
|
|
||||||
|
String month = String.format("%02d", now.getMonthValue());
|
||||||
|
String day = String.format("%02d", now.getDayOfMonth());
|
||||||
|
// todo
|
||||||
|
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||||
|
// String saveFolderPath = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||||
|
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||||
|
// todo
|
||||||
|
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
|
// String saveName = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
|
// 将word中的标签替换掉,生成新的word
|
||||||
|
String docFilePath = null;
|
||||||
|
try {
|
||||||
|
docFilePath = wordChangeText(templatePath, datas, saveFolderPath, fileName);
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new ServiceException("生成裁决书失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||||
|
// 保存裁决书附件
|
||||||
|
saveArbitorFile(req.getId(), saveName, savePath, caseApplicationById, arbitrateRecordSelect,null);
|
||||||
|
|
||||||
|
return AjaxResult.success("裁决书已生成");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public AjaxResult changeCaseStatus(Long id, Integer caseStatus) {
|
||||||
|
if (id == null || caseStatus == null) {
|
||||||
|
return AjaxResult.error("参数校验失败");
|
||||||
|
}
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(id);
|
||||||
|
caseApplication.setCaseStatus(caseStatus);
|
||||||
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+266
-83
@@ -369,81 +369,274 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
@Override
|
* 分页查询
|
||||||
public ToDoCount selectToDoCount() {
|
* 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
|
||||||
|
* 2.申请人,被申请人:可以看到自己相关的案件(案件有被申请人相关的信息)
|
||||||
|
* 3.仲裁员:案件选定了某个仲裁员后,该仲裁员就可以查看该案件
|
||||||
|
* 4.超级管理员,法律顾问秘书,仲裁委(部门长):可以查看所有案件
|
||||||
|
*
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<CaseApplication> page(CaseApplication caseApplication) {
|
||||||
|
List<CaseApplication> caseApplications= new ArrayList<>();
|
||||||
|
// todo 案件列表查询Bug修复,需要看见已办案件
|
||||||
// 获取登录用户
|
// 获取登录用户
|
||||||
LoginUser loginUser = getLoginUser();
|
LoginUser loginUser = getLoginUser();
|
||||||
SysUser user = loginUser.getUser();
|
SysUser user = loginUser.getUser();
|
||||||
Long userId = user.getUserId();
|
Long userId = user.getUserId();
|
||||||
|
// 查询登录人,根据邮箱查询
|
||||||
// 查询登录人信息
|
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||||
|
if(sysUser==null){
|
||||||
|
throw new ServiceException("未获取到登录用户信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
List<SysRole> roles = sysUser.getRoles();
|
List<SysRole> roles = sysUser.getRoles();
|
||||||
// 没有角色不能查看案件列表
|
// 没有角色不能查看案件列表
|
||||||
if (CollectionUtil.isEmpty(roles)) {
|
if (CollectionUtil.isEmpty(roles)) {
|
||||||
throw new ServiceException("该用户没有角色权限");
|
throw new ServiceException("该用户没有角色权限");
|
||||||
}
|
}
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
|
||||||
List<Integer> caseStatusList = new ArrayList<>();
|
List<Integer> caseStatusList = new ArrayList<>();
|
||||||
|
List<String> roleNames = roles.stream().map(SysRole::getRoleName).collect(Collectors.toList());
|
||||||
|
startPage();
|
||||||
for (SysRole role : roles) {
|
for (SysRole role : roles) {
|
||||||
if (StrUtil.isEmpty(role.getRoleName())) {
|
if(StrUtil.isEmpty(role.getRoleName())){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
// 查看所有权限
|
||||||
if (role.getRoleName().equals("超级管理员")
|
if("超级管理员".equals(role.getRoleName())){
|
||||||
) {
|
caseApplications = caseApplicationMapper.list(caseApplication,caseStatusList,null);
|
||||||
return caseApplicationMapper.selectAdminCaseToDoCount();
|
setArbitorMethod(caseApplications);
|
||||||
|
return caseApplications;
|
||||||
|
}
|
||||||
|
caseApplication.setLoginUserName(sysUser.getUserName());
|
||||||
|
caseApplication.setLoginUserPhone(sysUser.getPhonenumber());
|
||||||
|
if("申请人".equals(role.getRoleName())){
|
||||||
|
// 申请人在生成裁决书之前都可以修改案件
|
||||||
|
Integer[] array = {0,-1,1,2,3,4,5,6,7,8,9,10,31};
|
||||||
|
caseStatusList.addAll(Arrays.asList(array));
|
||||||
|
}
|
||||||
|
if("被申请人".equals(role.getRoleName())) {
|
||||||
|
// 案件质证,开庭审理,书面审理
|
||||||
|
caseStatusList.add(4);
|
||||||
|
caseStatusList.add(8);
|
||||||
|
caseStatusList.add(9);
|
||||||
|
}
|
||||||
|
if("仲裁员".equals(role.getRoleName())){
|
||||||
|
Integer[] array = {7,8,9,13,18};
|
||||||
|
caseStatusList.addAll(Arrays.asList(array));
|
||||||
|
caseApplication.setArbitratorId(String.valueOf(sysUser.getUserId()));
|
||||||
}
|
}
|
||||||
if ("仲裁委".equals(role.getRoleName())
|
if ("仲裁委".equals(role.getRoleName())
|
||||||
|| "部门长".equals(role.getRoleName())) {
|
|| "部门长".equals(role.getRoleName())) {
|
||||||
caseApplication.setIsOtherRole(1);
|
// 组庭确定,部门长审核裁决书
|
||||||
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||||
caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
||||||
// caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
|
||||||
caseApplication.setDeptHeadStatus(caseStatusList);
|
|
||||||
}
|
|
||||||
if ("仲裁员".equals(role.getRoleName())) {
|
|
||||||
caseApplication.setIsOtherRole(1);
|
|
||||||
caseApplication.setUserId(String.valueOf(userId));
|
|
||||||
}
|
}
|
||||||
if ("财务".equals(role.getRoleName())) {
|
if ("财务".equals(role.getRoleName())) {
|
||||||
caseApplication.setIsOtherRole(1);
|
caseStatusList.add(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||||
caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
|
||||||
}
|
}
|
||||||
if ("法律顾问".equals(role.getRoleName())) {
|
if ("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName()) ) {
|
||||||
// 查询角色有关的用户部门
|
Integer[] array = {1,5,8,9,11,14,15,16,31};
|
||||||
// List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
caseStatusList.addAll(Arrays.asList(array));
|
||||||
List<Long> deptIds = new ArrayList<>();
|
|
||||||
deptIds.add(sysUser.getDeptId());
|
|
||||||
caseApplication.setDeptIds(deptIds);
|
|
||||||
}
|
}
|
||||||
if ("申请人".equals(role.getRoleName())) {
|
}
|
||||||
caseApplication.setIsOtherRole(1);
|
caseApplications = caseApplicationMapper.list(caseApplication,caseStatusList, roleNames);
|
||||||
// 查询角色有关的用户部门
|
setArbitorMethod(caseApplications);
|
||||||
caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
|
return caseApplications;
|
||||||
}
|
|
||||||
if ("被申请人".equals(role.getRoleName())) {
|
}
|
||||||
caseApplication.setIsOtherRole(1);
|
|
||||||
//
|
/**
|
||||||
caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
* 设置仲裁方式
|
||||||
}
|
* @param caseApplications
|
||||||
if ("代理人".equals(role.getRoleName())) {
|
*/
|
||||||
caseApplication.setIsOtherRole(1);
|
private void setArbitorMethod(List<CaseApplication> caseApplications) {
|
||||||
// 查询角色有关的用户部门
|
|
||||||
// List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
if(CollectionUtil.isEmpty(caseApplications)){
|
||||||
List<Long> agentDeptIds = new ArrayList<>();
|
return;
|
||||||
agentDeptIds.add(sysUser.getDeptId());
|
}
|
||||||
caseApplication.setAgentDeptIds(agentDeptIds);
|
for(CaseApplication caseApplicationsel : caseApplications){
|
||||||
|
Integer caseStatus = caseApplicationsel.getCaseStatus();
|
||||||
|
if(caseStatus.intValue() == CaseApplicationConstants.CHECK_ARBITRATION_METHOD){
|
||||||
|
Integer applicantIsWrittenHear = caseApplicationsel.getApplicantIsWrittenHear();
|
||||||
|
Integer respondentIsWrittenHear = caseApplicationsel.getRespondentIsWrittenHear();
|
||||||
|
if(applicantIsWrittenHear!=null&&respondentIsWrittenHear!=null){
|
||||||
|
if(applicantIsWrittenHear.intValue()==respondentIsWrittenHear.intValue()){
|
||||||
|
caseApplicationsel.setArbitraMethodIssame(1);
|
||||||
|
if(applicantIsWrittenHear.intValue()==1&&respondentIsWrittenHear.intValue()==1){
|
||||||
|
caseApplicationsel.setArbitratMethod(2);
|
||||||
|
}else {
|
||||||
|
caseApplicationsel.setArbitratMethod(1);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
caseApplicationsel.setArbitraMethodIssame(2);
|
||||||
|
String applicantarbitratMethod = "";
|
||||||
|
String respondentbitratMethod = "";
|
||||||
|
if(applicantIsWrittenHear.intValue()==1){
|
||||||
|
applicantarbitratMethod = "书面审理";
|
||||||
|
}else {
|
||||||
|
applicantarbitratMethod = "开庭审理";
|
||||||
|
}
|
||||||
|
if(respondentIsWrittenHear.intValue()==1){
|
||||||
|
respondentbitratMethod = "书面审理";
|
||||||
|
}else {
|
||||||
|
respondentbitratMethod = "开庭审理";
|
||||||
|
}
|
||||||
|
String arbitratMethodIllustrate = "当前案件开庭方式:申请人选择开庭方式为"+applicantarbitratMethod+
|
||||||
|
"被申请人选择开庭方式为"+respondentbitratMethod+",请确定开庭方式。";
|
||||||
|
caseApplicationsel.setArbitratMethodIllustrate(arbitratMethodIllustrate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ToDoCount selectToDoCount() {
|
||||||
|
|
||||||
|
// // 获取登录用户
|
||||||
|
// LoginUser loginUser = getLoginUser();
|
||||||
|
// SysUser user = loginUser.getUser();
|
||||||
|
// Long userId = user.getUserId();
|
||||||
|
//
|
||||||
|
// // 查询登录人信息
|
||||||
|
// SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||||
|
// List<SysRole> roles = sysUser.getRoles();
|
||||||
|
// // 没有角色不能查看案件列表
|
||||||
|
// if (CollectionUtil.isEmpty(roles)) {
|
||||||
|
// throw new ServiceException("该用户没有角色权限");
|
||||||
|
// }
|
||||||
|
// CaseApplication caseApplication = new CaseApplication();
|
||||||
|
// List<Integer> caseStatusList = new ArrayList<>();
|
||||||
|
// for (SysRole role : roles) {
|
||||||
|
// if (StrUtil.isEmpty(role.getRoleName())) {
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||||
|
// if (role.getRoleName().equals("超级管理员")
|
||||||
|
// ) {
|
||||||
|
// return caseApplicationMapper.selectAdminCaseToDoCount();
|
||||||
|
// }
|
||||||
|
// if ("仲裁委".equals(role.getRoleName())
|
||||||
|
// || "部门长".equals(role.getRoleName())) {
|
||||||
|
// caseApplication.setIsOtherRole(1);
|
||||||
|
// caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||||
|
// caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
||||||
|
// // caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||||
|
// caseApplication.setDeptHeadStatus(caseStatusList);
|
||||||
|
// }
|
||||||
|
// if ("仲裁员".equals(role.getRoleName())) {
|
||||||
|
// caseApplication.setIsOtherRole(1);
|
||||||
|
// caseApplication.setUserId(String.valueOf(userId));
|
||||||
|
// }
|
||||||
|
// if ("财务".equals(role.getRoleName())) {
|
||||||
|
// caseApplication.setIsOtherRole(1);
|
||||||
|
// caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||||
|
// }
|
||||||
|
// if ("法律顾问".equals(role.getRoleName())) {
|
||||||
|
// // 查询角色有关的用户部门
|
||||||
|
// // List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||||
|
// List<Long> deptIds = new ArrayList<>();
|
||||||
|
// deptIds.add(sysUser.getDeptId());
|
||||||
|
// caseApplication.setDeptIds(deptIds);
|
||||||
|
// }
|
||||||
|
// if ("申请人".equals(role.getRoleName())) {
|
||||||
|
// caseApplication.setIsOtherRole(1);
|
||||||
|
// // 查询角色有关的用户部门
|
||||||
|
// caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
|
||||||
|
// }
|
||||||
|
// if ("被申请人".equals(role.getRoleName())) {
|
||||||
|
// caseApplication.setIsOtherRole(1);
|
||||||
|
// //
|
||||||
|
// caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
||||||
|
// }
|
||||||
|
// if ("代理人".equals(role.getRoleName())) {
|
||||||
|
// caseApplication.setIsOtherRole(1);
|
||||||
|
// // 查询角色有关的用户部门
|
||||||
|
// // List<Long> agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||||
|
// List<Long> agentDeptIds = new ArrayList<>();
|
||||||
|
// agentDeptIds.add(sysUser.getDeptId());
|
||||||
|
// caseApplication.setAgentDeptIds(agentDeptIds);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||||
|
// ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
|
||||||
|
// if (toDoCount == null) {
|
||||||
|
// return new ToDoCount();
|
||||||
|
// }
|
||||||
|
LoginUser loginUser = getLoginUser();
|
||||||
|
SysUser user = loginUser.getUser();
|
||||||
|
Long userId = user.getUserId();
|
||||||
|
// 查询登录人,根据邮箱查询
|
||||||
|
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||||
|
if(sysUser==null){
|
||||||
|
throw new ServiceException("未获取到登录用户信息");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
List<SysRole> roles = sysUser.getRoles();
|
||||||
ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
|
// 没有角色不能查看案件列表
|
||||||
if (toDoCount == null) {
|
if (CollectionUtil.isEmpty(roles)) {
|
||||||
return new ToDoCount();
|
throw new ServiceException("该用户没有角色权限");
|
||||||
|
}
|
||||||
|
List<Integer> caseStatusList = new ArrayList<>();
|
||||||
|
List<String> roleNames = roles.stream().map(SysRole::getRoleName).collect(Collectors.toList());
|
||||||
|
ToDoCount toDoCount=null;
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
for (SysRole role : roles) {
|
||||||
|
if(StrUtil.isEmpty(role.getRoleName())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 查看所有权限
|
||||||
|
if("超级管理员".equals(role.getRoleName())){
|
||||||
|
toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication,caseStatusList,null);
|
||||||
|
if(toDoCount==null){
|
||||||
|
toDoCount=new ToDoCount();
|
||||||
|
}
|
||||||
|
return toDoCount;
|
||||||
|
}
|
||||||
|
caseApplication.setLoginUserName(sysUser.getUserName());
|
||||||
|
caseApplication.setLoginUserPhone(sysUser.getPhonenumber());
|
||||||
|
|
||||||
|
if("申请人".equals(role.getRoleName())){
|
||||||
|
// 申请人在生成裁决书之前都可以修改案件
|
||||||
|
Integer[] array = {0,-1,1,2,3,4,5,6,7,8,9,10,31};
|
||||||
|
caseStatusList.addAll(Arrays.asList(array));
|
||||||
|
}
|
||||||
|
if("被申请人".equals(role.getRoleName())) {
|
||||||
|
// 案件质证,开庭审理,书面审理
|
||||||
|
caseStatusList.add(4);
|
||||||
|
caseStatusList.add(8);
|
||||||
|
caseStatusList.add(9);
|
||||||
|
}
|
||||||
|
if("仲裁员".equals(role.getRoleName())){
|
||||||
|
Integer[] array = {7,8,9,13,18};
|
||||||
|
caseStatusList.addAll(Arrays.asList(array));
|
||||||
|
caseApplication.setArbitratorId(String.valueOf(sysUser.getUserId()));
|
||||||
|
}
|
||||||
|
if ("仲裁委".equals(role.getRoleName())
|
||||||
|
|| "部门长".equals(role.getRoleName())) {
|
||||||
|
// 组庭确定,部门长审核裁决书
|
||||||
|
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||||
|
caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
|
||||||
|
}
|
||||||
|
if ("财务".equals(role.getRoleName())) {
|
||||||
|
caseStatusList.add(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||||
|
}
|
||||||
|
if ("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName()) ) {
|
||||||
|
Integer[] array = {1,5,8,9,11,14,15,16,31};
|
||||||
|
caseStatusList.addAll(Arrays.asList(array));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication,caseStatusList,roleNames);
|
||||||
|
if(toDoCount==null){
|
||||||
|
toDoCount=new ToDoCount();
|
||||||
}
|
}
|
||||||
return toDoCount;
|
return toDoCount;
|
||||||
}
|
}
|
||||||
@@ -456,6 +649,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseLogRecord.setCaseAppliId(id);
|
caseLogRecord.setCaseAppliId(id);
|
||||||
List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
||||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
|
// 当前案件节点
|
||||||
Integer caseStatus = caseApplicationselect.getCaseStatus();
|
Integer caseStatus = caseApplicationselect.getCaseStatus();
|
||||||
if (caseStatus.intValue() != 0) {
|
if (caseStatus.intValue() != 0) {
|
||||||
CaseLogRecord caseLogRecordin = getInCasenode(caseStatus);
|
CaseLogRecord caseLogRecordin = getInCasenode(caseStatus);
|
||||||
@@ -733,7 +927,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
CaseLogRecord caseLogRecord9 = new CaseLogRecord();
|
CaseLogRecord caseLogRecord9 = new CaseLogRecord();
|
||||||
caseLogRecord8.setCaseNode(9);
|
caseLogRecord8.setCaseNode(9);
|
||||||
caseLogRecord8.setCaseNodeName("开庭审理");
|
caseLogRecord8.setCaseNodeName("开庭审理");
|
||||||
caseLogRecord8.setContent("仲裁员将进行开庭审理");
|
caseLogRecord8.setContent("仲裁员,申请人,被申请人,法律顾问将进行开庭审理");
|
||||||
CaseLogRecord caseLogRecord11 = new CaseLogRecord();
|
CaseLogRecord caseLogRecord11 = new CaseLogRecord();
|
||||||
caseLogRecord9.setCaseNode(11);
|
caseLogRecord9.setCaseNode(11);
|
||||||
caseLogRecord9.setCaseNodeName("书面审理");
|
caseLogRecord9.setCaseNodeName("书面审理");
|
||||||
@@ -758,7 +952,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseLogRecord15.setCaseNode(16);
|
caseLogRecord15.setCaseNode(16);
|
||||||
caseLogRecord15.setCaseNodeName("裁决书送达");
|
caseLogRecord15.setCaseNodeName("裁决书送达");
|
||||||
caseLogRecord15.setContent("法律顾问将进行裁决书送达");
|
caseLogRecord15.setContent("法律顾问将进行裁决书送达");
|
||||||
CaseLogRecord caseLogRecord17 = new CaseLogRecord();
|
|
||||||
caseLogRecord16.setCaseNode(17);
|
caseLogRecord16.setCaseNode(17);
|
||||||
caseLogRecord16.setCaseNodeName("案件归档");
|
caseLogRecord16.setCaseNodeName("案件归档");
|
||||||
caseLogRecord16.setContent("法律顾问将进行案件归档");
|
caseLogRecord16.setContent("法律顾问将进行案件归档");
|
||||||
@@ -1021,8 +1214,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseLogRecord.setContent("法律顾问正在进行案件归档");
|
caseLogRecord.setContent("法律顾问正在进行案件归档");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
caseLogRecord.setCaseNodeName("无案件状态");
|
caseLogRecord.setCaseNodeName("");
|
||||||
caseLogRecord.setContent("无操作内容");
|
caseLogRecord.setContent("");
|
||||||
|
|
||||||
}
|
}
|
||||||
return caseLogRecord;
|
return caseLogRecord;
|
||||||
@@ -1416,11 +1609,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
maxVersion = 1;
|
maxVersion = 1;
|
||||||
}
|
}
|
||||||
caseApplication.setVersion(maxVersion + 1);
|
caseApplication.setVersion(maxVersion + 1);
|
||||||
|
LoginUser loginUser = getLoginUser();
|
||||||
// 异步新增案件日志
|
// 异步新增案件日志
|
||||||
ThreadPoolUtil.execute(() -> {
|
ThreadPoolUtil.execute(() -> {
|
||||||
try {
|
try {
|
||||||
//新增案件日志记录
|
//新增案件日志记录
|
||||||
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_EDIT, "修改案件信息");
|
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_EDIT, "修改案件信息",loginUser);
|
||||||
caseApplication.setCaseAppliId(caseApplication.getId());
|
caseApplication.setCaseAppliId(caseApplication.getId());
|
||||||
caseApplication.setCaseLogId(IdWorkerUtil.getId());
|
caseApplication.setCaseLogId(IdWorkerUtil.getId());
|
||||||
int insertRow = caseApplicationLogMapper.insert(caseApplication);
|
int insertRow = caseApplicationLogMapper.insert(caseApplication);
|
||||||
@@ -1723,6 +1917,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseApplicationselect.setArbitrateRecord(arbitrateRecordselect);
|
caseApplicationselect.setArbitrateRecord(arbitrateRecordselect);
|
||||||
if(arbitrateRecordselect!=null){
|
if(arbitrateRecordselect!=null){
|
||||||
caseApplicationselect.setPayRejectReason(arbitrateRecordselect.getPayRejectReason());
|
caseApplicationselect.setPayRejectReason(arbitrateRecordselect.getPayRejectReason());
|
||||||
|
// 仲裁员审核驳回原因
|
||||||
|
caseApplicationselect.setArbitrateReject(arbitrateRecordselect.getArbitrateReject());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1877,43 +2073,30 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult 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;
|
||||||
//同意组庭
|
|
||||||
if (isAgreePendTral != null && isAgreePendTral == 1) {
|
|
||||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||||
if(caseApplicationselect==null){
|
if(caseApplicationselect==null){
|
||||||
throw new ServiceException("案件不存在");
|
throw new ServiceException("案件不存在");
|
||||||
}
|
}
|
||||||
String arbitratorId = caseApplicationselect.getArbitratorId();
|
caseApplication.setLockStatus(1);
|
||||||
String arbitratorName = caseApplicationselect.getArbitratorName();
|
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
|
||||||
if(arbitrators != null && arbitrators.size() > 0 && StringUtils.isEmpty(arbitratorId) && StringUtils.isEmpty(arbitratorName)){
|
// List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
||||||
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
||||||
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
// if( StringUtils.isEmpty(arbitratorId) && StringUtils.isEmpty(arbitratorName)){
|
||||||
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
// List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
||||||
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
// List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
||||||
caseApplication.setArbitratorId(idstr);
|
// String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||||
caseApplication.setArbitratorName(arbitratorNamestr);
|
// String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||||
caseApplication.setLockStatus(1);
|
// caseApplication.setArbitratorId(idstr);
|
||||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
// caseApplication.setArbitratorName(arbitratorNamestr);
|
||||||
}
|
// caseApplication.setLockStatus(1);
|
||||||
} else {
|
// rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
// }
|
||||||
// 仲裁员信息
|
|
||||||
if (arbitrators != null && arbitrators.size() > 0) {
|
|
||||||
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
|
||||||
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
|
||||||
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
||||||
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
|
||||||
caseApplication.setArbitratorId(idstr);
|
|
||||||
caseApplication.setArbitratorName(arbitratorNamestr);
|
|
||||||
caseApplication.setLockStatus(1);
|
|
||||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 新增日志
|
// 新增日志
|
||||||
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
|
insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
|
||||||
return success();
|
return success();
|
||||||
|
|||||||
+3
-37
@@ -164,21 +164,6 @@ public class CaseZipImportImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
File[] files = directory.listFiles();
|
File[] files = directory.listFiles();
|
||||||
// List<CaseApplication> caseApplications = new ArrayList<>();
|
|
||||||
// for (File file1 : files) {
|
|
||||||
// if (file1.isDirectory() && file1.listFiles() != null) {
|
|
||||||
//
|
|
||||||
// for (File file2 : file1.listFiles()) {
|
|
||||||
// CaseApplication caseApplication = buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, userMap, dictDataList, deptMap, SecurityUtils.getLoginUser());
|
|
||||||
// if (caseApplication != null) {
|
|
||||||
// caseApplications.add(caseApplication);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if(caseApplications.size()>0){
|
|
||||||
// return success("导入成功");
|
|
||||||
// }
|
|
||||||
CaseZipImportTask caseZipImportTask = null;
|
CaseZipImportTask caseZipImportTask = null;
|
||||||
try {
|
try {
|
||||||
caseZipImportTask = new CaseZipImportTask(this, templateId, fatchRuleList, fatchRuleMap, userMap, dictDataList, files , deptMap, SecurityUtils.getLoginUser());
|
caseZipImportTask = new CaseZipImportTask(this, templateId, fatchRuleList, fatchRuleMap, userMap, dictDataList, files , deptMap, SecurityUtils.getLoginUser());
|
||||||
@@ -318,6 +303,8 @@ public class CaseZipImportImpl {
|
|||||||
ThreadPoolUtil.execute(() -> {
|
ThreadPoolUtil.execute(() -> {
|
||||||
try {
|
try {
|
||||||
caseApplicationMapper.insertCaseApplication(caseApplication);
|
caseApplicationMapper.insertCaseApplication(caseApplication);
|
||||||
|
// 新增日志
|
||||||
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
|
||||||
caseApplicationLogMapper.insert(caseApplication);
|
caseApplicationLogMapper.insert(caseApplication);
|
||||||
// 多线程执行
|
// 多线程执行
|
||||||
if (CollectionUtil.isNotEmpty(addUsers)) {
|
if (CollectionUtil.isNotEmpty(addUsers)) {
|
||||||
@@ -347,28 +334,7 @@ public class CaseZipImportImpl {
|
|||||||
columnValueMapper.batchSave(columnValueList);
|
columnValueMapper.batchSave(columnValueList);
|
||||||
columnValueLogMapper.batchSave(columnValueList);
|
columnValueLogMapper.batchSave(columnValueList);
|
||||||
}
|
}
|
||||||
// 新增日志
|
|
||||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
|
|
||||||
// 发送短信
|
|
||||||
// if (CollectionUtil.isNotEmpty(smsRequestList)) {
|
|
||||||
// Map<Long, SmsSendRecord> sendRecordMap = null;
|
|
||||||
// if (CollectionUtil.isNotEmpty(smsSendRecordList)) {
|
|
||||||
// sendRecordMap = smsSendRecordList.stream().collect(Collectors.toMap(SmsSendRecord::getCaseId, Function.identity()));
|
|
||||||
// for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
|
|
||||||
// Boolean aBoolean = SmsUtils.sendSms(request);
|
|
||||||
// if (sendRecordMap != null && sendRecordMap.containsKey(sendSmsRequest.getCaseId())) {
|
|
||||||
// if (aBoolean) {
|
|
||||||
// sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(1);
|
|
||||||
// } else {
|
|
||||||
// sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(0);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// smsRecordMapper.batchSaveSmsSendRecord(smsSendRecordList);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new RuntimeException("导入失败,请检查抓取规则是否正确");
|
throw new RuntimeException("导入失败,请检查抓取规则是否正确");
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
<result property="respondentOpinion" column="respondent_opinion" />
|
<result property="respondentOpinion" column="respondent_opinion" />
|
||||||
<result property="applicantOpinion" column="applicant_opinion" />
|
<result property="applicantOpinion" column="applicant_opinion" />
|
||||||
<result property="payRejectReason" column="pay_reject_reason" />
|
<result property="payRejectReason" column="pay_reject_reason" />
|
||||||
|
<result property="arbitrateReject" column="arbitrate_reject" />
|
||||||
|
<result property="deptorReject" column="deptor_reject" />
|
||||||
|
<result property="caseCheckReject" column="case_check_reject" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@@ -92,9 +95,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
|
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
|
||||||
SELECT a.id ,a.case_appli_id ,a.eviden_determi ,a.fact_determi ,a.case_sketch ,a.arbitrate_think ,a.ruling_follows ,
|
SELECT a.*
|
||||||
a.verifica_opinion ,a.check_opinion,a.annex_id,a.case_focus,a.case_facts,a.respondent_opinion,a.applicant_opinion,
|
|
||||||
a.case_check_reject ,a.arbitrate_reject,a.deptor_reject,a.pay_reject_reason
|
|
||||||
from arbitrate_record a
|
from arbitrate_record a
|
||||||
<where>
|
<where>
|
||||||
<if test="caseAppliId != null ">
|
<if test="caseAppliId != null ">
|
||||||
|
|||||||
+161
-129
@@ -570,129 +570,10 @@
|
|||||||
sum( case when t1.case_status=18 then 1 else 0 end) arbitratorApplyAwardConfirm,
|
sum( case when t1.case_status=18 then 1 else 0 end) arbitratorApplyAwardConfirm,
|
||||||
sum( case when t1.case_status=31 then 1 else 0 end) updateOnlineHearDate
|
sum( case when t1.case_status=31 then 1 else 0 end) updateOnlineHearDate
|
||||||
from(
|
from(
|
||||||
<trim suffixOverrides="union">
|
select c.id,c.case_status
|
||||||
<!--被申请人,仲裁员,部门长,财务,代理人案件-->
|
from case_application c
|
||||||
<if test="isOtherRole!=null and isOtherRole==1">
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
select DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num ,
|
<include refid="SELECT_LIST_QUERY"/>
|
||||||
t.identity_type from(
|
|
||||||
select c.id ,
|
|
||||||
c.case_status,ca.application_organ_id,
|
|
||||||
c.arbitrator_id,ca.identity_num , ca.identity_type
|
|
||||||
from case_application c
|
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
|
||||||
<where>
|
|
||||||
<if test="caseStatus != null">
|
|
||||||
AND c.case_status = #{caseStatus}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
|
||||||
and c.case_status in
|
|
||||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
|
||||||
#{caseStatus}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
) t
|
|
||||||
<where>
|
|
||||||
|
|
||||||
<!--被申请人-->
|
|
||||||
<if test="idCard != null and idCard != ''">
|
|
||||||
or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
|
|
||||||
</if>
|
|
||||||
<!--仲裁员-->
|
|
||||||
<if test="userId != null and userId != ''">
|
|
||||||
or ( t.identity_type=1 and
|
|
||||||
t.case_status in (7,13,17,18)
|
|
||||||
and
|
|
||||||
instr (t.arbitrator_id,#{userId})>0)
|
|
||||||
</if>
|
|
||||||
<!--申请人-->
|
|
||||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
|
||||||
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
|
||||||
and t.case_status in (0,2,17))
|
|
||||||
|
|
||||||
</if>
|
|
||||||
<!--部门长-->
|
|
||||||
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
|
||||||
or (t.identity_type=1 and t.case_status in
|
|
||||||
<foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
|
|
||||||
#{caseStatus}
|
|
||||||
</foreach>)
|
|
||||||
</if>
|
|
||||||
<!--财务-->
|
|
||||||
<if test="financeStatus != null and financeStatus != ''">
|
|
||||||
or ( t.identity_type=1 and t.case_status =#{financeStatus})
|
|
||||||
|
|
||||||
</if>
|
|
||||||
<!--代理人-->
|
|
||||||
<if test="agentDeptIds != null and agentDeptIds.size()>0">
|
|
||||||
or (
|
|
||||||
t.application_organ_id in
|
|
||||||
<foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
|
|
||||||
</foreach>
|
|
||||||
AND t.identity_type=1
|
|
||||||
and t.case_status in (0,9))
|
|
||||||
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
union
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<!--秘书案件-->
|
|
||||||
<if test="deptIds != null and deptIds.size() > 0">
|
|
||||||
|
|
||||||
select c.id ,
|
|
||||||
c.case_status,ca.application_organ_id,
|
|
||||||
c.arbitrator_id,ca.identity_num , ca.identity_type
|
|
||||||
FROM
|
|
||||||
case_application c
|
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
|
||||||
JOIN case_application_log l on l.case_appli_id=c.id and l.update_submit_status not in(1, 2) and
|
|
||||||
l.version
|
|
||||||
= (
|
|
||||||
SELECT
|
|
||||||
max( version ) version
|
|
||||||
FROM
|
|
||||||
case_application_log
|
|
||||||
WHERE case_appli_id = c.id
|
|
||||||
)
|
|
||||||
WHERE
|
|
||||||
ca.identity_type=1
|
|
||||||
|
|
||||||
and c.case_status in (1,5,8,9,11,14,15,16,17,31)
|
|
||||||
<!-- <if test="deptIds != null and deptIds.size() > 0">
|
|
||||||
and ca.application_organ_id in
|
|
||||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if> -->
|
|
||||||
<if test="caseStatus != null">
|
|
||||||
AND c.case_status = #{caseStatus}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="nameId != null and nameId != ''">
|
|
||||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
|
||||||
</if>
|
|
||||||
union
|
|
||||||
select c.id ,
|
|
||||||
c.case_status,ca.application_organ_id,
|
|
||||||
c.arbitrator_id,ca.identity_num , ca.identity_type
|
|
||||||
FROM
|
|
||||||
case_application c
|
|
||||||
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
|
|
||||||
WHERE
|
|
||||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
|
||||||
AND l.version = (
|
|
||||||
SELECT
|
|
||||||
max( version ) version
|
|
||||||
FROM
|
|
||||||
case_application_log
|
|
||||||
WHERE
|
|
||||||
c.id = case_appli_id)
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
|
|
||||||
) t1
|
) t1
|
||||||
</select>
|
</select>
|
||||||
@@ -1114,17 +995,13 @@
|
|||||||
<if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
|
<if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
|
||||||
<if test="caseStatus != null">case_status = #{caseStatus},</if>
|
<if test="caseStatus != null">case_status = #{caseStatus},</if>
|
||||||
<if test="properPreser != null">proper_preser = #{properPreser},</if>
|
<if test="properPreser != null">proper_preser = #{properPreser},</if>
|
||||||
|
|
||||||
<if test="applicantIsWrittenHear != null">appli_iswrit_hear = #{applicantIsWrittenHear},</if>
|
<if test="applicantIsWrittenHear != null">appli_iswrit_hear = #{applicantIsWrittenHear},</if>
|
||||||
<if test="respondentIsWrittenHear != null">respon_isWrit_hear = #{respondentIsWrittenHear},</if>
|
<if test="respondentIsWrittenHear != null">respon_isWrit_hear = #{respondentIsWrittenHear},</if>
|
||||||
|
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
<if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
|
<if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
|
||||||
<if test="version != null ">version = #{version},</if>
|
<if test="version != null ">version = #{version},</if>
|
||||||
<if test="facts != null and facts != ''">facts = #{facts},</if>
|
<if test="facts != null and facts != ''">facts = #{facts},</if>
|
||||||
<if test="mediationAgreement != null and mediationAgreement != ''">mediation_agreement =
|
<if test="mediationAgreement != null and mediationAgreement != ''"> mediation_agreement = #{mediationAgreement} </if>
|
||||||
#{mediationAgreement},
|
|
||||||
</if>
|
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@@ -1366,7 +1243,7 @@
|
|||||||
SELECT count(1)
|
SELECT count(1)
|
||||||
from case_application c
|
from case_application c
|
||||||
where c.arbitrator_id = #{userId}
|
where c.arbitrator_id = #{userId}
|
||||||
and c.case_status in(8,9)
|
and c.case_status!=17
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
<select id="selectCaseIdByRoomId" resultType="java.lang.Long">
|
||||||
@@ -1382,6 +1259,161 @@
|
|||||||
select max(batch_number+0) as maxBatchNumber
|
select max(batch_number+0) as maxBatchNumber
|
||||||
from case_application ;
|
from case_application ;
|
||||||
</select>
|
</select>
|
||||||
|
<sql id="SELECT_LIST_QUERY">
|
||||||
|
<where>
|
||||||
|
<!-- 案件状态查询-->
|
||||||
|
<if test="caseStatusList != null and caseStatusList.size()>0">
|
||||||
|
and c.case_status in
|
||||||
|
<foreach collection="caseStatusList" item="caseStatus" open="(" separator="," close=")">
|
||||||
|
#{caseStatus}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="caseStatusList == null or caseStatusList.size()==0">
|
||||||
|
and ca.identity_type=1
|
||||||
|
</if>
|
||||||
|
<if test="roleNames != null and roleNames.size()>0 and roleNames.contains('申请人')
|
||||||
|
and caseApplication.loginUserPhone != null and caseApplication.loginUserPhone != ''">
|
||||||
|
<!-- 申请人,根据电话查询-->
|
||||||
|
and ca.identity_type=1
|
||||||
|
and ( ca.contact_telphone=#{caseApplication.loginUserPhone}
|
||||||
|
or ca.contact_telphone_agent=#{caseApplication.loginUserPhone}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="roleNames != null and roleNames.size()>0 and roleNames.contains('被申请人')
|
||||||
|
and caseApplication.loginUserPhone != null and caseApplication.loginUserPhone != ''">
|
||||||
|
<!-- 被申请人查询,根据电话查询-->
|
||||||
|
and ca.identity_type=2
|
||||||
|
and ( ca.contact_telphone=#{caseApplication.loginUserPhone}
|
||||||
|
or ca.contact_telphone_agent=#{caseApplication.loginUserPhone}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="caseApplication.arbitratorId !=null and caseApplication.arbitratorId!=''">
|
||||||
|
<!-- 仲裁员查询-->
|
||||||
|
and c.arbitrator_id=#{caseApplication.arbitratorId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<select id="list" resultMap="CaseApplicationResult">
|
||||||
|
select DISTINCT(t1.id),t1.caseLogId,t1.case_num,t1.case_subject_amount,t1.register_date,t1.arbitrat_method,
|
||||||
|
t1.arbitratMethodName,t1.case_status,t1.caseStatusName,t1.hear_date,t1.arbitrat_claims,
|
||||||
|
t1.loan_start_date,t1.loan_end_date,t1.claim_princi_owed,t1.claim_interest_owed,t1.claim_liquid_damag,t1.fee_payable,
|
||||||
|
t1.begin_video_date,t1.online_video_person,t1.contract_number,t1.create_by,t1.create_time,t1.appli_iswrit_hear,t1.respon_isWrit_hear,t1.update_by,t1.update_time,
|
||||||
|
t1.arbitrator_name,t1.name,t1.application_organ_id,t1.applicantName,t1.arbitrator_id,t1.identity_num,t1.identity_type,
|
||||||
|
t1.filearbitra_url,t1.lock_status,t1.version,t1.updateSubmitStatus,t1.batch_number,t1.pendingStatus
|
||||||
|
from(
|
||||||
|
|
||||||
|
select c.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,
|
||||||
|
c.case_status ,
|
||||||
|
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||||
|
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||||
|
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||||
|
when 9 then '待书面审理' when 10 then '待生成裁决书' when 11 then '待核验裁决书'
|
||||||
|
when 12 then '待部门长审核裁决书' when 13 then '待裁决书签名' when 14 then '待裁决书用印'
|
||||||
|
when 15 then '待裁决书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||||
|
when 18 then '待仲裁员审核裁决书'
|
||||||
|
when 31 then '待修改开庭时间'
|
||||||
|
ELSE ''
|
||||||
|
END caseStatusName,
|
||||||
|
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.appli_iswrit_hear,c.respon_isWrit_hear,
|
||||||
|
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
|
||||||
|
as applicantName,
|
||||||
|
c.arbitrator_id,ca.identity_num ,ca.identity_type,c.filearbitra_url,c.lock_status,c.version,null as
|
||||||
|
updateSubmitStatus,c.batch_number,0 as pendingStatus
|
||||||
|
from case_application c
|
||||||
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
|
<include refid="SELECT_LIST_QUERY"/>
|
||||||
|
union
|
||||||
|
|
||||||
|
<!-- 已办案件 -->
|
||||||
|
SELECT
|
||||||
|
c.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,
|
||||||
|
c.case_status,
|
||||||
|
CASE
|
||||||
|
c.case_status
|
||||||
|
when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||||
|
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||||
|
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||||
|
when 9 then '待书面审理' when 10 then '待生成裁决书' when 11 then '待核验裁决书'
|
||||||
|
when 12 then '待部门长审核裁决书' when 13 then '待裁决书签名' when 14 then '待裁决书用印'
|
||||||
|
when 15 then '待裁决书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||||
|
when 18 then '待仲裁员审核裁决书'
|
||||||
|
when 31 then '待修改开庭时间' ELSE ''
|
||||||
|
END caseStatusName,
|
||||||
|
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.appli_iswrit_hear,c.respon_isWrit_hear,
|
||||||
|
c.update_by,
|
||||||
|
c.update_time,
|
||||||
|
c.arbitrator_name,
|
||||||
|
ca.name,
|
||||||
|
ca.application_organ_id ,
|
||||||
|
ca.application_organ_name AS applicantName,
|
||||||
|
c.arbitrator_id,ca.identity_num ,ca.identity_type,
|
||||||
|
c.filearbitra_url,
|
||||||
|
c.lock_status,c.version,
|
||||||
|
null as updateSubmitStatus,
|
||||||
|
c.batch_number,1 as pendingStatus
|
||||||
|
from case_log_record r
|
||||||
|
join case_application c on r.case_appli_id=c.id
|
||||||
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
|
WHERE
|
||||||
|
r.create_by=#{caseApplication.loginUserName} AND ca.identity_type=1
|
||||||
|
and c.id not in(
|
||||||
|
select c.id
|
||||||
|
from case_application c
|
||||||
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
|
<include refid="SELECT_LIST_QUERY"/>
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
) t1
|
||||||
|
<where>
|
||||||
|
<if test="caseApplication.caseStatus != null">
|
||||||
|
AND t1.case_status = #{caseApplication.caseStatus}
|
||||||
|
</if>
|
||||||
|
<if test="caseApplication.lockStatus != null">
|
||||||
|
AND t1.lock_status = #{caseApplication.lockStatus}
|
||||||
|
</if>
|
||||||
|
<if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
|
||||||
|
AND t1.case_num = #{caseApplication.caseNum}
|
||||||
|
</if>
|
||||||
|
<if test="caseApplication.batchNumber != null">
|
||||||
|
AND t1.batch_number = #{caseApplication.batchNumber}
|
||||||
|
</if>
|
||||||
|
<!-- <if test="nameId != null and nameId != ''">-->
|
||||||
|
<!-- AND t1.application_organ_id=#{nameId} AND t1.identity_type=1-->
|
||||||
|
<!-- </if>-->
|
||||||
|
</where>
|
||||||
|
|
||||||
|
order by t1.pendingStatus asc,t1.create_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
when 26 then '证据确认成功'
|
when 26 then '证据确认成功'
|
||||||
when 31 then '修改开庭时间'
|
when 31 then '修改开庭时间'
|
||||||
when 18 then '仲裁员审核裁决书'
|
when 18 then '仲裁员审核裁决书'
|
||||||
ELSE '无案件状态'
|
ELSE ''
|
||||||
END content,
|
END content,
|
||||||
CASE cl.case_node when 0 then '申请人' when 1 then '申请人' when 2 then '法律顾问'
|
CASE cl.case_node 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 '被申请人'
|
||||||
|
|||||||
Reference in New Issue
Block a user