Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev

This commit was merged in pull request #359.
This commit is contained in:
2024-05-24 15:40:57 +08:00
committed by Gitea
45 changed files with 4202 additions and 4458 deletions
@@ -45,14 +45,14 @@ public class AdjudicationController extends BaseController {
/**
* 根据批号查询批量签名链接
*/
@PostMapping("/getSignUrlBatch")
public AjaxResult getSignUrlBatch(@RequestBody StringIdsReq idsReq) {
if(StrUtil.isEmpty(idsReq.getBatchNumber().toString())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.getSignUrlBatch(idsReq);
return success(sealSignRecordselect);
}
// @PostMapping("/getSignUrlBatch")
// public AjaxResult getSignUrlBatch(@RequestBody StringIdsReq idsReq) {
// if(StrUtil.isEmpty(idsReq.getBatchNumber().toString())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
// return error("参数校验失败");
// }
// SealSignRecord sealSignRecordselect = adjudicationService.getSignUrlBatch(idsReq);
// return success(sealSignRecordselect);
// }
/**
* 根据签署流程id查询批量用印链接
@@ -127,15 +127,7 @@ public class AdjudicationController extends BaseController {
return adjudicationService.batchDocument(caseApplication.getIds());
}
/**
* 重新生成裁决书
* @param caseApplication
* @return
*/
@PostMapping("/regenerationDocument")
public AjaxResult regenerationDocument(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.regenerationDocument(caseApplication);
}
/**
* 裁决书送达(电子邮件)
@@ -152,12 +144,12 @@ public class AdjudicationController extends BaseController {
* @param caseApplication
* @return
*/
@GetMapping("/logistics")
// @PreAuthorize("@ss.hasPermi('delivery:detail')")
public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
return AjaxResult.success(logisticsInfo);
}
// @GetMapping("/logistics")
//// @PreAuthorize("@ss.hasPermi('delivery:detail')")
// public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
// List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
// return AjaxResult.success(logisticsInfo);
// }
@@ -220,11 +212,11 @@ public class AdjudicationController extends BaseController {
* @param id 案件id
* @return
*/
@GetMapping("/archives")
public AjaxResult getArchivesDetail(Long id){
return adjudicationService.getArchivesDetail(id);
}
// @GetMapping("/archives")
// public AjaxResult getArchivesDetail(Long id){
//
// return adjudicationService.getArchivesDetail(id);
// }
/**
* 根据案件id获取邮箱
* @param id 案件id
@@ -6,6 +6,7 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.CheckSignatuerUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseApplicationVO;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.springframework.beans.BeanUtils;
@@ -32,10 +33,10 @@ public class ArbitrateApplicationController extends BaseController {
String paramsbody = JSONUtil.toJsonStr(caseApplicationVO);
boolean checkResult= CheckSignatuerUtils.checkSignuter(paramsbody);
if(checkResult){
CaseApplication caseApplication = new CaseApplication();
CaseApplicationDTO caseApplication = new CaseApplicationDTO();
BeanUtils.copyProperties(caseApplicationVO,caseApplication);
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication1(caseApplication));
return caseApplicationService.insertOrUpdate(caseApplication);
}else {
return AjaxResult.error("签名验证失败");
}
@@ -12,6 +12,7 @@ import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.WxAppletNotifyUtils;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
@@ -37,8 +38,17 @@ public class CaseApplicationController extends BaseController {
private ICaseApplicationService caseApplicationService;
@Autowired
private IAdjudicationService adjudicationService;
/**
* 根据登录人返回用户信息
*/
@GetMapping("/getUserInfo")
public AjaxResult getUserInfo()
{
return success(caseApplicationService.getUserInfo());
}
/**
* 查询立案数据
*/
@@ -53,15 +63,15 @@ public class CaseApplicationController extends BaseController {
return getDataTable(list);
}
/**
* 查询批量管理案件列表
*/
@GetMapping("/listBatch")
public TableDataInfo listBatch(CaseApplication caseApplication) {
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
return getDataTable(list);
}
// /**
// * 查询批量管理案件列表
// */
// @GetMapping("/listBatch")
// public TableDataInfo listBatch(CaseApplication caseApplication) {
// startPage();
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
// return getDataTable(list);
// }
/**
* 根据角色查询待办数量
@@ -81,24 +91,24 @@ public class CaseApplicationController extends BaseController {
// @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplicationDTO caseApplication)
{
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
return caseApplicationService.insertOrUpdate(caseApplication);
}
/**
* 修改立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplication")
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
caseApplication.setUpdateBy(getUsername());
return caseApplicationService.editCaseApplication(caseApplication);
}
// @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
// @PostMapping("/editCaseApplication")
// public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplicationDTO caseApplication) {
//
// caseApplication.setUpdateBy(getUsername());
// return caseApplicationService.editCaseApplication(caseApplication);
// }
/**
* 修改立案数据自定义字段
@@ -132,7 +142,7 @@ public class CaseApplicationController extends BaseController {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
return error("参数校验失败");
}
return toAjax(caseApplicationService.submitCaseApplicationBatch(batchCaseApplication.getBatchNumber()));
return caseApplicationService.submitCaseApplicationBatch(batchCaseApplication.getBatchNumber());
}
@@ -411,15 +421,6 @@ public class CaseApplicationController extends BaseController {
return success(caseApplicationService.submitCaseApplicationCheck(batchCaseApplication.getIds(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
}
/**
* 确认缴费查询立案信息
*/
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
@PostMapping("/selectCaseApplicationConfirm")
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
return success(caseApplicationselect);
}
/**
* 批量提交立案审查
@@ -430,18 +431,18 @@ public class CaseApplicationController extends BaseController {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
return error("参数校验失败");
}
return success(caseApplicationService.submitCaseApplicationCheckBatch(batchCaseApplication.getBatchNumber(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
return caseApplicationService.submitCaseApplicationCheckBatch(batchCaseApplication.getBatchNumber(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject());
}
/**
* 下载案件压缩包
*/
@PostMapping("/downloadCaseZipFile")
public AjaxResult downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication) {
CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
return success(caseAttach);
}
// /**
// * 下载案件压缩包
// */
// @PostMapping("/downloadCaseZipFile")
// public AjaxResult downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication) {
//
// CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
// return success(caseAttach);
// }
@@ -33,17 +33,17 @@ public class CaseEvidenceController extends BaseController {
this.caseEvidenceService = caseEvidenceService;
}
/**
* 根据案件id查询案件详情
*
* @param id
* @return
*/
@GetMapping("/{id}")
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
String username = this.getUsername();
return caseEvidenceService.getCaseDetailsById(id, username);
}
// /**
// * 根据案件id查询案件详情
// *
// * @param id
// * @return
// */
// @GetMapping("/{id}")
// public AjaxResult getCaseDetailsById(@PathVariable Long id) {
// String username = this.getUsername();
// return caseEvidenceService.getCaseDetailsById(id, username);
// }
/**
* 案件证据上传
@@ -121,12 +121,12 @@ public class CaseEvidenceController extends BaseController {
* @param caseStatus
* @return
*/
@GetMapping("/all")
public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
return success(caseEvidenceService.getCaseListAll(caseStatus));
}
// @GetMapping("/all")
// public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
//
// return success(caseEvidenceService.getCaseListAll(caseStatus));
//
// }
/**
* 证据确认
@@ -133,7 +133,6 @@ public class VideoController extends BaseController {
@Anonymous
@GetMapping("secretaryRoleByUserId")
public AjaxResult secretaryRoleByUserId( @RequestParam(value = "userId",required = true) Long userId,@RequestParam(value = "caseId",required = true) Long caseId) {
return videoService.secretaryRoleByUserId(userId,caseId);
}
/**
@@ -186,6 +185,7 @@ public class VideoController extends BaseController {
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
String name=file.getOriginalFilename();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String suffix = getFileExtension(fileName);
@@ -205,18 +205,22 @@ public class VideoController extends BaseController {
CaseAttach caseAttach=null;
for (Object obj : jsonArray) {
JSONObject jsonObject = (JSONObject) obj;
String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
path=path.replace("/home/ruoyi/uploadPath/","profile/");
caseAttach = CaseAttach.builder()
.caseAppliId(caseId)
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
// .annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
.annexName(name)
.annexType(annexType)
.onlyOfficeFileId(jsonObject.getString("fileId"))
.annexPath(path)
.build();
if(jsonObject.get("filePath")!=null){
String officePath = jsonObject.getString("filePath");
String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
caseAttach.setAnnexPath(replace);
}
// if(jsonObject.get("filePath")!=null){
// String officePath = jsonObject.getString("filePath");
// String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
// caseAttach.setAnnexPath(replace);
//
// }
caseAttachMapper.save(caseAttach);
}
if(caseAttach==null){
@@ -226,7 +230,7 @@ public class VideoController extends BaseController {
ajax.put("annexId", caseAttach.getAnnexId());
ajax.put("annexType", annexType);
// ajax.put("url", url);
ajax.put("fileName", fileName);
ajax.put("fileName", name);
ajax.put("newFileName", FileUtils.getName(fileName));
ajax.put("originalFilename", file.getOriginalFilename());
return ajax;
@@ -245,13 +249,13 @@ public class VideoController extends BaseController {
caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
}
}
Long annexId = saveCaseAttach(annexType, fileName, file.getOriginalFilename(), caseId);
Long annexId = saveCaseAttach(annexType, name, file.getOriginalFilename(), caseId);
AjaxResult ajax = AjaxResult.success();
ajax.put("annexId", annexId);
ajax.put("annexType", annexType);
ajax.put("url", url);
ajax.put("fileName", fileName);
ajax.put("fileName", name);
ajax.put("newFileName", FileUtils.getName(fileName));
ajax.put("originalFilename", file.getOriginalFilename());
return ajax;
@@ -6,6 +6,10 @@ package com.ruoyi.common.constant;
public class CaseApplicationConstants {
/** 申请人/代理人,立案申请 */
public static final int CASE_APPLICATION = 0;
/**
* 案件新增
*/
public static final int CASE_INSERT = -2;
/** 申请人/代理人,案件修改 */
public static final int CASE_EDIT = -1;
/** 顾问,待立案审查 */
@@ -54,6 +54,68 @@ public class SysDept extends BaseEntity
/** 父部门名称 */
private String parentName;
/**
* 代码(统一社会信用代码或者身份证号)
*/
private String code;
/**
* 法定代表人
*/
private String compLegalPerson;
/**
* 住所
*/
private String home;
/**
* 联系地址
*/
private String address;
/**
*
* 国籍,0-国内,1-国外
*/
private Integer nationality;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getCompLegalPerson() {
return compLegalPerson;
}
public void setCompLegalPerson(String compLegalPerson) {
this.compLegalPerson = compLegalPerson;
}
public String getHome() {
return home;
}
public void setHome(String home) {
this.home = home;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Integer getNationality() {
return nationality;
}
public void setNationality(Integer nationality) {
this.nationality = nationality;
}
public Integer getDeptType() {
return deptType;
@@ -49,6 +49,23 @@ public class SysUser extends BaseEntity
public void setNickNameAndNum(String nickNameAndNum) {
this.nickNameAndNum = nickNameAndNum;
}
/** 身份类别,0-身份证,1-护照,默认0 */
private Integer idType;
/** 国籍,0-国内,1-国外,默认0 */
private Integer nationality;
/**
* 生日
*/
private Date birth;
/**
* 住所
*/
private String home;
/**
* 联系地址
*/
private String address;
/** 用户身份证号 */
@Excel(name = "身份证号")
@@ -105,12 +122,64 @@ public class SysUser extends BaseEntity
/** 角色ID */
private Long roleId;
/**
* 职位
*/
private String position;
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public SysUser()
{
}
public Integer getIdType() {
return idType;
}
public void setIdType(Integer idType) {
this.idType = idType;
}
public Integer getNationality() {
return nationality;
}
public void setNationality(Integer nationality) {
this.nationality = nationality;
}
public Date getBirth() {
return birth;
}
public void setBirth(Date birth) {
this.birth = birth;
}
public String getHome() {
return home;
}
public void setHome(String home) {
this.home = home;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public SysUser(Long userId)
{
this.userId = userId;
@@ -124,4 +124,11 @@ public interface SysDeptMapper
* @return
*/
int batchSave(@Param("list")List<SysDept> sysDepts);
/**
* 根据部门名称查询部门信息
* @param deptName
* @return
*/
public SysDept selectDeptByName(@Param("deptName") String deptName);
}
@@ -171,4 +171,17 @@ public interface SysUserMapper
* @return
*/
int batchSave(@Param("list")List<SysUser> addUsers);
/**
* 根据邮箱查询用户信息
* @param email
* @return
*/
SysUser selectUserByEmail(String email);
/**
* 根据角色查询用户
* @param 法律顾问
* @return
*/
SysUser selectUserByRole(String 法律顾问);
}
@@ -59,4 +59,13 @@ public interface SysUserRoleMapper
* @return 结果
*/
public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
/**
* 根据用户id查询关联的角色id
* @param userId
* @return
*/
List<Long> selectRoleIdsByUserId(Long userId);
void insertUserRole(@Param("userId") Long userId,@Param("roleId") Long roleId);
}
@@ -13,8 +13,10 @@ import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.system.mapper.*;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -73,6 +75,8 @@ public class SysUserServiceImpl implements ISysUserService {
@Autowired
protected Validator validator;
@Autowired
protected ICaseApplicationService caseApplicationService;
/**
* 根据条件分页查询用户列表
@@ -94,25 +98,21 @@ public class SysUserServiceImpl implements ISysUserService {
@Override
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<>();
List<CaseAffiliateEntity> caseAffiliates = caseApplicationService.selectAfflicatesByCaseId(arbitrator.getCaseId());
List<Long> userIds=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());
for (CaseAffiliateEntity affiliate : caseAffiliates) {
if(null!=affiliate.getUserId()) {
userIds.add(affiliate.getUserId());
}
}
}
List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
List<SysUser> arbitrators = new ArrayList<>();
if(CollectionUtil.isNotEmpty(sysUsers)){
for(SysUser sysUser: sysUsers){
if(!phoneList.contains(sysUser.getPhonenumber())) {
if(!userIds.contains(sysUser.getUserId())) {
Long userId = sysUser.getUserId();
int todoCount = caseApplicationMapper.selectCasenum(userId.toString());
String nickName = sysUser.getNickName();
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseAffiliateVO;
import lombok.Data;
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
@@ -17,6 +18,19 @@ public class CaseApplication extends BaseEntity {
* 查询案件时区分是否待办案件,0待办案件,1已办案件
*/
private String selectCaseStatus;
/**
* 房间号
*/
private String roomId;
/**
* 仲裁员,0-否,1-是
*/
private Integer arbitratorFlag;
/**
* 第三方代理人,0-否,1-是
*/
private Integer agentFlag;
/** ID */
private Long id;
@@ -26,6 +40,10 @@ public class CaseApplication extends BaseEntity {
/** 案件编号 */
// @Excel(name = "案件编号")
private String caseNum;
/**
* 是否同意,0-否
*/
private Integer opinion;
/** 案件标的 */
@Excel(name = "案件标的")
private BigDecimal caseSubjectAmount;
@@ -188,7 +206,7 @@ public class CaseApplication extends BaseEntity {
/**
* 用户id
*/
private String userId;
private Long userId;
/**
* 登录用户用户名
*/
@@ -223,7 +241,7 @@ public class CaseApplication extends BaseEntity {
/** 是否指派仲裁员 */
private int pendingAppointArbotrar;
/** 案件关联人信息 */
private List<CaseAffiliate> caseAffiliates;
private CaseAffiliateVO affiliate;
/** 案件仲裁员 */
private List<Arbitrator> arbitrators;
@@ -0,0 +1,309 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseAffiliateVO;
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Classname CaseApplicationDTO
* @Description 案件申请表
* @Version 1.0.0
* @Date 2024/5/22 9:19
* @Created wangqiong
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CaseApplicationDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 案件编号
*/
private String caseNum;
/**
* 案件标的
*/
private BigDecimal caseSubjectAmount;
/**
* 立案日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date registerDate;
/**
* 仲裁方式,视频仲裁(1)、书面仲裁(2)
*/
private Long arbitratMethod;
/**
* 案件状态,立案申请(0)、待立案审查(1)、 待缴费(2)、待缴费确认(3)、 待案件质证(4)、
*/
private Integer caseStatus;
/**
* 开庭日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date hearDate;
/**
* 申请人仲裁请求及事实和理由
*/
private String arbitratClaims;
/**
* 借款开始日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date loanStartDate;
/**
* 借款结束日期
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date loanEndDate;
/**
* 申请人主张欠本金
*/
private BigDecimal claimPrinciOwed;
/**
* 申请人主张欠利息
*/
private BigDecimal claimInterestOwed;
/**
* 申请人主张违约金
*/
private BigDecimal claimLiquidDamag;
/**
* 仲裁应缴费用
*/
private BigDecimal feePayable;
/**
* 合同编号
*/
private String contractNumber;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date updateTime;
/**
* 创建者
*/
private String createBy;
/**
* 仲裁员id
*/
private String arbitratorId;
/**
* 案件名称
*/
private String caseName;
/**
* 仲裁结果
*/
private String caseResult;
/**
* 是否同意组庭,0否,1是
*/
private Integer isAgreePendTral;
/**
* 是否有异议需要举证,1是,0否
*/
private Integer objectionAddEviden;
/**
* 案件实缴费用
*/
private BigDecimal paidExpenses;
/**
* 裁决书URL
*/
private String filearbitraUrl;
/**
* 支付方式(0线上支付,1线下支付)
*/
private String payType;
/**
* 申请人请求仲裁庭裁决
*/
private String requestRule;
/**
* 是否仲裁反请求,1是,0否
*/
private Integer adjudicaCounter;
/**
* 仲裁反请求原因
*/
private String adjudicaCounterReason;
/**
* 是否财产保全申请,1是,0否
*/
private Integer properPreser;
/**
* 是否管辖异议申请,1是,0否
*/
private Integer objectiJuris;
/**
* 被申请人是否缺席,1是,0否
*/
private Integer isAbsence;
/**
* 被申请人质证意见
*/
private String responCrossOpin;
/**
* 申请人质证意见
*/
private String applicaCrossOpin;
/**
* 被申请人的答辩意见
*/
private String responDefenOpini;
/**
* 申请人是否缺席,1是,0否
*/
private Integer appliIsAbsen;
/**
* 是否锁定,0-否,1-是
*/
private Integer lockStatus;
/**
* 视频会议房间号id
*/
private String roomId;
/**
* 是否导入,0手动录入,1导入,默认0
*/
private Integer importFlag=0;
/**
* 版本号
*/
private Integer version;
/**
* 事实和理由
*/
private String facts;
/**
* 批次
*/
private Integer batchNumber;
/**
* 模板id
*/
private Long templateId;
/**
* 调解内容
*/
private String mediationAgreement;
/**
* 申请人是否书面审理 ,0否,1是
*/
private Integer appliIswritHear;
/**
* 被申请人是否书面审理
*/
private Integer responIsWritHear;
/**
* 案件附件相关表
*/
private List<CaseAttach> caseAttachList;
/**
* 附件类型
*/
private List<Integer> annexTypeList;
/**
* 附件类型
*/
private Integer annexType;
/**
* 自定义字段
*/
private List<ColumnValue> columnValueList;
/**
* 案件相关人员
*/
private CaseAffiliateVO affiliate;
/**
* 待办状态,0-待办,1-已办
*/
private Integer pendingStatus;
/**
* 仲裁方式名称,1-线上调解,2-线下调解
*/
private String arbitratMethodName;
/**
* 申请机构名称
*/
private String applicationName;
/**
* 被申请人姓名
*/
private String respondentName;
}
@@ -0,0 +1,129 @@
package com.ruoyi.wisdomarbitrate.domain.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.Date;
@Getter
@Setter
@ToString
@Data
public class CaseAffiliateEntity {
/**
* id
*/
private Long id;
/**
* 案件主表id,案件申请表主键
*/
private Long caseAppliId;
/**
* 案件日志表id
*/
private Long caseAppliLogId;
/**
* 用户id,用户表user_id关联
*/
private Long userId;
/**
* 申请机构id,和部门表id关联
*/
private Long applicantDeptId;
/**
* 代码(统一社会信用代码或者身份证号)
*/
private String code;
/**
* 用户名
*/
private String userName;
/**
* 法定代表人
*/
private String compLegalPerson;
/**
* 角色类别,1-申请操作人/申请人,2-申请人代理人,3-被申请人操作人/被申请人,4-被申请人代理人
*/
private Integer roleType=1;
/**
* 组别
*/
private Integer groupOrder;
/**
* 是否操作人,0-否,1-是
*/
private Integer operatorFlag=1;
/**
* 是否机构申请,0-自然人,1-申请机构,默认0
*/
private Integer organizeFlag=0;
/**
* 电话
*/
private String phone;
/**
* 邮箱
*/
private String email;
/**
* 姓名
*/
private String name;
/**
* 住所
*/
private String home;
/**
* 联系地址
*/
private String address;
/**
* 身份证号
*/
private String idCard;
/**
* '身份类别,0-身份证,1-护照,默认0'
*/
private Integer idType;
/**
* 国籍,0-境内,1-境外,默认0
*/
private Integer nationality;
/**
* 生日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
private Date birth;
/**
* 性别,0-男,1-女
*/
private String sex;
/**
* 被申请人姓名
*/
private String resName;
/**
* 角色名称
*/
private String roleName;
/**
* 申请机构名称
*/
private String applicantOrgName;
/**
* 角色id
*/
private Long roleId;
/**
* 职位
*/
private String position;
}
@@ -0,0 +1,33 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import lombok.Data;
/**
* @Classname MsCaseAffiliateList
* @Description 案件人员表
* @Version 1.0.0
* @Date 2024/3/27 16:08
* @Created wangqiong
*/
@Data
public class CaseAffiliateBase {
/**
* 申请人/操作人
*/
private CaseAffiliateEntity applicant;
/**
* 申请人代理人
*/
private CaseAffiliateEntity applicantAgent;
/**
* 被申请人/操作人
*/
private CaseAffiliateEntity res;
/**
* 被申请人代理人
*/
private CaseAffiliateEntity resAgent;
}
@@ -0,0 +1,32 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List;
/**
* @Classname MsCaseAffiliateVO
* @Description 案件人员表
* @Version 1.0.0
* @Date 2024/3/22 11:46
* @Created wangqiong
*/
@Getter
@Setter
@ToString
@Data
public class CaseAffiliateVO {
/**
* 申请人/操作人
*/
private List<CaseAffiliateBase> applicant;
/**
* 被申请人/操作人
*/
private List<CaseAffiliateBase> res;
}
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@@ -10,7 +11,7 @@ import java.util.List;
public interface CaseAffiliateLogMapper {
int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
int batchCaseAffiliate(List<CaseAffiliateEntity> caseAffiliates);
void deletecaseAffiliate(CaseApplication caseApplication);
@@ -3,6 +3,8 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
import org.apache.ibatis.annotations.Param;
@@ -18,28 +20,26 @@ public interface CaseAffiliateMapper {
void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
List<CaseAffiliate> selectCaseAffiliateByCaseIds(@Param("ids") List<Long> ids);
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
/**
* 根据案件查询邮箱
* @param id
* @return
*/
List<CaseAffiliate> emailByCaseId(@Param("caseAppliId")Long id);
/**
* 批量修改
* @param affiliateLogList
*/
void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
List<CaseAffiliateEntity> selectCaseAffiliate(CaseAffiliateEntity entity);
List<CaseAffiliateEntity> selectCaseAffiliateByCaseIds(@Param("caseIds") List<Long> ids);
/**
* 根据案件id删除
* @param caseId
*/
void deleteByCaseId(@Param("caseAppliId") Long caseId);
/**
* 新增人员
* @param affiliate
*/
void insert(CaseAffiliateEntity affiliate);
/**
* 根据案件id查询邮箱
* @param id
* @return
*/
List<CaseAffiliateEntity> emailByCaseId(Long id);
}
@@ -4,6 +4,7 @@ import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
import org.apache.ibatis.annotations.Param;
@@ -11,17 +12,9 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface CaseApplicationMapper {
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
int selectCaseApplicationCount(CaseApplication caseApplication);
/**
* 查询超级管理员案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
int insertCaseApplication(CaseApplication caseApplication);
@@ -40,7 +33,7 @@ public interface CaseApplicationMapper {
*/
List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
/**
* 查询最大编号
@@ -64,12 +57,11 @@ public interface CaseApplicationMapper {
void updatePayType(CaseConfirmPayDTO payDTO);
ToDoCount selectAdminCaseToDoCount();
ToDoCount selectTodoCountByRole(@Param("caseApplication") CaseApplication caseApplication,
@Param("caseStatusList") List<Integer> caseStatusList,
@Param("roleNames") List<String> roleNames);
@Param("roleIds") List<Long> roleIds);
/**
* 修改案件锁定状态
@@ -100,12 +92,6 @@ public interface CaseApplicationMapper {
*/
Long selectCaseIdByRoomId(@Param("roomId")String roomId);
/**
* 查询已办案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
/**
* 查询最大房间号
* @return
@@ -124,7 +110,7 @@ public interface CaseApplicationMapper {
* 查询最大批号
* @return
*/
Integer selectBatchNumberLike();
Integer selectMaxBatchNumber();
/**
* 批量新增案件
@@ -139,7 +125,7 @@ public interface CaseApplicationMapper {
List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
List<CaseApplication> selectAdminCaseApplicationListBatch1(CaseApplication caseApplication);
/**
* 案件列表查询
@@ -148,7 +134,7 @@ public interface CaseApplicationMapper {
*/
List<CaseApplication> list(@Param("caseApplication") CaseApplication caseApplication,
@Param("caseStatusList") List<Integer> caseStatusList,
@Param("roleNames") List<String> roleNames);
@Param("roleIds") List<Long> roleIds);
/**
* 查询当前案件节点
@@ -156,4 +142,13 @@ public interface CaseApplicationMapper {
* @return
*/
Integer selectCaseApplicationCaseStatus(@Param("id") Long id);
/**
* 新增
* @param caseApplication
* @return
*/
int insert(CaseApplicationDTO caseApplication);
int update(CaseApplicationDTO caseApplication);
}
@@ -9,10 +9,5 @@ import java.util.List;
@Mapper
public interface CaseEvidenceMapper {
List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
, @Param(value = "caseStatusList") List<Integer> caseStatusList
, @Param(value = "identityType" ) Integer identityType
, @Param(value = "phone" ) String phone
, @Param(value = "loginUserName" ) String loginUserName
);
}
@@ -16,19 +16,16 @@ public interface IAdjudicationService {
AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
// List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
AjaxResult signature(CaseApplication caseApplication);
AjaxResult caseFile( List<Long> ids);
AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
AjaxResult stamp(CaseApplication caseApplication);
AjaxResult getArchivesDetail(Long id);
AjaxResult regenerationDocument(CaseApplication caseApplication);
/**
* 根据案件id查询邮箱
@@ -2,12 +2,12 @@ package com.ruoyi.wisdomarbitrate.service;
import com.alibaba.fastjson.JSONArray;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseApplicationDTO;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import com.ruoyi.wisdomarbitrate.domain.vo.*;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
@@ -16,17 +16,15 @@ import java.util.List;
import java.util.Map;
public interface ICaseApplicationService {
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
List<CaseApplication> selectCaseApplicationListByRole(CaseApplication caseApplication);
int insertcaseApplication(CaseApplication caseApplication);
// int insertcaseApplication(CaseApplication caseApplication);
int insertcaseApplication1(CaseApplication caseApplication);
// int insertcaseApplication1(CaseApplication caseApplication);
int selectCaseApplicationCount(CaseApplication caseApplication);
AjaxResult editCaseApplication(CaseApplication caseApplication);
// AjaxResult editCaseApplication(CaseApplication caseApplication);
int submitCaseApplication( List<Long> ids);
@@ -50,8 +48,6 @@ public interface ICaseApplicationService {
int submitCaseApplicationCheck(List<Long> ids, Integer agreeOrNotCheck,String caseCheckReject);
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
@@ -139,13 +135,13 @@ public interface ICaseApplicationService {
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
// List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
public List<CaseApplication> page(CaseApplication caseApplication) ;
int submitCaseApplicationBatch(String batchNumber);
AjaxResult submitCaseApplicationBatch(String batchNumber);
int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
AjaxResult submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
int pendTralCheckBatch(CaseApplication caseApplication);
@@ -168,4 +164,55 @@ public interface ICaseApplicationService {
*/
AjaxResult saveOnlyOfficeFile(CaseAttach caseAttach);
/**
* 新增或编辑
* @param caseApplication
* @return
*/
AjaxResult insertOrUpdate(CaseApplicationDTO caseApplication);
/**
* 设置案件相关信息
* @param caseApplication
* @param affiliate
* @param groupOrder 组别
* @param operatorCount 操作人数量
* @param updateFlag 是否修改案件
*/
public int setCaseAfflicate(List<CaseAffiliateEntity> affliates,CaseApplicationDTO caseApplication, CaseAffiliateEntity affiliate, int groupOrder, int operatorCount, boolean updateFlag);
/**
* 新增案件
* @param caseApplication
*/
void insert(CaseApplicationDTO caseApplication);
/**
* 修改案件
* @param caseApplication
*/
void update(CaseApplicationDTO caseApplication);
/**
* 新增案件相关人员信息
* @param affiliate 相关人员信息
* @param roleIdList 角色id
* @param updateFlag 是否修改案件
*/
public void insertAfficateUser(CaseAffiliateEntity affiliate, List<Long> roleIdList,boolean updateFlag);
void insertCaseAfflicate(CaseAffiliateVO caseAffiliateVO, List<CaseAffiliateEntity> affliates,CaseApplicationDTO caseApplication);
/**
* 根据案件id查询相关人员
* @param id
* @return
*/
List<CaseAffiliateEntity> selectAfflicatesByCaseId(Long id);
SysUser getUserInfo();
}
@@ -13,11 +13,11 @@ import java.util.List;
public interface ICaseEvidenceService {
AjaxResult getCaseDetailsById(Long id,String userName);
// AjaxResult getCaseDetailsById(Long id,String userName);
AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
// List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
AjaxResult evidenceConfirmation(CaseApplication caseApplication);
@@ -247,7 +247,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
CaseApplication beforeCase = caseApplicationService.selectCaseApplication(caseApplication);
// 查询案件关联人员
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
// afterCase.setAffiliate(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
// 查询自定义字段表
afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
// 查询附件
@@ -259,17 +259,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
List<CaseAttach> afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
if (CollectionUtil.isNotEmpty(afterAttachList)) {
for (CaseAttach attach : afterAttachList) {
String annexName = attach.getAnnexName();
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
attach.setAnnexPath(annexPath);
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
attach.setAnnexName(annexNamenew);
}
String path = attach.getAnnexPath()==null?"":attach.getAnnexPath();
attach.setAnnexPath(path);
attach.setAnnexName(attach.getAnnexName());
}
afterCase.setCaseAttachList(afterAttachList);
}
@@ -299,7 +292,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
}
// 对比案件人员字段
compareAffilate(beforeCase, afterCase);
// compareAffilate(beforeCase, afterCase);
// 对比申请人证据资料
compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
// 对比自定义字段
@@ -385,70 +378,70 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
* @param beforeCase
* @param afterCase
*/
private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
// 对比人员字段
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
if (CollectionUtil.isNotEmpty(beforeCaseCaseAffiliates)) {
// 转为map
beforeCaseCaseAffiliateMap = beforeCaseCaseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, v -> v, (n1, n2) -> n2));
}
StringBuilder affiliateChangeColumn;
// 如果上一个版本和现版本有一个为空,那么所有字段都修改
if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates == null) {
affiliateChangeColumn = new StringBuilder();
for (String column : affiliateColumns) {
affiliateChangeColumn.append(column).append(",");
}
} else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
affiliateChangeColumn = new StringBuilder();
for (String column : affiliateColumns) {
affiliateChangeColumn.append(column).append(",");
}
} else if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates != null) {
for (CaseAffiliate afterCaseCaseAffiliate : afterCaseCaseAffiliates) {
// 找到相同身份类型的数据,进行对比
affiliateChangeColumn = new StringBuilder();
int identityType = afterCaseCaseAffiliate.getIdentityType();
if (beforeCaseCaseAffiliateMap != null && beforeCaseCaseAffiliateMap.containsKey(identityType)) {
CaseAffiliate beforeCaseCaseAffiliate = beforeCaseCaseAffiliateMap.get(identityType);
for (String column : affiliateColumns) {
String beforeValue = ObjectFieldUtils.getValue(beforeCaseCaseAffiliate, column);
String afterValue = ObjectFieldUtils.getValue(afterCaseCaseAffiliate, column);
if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
affiliateChangeColumn.append(column).append(",");
continue;
}
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
affiliateChangeColumn.append(column).append(",");
continue;
}
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
affiliateChangeColumn.append(column).append(",");
continue;
}
}
} else {
for (String column : affiliateColumns) {
affiliateChangeColumn.append(column).append(",");
}
}
afterCaseCaseAffiliate.setChangeColumn(affiliateChangeColumn.toString());
}
}
}
// private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
// // 对比人员字段
// List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
// List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
// Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
// if (CollectionUtil.isNotEmpty(beforeCaseCaseAffiliates)) {
// // 转为map
// beforeCaseCaseAffiliateMap = beforeCaseCaseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, v -> v, (n1, n2) -> n2));
// }
// StringBuilder affiliateChangeColumn;
// // 如果上一个版本和现版本有一个为空,那么所有字段都修改
// if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates == null) {
// affiliateChangeColumn = new StringBuilder();
// for (String column : affiliateColumns) {
//
// affiliateChangeColumn.append(column).append(",");
// }
//
// } else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
// affiliateChangeColumn = new StringBuilder();
// for (String column : affiliateColumns) {
//
// affiliateChangeColumn.append(column).append(",");
// }
// } else if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates != null) {
// for (CaseAffiliate afterCaseCaseAffiliate : afterCaseCaseAffiliates) {
// // 找到相同身份类型的数据,进行对比
// affiliateChangeColumn = new StringBuilder();
// int identityType = afterCaseCaseAffiliate.getIdentityType();
// if (beforeCaseCaseAffiliateMap != null && beforeCaseCaseAffiliateMap.containsKey(identityType)) {
// CaseAffiliate beforeCaseCaseAffiliate = beforeCaseCaseAffiliateMap.get(identityType);
// for (String column : affiliateColumns) {
// String beforeValue = ObjectFieldUtils.getValue(beforeCaseCaseAffiliate, column);
// String afterValue = ObjectFieldUtils.getValue(afterCaseCaseAffiliate, column);
// if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
// affiliateChangeColumn.append(column).append(",");
// continue;
// }
// if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
// affiliateChangeColumn.append(column).append(",");
// continue;
// }
// if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
// affiliateChangeColumn.append(column).append(",");
// continue;
//
// }
//
// }
//
//
// } else {
// for (String column : affiliateColumns) {
//
// affiliateChangeColumn.append(column).append(",");
// }
// }
// afterCaseCaseAffiliate.setChangeColumn(affiliateChangeColumn.toString());
//
// }
//
//
// }
// }
/**
* 同意撤销
@@ -1,6 +1,7 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.deepoove.poi.data.PictureRenderData;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -8,6 +9,7 @@ import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.WordUtil;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
@@ -56,6 +58,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
private RedisCache redisCache;
@Autowired
private ICaseApplicationService caseApplicationService;
@Autowired
private ICaseArbitrateService caseArbitrateService;
@Override
@Transactional
@@ -65,8 +69,11 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
if (caseApplication1 == null) {
return AjaxResult.success();
}
Integer currentStatus = caseApplication1.getCaseStatus();
// Integer currentStatus = caseApplication1.getCaseStatus();
Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
if (arbitratMethodOriral == null) {
return AjaxResult.error("请选择仲裁方式");
}
String caseNum = caseApplication1.getCaseNum();
if (opinion == 0) { //拒绝
@@ -77,46 +84,41 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
//修改案件状态为待修改开庭时间
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
} else {
caseApplication1.setArbitratMethod(2);
//修改案件状态为待书面审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
}
} else if (opinion == 1 ) {
} else if (opinion == 1) {
if (arbitratMethodOriral == 2) {
//修改案件状态为待书面审理
caseApplication1.setArbitratMethod(2);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
} else {
//修改案件状态为待修改开庭时间
caseApplication1.setArbitratMethod(1);
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
}
}else if (opinion == 2) {
} else if (opinion == 2) {
if (arbitratMethodNow == 2) {
//修改案件状态为待书面审理
caseApplication1.setArbitratMethod(2);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
} else {
//修改案件状态为待修改开庭时间
caseApplication1.setArbitratMethod(1);
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
}
}
@@ -126,14 +128,22 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplication1.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
//获取案件关联人信息
List<CaseAffiliateEntity> caseAffiliates = caseApplicationService.selectAfflicatesByCaseId(caseApplication1.getId());
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
ArrayList<CaseAffiliateEntity> operatorList = new ArrayList<>();
// 申请操作人
Optional<CaseAffiliateEntity> applicantAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
// 被申请操作人
Optional<CaseAffiliateEntity> resAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
if (!applicantAffiliateOpt.isPresent() || !resAffiliateOpt.isPresent()) {
throw new ServiceException("未找到案件操作人员");
}
operatorList.add(applicantAffiliateOpt.get());
operatorList.add(resAffiliateOpt.get());
for (CaseAffiliateEntity affiliate : operatorList) {
request.setTemplateId("1931000");
request.setPhone(affiliate.getContactTelphone());
request.setPhone(affiliate.getPhone());
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
// 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = affiliate.getName();
@@ -148,17 +158,17 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean){
if (aBoolean) {
smsSendRecord.setSendStatus(1);
}else {
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
return AjaxResult.success("审核成功");
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION_METHOD, "");
return AjaxResult.success();
}
@@ -170,68 +180,13 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if (caseApplications1 != null && caseApplications1.size() > 0) {
for(CaseApplication caseApplicationse:caseApplications1){
Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplicationse.getId());
String caseNum = caseApplicationse.getCaseNum();
Integer arbitratMethod = caseApplication.getArbitratMethod();
if (arbitratMethod == 1) {
caseApplicationse.setArbitratMethod(1);
caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
}else if (arbitratMethod == 2) {
//修改案件状态为待书面审理
caseApplicationse.setArbitratMethod(2);
caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
}
int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
if (i > 0) {
String arbitratMethodStr = caseApplicationse.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplicationse.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
request.setTemplateId("1931000");
request.setPhone(affiliate.getContactTelphone());
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
// 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplicationse.getId());
smsSendRecord.setCaseNum(caseApplicationse.getCaseNum());
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean){
smsSendRecord.setSendStatus(1);
}else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
for (CaseApplication caseApplicationse : caseApplications1) {
caseArbitrateService.examineArbitrateMethod(caseApplicationse, caseApplication.getOpinion(), caseApplication.getArbitratMethod());
}
}
}
}else{
} else {
throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
}
@@ -254,7 +209,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
//案件日志表里添加数据
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
// 生成裁决书
CaseApplication application = new CaseApplication();
@@ -266,7 +221,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
}
}else{
} else {
throw new ServiceException("这个批号没有批量书面审理的案件");
}
return AjaxResult.success();
@@ -276,7 +231,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
@Override
@Transactional
public AjaxResult writtenHear(CaseIds caseIds) {
if (caseIds!=null){
if (caseIds != null) {
List<Long> ids = caseIds.getIds();
for (Long caseId : ids) {
//查询案件详情
@@ -289,20 +244,10 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
if (arbitrateRecord1 != null) {
int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
}
} else {
//提交仲裁结果
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), caseApplication1.getCaseStatus(), "");
}
}
// 生成裁决书
CaseApplication application = new CaseApplication();
@@ -311,299 +256,16 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
//修改案件状态
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
}
return AjaxResult.success("审理成功");
}
return AjaxResult.error("请检查参数");
}
//生成裁决书
private Boolean generateAward(Long id) {
try {
Map<String, Object> datas = new HashMap<>();
if (id == null) {
return null;
}
//获取案件详细信息
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
//生成编码
String equipmentNo = getNewEquipmentNo();
datas.put("num", equipmentNo);
//获取仲裁记录表里的相关信息
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
arbitrateRecord.setCaseAppliId(id);
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
//获取案件关联人信息
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(id);
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
List<String> nameAgentList = new ArrayList<>();
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
//获取身份类型
int identityType = affiliate.getIdentityType();
if (identityType == 1) { //申请人
datas.put("appName", affiliate.getName());
datas.put("appAddress", affiliate.getResidenAffili());
datas.put("appContactAddress", affiliate.getContactAddress());
datas.put("appLegalPerson", affiliate.getCompLegalPerson());
datas.put("appLegalPersonTitle", affiliate.getCompLegalperPost());
datas.put("appAgentName", affiliate.getNameAgent());
datas.put("appAgentTitle", affiliate.getAppliAgentTitle());
nameAgentList.add(affiliate.getNameAgent());
} else if (identityType == 2) { //被申请人
datas.put("resName", affiliate.getName());
datas.put("resAddress", affiliate.getResidenAffili());
String responSex = affiliate.getResponSex();
if (responSex.equals("0")) {
datas.put("resSex", "男");
} else if (responSex.equals("1")){
datas.put("resSex", "女");
}else {
datas.put("resSex", "未知");
}
Date responBirth = affiliate.getResponBirth();
if (responBirth != null) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String responBirthStr = sdf.format(responBirth);
datas.put("resDateOfBirth", responBirthStr);
}
datas.put("resContactAddress", affiliate.getContactAddress());
nameAgentList.add(affiliate.getNameAgent());
}
}
}
Date createTime = caseApplication1.getCreateTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 将日期格式化为字符串
String createTimeStr = sdf.format(createTime);
datas.put("submissionDate", createTimeStr);
Date registerDate = caseApplication1.getRegisterDate();
String registerDateStr = sdf.format(registerDate);
datas.put("acceptDate", registerDateStr);
//反请求
Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
"《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
"仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
if (adjudicaCounter == null) {
datas.put("counterclaim", null);
} else if (adjudicaCounter == 1) {
datas.put("counterclaim", counterclaim);
} else {
datas.put("counterclaim", null);
}
//财产保全
Integer properPreser = caseApplication1.getProperPreser();
String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
"第二十八条之规定,将该申请提交至法院。";
if (properPreser == null) {
datas.put("preservation", null);
} else if (properPreser == 1) {
datas.put("preservation", preservation);
} else {
datas.put("preservation", null);
}
//管辖权异议
Integer objectiJuris = caseApplication1.getObjectiJuris();
String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《XX管辖异议申请书》,认为XXXXXX" +
",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
if (objectiJuris == null) {
datas.put("jurisdictionalObjection", null);
} else if (objectiJuris == 1) {
datas.put("jurisdictionalObjection", jurisdictionalObjection);
} else {
datas.put("jurisdictionalObjection", null);
}
String arbitratorName = caseApplication1.getArbitratorName();
datas.put("arbitratorName", arbitratorName);
Integer arbitratMethod = caseApplication1.getArbitratMethod();
Date hearDate = caseApplication1.getHearDate();
if (hearDate != null) {
String hearDateStr = sdf.format(hearDate);
//线上开庭时
if (arbitratMethod == 1) {
String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
datas.put("onLine1", onLine1);
datas.put("hearDate", hearDateStr);
datas.put("onLine2", onLine2);
} else {
//书面仲裁时
String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
String written2 = "在仲裁委所在地开庭审理了本案。";
datas.put("written1", written1);
datas.put("hearDate1", hearDateStr);
datas.put("written2", written2);
}
}
Integer isAbsence = caseApplication1.getIsAbsence();
if (isAbsence == null) {
datas.put("absent1", null);
datas.put("absent2", null);
datas.put("absent3", null);
datas.put("absent4", null);
datas.put("absent5", null);
datas.put("attend1", null);
datas.put("attend2", null);
datas.put("attend3", null);
datas.put("attend4", null);
datas.put("attend5", null);
datas.put("attend6", null);
datas.put("attend7", null);
datas.put("appAgentName1", null);
datas.put("appAgentName2", null);
datas.put("resAgentName", null);
} else if (isAbsence == 1) {
//缺席审理
String absent1 = "申请人的特别授权委托代理人";
String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
"《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。";
String absent3 = "庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明," +
"发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。";
String absent4 = "(二/三)当事人提供的证据材料\n" +
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
String absent5 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
"第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
datas.put("absent1", absent1);
datas.put("absent2", absent2);
datas.put("absent3", absent3);
datas.put("absent4", absent4);
datas.put("absent5", absent5);
datas.put("appAgentName1", nameAgentList.get(0));
} else {
//出席审理
String attend1 = "申请人的特别授权委托代理人";
String attend2 = "和被申请人本人/的特别授权委托代理人";
String attend3 = "出席了庭审。";
String attend4 = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;" +
"双方当事人均出示了证据材料并对对方的证据材料进行了质证;申请人出示了证据材料," +
"被申请人对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论," +
"并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。";
String attend5 = "(二)被申请人的答辩意见";
String attend6 = "(二/三)当事人提供的证据材料及对方的质证意见\n" +
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
String attend7 = "被申请人对上述材料的质证意见为:";
datas.put("attend1", attend1);
datas.put("attend2", attend2);
datas.put("attend3", attend3);
datas.put("attend4", attend4);
datas.put("attend5", attend5);
datas.put("attend6", attend6);
datas.put("attend7", attend7);
datas.put("responCrossOpin", caseApplication1.getResponCrossOpin());
datas.put("appAgentName2", nameAgentList.get(0));
datas.put("resAgentName", nameAgentList.get(1));
if (arbitratMethod == 1) {
//被申出席+开庭
String attend8 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
"第五十一条的规定,裁决如下:";
datas.put("attend8", attend8);
} else {
//被申出席+书面
String attend9 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
"第五十一条、第五十八条的规定,裁决如下:";
datas.put("attend9", attend9);
}
}
datas.put("claims", caseApplication1.getArbitratClaims());
datas.put("request", caseApplication1.getRequestRule());
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
List<CaseAttach> caseAttachList1 = caseApplication2.getCaseAttachList();
if (caseAttachList1 != null && caseAttachList1.size() > 0) {
for (CaseAttach caseAttach : caseAttachList1) {
if (caseAttach.getAnnexType() == 6) { //被申请人证据材料
String annexName = caseAttach.getAnnexName();
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
if (isImageFile) {
String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
System.out.println("路径是===========" + annexPath);
PictureRenderData pictureRenderData = WordUtil
.rebuildImageContent(100, 100, null, annexPath);
datas.put("resEvidenceMaterial", pictureRenderData);
}
} else if (caseAttach.getAnnexType() == 2) { //申请人证据材料
String annexName = caseAttach.getAnnexName();
boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
if (isImageFile) {
String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
System.out.println("路径是===========" + annexPath);
PictureRenderData pictureRenderData = WordUtil
.rebuildImageContent(100, 100, null, annexPath);
//申请人证据材料
datas.put("appEvidenceMaterial", pictureRenderData);
}
}
}
}
datas.put("applicaCrossOpin", "被申请人证据不足,无法说明事实");
datas.put("factDetermi", "被申请人欠款属实");
datas.put("arbitrateThink", " 被申请人应按约定还款");
datas.put("rulingFollows", "被申请人依法偿还申请人欠款");
LocalDate now = LocalDate.now();
String year = Integer.toString(now.getYear());
datas.put("year", year);
String month = String.format("%02d", now.getMonthValue());
String day = String.format("%02d", now.getDayOfMonth());
String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
//String modalFilePath = "D:/develop/新裁决书模板.docx";
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
//String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
String resultFilePath = saveFolderPath + "/" + fileName;
// 创建日期目录
File saveFolder = new File(saveFolderPath);
if (!saveFolder.exists()) {
saveFolder.mkdirs();
}
Path sourcePath = new File(modalFilePath).toPath();
Path destinationPath = new File(resultFilePath).toPath();
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
File file = new File(docFilePath);
if (file.exists()) {
InputStream in = new FileInputStream(file);
XWPFDocument xwpfDocument = new XWPFDocument(in);
WordUtil.changeText(xwpfDocument);
}
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
CaseAttach caseAttach = CaseAttach.builder()
.caseAppliId(id)
.annexName(saveName)
.annexPath(savePath)
.annexType(3)
.build();
//保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
CaseAttach caseAttach1 = new CaseAttach();
caseAttach1.setAnnexType(3);
caseAttach1.setCaseAppliId(id);
List<CaseAttach> caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach1);
if (caseAttachList != null && caseAttachList.size() > 0) {
//之前已经生成过了,更新
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
} else {
//之前没生成过,新增
int i = caseAttachMapper.save(caseAttach);
if (i > 0) {
if (arbitrateRecord1 != null) {
Long annexId = caseAttach.getAnnexId();
//将附件id保存到仲裁记录表里面
arbitrateRecord1.setAnnexId(annexId);
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
}
}
}
return Boolean.TRUE;
} catch (IOException e) {
return Boolean.FALSE;
}
}
public String getNewEquipmentNo() {
Object awardNum = redisCache.getCacheObject("awardNum");
@@ -59,77 +59,77 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
@Autowired
private ICaseApplicationService caseApplicationService;
@Override
@Transactional
public AjaxResult getCaseDetailsById(Long id, String userName) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 != null) {
CaseDetailVO caseDetailVO = new CaseDetailVO();
BeanUtils.copyProperties(caseApplication1, caseDetailVO);
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(id);
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
for (CaseAffiliate affiliate : caseAffiliates) {
if (affiliate.getName() != null) {
String name = affiliate.getName();
//判断当前登录人和案件关联人姓名是否一致
if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
caseDetailVO.setIdentityType(affiliate.getIdentityType());
}
}
if (affiliate.getIdentityType() == 1) { //申请人
caseDetailVO.setApplicantName(affiliate.getName());
} else {
caseDetailVO.setRespondentName(affiliate.getName());
}
//根据案件id查询案件证据材料
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
// @Override
// @Transactional
// public AjaxResult getCaseDetailsById(Long id, String userName) {
// CaseApplication caseApplication = new CaseApplication();
// caseApplication.setId(id);
// CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
// if (caseApplication1 != null) {
// CaseDetailVO caseDetailVO = new CaseDetailVO();
// BeanUtils.copyProperties(caseApplication1, caseDetailVO);
// CaseAffiliate caseAffiliate = new CaseAffiliate();
// caseAffiliate.setCaseAppliId(id);
// List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
// for (CaseAffiliate affiliate : caseAffiliates) {
// if (affiliate.getName() != null) {
// String name = affiliate.getName();
// //判断当前登录人和案件关联人姓名是否一致
// if (name.equals(userName)) { //一致,将案件关联人的身份类型赋给当前登录人
// caseDetailVO.setIdentityType(affiliate.getIdentityType());
// }
// }
// if (affiliate.getIdentityType() == 1) { //申请人
// caseDetailVO.setApplicantName(affiliate.getName());
// } else {
// caseDetailVO.setRespondentName(affiliate.getName());
// }
// //根据案件id查询案件证据材料
// List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
// if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
//// for (CaseAttach caseAttach : evidenceMaterialList) {
//// //根据附件类型决定返回的路径
//// Integer annexType = caseAttach.getAnnexType();
//// if (annexType != 1){
//// String path = caseAttach.getAnnexName();
//// String prefix = "/profile";
//// int startIndex = path.indexOf(prefix);
//// startIndex += prefix.length();
//// String extractedPath = "/uploadPath" + path.substring(startIndex);
//// caseAttach.setAnnexPath(extractedPath);
//// }else {
//// String annexPath = caseAttach.getAnnexPath();
//// String result = annexPath.replace("/home/ruoyi", "");
//// caseAttach.setAnnexPath(result);
//// }
//// }
//
// for (CaseAttach caseAttach : evidenceMaterialList) {
// //根据附件类型决定返回的路径
// Integer annexType = caseAttach.getAnnexType();
// if (annexType != 1){
// String path = caseAttach.getAnnexName();
// String annexName = caseAttach.getAnnexName();
// String prefix = "/profile";
// int startIndex = path.indexOf(prefix);
// int startIndex = annexName.indexOf(prefix);
// if(startIndex!=-1) {
// startIndex += prefix.length();
// String extractedPath = "/uploadPath" + path.substring(startIndex);
// caseAttach.setAnnexPath(extractedPath);
// }else {
// String annexPath = caseAttach.getAnnexPath();
// String result = annexPath.replace("/home/ruoyi", "");
// caseAttach.setAnnexPath(result);
//
// String annexPath = "/uploadPath" + annexName.substring(startIndex);
// caseAttach.setAnnexPath(annexPath);
// }
// int startIndexnew = annexName.lastIndexOf("/");
// if (startIndexnew != -1) {
// String annexNamenew = annexName.substring(startIndexnew + 1);
// caseAttach.setAnnexName(annexNamenew);
// }
//
//
// }
//
// }
// caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
// }
// return AjaxResult.success(caseDetailVO);
// }
// return null;
// }
for (CaseAttach caseAttach : evidenceMaterialList) {
String annexName = caseAttach.getAnnexName();
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
if(startIndex!=-1) {
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
caseAttach.setAnnexPath(annexPath);
}
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
}
}
}
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
}
return AjaxResult.success(caseDetailVO);
}
return null;
}
@Override
@Transactional
@@ -138,10 +138,12 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
if (file.isEmpty()) {
return AjaxResult.error("请选择要上传的文件");
}
AjaxResult success = AjaxResult.success();
try {
String filePath = RuoYiConfig.getUploadPath();
// 上传
String fileName = FileUploadUtils.upload(filePath, file);
String name = file.getOriginalFilename();
String suffix = getFileExtension(fileName);
if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
// 上传到onlyoffice
@@ -149,30 +151,47 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
if(jsonArray!=null && jsonArray.size() > 0) {
for (Object obj : jsonArray) {
JSONObject jsonObject = (JSONObject) obj;
String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
path=path.replace("/home/ruoyi/uploadPath/","/profile/");
name = jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"";
CaseAttach caseAttach = CaseAttach.builder()
.caseAppliId(id)
.annexType(annexType)
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
.annexName(name)
.onlyOfficeFileId(jsonObject.getString("fileId"))
.annexPath(path)
.build();
if(jsonObject.get("filePath")!=null){
String officePath = jsonObject.getString("filePath");
String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
caseAttach.setAnnexPath(replace);
// if(jsonObject.get("filePath")!=null){
// String officePath = jsonObject.getString("filePath");
// String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
// caseAttach.setAnnexPath(replace);
//
// }
if(annexType!=null && annexType.equals(8)){
// 缴费单,先删除
caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,annexType);
}
caseAttachMapper.save(caseAttach);
success.put("annexId", caseAttach.getAnnexId());
success.put("annexType", caseAttach.getAnnexType());
}
}
}else {
filePath=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
if(annexType!=null && annexType.equals(8)){
// 缴费单,先删除
caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,annexType);
}
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
.annexName(fileName)
.annexName(name)
.annexPath(filePath)
.annexType(annexType)
.userId(userId)
.userName(userName)
.build();
int count = caseAttachMapper.save(caseAttach);
success.put("annexId", caseAttach.getAnnexId());
success.put("annexType", caseAttach.getAnnexType());
}
if ( annexType != null && annexType != 8) {
if (id != null) {
@@ -183,7 +202,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
return AjaxResult.success();
return success;
} catch (IOException e) {
e.printStackTrace();
}
@@ -195,49 +214,49 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
@Autowired
IdentityAuthenticationMapper identityAuthenticationMapper;
@Override
public List<CaseEvidenceVO> getCaseListAll(Integer caseStatus) {
// 是否为超级管理员
int adMinFlag=0;
String identityNum = "";
IdentityAuthentication authentication = new IdentityAuthentication();
LoginUser loginUser = SecurityUtils.getLoginUser();
// 查询该用户的角色
// 查询登录人手机号
SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
String username = sysUser.getUserName();
List<SysRole> roles = sysUser.getRoles();
if(CollectionUtil.isNotEmpty(roles)){
for (SysRole role : roles) {
if(role.getRoleName().equals("超级管理员")
){
// 超级管理员可查看所有待案件质证的案件
adMinFlag=1;
break;
}
}
}
// if(adMinFlag!=1) {
// authentication.setUserName(username);
// IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
// if (authentication1 != null) {
// identityNum = authentication1.getIdentityNo();
// @Override
// public List<CaseEvidenceVO> getCaseListAll(Integer caseStatus) {
// // 是否为超级管理员
// int adMinFlag=0;
// String identityNum = "";
// IdentityAuthentication authentication = new IdentityAuthentication();
// LoginUser loginUser = SecurityUtils.getLoginUser();
// // 查询该用户的角色
// // 查询登录人手机号
// SysUser sysUser = sysUserMapper.selectUserById(loginUser.getUserId());
// String username = sysUser.getUserName();
// List<SysRole> roles = sysUser.getRoles();
// if(CollectionUtil.isNotEmpty(roles)){
// for (SysRole role : roles) {
// if(role.getRoleName().equals("超级管理员")
// ){
// // 超级管理员可查看所有待案件质证的案件
// adMinFlag=1;
// break;
// }
// }
String phone=sysUser.getPhonenumber();
List<Integer> caseStatusList = Arrays.asList(caseStatus);
// return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
return getCaseEvidenceVOListByPhone(phone, caseStatusList, 2);
}
// }
//// if(adMinFlag!=1) {
//// authentication.setUserName(username);
//// IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
//// if (authentication1 != null) {
//// identityNum = authentication1.getIdentityNo();
//// }
//// }
// String phone=sysUser.getPhonenumber();
// List<Integer> caseStatusList = Arrays.asList(caseStatus);
//// return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
// return getCaseEvidenceVOListByPhone(phone, caseStatusList, 2);
// }
@Override
public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
// Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseApplication.getId());
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),currentStatus, "");
// CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants., "");
return AjaxResult.success("证据确认成功");
}
@@ -275,7 +294,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), caseStatus, "");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
return AjaxResult.success("提交成功");
}
@@ -291,6 +310,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
for (MultipartFile file : files) {
// 上传
String fileName = FileUploadUtils.upload(filePath, file);
String name=file.getOriginalFilename();
String suffix = getFileExtension(fileName);
if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
// 上传onlyoffice
@@ -298,25 +318,24 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
if(jsonArray!=null && jsonArray.size() > 0) {
for (Object obj : jsonArray) {
JSONObject jsonObject = (JSONObject) obj;
String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
// name = jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"";
path=path.replace("/home/ruoyi/uploadPath/","/profile/");
CaseAttach caseAttach = CaseAttach.builder()
.caseAppliId(id)
.annexType(annexType)
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
.annexName(name)
.annexPath(path)
.onlyOfficeFileId(jsonObject.getString("fileId"))
.build();
if(jsonObject.get("filePath")!=null){
String officePath = jsonObject.getString("filePath");
String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
caseAttach.setAnnexPath(replace);
}
caseAttachMapper.save(caseAttach);
}
}
}else {
filePath=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
.annexName(fileName)
.annexName(name)
.annexPath(filePath)
.annexType(annexType)
.userId(userId)
@@ -334,10 +353,11 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
}
// 给秘书发送短信
// 根据caseid查询该案件的法律顾问,根据案件id查申请表,查到申请机构id,然后拿申请机构id查询在哪个人下并且角色要是法律顾问
CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(id, 1);
if(caseAffiliate!= null && StrUtil.isNotEmpty(caseAffiliate.getApplicationOrganId())){
List<SysUser> userList= sysUserMapper.selectByDeptIdAndRole(caseAffiliate.getApplicationOrganId(),"法律顾问");
if(CollectionUtil.isNotEmpty(userList)){
// CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(id, 1);
// if(caseAffiliate!= null && StrUtil.isNotEmpty(caseAffiliate.getApplicationOrganId())){
// List<SysUser> userList= sysUserMapper.selectByDeptIdAndRole(caseAffiliate.getApplicationOrganId(),"法律顾问");
SysUser user= sysUserMapper.selectUserByRole("法律顾问");
if(user!=null){
// 新增短信记录
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
// 1992106 普通短信 修改证据资料通知 尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
@@ -345,13 +365,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id);
caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
for (SysUser user : userList) {
request.setPhone(user.getPhonenumber());
request.setTemplateParamSet(new String[]{user.getNickName(),caseApplication.getCaseNum()});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
smsSendRecord.setCaseId(id);
smsSendRecord.setCaseNum(caseApplication.getCaseNum());
smsSendRecord.setPhone(request.getPhone());
@@ -365,10 +385,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
}
return AjaxResult.success("上传成功");
@@ -383,17 +403,13 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
if (CollectionUtil.isNotEmpty(caseAttachList)) {
for (CaseAttach caseAttach : caseAttachList) {
String annexName = caseAttach.getAnnexName();
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
caseAttach.setAnnexPath(annexPath);
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
String annexPath = caseAttach.getAnnexPath();
if(StrUtil.isEmpty(annexPath)){
continue;
}
caseAttach.setAnnexPath(annexPath);
caseAttach.setAnnexName(caseAttach.getAnnexName());
}
return AjaxResult.success(caseAttachList);
}
@@ -463,9 +479,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
String filePath = RuoYiConfig.getUploadPath();
// 上传
String fileName = FileUploadUtils.upload(filePath, file);
fileName=fileName.replace("/home/ruoyi/uploadPath/","/profile/");
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
.annexName(fileName)
.annexPath(filePath)
.annexName(file.getOriginalFilename())
.annexPath(fileName)
.annexType(annexType)
.userId(userId)
.userName(username)
@@ -517,44 +534,44 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
return getChildList(list, t).size() > 0;
}
private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType,null,SecurityUtils.getUsername());
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
//根据案件id查询姓名
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
for (CaseAffiliate affiliate : caseAffiliates) {
if (affiliate.getIdentityType() == 1) { //申请人
caseEvidenceVO.setApplicantName(affiliate.getName());
} else {
caseEvidenceVO.setRespondentName(affiliate.getName());
}
}
}
return caseListByRespondent;
}
return null;
}
private List<CaseEvidenceVO> getCaseEvidenceVOListByPhone(String phone, List<Integer> caseStatusList, Integer identityType) {
List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(null, caseStatusList, identityType,phone,SecurityUtils.getUsername());
if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
//根据案件id查询姓名
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
for (CaseAffiliate affiliate : caseAffiliates) {
if (affiliate.getIdentityType() == 1) { //申请人
caseEvidenceVO.setApplicantName(affiliate.getName());
} else {
caseEvidenceVO.setRespondentName(affiliate.getName());
}
}
}
return caseListByRespondent;
}
return null;
}
// private List<CaseEvidenceVO> getCaseEvidenceVOList(String identityNum, List<Integer> caseStatusList, Integer identityType) {
// List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(identityNum, caseStatusList, identityType,null,SecurityUtils.getUsername());
// if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
// for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
// //根据案件id查询姓名
// CaseAffiliate caseAffiliate = new CaseAffiliate();
// caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
// List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
// for (CaseAffiliate affiliate : caseAffiliates) {
// if (affiliate.getIdentityType() == 1) { //申请人
// caseEvidenceVO.setApplicantName(affiliate.getName());
// } else {
// caseEvidenceVO.setRespondentName(affiliate.getName());
// }
// }
// }
// return caseListByRespondent;
// }
// return null;
// }
// private List<CaseEvidenceVO> getCaseEvidenceVOListByPhone(String phone, List<Integer> caseStatusList, Integer identityType) {
// List<CaseEvidenceVO> caseListByRespondent = caseEvidenceMapper.getCaseListByRespondent(null, caseStatusList, identityType,phone,SecurityUtils.getUsername());
// if (caseListByRespondent != null && caseListByRespondent.size() > 0) {
// for (CaseEvidenceVO caseEvidenceVO : caseListByRespondent) {
// //根据案件id查询姓名
// CaseAffiliate caseAffiliate = new CaseAffiliate();
// caseAffiliate.setCaseAppliId(caseEvidenceVO.getId());
// List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
// for (CaseAffiliate affiliate : caseAffiliates) {
// if (affiliate.getIdentityType() == 1) { //申请人
// caseEvidenceVO.setApplicantName(affiliate.getName());
// } else {
// caseEvidenceVO.setRespondentName(affiliate.getName());
// }
// }
// }
// return caseListByRespondent;
// }
// return null;
// }
}
@@ -13,6 +13,7 @@ import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
@@ -31,6 +32,7 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -47,6 +49,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
private SmsRecordMapper smsRecordMapper;
@Autowired
private ArbitrateRecordMapper arbitrateRecordMapper;
private ICasePaymentService casePaymentService;
@Autowired
public CasePaymentServiceImpl(ElegentPay elegentPay
@@ -118,8 +121,14 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
for (Long id : batchCaseApplication.getIds()) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id);
//查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) {
continue;
}
// 查询当前案件节点
Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(id);
// Integer currentStatus= caseApplicationMapper.selectCaseApplicationCaseStatus(id);
if(batchCaseApplication.getAgreeOrNotCheck().equals(1)){
// 同意,更新案件状态为案件质证
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
@@ -146,23 +155,23 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
caseApplicationMapper.submitCaseApplication(caseApplication);
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
List<CaseAffiliateEntity> caseAffiliates = caseApplicationService.selectAfflicatesByCaseId(caseApplication.getId());
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
//获取身份类型
int identityType = affiliate.getIdentityType();
//查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) {
continue;
// 申请操作人
Optional<CaseAffiliateEntity> applicantAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
// 被申请操作人
Optional<CaseAffiliateEntity> resAffiliateOpt = caseAffiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(3) || affiliate.getRoleType().equals(4))).findFirst();
if (!applicantAffiliateOpt.isPresent() || !resAffiliateOpt.isPresent()) {
throw new ServiceException("未找到案件操作人员");
}
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
String caseNum = caseApplication1.getCaseNum();
if (identityType == 1) { //申请人
String name = affiliate.getName();
request.setPhone(affiliate.getContactTelphone());
CaseAffiliateEntity app = applicantAffiliateOpt.get();
CaseAffiliateEntity res = resAffiliateOpt.get();
//申请人
String name = app.getName();
request.setPhone(app.getPhone());
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
@@ -189,17 +198,17 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} else { //被申请人
//被申请人
if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
request.setPhone(affiliate.getContactTelphone());
request.setPhone(res.getPhone());
request.setTemplateId("1952840");
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
String name = affiliate.getName();
name = res.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
Boolean aBoolean = SmsUtils.sendSms(request);
aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setPhone(request.getPhone());
@@ -214,8 +223,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
}
//更改记录表里的支付状态和支付时间
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
casePaymentRecord.setPaymentStatus(1);
@@ -224,9 +233,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
casePaymentRecordMapper.update(casePaymentRecord);
// 新增日志
if(batchCaseApplication.getAgreeOrNotCheck().equals(1)) {
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
}else {
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "拒绝原因:"+batchCaseApplication.getCaseCheckReject());
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "拒绝原因:"+batchCaseApplication.getCaseCheckReject());
}
}
}
@@ -271,7 +280,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
paymentRecord.setPaymentStatus(1);
casePaymentRecordMapper.saveRecord(paymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus ,"");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT ,"");
}
}
@@ -403,90 +412,10 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
if (caseApplications != null && caseApplications.size() > 0) {
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
for (Long caseId : caseIds) {
Integer currentStatus = caseApplicationMapper.selectCaseApplicationCaseStatus(caseId);
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
caseApplicationMapper.submitCaseApplication(caseApplication);
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
//获取身份类型
int identityType = affiliate.getIdentityType();
//查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) {
continue;
}
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
String caseNum = caseApplication1.getCaseNum();
if (identityType == 1) { //申请人
request.setPhone(affiliate.getContactTelphone());
request.setTemplateId("1928003"); //传入申请人模板id
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
// 模板id:1928003 普通短信 案件受理通知
String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1);
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} else { //被申请人
BatchCaseApplication batchCaseApplication = new BatchCaseApplication();
batchCaseApplication.setIds(caseIds);
casePaymentService.confirmPayment(batchCaseApplication);
request.setPhone(affiliate.getContactTelphone());
request.setTemplateId("1952840");
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1);
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
//更改记录表里的支付状态和支付时间
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
casePaymentRecord.setPaymentStatus(1);
casePaymentRecord.setCaseId(caseId);
casePaymentRecord.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), currentStatus, "");
}
}
}else{
throw new ServiceException("这个批号没有批量缴费确认的案件");
}
@@ -50,6 +50,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static com.google.common.io.Files.getFileExtension;
import static com.ruoyi.common.constant.FileTransformation.getFileName;
import static com.ruoyi.common.core.domain.AjaxResult.error;
import static com.ruoyi.common.core.domain.AjaxResult.success;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -209,7 +210,7 @@ public class CaseZipImportImpl {
public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser) {
// fileMap<caseId, List<File>>
Map<String, String> fatchMap = new HashMap<>();
Integer batchNumber = caseApplicationMapper.selectBatchNumberLike();
Integer batchNumber = caseApplicationMapper.selectMaxBatchNumber();
AtomicInteger maxBatchNumber = new AtomicInteger();
if (batchNumber == null) {
maxBatchNumber.set(1);
@@ -268,7 +269,7 @@ public class CaseZipImportImpl {
// 需要新增的用户
List<SysUser> addUsers = new ArrayList<>();
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
// caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplication.setCaseLogId(IdWorkerUtil.getId());
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
caseApplication.setCaseAppliId(caseApplication.getId());
@@ -290,6 +291,8 @@ public class CaseZipImportImpl {
if (StrUtil.isEmpty(fileUrl)) {
continue;
}
// 根据路径获取文件名
String name = getFileName(fileUrl);
String suffix = getFileExtension(fileUrl);
if (StrUtil.isNotEmpty(suffix) && suffix.contains("doc")) {
// 上传onlyoffice
@@ -297,18 +300,21 @@ public class CaseZipImportImpl {
if(jsonArray!=null && jsonArray.size() > 0) {
for (Object obj : jsonArray) {
JSONObject jsonObject = (JSONObject) obj;
String path = jsonObject.get("filePath")!=null?jsonObject.getString("filePath"):"";
path=path.replace("/home/ruoyi/uploadPath/","/profile/");
// String name = jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"";
CaseAttach caseAttach = CaseAttach.builder()
.caseAppliId(caseApplication.getId())
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
.annexName(name)
.annexPath(path)
.onlyOfficeFileId(jsonObject.getString("fileId"))
.build();
if(jsonObject.get("filePath")!=null){
String officePath = jsonObject.getString("filePath");
String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
caseAttach.setAnnexPath(replace);
}
// if(jsonObject.get("filePath")!=null){
// String officePath = jsonObject.getString("filePath");
// String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
// caseAttach.setAnnexPath(replace);
//
// }
if(fileUrl.contains("申请书")){
CaseAttach applyFile = new CaseAttach();
BeanUtil.copyProperties(caseAttach, applyFile);
@@ -326,11 +332,11 @@ public class CaseZipImportImpl {
CaseAttach caseAttach = new CaseAttach();
caseAttach.setCaseAppliId(caseApplication.getId());
filePath=filePath.replace("home/ruoyi/uploadPath/","profile/");
caseAttach.setAnnexPath(filePath);
if (StrUtil.isNotEmpty(fileUrl)) {
String fileName = fileUrl.replace(filePath, "/profile/upload");
caseAttach.setAnnexName(fileName);
}
caseAttach.setAnnexName(name);
// 申请人提供的证据材料
caseAttach.setAnnexType(2);
caseAttachs.add(caseAttach);
@@ -359,7 +365,7 @@ public class CaseZipImportImpl {
caseApplicationMapper.insertCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
// CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_INSERT, "",loginUser);
caseApplicationLogMapper.insert(caseApplication);
// 多线程执行
if (CollectionUtil.isNotEmpty(addUsers)) {
@@ -374,12 +380,13 @@ public class CaseZipImportImpl {
sysDeptMapper.batchSave(sysDepts);
}
if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
}
// todo
// if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
//
// caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
// //todo
//// caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
// }
if (CollectionUtil.isNotEmpty(caseAttachs)) {
caseAttachMapper.batchSave(caseAttachs);
caseAttachLogMapper.batchSave(caseAttachs);
@@ -772,7 +779,8 @@ public class CaseZipImportImpl {
if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
caseAffiliates.add(debtorAffiliate);
}
caseApplication.setCaseAffiliates(caseAffiliates);
// todo
// caseApplication.setCaseAffiliates(caseAffiliates);
}
@@ -248,8 +248,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
if (downLoadFile) {
CaseAttach caseAttach = new CaseAttach();
caseAttach.setAnnexType(10); //10代表印章图片
caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName);
caseAttach.setAnnexPath(saveName);
caseAttach.setAnnexName(fileName);
int i1 = caseAttachMapper.save(caseAttach);
if (i1 > 0) {
//将附件id保存到公章管理表里
@@ -8,6 +8,7 @@ import com.google.gson.JsonObject;
import com.ruoyi.common.constant.FileTransformation;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.utils.EmailOutUtil;
import com.ruoyi.common.utils.SecurityUtils;
@@ -48,6 +49,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
private SealManageMapper sealManageMapper;
@Autowired
private CaseLogRecordMapper caseLogRecordMapper;
@Autowired
private SysUserMapper sysUserMapper;
/**
* 签署流程回调,即签名用印回调
@@ -85,10 +88,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
Long caseAppliId = sealSignRecordsel.getCaseAppliId();
CaseApplication req = new CaseApplication();
req.setId(caseAppliId);
// 根据电话查询用户名
SysUser sysUser = sysUserMapper.selectUserByPhone(accountMobile);
if ("SIGN_MISSON_COMPLETE".equals(action) && signResult == 2) {
if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(pensonAccount)) {
//申请人签名
//调解员签名
sealSignRecordsel.setSignStatusArbitor(1);
sealSignRecordMapper.updataSealSignRecord(sealSignRecordsel);
CaseLogRecord operLog = new CaseLogRecord();
@@ -96,6 +100,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(13);
operLog.setCreateTime(dateOperate);
if(sysUser!=null){
operLog.setCreateBy(sysUser.getUserName());
}
caseLogRecordMapper.insertCaseLogRecord(operLog);
CaseApplication application = new CaseApplication();
@@ -158,8 +165,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
caseAttach.setAnnexType(3);
caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName);
caseAttach.setUserName(SecurityUtils.getUsername());
caseAttach.setUserId(SecurityUtils.getUserId());
//caseAttach.setUserName(SecurityUtils.getUsername());
//caseAttach.setUserId(SecurityUtils.getUserId());
// 删除已存在的
caseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, 3);
caseAttachMapper.save(caseAttach);
@@ -27,9 +27,11 @@ import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity;
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import com.ruoyi.wisdomarbitrate.service.VideoService;
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
import com.tencentcloudapi.common.Credential;
@@ -96,6 +98,8 @@ public class VideoServiceImpl implements VideoService {
private SysRoleMapper roleMapper;
@Autowired
private SysUserMapper userMapper;
@Autowired
private ICaseApplicationService caseApplicationService;
/**
* 功能:第三方回调sign校验
* 参数:
@@ -179,17 +183,11 @@ public class VideoServiceImpl implements VideoService {
return success();
}
for (CaseAttach caseAttach : caseAttachList) {
String annexName = caseAttach.getAnnexName();
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
caseAttach.setAnnexPath(annexPath);
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
}
caseAttach.setAnnexPath(caseAttach.getAnnexPath());
caseAttach.setAnnexName(caseAttach.getAnnexName());
}
return success(caseAttachList);
}
@@ -374,9 +372,10 @@ public class VideoServiceImpl implements VideoService {
// 绑定案件
if(convertFlag){
// String path=fileName.replace("")
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
.annexName(fileName)
.annexPath(RuoYiConfig.getHtml2PDFPath())
.annexName(currentFileName)
.annexPath(fileName)
.annexType(7)
.build();
caseAttachMapper.save(caseAttach);
@@ -400,16 +399,10 @@ public class VideoServiceImpl implements VideoService {
if (caseAttachList != null && caseAttachList.size() > 0) {
for (CaseAttach caseAttach : caseAttachList) {
String annexName = caseAttach.getAnnexName();
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
caseAttach.setAnnexPath(annexPath);
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
}
caseAttach.setAnnexPath(caseAttach.getAnnexPath());
caseAttach.setAnnexName(annexName);
}
@@ -497,8 +490,8 @@ public class VideoServiceImpl implements VideoService {
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
// 存入数据库
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
.annexName(annexName)
.annexPath(RuoYiConfig.getVideoUploadPath())
.annexName(fileName)
.annexPath(annexName)
.annexType(9)
.build();
caseAttachMapper.save(caseAttach);
@@ -517,10 +510,7 @@ public class VideoServiceImpl implements VideoService {
@Override
public AjaxResult selectRoleMenuByCaseId(Long caseId) {
AjaxResult result = success();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseId);
// 根据案件id查询相关人员
List<CaseAffiliate> msCaseAffiliates = affiliateMapper.selectCaseAffiliate(caseAffiliate);
List<CaseAffiliateEntity> msCaseAffiliates = caseApplicationService.selectAfflicatesByCaseId(caseId);
if (CollectionUtil.isEmpty(msCaseAffiliates)) {
return error("未找到案件相关人员");
}
@@ -532,27 +522,16 @@ public class VideoServiceImpl implements VideoService {
if (sysUser == null) {
return error("未找到当前登录用户");
}
for (CaseAffiliate affiliate : msCaseAffiliates) {
if (StrUtil.isEmpty(sysUser.getPhonenumber())) {
continue;
for (CaseAffiliateEntity affiliate : msCaseAffiliates) {
if(affiliate.getOperatorFlag()!=null && affiliate.getOperatorFlag()==1 && affiliate.getUserId()!=null&&affiliate.getUserId().equals(userId)&&affiliate.getRoleType()!=null){
if(affiliate.getRoleType().equals(1)||affiliate.getRoleType().equals(2)){
// 申请人操作人
result.put("appFlag","1");
}
// 申请人,根据电话判断用户在该案件是否为申请人
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent()) && sysUser.getPhonenumber().equals(affiliate.getContactTelphoneAgent())) {
if (affiliate.getIdentityType() == 1) {
result.put("appFlag", "1");
} else if (affiliate.getIdentityType() == 2) {
// 申请人代理人
result.put("resFlag", "1");
if(affiliate.getRoleType().equals(3)||affiliate.getRoleType().equals(4)){
// 被申请人操作人
result.put("resFlag","1");
}
} else if (StrUtil.isNotEmpty(affiliate.getContactTelphone()) && sysUser.getPhonenumber().equals(affiliate.getContactTelphone())) {
if (affiliate.getIdentityType() == 1) {
// 在该案件中为申请人或者申请代理人
result.put("appFlag", "1");
} else if (affiliate.getIdentityType() == 2) {
// 在该案件中为被申请人或者被申请代理人
result.put("resFlag", "1");
}
}
}
return result;
@@ -236,8 +236,8 @@ public class FixSelectFlowDetailUtils {
if (downLoadFile) {
CaseAttach caseAttach = new CaseAttach();
caseAttach.setAnnexType(10); //10代表印章图片
caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName);
caseAttach.setAnnexPath(saveName);
caseAttach.setAnnexName(fileName);
int i1 = caseAttachMapper.save(caseAttach);
if (i1 > 0) {
//将印章信息保存到公章管理表里
@@ -105,6 +105,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="code != null and code != ''">code,</if>
<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person,</if>
<if test="home != null and home != ''">home,</if>
<if test="address != null and address != ''">address,</if>
<if test="nationality != null ">nationality,</if>
create_time
)values(
<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -118,6 +123,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="code != null and code != ''">#{code},</if>
<if test="compLegalPerson != null and compLegalPerson != ''">#{compLegalPerson},</if>
<if test="home != null and home != ''">#{home},</if>
<if test="address != null and address != ''">#{address},</if>
<if test="nationality != null ">#{nationality},</if>
sysdate()
);
</insert>
@@ -168,6 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="code != null and code != ''">code = #{code},</if>
<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person = #{compLegalPerson},</if>
<if test="home != null and home != ''">home = #{home},</if>
<if test="address != null and address != ''">address = #{address},</if>
<if test="nationality != null ">nationality = #{nationality},</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}
@@ -196,5 +211,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteDeptById" parameterType="Long">
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
<select id="selectDeptByName" resultMap="SysDeptResult">
<include refid="selectDeptVo"/>
where dept_name=#{deptName} and del_flag = '0' limit 1
</select>
</mapper>
@@ -49,9 +49,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
select u.*,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@@ -217,11 +217,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="position != null and position != ''">position,</if>
<if test="userId != null and userId != 0">user_id,</if>
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="idCard != null and idCard != ''">id_card,</if>
<if test="idType != null ">id_type,</if>
<if test="nationality != null ">nationality,</if>
<if test="birth != null ">birth,</if>
<if test="home != null and home != '' ">home,</if>
<if test="address != null and address != '' ">address,</if>
<if test="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
@@ -232,11 +238,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null and remark != ''">remark,</if>
create_time
)values(
<if test="position != null and position != ''">#{position},</if>
<if test="userId != null and userId != ''">#{userId},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="idCard != null and idCard != ''">#{idCard},</if>
<if test="idType != null ">#{idType},</if>
<if test="nationality != null ">#{nationality},</if>
<if test="birth != null ">#{birth},</if>
<if test="home != null and home != '' ">#{home},</if>
<if test="address != null and address != '' ">#{address},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
@@ -250,6 +262,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<insert id="batchSave">
insert into sys_user(
position,
user_id,
dept_id,
user_name,
@@ -267,6 +280,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.position},
#{item.userId},
#{item.deptId},
#{item.userName},
@@ -292,6 +306,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
<if test="position != null and position != ''">position = #{position},</if>
<if test="idType != null">id_type = #{idType},</if>
<if test="nationality != null">nationality = #{nationality},</if>
<if test="birth != null ">birth = #{birth},</if>
<if test="home != null and home != '' ">home = #{home},</if>
<if test="address != null and address != '' ">address = #{address},</if>
<if test="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
@@ -335,5 +355,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
INNER JOIN sys_dept d ON u.dept_id = d.dept_id
WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
</select>
<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
select u.*
from sys_user u
where u.email = #{email} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
<select id="selectUserByRole" resultMap="SysUserResult">
SELECT u.* FROM sys_user u
INNER JOIN sys_user_role ur ON u.user_id = ur.user_id
INNER JOIN sys_dept d ON u.dept_id = d.dept_id
WHERE ur.role_id = #{roleId}
</select>
</mapper>
@@ -16,6 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countUserRoleByRoleId" resultType="Integer">
select count(1) from sys_user_role where role_id=#{roleId}
</select>
<select id="selectRoleIdsByUserId" resultType="java.lang.Long">
select role_id from sys_user_role where user_id=#{userId}
</select>
<delete id="deleteUserRole" parameterType="Long">
delete from sys_user_role where user_id in
@@ -41,4 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId}
</foreach>
</delete>
<insert id="insertUserRole">
insert into sys_user_role(user_id, role_id) values(#{userId}, #{roleId})
</insert>
</mapper>
@@ -102,6 +102,7 @@
AND a.case_appli_id = #{caseAppliId}
</if>
</where>
limit 1
</select>
@@ -63,22 +63,11 @@
<insert id="batchCaseAffiliate">
insert into case_affiliate_log(case_appli_log_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
residen_affili,appli_agent_title,
contact_address_agent,email , send_email,track_num,applicant_agent_user_id,agent_email) values
insert into case_affiliate_log(case_appli_log_id, user_id,applicant_dept_id,role_type,group_order,operator_flag,organize_flag) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliLogId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
#{item.residenAffili},#{item.appliAgentTitle},
#{item.contactAddressAgent},
#{item.email},
#{item.sendEmail},
#{item.trackNum},
#{item.applicantAgentUserId},
#{item.agentEmail}
(#{item.caseAppliLogId},#{item.userId},#{item.applicantDeptId},#{item.roleType},#{item.groupOrder},#{item.operatorFlag},#{item.organizeFlag}
)
</foreach>;
</insert>
@@ -3,187 +3,151 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper">
<resultMap type="CaseAffiliate" id="CaseAffiliateResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="identityType" column="identity_type" />
<result property="name" column="name" />
<result property="identityNum" column="identity_num" />
<result property="workTelphone" column="work_telphone" />
<result property="contactTelphone" column="contact_telphone" />
<result property="contactAddress" column="contact_address" />
<result property="workAddress" column="work_address" />
<result property="nameAgent" column="name_agent" />
<result property="identityNumAgent" column="identity_num_agent" />
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
<result property="contactAddressAgent" column="contact_address_agent" />
<result property="trackNum" column="track_num" />
<result property="applicationOrganId" column="application_organ_id" />
<result property="applicationOrganName" column="application_organ_name" />
<result property="compLegalPerson" column="comp_legal_person" />
<result property="compLegalperPost" column="comp_legalper_post" />
<result property="responSex" column="respon_sex" />
<result property="responBirth" column="respon_birth" />
<result property="residenAffili" column="residen_affili" />
<result property="appliAgentTitle" column="appli_agent_title" />
<result property="userId" column="user_id" />
<result property="email" column="email" />
<result property="sendEmail" column="send_email" />
<result property="applicantAgentUserId" column="applicant_agent_user_id" />
<result property="agentEmail" column="agent_email" />
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity" >
<result column="id" property="id" />
<result column="case_appli_id" property="caseAppliId" />
<result column="user_id" property="userId" />
<result column="applicant_dept_id" property="applicantDeptId" />
<result column="role_type" property="roleType" />
<result column="group_order" property="groupOrder" />
<result column="operator_flag" property="operatorFlag" />
<result column="organize_flag" property="organizeFlag" />
<result column="user_name" property="userName" />
<result column="comp_legal_person" property="compLegalPerson" />
<result column="phone" property="phone" />
<result column="email" property="email" />
<result column="name" property="name" />
<result column="home" property="home" />
<result column="address" property="address" />
<result column="id_card" property="idCard" />
<result column="id_type" property="idType" />
<result column="nationality" property="nationality" />
<result column="birth" property="birth" />
<result column="sex" property="sex" />
<result column="res_name" property="resName" />
<result column="role_ame" property="roleName" />
<result column="applicant_org_name" property="applicantOrgName" />
<result column="role_id" property="roleId" />
<result column="code" property="code" />
</resultMap>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select c.*
from case_affiliate c
<select id="selectCaseAffiliate" resultType="com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity">
select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
u.email,
(case when a.user_id is null then d.dept_name else u.nick_name end) name,
(case when a.user_id is null then d.home else u.home end) home,
(case when a.user_id is null then d.address else u.address end) address,
(case when a.user_id is null then d.nationality else u.nationality end) nationality,
u.sex,u.id_type idType,u.birth,r.role_name roleName,d.dept_name applicantOrgName,a.user_id userId,a.applicant_dept_id applicantDeptId,a.organize_flag organizeFlag
FROM
case_application c
JOIN case_affiliate a ON c.id = a.case_appli_id
LEFT JOIN sys_user u ON u.user_id = a.user_id
LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id
LEFT JOIN sys_role r ON r.role_id = ur.role_id
LEFT JOIN sys_dept d ON d.dept_id = a.applicant_dept_id
<where>
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
<if test="caseAppliId!=null">
c.id=#{ caseAppliId}
</if>
</where>
GROUP BY a.id,r.role_id order by a.id asc
</select>
<select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
select (c.id),
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
c.residen_affili,appli_agent_title,
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email
from case_affiliate c
<select id="selectCaseAffiliateByCaseIds" resultType="com.ruoyi.wisdomarbitrate.domain.entity.CaseAffiliateEntity">
select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
u.email,
(case when a.user_id is null then d.dept_name else u.nick_name end) name,
(case when a.user_id is null then d.home else u.home end) home,
(case when a.user_id is null then d.address else u.address end) address,
(case when a.user_id is null then d.nationality else u.nationality end) nationality,
u.sex,u.id_type idType,u.birth,r.role_name roleName,d.dept_name applicantOrgName,a.user_id userId,a.applicant_dept_id applicantDeptId,a.organize_flag organizeFlag
FROM
case_application c
JOIN case_affiliate a ON c.id = a.case_appli_id
LEFT JOIN sys_user u ON u.user_id = a.user_id
LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id
LEFT JOIN sys_role r ON r.role_id = ur.role_id
LEFT JOIN sys_dept d ON d.dept_id = a.applicant_dept_id
<where>
<if test="ids != null ">
case_appli_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
<if test="caseIds != null and caseIds.size() > 0">
and a.case_appli_id in
<foreach item="caseId" index="index" collection="caseIds" open="(" separator="," close=")">
#{caseId}
</foreach>
</if>
</where>
</select>
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
select c.*
from case_affiliate c
<where>
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
</if>
<if test="identityType != null ">
AND c.identity_type = #{identityType}
</if>
</where>
<select id="emailByCaseId" resultMap="BaseResultMap">
select a.*,u.email
from case_affiliate a
left join sys_user u on u.user_id=a.user_id
</select>
<select id="emailByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate">
select c.identity_type identityType,c.email
from case_affiliate c
where c.case_appli_id=#{caseAppliId}
</select>
<insert id="batchCaseAffiliate">
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
comp_legal_person,comp_legalper_post,respon_sex ,respon_birth,
residen_affili,appli_agent_title,
contact_address_agent,email, send_email,track_num,applicant_agent_user_id,agent_email) values
insert into case_affiliate(case_appli_id, user_id,applicant_dept_id,role_type,group_order,operator_flag,organize_flag) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},#{item.contactTelphoneAgent},
#{item.compLegalPerson},#{item.compLegalperPost},#{item.responSex}, #{item.responBirth},
#{item.residenAffili},#{item.appliAgentTitle},
#{item.contactAddressAgent},
#{item.email},
#{item.sendEmail},
#{item.trackNum},
#{item.applicantAgentUserId},
#{item.agentEmail}
(#{item.caseAppliId},#{item.userId},#{item.applicantDeptId},#{item.roleType},#{item.groupOrder},#{item.operatorFlag},#{item.organizeFlag}
)
</foreach>
</insert>
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
update case_affiliate
set
case_appli_id=#{caseAppliId},
identity_type= #{identityType},
application_organ_id= #{applicationOrganId},
application_organ_name= #{applicationOrganName},
name = #{name},
identity_num = #{identityNum},
contact_telphone = #{contactTelphone},
contact_address = #{contactAddress},
work_address = #{workAddress},
work_telphone = #{workTelphone},
name_agent = #{nameAgent},
identity_num_agent = #{identityNumAgent},
contact_telphone_agent = #{contactTelphoneAgent},
contact_address_agent = #{contactAddressAgent},
send_email = #{sendEmail},
residen_affili = #{residenAffili},
email= #{email},
track_num = #{trackNum},
comp_legal_person=#{compLegalPerson},
comp_legalper_post=#{compLegalperPost},
applicant_agent_user_id=#{applicantAgentUserId},
respon_sex=#{responSex},
respon_birth=#{responBirth},
residen_affili=#{residenAffili},
appli_agent_title=#{appliAgentTitle}
<if test="agentEmail !=null and agentEmail!=''">
,agent_email=#{agentEmail}
<insert id="insert">
INSERT INTO case_affiliate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null != caseAppliId ">
case_appli_id,
</if>
where id = #{id}
</update>
<update id="updateCaseAffiliateByCaseId">
<foreach collection="list" item="item" >
update case_affiliate
<set>
application_organ_id= #{item.applicationOrganId},
application_organ_name= #{item.applicationOrganName},
name = #{item.name},
identity_num = #{item.identityNum},
contact_telphone = #{item.contactTelphone},
contact_address = #{item.contactAddress},
work_address = #{item.workAddress},
work_telphone = #{item.workTelphone},
name_agent = #{item.nameAgent},
identity_num_agent = #{item.identityNumAgent},
contact_telphone_agent = #{item.contactTelphoneAgent},
contact_address_agent = #{item.contactAddressAgent},
send_email = #{item.sendEmail},
residen_affili = #{item.residenAffili},
email= #{item.email},
track_num = #{item.trackNum},
comp_legal_person=#{item.compLegalPerson},
comp_legalper_post=#{item.compLegalperPost},
applicant_agent_user_id=#{item.applicantAgentUserId},
respon_sex=#{item.responSex},
respon_birth=#{item.responBirth},
residen_affili=#{item.residenAffili},
appli_agent_title=#{item.appliAgentTitle}
<if test="agentEmail !=null and agentEmail!=''">
,agent_email=#{agentEmail}
<if test="null != userId ">
user_id,
</if>
</set>
where case_appli_id = #{caseAppliId} and identity_type= #{item.identityType};
</foreach>
</update>
<if test="null != applicantDeptId ">
applicant_dept_id,
</if>
<if test="null != roleType ">
role_type,
</if>
<if test="null != groupOrder ">
group_order,
</if>
<if test="null != operatorFlag ">
operator_flag,
</if>
<if test="null != organizeFlag ">
organize_flag
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != caseAppliId ">
#{caseAppliId},
</if>
<if test="null != userId ">
#{userId},
</if>
<if test="null != applicantDeptId ">
#{applicantDeptId},
</if>
<if test="null != roleType ">
#{roleType},
</if>
<if test="null != groupOrder ">
#{groupOrder},
</if>
<if test="null != operatorFlag ">
#{operatorFlag},
</if>
<if test="null != organizeFlag ">
#{organizeFlag}
</if>
</trim>
</insert>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate where case_appli_id = #{id}
File diff suppressed because it is too large Load Diff
@@ -11,80 +11,5 @@
<result property="roomId" column="room_id" />
<result property="caseStatusName" column="caseStatusName" />
</resultMap>
<select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
select t.* from(
select c.id id,c.create_time, c.case_num,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,
rc.room_id,rc.schedule_start_time
from case_application as c join case_affiliate as d on c.id = d.case_appli_id
left join reserved_conference rc on rc.case_id=c.id
where c.id = d.case_appli_id
<if test="identityNum != null and identityNum != ''">
and d.identity_num = #{identityNum}
</if>
<if test="identityType != null ">
and d.identity_type = #{identityType}
</if>
<if test="phone != null and phone != ''">
and (d.contact_telphone = #{phone} or d.contact_telphone_agent=#{phone})
</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>
union
<!-- 已办案件 -->
select c.id id, c.create_time,c.case_num,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,
rc.room_id,rc.schedule_start_time
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
left join reserved_conference rc on rc.case_id=c.id
WHERE
r.create_by=#{loginUserName} AND ca.identity_type=2
and c.id not in(
select c.id
from case_application c
JOIN case_affiliate ca ON ca.case_appli_id = c.id
where c.id = ca.case_appli_id
<if test="identityNum != null and identityNum != ''">
and ca.identity_num = #{identityNum}
</if>
<if test="identityType != null ">
and ca.identity_type = #{identityType}
</if>
<if test="phone != null and phone != ''">
and (ca.contact_telphone = #{phone} or ca.contact_telphone_agent=#{phone})
</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>
)
) t order by t.create_time desc
</select>
</mapper>
@@ -31,26 +31,26 @@
<select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes ,cl.id ,cl.case_appli_id caseAppliId,
cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime,cl.update_by updateBy,cl.update_time updateTime,
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 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 11 then '核验裁决书'
when 18 then '审核裁决书'
when 12 then '审核裁决书' when 13 then '裁决书签名' when 14 then '裁决书用印'
when 15 then '决书送达' when 16 then '案件归档' when 17 then '已归档'
when 18 then '仲裁员审核裁决书'
when 12 then '部门长审核裁决书' when 13 then '裁决书签名' when 14 then '裁决书用印'
when 15 then '裁决书送达' when 16 then '案件归档' when 17 then '已归档'
when 26 then '证据确认成功'
when 31 then '修改开庭时间'
ELSE ''
END content,
CASE cl.case_node 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 '法律顾问'
ELSE '无角色'
CASE cl.case_node 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 18 then '仲裁员' when 31 then '法律顾问'
ELSE ''
END roleName
from case_log_record cl
@@ -72,16 +72,19 @@
ELSE '无案件状态'
END caseStatusName,
c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
ca.applicant_dept_id applicationOrganId ,d.dept_name as applicantName,
c.arbitrat_method arbitratMethod ,
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
ELSE '无审理方式'
END arbitratMethodName,
c.arbitrator_id arbitratorId,
c.arbitrator_name arbitratorName
u.nick_name arbitratorName
from seal_sign_record s
join case_application c on s.case_appli_id=c.id
JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
JOIN case_affiliate ca ON ca.case_appli_id = c.id
LEFT JOIN sys_user u ON u.user_id = c.arbitrator_id
LEFT JOIN sys_dept d ON d.dept_id = ca.applicant_dept_id
<!-- where s.sign_flow_status in (0,1,2)-->
<where>
<if test="penSonAccount != null and penSonAccount!='' ">