This commit is contained in:
hejinbo
2023-10-11 11:47:47 +08:00
27 changed files with 549 additions and 188 deletions
@@ -7,6 +7,7 @@ import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -24,6 +25,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/document")
@PreAuthorize("@ss.hasPermi('caseManagement:list:createaward')")
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.createDocument(caseApplication);
}
@@ -44,6 +46,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@GetMapping("/logistics")
@PreAuthorize("@ss.hasPermi('delivery:detail')")
public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
return AjaxResult.success(logisticsInfo);
@@ -55,6 +58,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/signature")
@PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.signature(caseApplication);
}
@@ -65,6 +69,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/caseFile")
@PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.caseFile(caseApplication);
}
@@ -75,6 +80,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/service")
@PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
public AjaxResult service(@RequestBody BookSendVO bookSendVO){
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
}
@@ -84,6 +90,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/stamp")
@PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.stamp(caseApplication);
}
@@ -21,7 +21,7 @@ public class ArbitratorController extends BaseController {
/**
* 查询仲裁员信息
*/
@PreAuthorize("@ss.hasPermi('arbitrator:list')")
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
@GetMapping("/list")
public TableDataInfo list(Arbitrator arbitrator)
{
@@ -1,15 +1,14 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@@ -18,14 +17,12 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
@RestController
@RequestMapping("/caseApplication")
public class CaseApplicationController extends BaseController {
public class CaseApplicationController extends BaseController {
@Autowired
private ICaseApplicationService caseApplicationService;
@@ -33,10 +30,9 @@ public class CaseApplicationController extends BaseController {
/**
* 查询立案数据
*/
@PreAuthorize("@ss.hasPermi('caseApplication:list')")
@PreAuthorize("@ss.hasPermi('caseManagement:list')")
@GetMapping("/list")
public TableDataInfo list(CaseApplication caseApplication)
{
public TableDataInfo list(CaseApplication caseApplication) {
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
return getDataTable(list);
@@ -45,15 +41,12 @@ public class CaseApplicationController extends BaseController {
/**
* 新增立案数据
*/
@PreAuthorize("@ss.hasPermi('caseApplication:add')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
if(caseApplicationCount>0){
return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
}
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
}
@@ -61,11 +54,10 @@ public class CaseApplicationController extends BaseController {
/**
* 修改立案数据
*/
@PreAuthorize("@ss.hasPermi('caseApplication:edit')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplication")
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
caseApplication.setUpdateBy(getUsername());
return toAjax(caseApplicationService.editCaseApplication(caseApplication));
@@ -74,11 +66,10 @@ public class CaseApplicationController extends BaseController {
/**
* 提交立案申请
*/
@PreAuthorize("@ss.hasPermi('caseApplication:submit')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
@Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplication")
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.submitCaseApplication(caseApplication));
}
@@ -86,11 +77,10 @@ public class CaseApplicationController extends BaseController {
/**
* 删除立案数据
*/
@PreAuthorize("@ss.hasPermi('caseApplication:remove')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
@Log(title = "删除立案数据", businessType = BusinessType.DELETE)
@PostMapping("/removeCaseApplication")
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.deletecaseApplicationByIds(caseApplication));
}
@@ -98,9 +88,9 @@ public class CaseApplicationController extends BaseController {
/**
* 查询立案信息
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
@PostMapping("/selectCaseApplication")
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
return success(caseApplicationselect);
}
@@ -109,20 +99,19 @@ public class CaseApplicationController extends BaseController {
* 立案申请导入模板下载
*/
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response)
{
public void importTemplate(HttpServletResponse response) {
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
util.importTemplateExcel(response, "立案申请数据");
}
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('caseApplication:import')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception {
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
List<CaseApplication> caseApplicationList = util.importExcel(file.getInputStream());
String operName = getUsername();
String message = caseApplicationService.importCaseApplication(caseApplicationList,operName);
String message = caseApplicationService.importCaseApplication(caseApplicationList, operName);
return success(message);
}
@@ -132,30 +121,27 @@ public class CaseApplicationController extends BaseController {
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@Log(title = "组庭", businessType = BusinessType.UPDATE)
@PostMapping("/pendTral")
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTral(caseApplication));
}
/**
* 组庭审核
*/
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralCheck')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralCheck(caseApplication));
}
/**
* 组庭确认
*/
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralSure')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
@Log(title = "组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSure")
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralSure(caseApplication));
}
@@ -165,8 +151,7 @@ public class CaseApplicationController extends BaseController {
@PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
@Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecord")
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.verificationArbitrateRecord(caseApplication));
}
@@ -176,32 +161,28 @@ public class CaseApplicationController extends BaseController {
@PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecord")
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.checkArbitrateRecord(caseApplication));
}
/**
* 是否指派仲裁员
*/
@PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
@PostMapping("/pendingAppointArbotrar")
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
}
/**
* 提交立案审查
*/
@PreAuthorize("@ss.hasPermi('caseApplication:submitCaseApplicationCheck')")
@PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
@Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationCheck")
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.submitCaseApplicationCheck(caseApplication));
}
@@ -209,14 +190,22 @@ public class CaseApplicationController extends BaseController {
/**
* 确认缴费查询立案信息
*/
@PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
@PostMapping("/selectCaseApplicationConfirm")
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication)
{
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
return success(caseApplicationselect);
}
/**
* 发送房间号短信
*/
@Anonymous
@PostMapping("/sendRoomNoMessage")
public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO) {
String result = caseApplicationService.sendRoomNoMessage(messageVO);
return success(result);
}
}
@@ -6,6 +6,7 @@ import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -22,6 +23,7 @@ public class CaseArbitrateController extends BaseController {
* @return
*/
@PutMapping("/method")
@PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
,Integer opinion){
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
@@ -33,6 +35,7 @@ public class CaseArbitrateController extends BaseController {
* @return
*/
@PostMapping("/writtenHear")
@PreAuthorize("@ss.hasPermi('caseManagement:hear')")
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseArbitrateService.writtenHear(arbitrateRecord);
}
@@ -8,6 +8,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -35,6 +36,7 @@ public class CaseEvidenceController extends BaseController {
* @return
*/
@GetMapping("/{id}")
@PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
String username = this.getUsername();
return caseEvidenceService.getCaseDetailsById(id,username);
@@ -61,6 +63,7 @@ public class CaseEvidenceController extends BaseController {
* @return
*/
@GetMapping("/all")
@PreAuthorize("@ss.hasPermi('caseManagement:list')")
public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
startPage();
List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
@@ -22,7 +22,7 @@ public class CaseLogRecordController extends BaseController {
/**
* 查询案件日志列表
*/
@PreAuthorize("@ss.hasPermi('caseLogRecord:list')")
@PreAuthorize("@ss.hasPermi('caseLog:list')")
@GetMapping("/list")
public TableDataInfo list(CaseLogRecord caseLogRecord)
{
@@ -5,6 +5,7 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -24,6 +25,7 @@ public class CasePaymentController {
* @param casePayDTO 缴费传入参数
* @return 统一响应结果
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/casePay")
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePay(casePayDTO);
@@ -34,6 +36,7 @@ public class CasePaymentController {
* @param caseApplication
* @return
*/
@PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
@PutMapping("/confirm")
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
return paymentService.confirmPayment(caseApplication);
@@ -332,10 +332,14 @@ public class CaseApplication extends BaseEntity {
* 申请人主体信息
*/
/** 姓名 */
@Excel(name = "申请人主体信息-申请人姓名",width = 26)
@Excel(name = "申请人主体信息-申请人(机构)",width = 26)
private String name;
/**
* 申请人主体信息-申请人(机构)id
*/
private String nameId;
/** 身份证号 */
@Excel(name = "申请人主体信息-身份证号",width = 26)
@Excel(name = "申请人主体信息-代码",width = 26)
private String identityNum;
/** 联系电话 */
@@ -415,6 +419,14 @@ public class CaseApplication extends BaseEntity {
this.name = name;
}
public String getNameId() {
return nameId;
}
public void setNameId(String nameId) {
this.nameId = nameId;
}
public String getIdentityNum() {
return identityNum;
}
@@ -25,6 +25,15 @@ public class CaseLogRecord extends BaseEntity {
/** 案件编号 */
private String caseNum;
/**
* 展示的内容
*/
private String content;
/**
* 用户昵称
*/
private String createNickName;
public String getCaseNum() {
return caseNum;
@@ -50,7 +59,7 @@ public class CaseLogRecord extends BaseEntity {
this.caseAppliId = caseAppliId;
}
public int getCaseNode() {
public Integer getCaseNode() {
return caseNode;
}
@@ -73,4 +82,24 @@ public class CaseLogRecord extends BaseEntity {
public void setNotes(String notes) {
this.notes = notes;
}
public void setCaseNode(Integer caseNode) {
this.caseNode = caseNode;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCreateNickName() {
return createNickName;
}
public void setCreateNickName(String nickName) {
this.createNickName = nickName;
}
}
@@ -1,29 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
import java.util.Date;
/**
* @description 案件操作日志实体
* @Author wangqiong
* @Date 2023/10/09 15:18
* @Version V1.0
**/
@Data
public class CaseLogVO {
/**日志id*/
private String logId;
/**操作人id*/
private String operatorId;
/**操作人名称*/
private String operatorName;
/**操作人ip*/
private String ip;
/**操作时间*/
private Date operateTime;
/**操作明细*/
private String operateDetail;
/**操作类型*/
private String operateType;
}
@@ -0,0 +1,24 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author wangqiong
* @description 发送房间号短信入参类
* @date 2023-10-10 15:20
*/
@Data
public class SendRoomNoMessageVO implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message = "案件id不能为空")
private Long id;
@NotEmpty(message = "房间号不能为空")
private String roomNo;
}
@@ -1,6 +1,7 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -15,6 +16,7 @@ public interface CaseAffiliateMapper {
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
}
@@ -1,6 +1,7 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import java.util.List;
@@ -37,4 +38,6 @@ public interface ICaseApplicationService {
int submitCaseApplicationCheck(CaseApplication caseApplication);
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
}
@@ -2,9 +2,9 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.deepoove.poi.config.Configure;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.EmailOutUtil;
import com.ruoyi.common.utils.WordUtil;
import com.ruoyi.wisdomarbitrate.domain.*;
@@ -18,7 +18,6 @@ import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xwpf.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.MailSendException;
import org.springframework.mail.javamail.JavaMailSender;
@@ -34,7 +33,6 @@ import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
@@ -314,6 +312,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATED_SEAL,"");
return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
}
@@ -322,6 +323,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_ARCHIVED,"");
return AjaxResult.success("归档成功,案件状态已改为已归档");
}
@@ -353,6 +357,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_FILING,"");
return AjaxResult.success("仲裁文书送达成功");
}
@@ -361,6 +368,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATION_DELIVERY,"");
return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
}
@@ -1,13 +1,21 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -18,6 +26,8 @@ import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@Service
public class CaseApplicationServiceImpl implements ICaseApplicationService {
@@ -34,6 +44,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private SysDeptMapper sysDeptMapper;
@@ -52,7 +64,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//根据仲裁费用计费规则计算应缴费用
//暂时设置计费比率为0.01
BigDecimal feeRate = new BigDecimal(0.01);
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2,BigDecimal.ROUND_HALF_UP);
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
caseApplication.setFeePayable(feePayable);
// 获取自动编码
String caseNum = generateCaseNum();
@@ -60,22 +72,52 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
for (CaseAffiliate caseAffiliate : caseAffiliates){
Map<String, Long> deptMap =new HashMap<>();
if (caseAffiliates != null && caseAffiliates.size() > 0) {
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
for (CaseAffiliate caseAffiliate : caseAffiliates) {
caseAffiliate.setCaseAppliId(caseApplication.getId());
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
// 将组织机构id设为申请人名称
if (deptMap.containsKey(caseApplication.getName())) {
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
} else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseAffiliate.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(), dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
}
}
}
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
}
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
if(caseAttachList!=null&&caseAttachList.size()>0){
for (CaseAttach caseAttach : caseAttachList){
if (caseAttachList != null && caseAttachList.size() > 0) {
for (CaseAttach caseAttach : caseAttachList) {
caseAttach.setCaseAppliId(caseApplication.getId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_APPLICATION,"");
return rows;
}
@@ -116,10 +158,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
int rows = caseApplicationMapper.updataCaseApplication(caseApplication);
List<CaseAffiliate> caseAffiliates = caseApplication.getCaseAffiliates();
if(caseAffiliates!=null&&caseAffiliates.size()>0){
// 查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
if (CollectionUtil.isEmpty(deptList)) {
deptList = new ArrayList<>();
}
Map<String, Long> deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
for (CaseAffiliate caseAffiliate : caseAffiliates){
caseAffiliate.setCaseAppliId(caseApplication.getId());
if(caseAffiliate.getIdentityType()==1&&StrUtil.isNotEmpty(caseAffiliate.getName())) {
// 将组织机构id设为申请人名称
if (deptMap.containsKey(caseApplication.getName())) {
caseAffiliate.setName(String.valueOf(deptMap.get(caseAffiliate.getName())));
} else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseAffiliate.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(), dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
}
}
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
}
}
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
if(caseAttachList!=null&&caseAttachList.size()>0){
@@ -139,6 +209,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//提交立案申请
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CHECK,"");
return rows;
}
@@ -186,12 +258,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null){
// 查询组织机构
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
Map<String,String> deptMap=new HashMap<>();
if(CollectionUtil.isNotEmpty(sysDepts)){
for (SysDept sysDept : sysDepts) {
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
}
}
StringBuffer applicantName = new StringBuffer();
StringBuffer respondentName = new StringBuffer();
for (int i = 0; i < caseAffiliatListeselect.size(); i++){
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
}
applicantName.append(caseAffiliateselect.getName()).append(",");;
}else if(identityType==2){
respondentName.append(caseAffiliateselect.getName()).append(",");;
@@ -213,6 +296,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
int successNum = 0;
int failureNum = 0;
if(caseApplicationList!=null&&caseApplicationList.size()>0){
// 1,查询所有的组织机构,组装成map
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
Map<String, Long> deptMap =new HashMap<>();
if(CollectionUtil.isNotEmpty(deptList)) {
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId,(oldV,newV)->newV));
}
List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
for (int i = 0; i < caseApplicationList.size(); i++){
CaseApplication caseApplication = caseApplicationList.get(i);
@@ -224,7 +313,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
//赋值CaseApplication的案件关联人信息
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
assignmentCaseAffiliates(caseApplication,caseAffiliatesnew);
// 组装案件关联人信息
assignmentCaseAffiliates(caseApplication,caseAffiliatesnew,deptMap);
// int caseApplicationCount = selectCaseApplicationCount(caseApplication);
// if(caseApplicationCount>0){
@@ -344,7 +434,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL,"");
return rows;
}
@@ -355,6 +446,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION,"");
return rows;
}
@@ -368,9 +461,15 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
if(agreeOrNotCheck.intValue()==1){//同意审核
caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.SIGN_ARBITRATION,"");
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}else if(agreeOrNotCheck.intValue()==2){//拒绝审核
caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.VERPRIF_ARBITRATION,"");
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
}
@@ -400,11 +499,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null){
// 查询组织机构
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
Map<String,String> deptMap=new HashMap<>();
if(CollectionUtil.isNotEmpty(sysDepts)){
for (SysDept sysDept : sysDepts) {
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
}
}
StringBuffer applicantName = new StringBuffer();
for (int i = 0; i < caseAffiliatListeselect.size(); i++){
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
}
applicantName.append(caseAffiliateselect.getName()).append(",");;
}
}
@@ -415,6 +525,32 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
return caseApplicationselect;
}
/**
* 给被申请人发送房间号短信
* @param messageVO
* @return
*/
@Override
public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
CaseAffiliate caseAffiliate = caseAffiliateMapper.selectCaseAffiliateByIdentityType(messageVO.getId(), 2);
if(null==caseAffiliate){
return "被申请人不存在";
}
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(messageVO.getId());
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1948332");
// 1948332 普通短信 开庭审理房间号通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},请知晓,如非本人操作,请忽略本短信。
request.setPhone(caseAffiliate.getContactTelphone());
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo()});
SmsUtils.sendSms(request);
return "短信发送成功";
}
@Override
@Transactional
public int pendTralSure(CaseApplication caseApplication) {
@@ -459,9 +595,23 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
if(caseAffiliatListeselect!=null) {
// 查询组织机构
List<SysDept> sysDepts = sysDeptMapper.selectDeptList(new SysDept());
Map<String,String> deptMap=new HashMap<>();
if(CollectionUtil.isNotEmpty(sysDepts)){
for (SysDept sysDept : sysDepts) {
deptMap.put(String.valueOf(sysDept.getDeptId()),sysDept.getDeptName());
}
}
for (int j = 0; j < caseAffiliatListeselect.size(); j++) {
CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(j);
int identityType = caseAffiliateselect.getIdentityType();
if(identityType==1){
if(StrUtil.isNotEmpty(caseAffiliateselect.getName())&&deptMap.containsKey(caseAffiliateselect.getName())){
caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
}
caseAffiliateselect.setName(caseAffiliateselect.getName());;
}
//给申请人、被申请人发送短信通知
request.setPhone(caseAffiliateselect.getContactTelphone());
// 1947342 普通短信 开庭日期通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已确定为{3},请知晓,如非本人操作,请忽略本短信。
@@ -470,6 +620,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
SmsUtils.sendSms(request);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CHECK_ARBITRATION_METHOD,"");
return rows;
@@ -509,12 +661,17 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew) {
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew, Map<String, Long> deptMap) {
// 申请人信息
CaseAffiliate caseAffiliate = new CaseAffiliate();
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
caseAffiliate.setIdentityType(1);
// 申请人(机构),需要判断部门中是否存在,不存在则新增,当身份类型为1的时候,查询时需要根据名称查询组织机构
if(StrUtil.isNotEmpty(caseApplication.getName())){
setApplicantOrganization(caseAffiliate, caseApplication, deptMap);
}
caseAffiliatesnew.add(caseAffiliate);
// 组装被申请人信息
@@ -522,6 +679,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
caseApplication.setCaseAffiliates(caseAffiliatesnew);
}
/**
* 设置申请人的组织机构
* @param caseAffiliate
* @param caseApplication
*/
@DataScope(deptAlias = "d")
private void setApplicantOrganization(CaseAffiliate caseAffiliate, CaseApplication caseApplication, Map<String, Long> deptMap ) {
// 将组织机构id设为申请人名称
if(deptMap.containsKey(caseApplication.getName())){
caseAffiliate.setName(String.valueOf(deptMap.get(caseApplication.getName())));
}else {
// 如果不存在则新增
SysDept dept = new SysDept();
dept.setParentId(0L);
dept.setDeptName(caseApplication.getName());
dept.setAncestors("0");
dept.setOrderNum(1);
dept.setStatus("0");
dept.setDelFlag("0");
dept.setCreateBy(getUsername());
dept.setUpdateBy(getUsername());
sysDeptMapper.insertDept(dept);
deptMap.put(dept.getDeptName(),dept.getDeptId());
caseAffiliate.setName(String.valueOf(dept.getDeptId()));
}
}
/**
* 组装被申请人信息
* @param caseApplication
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
@@ -44,18 +45,30 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
//修改案件状态为待开庭审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
}else {
caseApplication1.setArbitratMethod(2);
//修改案件状态为待书面审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
}
}else {
if (arbitratMethod == 2){
//修改案件状态为待书面审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
}else {
//修改案件状态为待开庭审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
}
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
@@ -87,6 +100,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
}
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
return AjaxResult.success("审核成功");
}
return AjaxResult.error();
@@ -118,6 +134,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
//修改案件状态
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
return AjaxResult.success("提交成功");
}
}else {
@@ -136,6 +155,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
//修改案件状态
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
return AjaxResult.success("提交成功");
}
}
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
@@ -130,6 +131,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_TRIAL,"");
return AjaxResult.success("证据确认成功");
}
return AjaxResult.error("暂无需要确认的证据");
@@ -165,15 +169,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
//案件日志表里添加数据
CaseLogRecord caseLogRecord = new CaseLogRecord();
caseLogRecord.setCaseAppliId(caseApplication1.getId());
caseLogRecord.setCaseNode(caseStatus);
String createBy = caseApplication1.getCreateBy();
if (createBy != null) {
caseLogRecord.setCreateBy(createBy);
}
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT,"");
return AjaxResult.success("提交成功");
}
}
@@ -1,5 +1,9 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
@@ -16,7 +20,82 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
@Override
public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
return caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
if(CollectionUtil.isNotEmpty(records)){
records.forEach(record->{
StringBuilder contentBuilder = new StringBuilder();
String caseNodeTime="";
if(record.getCaseNodeTime()!=null){
caseNodeTime= DateUtil.format(record.getCaseNodeTime(), DatePattern.NORM_DATETIME_FORMATTER);
}
contentBuilder.append(record.getCreateNickName()).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime);
switch(record.getCaseNode()){
case 0:
contentBuilder.append("创建立案申请");
break;
case 1:
contentBuilder.append("提交立案申请");
break;
case 2:
contentBuilder.append("提交立案审查");
break;
case 3:
contentBuilder.append("支付成功");
break;
case 4:
contentBuilder.append("缴费确认");
break;
case 5:
contentBuilder.append("案件质证");
break;
case 6:
contentBuilder.append("组庭审核");
break;
case 7:
contentBuilder.append("组庭确认");
break;
case 8:
contentBuilder.append("待开庭审理");
break;
case 9:
contentBuilder.append("待书面审理");
break;
case 10:
contentBuilder.append("书面审理");
break;
case 11:
contentBuilder.append("审核裁决书,拒绝");
break;
case 12:
contentBuilder.append("核验裁决书");
break;
case 13:
contentBuilder.append("审核裁决书,同意");
break;
case 14:
contentBuilder.append("签名成功");
break;
case 15:
contentBuilder.append("用印成功");
break;
case 16:
contentBuilder.append("送达仲裁文书");
break;
case 17:
contentBuilder.append("案件归档");
break;
case 26:
contentBuilder.append("证据确认成功");
break;
default:break;
}
record.setContent(contentBuilder.toString());
});
}
return records;
}
@@ -4,6 +4,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.ElegentPay;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.dto.PayRequest;
import com.ruoyi.dto.PayResponse;
@@ -19,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@@ -127,6 +127,9 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
SmsUtils.sendSms(request);
}
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CROSSEXAMI,"");
return AjaxResult.success();
}
}
@@ -14,15 +14,14 @@ import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.faceid.v20180301.FaceidClient;
import com.tencentcloudapi.faceid.v20180301.models.GetEidResultRequest;
import com.tencentcloudapi.faceid.v20180301.models.GetEidResultResponse;
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenRequest;
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenResponse;
import com.tencentcloudapi.faceid.v20180301.models.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -134,14 +133,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
IdentityAuthenticationRespon.setUserId(userId);
JSONObject objEidInfo = JSON.parseObject(objJSON.getString("EidInfo"));
String desKey = objEidInfo.getString("DesKey");
String uerInfo = objEidInfo.getString("UserInfo");
Map<String,String> mapEidInfo = decodeEidInfo(desKey,uerInfo);
IdentityAuthenticationRespon.setName(mapEidInfo.get("name"));
IdentityAuthenticationRespon.setIdentityNo(mapEidInfo.get("identityNo"));
IdentityAuthenticationRespon.setCertificationStatus(1);
identityAuthenticationMapper.insertIdentityAuthentication(IdentityAuthenticationRespon);
// identityAuthenticationMapper.insertIdentityAuthentication(IdentityAuthenticationRespon);
IdentityAuthenticationResult.setCertificationStatus(1);
IdentityAuthenticationResult.setCertificationStatusName("认证成功");
} catch (TencentCloudSDKException e) {
@@ -153,23 +145,11 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
return IdentityAuthenticationResult;
}
private Map<String, String> decodeEidInfo(String desKey, String uerInfo) {
Map<String, String> mapEidInfo = new HashMap<>();
byte[] deskeybyts = Base64.getDecoder().decode(desKey);
final SM2 sm2crypt = new SM2(privateKeyHexDecodeinfo, null, null);
sm2crypt.usePlainEncoding();
byte[] sm4keybys = sm2crypt.decrypt(deskeybyts);
SymmetricCrypto sm4dcrypt = SmUtil.sm4(sm4keybys);
byte[] uerInfobytes = sm4dcrypt.decrypt(Base64.getDecoder().decode(uerInfo));
JSONObject objuerInfo = JSON.parseObject(new String(uerInfobytes));
String name = objuerInfo.getString("name");
mapEidInfo.put("name",name);
String idtype = objuerInfo.getString("idtype");
mapEidInfo.put("identitytype",idtype);
String idnum = objuerInfo.getString("idnum");
mapEidInfo.put("identityNo",idnum);
return mapEidInfo;
}
}
@@ -0,0 +1,42 @@
package com.ruoyi.wisdomarbitrate.utils;
import cn.hutool.extra.spring.SpringUtil;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* 案件记录日志文件
*
* @author wangqiong
*/
public class CaseLogUtils
{
private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
/**
* 新增案件日志
* @param caseAppliId 案件id,不能为空
* @param caseNode 案件节点,不能为空
* @param notes 备注
*/
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes ){
// 获取当前的用户
LoginUser loginUser = SecurityUtils.getLoginUser();
String nickName = loginUser.getUser().getNickName();
CaseLogRecord operLog = new CaseLogRecord();
operLog.setCreateBy(loginUser.getUsername());
operLog.setCreateNickName(nickName);
operLog.setUpdateBy(loginUser.getUsername());
operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(caseNode);
operLog.setNotes(notes);
caseLogRecordMapper.insertCaseLogRecord(operLog);
}
}
@@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select>
<insert id="insertDept" parameterType="SysDept">
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
);
</insert>
<update id="updateDept" parameterType="SysDept">
@@ -37,21 +37,4 @@
</where>
</select>
</mapper>
@@ -33,6 +33,20 @@
</if>
</where>
</select>
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
select c.id ,c.case_appli_id ,c.identity_type ,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.contact_address_agent,
c.track_num
from case_affiliate c
<where>
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
</if>
<if test="caseAppliId != null ">
AND c.identity_type = #{identityType}
</if>
</where>
</select>
<insert id="batchCaseAffiliate">
@@ -55,8 +55,10 @@
c.hear_date ,c.arbitrat_claims ,
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
c.update_by ,c.update_time , c.arbitrator_name
c.update_by ,c.update_time , c.arbitrator_name,d.dept_name as applicantName
from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
<where>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
@@ -64,6 +66,9 @@
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
<if test="name != null and name != ''">
AND ca.NAME=#{nameId} AND ca.identity_type=1 and ca.name=d.dept_id
</if>
<if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
@@ -201,8 +206,10 @@
c.hear_date ,c.arbitrat_claims ,
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,d.dept_name as applicantName
from case_application c
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
LEFT JOIN sys_dept d ON ca.NAME = d.dept_id and ca.name=d.dept_id
<where>
<if test="id != null ">
AND c.id = #{id}
@@ -10,43 +10,30 @@
<result property="caseNodeTime" column="case_node_time" />
<result property="notes" column="notes" />
<result property="caseNum" column="case_num" />
<result property="createBy" column=" create_by" />
<result property="createNickName" column="create_nick_name" />
</resultMap>
<insert id="insertCaseLogRecord">
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_time ) values(
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},sysdate()
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
)
</insert>
<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
from case_log_record cl
<where>
<if test="caseAppliId != null and caseAppliId != ''">
AND cl.case_appli_id = #{caseAppliId}
</if>
</where>
order by create_time desc
<select id="selectCaseLogRecordList" parameterType="CaseLogRecord" resultMap="CaseLogRecordResult">
select cl.case_node ,cl.case_node_time ,cl.notes ,c.case_num ,cl.id ,cl.case_appli_id
from case_log_record cl left join case_application c on cl.case_appli_id = c.id
<where>
<if test="caseNum != null and caseNum != ''">
AND c.case_num = #{caseNum}
</if>
</where>
</select>
</mapper>