Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev

This commit was merged in pull request #1.
This commit is contained in:
2024-01-05 11:56:49 +08:00
committed by Gitea
105 changed files with 423 additions and 14673 deletions
+2 -42
View File
@@ -54,17 +54,7 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
</dependency>
<!--通用mapper-->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>2.1.5</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>pay</artifactId>
@@ -98,37 +88,7 @@
<warName>${project.artifactId}</warName>
</configuration>
</plugin>
<!-- 通用mapper代码生成器-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.6</version>
<configuration>
<configurationFile>
${basedir}/src/main/resources/generator/generatorConfig.xml
</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>4.1.5</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
<!--跳过单测-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* 启动程序
@@ -12,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
@EnableSwagger2
public class RuoYiApplication
{
public static void main(String[] args)
@@ -6,6 +6,8 @@ import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Anonymous;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -33,6 +35,7 @@ import com.ruoyi.system.service.ISysUserService;
*
* @author ruoyi
*/
@Api("用户信息管理")
@RestController
@RequestMapping("/system/user")
public class SysUserController extends BaseController
@@ -52,6 +55,7 @@ public class SysUserController extends BaseController
/**
* 获取用户列表
*/
@ApiOperation(value = "获取用户列表",notes = "分页获取用户列表")
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/list")
public TableDataInfo list(SysUser user)
@@ -1,191 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
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.core.redis.RedisCache;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
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.*;
import java.util.List;
@RestController
@RequestMapping("/adjudication")
public class AdjudicationController extends BaseController {
@Autowired
private IAdjudicationService adjudicationService;
/**
* 根据签署流程id查询批量签名链接
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@PostMapping("/selectBatchSignUrl")
public AjaxResult selectBatchSignUrl(@RequestBody StringIdsReq idsReq) {
if(CollectionUtil.isEmpty(idsReq.getIds())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.selectBatchSignUrl(idsReq);
return success(sealSignRecordselect);
}
/**
* 根据签署流程id查询批量用印链接
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@PostMapping("/selectBatchSealUrl")
public AjaxResult selectBatchSealUrl(@RequestBody StringIdsReq idsReq) {
if(CollectionUtil.isEmpty(idsReq.getIds())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.selectBatchSealUrl(idsReq);
return success(sealSignRecordselect);
}
/**
* 根据仲裁员手机号分页查询待签名/待用印的案件
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@GetMapping("/pageSignAdjudicate")
public TableDataInfo pageSignAdjudicate(@RequestParam(value = "personAccount",required = false) String personAccount, @RequestParam("caseStatus") Integer caseStatus) {
startPage();
List<CaseApplication> list = adjudicationService.selectSealSigning(personAccount,caseStatus);
return getDataTable(list);
}
/**
* 生成裁决书
* @param caseApplication
* @return
*/
@PostMapping("/document")
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
if (caseApplication.getId() == null) {
return AjaxResult.error("案件id不能为空");
}
return adjudicationService.createDocument(caseApplication);
}
/**
* 批量生成裁决书
* @param caseApplication
* @return
*/
@PostMapping("/batchDocument")
public AjaxResult batchDocument(@Validated @RequestBody BatchCaseApplication caseApplication){
if (CollectionUtil.isEmpty(caseApplication.getIds())) {
return AjaxResult.error("参数校验失败");
}
return adjudicationService.batchDocument(caseApplication.getIds());
}
/**
* 重新生成裁决书
* @param caseApplication
* @return
*/
@PostMapping("/regenerationDocument")
public AjaxResult regenerationDocument(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.regenerationDocument(caseApplication);
}
/**
* 裁决书送达(电子邮件)
* @param bookSendVO
* @return
*/
@PostMapping("/delivery")
public AjaxResult sendDocumentByEmail(@RequestBody BookSendVO bookSendVO){
return adjudicationService.sendDocumentByEmail(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
}
/**
* 根据快递单号查询物流信息
* @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);
}
/**
* 签名(暂时只改案件状态)
* @param caseApplication
* @return
*/
@PostMapping("/signature")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.signature(caseApplication);
}
/**
* 归档(暂时只改案件状态)
* @param batchCaseApplication
* @return
*/
@PostMapping("/caseFile")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
public AjaxResult caseFile(@RequestBody BatchCaseApplication batchCaseApplication){
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
return error("参数校验失败");
}
return adjudicationService.caseFile(batchCaseApplication.getIds());
}
/**
* 送达(不包含发送电子邮件)
* @param bookSendVO
* @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());
}
/**
* 用印(暂时只改案件状态)
* @param caseApplication
* @return
*/
@PostMapping("/stamp")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.stamp(caseApplication);
}
/**
* 档案详情查询
* @param id 案件id
* @return
*/
@GetMapping("/archives")
public AjaxResult getArchivesDetail(Long id){
return adjudicationService.getArchivesDetail(id);
}
/**
* 根据案件id获取邮箱
* @param id 案件id
* @return
*/
@GetMapping("/emailByCaseId")
public AjaxResult emailByCaseId(@RequestParam("id") Long id){
return adjudicationService.emailByCaseId(id);
}
}
@@ -1,44 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/arbitrator")
public class ArbitratorController extends BaseController {
@Autowired
private ISysUserService sysUserService;
/**
* 查询仲裁员信息
*/
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
@GetMapping("/list")
public TableDataInfo list(Arbitrator arbitrator)
{
startPage();
List<SysUser> list = sysUserService.selectUserListByAdRole(arbitrator);
return getDataTable(list);
}
}
@@ -1,588 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.alipay.api.internal.util.file.IOUtils;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.FileTransformation;
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.exception.EsignDemoException;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.WxAppletNotifyUtils;
import com.ruoyi.util.FileUtil;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.*;
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.service.IAdjudicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
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 com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URL;
import java.net.URLEncoder;
import java.util.List;
@RestController
@RequestMapping("/caseApplication")
public class CaseApplicationController extends BaseController {
@Autowired
private ICaseApplicationService caseApplicationService;
@Autowired
private IAdjudicationService adjudicationService;
/**
* 查询立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list')")
@GetMapping("/list")
public TableDataInfo list(CaseApplication caseApplication) {
if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
caseApplication.setSelectCaseStatus("0");
}
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
return getDataTable(list);
}
/**
* 查询批量管理案件列表
*/
@GetMapping("/listBatch")
public TableDataInfo listBatch(CaseApplication caseApplication) {
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
return getDataTable(list);
}
/**
* 根据角色查询待办数量
* @return
*/
@GetMapping("/toDoCount")
public AjaxResult toDoCount() {
ToDoCount toDoCount = caseApplicationService.selectToDoCount();
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
return success(toDoCount);
}
/**
* 新增立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication(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);
}
/**
* 修改立案数据自定义字段
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@Log(title = "修改立案数据自定义字段", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplicationDefineval")
public AjaxResult editCaseApplicationDefineval(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.editCaseApplicationDefineval(caseApplication);
}
/**
* 提交立案申请
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
@Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplication")
public AjaxResult submitCaseApplication(@RequestBody BatchCaseApplication batchCaseApplication) {
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
return error("参数校验失败");
}
return toAjax(caseApplicationService.submitCaseApplication(batchCaseApplication.getIds()));
}
/**
* 批量提交立案申请
*/
@Log(title = "批量提交立案申请", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationBatch")
public AjaxResult submitCaseApplicationBatch(@RequestBody BatchCaseApplication batchCaseApplication) {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
return error("参数校验失败");
}
return toAjax(caseApplicationService.submitCaseApplicationBatch(batchCaseApplication.getBatchNumber()));
}
/**
* 删除立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
@Log(title = "删除立案数据", businessType = BusinessType.DELETE)
@PostMapping("/removeCaseApplication")
public AjaxResult removeCaseApplication(@RequestBody BatchCaseApplication batchCaseApplication) {
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
return error("参数校验失败");
}
return success(caseApplicationService.deletecaseApplicationByIds(batchCaseApplication.getIds()));
}
/**
* 查询立案信息
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
@PostMapping("/selectCaseApplication")
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
return success(caseApplicationselect);
}
/**
* 查询已签署裁决书URL
*/
@PostMapping("/selectSignSealUrl")
public AjaxResult selectSignSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
CaseApplication caseApplicationselect = caseApplicationService.selectSignSealUrl(caseApplication);
return success(caseApplicationselect);
}
/**
* 查询案件进度
*/
@PostMapping("/selectCaseProgress")
public AjaxResult selectCaseProgress(@Validated @RequestBody CaseApplication caseApplication) {
AjaxResult caseApplicationselect = caseApplicationService.selectCaseProgress(caseApplication);
return success(caseApplicationselect);
}
/**
* 查询签名链接
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@PostMapping("/selectSignUrl")
public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
return success(sealSignRecordselect);
}
/**
* 查询用印链接
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
@PostMapping("/selectSealUrl")
public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
return success(sealUrlRecordselect);
}
/**
* 案件证据材料压缩包上传
*
* @param file 附件
* @param id 案件申请id
* @return
*/
@PostMapping("/uploadZipFile")
public AjaxResult uploadZipFile(@RequestParam("file") MultipartFile file, Long id) {
String username = this.getUsername();
Long userId = this.getUserId();
return caseApplicationService.uploadZipFile(file, id, username, userId);
}
/**
* 立案申请导入模板下载
*/
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) {
// 读取文件
try {
InputStream fileInputStream = new URL("http://121.40.189.20:8000/API/uploadPath/template/案件导入模板.xlsx").openStream();
response.setHeader("content-type", "application/octet-stream");
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("案件导入模板.xlsx","UTF-8"));
byte[] buffer = new byte[1024];
int length;
while ((length = fileInputStream.read(buffer)) > 0) {
response.getOutputStream().write(buffer, 0, length);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
// @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception {
if(file==null){
return warn("请上传文件");
}
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
List<CaseApplication> caseApplicationList = util.importExcel(file.getInputStream());
String operName = getUsername();
String message = caseApplicationService.importCaseApplication(caseApplicationList, operName);
return success(message);
}
/**
* 组庭
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@Log(title = "组庭", businessType = BusinessType.UPDATE)
@PostMapping("/pendTral")
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTral(caseApplication));
}
/**
* 组庭审核
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralCheck(caseApplication));
}
/**
* 组庭确认
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
@Log(title = "组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSure")
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralSure(caseApplication));
}
/**
* 批量组庭审核
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@Log(title = "批量组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheckBatch")
public AjaxResult pendTralCheckBatch(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralCheckBatch(caseApplication));
}
/**
* 批量组庭确认
*/
@Log(title = "批量组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSureBatch")
public AjaxResult pendTralSureBatch(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralSureBatch(caseApplication));
}
/**
* 修改开庭时间
*/
@Log(title = "修改开庭时间", businessType = BusinessType.UPDATE)
@PostMapping("/updateHeardate")
public AjaxResult updateHeardate(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.updateHeardate(caseApplication));
}
/**
* 核验裁决书
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
@Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecord")
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.verificationArbitrateRecord(caseApplication));
}
/**
* 部门长审核裁决书
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@Log(title = "部门长审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecord")
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.checkArbitrateRecord(caseApplication);
}
/**
* 仲裁员审核裁决书
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@Log(title = "仲裁员审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/arbitrator/checkArbitrateRecord")
public AjaxResult arbitratorCheckArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.arbitratorCheckArbitrateRecord(caseApplication);
}
/**
* 批量操作仲裁员审核裁决书
*/
@Log(title = "批量操作仲裁员审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/arbitrator/checkArbitrateRecordBatch")
public AjaxResult arbitratorCheckArbitrateRecordBatch(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.arbitratorCheckArbitrateRecordBatch(caseApplication);
}
/**
* 批量部门长审核裁决书
*/
@Log(title = "批量部门长审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecordBatch")
public AjaxResult checkArbitrateRecordBatch(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.checkArbitrateRecordBatch(caseApplication);
}
/**
* 批量核验裁决书
*/
@Log(title = "批量核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecordBatch")
public AjaxResult verificationArbitrateRecordBatch(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.verificationArbitrateRecordBatch(caseApplication));
}
/**
* 是否指派仲裁员
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
@PostMapping("/pendingAppointArbotrar")
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
}
/**
* 提交立案审查
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
@Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationCheck")
public AjaxResult submitCaseApplicationCheck(@RequestBody BatchCaseApplication batchCaseApplication) {
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())|| batchCaseApplication.getAgreeOrNotCheck()==null){
return error("参数校验失败");
}
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);
}
/**
* 批量提交立案审查
*/
@Log(title = "批量提交立案审查", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationCheckBatch")
public AjaxResult submitCaseApplicationCheckBatch(@RequestBody BatchCaseApplication batchCaseApplication) {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
return error("参数校验失败");
}
return success(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);
}
/**
* 发送房间号短信
*/
@Anonymous
@PostMapping("/sendRoomNoMessage")
public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO) {
String result = caseApplicationService.sendRoomNoMessage(messageVO);
return success(result);
}
/**
* 获取UrlScheme
*/
@Anonymous
@GetMapping("/getUrlScheme")
public AjaxResult getUrlScheme() {
String schemeUrl = WxAppletNotifyUtils.jumpAppletSchemeUrl();
return success(schemeUrl);
}
/**
* 生成庭审笔录
* @param arbitrateRecord
* @return
*/
@PostMapping("/creatTrialRecord")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseApplicationService.creatTrialRecord(arbitrateRecord);
}
/**
* 记录庭审笔录
* @param arbitrateRecord
* @return
*/
@PostMapping("/creatTrialRecordnew")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
public AjaxResult creatTrialRecordnew(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseApplicationService.creatTrialRecordnew(arbitrateRecord);
}
/**
* 案件锁定或者解锁
* @param caseApplication
* @return
*/
@PostMapping("/updateCaseLockStatus")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
public AjaxResult updateCaseLockStatus(@Validated @RequestBody CaseApplication caseApplication){
if(caseApplication.getId()==null || caseApplication.getLockStatus()==null){
return error("参数校验失败");
}
return AjaxResult.success(caseApplicationService.updateCaseLockStatus(caseApplication));
}
/**
* 查询短信发送记录
* @param smsSendRecord
* @return
*/
@PostMapping("/smsRecord")
public TableDataInfo getSmsSendRecord(@RequestBody SmsSendRecord smsSendRecord){
startPage();
List<SmsSendRecord> list = caseApplicationService.getSmsSendRecord(smsSendRecord);
return getDataTable(list);
}
/**
* 获取userSign
* @param userId
* @return
*/
@Anonymous
@GetMapping("/generateUserSign")
public AjaxResult generateUserSign(@RequestParam(required = true) String userId){
if(StrUtil.isEmpty(userId)){
error("参数校验失败");
}
return AjaxResult.success(caseApplicationService.generateUserSign(userId));
}
/**
* 预约会议
* @param reservedConferenceVO
* @return
*/
@PostMapping("/reservedConference")
public AjaxResult reservedConference(@Validated @RequestBody ReservedConferenceVO reservedConferenceVO) throws Exception {
return caseApplicationService.reservedConference(reservedConferenceVO);
}
/**
* 生成房间号
* @return
*/
@Anonymous
@GetMapping("/createRoomId")
public AjaxResult createRoomId(@RequestParam("caseId") Long caseId) {
return success(caseApplicationService.createRoomId(caseId));
}
/**
* 删除房间号
* @return
*/
@Anonymous
@PostMapping("/deleteRoom")
public AjaxResult deleteRoom(@RequestParam("roomId") String roomId) {
return caseApplicationService.deleteRoom(roomId);
}
/**
* 根据案件id查询已预约的会议
* @param caseId
* @return
*/
@Anonymous
@GetMapping("/reserveConferenceList")
public AjaxResult reserveConferenceList( @RequestParam("caseId") Long caseId) {
return success(caseApplicationService.reserveConferenceList(caseId));
}
/**
* 案件压缩包导入
* @param file
* @return
* @throws IOException
*/
@PostMapping("/uploadCaseZipFile")
public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file,@RequestParam("templateId") Long templateId) throws IOException {
return caseApplicationService.uploadCaseZipFile(file,templateId);
}
/**
* 根据附件id修改案件id
* @param caseAttach
* @return
*/
@PostMapping("/updateCaseIdByAnnexId")
public AjaxResult updateCaseIdByAnnexId(@RequestBody CaseAttach caseAttach) {
if(caseAttach.getAnnexId()==null || caseAttach.getCaseAppliId()==null){
return error("参数校验失败");
}
return caseApplicationService.updateCaseIdByAnnexId(caseAttach);
}
}
@@ -1,107 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import static com.ruoyi.common.core.domain.AjaxResult.success;
/**
* @author wangqiong
* @description 案件日志
* @date 2023-11-17 13:58
*/
@RestController
@RequestMapping (value = "/caseApplicationLog")
public class CaseApplicationLogController {
@Autowired
private CaseApplicationLogService caseApplicationLogService;
/**
* 新增
* @author wangqiong
* @date 2023/11/17
**/
@PostMapping("/insert")
public AjaxResult insert(@RequestBody CaseApplication caseApplicationLog){
return success(caseApplicationLogService.insert(caseApplicationLog));
}
/**
* 刪除
* @author wangqiong
* @date 2023/11/17
**/
@PostMapping("/delete")
public AjaxResult delete(Long id){
return success(caseApplicationLogService.delete(id));
}
/**
* 修改的案件提交到秘书
* @author wangqiong
* @date 2023/11/17
**/
@PostMapping("/submit")
public AjaxResult submit(@RequestBody UpdateSubmitVO vo){
if(vo.getCaseId()==null || vo.getVersion()==null){
return AjaxResult.error("参数校验错误");
}
return caseApplicationLogService.submit(vo);
}
/**
* 修改撤销申请
* @author wangqiong
* @date 2023/11/17
**/
@PostMapping("/revoke")
public AjaxResult revoke(@RequestBody UpdateSubmitVO vo){
if(vo.getCaseId()==null || vo.getVersion()==null){
return AjaxResult.error("参数校验错误");
}
// todo 需确定
return caseApplicationLogService.revoke(vo);
}
/**
* 查询 根据主键 id 查询
* @author wangqiong
* @date 2023/11/17
**/
@GetMapping("/selectByCaseIdAndVersion")
public AjaxResult selectByCaseIdAndVersion(@RequestParam(value = "caseId") Long caseId,@RequestParam(value = "version")Integer version ){
return success(caseApplicationLogService.selectByCaseIdAndVersion(caseId,version));
}
/**
* 秘书审核修改的案件
* @author wangqiong
* @date 2023/11/17
**/
@PostMapping("/updateAudit")
public AjaxResult updateAudit(@RequestBody UpdateSubmitVO vo){
if(vo.getCaseId()==null || vo.getVersion()==null || vo.getIsAgree()==null || vo.getUpdateSubmitStatus()==null){
return AjaxResult.error("参数校验错误");
}
return caseApplicationLogService.updateAudit(vo);
}
/**
* 查询该版本及之前版本案件进行对比
* @author wangqiong
* @date 2023/11/17
**/
@Anonymous
@PostMapping("/selectCompareCase")
public AjaxResult selectCompareCase(@RequestBody UpdateSubmitVO vo){
if(vo.getCaseId()==null || vo.getVersion()==null ){
return AjaxResult.error("参数校验错误");
}
return caseApplicationLogService.selectCompareCase(vo);
}
}
@@ -1,47 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseIds;
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.*;
import java.util.List;
@RestController
@RequestMapping("/arbitrate")
public class CaseArbitrateController extends BaseController {
@Autowired
private ICaseArbitrateService caseArbitrateService;
/**
* 审核仲裁方式
* @param caseApplication
* @param opinion 1同意,0拒绝
* @return
*/
@PutMapping("/method")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
, Integer opinion, Integer arbitratMethod){
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion,arbitratMethod);
}
/**
* 书面审理
* @param
* @return
*/
@PostMapping("/writtenHear")
public AjaxResult writtenHear(@RequestBody CaseIds caseIds){
return caseArbitrateService.writtenHear(caseIds);
}
}
@@ -1,160 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
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;
import java.util.ArrayList;
import java.util.List;
/**
* 案件证据
*/
@RestController
@RequestMapping("/evidence")
public class CaseEvidenceController extends BaseController {
private final ICaseEvidenceService caseEvidenceService;
@Autowired
public CaseEvidenceController(ICaseEvidenceService caseEvidenceService) {
this.caseEvidenceService = caseEvidenceService;
}
/**
* 根据案件id查询案件详情
*
* @param id
* @return
*/
@GetMapping("/{id}")
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
String username = this.getUsername();
return caseEvidenceService.getCaseDetailsById(id, username);
}
/**
* 案件证据上传
*
* @param file 附件
* @param annexType 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
* @param id 案件申请id
* @return
*/
@PostMapping("/upload")
public AjaxResult uploadEvidence(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
String username = this.getUsername();
Long userId = this.getUserId();
return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
}
/**
* 上传庭审笔录
*
* @param file 附件
* @param annexType 附件类型,庭审笔录(7)
* @param id 案件申请id
* @return
*/
@PostMapping("/uploadRecord")
public AjaxResult uploadRecord(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
String username = this.getUsername();
Long userId = this.getUserId();
return caseEvidenceService.uploadRecord(file, annexType, id, username, userId);
}
@PostMapping("/batchUpload")
public AjaxResult batchUpload(@RequestParam("file") MultipartFile[] file, Integer annexType, Long id) {
if(file==null){
return error("请选择要上传的文件");
}
String username = this.getUsername();
Long userId = this.getUserId();
return caseEvidenceService.batchUpload(file, annexType, id, username, userId);
}
/**
* 获取附件
* @param caseAppliId
* @param annexTypeList
* @param
* @return
*/
@GetMapping("/fileList")
public AjaxResult fileList(Long caseAppliId, @RequestParam("annexTypeList") List<Integer> annexTypeList){
if(caseAppliId==null){
return error("案件id不能为空");
}
return caseEvidenceService.fileList(caseAppliId, annexTypeList);
}
/**
* 删除附件
* @param fileIds
* @return
*/
@PostMapping("/deleteFile")
public AjaxResult deleteFile( @RequestParam("fileIds") List<Integer> fileIds){
if(CollectionUtil.isEmpty(fileIds)){
return error("附件id不能为空");
}
return toAjax(caseEvidenceService.deleteFile( fileIds));
}
/**
* 查询当前用户案件列表
*
* @param caseStatus
* @return
*/
@GetMapping("/all")
public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
return success(caseEvidenceService.getCaseListAll(caseStatus));
}
/**
* 证据确认
*
* @param caseApplication 案件对象
* @return 统一返回结果
*/
@PutMapping("/confirm")
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication) {
return caseEvidenceService.evidenceConfirmation(caseApplication);
}
/**
* 案件质证
*
* @param caseEvidenceDTO
* @return
*/
@PostMapping("/crossexami")
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
}
/**
* 获取证据目录树列表
*/
@GetMapping("/evidenceTree")
public AjaxResult evidenceTree(CaseEvidenceDirectory caseEvidenceDirectory)
{
return success(caseEvidenceService.selectEvidenceTreeList(caseEvidenceDirectory)) ;
}
}
@@ -2,8 +2,6 @@ package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -23,7 +21,7 @@ public class CaseLogRecordController extends BaseController {
/**
* 查询案件日志列表
*/
// @PreAuthorize("@ss.hasPermi('caseLog:list')")
@PreAuthorize("@ss.hasPermi('caseLog:list')")
@GetMapping("/list")
public AjaxResult list(CaseLogRecord caseLogRecord)
{
@@ -1,110 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
* 缴费支付
*/
@RestController
@RequestMapping("/pay")
public class CasePaymentController {
private final ICasePaymentService paymentService;
@Autowired
public CasePaymentController(ICasePaymentService paymentService){
this.paymentService=paymentService;
}
/**
* 案件缴费
* @param casePayDTO 缴费传入参数
* @return 统一响应结果
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/casePay")
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePay(casePayDTO);
}
/**
* 确认缴费
* @param payDTO 缴费传入参数
* @return 统一响应结果
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/confirmPay")
public AjaxResult confirmPay(@Validated @RequestBody CaseConfirmPayDTO payDTO) {
return paymentService.confirmPay(payDTO);
}
/**
* 批量缴费
* @param casePayDTO 缴费传入参数
* @return 统一响应结果
*/
@PostMapping("/casePayBatch")
public AjaxResult casePayBatch(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePayBatch(casePayDTO);
}
/**
* 批量缴费
* @param payDTO 缴费传入参数
* @return 统一响应结果
*/
@PostMapping("/confirmPayBatch")
public AjaxResult confirmPayBatch(@Validated @RequestBody CasePayDTO payDTO) {
return paymentService.confirmPayBatch(payDTO);
}
/**
* 缴费确认
* @param batchCaseApplication
* @return
*/
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
@PutMapping("/confirm")
public AjaxResult confirmPayment(@Validated @RequestBody BatchCaseApplication batchCaseApplication) {
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
return AjaxResult.error("参数校验失败");
}
return paymentService.confirmPayment(batchCaseApplication.getIds());
}
/**
* 缴费列表查询
* @param casePayDTO
* @return
*/
@GetMapping("/list")
public AjaxResult casePayList(CasePayDTO casePayDTO) {
return paymentService.casePayList(casePayDTO);
}
@PostMapping("/listBatch")
public AjaxResult casePayListBatch(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePayListBatch(casePayDTO);
}
/**
* 批量缴费确认
* @param batchCaseApplication
* @return
*/
@PostMapping("/confirmBatch")
public AjaxResult confirmPaymentBatch(@Validated @RequestBody BatchCaseApplication batchCaseApplication) {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
return AjaxResult.error("参数校验失败");
}
return paymentService.confirmPaymentBatch(batchCaseApplication.getBatchNumber());
}
}
@@ -30,19 +30,5 @@ public class SendMailRecordController extends BaseController {
}
// /**
// * 新增立案数据
// */
// @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
// @PostMapping("/addSendMailRecord")
// public AjaxResult addSendMailRecord(@Validated @RequestBody SendMailRecord sendMailRecord)
// {
//
// return toAjax(sendMailRecordService.addSendMailRecord(sendMailRecord));
// }
}
@@ -1,149 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
import com.ruoyi.wisdomarbitrate.service.VideoService;
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
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.trtc.v20190722.TrtcClient;
import com.tencentcloudapi.trtc.v20190722.models.*;
import com.tencentyun.TLSSigAPIv2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.io.IOException;
/**
* @author wangqiong
* @description trtc实时音视频
* @date 2023-10-26 11:25
*/
@RestController
@RequestMapping("/video")
public class VideoController extends BaseController {
@Autowired
private VideoService videoService;
/**
* 从腾讯云下载文件到本地
* @param
* @return
*/
@Anonymous
@PostMapping("/videoRollBack")
public AjaxResult videoRollBack( @RequestBody String body, HttpServletRequest request) {
videoService.videoRollBack(body,request);
return success();
}
/**
* 根据房间号绑定案件ID
* @param
* @return
*/
@Anonymous
@PostMapping("/bindCaseId")
public AjaxResult bindCaseId(@Valid @RequestBody SendRoomNoMessageVO vo) {
return videoService.bindCaseId(vo.getId(),vo.getRoomNo());
}
/**
* 根据案件ID查询视频
* @param caseId 案件id
* @return
*/
@GetMapping("/videoList")
public AjaxResult videoList( @RequestParam Long caseId) {
return videoService.videoList(caseId);
}
/**
* 开启腾讯云录制
* @param vo
* @return
* @throws Exception
*/
@Anonymous
@PostMapping("/openCloudRecording")
private AjaxResult openCloudRecording( @RequestBody ReservedConferenceVO vo) {
if(vo.getCaseId()==null || vo.getRoomId()==null){
return AjaxResult.error("参数错误");
}
return videoService.openCloudRecording(vo.getCaseId(),vo.getRoomId());
}
/**
* 关闭腾讯云录制
* @param taskId 任务ID
* @return
*/
@Anonymous
@PostMapping("/closeDeleteCloudRecording")
public AjaxResult closeDeleteCloudRecording(@RequestParam("taskId") String taskId){
return videoService.closeDeleteCloudRecording(taskId);
}
/**
* 解散房间
* @param reservedConferenceVO
* @return
*/
@Anonymous
@PostMapping("/dissolveRoom")
public AjaxResult dissolveRoom( @RequestBody ReservedConferenceVO reservedConferenceVO) {
if( reservedConferenceVO.getRoomId()==null){
return error("参数校验失败");
}
return videoService.dissolveRoom(reservedConferenceVO.getRoomId());
}
/**
* 根据userId查询该用户是否是秘书
* @param userId
* @return
*/
@Anonymous
@GetMapping("secretaryRoleByUserId")
public AjaxResult secretaryRoleByUserId( @RequestParam(value = "userId",required = true) Long userId) {
return videoService.secretaryRoleByUserId(userId);
}
/**
* 根据html字符串转pdf并和案件关联
* @param reservedConferenceVO
* @return
*/
@Anonymous
@PostMapping("htmlToPDF")
public AjaxResult secretaryRoleByUserId( @RequestBody ReservedConferenceVO reservedConferenceVO) {
if( reservedConferenceVO.getCaseId()==null || StrUtil.isEmpty(reservedConferenceVO.getHtmlContent())){
return success();
}
return videoService.htmlToPDF(reservedConferenceVO);
}
/**
* 根据案件id和类型查询附件
* @param caseAppliId
* @param annexType
* @return
*/
@GetMapping("attachListByCaseId")
public AjaxResult attachListByCaseId( @RequestParam("caseAppliId") Long caseAppliId,@RequestParam("annexType") Integer annexType) {
return videoService.attachListByCaseId(caseAppliId,annexType);
}
}
@@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://121.40.189.20:3306/test_smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
url: jdbc:mysql://121.40.189.20:3306/mediation_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
# 从库数据源
@@ -143,7 +143,7 @@ swagger:
# 是否开启swagger
enabled: true
# 请求前缀
pathMapping: /dev-api
pathMapping:
# 防止XSS攻击
xss:
@@ -1,7 +1,7 @@
jdbc.driverClass=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://158.58.50.21:3306/knslm?serverTimezone=Asia/Shanghai&useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&nullCatalogMeansCurrent=true
jdbc.user=knslm
jdbc.password=knslm2022
jdbc.url=jdbc:mysql://158.58.50.21:3306/mediation_system?serverTimezone=Asia/Shanghai&useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&nullCatalogMeansCurrent=true
jdbc.user=root
jdbc.password=YMzc157#
#模块名称
moduleName=diagnosis
@@ -21,13 +21,13 @@
password="${jdbc.password}">
</jdbcConnection>
<!--实体-->
<javaModelGenerator targetPackage="com.njkn.knslm.domain.entity.${moduleName}"
<javaModelGenerator targetPackage="com.ruoyi.wisdomarbitrate.domain.${moduleName}"
targetProject="src/main/java"/>
<!--mapper.xml-->
<sqlMapGenerator targetPackage="com.njkn.knslm.dao.${moduleName}"
<sqlMapGenerator targetPackage="mapper.**.${moduleName}"
targetProject="src/main/resources"/>
<!--mapper接口-->
<javaClientGenerator targetPackage="com.njkn.knslm.dao.${moduleName}"
<javaClientGenerator targetPackage="com.ruoyi.**.mapper.${moduleName}"
targetProject="src/main/java"
type="XMLMAPPER"/>
<!--需要生成的数据库表-->
@@ -3,6 +3,7 @@ package com.ruoyi.common.utils;
import com.ruoyi.common.utils.uuid.UUID;
import com.sun.net.ssl.internal.ssl.Provider;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@@ -102,7 +103,7 @@ public class EmailOutUtil {
MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent(messageContent, "text/html;charset=utf-8");
messageBodyPart.setContentID(UUID.randomUUID().toString());
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
Security.addProvider(new Provider());
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
//设置邮件会话参数
Properties props = new Properties();
@@ -1,11 +1,12 @@
package com.ruoyi.framework.config;
import java.util.TimeZone;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import tk.mybatis.spring.annotation.MapperScan;
/**
* 程序注解配置
@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectGenTableColumnVo">
select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from ms_gen_table_column
</sql>
<select id="selectGenTableColumnListByTableId" parameterType="Long" resultMap="GenTableColumnResult">
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertGenTableColumn" parameterType="GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
insert into gen_table_column (
insert into ms_gen_table_column (
<if test="tableId != null and tableId != ''">table_id,</if>
<if test="columnName != null and columnName != ''">column_name,</if>
<if test="columnComment != null and columnComment != ''">column_comment,</if>
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateGenTableColumn" parameterType="GenTableColumn">
update gen_table_column
update ms_gen_table_column
<set>
<if test="columnComment != null">column_comment = #{columnComment},</if>
<if test="javaType != null">java_type = #{javaType},</if>
@@ -111,14 +111,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteGenTableColumnByIds" parameterType="Long">
delete from gen_table_column where table_id in
delete from ms_gen_table_column where table_id in
<foreach collection="array" item="tableId" open="(" separator="," close=")">
#{tableId}
</foreach>
</delete>
<delete id="deleteGenTableColumns">
delete from gen_table_column where column_id in
delete from ms_gen_table_column where column_id in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item.columnId}
</foreach>
@@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectGenTableVo">
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from ms_gen_table
</sql>
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_schema = (select database())
AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT IN (select table_name from gen_table)
AND table_name NOT IN (select table_name from ms_gen_table)
<if test="tableName != null and tableName != ''">
AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
</if>
@@ -113,29 +113,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
FROM ms_gen_table t
LEFT JOIN ms_gen_table_column c ON t.table_id = c.table_id
where t.table_id = #{tableId} order by c.sort
</select>
<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
FROM ms_gen_table t
LEFT JOIN ms_gen_table_column c ON t.table_id = c.table_id
where t.table_name = #{tableName} order by c.sort
</select>
<select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark,
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
FROM ms_gen_table t
LEFT JOIN ms_gen_table_column c ON t.table_id = c.table_id
order by c.sort
</select>
<insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId">
insert into gen_table (
insert into ms_gen_table (
<if test="tableName != null">table_name,</if>
<if test="tableComment != null and tableComment != ''">table_comment,</if>
<if test="className != null and className != ''">class_name,</if>
@@ -169,7 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateGenTable" parameterType="GenTable">
update gen_table
update ms_gen_table
<set>
<if test="tableName != null">table_name = #{tableName},</if>
<if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if>
@@ -193,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteGenTableByIds" parameterType="Long">
delete from gen_table where table_id in
delete from ms_gen_table where table_id in
<foreach collection="array" item="tableId" open="(" separator="," close=")">
#{tableId}
</foreach>
@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectJobLogVo">
select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time
from sys_job_log
from ms_sys_job_log
</sql>
<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult">
@@ -54,22 +54,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<delete id="deleteJobLogById" parameterType="Long">
delete from sys_job_log where job_log_id = #{jobLogId}
delete from ms_sys_job_log where job_log_id = #{jobLogId}
</delete>
<delete id="deleteJobLogByIds" parameterType="Long">
delete from sys_job_log where job_log_id in
delete from ms_sys_job_log where job_log_id in
<foreach collection="array" item="jobLogId" open="(" separator="," close=")">
#{jobLogId}
</foreach>
</delete>
<update id="cleanJobLog">
truncate table sys_job_log
truncate table ms_sys_job_log
</update>
<insert id="insertJobLog" parameterType="SysJobLog">
insert into sys_job_log(
insert into ms_sys_job_log(
<if test="jobLogId != null and jobLogId != 0">job_log_id,</if>
<if test="jobName != null and jobName != ''">job_name,</if>
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectJobVo">
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
from sys_job
from ms_sys_job
</sql>
<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
@@ -53,18 +53,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<delete id="deleteJobById" parameterType="Long">
delete from sys_job where job_id = #{jobId}
delete from ms_sys_job where job_id = #{jobId}
</delete>
<delete id="deleteJobByIds" parameterType="Long">
delete from sys_job where job_id in
delete from ms_sys_job where job_id in
<foreach collection="array" item="jobId" open="(" separator="," close=")">
#{jobId}
</foreach>
</delete>
<update id="updateJob" parameterType="SysJob">
update sys_job
update ms_sys_job
<set>
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
insert into sys_job(
insert into ms_sys_job(
<if test="jobId != null and jobId != 0">job_id,</if>
<if test="jobName != null and jobName != ''">job_name,</if>
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
+51 -2
View File
@@ -33,7 +33,56 @@
<artifactId>tls-sig-api-v2</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<!--通用mapper-->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>2.1.5</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 通用mapper代码生成器-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.6</version>
<configuration>
<configurationFile>
${basedir}/src/main/resources/generator/generatorConfig.xml
</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>4.1.5</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
@@ -20,7 +20,6 @@ public interface ISysUserService
* @return 用户信息集合信息
*/
public List<SysUser> selectUserList(SysUser user);
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
/**
* 根据条件分页查询已分配用户角色列表
@@ -9,8 +9,6 @@ import javax.validation.Validator;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.system.mapper.*;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -62,8 +60,6 @@ public class SysUserServiceImpl implements ISysUserService {
@Autowired
private ISysConfigService configService;
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired
protected Validator validator;
@@ -80,23 +76,6 @@ public class SysUserServiceImpl implements ISysUserService {
return userMapper.selectUserList(user);
}
@Override
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
if(sysUsers!=null&&sysUsers.size()>0){
for(SysUser sysUser: sysUsers){
Long userId = sysUser.getUserId();
int casenum = caseApplicationMapper.selectCasenum(userId.toString());
String nickName = sysUser.getNickName();
String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
sysUser.setNickNameAndNum(nickNamenew);
}
}
return sysUsers;
}
/**
* 根据条件分页查询已分配用户角色列表
*
@@ -0,0 +1,76 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Entity
@Data
@Table(name="ms_case_log_record")
public class MsCaseLogRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "Id")
@GeneratedValue(generator = "JDBC")
private Long id;
/**
* 案件申请id
*/
@Column(name="case_appli_id")
private Long caseAppliId;
/**
* 案件节点
*/
@Column(name="case_node")
private Integer caseNode;
/**
* 案件节点时间
*/
@Column(name="case_node_time")
private Date caseNodeTime;
/**
* 备注
*/
@Column(name="notes")
private String notes;
/**
* 操作人用户名
*/
@Column(name="create_by")
private String createBy;
/**
* 操作人用户昵称
*/
@Column(name="create_nick_name")
private String createNickName;
/**
* 创建时间
*/
@Column(name="create_time")
private Date createTime;
/**
* 更新者
*/
@Column(name="update_by")
private String updateBy;
/**
* 更新时间
*/
@Column(name="update_time")
private Date updateTime;
}
@@ -1,4 +1,4 @@
package com.ruoyi.wisdomarbitrate;
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
@@ -1,17 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import java.util.List;
public interface ArbitrateRecordMapper {
int insertArbitrateRecord(ArbitrateRecord arbitrateRecord);
int updataArbitrateRecord(ArbitrateRecord arbitrateRecord);
ArbitrateRecord selectArbitrateRecord(ArbitrateRecord arbitrateRecord);
}
@@ -1,12 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ArbitratorMapper {
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
}
@@ -1,25 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface CaseAffiliateLogMapper {
int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
void deletecaseAffiliate(CaseApplication caseApplication);
void batchDeletecaseAffiliate(@Param("ids") List<Long> ids);
List<CaseAffiliate> selectCaseAffiliate(@Param("caseAppliLogId") Long caseAppliLogId);
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliLogId") Long caseAppliLogId, @Param("identityType")int identityType);
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
}
@@ -1,45 +0,0 @@
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.vo.BookSendVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface CaseAffiliateMapper {
int batchCaseAffiliate(List<CaseAffiliate> caseAffiliates);
void deletecaseAffiliate(CaseApplication caseApplication);
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);
/**
* 根据案件id删除
* @param caseId
*/
void deleteByCaseId(@Param("caseAppliId") Long caseId);
}
@@ -1,56 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author wangqiong
* @description 案件日志
* @date 2023-11-17 14:05
*/
@Repository
public interface CaseApplicationLogMapper {
int insert(CaseApplication caseApplicationLog);
int deleteById(Long id);
CaseApplication selectByCaseIdAndVersion(@Param("caseAppliId")long caseAppliId,@Param("version") int version);
Integer selectMaxVersionByCaseId(@Param("caseAppliId")long caseAppliId);
/**
* 修改日志表状态
* @param vo
*/
void updateStatus(UpdateSubmitVO vo);
/**
* 根据案件id查询秘书角色最新版本号
* @param id
* @return
*/
Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
/**
* 删除日志
* @param ids
*/
void batchDeleteLog(@Param("ids") List<Long> ids);
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
Integer batchSave(@Param("list")List<CaseApplication> caseApplications);
/**
* 根据案件id查询所有的日志id
* @param ids
* @return
*/
List<Long> selectLogsByCaseIds(@Param("ids")List<Long> ids);
}
@@ -1,140 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
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.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface CaseApplicationMapper {
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
List<CaseApplication> selectCaseApplicationList1(CaseApplication caseApplication);
int selectCaseApplicationCount(CaseApplication caseApplication);
/**
* 查询超级管理员案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
int insertCaseApplication(CaseApplication caseApplication);
int updataCaseApplication(CaseApplication caseApplication);
int submitCaseApplication(CaseApplication caseApplication);
int deletecaseApplication(CaseApplication caseApplication);
CaseApplication selectCaseApplication(CaseApplication caseApplication);
/**
* 根据案件id查询案件信息
* @param ids
* @return
*/
List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
/**
* 查询最大编号
* @param caseNum
* @param length
* @return
*/
Integer selectCaseNumLike(@Param("caseNum") String caseNum, @Param("length") int length);
/**
* 查询仲裁员根据案件id
* @param id
* @return
*/
String selectArbitratorList(@Param("id") String id);
/**
* 修改支付方式
* @param payDTO
*/
void updatePayType(CaseConfirmPayDTO payDTO);
ToDoCount selectAdminCaseToDoCount();
ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
/**
* 修改案件锁定状态
* @param id
* @param lockStatus
* @return
*/
int updateCaseLockStatus(@Param("id")Long id,@Param("lockStatus") Integer lockStatus);
/**
* 批量删除案件
* @param ids
* @return
*/
int batchDeletecaseApplication(@Param("ids") List<Long> ids);
/**
* 绑定房间号
* @param caseId
* @param roomId
*/
void bindCaseId(@Param("caseId")Long caseId,@Param("roomId") String roomId);
/**
* 根据房间号查询案件id
* @param roomId
* @return
*/
Long selectCaseIdByRoomId(@Param("roomId")String roomId);
/**
* 查询已办案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectHandledCase(CaseApplication caseApplication);
/**
* 查询最大房间号
* @return
*/
Long selectMaxRoomId();
/**
* 修改案件版本号
* @param id
* @param version
*/
void updateVersionById(@Param("id")Long id, @Param("version")Integer version);
/**
* 查询最大批号
* @return
*/
Integer selectBatchNumberLike();
/**
* 批量新增案件
* @param caseApplications
* @return
*/
int batchSave(@Param("list")List<CaseApplication> caseApplications);
int selectCasenum(@Param("userId") String userId);
List<CaseApplication> selectAdminCaseApplicationListBatch(CaseApplication caseApplication);
List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
}
@@ -1,29 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CaseEvidenceDirectoryMapper {
int save(CaseEvidenceDirectory caseEvidenceDirectory);
/**
* 查询证据目录信息
*
* @param caseEvidenceDirectory 目录信息
* @return 目录信息集合
*/
List<CaseEvidenceDirectory> selectList(CaseEvidenceDirectory caseEvidenceDirectory);
/**
* 根据证据名称查询证据目录树信息
* @param evidenceName 证据名称
* @param deptCheckStrictly 目录树选择项是否关联显示
*/
List<Integer> selectDeptListByEvidenceName(@Param("evidenceName") String evidenceName, @Param("deptCheckStrictly") boolean deptCheckStrictly);
}
@@ -1,16 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
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
);
}
@@ -1,14 +1,13 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import org.apache.ibatis.annotations.Mapper;
import com.ruoyi.wisdomarbitrate.domain.dto.MsCaseLogRecordDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
@Mapper
public interface CaseLogRecordMapper {
public interface CaseLogRecordMapper extends Mapper<MsCaseLogRecordDTO> {
List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord);
@@ -1,15 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord;
import java.util.List;
public interface CasePaymentRecordMapper {
int saveRecord(CasePaymentRecord casePaymentRecord);
List<CasePaymentRecord> queryRecord(String orderNumber);
void update(CasePaymentRecord casePaymentRecord);
CasePaymentRecord selectRecordByCaseId(Long id);
}
@@ -1,32 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SealSignRecordMapper {
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
/**
* 查询已签署和签署中的文件
* @param sealSignRecord
* @return
*/
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
/**
* 差询等待签署,签署中的案件
* @param penSonAccount 签署人员
* @return
*/
List<CaseApplication> selectSealSigning(@Param("penSonAccount") String penSonAccount, @Param("caseStatus") Integer caseStatus);
int updataSealSignRecord(SealSignRecord sealSignRecord);
void insertSealSignRecord(SealSignRecord sealSignRecord);
}
@@ -1,16 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface TemplateManualMapper {
int insertTemplateManual(TemplateManual templateManual);
int updateTemplateManual(TemplateManual templateManual);
List<TemplateManual> selectTemplateManual(TemplateManual templateManual);
}
@@ -1,58 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
/**
* @author wangqiong
* @description 案件日志
* @date 2023-11-17 13:58
*/
public interface CaseApplicationLogService {
/**
* 新增案件日志
* @param caseApplicationLog
* @return
*/
int insert(CaseApplication caseApplicationLog);
/**
* 根据案件日志id删除案件日志
* @param id
* @return
*/
int delete(Long id);
/**
* 根据案件id和版本号查询案件日志
* @param id
* @param version
* @return
*/
CaseApplication selectByCaseIdAndVersion(Long id, int version);
/**
* 修改的案件提交到秘书
* @param vo
* @return
*/
AjaxResult submit(UpdateSubmitVO vo);
/**
* 修改撤销申请
* @param vo
* @return
*/
AjaxResult revoke(UpdateSubmitVO vo);
/**
* 秘书审核修改的案件
* @param vo
* @return
*/
AjaxResult updateAudit(UpdateSubmitVO vo);
AjaxResult selectCompareCase(UpdateSubmitVO vo);
}
@@ -1,60 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
import java.util.List;
public interface IAdjudicationService {
AjaxResult createDocument(CaseApplication caseApplication);
AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
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查询邮箱
* @param id
* @return
*/
AjaxResult emailByCaseId(Long id);
/**
* 批量生成裁决书
* @param ids
* @return
*/
AjaxResult batchDocument(List<Long> ids);
/**
* 根据签署流程id查询批量签名链接
* @param idsReq
* @return
*/
SealSignRecord selectBatchSignUrl( StringIdsReq idsReq);
/**
* 根据仲裁员手机号分页查询等待签署,签署中的裁决书
* @param personAccount
* @return
*/
List<CaseApplication> selectSealSigning(String personAccount,Integer caseStatus);
SealSignRecord selectBatchSealUrl(StringIdsReq idsReq);
}
@@ -1,12 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import java.util.List;
public interface IArbitratorService {
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
}
@@ -1,154 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
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 org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
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 selectCaseApplicationCount(CaseApplication caseApplication);
AjaxResult editCaseApplication(CaseApplication caseApplication);
int submitCaseApplication( List<Long> ids);
int deletecaseApplicationByIds(List<Long> ids);
CaseApplication selectCaseApplication(CaseApplication caseApplication);
String importCaseApplication(List<CaseApplication> caseApplicationList, String operName);
int pendTral(CaseApplication caseApplication);
int pendingAppointArbotrar(CaseApplication caseApplication);
int pendTralCheck(CaseApplication caseApplication);
int pendTralSure(CaseApplication caseApplication);
int verificationArbitrateRecord(CaseApplication caseApplication);
AjaxResult checkArbitrateRecord(CaseApplication caseApplication);
int submitCaseApplicationCheck(List<Long> ids, Integer agreeOrNotCheck,String caseCheckReject);
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
/**
* 查询待办数量
* @return
*/
ToDoCount selectToDoCount();
AjaxResult selectCaseProgress(CaseApplication caseApplication);
int updateHeardate(CaseApplication caseApplication);
/**
* 修改案件锁定状态
* @param caseApplication
* @return
*/
int updateCaseLockStatus(CaseApplication caseApplication);
AjaxResult uploadZipFile(MultipartFile file, Long id, String username, Long userId);
/**
* 查询短信发送记录
* @param smsSendRecord
* @return
*/
List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord);
/**
* 获取userSign
* @param userId
* @return
*/
String generateUserSign(String userId);
/**
* 预约会议
* @param reservedConferenceVO
* @return
* @throws Exception
*/
AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) throws Exception;
/**
* 腾讯云销毁房间回调
* @return
*/
long createRoomId(Long caseId);
/**
* 根据案件id查询已预约的会议
* @param caseId
* @return
*/
List<ReservedConference> reserveConferenceList(Long caseId);
AjaxResult deleteRoom( String roomId);
AjaxResult uploadCaseZipFile(MultipartFile file,Long templateId);
/**
* 根据附件id修改案件id
* @param caseAttach
* @return
*/
AjaxResult updateCaseIdByAnnexId(CaseAttach caseAttach);
/**
* 仲裁员审核裁决书
* @param caseApplication
* @return
*/
AjaxResult arbitratorCheckArbitrateRecord(CaseApplication caseApplication);
AjaxResult creatTrialRecordnew(ArbitrateRecord arbitrateRecord);
AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication);
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
int submitCaseApplicationBatch(String batchNumber);
int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
int pendTralCheckBatch(CaseApplication caseApplication);
int pendTralSureBatch(CaseApplication caseApplication);
int verificationArbitrateRecordBatch(CaseApplication caseApplication);
AjaxResult arbitratorCheckArbitrateRecordBatch(CaseApplication caseApplication);
AjaxResult checkArbitrateRecordBatch(CaseApplication caseApplication);
}
@@ -1,17 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseIds;
import java.util.List;
public interface ICaseArbitrateService {
AjaxResult writtenHear(CaseIds caseIds);
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
}
@@ -1,70 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
public interface ICaseEvidenceService {
AjaxResult getCaseDetailsById(Long id,String userName);
AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
List<CaseEvidenceVO> getCaseListAll(Integer caseStatus);
AjaxResult evidenceConfirmation(CaseApplication caseApplication);
AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
/**
* 批量上传文件
* @param file
* @param annexType
* @param id
* @param username
* @param userId
* @return
*/
AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList);
int deleteFile( List<Integer> fileIds);
List<CaseEvidenceDirectoryVO> selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory);
/**
* 查询证据目录数据
*
* @param caseEvidenceDirectory 证据目录信息
* @return 证据目录信息集合
*/
List<CaseEvidenceDirectory> selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory);
/**
* 构建前端所需要树结构
*
* @param caseEvidenceDirectorys 证据列表
* @return 树结构列表
*/
List<CaseEvidenceDirectory> buildCaseEvidenceTree(List<CaseEvidenceDirectory> caseEvidenceDirectorys);
/**
* 构建前端所需要下拉树结构
*
* @param caseEvidenceDirectorys 证据目录列表
* @return 下拉树结构列表
*/
List<CaseEvidenceDirectoryVO> buildCaseEvidenceTreeSelect(List<CaseEvidenceDirectory> caseEvidenceDirectorys);
AjaxResult uploadRecord(MultipartFile file, Integer annexType, Long id, String username, Long userId);
}
@@ -1,36 +0,0 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.dto.PayRequest;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import java.util.List;
public interface ICasePaymentService {
/**
* 案件缴费
*/
AjaxResult casePay(CasePayDTO casePayDTO);
AjaxResult confirmPayment( List<Long> ids);
/**
* 确认缴费
* @param payDTO
* @return
*/
AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
AjaxResult casePayList(CasePayDTO casePayDTO);
AjaxResult confirmPayBatch(CasePayDTO payDTO);
AjaxResult casePayListBatch(CasePayDTO casePayDTO);
AjaxResult confirmPaymentBatch(String batchNumber);
AjaxResult casePayBatch(CasePayDTO casePayDTO);
}
@@ -1,28 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper;
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ArbitratorServiceImpl implements IArbitratorService {
@Autowired
private ArbitratorMapper arbitratorMapper;
@Override
public List<Arbitrator> selectArbitratorList(Arbitrator arbitrator) {
return arbitratorMapper.selectArbitratorList(arbitrator);
}
}
@@ -11,12 +11,13 @@ import org.springframework.stereotype.Component;
@Component
@Slf4j
public class CallBackHandleServiceImpl implements CallBackService {
@Autowired
private CasePaymentServiceImpl casePaymentService;
// todo
// @Autowired
// private CasePaymentServiceImpl casePaymentService;
@Override
public void successPay(String orderSn) {
casePaymentService.callback(orderSn);
// casePaymentService.callback(orderSn);
}
@Override
@@ -1,512 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.enums.UpdateSubmitStatus;
import com.ruoyi.common.enums.YesOrNoEnum;
import com.ruoyi.common.utils.ObjectFieldUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
/**
* @author wangqiong
* @description 案件日志
* @date 2023-11-17 14:05
*/
@Service
public class CaseApplicationLogServiceImpl implements CaseApplicationLogService {
@Autowired
private CaseApplicationLogMapper caseApplicationLogMapper;
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired
private CaseAffiliateLogMapper caseAffiliateLogMapper;
@Autowired
private CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private CaseAttachLogMapper caseAttachLogMapper;
@Autowired
private SmsRecordMapper smsRecordMapper;
@Autowired
private ICaseApplicationService caseApplicationService;
@Autowired
private ColumnValueLogMapper columnValueLogMapper;
// 对比两个版本修改的字段,基本字段对比
private static final String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
"claimPrinciOwed","arbitratClaims","properPreser","requestRule","facts"};
// 人员字段对比
private static final String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
"compLegalperPost","responSex","responBirth"};
@Override
public int insert(CaseApplication caseApplicationLog) {
return caseApplicationLogMapper.insert(caseApplicationLog);
}
@Override
public int delete(Long id) {
return caseApplicationLogMapper.deleteById(id);
}
@Override
public CaseApplication selectByCaseIdAndVersion(Long id, int version) {
return caseApplicationLogMapper.selectByCaseIdAndVersion(id,version);
}
/**
* 修改的案件提交到秘书
* @param vo
* @return
*/
@Override
public AjaxResult submit(UpdateSubmitVO vo) {
vo.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
// 修改日志表提交状态
caseApplicationLogMapper.updateStatus(vo);
return AjaxResult.success();
}
@Transactional
@Override
public AjaxResult revoke(UpdateSubmitVO vo) {
// 根据案件id和版本号查询改案件
CaseApplication caseApplication = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
if(caseApplication == null){
return AjaxResult.error("案件不存在");
}
// 如果秘书没有审核,将撤销状态改为同意撤销,否则改为撤销
if(caseApplication.getUpdateSubmitStatus()!=null && !caseApplication.getUpdateSubmitStatus().equals(UpdateSubmitStatus.AGREE.getCode())){
agreeRevoke(vo);
}else {
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
// 修改日志表提交状态
caseApplicationLogMapper.updateStatus(vo);
}
return AjaxResult.success();
}
/**
* 秘书审核修改的案件
* @param vo
* @return
*/
@Transactional
@Override
public AjaxResult updateAudit(UpdateSubmitVO vo) {
if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.COMMITTED.getCode())) {
// 审核修改提交状态
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
// 如果版本号为1,则直接返回
if(vo.getVersion() <= 1){
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
caseApplicationLogMapper.updateStatus(vo);
return AjaxResult.success();
}
// 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
// 查询日志记录表本版本数据
CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
if (caseApplicationLog == null) {
return AjaxResult.error("未找到该案件");
}
// 将日志表改版本的状态改为同意
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
caseApplicationLogMapper.updateStatus(vo);
// 根据caseLogId查询相关人员表
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
// 更新案件主表
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
// 更新相关人员主表
if(CollectionUtil.isNotEmpty(affiliateLogList)){
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
for (CaseAffiliate caseAffiliate : affiliateLogList) {
caseAffiliate.setCaseAppliId(vo.getCaseId());
}
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
}
// // 根据caseLogId查询案件记录附件表
CaseApplication caseApplication = new CaseApplication();
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
caseApplication.setAnnexType(2);
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
// 更新记录附件表
if(CollectionUtil.isNotEmpty(attachLogList)){
for (CaseAttach caseAttach : attachLogList) {
caseAttach.setCaseAppliId(vo.getCaseId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 更新自定义字段表
// 根据caseLogId查询自定义字段表
List<ColumnValue> columnValueList = columnValueLogMapper.listBycaseAppliLogId(caseApplicationLog.getCaseLogId());
if(CollectionUtil.isNotEmpty(columnValueList)){
for (ColumnValue columnValue : columnValueList) {
columnValue.setCaseAppliLogId(vo.getCaseId());
}
columnValueLogMapper.batchUpdate(columnValueList);
}
} else {
// 拒绝,将日志表改版本的状态改为拒绝
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
caseApplicationLogMapper.updateStatus(vo);
return sendAuditMessage(vo);
}
return AjaxResult.success();
} else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
// 审核修改撤销状态
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
// 同意撤销
agreeRevoke(vo);
} else {
// 拒绝撤销,将日志表改版本的状态改为拒绝撤销
vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
caseApplicationLogMapper.updateStatus(vo);
return sendAuditMessage(vo);
}
return AjaxResult.success();
}
return AjaxResult.success();
}
/**
* 给申请人发送短信
* @param vo
* @return
*/
private AjaxResult sendAuditMessage(UpdateSubmitVO vo) {
// 查询申请人
CaseApplication logCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
if(logCase == null){
return AjaxResult.success();
}
CaseAffiliate caseAffiliate = caseAffiliateLogMapper.selectCaseAffiliateByIdentityType(logCase.getCaseLogId(), 1);
if(caseAffiliate == null){
return AjaxResult.success();
}
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1996949");
request.setPhone(caseAffiliate.getContactTelphone());
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), logCase.getCaseNum(),vo.getReason()});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseAffiliate.getCaseAppliId());
caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
smsSendRecord.setCaseNum(caseApplication.getCaseNum());
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
// 1996949 审核案件结果通知 尊敬的{1}用户,您的{2}仲裁案件,审核未通过,理由为{3},请知晓,如非本人操作,请忽略本短信
String content = "尊敬的" + caseAffiliate.getName() + ",您的"+logCase.getCaseNum()+"仲裁案件,审核未通过,理由为"+vo.getReason()+",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1);
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
return AjaxResult.success();
}
@Override
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
// 查询当前版本号和主表的案件
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
CaseApplication caseApplication = new CaseApplication();
caseApplication.setCaseAppliId(vo.getCaseId());
caseApplication.setId(vo.getCaseId());
CaseApplication beforeCase = caseApplicationService.selectCaseApplication(caseApplication);
// 查询案件关联人员
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
// 查询自定义字段表
afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
// 查询附件
CaseAttach caseAttach = new CaseAttach();
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
caseAttach.setAnnexType(2);
caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
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);
}
}
afterCase.setCaseAttachList(afterAttachList);
}
afterCase.setCaseAttachList(afterAttachList);
CompareCaseVO compareCaseVO = new CompareCaseVO();
compareCaseVO.setBeforeCase(beforeCase);
compareCaseVO.setAfterCase(afterCase);
StringBuilder changeColumn = new StringBuilder();
// 对比基本字段
for (String column : columns) {
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
String afterValue = ObjectFieldUtils.getValue(afterCase, column);
if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
changeColumn.append(column).append(",");
continue;
}
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
changeColumn.append(column).append(",");
continue;
}
if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
changeColumn.append(column).append(",");
continue;
}
}
// 对比案件人员字段
compareAffilate(beforeCase, afterCase);
// 对比申请人证据资料
compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
// 对比自定义字段
//
List<ColumnValue> beforeColumnValues = beforeCase.getColumnValues();
List<ColumnValue> afterColumnValues = afterCase.getColumnValues();
StringBuilder columnValueChange = new StringBuilder();
if (CollectionUtil.isNotEmpty(beforeColumnValues) && CollectionUtil.isNotEmpty(afterColumnValues)) {
Map<String, String> beforeColumnValueMap = beforeColumnValues.stream().collect(Collectors.toMap(ColumnValue::getColumn, ColumnValue::getValue, (n1, n2) -> n2));
for (ColumnValue afterColumnValue : afterColumnValues) {
// 改变前字段不包含改变后字段
if (!beforeColumnValueMap.containsKey(afterColumnValue.getColumn())) {
columnValueChange.append(afterColumnValue.getColumn()).append(",");
} else {
// 都有这个字段,比较内容是否相同
// 修改后为空,修改前不为空
if (StrUtil.isEmpty(afterColumnValue.getValue()) && StrUtil.isNotEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
columnValueChange.append(afterColumnValue.getColumn()).append(",");
} else if (StrUtil.isNotEmpty(afterColumnValue.getValue()) && StrUtil.isEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
// 修改前为空,修改后不为空
columnValueChange.append(afterColumnValue.getColumn()).append(",");
} else if (StrUtil.isNotEmpty(afterColumnValue.getValue()) && StrUtil.isNotEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))
&& !afterColumnValue.getValue().equals(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
// 修改前不为空,修改后不为空,内容不同
columnValueChange.append(afterColumnValue.getColumn()).append(",");
}
}
}
} else if (CollectionUtil.isEmpty(beforeColumnValues) && CollectionUtil.isNotEmpty(afterColumnValues)) {
for (ColumnValue afterColumnValue : afterColumnValues) {
columnValueChange.append(afterColumnValue.getColumn()).append(",");
}
} else if (CollectionUtil.isNotEmpty(beforeColumnValues) && CollectionUtil.isEmpty(afterColumnValues)) {
for (ColumnValue beforeColumn : beforeColumnValues) {
columnValueChange.append(beforeColumn.getColumn()).append(",");
}
}
compareCaseVO.setColumnValueChangeColumn(columnValueChange.toString());
return AjaxResult.success(compareCaseVO);
}
/**
* 对比申请人证据资料
* @param beforeCase
* @param afterCase
* @param changeColumn
* @return
*/
private StringBuilder compareApplicantFile(CaseApplication beforeCase, CaseApplication afterCase, StringBuilder changeColumn) {
List<CaseAttach> beforeAttachFilter =new ArrayList<>();
List<CaseAttach> afterAttachFilter =new ArrayList<>();
if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
beforeAttachFilter = beforeCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
}
if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
afterAttachFilter = afterCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
}
if(CollectionUtil.isNotEmpty(beforeAttachFilter)&& CollectionUtil.isNotEmpty(afterAttachFilter)){
if(beforeAttachFilter.size()!=afterAttachFilter.size()){
changeColumn.append("fileColumn");
}else {
Map<String, CaseAttach> afterAttachMap = afterAttachFilter.stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
for (CaseAttach beforeCaseAttach : beforeAttachFilter) {
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
changeColumn.append("fileColumn");
break;
}
}
}
}
return changeColumn;
}
/**
* 对比案件人员字段
* @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());
}
}
}
/**
* 同意撤销
* @param vo
*/
private void agreeRevoke(UpdateSubmitVO vo) {
CaseApplication caseApplicationLog;
// 查询日志记录表上个版本未被拒绝数据
if(vo.getVersion()<=1){
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
}else {
caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
}
if (caseApplicationLog == null) {
return;
}
// 将日志表改版本的状态改为拒绝
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE_REVOKE.getCode());
caseApplicationLogMapper.updateStatus(vo);
// 根据caseLogId查询相关人员表
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
// 更新案件主表
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
// 更新相关人员主表
if(CollectionUtil.isNotEmpty(affiliateLogList)){
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
for (CaseAffiliate caseAffiliate : affiliateLogList) {
caseAffiliate.setCaseAppliId(vo.getCaseId());
}
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
}
// // 根据caseLogId查询案件记录附件表
CaseApplication caseApplication = new CaseApplication();
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
caseApplication.setAnnexType(2);
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
// 更新记录附件表
if(CollectionUtil.isNotEmpty(attachLogList)){
for (CaseAttach caseAttach : attachLogList) {
caseAttach.setCaseAppliId(vo.getCaseId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 根据caseLogId查询自定义字段表
List<ColumnValue> columnValueList = columnValueLogMapper.listBycaseAppliLogId(caseApplicationLog.getCaseLogId());
// 更新相关人员主表
if(CollectionUtil.isNotEmpty(columnValueList)){
for (ColumnValue columnValue : columnValueList) {
columnValue.setCaseAppliLogId(vo.getCaseId());
}
columnValueLogMapper.batchUpdate(columnValueList);
}
}
}
@@ -1,533 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.deepoove.poi.data.PictureRenderData;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.WordUtil;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
import java.util.function.Function;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@Service
public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired
private CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseLogRecordMapper caseLogRecordMapper;
@Autowired
private ArbitrateRecordMapper arbitrateRecordMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private SmsRecordMapper smsRecordMapper;
@Autowired
private IAdjudicationService adjudicationService;
@Autowired
private RedisCache redisCache;
@Autowired
private ICaseApplicationService caseApplicationService;
@Override
@Transactional
public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethodNow) {
//查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) {
return AjaxResult.success();
}
Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
String caseNum = caseApplication1.getCaseNum();
if (opinion == 0) { //拒绝
if (arbitratMethodOriral == 2) {
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
//修改案件状态修改开庭时间
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
//修改案件状态为待修改开庭时间
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
} else {
caseApplication1.setArbitratMethod(2);
//修改案件状态为待书面审理
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
}
} else if (opinion == 1 ) {
if (arbitratMethodOriral == 2) {
//修改案件状态为待书面审理
caseApplication1.setArbitratMethod(2);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
} else {
//修改案件状态为待修改开庭时间
caseApplication1.setArbitratMethod(1);
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
//修改案件状态为待修改开庭时间
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
}
}else if (opinion == 2) {
if (arbitratMethodNow == 2) {
//修改案件状态为待书面审理
caseApplication1.setArbitratMethod(2);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
} else {
//修改案件状态为待修改开庭时间
caseApplication1.setArbitratMethod(1);
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
//修改案件状态为待修改开庭时间
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
}
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
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); //获取案件关联人信息
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(caseApplication.getId());
smsSendRecord.setCaseNum(caseApplication1.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);
}
}
return AjaxResult.success("审核成功");
}
return AjaxResult.success();
}
@Override
@Transactional
public AjaxResult writtenHear(CaseIds caseIds) {
if (caseIds!=null){
List<Long> ids = caseIds.getIds();
for (Long caseId : ids) {
//查询案件详情
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
//先判断案件是否已经提交过仲裁结果
ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
arbitrateRecord.setCaseAppliId(caseId);
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
if (arbitrateRecord1 != null) {
int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
if (i > 0) {
//案件日志表里添加数据
CaseLogRecord caseLogRecord = new CaseLogRecord();
caseLogRecord.setCaseAppliId(caseApplication1.getId());
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
caseLogRecord.setCreateBy(getUsername());
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
}
} else {
//提交仲裁结果
int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
if (i > 0) {
//案件日志表里添加数据
CaseLogRecord caseLogRecord = new CaseLogRecord();
caseLogRecord.setCaseAppliId(caseApplication1.getId());
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
caseLogRecord.setCreateBy(getUsername());
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
}
}
// 生成裁决书
CaseApplication application = new CaseApplication();
application.setId(caseId);
adjudicationService.createDocument(application);
//修改案件状态
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
}
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) {
Integer 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");
if (awardNum == null) {
redisCache.setCacheObject("awardNum", "00001");
String s = redisCache.getCacheObject("awardNum").toString();
// 字符串数字解析为整数
int no = Integer.parseInt(s);
// 最新设备编号自增1
int newEquipment = ++no;
// 将整数格式化为5位数字
s = String.format("%05d", newEquipment);
redisCache.setCacheObject("awardNum", s);
return s;
} else {
String s = awardNum.toString();
// 字符串数字解析为整数
int no = Integer.parseInt(s);
// 最新设备编号自增1
int newEquipment = ++no;
// 将整数格式化为5位数字
s = String.format("%05d", newEquipment);
redisCache.setCacheObject("awardNum", s);
return s;
}
}
}
@@ -1,511 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
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;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseDetailVO;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@Service
public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
@Autowired
private CaseEvidenceMapper caseEvidenceMapper;
@Autowired
private CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private SmsRecordMapper smsRecordMapper;
@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) {
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
public AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id, String userName, Long userId) {
if (file.isEmpty()) {
return AjaxResult.error("请选择要上传的文件");
}
try {
String filePath = RuoYiConfig.getUploadPath();
// 上传
String fileName = FileUploadUtils.upload(filePath, file);
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
.annexName(fileName)
.annexPath(filePath)
.annexType(annexType)
.userId(userId)
.userName(userName)
.build();
int count = caseAttachMapper.save(caseAttach);
if (count > 0 && annexType != null && annexType != 8) {
if (id != null) {
//修改案件状态
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id);
caseApplication.setCaseStatus(4);
caseApplicationMapper.submitCaseApplication(caseApplication);
}
}
CaseAttach caseAttachselect = new CaseAttach();
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
String annexName = caseAttach.getAnnexName();
if(StrUtil.isNotEmpty(annexName)) {
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
}
}
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
return AjaxResult.success("上传成功", caseAttachselect);
} catch (IOException e) {
e.printStackTrace();
}
return AjaxResult.error("上传失败");
}
@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();
}
}
List<Integer> caseStatusList = Arrays.asList(caseStatus);
return getCaseEvidenceVOList(identityNum, caseStatusList, 2);
}
@Override
public AjaxResult evidenceConfirmation(CaseApplication caseApplication) {
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("暂无需要确认的证据");
}
@Override
@Transactional
public AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO) {
//查询案件详细信息
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseEvidenceDTO.getCaseId());
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 != null) {
caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason());
int caseStatus = caseApplication1.getCaseStatus();
caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
caseApplication1.setAdjudicaCounter(caseEvidenceDTO.getAdjudicaCounter());
caseApplication1.setObjectiJuris(caseEvidenceDTO.getObjectiJuris());
caseApplication1.setRespondentIsWrittenHear(caseEvidenceDTO.getRespondentIsWrittenHear());
List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators();
if (arbitrators != null && arbitrators.size() > 0) {
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
caseApplication1.setArbitratorId(idstr);
caseApplication1.setArbitratorName(arbitratorNamestr);
}
//修改案件状态
caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT, "");
return AjaxResult.success("提交成功");
}
}
return null;
}
@Transactional
@Override
public AjaxResult batchUpload(MultipartFile[] files, Integer annexType, Long id, String userName, Long userId) {
List<CaseAttach> successList = new ArrayList<>();
try {
String filePath = RuoYiConfig.getUploadPath();
for (MultipartFile file : files) {
// 上传
String fileName = FileUploadUtils.upload(filePath, file);
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
.annexName(fileName)
.annexPath(filePath)
.annexType(annexType)
.userId(userId)
.userName(userName)
.isBatchUpload(1)
.build();
int count = caseAttachMapper.save(caseAttach);
if (count > 0 && annexType != null && annexType != 8) {
CaseAttach caseAttachselect = new CaseAttach();
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
successList.add(caseAttachselect);
}
}
} catch (IOException e) {
e.printStackTrace();
return AjaxResult.error("上传失败");
}
// 给秘书发送短信
// 根据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)){
// 新增短信记录
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
// 1992106 普通短信 修改证据资料通知 尊敬的{1}用户,您的{2}仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。
request.setTemplateId("1992106");
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.setCaseNum(caseApplication.getCaseNum());
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + user.getNickName() + ",您的"+caseApplication.getCaseNum()+"仲裁案件,有新的证据上传,请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1);
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
}
return AjaxResult.success("上传成功", successList);
}
@Override
public AjaxResult fileList(Long caseAppliId, List<Integer> annexTypeList) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseAppliId);
caseApplication.setAnnexTypeList(annexTypeList);
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);
}
}
return AjaxResult.success(caseAttachList);
}
return null;
}
@Override
public int deleteFile(List<Integer> fileIds) {
return caseAttachMapper.deleteByFileIds(fileIds);
}
@Override
public List<CaseEvidenceDirectoryVO> selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory) {
List<CaseEvidenceDirectory> caseEvidenceDirectorys = SpringUtils.getAopProxy(this).selectCaseEvidenceList(caseEvidenceDirectory);
return buildCaseEvidenceTreeSelect(caseEvidenceDirectorys);
}
@Override
public List<CaseEvidenceDirectory> selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory) {
return caseEvidenceDirectoryMapper.selectList(caseEvidenceDirectory);
}
@Override
public List<CaseEvidenceDirectory> buildCaseEvidenceTree(List<CaseEvidenceDirectory> caseEvidenceDirectorys) {
List<CaseEvidenceDirectory> returnList = new ArrayList<>();
List<Long> tempList = caseEvidenceDirectorys.stream().map(CaseEvidenceDirectory::getId).collect(Collectors.toList());
for (CaseEvidenceDirectory caseEvidenceDirectory : caseEvidenceDirectorys) {
String annexName = caseEvidenceDirectory.getAnnexName();
if (annexName!=null){
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
caseEvidenceDirectory.setAnnexPath(annexPath);
int startIndexnew = annexName.lastIndexOf("/");
if(startIndexnew!=-1){
String annexNamenew = annexName.substring(startIndexnew+1);
caseEvidenceDirectory.setAnnexName(annexNamenew);
}
}
// 如果是顶级节点, 遍历该父节点的所有子节点
if (!tempList.contains(caseEvidenceDirectory.getParentId())) {
recursionFn(caseEvidenceDirectorys, caseEvidenceDirectory);
returnList.add(caseEvidenceDirectory);
}
}
if (returnList.isEmpty())
{
returnList = caseEvidenceDirectorys;
}
return returnList;
}
@Override
public List<CaseEvidenceDirectoryVO> buildCaseEvidenceTreeSelect(List<CaseEvidenceDirectory> caseEvidenceDirectorys) {
List<CaseEvidenceDirectory> caseEvidenceDirectories = buildCaseEvidenceTree(caseEvidenceDirectorys);
return caseEvidenceDirectories.stream().map(CaseEvidenceDirectoryVO::new).collect(Collectors.toList());
}
@Override
@Transactional
public AjaxResult uploadRecord(MultipartFile file, Integer annexType, Long id, String username, Long userId) {
if (file.isEmpty()) {
return AjaxResult.error("请选择要上传的文件");
}
try {
String filePath = RuoYiConfig.getUploadPath();
// 上传
String fileName = FileUploadUtils.upload(filePath, file);
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(id)
.annexName(fileName)
.annexPath(filePath)
.annexType(annexType)
.userId(userId)
.userName(username)
.build();
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setId(id);
caseApplicationsel.setAnnexType(7);
List<CaseAttach> caseAttachs = caseAttachMapper.queryCaseAttachList(caseApplicationsel);
if(caseAttachs!=null&&caseAttachs.size()>0){
caseAttachMapper.deleteCaseAttachByCasedIdAndType(id,7);
int count = caseAttachMapper.save(caseAttach);
}else {
int count = caseAttachMapper.save(caseAttach);
}
return AjaxResult.success("上传成功");
} catch (IOException e) {
e.printStackTrace();
}
return AjaxResult.error("上传失败");
}
/**
* 递归列表
*/
private void recursionFn(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
// 得到子节点列表
List<CaseEvidenceDirectory> childList = getChildList(list, t);
t.setChildren(childList);
for (CaseEvidenceDirectory tChild : childList) {
if (hasChild(list, tChild)) {
recursionFn(list, tChild);
}
}
}
/**
* 得到子节点列表
*/
private List<CaseEvidenceDirectory> getChildList(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
List<CaseEvidenceDirectory> tlist = new ArrayList<>();
Iterator<CaseEvidenceDirectory> it = list.iterator();
while (it.hasNext()) {
CaseEvidenceDirectory n = it.next();
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) {
tlist.add(n);
}
}
return tlist;
}
/**
* 判断是否有子节点
*/
private boolean hasChild(List<CaseEvidenceDirectory> list, CaseEvidenceDirectory t) {
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);
// todo 返回房间号和开庭时间
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;
}
}
@@ -1,328 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SpringUtil;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;
import java.util.regex.Pattern;
/**
* @author wangqiong
* @description excel导入校验
* @date 2023-12-11 11:45
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CaseImportValid {
private CaseApplication caseApplication;
private Map<String, Long> deptMap;
// 手机号正则
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
// 邮箱正则
private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
private static SysUserMapper sysUserMapper= SpringUtil.getBean(SysUserMapper.class);
/**
* 导入校验
*
* @param caseApplication
* @param
*/
public void importValid(CaseApplication caseApplication, Map<String, Long> deptMap) {
StringBuilder failureMsg = new StringBuilder();
caseApplication.setErrorMsg(failureMsg);
// 校验基本字段
validBaseColumn(caseApplication, failureMsg);
// 校验申请人信息
validApplicationColumn(caseApplication, failureMsg);
// 校验申请人代理信息
validApplicationAgentColumn(caseApplication, failureMsg, deptMap);
// 校验被申请人信息
validDebtorApplicationColumn(caseApplication, failureMsg);
// 校验被申请人代理信息
validDebtorApplicationAgentColumn(caseApplication, failureMsg);
}
/**
* 校验被申请人代理信息
*
* @param caseApplication
* @param failureMsg
*/
private void validDebtorApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
if (StrUtil.isEmpty(caseApplication.getDebtorNameAgent())) {
failureMsg.append("【被申请人主体信息-代理人姓名】字段不能为空;");
} else if (caseApplication.getDebtorNameAgent().length() > 50) {
failureMsg.append("【被申请人主体信息-代理人姓名】字段超出指定长度,最大长度为50;");
}
if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNumAgent())) {
failureMsg.append("【被申请人主体信息-代理人身份证号】字段不能为空;");
} else if (!IdcardUtil.isValidCard((caseApplication.getDebtorIdentityNumAgent()))) {
failureMsg.append("【被申请人主体信息-代理人身份证号】不合法;");
}
String debtorContactTelphoneAgent = caseApplication.getDebtorContactTelphoneAgent();
if (StrUtil.isEmpty(debtorContactTelphoneAgent)) {
failureMsg.append("【被申请人主体信息-代理人联系电话】字段不能为空;");
} else if (!TELEPHONE_REGX.matcher(debtorContactTelphoneAgent).matches()) {
failureMsg.append("【被申请人主体信息-代理人联系电话】字段不合法;");
}
if (StrUtil.isEmpty(caseApplication.getDebtorContactAddressAgent())) {
failureMsg.append("【被申请人主体信息-代理人联系地址】字段不能为空;");
} else if (caseApplication.getDebtorContactAddressAgent().length() > 50) {
failureMsg.append("【被申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
}
}
/**
* 校验被申请人信息
*
* @param caseApplication
* @param failureMsg
*/
private void validDebtorApplicationColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
if (StrUtil.isEmpty(caseApplication.getDebtorName())) {
failureMsg.append("【被申请人主体信息-申请人姓名】字段不能为空;");
} else if (caseApplication.getDebtorName().length() > 50) {
failureMsg.append("【被申请人主体信息-申请人姓名】字段超出指定长度,最大长度为50;");
}
if (StrUtil.isEmpty(caseApplication.getDebtorIdentityNum())) {
failureMsg.append("【被申请人主体信息-身份证号】字段不能为空;");
} else if (!IdcardUtil.isValidCard(caseApplication.getDebtorIdentityNum())) {
failureMsg.append("【被申请人主体信息-身份证号】不合法;");
}
String debtorContactTelphone = caseApplication.getDebtorContactTelphone();
if (StrUtil.isEmpty(debtorContactTelphone)) {
failureMsg.append("【被申请人主体信息-联系电话】字段不能为空;");
} else if (!TELEPHONE_REGX.matcher(debtorContactTelphone).matches()) {
failureMsg.append("【被申请人主体信息-联系电话】字段不合法;");
}
if (StrUtil.isEmpty(caseApplication.getDebtorContactAddress())) {
failureMsg.append("【被申请人主体信息-联系地址】字段不能为空;");
} else if (caseApplication.getDebtorContactAddress().length() > 50) {
failureMsg.append("【被申请人主体信息-联系地址】字段超出指定长度,最大长度为50;");
}
String debtorWorkTelphone = caseApplication.getDebtorWorkTelphone();
if (StrUtil.isEmpty(debtorWorkTelphone)) {
failureMsg.append("【被申请人主体信息-单位电话】字段不能为空;");
} else if (!TELEPHONE_REGX.matcher(debtorWorkTelphone).matches()) {
failureMsg.append("【被申请人主体信息-单位电话】字段不合法;");
}
if (StrUtil.isEmpty(caseApplication.getDebtorWorkAddress())) {
failureMsg.append("【被申请人主体信息-单位地址】字段不能为空;");
} else if (caseApplication.getDebtorWorkAddress().length() > 50) {
failureMsg.append("【被申请人主体信息-单位地址】字段超出指定长度,最大长度为50;");
}
if (StrUtil.isEmpty(caseApplication.getResponSex())) {
failureMsg.append("【被申请人主体信息-性别】字段不能为空;");
} else if (caseApplication.getResponSex().length() > 1) {
failureMsg.append("【被申请人主体信息-性别】字段超出指定长度,最大长度为1;");
}
if (caseApplication.getResponBirth() == null) {
failureMsg.append("【被申请人主体信息-出生年月日】字段不合法;");
} else if (caseApplication.getResponBirth().after(new Date())) {
failureMsg.append("【被申请人主体信息-出生年月日】字段不合法,不能超过当前日期;");
}
if (StrUtil.isEmpty(caseApplication.getDebtorEmail())) {
failureMsg.append("【被申请人主体信息-邮箱】字段不能为空;");
} else if (!EMAIL_PATTERN.matcher(caseApplication.getDebtorEmail()).matches()) {
failureMsg.append("【被申请人主体信息-邮箱】字段不合法;");
}
}
/**
* 校验申请人代理信息
*
* @param caseApplication
* @param failureMsg
*/
private void validApplicationAgentColumn(CaseApplication caseApplication, StringBuilder failureMsg, Map<String, Long> deptMap) {
if (StrUtil.isEmpty(caseApplication.getNameAgent())) {
failureMsg.append("【申请人主体信息-代理人姓名】字段不能为空;");
} else if (caseApplication.getNameAgent().length() > 50) {
failureMsg.append("【申请人主体信息-代理人姓名】字段超出指定长度,最大长度为50;");
}
if (StrUtil.isEmpty(caseApplication.getIdentityNumAgent())) {
failureMsg.append("【申请人主体信息-代理人身份证号】字段不能为空;");
} else if (!IdcardUtil.isValidCard(caseApplication.getIdentityNumAgent())) {
failureMsg.append("【申请人主体信息-代理人身份证号】不合法;");
}
validAgentInfo(caseApplication, failureMsg, deptMap);
String contactTelphoneAgent = caseApplication.getContactTelphoneAgent();
if (StrUtil.isEmpty(contactTelphoneAgent)) {
failureMsg.append("【申请人主体信息-代理人联系电话】字段不能为空;");
} else if (!TELEPHONE_REGX.matcher(contactTelphoneAgent).matches()) {
failureMsg.append("【申请人主体信息-代理人联系电话】字段不合法;");
}
if (StrUtil.isEmpty(caseApplication.getContactAddressAgent())) {
failureMsg.append("【申请人主体信息-代理人联系地址】字段不能为空;");
} else if (caseApplication.getContactAddressAgent().length() > 50) {
failureMsg.append("【申请人主体信息-代理人联系地址】字段超出指定长度,最大长度为50;");
}
}
/**
* 校验代理人与组织机构关系
*
* @param caseApplication
* @param failureMsg
* @return
*/
private void validAgentInfo(CaseApplication caseApplication, StringBuilder failureMsg, Map<String, Long> deptMap) {
// 申请机构与代理人都不为空,校验代理人与组织机构关系(代理人必须在该部门下)
if (StrUtil.isNotEmpty(caseApplication.getName()) && StrUtil.isNotEmpty(caseApplication.getNameAgent())) {
String applicationOrganId = "";
// 申请机构已经存在
if (deptMap.containsKey(caseApplication.getName())) {
applicationOrganId = String.valueOf(deptMap.get(caseApplication.getName()));
}
// 根据代理人身份证去用户表查询
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseApplication.getIdentityNumAgent());
// 代理人的部门和申请机构不匹配
if (null != agentUser && null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(applicationOrganId)) {
// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
failureMsg.append("该申请代理人已在【").append(agentUser.getDept().getDeptName()).append("】申请机构下存在,请检查填写信息是否正确");
} else {
failureMsg.append("该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确");
}
}
}
}
/**
* 校验申请人主题信息
*
* @param caseApplication
* @param failureMsg
*/
private void validApplicationColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
if (StrUtil.isEmpty(caseApplication.getName())) {
failureMsg.append("【申请人主体信息-申请人(机构)】字段不能为空;");
} else if (caseApplication.getName().length() > 20) {
failureMsg.append("【申请人主体信息-申请人(机构)】字段超出指定长度,最大长度为20;");
}
if (StrUtil.isNotEmpty(caseApplication.getIdentityNum()) && caseApplication.getIdentityNum().length() > 50) {
failureMsg.append("【申请人主体信息-代码】字段超出指定长度,最大长度为50;");
}
String contactTelphone = caseApplication.getContactTelphone();
if (StrUtil.isEmpty(contactTelphone)) {
failureMsg.append("【申请人主体信息-联系电话】字段不能为空;");
} else if (!TELEPHONE_REGX.matcher(contactTelphone).matches()) {
failureMsg.append("【申请人主体信息-联系电话】字段不合法;");
}
if (StrUtil.isEmpty(caseApplication.getContactAddress())) {
failureMsg.append("【申请人主体信息-联系地址】字段不能为空;");
} else if (caseApplication.getName().length() > 50) {
failureMsg.append("【申请人主体信息-联系地址】字段超出指定长度,最大长度为50;");
}
String workTelphone = caseApplication.getWorkTelphone();
if (StrUtil.isEmpty(workTelphone)) {
failureMsg.append("【申请人主体信息-单位电话】字段不能为空;");
} else if (!TELEPHONE_REGX.matcher(workTelphone).matches()) {
failureMsg.append("【申请人主体信息-单位电话】字段不合法;");
}
if (StrUtil.isEmpty(caseApplication.getWorkAddress())) {
failureMsg.append("【申请人主体信息-单位地址】字段不能为空;");
} else if (caseApplication.getWorkAddress().length() > 50) {
failureMsg.append("【申请人主体信息-单位地址】字段超出指定长度,最大长度为50;");
}
if (StrUtil.isEmpty(caseApplication.getEmail())) {
failureMsg.append("【申请人主体信息-邮箱】字段不能为空;");
} else if (!EMAIL_PATTERN.matcher(caseApplication.getEmail()).matches()) {
failureMsg.append("【申请人主体信息-邮箱】字段不合法;");
}
}
/**
* 校验基本字段
*
* @param caseApplication
* @param failureMsg
*/
private void validBaseColumn(CaseApplication caseApplication, StringBuilder failureMsg) {
if (StrUtil.isEmpty(caseApplication.getCaseName())) {
failureMsg.append("【案件名称】字段不能为空;");
} else if (caseApplication.getCaseName().length() > 50) {
failureMsg.append("【案件名称】字段超出指定长度,最大长度为50;");
}
BigDecimal caseSubjectAmount = caseApplication.getCaseSubjectAmount();
if (null == caseSubjectAmount) {
failureMsg.append("【案件标的】字段不合法;");
} else {
if (caseSubjectAmount.compareTo(new BigDecimal("0")) < 0 || caseSubjectAmount.compareTo(new BigDecimal("99999999.99")) > 0) {
failureMsg.append("【案件标的】字段超出范围,范围为[0,100000000);");
}
if (caseSubjectAmount.scale() > 2) {
failureMsg.append("【案件标的】字段超出指定精度(10^-2);");
}
}
if (caseApplication.getLoanStartDate() == null) {
failureMsg.append("【借款开始日期】字段不合法;");
}
if (caseApplication.getLoanEndDate() == null) {
failureMsg.append("【借款结束日期】字段不合法;");
}
if (caseApplication.getLoanStartDate() != null && caseApplication.getLoanEndDate() != null && caseApplication.getLoanStartDate().after(caseApplication.getLoanEndDate())) {
failureMsg.append("【借款结束日期】不能早于【借款开始日期】;");
}
if (StrUtil.isEmpty(caseApplication.getContractNumber())) {
failureMsg.append("【合同编号】字段不能为空;");
} else if (caseApplication.getContractNumber().length() > 50) {
failureMsg.append("【合同编号】字段超出指定长度,最大长度为50;");
}
BigDecimal claimPrinciOwed = caseApplication.getClaimPrinciOwed();
if (null == claimPrinciOwed) {
failureMsg.append("【申请人主张欠本金】字段不合法;");
} else {
if (claimPrinciOwed.compareTo(new BigDecimal("0")) < 0 || claimPrinciOwed.compareTo(new BigDecimal("99999999.99")) > 0) {
failureMsg.append("【申请人主张欠本金】字段超出范围,范围为[0,100000000);");
}
if (claimPrinciOwed.scale() > 2) {
failureMsg.append("【申请人主张欠本金】字段超出指定精度(10^-2);");
}
}
BigDecimal claimInterestOwed = caseApplication.getClaimInterestOwed();
if (null == claimInterestOwed) {
failureMsg.append("【申请人主张欠利息】字段不合法;");
} else {
if (claimInterestOwed.compareTo(new BigDecimal("0")) < 0 || claimInterestOwed.compareTo(new BigDecimal("99999999.99")) > 0) {
failureMsg.append("【申请人主张欠利息】字段超出范围,范围为[0,100000000);");
}
if (claimInterestOwed.scale() > 2) {
failureMsg.append("【申请人主张欠利息】字段超出指定精度(10^-2);");
}
}
BigDecimal claimLiquidDamag = caseApplication.getClaimLiquidDamag();
if (null == claimLiquidDamag) {
failureMsg.append("【申请人主张违约金】字段不合法;");
} else {
if (claimLiquidDamag.compareTo(new BigDecimal("0")) < 0 || claimLiquidDamag.compareTo(new BigDecimal("99999999.99")) > 0) {
failureMsg.append("【申请人主张违约金】字段超出范围,范围为[0,100000000);");
}
if (claimLiquidDamag.scale() > 2) {
failureMsg.append("【申请人主张违约金】字段超出指定精度(10^-2);");
}
}
if (StrUtil.isEmpty(caseApplication.getArbitratClaims())) {
failureMsg.append("【申请人仲裁请求及事实和理由】字段不能为空;");
} else if (caseApplication.getArbitratClaims().length() > 10000) {
failureMsg.append("【申请人仲裁请求及事实和理由】字段超出指定长度,最大长度为10000;");
}
if (StrUtil.isNotEmpty(caseApplication.getArbitratClaims()) && caseApplication.getArbitratClaims().length() > 10000) {
failureMsg.append("【申请人请求仲裁庭裁决】字段超出指定长度,最大长度为10000;");
}
}
}
@@ -1,491 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.ElegentPay;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.ServiceException;
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.vo.CasePayListVO;
import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.dto.PayRequest;
import com.ruoyi.dto.PayResponse;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@Service
public class CasePaymentServiceImpl implements ICasePaymentService {
private final ElegentPay elegentPay;
private final CaseApplicationMapper caseApplicationMapper;
private final CasePaymentRecordMapper casePaymentRecordMapper;
private final CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private SmsRecordMapper smsRecordMapper;
@Autowired
public CasePaymentServiceImpl(ElegentPay elegentPay
, CaseApplicationMapper caseApplicationMapper
, CasePaymentRecordMapper casePaymentRecordMapper
, CaseAffiliateMapper caseAffiliateMapper
) {
this.elegentPay = elegentPay;
this.caseApplicationMapper = caseApplicationMapper;
this.casePaymentRecordMapper = casePaymentRecordMapper;
this.caseAffiliateMapper = caseAffiliateMapper;
}
@Autowired
private ICaseApplicationService caseApplicationService;
@Override
@Transactional
public AjaxResult casePay(CasePayDTO casePayDTO) {
PayRequest payRequest = new PayRequest();
payRequest.setBody("案件缴费");
payRequest.setOrderSn(System.currentTimeMillis() + "");
payRequest.setTotalFee(casePayDTO.getTotalFee());
PayResponse response = elegentPay.requestPay(payRequest, casePayDTO.getTradeType(), casePayDTO.getPlatform());
if (response.getCode_url() == null) {
return AjaxResult.error();
}
List<Long> caseIds = casePayDTO.getCaseIds();
if (CollectionUtil.isEmpty(caseIds)) {
return AjaxResult.error("请检查参数是否有误");
}
for (Long caseId : caseIds) {
//缴费记录表里新增数据
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
casePaymentRecord.setCaseId(caseId);
casePaymentRecord.setOrderNumber(payRequest.getOrderSn());
casePaymentRecord.setPaymentStatus(0);
casePaymentRecord.setCreateTime(new Date());
int count = casePaymentRecordMapper.saveRecord(casePaymentRecord);
if (count < 1) {
return AjaxResult.error("请检查参数是否有误");
}
}
return AjaxResult.success(response);
}
@Transactional
public AjaxResult callback(String orderNumber) {
//查询记录
List<CasePaymentRecord> casePaymentRecords = casePaymentRecordMapper.queryRecord(orderNumber);
if(casePaymentRecords!=null&&casePaymentRecords.size()>0){
for (CasePaymentRecord casePaymentRecord:casePaymentRecords){
Long caseId = casePaymentRecord.getCaseId();
//更改记录表里的支付状态和支付时间
casePaymentRecord.setPaymentStatus(1);
casePaymentRecord.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord);
}
}else {
return AjaxResult.error("未查询到相关记录");
}
return AjaxResult.success("支付成功");
}
@Override
@Transactional
public AjaxResult confirmPayment( List<Long> ids) {
for (Long id : ids) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(id);
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 { //被申请人
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.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
}
}
return AjaxResult.success();
}
@Transactional
@Override
public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
List<Long> caseIds = payDTO.getCaseIds();
if (caseIds == null || caseIds.size() == 0) {
return AjaxResult.error("案件id参数有误");
}
if (payDTO.getPayType() != null) {
// 修改支付方式
caseApplicationMapper.updatePayType(payDTO);
}
for (Long caseId : caseIds) {
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
caseAttach.setCaseAppliId(caseId);
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 修改节点状态
//根据案件id查询案件信息
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
//修改案件状态
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
// 修改支付状态
CasePaymentRecord paymentRecord = new CasePaymentRecord();
paymentRecord.setPayType(payDTO.getPayType());
paymentRecord.setCaseId(caseId);
paymentRecord.setPaymentStatus(1);
casePaymentRecordMapper.saveRecord(paymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
}
}
return AjaxResult.success("确认缴费成功");
}
@Override
public AjaxResult casePayList(CasePayDTO casePayDTO) {
//参数校验
List<Long> caseIds = casePayDTO.getCaseIds();
if (caseIds == null || caseIds.size() == 0) {
return null;
}
BigDecimal totalCost = new BigDecimal(0);
BigDecimal sum = totalCost;
CasePayListVO listVO = new CasePayListVO();
listVO.setCaseTotal(caseIds.size());
List<CaseApplicationPay> caseApplicationList = new ArrayList<>();
for (Long caseId : caseIds) {
CaseApplication caseApplication = new CaseApplication();
CaseApplicationPay caseApplicationPay = new CaseApplicationPay();
caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
BigDecimal feePayable = caseApplication1.getFeePayable();
sum = sum.add(feePayable);
listVO.setTotalFee(sum);
caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName());
caseApplicationPay.setCaseResName(caseApplication1.getRespondentName());
caseApplicationPay.setCaseNum(caseApplication1.getCaseNum());
caseApplicationPay.setCaseStatus(caseApplication1.getCaseStatus());
caseApplicationPay.setCaseSubjectAmount(caseApplication1.getCaseSubjectAmount());
caseApplicationPay.setFeePayable(caseApplication1.getFeePayable());
caseApplicationList.add(caseApplicationPay);
listVO.setCaseApplicationList(caseApplicationList);
}
if (sum.compareTo(BigDecimal.ZERO) == 0) {
return AjaxResult.error("没有可支付的费用");
}
return AjaxResult.success(listVO);
}
@Override
@Transactional
public AjaxResult confirmPayBatch(CasePayDTO payDTO) {
String batchNumber = payDTO.getBatchNumber();
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
if(caseApplications!=null&&caseApplications.size()>0){
if (payDTO.getPayType() != null) {
payDTO.setCaseIds(caseIds);
// 修改支付方式
CaseConfirmPayDTO caseConfirmPayDTO = new CaseConfirmPayDTO();
BeanUtils.copyProperties(payDTO, caseConfirmPayDTO);
caseApplicationMapper.updatePayType(caseConfirmPayDTO);
}
for (Long caseId : caseIds) {
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
caseAttach.setCaseAppliId(caseId);
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 修改节点状态
//根据案件id查询案件信息
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
//修改案件状态
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
// 修改支付状态
CasePaymentRecord paymentRecord = new CasePaymentRecord();
paymentRecord.setPayType(payDTO.getPayType());
paymentRecord.setCaseId(caseId);
paymentRecord.setPaymentStatus(1);
casePaymentRecordMapper.saveRecord(paymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
}
}
}else{
throw new ServiceException("这个批号没有批量缴费的案件");
}
return AjaxResult.success("确认缴费成功");
}
@Override
public AjaxResult casePayListBatch(CasePayDTO casePayDTO) {
String batchNumber = casePayDTO.getBatchNumber();
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
// caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
CasePayListVO listVO = new CasePayListVO();
BigDecimal sum = new BigDecimal(0);
if(caseApplications!=null&&caseApplications.size()>0){
for(CaseApplication caseApplication:caseApplications){
BigDecimal feePayable = caseApplication.getFeePayable();
sum = sum.add(feePayable);
}
listVO.setTotalFee(sum);
}
if (sum.compareTo(BigDecimal.ZERO) == 0) {
return AjaxResult.error("没有可支付的费用");
}
return AjaxResult.success(listVO);
}
@Override
@Transactional
public AjaxResult confirmPaymentBatch(String batchNumber) {
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if (caseApplications != null && caseApplications.size() > 0) {
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
for (Long caseId : caseIds) {
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 { //被申请人
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(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
}
}
}else{
throw new ServiceException("这个批号没有批量缴费确认的案件");
}
return AjaxResult.success();
}
@Override
@Transactional
public AjaxResult casePayBatch(CasePayDTO casePayDTO) {
PayRequest payRequest = new PayRequest();
payRequest.setBody("案件缴费");
payRequest.setOrderSn(System.currentTimeMillis() + "");
payRequest.setTotalFee(casePayDTO.getTotalFee());
PayResponse response = elegentPay.requestPay(payRequest, casePayDTO.getTradeType(), casePayDTO.getPlatform());
if (response.getCode_url() == null) {
return AjaxResult.error();
}
String batchNumber = casePayDTO.getBatchNumber();
if(StringUtils.isEmpty(batchNumber) ){
return AjaxResult.error("请检查参数是否有误");
}
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if(caseApplications!=null&&caseApplications.size()>0){
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
for (Long caseId : caseIds) {
//缴费记录表里新增数据
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
casePaymentRecord.setCaseId(caseId);
casePaymentRecord.setOrderNumber(payRequest.getOrderSn());
casePaymentRecord.setPaymentStatus(0);
casePaymentRecord.setCreateTime(new Date());
int count = casePaymentRecordMapper.saveRecord(casePaymentRecord);
if (count < 1) {
return AjaxResult.error();
}
}
}
return AjaxResult.success(response);
}
}
@@ -1,485 +0,0 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.PdfUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
import com.ruoyi.wisdomarbitrate.mapper.WeChatUserMapper;
import com.ruoyi.wisdomarbitrate.service.VideoService;
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
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.trtc.v20190722.TrtcClient;
import com.tencentcloudapi.trtc.v20190722.models.*;
import com.tencentcloudapi.vod.v20180717.VodClient;
import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosRequest;
import com.tencentcloudapi.vod.v20180717.models.DescribeMediaInfosResponse;
import com.tencentyun.TLSSigAPIv2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ResourceUtils;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import static com.ruoyi.common.core.domain.AjaxResult.success;
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
/**
* @author wangqiong
* @description 视频录制
* @date 2023-10-26 11:45
*/
@Service
@Slf4j
public class VideoServiceImpl implements VideoService {
// 腾讯云即时通信sdkAppId
@Value("${imConfig.sdkAppId}")
private long sdkAppId;
// 腾讯云即时通信密钥
@Value("${imConfig.sdkSecretKey}")
private String sdkSecretKey;
// 腾讯云个人账户secretId
@Value("${imConfig.secretId}")
private String secretId;
// 腾讯云个人账户密钥
@Value("${imConfig.secretKey}")
private String secretKey;
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private SysRoleMapper roleMapper;
/**
* 功能:第三方回调sign校验
* 参数:
* key:控制台配置的密钥key
* body:腾讯云回调返回的body体
* sign:腾讯云回调返回的签名值sign
* 返回值:
* Status:OK 表示校验通过,FAIL 表示校验失败,具体原因参考Info
* Info:成功/失败信息
* @param body
* @param request
* @throws Exception
*/
@Override
public void videoRollBack(String body, HttpServletRequest request) {
String key = "key";
String sdkAppId = request.getHeader("SdkAppId");
String sign = request.getHeader("Sign");
// String resultSign = getResultSign(key,body);
// log.info("resultSign:"+resultSign);
// if (resultSign.equals(sign)) {
JSONObject jsonObject = (JSONObject) JSON.parse(body);
Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
String roomId = jsonObject1.getString("RoomId");
String taskId = jsonObject1.getString("TaskId"); // 任务ID
String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
JSONObject jsonObject3 = (JSONObject) JSON.parse(tencentVod);
// 录制视频上传成功
if (eventType == 311) {
// 点播平台的唯一 ID
String fileId = jsonObject3.getString("FileId");
// 点播平台的播放地址
String videoUrl = jsonObject3.getString("VideoUrl");
// 主辅流标识,main 代表主流(摄像头),aux 代表辅流(屏幕分享),mix 代表混流录制
String mediaId = jsonObject3.getString("MediaId");
// 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
try {
downloadImage(fileId,videoUrl,roomId);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
@Override
public AjaxResult bindCaseId(Long caseId, String roomId) {
caseApplicationMapper .bindCaseId(caseId,roomId);
return success();
}
@Override
public AjaxResult videoList(Long caseId) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
caseApplication.setAnnexType(9);
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
if(CollectionUtil.isEmpty(caseAttachList)){
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);
}
}
return success(caseAttachList);
}
/**
* 开启腾讯云录制
* @param roomId
* @return
*/
@Override
public AjaxResult openCloudRecording(long caseId,long roomId) {
try {
String userId="recorder_"+roomId;
Credential cred = new Credential(secretId, secretKey);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
CreateCloudRecordingRequest req = new CreateCloudRecordingRequest();
req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同
req.setRoomId(String.valueOf(roomId)); // RoomId – TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId
req.setRoomIdType(1L);
/**
* 录制机器人用于进入TRTC房间拉流的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),
* 注意这个UserId不能与其他TRTC房间内的主播或者其他录制任务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分,
* 即录制机器人进入房间的userid应保证独立且唯一
*/
req.setUserId(userId);
TLSSigAPIv2 api = new TLSSigAPIv2(sdkAppId, sdkSecretKey);
String userSign = api.genUserSig(userId, 60 * 60 * 10);
req.setUserSig(userSign); // 录制机器人用于进入TRTC房间拉流的用户签名,当前 UserId 对应的验证签名,相当于登录密码
RecordParams recordParams = new RecordParams();
// 混流录制
recordParams.setMaxIdleTime(60L*5); // 5分钟内房间里面没有主播,自动停止录制
recordParams.setStreamType(0L); // 0:录制音频+视频流(默认); 1:仅录制音频流; 2:仅录制视频流
recordParams.setRecordMode(2L); // 1:单流录制,分别录制房间的订阅UserId的音频和视频,将录制文件上传至云存储; 2:混流录制,将房间内订阅UserId的音视频混录成一个音视频文件,将录制文件上传至云存储;
recordParams.setOutputFormat(0L); // 0:(默认)输出文件为hls格式。1:输出文件格式为hls+mp4。2:输出文件格式为hls+aac
MixLayoutParams mixLayoutParams = new MixLayoutParams();
// 布局模式: 1:悬浮布局;2:屏幕分享布局;3:九宫格布局(默认);4:自定义布局;
mixLayoutParams.setMixLayoutMode(3L);
req.setMixLayoutParams(mixLayoutParams);
StorageParams storageParams1 = new StorageParams();
CloudVod cloudVod = new CloudVod();
TencentVod tencentVod = new TencentVod();
tencentVod.setSubAppId(1304001529L);
// 录制的文件永久保存
tencentVod.setExpireTime(0L);
// 录制文件名拼接前缀
tencentVod.setUserDefineRecordId(caseId+"");
cloudVod.setTencentVod(tencentVod); // 腾讯云点播相关参数。
storageParams1.setCloudVod(cloudVod); // 必填】腾讯云云点播的账号信息,目前仅支持存储至腾讯云点播VOD。
req.setRecordParams(recordParams); // 云端录制控制参数
req.setStorageParams(storageParams1); // 云端录制文件上传到云存储的参数(目前只支持使用腾讯云点播作为存储)
// 返回的resp是一个CreateCloudRecordingResponse的实例,与请求对象对应
CreateCloudRecordingResponse resp = client.CreateCloudRecording(req);
return success((JSONObject) JSON.toJSON(resp));
} catch (TencentCloudSDKException e) {
return AjaxResult.error(e.toString());
}
}
@Override
public AjaxResult closeDeleteCloudRecording(String taskId) {
try {
if (taskId != null) {
taskId = taskId.replaceAll(" ", "+");
}
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
// 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
// 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
Credential cred = new Credential(secretId, secretKey);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
DeleteCloudRecordingRequest req = new DeleteCloudRecordingRequest();
req.setSdkAppId(sdkAppId); // SdkAppId – TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同
req.setTaskId(taskId); // TaskId – 录制任务的唯一Id,在启动录制成功后会返回
// 返回的resp是一个DeleteCloudRecordingResponse的实例,与请求对象对应
DeleteCloudRecordingResponse resp = client.DeleteCloudRecording(req);
// 输出json格式的字符串回包
return success((JSONObject) JSON.toJSON(resp));
} catch (TencentCloudSDKException e) {
return AjaxResult.error(e.toString());
}
}
@Override
public AjaxResult dissolveRoom( Long roomId) {
Credential cred = new Credential(secretId, secretKey);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("trtc.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
TrtcClient client = new TrtcClient(cred, "ap-beijing", clientProfile);
DismissRoomRequest req = new DismissRoomRequest();
req.setSdkAppId(sdkAppId);
req.setRoomId(roomId);
try {
DismissRoomResponse resp = client.DismissRoom(req);
return success((JSONObject) JSON.toJSON(resp));
} catch (TencentCloudSDKException e) {
return AjaxResult.error("解散房间失败");
}
}
@Override
public AjaxResult secretaryRoleByUserId(Long userId) {
List<SysRole> roles = roleMapper.selectRolePermissionByUserId(userId);
JSONObject jsonObject = new JSONObject();
boolean isSecretaryRole=false;
if(CollectionUtil.isNotEmpty(roles)){
for (SysRole role : roles) {
if("法律顾问".equals(role.getRoleName()) || "秘书".equals(role.getRoleName())){
isSecretaryRole=true;
break;
}
}
}
jsonObject.put("isSecretaryRole",isSecretaryRole);
return success(jsonObject);
}
/**
* 根据html字符串转pdf并和案件关联
* @param reservedConferenceVO
* @return
*/
@Override
public AjaxResult htmlToPDF(ReservedConferenceVO reservedConferenceVO) {
String currentFileName = System.currentTimeMillis() + ".pdf";
String fileName = null;
try {
fileName = getPathFileName(RuoYiConfig.getHtml2PDFPath(), currentFileName);
} catch (IOException e) {
throw new RuntimeException(e);
}
String htmlContent = "<html><head> <title>庭审笔录</title></head><body style=\"font-size:12.0pt; font-family:SimSun;\"><h1 align=\"center\">庭审笔录</h1>" +reservedConferenceVO.getHtmlContent()+"</body></html>";
// html转pdf并上传到服务器
boolean convertFlag = PdfUtils.htmlStringConvertToPDF(RuoYiConfig.getHtml2PDFPath() +"/"+ currentFileName, htmlContent);
// 绑定案件
if(convertFlag){
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
.annexName(fileName)
.annexPath(RuoYiConfig.getHtml2PDFPath())
.annexType(7)
.build();
caseAttachMapper.save(caseAttach);
return AjaxResult.success();
}else {
return AjaxResult.error("pdf转换失败");
}
}
@Override
public AjaxResult attachListByCaseId(Long caseAppliId, Integer annexType) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseAppliId);
caseApplication.setAnnexType(annexType);
List<CaseAttach> caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
if(CollectionUtil.isEmpty(caseAttachList)){
return success(caseAttachList);
}
// 附件转换
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);
}
}
}
return success(caseAttachList);
}
/**
* 查询出音视频集合,并下载,在将云点播上面的音视频删除
* @param fileIds 点播平台唯一ID集合
* @throws Exception
*/
private void downloadVideo(String [] fileIds) throws Exception {
try{
//创建文件对象
Properties properties = new Properties();
//加载文件获取数据 文件带后缀
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream
("application.properties"));
//根据key来获取value
String secretId = properties.getProperty("secretid");
String secretKey = properties.getProperty("secretkey");
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
// 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
// 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
Credential cred = new Credential(secretId, secretKey);
// 实例化一个http选项,可选的,没有特殊需求可以跳过
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("vod.tencentcloudapi.com");
// 实例化一个client选项,可选的,没有特殊需求可以跳过
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
// 实例化要请求产品的client对象,clientProfile是可选的
VodClient client = new VodClient(cred, "ap-beijing", clientProfile);
// 实例化一个请求对象,每个接口都会对应一个request对象
DescribeMediaInfosRequest req = new DescribeMediaInfosRequest();
req.setFileIds(fileIds);
String[] basicInfos = {"basicInfo"};
req.setFilters(basicInfos);
// 返回的resp是一个DescribeMediaInfosResponse的实例,与请求对象对应
DescribeMediaInfosResponse resp = client.DescribeMediaInfos(req);
// 输出json格式的字符串回包
log.info(DescribeMediaInfosResponse.toJsonString(resp));
String json = DescribeMediaInfosResponse.toJsonString(resp);
JSONObject jsonObject = (JSONObject) JSON.parse(json);
JSONArray jsonArray = jsonObject.getJSONArray("MediaInfoSet"); // 媒体文件信息列表。
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject1 = jsonArray.getJSONObject(i);
String fileId = jsonObject1.getString("FileId"); // 点播平台的唯一 ID
String basicInfo = jsonObject1.getString("BasicInfo"); // 基础信息
JSONObject jsonObject2 = (JSONObject) JSON.parse(basicInfo);
String mediaUrl = jsonObject2.getString("MediaUrl"); // 文件地址
String downPath = downloadImage(null,null,mediaUrl); // 下载音视频(返回本地下载地址)
// 将未下载的音视频列表查询出来,进行下载到服务器上面,并更新数据库数据
log.info(downPath); // 本地地址
}
log.info("下载音视频成功");
} catch (TencentCloudSDKException e) {
log.info(e.toString());
} catch (IOException e) {
e.printStackTrace();
}
log.info("腾讯云测试成功");
}
/**
* 将视频下载到本地
* @param fileUrl 视频路径
* @return
*/
@Transactional
public String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
String staticAndMksDir = null;
if (fileUrl != null) {
//下载时文件名称
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
fileName = fileName.replace("/", "");
fileName=fileId+fileName;
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
staticAndMksDir = Paths.get(absPath).toFile().toString();
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
if(downloadFile>0) {
Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
// 存入数据库
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
.annexName(annexName)
.annexPath(RuoYiConfig.getVideoUploadPath())
.annexType(9)
.build();
caseAttachMapper.save(caseAttach);
return annexName;
}
}
return "";
}
/**
* @param key 回调秘钥
* @param body 入参
* @return 签名 Sign 计算公式中 key 为计算签名 Sign 用的加密密钥。
* @throws Exception
*/
private static String getResultSign(String key, String body) throws Exception {
Mac hmacSha256 = Mac.getInstance("HmacSHA256");
SecretKeySpec secret_key = new SecretKeySpec(key.getBytes(), "HmacSHA256");
hmacSha256.init(secret_key);
return Base64.getEncoder().encodeToString(hmacSha256.doFinal(body.getBytes()));
}
}
@@ -1,72 +0,0 @@
package com.ruoyi.wisdomarbitrate.task;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.FatchRule;
import com.ruoyi.wisdomarbitrate.service.impl.CaseZipImportImpl;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
/**
* @description rbd调用xfta计算任务类
* @Author mingYang
* @Date 2021/11/12 15:35
* @Version V1.0
**/
public class CaseZipImportTask implements Callable<List<CaseApplication>> {
private CaseZipImportImpl caseZipImportImpl;
private Long templateId;
private List<FatchRule> fatchRuleList;
private Map<String, String> fatchMap;
private Map<String, List<FatchRule>> fatchRuleMap;
private Map<String, SysUser> userMap;
private List<SysDictData> dictDataList;
private File[] files;
private Map<String, Long> deptMap;
private LoginUser loginUser;
private Integer maxBatchNumber;
public CaseZipImportTask(CaseZipImportImpl caseZipImportImpl, Long templateId, List<FatchRule> fatchRuleList, Map<String, String> fatchMap, Map<String, List<FatchRule>> fatchRuleMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, File[] files, Map<String, Long> deptMap, LoginUser loginUser,Integer maxBatchNumber) {
this.caseZipImportImpl = caseZipImportImpl;
this.templateId = templateId;
this.fatchRuleList = fatchRuleList;
this.fatchMap = fatchMap;
this.fatchRuleMap = fatchRuleMap;
this.userMap = userMap;
this.dictDataList = dictDataList;
this.files = files;
this.deptMap = deptMap;
this.loginUser = loginUser;
this.maxBatchNumber = maxBatchNumber;
}
@Override
public List<CaseApplication> call() {
List<CaseApplication> caseApplications = new ArrayList<>();
try {
for (File file1 : files) {
if (file1.isDirectory() && file1.listFiles() != null) {
for (File file2 : file1.listFiles()) {
CaseApplication caseApplication = caseZipImportImpl.buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, fatchMap, userMap, dictDataList, deptMap, loginUser,maxBatchNumber);
if (caseApplication != null) {
caseApplications.add(caseApplication);
}
}
}
}
} catch (Exception e) {
throw new RuntimeException("导入失败");
}
return caseApplications;
}
}
@@ -1,362 +0,0 @@
package com.ruoyi.wisdomarbitrate.utils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.constant.FileTransformation;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.utils.SealUtil;
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.io.IOException;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@Component
public class FixSelectFlowDetailUtils {
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired
private SealSignRecordMapper sealSignRecordMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private DeptIdentifyMapper deptIdentifyMapper;
@Autowired
private SealManageMapper sealManageMapper;
/*
定时查询签署流程详情
*/
@Scheduled(cron = "0/10 * * * * ?")
@Transactional
public void fixExecuteSelectFlowDetailUtils() {
Gson gson = new Gson();
SealSignRecord sealSignRecordselect = new SealSignRecord();
// sealSignRecordselect.setSignFlowStatus(1);
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
try {
if (sealSignRecords != null && sealSignRecords.size() > 0) {
for (int i = 0; i < sealSignRecords.size(); i++) {
SealSignRecord sealSignRecord = sealSignRecords.get(i);
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(), JsonObject.class);
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
Integer psnsignStatus = null;
Integer orgsignStatus = null;
for (int j = 0; j < signersArray.size(); j++) {
JsonObject signerObject = (JsonObject) signersArray.get(j);
if (!(signerObject.get("psnSigner").toString()).equals("null")) {
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
if (psnSignerData != null) {
psnsignStatus = signerObject.get("signStatus").getAsInt();
}
}
if (!(signerObject.get("orgSigner").toString()).equals("null")) {
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
if (orgSignerData != null) {
orgsignStatus = signerObject.get("signStatus").getAsInt();
}
}
}
if ((psnsignStatus.intValue() == 2) && (orgsignStatus.intValue() == 1)) {
//更新立案申请状态为待用印
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(sealSignRecord.getCaseAppliId());
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplicationselect != null) {
if ((caseApplicationselect.getCaseStatus() != null) && (caseApplicationselect.getCaseStatus().intValue() == CaseApplicationConstants.SIGN_ARBITRATION)) {
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication);
//修改"签署用印记录表"的状态为待用印
sealSignRecord.setSignFlowStatus(2);
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
}
}
}
if ((psnsignStatus.intValue() == 2) && (orgsignStatus.intValue() == 2)) {
//更新立案申请状态为待送达
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(sealSignRecord.getCaseAppliId());
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplicationselect != null) {
if ((caseApplicationselect.getCaseStatus() != null) && (caseApplicationselect.getCaseStatus().intValue() == CaseApplicationConstants.ARBITRATED_SEAL)) {
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
//下载审核完成的裁决书,
String signFlowId = sealSignRecord.getSignFlowid();
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
if (filesArray != null && filesArray.size() > 0) {
JsonObject fileObject = (JsonObject) filesArray.get(0);
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
//修改"签署用印记录表"的状态为签署完成
sealSignRecord.setSignFlowStatus(3);
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1));
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
String filearbitraUrl = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
caseApplication.setFilearbitraUrl(filearbitraUrl);
caseApplicationMapper.submitCaseApplication(caseApplication);
LocalDate now = LocalDate.now();
String year = Integer.toString(now.getYear());
String month = String.format("%02d", now.getMonthValue());
String day = String.format("%02d", now.getDayOfMonth());
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
String savePath = "/home/ruoyi/uploadPath/upload/";
// 创建日期目录
File saveFolder = new File(saveFolderPath);
if (!saveFolder.exists()) {
saveFolder.mkdirs();
}
String resultFilePath = saveFolderPath + "/" + fileName;
File resultFilePathFile = new File(resultFilePath);
if (!resultFilePathFile.exists()) {
resultFilePathFile.createNewFile();
}
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
if (downLoadFile) {
Long caseAppliId = sealSignRecord.getCaseAppliId();
CaseAttach caseAttach = new CaseAttach();
caseAttach.setCaseAppliId(caseAppliId);
caseAttach.setAnnexType(3);
caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName);
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
}
}
}
}
}
}
}
} catch (EsignDemoException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 定时查询企业认证状态
*
* @throws Exception
*/
@Scheduled(cron = "*/30 * * * * *")
@Transactional
public void fixExecuteSelectDeptIndentifyUtils() throws Exception {
Gson gson = new Gson();
DeptIdentify deptIdentify = new DeptIdentify();
List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
for (int i = 0; i < deptIdentifysnew.size(); i++) {
DeptIdentify deptIdentify1 = deptIdentifysnew.get(i);
Integer identifyStatus = deptIdentify1.getIdentifyStatus();
if (identifyStatus!=1){
String authFlowId = deptIdentify1.getAuthFlowId();
if (authFlowId != null) {
EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentify1);
JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
int code = identifyInfoJsonObject.get("code").getAsInt();
if (code == 0) {
JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
if (realnameStatus == 1) {
String orgId = identifyInfoData.get("orgId").getAsString();
//查询企业内部印章
EsignHttpResponse response = SignAward.deptIdentifySealList(orgId);
JsonObject jsonObject = gson.fromJson(response.getBody(), JsonObject.class);
int code1 = jsonObject.get("code").getAsInt();
if (code1 == 0) {
JsonObject data = jsonObject.getAsJsonObject("data");
JsonArray seals = data.get("seals").getAsJsonArray();
if (seals.size() > 0) {
for (int j = 0; j < seals.size(); j++) {
//保存印章信息到数据库
JsonObject asJsonObject = seals.get(j).getAsJsonObject();
SealManage sealManage = new SealManage();
String sealName = asJsonObject.get("sealName").toString();
String sealId = asJsonObject.get("sealId").toString();
String url = asJsonObject.get("sealImageDownloadUrl").toString();
LocalDate now = LocalDate.now();
String year = Integer.toString(now.getYear());
String month = String.format("%02d", now.getMonthValue());
String day = String.format("%02d", now.getDayOfMonth());
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
String savePath = "/home/ruoyi/uploadPath/upload/";
// 创建日期目录
File saveFolder = new File(saveFolderPath);
if (!saveFolder.exists()) {
saveFolder.mkdirs();
}
String resultFilePath = saveFolderPath + "/" + fileName;
File resultFilePathFile = new File(resultFilePath);
if (!resultFilePathFile.exists()) {
resultFilePathFile.createNewFile();
}
String fileDownloadUrlnew = url.substring(1, url.length() - 1);
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
if (downLoadFile) {
CaseAttach caseAttach = new CaseAttach();
caseAttach.setAnnexType(10); //10代表印章图片
caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName);
int i1 = caseAttachMapper.save(caseAttach);
if (i1 > 0) {
//将印章信息保存到公章管理表里
String sealName1 = sealName.substring(1, sealName.length() - 1);
String sealId1 = sealId.substring(1, sealId.length() - 1);
Integer annexId1 = caseAttach.getAnnexId();
sealManage.setAnnexId(annexId1);
sealManage.setSealId(sealId1);
sealManage.setSealName(sealName1);
sealManage.setIdentifyId(deptIdentify1.getId());
sealManage.setSealStatus(1);
sealManage.setIsUse(1);
sealManageMapper.insertSealManage(sealManage);
}
}
}
}
}
//将orgId保存到数据库里
deptIdentify1.setOrgId(orgId);
deptIdentify1.setIdentifyStatus(1);
deptIdentify1.setIsUse(0); //默认机构为未启用
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
}
}else {
deptIdentify1.setIdentifyStatus(2);
deptIdentifyMapper.updateDeptIdentify(deptIdentify1);
}
}
}
}
}
}
/**
* 定时查询印章审核状态
*/
@Scheduled(cron = "0/30 * * * * ?")
@Transactional
public void searchForInstitutionalSeal() {
try {
SealManage sealManage = new SealManage();
sealManage.setSealStatus(0);
List<SealManage> sealManageList = sealManageMapper.selectSealList(sealManage);
if (sealManageList != null && sealManageList.size() > 0) {
for (SealManage sealManage1 : sealManageList) {
//查询企业内部印章
Integer annexId = sealManage1.getAnnexId();
String sealId = sealManage1.getSealId();
DeptIdentify deptIdentify = new DeptIdentify();
deptIdentify.setId(sealManage1.getIdentifyId());
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
if (deptIdentifies != null && deptIdentifies.size() > 0) {
DeptIdentify deptIdentify1 = deptIdentifies.get(0);
String orgId = deptIdentify1.getOrgId();
if (orgId == null) {
continue;
}
if (annexId == null) {
//说明之前没有下载过
EsignHttpResponse response = SignAward.getOrgSeal(orgId, sealId);
JSONObject jsonObject = JSONObject.parseObject(response.getBody());
int code = jsonObject.getIntValue("code");
if (code == 0) {
JSONObject data = jsonObject.getJSONObject("data");
int sealStatus = data.getIntValue("sealStatus");
if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
//已启用证明审核通过,下载到数据库
String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
LocalDate now = LocalDate.now();
String year = Integer.toString(now.getYear());
String month = String.format("%02d", now.getMonthValue());
String day = String.format("%02d", now.getDayOfMonth());
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
String savePath = "/home/ruoyi/uploadPath/upload/";
// 创建日期目录
File saveFolder = new File(saveFolderPath);
if (!saveFolder.exists()) {
saveFolder.mkdirs();
}
String resultFilePath = saveFolderPath + "/" + fileName;
File resultFilePathFile = new File(resultFilePath);
if (!resultFilePathFile.exists()) {
resultFilePathFile.createNewFile();
}
boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
if (downLoadFile) {
CaseAttach caseAttach = new CaseAttach();
caseAttach.setAnnexType(10); //10代表印章图片
caseAttach.setAnnexPath(savePath);
caseAttach.setAnnexName(saveName);
int i1 = caseAttachMapper.save(caseAttach);
if (i1 > 0) {
//将附件id保存到公章管理表里
Integer annexId1 = caseAttach.getAnnexId();
sealManage1.setAnnexId(annexId1);
sealManage1.setSealStatus(1);
sealManage1.setIsUse(0);
sealManageMapper.updateSealManage(sealManage1);
}
}
}
}
}
}
}
}
} catch (EsignDemoException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
@@ -17,14 +17,4 @@ public class ImageToBase64Converter {
String base64Image = Base64.getEncoder().encodeToString(imageBytes);
return base64Image;
}
public static void main(String[] args) {
String imagePath = "D:\\develop\\2.jpg";
try {
String base64Image = imageToBase64(imagePath);
System.out.println(base64Image);
} catch (Exception e) {
e.printStackTrace();
}
}
}
@@ -1,27 +1,20 @@
package com.ruoyi.wisdomarbitrate.utils;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
import com.ruoyi.common.enums.EsignRequestType;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.EsignApplicaConfig;
import com.ruoyi.common.utils.EsignHttpHelper;
import com.ruoyi.common.utils.SealUtil;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.vo.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import java.io.File;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
public class SignAward {
@@ -16,12 +16,6 @@ import java.util.zip.ZipFile;
@Slf4j
public class UnZipFileUtils {
public static void main(String[] args) {
File file = new File("D:\\home\\ruoyi\\仲裁委项目-测试单.zip");
String targetPath = "D:\\home\\unzip\\";
unZipFile(file,targetPath);
}
public static boolean unZipFile(File aboriginalFile, String targetPath) {
if (!aboriginalFile.exists()) {
log.error("此文件不存在:", aboriginalFile.getPath());
@@ -10,27 +10,6 @@ import java.util.zip.ZipOutputStream;
public class ZipFileUtils {
public static void main(String[] args) {
String file1 = "F:\\testZip\\123.pdf";
String file2 = "F:\\testZip\\456.png";
String zipFileOutPath = "F:\\testZip\\outputfile123.zip";
try {
FileOutputStream zfous = new FileOutputStream(zipFileOutPath);
ZipOutputStream zipFileOutstream = new ZipOutputStream(zfous);
FileInputStream fis1 = new FileInputStream(file1);
FileInputStream fis2 = new FileInputStream(file2);
zipFile(file1, fis1, zipFileOutstream);
zipFile(file2, fis2, zipFileOutstream);
zipFileOutstream.close();
zfous.close();
System.out.println("文件成功打包成ZIP文件!");
} catch (IOException e) {
e.printStackTrace();
}
}
public static void zipFile(String zipfilePath, FileInputStream zipFileinsteam, ZipOutputStream zipfileOut)
throws IOException {
ZipEntry zipfileEntry = new ZipEntry(new File(zipfilePath).getName());
@@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectConfigVo">
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
from sys_config
from ms_sys_config
</sql>
<!-- 查询条件 -->
@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertConfig" parameterType="SysConfig">
insert into sys_config (
insert into ms_sys_config (
<if test="configName != null and configName != '' ">config_name,</if>
<if test="configKey != null and configKey != '' ">config_key,</if>
<if test="configValue != null and configValue != '' ">config_value,</if>
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateConfig" parameterType="SysConfig">
update sys_config
update ms_sys_config
<set>
<if test="configName != null and configName != ''">config_name = #{configName},</if>
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
@@ -104,11 +104,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteConfigById" parameterType="Long">
delete from sys_config where config_id = #{configId}
delete from ms_sys_config where config_id = #{configId}
</delete>
<delete id="deleteConfigByIds" parameterType="Long">
delete from sys_config where config_id in
delete from ms_sys_config where config_id in
<foreach item="configId" collection="array" open="(" separator="," close=")">
#{configId}
</foreach>
@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_type,d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
from sys_dept d
from ms_sys_dept d
</sql>
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
@@ -50,37 +50,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDeptListByRoleId" resultType="Long">
select d.dept_id
from sys_dept d
left join sys_role_dept rd on d.dept_id = rd.dept_id
from ms_sys_dept d
left join ms_sys_role_dept rd on d.dept_id = rd.dept_id
where rd.role_id = #{roleId}
<if test="deptCheckStrictly">
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
and d.dept_id not in (select d.parent_id from ms_sys_dept d inner join ms_sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
</if>
order by d.parent_id, d.order_num
</select>
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name,d.dept_type, d.order_num, d.leader, d.phone, d.email, d.status,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
(select dept_name from ms_sys_dept where dept_id = d.parent_id) parent_name
from ms_sys_dept d
where d.dept_id = #{deptId}
</select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
select count(1) from ms_sys_user where dept_id = #{deptId} and del_flag = '0'
</select>
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
select count(1) from sys_dept
select count(1) from ms_sys_dept
where del_flag = '0' and parent_id = #{deptId} limit 1
</select>
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
select * from sys_dept where find_in_set(#{deptId}, ancestors)
select * from ms_sys_dept where find_in_set(#{deptId}, ancestors)
</select>
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
select count(*) from ms_sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
</select>
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
@@ -88,12 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select>
<select id="selectUserDeptListByRoleId" resultType="java.lang.Long">
select u.dept_id from sys_user_role r
join sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
select u.dept_id from ms_sys_user_role r
join ms_sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
</select>
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
insert into sys_dept(
insert into ms_sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="deptName != null and deptName != ''">dept_name,</if>
@@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
);
</insert>
<insert id="batchSave">
insert into sys_dept(
insert into ms_sys_dept(
dept_id,
parent_id,
dept_name,
@@ -156,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateDept" parameterType="SysDept">
update sys_dept
update ms_sys_dept
<set>
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
@@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update id="updateDeptChildren" parameterType="java.util.List">
update sys_dept set ancestors =
update ms_sys_dept set ancestors =
<foreach collection="depts" item="item" index="index"
separator=" " open="case dept_id" close="end">
when #{item.deptId} then #{item.ancestors}
@@ -187,14 +187,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update id="updateDeptStatusNormal" parameterType="Long">
update sys_dept set status = '0' where dept_id in
update ms_sys_dept set status = '0' where dept_id in
<foreach collection="array" item="deptId" open="(" separator="," close=")">
#{deptId}
</foreach>
</update>
<delete id="deleteDeptById" parameterType="Long">
update sys_dept set del_flag = '2' where dept_id = #{deptId}
update ms_sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
</mapper>
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectDictDataVo">
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
from sys_dict_data
from ms_sys_dict_data
</sql>
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDictLabel" resultType="String">
select dict_label from sys_dict_data
select dict_label from ms_sys_dict_data
where dict_type = #{dictType} and dict_value = #{dictValue}
</select>
@@ -57,22 +57,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="countDictDataByType" resultType="Integer">
select count(1) from sys_dict_data where dict_type=#{dictType}
select count(1) from ms_sys_dict_data where dict_type=#{dictType}
</select>
<delete id="deleteDictDataById" parameterType="Long">
delete from sys_dict_data where dict_code = #{dictCode}
delete from ms_sys_dict_data where dict_code = #{dictCode}
</delete>
<delete id="deleteDictDataByIds" parameterType="Long">
delete from sys_dict_data where dict_code in
delete from ms_sys_dict_data where dict_code in
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
#{dictCode}
</foreach>
</delete>
<update id="updateDictData" parameterType="SysDictData">
update sys_dict_data
update ms_sys_dict_data
<set>
<if test="dictSort != null">dict_sort = #{dictSort},</if>
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
@@ -90,11 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update id="updateDictDataType" parameterType="String">
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
update ms_sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
</update>
<insert id="insertDictData" parameterType="SysDictData">
insert into sys_dict_data(
insert into ms_sys_dict_data(
<if test="dictSort != null">dict_sort,</if>
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
<if test="dictValue != null and dictValue != ''">dict_value,</if>
@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectDictTypeVo">
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
from sys_dict_type
from ms_sys_dict_type
</sql>
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
@@ -61,18 +61,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<delete id="deleteDictTypeById" parameterType="Long">
delete from sys_dict_type where dict_id = #{dictId}
delete from ms_sys_dict_type where dict_id = #{dictId}
</delete>
<delete id="deleteDictTypeByIds" parameterType="Long">
delete from sys_dict_type where dict_id in
delete from ms_sys_dict_type where dict_id in
<foreach collection="array" item="dictId" open="(" separator="," close=")">
#{dictId}
</foreach>
</delete>
<update id="updateDictType" parameterType="SysDictType">
update sys_dict_type
update ms_sys_dict_type
<set>
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<insert id="insertDictType" parameterType="SysDictType">
insert into sys_dict_type(
insert into ms_sys_dict_type(
<if test="dictName != null and dictName != ''">dict_name,</if>
<if test="dictType != null and dictType != ''">dict_type,</if>
<if test="status != null">status,</if>
@@ -17,12 +17,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<insert id="insertLogininfor" parameterType="SysLogininfor">
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
insert into ms_sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
</insert>
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from ms_sys_logininfor
<where>
<if test="ipaddr != null and ipaddr != ''">
AND ipaddr like concat('%', #{ipaddr}, '%')
@@ -44,14 +44,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<delete id="deleteLogininforByIds" parameterType="Long">
delete from sys_logininfor where info_id in
delete from ms_sys_logininfor where info_id in
<foreach collection="array" item="infoId" open="(" separator="," close=")">
#{infoId}
</foreach>
</delete>
<update id="cleanLogininfor">
truncate table sys_logininfor
truncate table ms_sys_logininfor
</update>
</mapper>
@@ -29,7 +29,7 @@
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
from sys_menu
from ms_sys_menu
</sql>
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
@@ -50,16 +50,16 @@
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
from ms_sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
from ms_sys_menu m
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
left join ms_sys_role ro on ur.role_id = ro.role_id
where ur.user_id = #{params.userId}
<if test="menuName != null and menuName != ''">
AND m.menu_name like concat('%', #{menuName}, '%')
@@ -75,46 +75,46 @@
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role ro on ur.role_id = ro.role_id
left join sys_user u on ur.user_id = u.user_id
from ms_sys_menu m
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
left join ms_sys_role ro on ur.role_id = ro.role_id
left join ms_sys_user u on ur.user_id = u.user_id
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0
order by m.parent_id, m.order_num
</select>
<select id="selectMenuListByRoleId" resultType="Long">
select m.menu_id
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
from ms_sys_menu m
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
<if test="menuCheckStrictly">
and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
and m.menu_id not in (select m.parent_id from ms_sys_menu m inner join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
</if>
order by m.parent_id, m.order_num
</select>
<select id="selectMenuPerms" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
from ms_sys_menu m
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
left join sys_user_role ur on rm.role_id = ur.role_id
left join sys_role r on r.role_id = ur.role_id
from ms_sys_menu m
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
left join ms_ms_sys_user_role ur on rm.role_id = ur.role_id
left join ms_sys_role r on r.role_id = ur.role_id
where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
</select>
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
select distinct m.perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
from ms_sys_menu m
left join ms_ms_sys_role_menu rm on m.menu_id = rm.menu_id
where m.status = '0' and rm.role_id = #{roleId}
</select>
@@ -124,7 +124,7 @@
</select>
<select id="hasChildByMenuId" resultType="Integer">
select count(1) from sys_menu where parent_id = #{menuId}
select count(1) from ms_sys_menu where parent_id = #{menuId}
</select>
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
@@ -133,7 +133,7 @@
</select>
<update id="updateMenu" parameterType="SysMenu">
update sys_menu
update ms_sys_menu
<set>
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
@@ -156,7 +156,7 @@
</update>
<insert id="insertMenu" parameterType="SysMenu">
insert into sys_menu(
insert into ms_sys_menu(
<if test="menuId != null and menuId != 0">menu_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
<if test="menuName != null and menuName != ''">menu_name,</if>
@@ -196,7 +196,7 @@
</insert>
<delete id="deleteMenuById" parameterType="Long">
delete from sys_menu where menu_id = #{menuId}
delete from ms_sys_menu where menu_id = #{menuId}
</delete>
</mapper>
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectNoticeVo">
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
from sys_notice
from ms_sys_notice
</sql>
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertNotice" parameterType="SysNotice">
insert into sys_notice (
insert into ms_sys_notice (
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
@@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateNotice" parameterType="SysNotice">
update sys_notice
update ms_sys_notice
<set>
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
@@ -76,11 +76,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteNoticeById" parameterType="Long">
delete from sys_notice where notice_id = #{noticeId}
delete from ms_sys_notice where notice_id = #{noticeId}
</delete>
<delete id="deleteNoticeByIds" parameterType="Long">
delete from sys_notice where notice_id in
delete from ms_sys_notice where notice_id in
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
#{noticeId}
</foreach>
@@ -26,11 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectOperLogVo">
select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
from sys_oper_log
from ms_sys_oper_log
</sql>
<insert id="insertOperlog" parameterType="SysOperLog">
insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
insert into ms_sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
</insert>
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<delete id="deleteOperLogByIds" parameterType="Long">
delete from sys_oper_log where oper_id in
delete from ms_sys_oper_log where oper_id in
<foreach collection="array" item="operId" open="(" separator="," close=")">
#{operId}
</foreach>
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<update id="cleanOperLog">
truncate table sys_oper_log
truncate table ms_sys_oper_log
</update>
</mapper>
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPostVo">
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
from sys_post
from ms_sys_post
</sql>
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
@@ -53,17 +53,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
select p.post_id
from sys_post p
left join sys_user_post up on up.post_id = p.post_id
left join sys_user u on u.user_id = up.user_id
from ms_sys_post p
left join ms_ms_sys_user_post up on up.post_id = p.post_id
left join ms_sys_user u on u.user_id = up.user_id
where u.user_id = #{userId}
</select>
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
select p.post_id, p.post_name, p.post_code
from sys_post p
left join sys_user_post up on up.post_id = p.post_id
left join sys_user u on u.user_id = up.user_id
from ms_sys_post p
left join ms_ms_sys_user_post up on up.post_id = p.post_id
left join ms_sys_user u on u.user_id = up.user_id
where u.user_name = #{userName}
</select>
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<update id="updatePost" parameterType="SysPost">
update sys_post
update ms_sys_post
<set>
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
<if test="postName != null and postName != ''">post_name = #{postName},</if>
@@ -92,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
insert into sys_post(
insert into ms_sys_post(
<if test="postId != null and postId != 0">post_id,</if>
<if test="postCode != null and postCode != ''">post_code,</if>
<if test="postName != null and postName != ''">post_name,</if>
@@ -114,11 +114,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<delete id="deletePostById" parameterType="Long">
delete from sys_post where post_id = #{postId}
delete from ms_sys_post where post_id = #{postId}
</delete>
<delete id="deletePostByIds" parameterType="Long">
delete from sys_post where post_id in
delete from ms_sys_post where post_id in
<foreach collection="array" item="postId" open="(" separator="," close=")">
#{postId}
</foreach>
@@ -10,22 +10,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<delete id="deleteRoleDeptByRoleId" parameterType="Long">
delete from sys_role_dept where role_id=#{roleId}
delete from ms_sys_role_dept where role_id=#{roleId}
</delete>
<select id="selectCountRoleDeptByDeptId" resultType="Integer">
select count(1) from sys_role_dept where dept_id=#{deptId}
select count(1) from ms_sys_role_dept where dept_id=#{deptId}
</select>
<delete id="deleteRoleDept" parameterType="Long">
delete from sys_role_dept where role_id in
delete from ms_sys_role_dept where role_id in
<foreach collection="array" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</delete>
<insert id="batchRoleDept">
insert into sys_role_dept(role_id, dept_id) values
insert into ms_sys_role_dept(role_id, dept_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.roleId},#{item.deptId})
</foreach>
@@ -24,10 +24,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectRoleVo">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
r.status, r.del_flag, r.create_time, r.remark
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
left join sys_dept d on u.dept_id = d.dept_id
from ms_sys_role r
left join ms_ms_sys_user_role ur on ur.role_id = r.role_id
left join ms_sys_user u on u.user_id = ur.user_id
left join ms_sys_dept d on u.dept_id = d.dept_id
</sql>
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
@@ -67,9 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
select r.role_id
from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id
left join sys_user u on u.user_id = ur.user_id
from ms_sys_role r
left join ms_ms_sys_user_role ur on ur.role_id = r.role_id
left join ms_sys_user u on u.user_id = ur.user_id
where u.user_id = #{userId}
</select>
@@ -93,11 +93,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
</select>
<select id="selectRoleIdByName" resultType="java.lang.Long" >
select role_id from sys_role where role_name=#{roleName}
select role_id from ms_sys_role where role_name=#{roleName}
</select>
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
insert into sys_role(
insert into ms_sys_role(
<if test="roleId != null and roleId != 0">role_id,</if>
<if test="roleName != null and roleName != ''">role_name,</if>
<if test="roleKey != null and roleKey != ''">role_key,</if>
@@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateRole" parameterType="SysRole">
update sys_role
update ms_sys_role
<set>
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
@@ -142,11 +142,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteRoleById" parameterType="Long">
update sys_role set del_flag = '2' where role_id = #{roleId}
update ms_sys_role set del_flag = '2' where role_id = #{roleId}
</delete>
<delete id="deleteRoleByIds" parameterType="Long">
update sys_role set del_flag = '2' where role_id in
update ms_sys_role set del_flag = '2' where role_id in
<foreach collection="array" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
@@ -10,22 +10,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<select id="checkMenuExistRole" resultType="Integer">
select count(1) from sys_role_menu where menu_id = #{menuId}
select count(1) from ms_sys_role_menu where menu_id = #{menuId}
</select>
<delete id="deleteRoleMenuByRoleId" parameterType="Long">
delete from sys_role_menu where role_id=#{roleId}
delete from ms_sys_role_menu where role_id=#{roleId}
</delete>
<delete id="deleteRoleMenu" parameterType="Long">
delete from sys_role_menu where role_id in
delete from ms_sys_role_menu where role_id in
<foreach collection="array" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</delete>
<insert id="batchRoleMenu">
insert into sys_role_menu(role_id, menu_id) values
insert into ms_sys_role_menu(role_id, menu_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.roleId},#{item.menuId})
</foreach>
@@ -52,19 +52,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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,
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
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
left join sys_role r on r.role_id = ur.role_id
from ms_sys_user u
left join ms_sys_dept d on u.dept_id = d.dept_id
left join ms_sys_user_role ur on u.user_id = ur.user_id
left join ms_sys_role r on r.role_id = ur.role_id
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name,
d.leader , r.role_id, r.role_name, d.dept_id
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
left join sys_role r on r.role_id = ur.role_id
from ms_sys_user u
left join ms_sys_dept d on u.dept_id = d.dept_id
left join ms_sys_user_role ur on u.user_id = ur.user_id
left join ms_sys_role r on r.role_id = ur.role_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM ms_sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
@@ -93,10 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
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
left join sys_role r on r.role_id = ur.role_id
from ms_sys_user u
left join ms_sys_dept d on u.dept_id = d.dept_id
left join ms_sys_user_role ur on u.user_id = ur.user_id
left join ms_sys_role r on r.role_id = ur.role_id
where u.del_flag = '0' and r.role_id = #{roleId}
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
@@ -110,12 +110,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
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
left join sys_role r on r.role_id = ur.role_id
from ms_sys_user u
left join ms_sys_dept d on u.dept_id = d.dept_id
left join ms_sys_user_role ur on u.user_id = ur.user_id
left join ms_sys_role r on r.role_id = ur.role_id
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
and u.user_id not in (select u.user_id from ms_sys_user u inner join ms_sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
@@ -139,27 +139,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserByDeptId" parameterType="Long" resultMap="SysUserResult">
SELECT ud.user_id , ud.nick_name ,ud.phonenumber ,ud.dept_id ,d.dept_name
FROM (SELECT u.user_id , u.nick_name ,u.phonenumber ,u.dept_id
FROM sys_user_post up left join sys_user u on u.user_id = up.user_id
left join sys_post sp on up.post_id = sp.post_id
where sp.post_code = 'jbr') ud left join sys_dept d on ud.dept_id = d.dept_id
FROM ms_sys_user_post up left join ms_sys_user u on u.user_id = up.user_id
left join ms_sys_post sp on up.post_id = sp.post_id
where sp.post_code = 'jbr') ud left join ms_sys_dept d on ud.dept_id = d.dept_id
where d.dept_id = #{deptId}
</select>
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
select user_id, user_name from ms_sys_user where user_name = #{userName} and del_flag = '0' limit 1
</select>
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
select user_id, phonenumber from ms_sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
</select>
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
select user_id, email from ms_sys_user where email = #{email} and del_flag = '0' limit 1
</select>
<select id="selectUserListByAdRole" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
join sys_user_role ur on ur.user_id =u.user_id
join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from ms_sys_user u
join ms_sys_user_role ur on ur.user_id =u.user_id
join ms_sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
where r.del_flag = '0' and r.status='0'
and u.del_flag = '0' and u.status='0'
<if test="arbitratorName != null and arbitratorName != ''">
@@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectUserListByIds" resultMap="SysUserResult">
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from sys_user u
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from ms_sys_user u
<where>
<if test="idList != null and idList.size() > 0">
@@ -192,31 +192,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
select u.*,d.dept_name,ur.role_id
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
left join sys_role r on r.role_id = ur.role_id
from ms_sys_user u
left join ms_sys_dept d on u.dept_id = d.dept_id
left join ms_sys_user_role ur on u.user_id = ur.user_id
left join ms_sys_role r on r.role_id = ur.role_id
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
<select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
select u.*,d.dept_name,ur.role_id
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
left join sys_role r on r.role_id = ur.role_id
from ms_sys_user u
left join ms_sys_dept d on u.dept_id = d.dept_id
left join ms_sys_user_role ur on u.user_id = ur.user_id
left join ms_sys_role r on r.role_id = ur.role_id
where u.phonenumber = #{phone} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
</select>
<select id="selectByDeptIdAndRole" resultMap="SysUserResult">
select u.* from
sys_user u
join sys_user_role ur on u.user_id = ur.user_id
join sys_role r on ur.role_id = r.role_id
ms_sys_user u
join ms_sys_user_role ur on u.user_id = ur.user_id
join ms_sys_role r on ur.role_id = r.role_id
where u.dept_id = #{deptId} and r.role_name = #{roleName} and u.del_flag = '0' and r.del_flag='0'
</select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
insert into ms_sys_user(
<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>
@@ -249,7 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<insert id="batchSave">
insert into sys_user(
insert into ms_sys_user(
user_id,
dept_id,
user_name,
@@ -286,7 +286,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<update id="updateUser" parameterType="SysUser">
update sys_user
update ms_sys_user
<set>
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
@@ -308,31 +308,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update id="updateUserStatus" parameterType="SysUser">
update sys_user set status = #{status} where user_id = #{userId}
update ms_sys_user set status = #{status} where user_id = #{userId}
</update>
<update id="updateUserAvatar" parameterType="SysUser">
update sys_user set avatar = #{avatar} where user_name = #{userName}
update ms_sys_user set avatar = #{avatar} where user_name = #{userName}
</update>
<update id="resetUserPwd" parameterType="SysUser">
update sys_user set password = #{password} where user_name = #{userName}
update ms_sys_user set password = #{password} where user_name = #{userName}
</update>
<delete id="deleteUserById" parameterType="Long">
update sys_user set del_flag = '2' where user_id = #{userId}
update ms_sys_user set del_flag = '2' where user_id = #{userId}
</delete>
<delete id="deleteUserByIds" parameterType="Long">
update sys_user set del_flag = '2' where user_id in
update ms_sys_user set del_flag = '2' where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
<select id="selectRoleUserByDeptId" parameterType="long" 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
SELECT u.* FROM ms_sys_user u
INNER JOIN ms_sys_user_role ur ON u.user_id = ur.user_id
INNER JOIN ms_sys_dept d ON u.dept_id = d.dept_id
WHERE ur.role_id = #{roleId} AND d.dept_id = #{deptId};
</select>
@@ -10,22 +10,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<delete id="deleteUserPostByUserId" parameterType="Long">
delete from sys_user_post where user_id=#{userId}
delete from ms_sys_user_post where user_id=#{userId}
</delete>
<select id="countUserPostById" resultType="Integer">
select count(1) from sys_user_post where post_id=#{postId}
select count(1) from ms_sys_user_post where post_id=#{postId}
</select>
<delete id="deleteUserPost" parameterType="Long">
delete from sys_user_post where user_id in
delete from ms_sys_user_post where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
<insert id="batchUserPost">
insert into sys_user_post(user_id, post_id) values
insert into ms_sys_user_post(user_id, post_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.postId})
</foreach>
@@ -10,33 +10,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<delete id="deleteUserRoleByUserId" parameterType="Long">
delete from sys_user_role where user_id=#{userId}
delete from ms_sys_user_role where user_id=#{userId}
</delete>
<select id="countUserRoleByRoleId" resultType="Integer">
select count(1) from sys_user_role where role_id=#{roleId}
select count(1) from ms_sys_user_role where role_id=#{roleId}
</select>
<delete id="deleteUserRole" parameterType="Long">
delete from sys_user_role where user_id in
delete from ms_sys_user_role where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
<insert id="batchUserRole">
insert into sys_user_role(user_id, role_id) values
insert into ms_sys_user_role(user_id, role_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.roleId})
</foreach>
</insert>
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
delete from ms_sys_user_role where user_id=#{userId} and role_id=#{roleId}
</delete>
<delete id="deleteUserRoleInfos">
delete from sys_user_role where role_id=#{roleId} and user_id in
delete from ms_sys_user_role where role_id=#{roleId} and user_id in
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
#{userId}
</foreach>
@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper">
<resultMap type="ArbitrateRecord" id="ArbitrateRecordResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="evidenDetermi" column="eviden_determi" />
<result property="factDetermi" column="fact_determi" />
<result property="caseSketch" column="case_sketch" />
<result property="arbitrateThink" column="arbitrate_think" />
<result property="rulingFollows" column="ruling_follows" />
<result property="verificaOpinion" column="verifica_opinion" />
<result property="checkOpinion" column="check_opinion" />
<result property="annexId" column="annex_id" />
<result property="caseFocus" column="case_focus" />
<result property="caseFacts" column="case_facts" />
<result property="respondentOpinion" column="respondent_opinion" />
<result property="applicantOpinion" column="applicant_opinion" />
</resultMap>
<insert id="insertArbitrateRecord" parameterType="ArbitrateRecord" useGeneratedKeys="true" keyProperty="id">
insert into arbitrate_record(
<if test="caseAppliId != null">case_appli_id,</if>
<if test="evidenDetermi != null and evidenDetermi != ''">eviden_determi,</if>
<if test="factDetermi != null and factDetermi != ''">fact_determi,</if>
<if test="caseSketch != null and caseSketch != ''">case_sketch,</if>
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows,</if>
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion,</if>
<if test="arbitrateThink != null and arbitrateThink != ''">arbitrate_think,</if>
<if test="checkOpinion != null and checkOpinion != ''">check_opinion,</if>
<if test="caseCheckReject != null and caseCheckReject != ''">case_check_reject,</if>
<if test="arbitrateReject != null and arbitrateReject != ''">arbitrate_reject,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
case_focus,
case_facts,
respondent_opinion,
applicant_opinion,
create_time
)values(
<if test="caseAppliId != null ">#{caseAppliId},</if>
<if test="evidenDetermi != null and evidenDetermi != ''">#{evidenDetermi},</if>
<if test="factDetermi != null and factDetermi != ''">#{factDetermi},</if>
<if test="caseSketch != null and caseSketch != ''">#{caseSketch},</if>
<if test="rulingFollows != null and rulingFollows != ''">#{rulingFollows},</if>
<if test="verificaOpinion != null and verificaOpinion != ''">#{verificaOpinion},</if>
<if test="arbitrateThink != null and arbitrateThink != ''">#{arbitrateThink},</if>
<if test="checkOpinion != null and checkOpinion != ''">#{checkOpinion},</if>
<if test="caseCheckReject != null and caseCheckReject != ''">#{caseCheckReject},</if>
<if test="arbitrateReject != null and arbitrateReject != ''">#{arbitrateReject},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
#{caseFocus},
#{caseFacts},
#{respondentOpinion},
#{applicantOpinion},
sysdate()
)
</insert>
<update id="updataArbitrateRecord" parameterType="ArbitrateRecord">
update arbitrate_record
<set>
<if test="evidenDetermi != null and evidenDetermi != ''">eviden_determi = #{evidenDetermi},</if>
<if test="factDetermi != null and factDetermi != ''">fact_determi = #{factDetermi},</if>
<if test="caseSketch != null and caseSketch != ''">case_sketch = #{caseSketch},</if>
<if test="arbitrateThink != null and arbitrateThink != ''">arbitrate_think = #{arbitrateThink},</if>
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows = #{rulingFollows},</if>
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion = #{verificaOpinion},</if>
<if test="checkOpinion != null and checkOpinion != ''">check_opinion = #{checkOpinion},</if>
<if test="arbitraCheckOpinion != null and arbitraCheckOpinion != ''">arbitra_check_opinion = #{arbitraCheckOpinion},</if>
<if test="annexId != null ">annex_id = #{annexId},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="caseFocus != null and caseFocus != ''">case_focus = #{caseFocus},</if>
<if test="caseFacts != null and caseFacts != ''">case_facts = #{caseFacts},</if>
<if test="respondentOpinion != null and respondentOpinion != ''">respondent_opinion = #{respondentOpinion},</if>
<if test="applicantOpinion != null and applicantOpinion != ''">applicant_opinion = #{applicantOpinion},</if>
<if test="caseCheckReject != null and caseCheckReject != ''">case_check_reject = #{caseCheckReject},</if>
<if test="arbitrateReject != null and arbitrateReject != ''">arbitrate_reject = #{arbitrateReject},</if>
<if test="deptorReject != null and deptorReject != ''">deptor_reject = #{deptorReject},</if>
update_time = sysdate()
</set>
where id = #{id}
</update>
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
SELECT a.id ,a.case_appli_id ,a.eviden_determi ,a.fact_determi ,a.case_sketch ,a.arbitrate_think ,a.ruling_follows ,
a.verifica_opinion ,a.check_opinion,a.annex_id,a.case_focus,a.case_facts,a.respondent_opinion,a.applicant_opinion,
a.case_check_reject ,a.arbitrate_reject,a.deptor_reject
from arbitrate_record a
<where>
<if test="caseAppliId != null ">
AND a.case_appli_id = #{caseAppliId}
</if>
</where>
</select>
</mapper>
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper">
<resultMap type="Arbitrator" id="ArbitratorResult">
<id property="id" column="id" />
<result property="arbitratorName" column="arbitrator_name" />
<result property="title" column="title" />
<result property="career" column="career" />
<result property="professiClassifi" column="professi_classifi" />
<result property="education" column="education" />
<result property="area" column="area" />
<result property="telephone" column="telephone" />
<result property="currentCaseNum" column="current_case_num" />
<result property="closedCaseNum" column="closed_case_num" />
</resultMap>
<select id="selectArbitratorList" parameterType="Arbitrator" resultMap="ArbitratorResult">
select a.id ,a.arbitrator_name ,a.title ,a.career ,a.professi_classifi ,
a.education ,a.area ,a.telephone ,a.current_case_num ,a.closed_case_num
from arbitrator a
<where>
<if test="arbitratorName != null and arbitratorName != ''">
AND a.arbitrator_name like concat('%', #{arbitratorName}, '%')
</if>
<if test="idList != null and idList.size() > 0">
AND a.id in
<foreach item="id" collection="idList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
</select>
</mapper>
@@ -1,137 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateLogMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseAffiliate" id="CaseAffiliateResult">
<id property="id" column="id" />
<result property="caseAppliLogId" column="case_appli_log_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>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select c.*,s.user_id
from case_affiliate_log c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="caseAppliLogId != null ">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
</where>
</select>
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
select c.*
from case_affiliate_log c
<where>
<if test="caseAppliLogId != null ">
AND c.case_appli_log_id = #{caseAppliLogId}
</if>
<if test="identityType != null ">
AND c.identity_type = #{identityType}
</if>
</where>
</select>
<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
<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}
)
</foreach>;
</insert>
<update id="updataCaseAffiliate" parameterType="CaseAffiliate">
update case_affiliate_log
set
case_appli_log_id=#{caseAppliLogId},
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}
</if>
where id = #{id}
</update>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate_log where case_appli_log_id = #{caseAppliLogId}
</delete>
<delete id="batchDeletecaseAffiliate">
delete from case_affiliate_log where case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>
@@ -1,204 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
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>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select distinct (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,s.user_id
from case_affiliate c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="caseAppliId != null ">
AND c.case_appli_id = #{caseAppliId}
</if>
</where>
</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,s.user_id
from case_affiliate c
left join sys_user s on c.identity_num=s.id_card
<where>
<if test="ids != null ">
case_appli_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</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>
<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
<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}
)
</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}
</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>
</set>
where case_appli_id = #{caseAppliId} and identity_type= #{item.identityType};
</foreach>
</update>
<delete id="deletecaseAffiliate" parameterType="CaseApplication">
delete from case_affiliate where case_appli_id = #{id}
</delete>
<delete id="batchDeletecaseAffiliate">
delete from case_affiliate where case_appli_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<delete id="deleteByCaseId">
delete from case_affiliate where case_appli_id = #{caseAppliId}
</delete>
</mapper>
@@ -1,291 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseApplicationLogMapper">
<resultMap type="com.ruoyi.wisdomarbitrate.domain.CaseApplication" id="CaseApplicationResult">
<id property="id" column="id" />
<result property="caseAppliId" column="caseAppliId" />
<result property="caseNum" column="case_num" />
<result property="caseName" column="case_name" />
<result property="caseSubjectAmount" column="case_subject_amount" />
<result property="registerDate" column="register_date" />
<result property="arbitratMethod" column="arbitrat_method" />
<result property="caseStatus" column="case_status" />
<result property="hearDate" column="hear_date" />
<result property="arbitratClaims" column="arbitrat_claims" />
<result property="loanStartDate" column="loan_start_date" />
<result property="loanEndDate" column="loan_end_date" />
<result property="claimPrinciOwed" column="claim_princi_owed" />
<result property="claimInterestOwed" column="claim_interest_owed" />
<result property="claimLiquidDamag" column="claim_liquid_damag" />
<result property="feePayable" column="fee_payable" />
<result property="beginVideoDate" column="begin_video_date" />
<result property="onlineVideoPerson" column="online_video_person" />
<result property="contractNumber" column="contract_number" />
<result property="caseStatusName" column="caseStatusName" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="arbitratMethodName" column="arbitratMethodName" />
<result property="isAbsence" column="is_absence" />
<result property="responCrossOpin" column="respon_cross_opin" />
<result property="applicaCrossOpin" column="applica_cross_opin" />
<result property="responDefenOpini" column="respon_defen_opini" />
<result property="arbitratorId" column="arbitrator_id" />
<result property="arbitratorName" column="arbitrator_name" />
<result property="paymentStatus" column="payment_status" />
<result property="paymentStatusName" column="paymentStatusName" />
<result property="filearbitraUrl" column="filearbitra_url" />
<result property="requestRule" column="request_rule" />
<result property="properPreser" column="proper_preser" />
<result property="adjudicaCounter" column="adjudica_counter" />
<result property="lockStatus" column="lock_status" />
<result property="version" column="version" />
<result property="updateSubmitStatus" column="update_submit_status" />
<result property="properPreser" column="proper_preser" />
<result property="interestRate" column="interest_rate" />
<result property="outstandingMoney" column="outstanding_money" />
<result property="facts" column="facts" />
<result property="partyA" column="party_a" />
<result property="disputes" column="disputes" />
<result property="loanType" column="loan_type" />
<result property="loanTerm" column="loan_term" />
<result property="mediationAgreement" column="mediation_agreement" />
</resultMap>
<insert id="insert" parameterType="com.ruoyi.wisdomarbitrate.domain.CaseApplication" useGeneratedKeys="true" keyProperty="id">
insert into case_application_log(
<if test="caseLogId != null ">id ,</if>
<if test="caseAppliId != null ">case_appli_id ,</if>
<if test="caseName != null and caseName != ''">case_name ,</if>
<if test="caseNum != null and caseNum != ''">case_num,</if>
<if test="caseSubjectAmount != null">case_subject_amount,</if>
<if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
<if test="requestRule != null and requestRule != ''">request_rule,</if>
<if test="loanStartDate != null ">loan_start_date,</if>
<if test="loanEndDate != null ">loan_end_date,</if>
<if test="claimPrinciOwed != null ">claim_princi_owed,</if>
<if test="claimInterestOwed != null ">claim_interest_owed,</if>
<if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
<if test="feePayable != null ">fee_payable,</if>
<if test="contractNumber != null and contractNumber != ''">contract_number,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="version != null ">version,</if>
<if test="updateSubmitStatus != null ">update_submit_status,</if>
<if test="properPreser != null ">proper_preser,</if>
interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement,
create_time
)values(
<if test="caseLogId != null ">#{id} ,</if>
<if test="caseAppliId != null">#{caseAppliId},</if>
<if test="caseName != null and caseName != ''">#{caseName},</if>
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
<if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
<if test="requestRule != null and requestRule != ''">#{requestRule},</if>
<if test="loanStartDate != null ">#{loanStartDate},</if>
<if test="loanEndDate != null ">#{loanEndDate},</if>
<if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
<if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
<if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
<if test="feePayable != null ">#{feePayable},</if>
<if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="version != null ">#{version},</if>
<if test="updateSubmitStatus != null ">#{updateSubmitStatus},</if>
<if test="properPreser != null ">#{properPreser},</if>
#{interestRate},
#{outstandingMoney},
#{facts},
#{partyA},
#{disputes},
#{loanType},
#{loanTerm},
#{mediationAgreement},
sysdate()
)
</insert>
<insert id="batchSave">
insert into case_application_log(
id,
case_appli_id ,
case_name ,
case_num,
case_subject_amount,
arbitrat_claims,
request_rule,
loan_start_date,
loan_end_date,
claim_princi_owed,
claim_interest_owed,
claim_liquid_damag,
fee_payable,
contract_number,
create_by,
version,
update_submit_status,
proper_preser,
interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement,
create_time
)values
<foreach item="item" index="index" collection="list" separator=",">
(
id=#{item.id},
#{item.caseAppliId},
#{item.caseName},
#{item.caseNum},
#{item.caseSubjectAmount},
#{item.arbitratClaims},
#{item.requestRule},
#{item.loanStartDate},
#{item.loanEndDate},
#{item.claimPrinciOwed},
#{item.claimInterestOwed},
#{item.claimLiquidDamag},
#{item.feePayable},
#{item.contractNumber},
#{item.createBy},
#{item.version},
#{item.updateSubmitStatus},
#{item.properPreser},
#{item.interestRate},
#{item.outstandingMoney},
#{item.facts},
#{item.partyA},
#{item.disputes},
#{item.loanType},
#{item.loanTerm},
#{item.mediationAgreement},
sysdate()
)
</foreach>
</insert>
<update id="updateStatus">
update case_application_log
<set>
<if test="updateSubmitStatus!= null ">update_submit_status=#{updateSubmitStatus},</if>
</set>
<where>
<if test="caseId!= null ">AND case_appli_id=#{caseId}</if>
<if test="version!= null ">AND version=#{version}</if>
</where>
</update>
<delete id="deleteById" >
DELETE FROM case_application_log
WHERE id = #{id}
</delete>
<delete id="batchDeleteLog">
delete from case_application_log l where l.id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
delete from case_affiliate_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
delete from case_attach_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
delete from column_value_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
</delete>
<select id="selectByCaseIdAndVersion" resultMap="CaseApplicationResult">
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} and version=#{version}
</select>
<select id="selectLatestCase" resultMap="CaseApplicationResult">
SELECT id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} ORDER BY version DESC limit 1
</select>
<select id="selectMaxVersionByCaseId" resultType="java.lang.Integer">
SELECT max(version)
FROM case_application_log
WHERE case_appli_id = #{caseAppliId}
</select>
<select id="selectMaxVersionBySecret" resultType="java.lang.Integer">
SELECT max(version)
FROM case_application_log
WHERE case_appli_id = #{caseAppliId} and update_submit_status IN ( 1, 4 )
</select>
<select id="selectBeforeCase" resultMap="CaseApplicationResult">
SELECT case_appli_id id,id caseLogId,case_appli_id caseAppliId ,case_name,case_num,case_subject_amount,arbitrat_claims,request_rule,loan_start_date,
loan_end_date,claim_princi_owed,claim_interest_owed,claim_liquid_damag,fee_payable,contract_number,
create_by,version,update_submit_status,create_time,proper_preser, interest_rate,
outstanding_money,
facts,
party_a,
disputes,
loan_type,
loan_term,
mediation_agreement
FROM case_application_log
WHERE case_appli_id = #{caseId} and version &lt; #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
</select>
<select id="selectLogsByCaseIds" resultType="java.lang.Long">
select id from case_application_log where case_appli_id in
<foreach collection="ids" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper>
File diff suppressed because it is too large Load Diff
@@ -16,18 +16,18 @@
<result property="caseAppliLogId" column="case_appli_log_id" />
</resultMap>
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
INSERT INTO ms_case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
VALUES (#{caseAppliLogId},#{annexId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus})
</insert>
<insert id="batchSave">
INSERT INTO case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
INSERT INTO ms_case_attach_log (case_appli_log_id, annex_id,annex_name, annex_path , annex_type,note,use_id,use_account,seal_status)
VALUES
<foreach item="item" index="index" collection="list" separator=",">
(#{item.caseAppliLogId},#{item.annexId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.userId},#{item.userName},#{item.sealStatus})
</foreach>
</insert>
<delete id="deleteByFileIds">
delete from case_attach_log
delete from ms_case_attach_log
where annex_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
@@ -36,13 +36,13 @@
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach_log
from ms_case_attach_log
where case_appli_log_id =#{id}
</select>
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach_log
from ms_case_attach_log
<where>
<if test="caseAppliLogId != null ">
AND case_appli_log_id = #{caseAppliLogId}
@@ -55,7 +55,7 @@
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
select *
from case_attach_log
from ms_case_attach_log
<where>
<if test="caseLogId != null ">
AND case_appli_log_id = #{caseLogId}
@@ -73,7 +73,7 @@
</select>
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach_log
from ms_case_attach_log
<where>
<if test="annexId != null ">
AND annex_id = #{annexId}
@@ -82,14 +82,14 @@
</select>
<update id="updateCaseAttach" parameterType="CaseAttach">
update case_attach_log
update ms_case_attach_log
set
case_appli_log_id= #{caseAppliLogId}
where annex_id = #{annexId}
</update>
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
update case_attach_log
update ms_case_attach_log
<set>
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
@@ -15,11 +15,11 @@
<result property="sealStatus" column="seal_status" />
</resultMap>
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName},#{sealStatus},#{isBatchUpload})
</insert>
<insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
VALUES
<foreach item="item" index="index" collection="list" separator=",">
@@ -28,14 +28,14 @@
</foreach>
</insert>
<delete id="deleteByFileIds">
delete from case_attach
delete from ms_case_attach
where annex_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteByCasedIdAndType">
delete from case_attach
delete from ms_case_attach
where case_appli_id = #{caseAppliId}
and annex_type = #{annexType}
<if test="isBatchUpload != null ">
@@ -45,13 +45,13 @@
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach
from ms_case_attach
where case_appli_id =#{id}
</select>
<select id="getCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach
from ms_case_attach
<where>
<if test="caseAppliId != null ">
AND case_appli_id = #{caseAppliId}
@@ -63,14 +63,14 @@
</select>
<delete id="deleteCaseAttachByCasedIdAndType">
delete from case_attach
delete from ms_case_attach
where case_appli_id = #{caseAppliId}
and annex_type = #{annexType}
</delete>
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
from case_attach
from ms_case_attach
<where>
<if test="id != null ">
AND case_appli_id = #{id}
@@ -88,7 +88,7 @@
</select>
<select id="queryAnnexById" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
select *
from case_attach
from ms_case_attach
<where>
<if test="annexId != null ">
AND annex_id = #{annexId}
@@ -97,14 +97,14 @@
</select>
<update id="updateCaseAttach" parameterType="CaseAttach">
update case_attach
update ms_case_attach
set
case_appli_id= #{caseAppliId}
where annex_id = #{annexId}
</update>
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach" >
update case_attach
update ms_case_attach
<set>
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceDirectoryMapper">
<resultMap type="CaseEvidenceDirectory" id="CaseEvidenceDirectoryResult">
<id property="id" column="id" />
<result property="parentId" column="parent_id" />
<result property="evidenceName" column="evidence_name" />
<result property="annexId" column="annex_id" />
<result property="series" column="series" />
<result property="caseId" column="case_appli_id" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<result property="annexName" column="annex_name" />
<result property="annexPath" column="annex_path" />
</resultMap>
<insert id="save" parameterType="CaseEvidenceDirectory" useGeneratedKeys="true" keyProperty="id">
insert into case_evidence_directory(
<if test="parentId != null ">parent_id,</if>
<if test="evidenceName != null and evidenceName != ''">evidence_name,</if>
<if test="annexId != null ">annex_id,</if>
<if test="series != null ">series,</if>
<if test="caseId != null ">case_appli_id,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
)values(
<if test="parentId != null ">#{parentId},</if>
<if test="evidenceName != null and evidenceName != ''">#{evidenceName},</if>
<if test="annexId != null ">#{annexId},</if>
<if test="series != null ">#{series},</if>
<if test="caseId != null ">#{caseId},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
sysdate()
)
</insert>
<select id="selectList" parameterType="CaseEvidenceDirectory" resultMap="CaseEvidenceDirectoryResult">
select ced.id,ced.parent_id,ced.evidence_name,ced.annex_id,ced.series,ced.create_time
,ced.update_time,ced.case_appli_id,ced.create_by,ced.update_by,ca.annex_name,ca.annex_path
from case_evidence_directory ced
left join case_attach ca on ced.annex_id = ca.annex_id
<where>
<if test="id != null ">
AND ced.id = #{id}
</if>
<if test="parentId != null ">
AND ced.parent_id = #{parentId}
</if>
<if test="evidenceName != null ">
AND ced.evidence_name = #{evidenceName}
</if>
<if test="annexId != null ">
AND ced.annex_id = #{annexId}
</if>
<if test="series != null ">
AND ced.series = #{series}
</if>
<if test="caseId != null ">
AND ced.case_appli_id = #{caseId}
</if>
order by ced.parent_id
</where>
</select>
<select id="selectDeptListByEvidenceName" resultType="INTEGER">
select ced.id
from case_evidence_directory ced
left join case_attach ca on ced.annex_id = ca.annex_id
where ced.evidence_name = #{evidenceName}
<if test="deptCheckStrictly">
and ced.annex_id not in (select ced.parent_id from case_evidence_directory ced inner join case_attach ca on ced.annex_id = ca.annex_id and ced.evidence_name = #{evidenceName})
</if>
order by ced.parent_id
</select>
</mapper>
@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper">
<resultMap type="CaseEvidenceVO" id="CaseEvidenceVOResult">
<id property="id" column="id" />
<result property="caseNum" column="case_num" />
<result property="caseStatus" column="case_status" />
<result property="roomId" column="room_id" />
<result property="scheduleStartTime" column="schedule_start_time" />
</resultMap>
<select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
select DISTINCT(c.id) id, c.case_num,c.case_status,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="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
#{caseStatus}
</foreach>
</if>
</select>
</mapper>
@@ -16,12 +16,12 @@
</resultMap>
<insert id="insertCaseLogRecord">
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(
insert into ms_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>
<insert id="batchInsertRecord">
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
insert into ms_case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.caseAppliId},#{item.caseNode},sysdate(),#{item.notes},#{item.createBy},#{item.createNickName},sysdate(),#{item.updateBy},sysdate()
@@ -50,7 +50,7 @@
when 15 then '法律顾问' when 16 then '法律顾问'
ELSE '无角色'
END roleName
from case_log_record cl
from ms_case_log_record cl
<where>
@@ -14,7 +14,7 @@
</resultMap>
<insert id="insertCaseNumRule" parameterType="CaseNumRule" useGeneratedKeys="true" keyProperty="id">
insert into case_num_rule(
insert into ms_case_num_rule(
<if test="ruleType != null">rule_type,</if>
<if test="prefixstr != null and prefixstr != '' ">prefixstr,</if>
<if test="dateFormat != null">date_format,</if>
@@ -36,7 +36,7 @@
</insert>
<update id="updateCaseNumRule" parameterType="CaseNumRule">
update case_num_rule
update ms_case_num_rule
<set>
<if test="ruleType != null">rule_type = #{ruleType},</if>
<if test="prefixstr != null and prefixstr != '' ">prefixstr = #{prefixstr},</if>
@@ -52,12 +52,12 @@
</where>
</update>
<delete id="deleteCaseNumRule" parameterType="CaseNumRule">
delete from case_num_rule where id = #{id}
delete from ms_case_num_rule where id = #{id}
</delete>
<select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
FROM case_num_rule
FROM ms_case_num_rule
<where>
<if test="deptNameFirchar != null and deptNameFirchar != ''">
AND dept_name_firchar = #{deptNameFirchar}
@@ -69,7 +69,7 @@
<select id="countCaseNumRule" resultType="Integer">
select count(1) from case_num_rule c
select count(1) from ms_case_num_rule c
<where>
<if test="prefixstr != null and prefixstr != '' ">
AND c.prefixstr = #{prefixstr}
@@ -92,7 +92,7 @@
<select id="selectCaseNumRule" parameterType="CaseNumRule" resultMap="BaseResultMap">
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
FROM case_num_rule
FROM ms_case_num_rule
<where>
<if test="id != null ">
AND id = #{id}
@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CasePaymentRecordMapper">
<resultMap type="CasePaymentRecord" id="CasePaymentRecordResult">
<id property="id" column="id" />
<result property="caseId" column="case_id" />
<result property="orderNumber" column="order_number" />
<result property="paymentStatus" column="payment_status" />
<result property="paymentTime" column="payment_time" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="payType" column="pay_type" />
</resultMap>
<insert id="saveRecord">
INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time)
VALUES (#{caseId}, #{orderNumber}, #{paymentStatus},#{createTime})
</insert>
<update id="update">
update case_payment_record
<set>
<if test="caseId != null">case_id= #{caseId},</if>
<if test="orderNumber != null and orderNumber != ''">order_number = #{orderNumber},</if>
<if test="paymentTime != null ">payment_time = #{paymentTime},</if>
<if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="payType != null ">pay_type = #{payType},</if>
</set>
<where>
<if test="caseId != null ">
AND case_id = #{caseId}
</if>
<if test="id != null ">
AND id = #{id}
</if>
</where>
</update>
<select id="queryRecord" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
from case_payment_record c
<where>
<if test="orderNumber != null and orderNumber != '' ">
AND c.order_number = #{orderNumber}
</if>
</where>
</select>
<select id="selectRecordByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
from case_payment_record c
<where>
<if test="id != null ">
AND c.case_id = #{id}
</if>
</where>
</select>
</mapper>
@@ -11,7 +11,7 @@
<result column="case_appli_log_id" property="caseAppliLogId" />
</resultMap>
<insert id="batchSave">
INSERT INTO column_value_log ( `COLUMN`, `NAME`, `VALUE`, case_appli_log_id,is_default )
INSERT INTO ms_column_value_log ( `COLUMN`, `NAME`, `VALUE`, case_appli_log_id,is_default )
values
<foreach item="item" index="index" collection="list" separator=",">
@@ -19,11 +19,11 @@
</foreach>
</insert>
<select id="listBycaseAppliLogId" resultMap="BaseResultMap">
select * from column_value_log where case_appli_log_id=#{caseAppliLogId}
select * from ms_column_value_log where case_appli_log_id=#{caseAppliLogId}
</select>
<update id="batchUpdate">
<foreach collection="list" item="item" >
update column_value_log
update ms_column_value_log
<set>
<if test="item.value != null and item.value != ''">
`VALUE` = #{item.value},
@@ -34,7 +34,7 @@
</foreach>
</update>
<select id="queryColumnValueList" parameterType="ColumnValue" resultMap="BaseResultMap">
select * from column_value_log c
select * from ms_column_value_log c
<where>
<if test="caseAppliLogId != null">
AND c.case_appli_log_id = #{caseAppliLogId}
@@ -12,7 +12,7 @@
<result column="is_default" property="isDefault" />
</resultMap>
<insert id="batchSave">
INSERT INTO column_value ( `COLUMN`, `NAME`, `VALUE`, case_id,is_default )
INSERT INTO ms_column_value ( `COLUMN`, `NAME`, `VALUE`, case_id,is_default )
values
<foreach item="item" index="index" collection="list" separator=",">
@@ -21,7 +21,7 @@
</insert>
<update id="batchUpdate">
<foreach collection="list" item="item" >
update column_value
update ms_column_value
<set>
<if test="item.value != null and item.value != ''">
`VALUE` = #{item.value},
@@ -32,7 +32,7 @@
</update>
<update id="updateColumnValue" parameterType="ColumnValue">
update column_value
update ms_column_value
<set>
<if test="value != null and value != ''">
`VALUE` = #{value},
@@ -42,11 +42,11 @@
</update>
<select id="listByCaseId" resultMap="BaseResultMap">
select * from column_value where case_id=#{caseId}
select * from ms_column_value where case_id=#{caseId}
</select>
<select id="queryColumnValueList" parameterType="ColumnValue" resultMap="BaseResultMap">
select * from column_value c
select * from ms_column_value c
<where>
<if test="caseId != null">
AND c.case_id = #{caseId}
@@ -29,7 +29,7 @@
SELECT id, identify_name ,identify_status , identify_date,is_use,org_id,auth_flow_id,
oper_name,oper_phone,identify_type,credit_code,legal_per_name,legal_per_phone
,identify_email,dept_id ,user_id
FROM dept_identify
FROM ms_dept_identify
<where>
<if test="id != null">
AND id = #{id}
@@ -57,7 +57,7 @@
<insert id="insertDeptIdentify" parameterType="DeptIdentify" useGeneratedKeys="true" keyProperty="id">
insert into dept_identify(
insert into ms_dept_identify(
<if test="identifyName != null and identifyName != ''">identify_name,</if>
<if test="identifyStatus != null">identify_status,</if>
<if test="identifyDate != null">identify_date,</if>
@@ -100,7 +100,7 @@
<update id="updateDeptIdentify" parameterType="DeptIdentify">
update dept_identify
update ms_dept_identify
<set>
<if test="identifyDate != null">identify_date = #{identifyDate},</if>
<if test="identifyName != null">identify_name = #{identifyName},</if>
@@ -19,16 +19,16 @@
<select id="listByTemplateId" resultMap="BaseResultMap">
select f.id ,f.file_name ,f.start_content ,f.end_content ,
f.`column` , ifnull(f.is_default,0) is_default ,f.`column_name`,ifnull(f.start_content_repeat_order,1) start_content_repeat_order,ifnull(f.end_content_repeat_order,1) end_content_repeat_order,ifnull(f.fatch_order,0) fatch_order
from fatch_rule f join template_fatch_rule tfr on f.id=tfr.fatch_rule_id
from ms_fatch_rule f join ms_template_fatch_rule tfr on f.id=tfr.ms_fatch_rule_id
where tfr.template_id=#{templateId}
</select>
<select id="selectFatchRuleList" parameterType="FatchRule" resultMap="BaseResultMap">
SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
f.`column` ,f.is_default ,f.`column_name`,f.start_content_repeat_order,f.end_content_repeat_order,f.fatch_order
FROM template_fatch_rule tf
left join template_manage t on tf.template_id = t.id
LEFT JOIN fatch_rule f on tf.fatch_rule_id = f.id
FROM ms_template_fatch_rule tf
left join ms_template_manage t on tf.template_id = t.id
LEFT JOIN ms_fatch_rule f on tf.ms_fatch_rule_id = f.id
<where>
<if test="templateId != null">
AND tf.template_id = #{templateId}
@@ -72,7 +72,7 @@
<select id="selectFatchRuleListIsDefault" parameterType="FatchRule" resultMap="BaseResultMap">
SELECT f.id ,f.file_name ,f.start_content ,f.end_content ,
f.`column` ,f.is_default ,f.`column_name`
FROM fatch_rule f
FROM ms_fatch_rule f
<where>
<if test="isDefault != null">
AND f.is_default = #{isDefault}
@@ -81,14 +81,14 @@
</select>
<delete id="deletebatchFatchRule">
delete from fatch_rule where id in
delete from ms_fatch_rule where id in
<foreach collection="fatchRuleIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="insertFatchRule" parameterType="FatchRule" useGeneratedKeys="true" keyProperty="id">
insert into fatch_rule(
insert into ms_fatch_rule(
<if test="fileName != null and fileName != ''">file_name,</if>
<if test="startContent != null and startContent != ''">start_content,</if>
<if test="endContent != null and endContent != ''">end_content,</if>
@@ -16,7 +16,7 @@
</resultMap>
<insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
insert into identi_authenti(
insert into ms_identi_authenti(
<if test="userId != null">user_id,</if>
<if test="idAddress != null and idAddress != ''">id_address,</if>
<if test="name != null and name != ''">name,</if>
@@ -39,7 +39,7 @@
)
</insert>
<update id="updateIdentityAuthentication">
update identi_authenti
update ms_identi_authenti
<set>
<if test="userId != null ">user_id = #{userId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
@@ -52,7 +52,7 @@
<select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name
from identi_authenti i
from ms_identi_authenti i
<where>
certification_status=0
<if test="userName != null and userName != '' ">
@@ -69,7 +69,7 @@
</select>
<select id="selectCountIdentityAuthentication" resultType="Integer">
select count(1) from identi_authenti i
select count(1) from ms_identi_authenti i
<where>
<if test="userName != null and userName != '' ">
AND i.user_name = #{userName}
@@ -5,7 +5,7 @@
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.ReservedConferenceMapper">
<insert id="insert">
insert into reserved_conference(
insert into ms_reserved_conference(
case_id,
room_id,
schedule_start_time,
@@ -20,17 +20,17 @@
)
</insert>
<delete id="deleteByRoomId">
delete from reserved_conference where room_id=#{roomId}
delete from ms_reserved_conference where room_id=#{roomId}
</delete>
<delete id="batchDeleteByIds">
delete from reserved_conference where id in
delete from ms_reserved_conference where id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<select id="selectListByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.ReservedConference">
select id, case_id caseId,room_id roomId,schedule_start_time scheduleStartTime,schedule_end_time scheduleEndTime,user_id userId
from reserved_conference where case_id=#{caseId}
from ms_reserved_conference where case_id=#{caseId}
</select>
@@ -15,7 +15,7 @@
<select id="selectSealList" parameterType="SealManage" resultMap="SealManageResult">
SELECT id, identify_id ,seal_name , seal_id,annex_id,seal_status,is_use
FROM seal_manage
FROM ms_seal_manage
<where>
<if test="identifyId != null">
AND identify_id = #{identifyId}
@@ -28,7 +28,7 @@
<insert id="insertSealManage" parameterType="SealManage" useGeneratedKeys="true" keyProperty="id">
insert into seal_manage(
insert into ms_seal_manage(
<if test="identifyId != null">identify_id,</if>
<if test="sealName != null and sealName != ''">seal_name,</if>
<if test="sealId != null and sealId != ''">seal_id,</if>
@@ -46,7 +46,7 @@
</insert>
<update id="updateSealManage" parameterType="SealManage">
update seal_manage
update ms_seal_manage
<set>
<if test="identifyId != null">identify_id = #{identifyId},</if>
<if test="sealName != null">seal_name = #{sealName},</if>
@@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
<insert id="insertSealSignRecord" useGeneratedKeys="true" keyProperty="id">
INSERT INTO seal_sign_record (file_id, file_name, sign_flow_id , penson_account
,penson_name,orgnize_name,orgn_name_psn_acc,orgn_name_psn_name,position_pagepsn
,position_xpsn,position_ypsn,position_pageorg,position_xorg,position_yorg,case_appli_id
,sign_flow_status)
VALUES (#{fileid}, #{filename}, #{signFlowid},#{pensonAccount},#{pensonName},#{orgnizeName}
,#{orgnizeNamePsnAccount},#{orgnizeNamepsnName},#{positionPagepsn},#{positionXpsn},#{positionYpsn}
,#{positionPageorg},#{positionXorg},#{positionYorg},#{caseAppliId},#{signFlowStatus})
</insert>
<resultMap type="SealSignRecord" id="SealSignRecordResult">
<id property="id" column="id" />
<result property="caseAppliId" column="case_appli_id" />
<result property="fileid" column="file_id" />
<result property="signFlowid" column="sign_flow_id" />
<result property="signFlowStatus" column="sign_flow_status" />
<result property="pensonAccount" column="penson_account" />
<result property="orgnizeName" column="orgnize_name" />
<result property="orgnizeNamePsnAccount" column="orgn_name_psn_acc" />
</resultMap>
<select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
from seal_sign_record s
<where>
<if test="signFlowStatus != null ">
AND s.sign_flow_status = #{signFlowStatus}
</if>
<if test="caseAppliId != null ">
AND s.case_appli_id = #{caseAppliId}
</if>
</where>
</select>
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.sign_flow_status
from seal_sign_record s join case_application c on s.case_appli_id=c.id
where s.sign_flow_status in (1,2)
</select>
<select id="selectSealSigning" resultType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
SELECT s.sign_flow_id signFlowId,c.id id,c.case_status caseStatus,
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 18 then '待仲裁员审核仲裁文书'
when 31 then '待修改开庭时间'
ELSE '无案件状态'
END caseStatusName,
c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
ca.application_organ_id applicationOrganId ,ca.application_organ_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
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
<!-- where s.sign_flow_status in (0,1,2)-->
<where>
<if test="penSonAccount != null and penSonAccount!='' ">
AND s.penson_account = #{penSonAccount}
</if>
<if test="caseStatus != null and caseStatus!='' ">
AND c.case_status = #{caseStatus}
</if>
</where>
order by c.case_num desc
</select>
<update id="updataSealSignRecord" parameterType="SealSignRecord">
update seal_sign_record
<set>
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
<if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
</set>
where id = #{id}
</update>
</mapper>

Some files were not shown because too many files have changed in this diff Show More