2 Commits
Author SHA1 Message Date
qitz 752fc00837 实现签名功能 2023-10-12 12:11:37 +08:00
qitz b78065223b 实现用印签名功能 2023-10-12 10:04:57 +08:00
179 changed files with 1767 additions and 16542 deletions
-4
View File
@@ -194,10 +194,6 @@
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<excludes>
<exclude>ruoyi-system/**</exclude>
<exclude>ruoyi-common/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
@@ -3,7 +3,6 @@ package com.ruoyi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动程序
@@ -11,7 +10,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
* @author ruoyi
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
public class RuoYiApplication
{
public static void main(String[] args)
@@ -3,7 +3,6 @@ package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.Set;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -27,7 +26,8 @@ import com.ruoyi.system.service.ISysMenuService;
* @author ruoyi
*/
@RestController
public class SysLoginController {
public class SysLoginController
{
@Autowired
private SysLoginService loginService;
@@ -37,9 +37,7 @@ public class SysLoginController {
@Autowired
private SysPermissionService permissionService;
@Autowired
IdentityAuthenticationService identityAuthenticationService;
@Autowired
private ISysUserService sysUserService;
private IdentityAuthenticationService identityAuthenticationService;
/**
* 登录方法
@@ -48,22 +46,20 @@ public class SysLoginController {
* @return 结果
*/
@PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody loginBody) {
public AjaxResult login(@RequestBody LoginBody loginBody)
{
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
loginBody.getUuid());
ajax.put(Constants.TOKEN, token);
//判断该用户是否已经实名认证(certificationStatus1已认证0未认证)
IdentityAuthentication identityAuthentication=new IdentityAuthentication();
identityAuthentication.setUserName(loginBody.getUsername());
String status = identityAuthenticationService.checkIsAuthentication(identityAuthentication);
ajax.put("certificationStatus", status);
// 获取用户信息
SysUser sysUser = sysUserService.selectUserByUserName(loginBody.getUsername());
ajax.put("userId", sysUser!=null?sysUser.getUserId():"");
ajax.put("userName", sysUser!=null?sysUser.getUserName():"");
// IdentityAuthentication identityAuthentication = new IdentityAuthentication();
// identityAuthentication.setUserName(loginBody.getUsername());
// IdentityAuthentication identityAuthenticationselect = identityAuthenticationService.selectIdentityAuthentication(identityAuthentication);
// ajax.put("certificationStatusName", identityAuthenticationselect.getCertificationStatusName());
// ajax.put("certificationStatus", identityAuthenticationselect.getCertificationStatus());
return ajax;
}
@@ -73,7 +69,8 @@ public class SysLoginController {
* @return 用户信息
*/
@GetMapping("getInfo")
public AjaxResult getInfo() {
public AjaxResult getInfo()
{
SysUser user = SecurityUtils.getLoginUser().getUser();
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
@@ -92,7 +89,8 @@ public class SysLoginController {
* @return 路由信息
*/
@GetMapping("getRouters")
public AjaxResult getRouters() {
public AjaxResult getRouters()
{
Long userId = SecurityUtils.getUserId();
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
return AjaxResult.success(menuService.buildMenus(menus));
@@ -3,14 +3,18 @@ package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Anonymous;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
@@ -134,7 +138,7 @@ public class SysUserController extends BaseController
}
user.setCreateBy(getUsername());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
return userService.insertUser(user);
return toAjax(userService.insertUser(user));
}
/**
@@ -160,7 +164,7 @@ public class SysUserController extends BaseController
return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(getUsername());
return userService.updateUser(user);
return toAjax(userService.updateUser(user));
}
/**
@@ -244,15 +248,4 @@ public class SysUserController extends BaseController
{
return success(deptService.selectDeptTreeList(dept));
}
/**
* 根据userId获取用户信息
* @param userId
* @return
*/
@Anonymous
@GetMapping("/selectUserById")
public AjaxResult selectUserById(@RequestParam(required = true) Long userId){
return AjaxResult.success(userService.selectUserById(userId));
}
}
@@ -1,30 +1,20 @@
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.common.core.redis.RedisCache;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
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;
/**
* 生成裁决书
* @param caseApplication
@@ -35,24 +25,19 @@ public class AdjudicationController extends BaseController {
return adjudicationService.createDocument(caseApplication);
}
/**
* 重新生成裁决书
* @param caseApplication
* @return
*/
@PostMapping("/regenerationDocument")
public AjaxResult regenerationDocument(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.regenerationDocument(caseApplication);
}
/**
* 裁决书送达(电子邮件)
* @param bookSendVO
* @param id 案件id
* @param appEmail 申请人邮箱
* @param resEmail 被申请人邮箱
* @param apptrackingNum 申请人快递单号
* @param restrackingNum 被申请人快递单号
* @return
*/
@PostMapping("/delivery")
public AjaxResult sendDocumentByEmail(@RequestBody BookSendVO bookSendVO){
return adjudicationService.sendDocumentByEmail(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
public AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail
,String apptrackingNum,String restrackingNum){
return adjudicationService.sendDocumentByEmail(id,appEmail,resEmail,apptrackingNum,restrackingNum);
}
/**
@@ -61,10 +46,8 @@ public class AdjudicationController extends BaseController {
* @return
*/
@GetMapping("/logistics")
// @PreAuthorize("@ss.hasPermi('delivery:detail')")
public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
return AjaxResult.success(logisticsInfo);
return adjudicationService.getLogisticsInfo(caseApplication);
}
/**
@@ -73,23 +56,18 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/signature")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.signature(caseApplication);
}
/**
* 归档(暂时只改案件状态)
* @param batchCaseApplication
* @param caseApplication
* @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());
public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.caseFile(caseApplication);
}
/**
@@ -98,40 +76,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/service")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
public AjaxResult service(@RequestBody BookSendVO bookSendVO){
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
}
/**
* 用印(暂时只改案件状态)
* @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,10 +1,7 @@
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;
@@ -19,17 +16,17 @@ import java.util.List;
@RequestMapping("/arbitrator")
public class ArbitratorController extends BaseController {
@Autowired
private ISysUserService sysUserService;
private IArbitratorService arbitratorService;
/**
* 查询仲裁员信息
*/
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
@PreAuthorize("@ss.hasPermi('arbitrator:list')")
@GetMapping("/list")
public TableDataInfo list(Arbitrator arbitrator)
{
startPage();
List<SysUser> list = sysUserService.selectUserListByAdRole(arbitrator);
List<Arbitrator> list = arbitratorService.selectArbitratorList(arbitrator);
return getDataTable(list);
}
@@ -1,24 +1,15 @@
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.WxAppletNotifyUtils;
import com.ruoyi.util.FileUtil;
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.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@@ -26,18 +17,15 @@ import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.util.List;
@RestController
@RequestMapping("/caseApplication")
public class CaseApplicationController extends BaseController {
public class CaseApplicationController extends BaseController {
@Autowired
private ICaseApplicationService caseApplicationService;
@@ -45,38 +33,27 @@ public class CaseApplicationController extends BaseController {
/**
* 查询立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list')")
@PreAuthorize("@ss.hasPermi('caseApplication:list')")
@GetMapping("/list")
public TableDataInfo list(CaseApplication caseApplication) {
if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
caseApplication.setSelectCaseStatus("0");
}
public TableDataInfo list(CaseApplication caseApplication)
{
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(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')")
@PreAuthorize("@ss.hasPermi('caseApplication:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
if(caseApplicationCount>0){
return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
}
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
}
@@ -84,371 +61,162 @@ public class CaseApplicationController extends BaseController {
/**
* 修改立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@PreAuthorize("@ss.hasPermi('caseApplication:edit')")
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplication")
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
caseApplication.setUpdateBy(getUsername());
return caseApplicationService.editCaseApplication(caseApplication);
return toAjax(caseApplicationService.editCaseApplication(caseApplication));
}
/**
* 提交立案申请
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
@PreAuthorize("@ss.hasPermi('caseApplication: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()));
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.submitCaseApplication(caseApplication));
}
/**
* 删除立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
@PreAuthorize("@ss.hasPermi('caseApplication:remove')")
@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()));
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.deletecaseApplicationByIds(caseApplication));
}
/**
* 查询立案信息
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
@PostMapping("/selectCaseApplication")
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
return success(caseApplicationselect);
}
/**
* 查询已签署裁决书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);
}
public void importTemplate(HttpServletResponse response)
{
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
util.importTemplateExcel(response, "立案申请数据");
}
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
// @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
@PreAuthorize("@ss.hasPermi('caseApplication: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);
String message = caseApplicationService.importCaseApplication(caseApplicationList,operName);
return success(message);
}
/**
* 组庭
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@Log(title = "组庭", businessType = BusinessType.UPDATE)
@PostMapping("/pendTral")
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendTral(caseApplication));
}
/**
* 组庭审核
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralCheck')")
@Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendTralCheck(caseApplication));
}
/**
* 组庭确认
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralSure')")
@Log(title = "组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSure")
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendTralSure(caseApplication));
}
/**
* 修改开庭时间
*/
@Log(title = "修改开庭时间", businessType = BusinessType.UPDATE)
@PostMapping("/updateHeardate")
public AjaxResult updateHeardate(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.updateHeardate(caseApplication));
}
/**
* 核验裁决书
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
@PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
@Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecord")
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.verificationArbitrateRecord(caseApplication));
}
/**
* 审核裁决书
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecord")
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.checkArbitrateRecord(caseApplication);
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.checkArbitrateRecord(caseApplication));
}
/**
* 是否指派仲裁员
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
@PostMapping("/pendingAppointArbotrar")
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
}
/**
* 提交立案审查
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
@PreAuthorize("@ss.hasPermi('caseApplication:submitCaseApplicationCheck')")
@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()));
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.submitCaseApplicationCheck(caseApplication));
}
/**
* 确认缴费查询立案信息
*/
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
@PostMapping("/selectCaseApplicationConfirm")
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication)
{
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
return success(caseApplicationselect);
}
/**
* 发送房间号短信
*/
@Anonymous
@PostMapping("/sendRoomNoMessage")
public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO) {
String result = caseApplicationService.sendRoomNoMessage(messageVO);
return success(result);
}
/**
* 获取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 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) throws IOException {
return caseApplicationService.uploadCaseZipFile(file);
}
/**
* 根据附件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,20 +1,14 @@
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 {
@@ -28,20 +22,18 @@ public class CaseArbitrateController extends BaseController {
* @return
*/
@PutMapping("/method")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
, Integer opinion){
,Integer opinion){
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
}
/**
* 书面审理
* @param
* @param arbitrateRecord
* @return
*/
@PostMapping("/writtenHear")
public AjaxResult writtenHear(@RequestBody CaseIds caseIds){
return caseArbitrateService.writtenHear(caseIds);
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseArbitrateService.writtenHear(arbitrateRecord);
}
}
@@ -1,17 +1,13 @@
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;
@@ -41,7 +37,7 @@ public class CaseEvidenceController extends BaseController {
@GetMapping("/{id}")
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
String username = this.getUsername();
return caseEvidenceService.getCaseDetailsById(id, username);
return caseEvidenceService.getCaseDetailsById(id,username);
}
/**
@@ -56,89 +52,41 @@ public class CaseEvidenceController extends BaseController {
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);
return caseEvidenceService.uploadEvidence(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
* @param identityNum
* @return
*/
@GetMapping("/all")
public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
return success(caseEvidenceService.getCaseListAll(caseStatus));
public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
startPage();
List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
if (list != null) {
return getDataTable(list);
}
return getDataTable(new ArrayList<>());
}
/**
* 证据确认
*
* @param caseApplication 案件对象
* @return 统一返回结果
*/
@PutMapping("/confirm")
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication){
return caseEvidenceService.evidenceConfirmation(caseApplication);
}
/**
* 案件质证
*
* @param caseEvidenceDTO
* @return
*/
@PostMapping("/crossexami")
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO){
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
}
/**
* 获取证据目录树列表
*/
@GetMapping("/evidenceTree")
public AjaxResult evidenceTree(CaseEvidenceDirectory caseEvidenceDirectory)
{
return success(caseEvidenceService.selectEvidenceTreeList(caseEvidenceDirectory)) ;
}
}
@@ -1,7 +1,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;
@@ -23,12 +22,13 @@ public class CaseLogRecordController extends BaseController {
/**
* 查询案件日志列表
*/
// @PreAuthorize("@ss.hasPermi('caseLog:list')")
@PreAuthorize("@ss.hasPermi('caseLogRecord:list')")
@GetMapping("/list")
public AjaxResult list(CaseLogRecord caseLogRecord)
public TableDataInfo list(CaseLogRecord caseLogRecord)
{
startPage();
List<CaseLogRecord> list = caseLogRecordService.selectCaseLogRecordList(caseLogRecord);
return AjaxResult.success(list);
return getDataTable(list);
}
@@ -2,7 +2,6 @@ package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.domain.AjaxResult;
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;
@@ -25,39 +24,18 @@ public class CasePaymentController {
* @param casePayDTO 缴费传入参数
* @return 统一响应结果
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/casePay")
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePay(casePayDTO);
}
/**
* 确认缴费
* @param payDTO 缴费传入参数
* @return 统一响应结果
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/confirmPay")
public AjaxResult confirmPay(@Validated @RequestBody CaseConfirmPayDTO payDTO) {
return paymentService.confirmPay(payDTO);
}
/**
* 缴费确认
* @param caseApplication
* @return
*/
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
@PutMapping("/confirm")
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
return paymentService.confirmPayment(caseApplication);
}
/**
* 缴费列表查询
* @param casePayDTO
* @return
*/
@GetMapping("/list")
public AjaxResult casePayList(CasePayDTO casePayDTO) {
return paymentService.casePayList(casePayDTO);
}
}
@@ -1,180 +0,0 @@
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.common.exception.EsignDemoException;
import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.vo.SealListVO;
import com.ruoyi.wisdomarbitrate.service.IDeptIdentifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@RestController
@RequestMapping("/deptIdentify")
public class DeptIdentifyController extends BaseController {
@Autowired
private IDeptIdentifyService deptIdentifyService;
/**
* 新增机构
* @param deptIdentify
* @return
*/
@PostMapping("/insert")
public AjaxResult insertDeptIdentify(@RequestBody DeptIdentify deptIdentify){
return deptIdentifyService.insertDeptIdentify(deptIdentify);
}
/**
* 删除机构
* @param id
* @return
*/
@DeleteMapping("/delete")
public AjaxResult deleteDeptIdentify(Long id){
return deptIdentifyService.deleteDeptIdentify(id);
}
/**
* 修改机构信息
* @param deptIdentify
* @return
*/
@PutMapping("/update")
public AjaxResult updateDeptIdentify(@RequestBody DeptIdentify deptIdentify){
return deptIdentifyService.updateDeptIdentify(deptIdentify);
}
/**
* 查询机构信息
*/
@GetMapping("/list")
public TableDataInfo list(DeptIdentify deptIdentify) {
startPage();
List<DeptIdentify> list = deptIdentifyService.selectDeptIdentify(deptIdentify);
return getDataTable(list);
}
/**
* 查询机构认证链接
*/
@PostMapping("/selectDeptIndefiUrl")
public AjaxResult selectDeptIndefiUrl(@Validated @RequestBody DeptIdentify deptIdentify) throws EsignDemoException {
DeptIdentify deptIdentifyselect = deptIdentifyService.selectDeptIndefiUrl(deptIdentify);
return success(deptIdentifyselect);
}
/**
* 机构启用/禁用
*/
@PostMapping("/enableDept")
public AjaxResult enableDept(@Validated @RequestBody DeptIdentify deptIdentify) {
return deptIdentifyService.enableDept(deptIdentify);
}
/**
* 上传自定义公章
*
* @param
* @param file
* @return
*/
@PostMapping("/sealUpload")
public AjaxResult sealUpload(Long id, String sealName , @RequestParam("file") MultipartFile file) {
return deptIdentifyService.sealUpload(id, sealName ,file);
}
/**
* 接收E签宝回调通知
* @param body
* @return
*/
@GetMapping("/notify")
public AjaxResult receiveNotify(String body) {
return deptIdentifyService.receiveNotify(body);
}
/**
* 公章列表查询
* @param deptIdentify
* @return
*/
@GetMapping("/sealList")
public TableDataInfo getSealList( DeptIdentify deptIdentify ){
startPage();
List<SealManage> sealList = deptIdentifyService.getSealList(deptIdentify);
return getDataTable(sealList);
}
/**
* 印章启用或者禁用
* @param sealManage
* @return
*/
@PostMapping("/updateSealLockStatus")
public AjaxResult updateSealLockStatus(@Validated @RequestBody SealManage sealManage){
if(sealManage.getId()==null ||sealManage.getIsUse()==null){
return error("参数校验失败");
}
return deptIdentifyService.updateSealLockStatus(sealManage);
}
/**
* 新增模板
* @param templateManage
* @return
*/
@PostMapping("/insertTemplate")
public AjaxResult insertTemplate(TemplateManage templateManage,@RequestParam("file") MultipartFile file){
return deptIdentifyService.insertTemplate(templateManage,file);
}
/**
* 修改模板
* @param templateManage
* @return
*/
@PostMapping("/updateTemplate")
public AjaxResult updateTemplate(TemplateManage templateManage,@RequestParam(value = "file", required = false) MultipartFile file){
return deptIdentifyService.updateTemplate(templateManage,file);
}
/**
* 删除模板
* @param id
* @return
*/
@DeleteMapping("/deleteTemplate")
public AjaxResult deleteTemplate(Long id){
return deptIdentifyService.deleteTemplate(id);
}
/**
* 根据机构id查询模板
* @param deptIdentify
* @return
*/
@GetMapping("/getTemplate")
public TableDataInfo getTemplateList( DeptIdentify deptIdentify){
startPage();
List<TemplateManage> sealList = deptIdentifyService.getTemplateList(deptIdentify);
return getDataTable(sealList);
}
/**
* 根据部门id查询岗位用户信息
*/
@GetMapping("selectPostUserByDeptId")
public AjaxResult selectPostUserByDeptId(DeptIdentify deptIdentify){
return AjaxResult.success(deptIdentifyService.selectPostUserByDeptId(deptIdentify));
}
/**
* 给机构绑定经办人
*/
@GetMapping("bindHandler")
public AjaxResult bindHandler(DeptIdentify deptIdentify){
return deptIdentifyService.bindHandler(deptIdentify);
}
}
@@ -1,9 +1,8 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.alibaba.fastjson.JSONObject;
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.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,29 +14,40 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/identityAuthentication")
public class IdentityAuthenticationController extends BaseController {
public class IdentityAuthenticationController extends BaseController {
@Autowired
private IdentityAuthenticationService identityAuthenticationService;
/**
* 获取EIDtoken
* 查询身份认证EIDtoken
*/
@Anonymous
@PostMapping("/selectIdentityAuthenticaEIDtoken")
public AjaxResult selectIdentityAuthenticaEIDtoken() {
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
return success(tokenResult);
public AjaxResult selectIdentityAuthenticaEIDtoken()
{
IdentityAuthentication ientityAuthentication = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
return success(ientityAuthentication);
}
/**
* 小程序人脸核身后查询身份认证结果
* 查询身份认证结果
*/
@Anonymous
@PostMapping("/selectIdentityAuthenticaRespon")
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
return checkResult;
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication)
{
String username = this.getUsername();
Long userId = this.getUserId();
ientityAuthentication.setUserId(userId);
ientityAuthentication.setUserName(username);
IdentityAuthentication ientityAuthenticationRes = identityAuthenticationService.selectIdentityAuthenticaRespon( ientityAuthentication);
return success(ientityAuthenticationRes);
}
}
@@ -1,48 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.domain.SendMailRecord;
import com.ruoyi.wisdomarbitrate.service.ISendMailRecordService;
import org.springframework.beans.factory.annotation.Autowired;
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("/sendMailRecord")
public class SendMailRecordController extends BaseController {
@Autowired
private ISendMailRecordService sendMailRecordService;
/**
* 查询发送邮件记录列表
*/
@GetMapping("/list")
public TableDataInfo list(SendMailRecord sendMailRecord)
{
startPage();
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
return getDataTable(list);
}
// /**
// * 新增立案数据
// */
// @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
// @PostMapping("/addSendMailRecord")
// public AjaxResult addSendMailRecord(@Validated @RequestBody SendMailRecord sendMailRecord)
// {
//
// return toAjax(sendMailRecordService.addSendMailRecord(sendMailRecord));
// }
}
@@ -1,59 +0,0 @@
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.DeptIdentify;
import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
import com.ruoyi.wisdomarbitrate.service.ITemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/template")
public class TemplateController extends BaseController {
@Autowired
private ITemplateService templateService;
/**
* 新增模板
* @param templateManual
* @return
*/
@PostMapping("/insert")
public AjaxResult insertTemplate(@RequestBody TemplateManual templateManual){
return templateService.insertTemplate(templateManual);
}
/**
* 删除模板
* @param id
* @return
*/
@DeleteMapping("/delete")
public AjaxResult deleteTemplate(Long id){
return templateService.deleteTemplate(id);
}
/**
* 修改模板
* @param templateManual
* @return
*/
@PutMapping("/update")
public AjaxResult updateTemplate(@RequestBody TemplateManual templateManual){
return templateService.updateTemplate(templateManual);
}
/**
* 查询模板
*/
@GetMapping("/list")
public TableDataInfo list( TemplateManual templateManual) {
startPage();
List<TemplateManual> list = templateService.selectTemplate(templateManual);
return getDataTable(list);
}
}
@@ -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);
}
}
@@ -1,62 +0,0 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author wangqiong
* @description 微信小程序用户注册登录
* @date 2023-10-16 11:25
*/
@RestController
@RequestMapping("/weChatUser")
public class WeChatUserController extends BaseController {
@Autowired
private WeChatUserService weChatUserService;
/**
* 小程序端获取手机验证码
* @param userVO
* @return
*/
@Anonymous
@GetMapping("/sendCode")
public AjaxResult sendCode( WeChatUserVO userVO)
{
if(StrUtil.isEmpty(userVO.getPhone())){
return warn("手机号不能为空");
}
return weChatUserService.sendCode(userVO);
}
/**
* 小程序注册
*/
@Anonymous
@PostMapping("/registerUser")
public AjaxResult registerUser( @RequestBody IdentityAuthentication ientityAuthentication) {
if(ientityAuthentication.getId()==null
|| StrUtil.isEmpty(ientityAuthentication.getName())
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|| StrUtil.isEmpty(ientityAuthentication.getUserName())
|| StrUtil.isEmpty(ientityAuthentication.getEmail())
|| StrUtil.isEmpty(ientityAuthentication.getVerifyCode())
){
return warn("参数校验失败");
}
logger.info("调用小程序注册==="+ientityAuthentication.toString());
return weChatUserService.registerUser(ientityAuthentication);
}
}
@@ -6,9 +6,9 @@ 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/arbitrate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
password: root123456
# 从库数据源
slave:
# 从数据源开关/默认关闭
+6 -22
View File
@@ -18,7 +18,7 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8080
port: 8001
port: 9001
servlet:
# 应用的访问路径
context-path: /
@@ -58,9 +58,9 @@ spring:
servlet:
multipart:
# 单个文件大小
max-file-size: 50MB
max-file-size: 10MB
# 设置总上传的文件大小
max-request-size: 500MB
max-request-size: 20MB
# 服务模块
devtools:
restart:
@@ -94,20 +94,14 @@ spring:
mail:
host: smtp.163.com
port: 25
username: lmj1549843951@163.com
password: JGIOQVFCLAZKXRKO
username: hjbjava@163.com
password: BSRSSEPJWGNNVYYL
default-encoding: UTF-8
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
socketFactoryClass: javax.net.ssl.SSLSocketFactory
socketFactoryFallback: false
socketFactoryPort: 465
debug: false
protocol: smtp
#上上签配置参数
ssq:
developerId: 1695872832013855470
@@ -172,14 +166,4 @@ identityAuthentication:
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
merchantId: 0NSJ2309281116194321
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
# 腾讯云即时通信相关配置
imConfig:
# sdkAppId
sdkAppId: 1600011167
# 密钥
sdkSecretKey: 17d136d9327576a247f991bdfed3a6d14cebc7d540a52245086829c3a1421a86
# 腾讯云账户 SecretId
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
# 腾讯云密钥
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
privateKeyHexDecodeinfo: MHcCAQEEIEw7MRv3uYlpmU6Fko4GlXSh6Vd38k0cUQZ5zDwvRg+voAoGCCqBHM9VAYItoUQDQgAEUdxIAWhGg4LUXf1GoPdb8XMbGudpexPQCuaaRi9BCnNbpaF1kcwRhhsBKvop9ZmW/nOz4wQ1r/iIEOrc9qCXgQ==
+23 -46
View File
@@ -60,11 +60,11 @@
</dependency>
<!-- 动态数据源 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.2</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
@@ -136,15 +136,27 @@
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.876</version>
<version>3.1.270</version>
</dependency>
<!--
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
<version>3.1.875</version>
<version>3.1.871</version>
</dependency>
<!--用户信息解密-->
-->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-common</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
@@ -164,45 +176,13 @@
<version>1.9.1</version>
</dependency>
<dependency>
<groupId>com.documents4j</groupId>
<artifactId>documents4j-local</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.documents4j</groupId>
<artifactId>documents4j-transformer-msoffice-word</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
<dependency>
<groupId>com.itextpdf.tool</groupId>
<artifactId>xmlworker</artifactId>
<version>5.5.13</version>
</dependency>
<!-- 发送邮件-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
@@ -215,10 +195,7 @@
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
</dependencies>
@@ -1,13 +0,0 @@
package com.ruoyi.common.annotation;
/**
* 一个参数、没有返回
* @author wangqiong
*/
@FunctionalInterface
public interface VoidFunction<T> {
/**
* 有一个参数
* @param param
*/
void apply(T param);
}
@@ -132,17 +132,4 @@ public class RuoYiConfig
{
return getProfile() + "/upload";
}
/**
* 获取上传路径
*/
public static String getVideoUploadPath()
{
return getProfile() + "/video";
}
public static String getHtml2PDFPath()
{
return getProfile() + "/upload/html2PDF";
}
// https://1304001529.vod-qcloud.com/b78823bbvodcq1304001529/3ce565bf3270835011486046286/f0.mp4
}
@@ -41,5 +41,4 @@ public class CacheConstants
* 登录账户密码错误次数 redis key
*/
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
public static final String WE_CHAT_SMS_VERIFY_CODE_KEY="we_chat_sms_verify_code:";
}
@@ -45,9 +45,6 @@ public class CaseApplicationConstants {
/** 已归档*/
public static final int CASE_ARCHIVED = 17;
/** 待修改开庭时间*/
public static final int MODIFY_HEARDATE = 31;
@@ -128,8 +128,6 @@ public class Constants
* LDAPS 远程方法调用
*/
public static final String LOOKUP_LDAPS = "ldaps:";
public static final String DEFAULT_PASSWORD = "123456";
public static final String SPLIT_COMMA =",";
/**
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
@@ -7,7 +7,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysMenu;
/**
* Treeselect树结构实体类
*
@@ -39,7 +38,6 @@ public class TreeSelect implements Serializable
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public TreeSelect(SysMenu menu)
{
this.id = menu.getMenuId();
@@ -31,9 +31,6 @@ public class SysDept extends BaseEntity
/** 部门名称 */
private String deptName;
/** 部门类型 */
private Integer deptType;
/** 显示顺序 */
private Integer orderNum;
@@ -55,14 +52,6 @@ public class SysDept extends BaseEntity
/** 父部门名称 */
private String parentName;
public Integer getDeptType() {
return deptType;
}
public void setDeptType(Integer deptType) {
this.deptType = deptType;
}
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
@@ -33,14 +33,9 @@ public class SysUser extends BaseEntity
@Excel(name = "登录名称")
private String userName;
/** 用户昵称 */
@Excel(name = "用户名称")
private String nickName;
/** 用户身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
@@ -302,21 +297,12 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("deptId", getDeptId())
.append("userName", getUserName())
.append("idCard", getIdCard())
.append("nickName", getNickName())
.append("email", getEmail())
.append("phonenumber", getPhonenumber())
@@ -1,38 +0,0 @@
package com.ruoyi.common.enums;
/**
* @author wangqiong
* @description 修改案件的提交状态
* @date 2023-11-17 14:05
*/
public enum UpdateSubmitStatus
{
UNCOMMITTED(0, "未提交"),
COMMITTED(1, "已提交"),
REVOKE(2, "撤销"),
AGREE(3, "同意已修改的案件"),
REFUSE(4, "拒绝已修改的案件"),
AGREE_REVOKE(5, "同意撤销修改"),
REFUSE_REVOKE(6, "拒绝撤销修改"),
;
private final Integer code;
private final String text;
UpdateSubmitStatus(Integer code, String text)
{
this.code = code;
this.text = text;
}
public Integer getCode()
{
return code;
}
public String getText()
{
return text;
}
}
@@ -1,33 +0,0 @@
package com.ruoyi.common.enums;
/**
* @author wangqiong
* @description 是否枚举
* @date 2023-11-17 14:05
*/
public enum YesOrNoEnum
{
NO(0, "否"),
YES(1, "是"),
;
private final Integer code;
private final String text;
YesOrNoEnum(Integer code, String text)
{
this.code = code;
this.text = text;
}
public Integer getCode()
{
return code;
}
public String getText()
{
return text;
}
}
@@ -11,19 +11,12 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.stereotype.Component;
import javax.activation.DataHandler;
import javax.mail.*;
import javax.mail.internet.*;
import javax.mail.util.ByteArrayDataSource;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import javax.validation.constraints.NotNull;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.Security;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -47,15 +40,15 @@ public class EmailOutUtil {
// @Value("${spring.mail-out-network.from}")
// private static String fromOut;
@Value("${spring.mail.host}")
private String hostOut;
private String hostOut;
@Value("${spring.mail.username}")
private String usernameOut;
private String usernameOut;
@Value("${spring.mail.password}")
private String passwordOut;
private String passwordOut;
@Value("${spring.mail.port}")
private Integer portOut;
private Integer portOut;
public JavaMailSender rebuildMailSender() {
public JavaMailSender rebuildMailSender() {
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost(hostOut);
mailSender.setUsername(usernameOut);
@@ -73,7 +66,7 @@ public class EmailOutUtil {
* @param subject 邮件主题
* @param content 邮件内容(发送内容)
*/
public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
// 创建一个邮件对象
SimpleMailMessage msg = new SimpleMailMessage();
msg.setFrom(from);
@@ -87,93 +80,15 @@ public class EmailOutUtil {
////System.out.println("发送成功:" + from + ":to:" + to);
}
/**
* @param to 收件人
* @param message 邮件内容
* @param subject 邮件主题
* @param fileList 邮件附件
*/
public Boolean sendEmil(String to, String message, String subject, List<File> fileList, File file) {
try {
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent(messageContent, "text/html;charset=utf-8");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
//设置邮件会话参数
Properties props = new Properties();
//邮箱的发送服务器地址
props.setProperty("mail.smtp.host", "smtp.163.com");
props.setProperty("mail.smtp.socketFactory.class", SSL_FACTORY);
props.setProperty("mail.smtp.socketFactory.fallback", "false");
//邮箱发送服务器端口,这里设置为465端口
props.setProperty("mail.smtp.port", "465");
props.setProperty("mail.smtp.socketFactory.port", "465");
props.put("mail.smtp.auth", "true");
//获取到邮箱会话,利用匿名内部类的方式,将发送者邮箱用户名和密码授权给jvm
Session session = Session.getDefaultInstance(props, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(usernameOut, passwordOut);
}
});
//通过会话,得到一个邮件,用于发送
Message msg = new MimeMessage(session);
//设置发件人
msg.setFrom(new InternetAddress(usernameOut));
//设置收件人,to为收件人,cc为抄送,bcc为密送
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(to, false));
msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(to, false));
//设置邮件消息
msg.setSubject(subject);
msg.setText(message);
msg.setDescription("messageutf-8html");
//设置发送的日期
msg.setSentDate(new Date());
// 创建邮件正文
MimeMultipart multipart = new MimeMultipart();
// MimeBodyPart bodyPart = new MimeBodyPart();
// bodyPart.setContent("This is the body of the email", "text/html");
multipart.addBodyPart(messageBodyPart);
// 添加附件
if (file != null) {
MimeBodyPart attachmentPart = new MimeBodyPart();
attachmentPart.attachFile(file);
attachmentPart.setFileName(MimeUtility.encodeText(file.getName()));
multipart.addBodyPart(attachmentPart);
//将multipart对象放入邮件
msg.setContent(multipart);
} else if (fileList != null && fileList.size() > 0) {
// 添加附件(多个)
if (fileList != null && fileList.size() > 0) {
for (File tempfile : fileList) {
MimeBodyPart attachmentPart = new MimeBodyPart();
attachmentPart.attachFile(tempfile);
attachmentPart.setFileName(MimeUtility.encodeText(tempfile.getName()));
multipart.addBodyPart(attachmentPart);
}
msg.setContent(multipart);
}
}
//调用Transport的send方法去发送邮件
Transport.send(msg);
} catch (Exception e) {
e.printStackTrace();
return Boolean.FALSE;
}
return Boolean.TRUE;
}
/**
* 发送带附件的邮件信息
*
* @param to 接收方
* @param subject 邮件主题
* @param content 邮件内容(发送内容)
* @param fileList 文件集合 // 可发送多个附件
* @param to 接收方
* @param subject 邮件主题
* @param content 邮件内容(发送内容)
* @param fileList 文件集合 // 可发送多个附件
*/
public void sendMessageCarryFiles(String to, String subject, String content, List<File> fileList, String from, @NotNull JavaMailSender mailSender) {
public void sendMessageCarryFiles(String to, String subject, String content, List<File> fileList, String from, @NotNull JavaMailSender mailSender) {
MimeMessage mimeMessage = mailSender.createMimeMessage();
try {
MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);
@@ -1,49 +0,0 @@
package com.ruoyi.common.utils;
import java.lang.reflect.Field;
/**
* 反射工具类
*/
public class ObjectFieldUtils {
public static String getValue(Object obj,String fieldName){
Field field=null;
try{
field=obj.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
return String.valueOf(field.get(obj)==null?"":field.get(obj));
}catch (Exception e){
if(obj.getClass().getSuperclass()!=Object.class){
try{
field=obj.getClass().getSuperclass().getDeclaredField(fieldName);
field.setAccessible(true);
return String.valueOf(field.get(obj)==null?"":field.get(obj));
}catch (Exception e1){
e.printStackTrace();
}
}
e.printStackTrace();
}
return null;
}
public static void setValue(Object obj,String fieldName,Object value){
Field field=null;
try{
field=obj.getClass().getDeclaredField(fieldName);
field.setAccessible(true);
field.set(obj,value);
}catch (Exception e){
if(obj.getClass().getSuperclass()!=Object.class){
try{
field=obj.getClass().getSuperclass().getDeclaredField(fieldName);
field.setAccessible(true);
field.set(obj,value);
}catch (Exception e1){
e.printStackTrace();
}
}
e.printStackTrace();
}
}
}
@@ -1,147 +0,0 @@
package com.ruoyi.common.utils;
import com.documents4j.api.DocumentType;
import com.documents4j.api.IConverter;
import com.documents4j.job.LocalConverter;
import com.itextpdf.text.Document;
import com.itextpdf.text.Font;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfWriter;
import com.itextpdf.tool.xml.XMLWorkerFontProvider;
import com.itextpdf.tool.xml.XMLWorkerHelper;
import com.ruoyi.common.config.RuoYiConfig;
import com.tencentcloudapi.teo.v20220901.models.CC;
import lombok.extern.slf4j.Slf4j;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.file.Files;
import static cn.hutool.core.util.ClassLoaderUtil.getClassLoader;
/**
* @author wangqiong
* @description pdf转换工具类
* @date 2023-11-28 15:20
*/
@Slf4j
public class PdfUtils {
/**
* 将html字符串转为pdf
* @param pdfFilePath 保存的路径
* @param htmlcontent:必须是完整的html格式,比如<html><body>123</body></html>
*/
public static boolean htmlStringConvertToPDF(String pdfFilePath, String htmlcontent) {
Document document = new Document();
PdfWriter writer = null;
try {
writer = PdfWriter.getInstance(document, new FileOutputStream(pdfFilePath));
// 设置底部距离60,解决重叠问题
document.setPageSize(PageSize.A4);
document.setMargins(50, 45, 50, 60);
document.setMarginMirroring(false);
document.open();
// 解决PDF中文不显示
String fontPath = "/D:/simsun.ttf"; //字体文件路径
XMLWorkerFontProvider provider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
provider.register(fontPath);//注册字体
log.error("注册字体");
XMLWorkerHelper.getInstance().parseXHtml(writer, document, new ByteArrayInputStream(htmlcontent.getBytes("UTF-8")), Charset.forName("UTF-8"), provider);
} catch (Exception e) {
log.error("htmlStringConvertToPDF error", e.getMessage());
return false;
} finally {
if (null != document) {
document.close();
}
if (null != writer) {
writer.close();
}
}
return true;
}
/**
* 根据html文件生成pdf
* @param pdfFilePath pdf文件生成路径
* @param htmlFilePath html文件路径
*/
public static boolean htmlFileConvertToPDF(String pdfFilePath, String htmlFilePath) {
Document document = new Document();
PdfWriter writer = null;
FileOutputStream fileOutputStream = null;
FileInputStream fileInputStream = null;
try {
fileOutputStream = new FileOutputStream(pdfFilePath);
writer = PdfWriter.getInstance(document, fileOutputStream);
// 设置底部距离60,解决重叠问题
document.setPageSize(PageSize.A4);
document.setMargins(50, 45, 50, 60);
document.setMarginMirroring(false);
document.open();
StringBuffer sb = new StringBuffer();
fileInputStream = new FileInputStream(htmlFilePath);
BufferedReader br = new BufferedReader(new InputStreamReader(fileInputStream, "UTF-8"));
String readStr = "";
while ((readStr = br.readLine()) != null) {
sb.append(readStr);
}
XMLWorkerHelper.getInstance().parseXHtml(writer, document, new ByteArrayInputStream(sb.toString().getBytes("Utf-8")), null, Charset.forName("UTF-8"));
} catch (Exception e) {
e.printStackTrace();
} finally {
if (null != document) {
document.close();
}
if (null != writer) {
writer.close();
}
if (null != fileInputStream) {
try {
fileInputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (null != fileOutputStream) {
try {
fileOutputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return true;
}
/**
* docx转pdf
* @param pdfSaveDirectory:文件保存目录,例:D:\\pdf\\
* @param fileName:保存的文件名称,例:test.pdf
* @param docxFile:需要转换的docx文件
* @return
*/
private static boolean docxConvertToPDF(String pdfSaveDirectory,String fileName,File docxFile) {
// 不存在则新建
File directory = new File(pdfSaveDirectory);
if (!directory.exists()) {
directory.mkdirs();
}
String pdfFilePath = pdfSaveDirectory + fileName;
File outputFile = new File(pdfFilePath);
try {
InputStream docxInputStream = Files.newInputStream(docxFile.toPath());
OutputStream outputStream = Files.newOutputStream(outputFile.toPath());
IConverter converter = LocalConverter.builder().build();
converter.convert(docxInputStream).as(DocumentType.DOCX).to(outputStream).as(DocumentType.PDF).execute();
docxInputStream.close();
outputStream.close();
} catch (Exception e) {
return false;
}
return true;
}
}
@@ -1,123 +0,0 @@
package com.ruoyi.common.utils;
import com.ruoyi.common.config.EsignDemoConfig;
import com.ruoyi.common.constant.EsignHeaderConstant;
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.bean.EsignFileBean;
import java.util.Map;
public class SealUtil {
private static String eSignHost = EsignDemoConfig.EsignHost;
private static String eSignAppId = EsignDemoConfig.EsignAppId;
private static String eSignAppSecret = EsignDemoConfig.EsignAppSecret;
/**
* 获取机构认证&授权页面链接
*
* @return
*/
public static EsignHttpResponse getOrgEmpower() throws EsignDemoException {
String apiaddr = "/v3/org-auth-url";
String nickName = "何进波";
String phonenumber = "15191509780";
String deptName = "西安云美公司";
String jsonParm = "{\n" +
" \"orgAuthConfig\": {\n" +
" \"orgName\": \"" + deptName + " \",\n" +
" \"transactorInfo\": {\n" +
" \"psnAccount\": \"" + phonenumber + "\",\n" +
" \"psnInfo\": {\n" +
" \"psnName\": \"" + nickName + "\",\n" +
" \"psnMobile\": \"" + phonenumber + "\"\n" +
" }\n" +
" }\n" +
" },\n" +
" \"authorizeConfig\": {\n" +
" \"authorizedScopes\": [\n" +
" \"get_org_identity_info\",\n" +
" \"get_psn_identity_info\",\n" +
" \"org_initiate_sign\",\n" +
" \"psn_initiate_sign\",\n" +
" \"manage_org_resource\",\n" +
" \"manage_psn_resource\",\n" +
" \"use_org_order\"\n" +
" ]\n" +
" }\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 查询认证授权流程详情
*
* @return
*/
public static EsignHttpResponse queryAuthProcess(String authFlowId ) throws EsignDemoException {
String apiaddr = "/v3/auth-flow/" + authFlowId;
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm=null;
//请求方法
EsignRequestType requestType= EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
}
/**
* 步骤一:获取印章图片上传地址fileUploadUrl
*
* @return
*/
public static EsignHttpResponse getFileUploadUrl(String filePath) throws EsignDemoException {
//自定义的文件封装类,传入文件地址可以获取文件的名称大小,文件流等数据
EsignFileBean esignFileBean = new EsignFileBean(filePath);
String apiaddr="/v3/files/file-key";
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm="{\n" +
" \"contentMd5\": \""+esignFileBean.getFileContentMD5()+"\",\n" +
" \"fileName\":\""+esignFileBean.getFileName()+"\"," +
" \"fileSize\": "+esignFileBean.getFileSize()+",\n" +
" \"contentType\": \""+ EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE()+"\"\n" +
"}";
//请求方法
EsignRequestType requestType= EsignRequestType.POST;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 步骤二:将印章图片文件流上传到fileUploadUrl
*
* @return
*/
public static EsignHttpResponse fileStreamUpload(String uploadUrl,String filePath) throws EsignDemoException {
//根据文件地址获取文件contentMd5
EsignFileBean esignFileBean = new EsignFileBean(filePath);
//请求方法
EsignRequestType requestType= EsignRequestType.PUT;
return EsignHttpHelper.doUploadHttp(uploadUrl,requestType,esignFileBean.getFileBytes(),esignFileBean.getFileContentMD5(), EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE(),true);
}
public static void main(String[] args) throws Exception {
queryAuthProcess("OF-2b1e52987408005c");
// createOrgByImage();
// getOrgEmpower();
// queryAuthProcess("OF-2b00885895080028");
// getFileUploadUrl();
// String uplodUrl = "https://esignoss.esign.cn/7438987614/8e278262-5960-4004-bff3-297c11e2652e/Snipaste_2023-10-27_09-59-23.jpg?Expires=1699439095&OSSAccessKeyId=STS.NTZ8NBHcTVQXgsxVRH4iyC5AY&Signature=3yu3ZQifphZsnOgN0CI0SJdqFhY%3D&callback-var=eyJ4OmZpbGVfa2V5IjoiJDliM2Y3ZjkyLTdkOWUtNGZkZi04NWU4LWE4ZDU4MzEwZjIzOCQ0MTQwNTE2ODk5In0%3D%0A&callback=eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9zbWx0YXBpLnRzaWduLmNuL2FueWRvb3IvZmlsZS1zeXN0ZW0vY2FsbGJhY2svYWxpb3NzIiwiY2FsbGJhY2tCb2R5IjogIntcIm1pbWVUeXBlXCI6JHttaW1lVHlwZX0sXCJzaXplXCI6ICR7c2l6ZX0sXCJidWNrZXRcIjogJHtidWNrZXR9LFwib2JqZWN0XCI6ICR7b2JqZWN0fSxcImV0YWdcIjogJHtldGFnfSxcImZpbGVfa2V5XCI6JHt4OmZpbGVfa2V5fX0iLCJjYWxsYmFja0JvZHlUeXBlIjogImFwcGxpY2F0aW9uL2pzb24ifQ%3D%3D%0A&security-token=CAIS%2BAF1q6Ft5B2yfSjIr5fvc%2FT2pbx14ZOzZVXJslIdOOZVrPDquzz2IHtKdXRvBu8Xs%2F4wnmxX7f4YlqB6T55OSAmcNZEoWWWTbdH4MeT7oMWQweEurv%2FMQBqyaXPS2MvVfJ%2BOLrf0ceusbFbpjzJ6xaCAGxypQ12iN%2B%2Fm6%2FNgdc9FHHPPD1x8CcxROxFppeIDKHLVLozNCBPxhXfKB0ca0WgVy0EHsPnvm5DNs0uH1AKjkbRM9r6ceMb0M5NeW75kSMqw0eBMca7M7TVd8RAi9t0t1%2FIVpGiY4YDAWQYLv0rda7DOltFiMkpla7MmXqlft%2BhzcgeQY0pc%2FRqAAXGx8FDtPQxW3RSasFgOFBJaxbYjH3WFFrbV25v8a%2BS9OWPAYqOCvmkxbM7N4hOge2iaBAG4SRLMb6ypPJ15YEpoZI8KkdeDvQJryZEWchmc0Lhz0yDRqrN%2BzYhgu4VpBJu1WJg%2FyXrvAZ0gWhBN%2BILrblSR9QHVWVVYZTAKN4ejIAA%3D";
// fileStreamUpload(uplodUrl,"D:\\develop\\Snipaste_2023-10-27_09-59-23.jpg");
}
}
@@ -0,0 +1,360 @@
package com.ruoyi.common.utils;
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.bean.SealSignRecord;
import java.util.Map;
public class SignAward {
private static String eSignHost= EsignApplicaConfig.EsignHost;
private static String eSignAppId=EsignApplicaConfig.EsignAppId;
private static String eSignAppSecret=EsignApplicaConfig.EsignAppSecret;
// public static String fileId = "95d0c307d91e4985bdb8874f6f84daa5";
public static String fileId = "a0c2ad21065f48ff8b872412c39d5d3a";
public static void main(String[] args) throws EsignDemoException {
Gson gson = new Gson();
SealSignRecord sealSignRecord = new SealSignRecord();
sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
sealSignRecord.setPensonAccount("18209231185");
sealSignRecord.setPensonName("秦桃则");
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
sealSignRecord.setPositionPagepsn("2");
sealSignRecord.setPositionXpsn(279+20);
sealSignRecord.setPositionYpsn(216.336-20);
sealSignRecord.setPositionPageorg("2");
sealSignRecord.setPositionXorg(342+30);
sealSignRecord.setPositionYorg(185.136);
/* 发起签署*/
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
// JsonObject createByFileJsonObject = gson.fromJson(createByFile.getBody(), JsonObject.class);
// JsonObject createByFileData = createByFileJsonObject.getAsJsonObject("data");
// String signFlowId = createByFileData.get("signFlowId").getAsString();
// System.err.println("流程id:"+signFlowId);
/* 获取文件签名印章位置*/
EsignHttpResponse positions = getPositions(sealSignRecord);
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
JsonArray keywordPositions = positionsData.get("keywordPositions").getAsJsonArray();
System.out.println("获取文件签名印章位置:" +keywordPositions.toString());
// String signFlowId = "c9955453716344f9971d308abdc13464";
//获取合同文件签名链接
// EsignHttpResponse signUrl = signUrl(sealSignRecord);
// JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
// JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
// String shortUrl = signUrlData.get("shortUrl").getAsString();
// String url = signUrlData.get("url").getAsString();
// System.out.println("签署短链接:" +shortUrl);
// System.out.println("签署长链接:"+url);
//获取合同文件用印链接
// EsignHttpResponse usesealUrl = usesealUrl(sealSignRecord);
// JsonObject usesealUrlJsonObject = gson.fromJson(usesealUrl.getBody(), JsonObject.class);
// JsonObject usesealUrlData = usesealUrlJsonObject.getAsJsonObject("data");
// String shortusesealUrl = usesealUrlData.get("shortUrl").getAsString();
// String sealUrl = usesealUrlData.get("url").getAsString();
// System.out.println("签署长链接:" +shortusesealUrl);
// System.out.println("签署短链接:"+sealUrl);
//查询签署流程详情
// EsignHttpResponse signFlowDetail = signFlowDetail(sealSignRecord);
// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
// System.out.println(signFlowDetailJsonObject);
}
/**
* 查询签署流程详情
* @return
*/
public static EsignHttpResponse signFlowDetail(SealSignRecord sealSignRecord) throws EsignDemoException {
String signFlowId = sealSignRecord.getSignFlowid();
String apiaddr= "/v3/sign-flow/"+ signFlowId + "/detail";
String jsonParm = null;
//请求方法
EsignRequestType requestType = EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
}
/**
* 发起签署
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignDemoException {
String apiaddr = "/v3/sign-flow/create-by-file";
String fileId = sealSignRecord.getFileid();
String fileName = sealSignRecord.getFilename();
String psnAccount = sealSignRecord.getPensonAccount();
String psnName = sealSignRecord.getPensonName();
String orgName = sealSignRecord.getOrgnizeName();
String orgNamePsnAccount = sealSignRecord.getOrgnizeNamePsnAccount();
String orgNamepsnName = sealSignRecord.getOrgnizeNamepsnName();
String positionPagepsn = sealSignRecord.getPositionPagepsn();
double positionXpsn = sealSignRecord.getPositionXpsn();
double positionYpsn = sealSignRecord.getPositionYpsn();
String positionPageorg = sealSignRecord.getPositionPageorg();
double positionXorg = sealSignRecord.getPositionXorg();
double positionYorg = sealSignRecord.getPositionYorg();
String jsonParm = "{\n" +
" \"docs\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
// " \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
" \"fileName\": \"" + fileName + "\"\n" +
" }\n" +
" ],\n" +
" \"signFlowConfig\": {\n" +
" \"signFlowTitle\": \"测试合同\",\n" +
" \"autoStart\": true,\n" +
" \"authConfig\": {\n" +
" \"willingnessAuthModes\": [\n" +
" \"CODE_SMS\"\n" +
" ],\n" +
" \"psnAvailableAuthModes\": [\n" +
" \"PSN_MOBILE3\"\n" +
" ],\n" +
" \"orgAvailableAuthModes\": [\n" +
" \"ORG_LEGALREP\"\n" +
" ]\n" +
" },\n" +
" \"autoFinish\": true\n" +
" },\n" +
" \"signers\": [\n" +
" {\n" +
" \"psnSignerInfo\": {\n" +
// " \"psnAccount\": \"18209231185\",\n" +
" \"psnAccount\": \"" + psnAccount + "\",\n" +
" \"psnInfo\": {\n" +
// " \"psnName\": \"秦桃则\"\n" +
" \"psnName\": \"" + psnName + "\"\n" +
" }\n" +
" },\n" +
" \"signFields\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
" \"normalSignFieldConfig\": {\n" +
" \"autoSign\": false,\n" +
" \"freeMode\": false,\n" +
" \"movableSignField\": false,\n" +
" \"signFieldPosition\": {\n" +
// " \"positionPage\": \"2\",\n" +
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
// " \"positionX\": 310.0,\n" +
" \"positionX\": " + positionXpsn + ",\n" +
// " \"positionY\": 247.536\n" +
" \"positionY\": " + positionYpsn + "\n" +
" },\n" +
" \"signFieldStyle\": 1\n" +
" },\n" +
" \"signFieldType\": 0\n" +
" }\n" +
" ],\n" +
" \"signerType\": 0\n" +
" },\n" +
" {\n" +
" \"orgSignerInfo\": {\n" +
// " \"orgName\": \"西安云美电子科技有限公司\",\n" +
" \"orgName\": \"" + orgName + "\",\n" +
" \"transactorInfo\": {\n" +
// " \"psnAccount\": \"17691338406\",\n" +
" \"psnAccount\": \"" + orgNamePsnAccount + "\",\n" +
" \"psnInfo\": {\n" +
// " \"psnName\": \"韩超勃\"\n" +
" \"psnName\": \"" + orgNamepsnName + "\"\n" +
" }\n" +
" }\n" +
" },\n" +
" \"signFields\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
" \"normalSignFieldConfig\": {\n" +
" \"autoSign\": false,\n" +
" \"freeMode\": false,\n" +
" \"signFieldPosition\": {\n" +
// " \"positionPage\": \"2\",\n" +
" \"positionPage\": \"" + positionPageorg + "\",\n" +
// " \"positionX\": 340.0,\n" +
" \"positionX\": " + positionXorg + ",\n" +
// " \"positionY\": 340.736\n" +
" \"positionY\": " + positionYorg + "\n" +
" },\n" +
" \"signFieldStyle\": 1\n" +
" },\n" +
" \"signFieldType\": 0\n" +
" }\n" +
" ],\n" +
" \"signerType\": 1\n" +
" }\n" +
" ]\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 获取合同文件签名链接
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
String signFlowId = sealSignRecord.getSignFlowid();
String psnAccount = sealSignRecord.getPensonAccount();
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
String jsonParm = "{\n" +
" \"operator\": {\n" +
// " \"psnAccount\":\"18209231185\"\n" +
" \"psnAccount\": \"" + psnAccount + "\"\n" +
" }\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 获取合同文件用印链接
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
String signFlowId = sealSignRecord.getSignFlowid();
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
String psnAccount = sealSignRecord.getOrgnizeNamePsnAccount();
String orgName = sealSignRecord.getOrgnizeName();
String jsonParm = "{\n" +
// " \"needLogin\": true,\n" +
" \"operator\": {\n" +
// " \"psnAccount\":\"17691338406\"\n" +
" \"psnAccount\": \"" + psnAccount + "\"\n" +
" },\n" +
" \"organization\": {\n" +
// " \"orgName\": \"西安云美电子科技有限公司\"\n" +
" \"orgName\": \"" + orgName + "\"\n" +
" }\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 获取文件签名印章位置
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignDemoException {
String fileId = sealSignRecord.getFileid();
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
String jsonParm = "{\n" +
" \"keywords\": [\n" +
" \"仲裁员:\",\n" +
" \"(仲裁委员会盖章)\"\n" +
" ]\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
}
@@ -1,26 +1,19 @@
package com.ruoyi.common.utils;
import cn.hutool.core.io.resource.ClassPathResource;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.data.*;
import com.deepoove.poi.data.style.ParagraphStyle;
import com.deepoove.poi.data.style.Style;
import com.deepoove.poi.policy.PictureRenderPolicy;
import com.deepoove.poi.util.PoitlIOUtils;
import org.apache.commons.io.FileUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.wp.usermodel.Paragraph;
import org.apache.poi.xwpf.usermodel.*;
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
import javax.print.Doc;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -100,7 +93,7 @@ public class WordUtil {
style.setFontSize(12.0);
ParagraphStyle paragraphStyle = ParagraphStyle.builder()
.withAlign(ParagraphAlignment.CENTER)
// .withBackgroundColor(headerBackgroundColor)
// .withBackgroundColor(headerBackgroundColor)
.withDefaultTextStyle(style)
.build();
paragraphRenderData.addText(headerList.get(i));
@@ -143,68 +136,21 @@ public class WordUtil {
/**
* 构建图片内容
*/
public static PictureRenderData rebuildImageContent(Integer with, Integer height, String imageUrl, String relatedPath) {
public static PictureRenderData rebuildImageContent(Integer with, Integer height, String imageUrl, String relatedPath, Byte[] imageBytes) {
PictureRenderData pictureRenderData = null;
if (!StringUtils.isBlank(imageUrl)) {
//pictureRenderData = Pictures.of(imageUrl).size(with, height).create();
// pictureRenderData = Pictures.of(imageUrl).size(with, height).create();
//Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
} else if (!StringUtils.isBlank(relatedPath)) {
pictureRenderData = Pictures.ofLocal(relatedPath).size(with, height).create();
}else if (!StringUtils.isBlank(relatedPath)) {
pictureRenderData = Pictures.ofLocal(relatedPath).size(with,height).create();
// Pictures.PictureBuilder pictureBuilder = Pictures.of("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
}
return pictureRenderData;
}
public static String getResultFilePath(Map<String, Object> datas, Configure config, String modalFilePath, String resultFilePath) throws IOException {
//获取word模板和填充数据
XWPFTemplate template = XWPFTemplate.compile(modalFilePath, config).render(datas);
XWPFTemplate template = XWPFTemplate.compile(modalFilePath,config).render(datas);
template.writeAndClose(new FileOutputStream(resultFilePath));
return resultFilePath;
}
public static void changeText(XWPFDocument document) {
//获取文字段落集合
List<XWPFParagraph> paragraphs = document.getParagraphs();
//所有类型集合(文字段落、表格、图片等)
List<IBodyElement> listBe = document.getBodyElements();
List<Integer> runList = new ArrayList<>();
int n = 0;
for (int i = 0; i < listBe.size(); i++) {
//BodyElementType.PARAGRAPH : 枚举中的文字段落
//文字为空时,先添加到list中;
//注意picture类型也在PARAGRAPH中,需要校验embeddedPictures的长度是否为0
//为0表示空行,大于0表示有图片,可能还有其他类型,暂时没遇到,各位自行斟酌
if (paragraphs.size() > n && !paragraphs.get(n).getRuns().isEmpty()) {
if (StringUtils.isEmpty(paragraphs.get(n).getRuns().get(0).text())
&& paragraphs.get(n).getRuns().get(0).getEmbeddedPictures().size() == 0) {
runList.add(i);
}
}
n++;
//非文字段落n-1
if (listBe.get(i).getElementType() != BodyElementType.PARAGRAPH) {
n--;
}
}
//遍历list删除
if (!runList.isEmpty()) {
for (int i = runList.size() - 1; i >= 0; i--) {
int index = runList.get(i);
if (index >= 0 && index < document.getBodyElements().size()) {
document.removeBodyElement(index);
}
}
}
}
}
@@ -1,64 +0,0 @@
package com.ruoyi.common.utils;
/**
* @author wangqiong
* @description 获取微信小程序url scheme
* @date 2023-10-13 10:16
*/
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
public class WxAppletNotifyUtils {
/**
* scheme 跳转微信小程序,需中转H5
*/
public static String jumpAppletSchemeUrl(){
String token= getAccessToken();
//接口地址
String url = "https://api.weixin.qq.com/wxa/generatescheme?access_token="+token;
JSONObject body = JSONUtil.createObj();
JSONObject jumpWxa = JSONUtil.createObj();
jumpWxa.putOpt("path","pages/login");
jumpWxa.putOpt("query","");
jumpWxa.putOpt("env_version","release");
body.putOpt("jump_wxa",jumpWxa);
//链接过期类型:0时间戳 1间隔天数
body.putOpt("expire_type",1);
body.putOpt("is_expire",true);
//指定失效天数,最多30
body.putOpt("expire_interval",30);
String post = HttpUtil.post(url,body.toJSONString(2));
JSONObject result = JSONUtil.parseObj(post);
if(result!=null && result.containsKey("openlink")){
return result.getStr("openlink");
}
return null;
}
//凭证调用
public static String getAccessToken(){
String token;
//小程序APPID
String appid="wx91cb8459dca561b4";//自行获取
//小程序secret
String secret="190aaa3bda96a65d25318fbb0e133fc6";//自己去公众号后台获取
String httpUrl="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
httpUrl= httpUrl+"&appid="+appid+"&secret="+secret;
//get请求
String result = HttpUtil.get(httpUrl);
//解析结果
JSONObject jsonObject = JSONUtil.parseObj(result);
//get AccessToken
token=jsonObject.get("access_token",String.class,false);
return token;
}
}
@@ -0,0 +1,161 @@
package com.ruoyi.common.utils.bean;
import com.ruoyi.common.core.domain.BaseEntity;
public class SealSignRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 文件id */
private String fileid;
/** 文件名称 */
private String filename;
/** 流程id */
private String signFlowid;
/** 签名人账户 */
private String pensonAccount;
/** 签名人姓名 */
private String pensonName;
/** 机构名称 */
private String orgnizeName;
/** 机构经办人 */
private String orgnizeNamePsnAccount;
/** 机构经办人名称 */
private String orgnizeNamepsnName;
public String getFileid() {
return fileid;
}
public void setFileid(String fileid) {
this.fileid = fileid;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getSignFlowid() {
return signFlowid;
}
public void setSignFlowid(String signFlowid) {
this.signFlowid = signFlowid;
}
public String getPensonAccount() {
return pensonAccount;
}
public void setPensonAccount(String pensonAccount) {
this.pensonAccount = pensonAccount;
}
public String getPensonName() {
return pensonName;
}
public void setPensonName(String pensonName) {
this.pensonName = pensonName;
}
public String getOrgnizeName() {
return orgnizeName;
}
public void setOrgnizeName(String orgnizeName) {
this.orgnizeName = orgnizeName;
}
public String getOrgnizeNamePsnAccount() {
return orgnizeNamePsnAccount;
}
public void setOrgnizeNamePsnAccount(String orgnizeNamePsnAccount) {
this.orgnizeNamePsnAccount = orgnizeNamePsnAccount;
}
public String getOrgnizeNamepsnName() {
return orgnizeNamepsnName;
}
public void setOrgnizeNamepsnName(String orgnizeNamepsnName) {
this.orgnizeNamepsnName = orgnizeNamepsnName;
}
public String getPositionPagepsn() {
return positionPagepsn;
}
public void setPositionPagepsn(String positionPagepsn) {
this.positionPagepsn = positionPagepsn;
}
public double getPositionXpsn() {
return positionXpsn;
}
public void setPositionXpsn(double positionXpsn) {
this.positionXpsn = positionXpsn;
}
public double getPositionYpsn() {
return positionYpsn;
}
public void setPositionYpsn(double positionYpsn) {
this.positionYpsn = positionYpsn;
}
public String getPositionPageorg() {
return positionPageorg;
}
public void setPositionPageorg(String positionPageorg) {
this.positionPageorg = positionPageorg;
}
public double getPositionXorg() {
return positionXorg;
}
public void setPositionXorg(double positionXorg) {
this.positionXorg = positionXorg;
}
public double getPositionYorg() {
return positionYorg;
}
public void setPositionYorg(double positionYorg) {
this.positionYorg = positionYorg;
}
/** 签名位置页数 */
private String positionPagepsn;
/** 签名位置x坐标 */
private double positionXpsn;
/** 签名位置y坐标 */
private double positionYpsn;
/** 印章位置页数 */
private String positionPageorg;
/** 印章位置x坐标 */
private double positionXorg;
/** 印章位置y坐标 */
private double positionYorg;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
@@ -1,138 +0,0 @@
package com.ruoyi.common.utils.file;
import cn.hutool.json.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.ruoyi.common.config.EsignDemoConfig;
import com.ruoyi.common.constant.EsignHeaderConstant;
import com.ruoyi.common.constant.FileTransformation;
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.EsignHttpHelper;
import com.ruoyi.common.utils.bean.EsignFileBean;
import com.ruoyi.common.utils.uuid.IdUtils;
import java.time.LocalDate;
import java.util.Map;
public class SaaSAPIFileUtils {
private static String eSignHost= EsignDemoConfig.EsignHost;
private static String eSignAppId= EsignDemoConfig.EsignAppId;
private static String eSignAppSecret=EsignDemoConfig.EsignAppSecret;
/**
* 获取文件上传地址
*/
public static EsignHttpResponse getUploadUrl(String filePath) throws EsignDemoException {
//自定义的文件封装类,传入文件地址可以获取文件的名称大小,文件流等数据
EsignFileBean esignFileBean = new EsignFileBean(filePath);
String apiaddr = "/v3/files/file-upload-url";
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm = "{\n" +
" \"contentMd5\": \"" + esignFileBean.getFileContentMD5() + "\",\n" +
" \"fileName\":\"" + esignFileBean.getFileName() + "\"," +
" \"fileSize\": " + esignFileBean.getFileSize() + ",\n" +
" \"convertToPDF\":" +true+ ",\n" +
" \"contentType\": \"" + EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE() + "\"\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 上传文件流
*/
public static EsignHttpResponse uploadFile(String uploadUrl,String filePath) throws EsignDemoException {
//根据文件地址获取文件contentMd5
EsignFileBean esignFileBean = new EsignFileBean(filePath);
//请求方法
EsignRequestType requestType= EsignRequestType.PUT;
return EsignHttpHelper.doUploadHttp(uploadUrl,requestType,esignFileBean.getFileBytes(),esignFileBean.getFileContentMD5(), EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE(),true);
}
/**
* 获取文件上传状态
*/
public static EsignHttpResponse getFileStatus(String fileId) throws EsignDemoException {
String apiaddr="/v3/files/"+fileId;
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm=null;
//请求方法
EsignRequestType requestType= EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
}
/**
* 下载已签署文件及附属材料
*/
public static EsignHttpResponse fileDownloadUrl(String signFlowId) throws EsignDemoException {
String apiaddr = "/v3/sign-flow/"+ signFlowId +"/file-download-url";
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm=null;
//请求方法
EsignRequestType requestType= EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,false);
}
public static void main(String[] args) throws EsignDemoException {
String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\23893bfd3f2249ffa5c82850c11c482e.docx";
EsignHttpResponse uploadUrl = getUploadUrl(filePath);
String body = uploadUrl.getBody();
JSONObject jsonObject = new JSONObject(body);
JSONObject dataObj = jsonObject.getJSONObject("data");
String fileUploadUrl = dataObj.get("fileUploadUrl").toString();
System.out.println("这是fileUploadUrl:"+fileUploadUrl);
String fileId = dataObj.get("fileId").toString();
System.out.println("这是fileId:"+fileId);
//String fileUploadUrl = "https://esignoss.esign.cn/1111564182/ccf6db5a-92da-4523-89ba-385a30423596/23893bfd3f2249ffa5c82850c11c482e.docx?Expires=1697021257&OSSAccessKeyId=STS.NTmgvSC8n5Zg1y7EciQftF23N&Signature=CxVZmpwFksWmLYkxPjVz9K4mVyA%3D&callback-var=eyJ4OmZpbGVfa2V5IjoiJDAyODhjOTg3LWNlNzgtNDM1OC04NWYwLTdlNmUyM2NjOTJmNiQzNDk1NzQ3MjE5In0%3D%0A&callback=eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9zbWx0YXBpLnRzaWduLmNuL2FueWRvb3IvZmlsZS1zeXN0ZW0vY2FsbGJhY2svYWxpb3NzIiwiY2FsbGJhY2tCb2R5IjogIntcIm1pbWVUeXBlXCI6JHttaW1lVHlwZX0sXCJzaXplXCI6ICR7c2l6ZX0sXCJidWNrZXRcIjogJHtidWNrZXR9LFwib2JqZWN0XCI6ICR7b2JqZWN0fSxcImV0YWdcIjogJHtldGFnfSxcImZpbGVfa2V5XCI6JHt4OmZpbGVfa2V5fX0iLCJjYWxsYmFja0JvZHlUeXBlIjogImFwcGxpY2F0aW9uL2pzb24ifQ%3D%3D%0A&security-token=CAIS%2BAF1q6Ft5B2yfSjIr5fYLMznrudPgpiMM1%2BGoWM8XelYqfeYrDz2IHtKdXRvBu8Xs%2F4wnmxX7f4YlqB6T55OSAmcNZEofT7katr4MeT7oMWQweEurv%2FMQBqyaXPS2MvVfJ%2BOLrf0ceusbFbpjzJ6xaCAGxypQ12iN%2B%2Fm6%2FNgdc9FHHPPD1x8CcxROxFppeIDKHLVLozNCBPxhXfKB0ca0WgVy0EHsPnvm5DNs0uH1AKjkbRM9r6ceMb0M5NeW75kSMqw0eBMca7M7TVd8RAi9t0t1%2FIVpGiY4YDAWQYLv0rda7DOltFiMkpla7MmXqlft%2BhzcgeQY0pc%2FRqAAaxcPCSY0Du8wgErfR1llD8t2zeFG%2B1mktU4Rsl7AgxsSFxrwILBUk2x7imVsFVA0kkS8rNBMDKGIsIZTCl5M7S2L%2BD8364htwcZgIZYHK2fCN6gCuy%2Bfk9C%2FfQaTc00IWBMw8OubuJ%2Fq2mdMh32yoi7dLuJyhwt1z%2F%2BWf5vIFHdIAA%3D";
EsignHttpResponse esignHttpResponse = uploadFile(fileUploadUrl, filePath);
System.out.println("这是上传文件流的结果:"+esignHttpResponse.getBody());
// EsignHttpResponse fileStatus = getFileStatus(fileId);
// System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
// getFileStatus("a808f1f39a744357a2f018e4ab34c55d");
// fileDownloadUrl("");
// Gson gson = new Gson();
// EsignHttpResponse fileDownload = 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();
// String fileName = java.util.UUID.randomUUID().toString().replace("-", "") + ".pdf";
// String savePath = "/home/ruoyi/uploadPath/upload";
// 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 saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
// String fileDownloadUrlnew = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
// FileTransformation.downLoadFileByUrl(fileDownloadUrlnew,dir);
// }
}
}
@@ -1,22 +0,0 @@
package com.ruoyi.common.utils.thread;
import lombok.Data;
import java.util.List;
import java.util.function.Function;
/**
* @author wangqiong
* @date 2023/11/25 9:25
**/
@Data
public class MultipleThreadListParam<T,R> {
/**需要执行的方法*/
private Function<List<T>,R> function;
/**参数ID*/
private List<T> list;
public MultipleThreadListParam(Function<List<T>,R> function, List<T> list){
this.function=function;
this.list=list;
}
}
@@ -1,21 +0,0 @@
package com.ruoyi.common.utils.thread;
import lombok.Data;
import java.util.function.Function;
/**
* @author wangqiong
* @date 2023/11/25 9:25
**/
@Data
public class MultipleThreadStringParam<T> {
/**需要执行的方法*/
private Function<String,T> function;
/**参数ID*/
private String ids;
public MultipleThreadStringParam(Function<String,T> function, String ids){
this.function=function;
this.ids=ids;
}
}
@@ -1,547 +0,0 @@
package com.ruoyi.common.utils.thread;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.VoidFunction;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.exception.ServiceException;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.Function;
/**
* @description 多线程操作数据库,一个线程异常全部回滚
* @Author wangqiong
* @Date 2023/11/25 14:02
* @Version V1.0
**/
@Slf4j
public class MultipleThreadWorkUtil {
private static int SIMPLE_TIME_COUNT=1000;
public static <R,A>List<R> exec(Function<List<A>,R> execFun, List<A> list){
List<R> returnList=new ArrayList<>();
if(CollectionUtil.isEmpty(list)){
return returnList;
}
if(list.size()<SIMPLE_TIME_COUNT){
return Arrays.asList(execFun.apply(list));
}
int times=list.size()/SIMPLE_TIME_COUNT;
if(list.size()%SIMPLE_TIME_COUNT>0){
times++;
}
CountDownLatch mainLatch=new CountDownLatch(1);
//监控子线程
CountDownLatch threadLatch=new CountDownLatch(times);
//根据子线程执行结果判断是否需要回滚
BlockingDeque<Boolean> resultList=new LinkedBlockingDeque<>();
//必须使用对象,如果使用变量会造成线程之间不能共享变量值
RollBack rollBack=new RollBack(false);
ExecutorService executorService=Executors.newFixedThreadPool(times);
List<Future<R>> futureList=new ArrayList<>();
for (int i = 0; i <times ; i++) {
if(i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT<list.size()){
// 创建子线程
Future<R> future=executorService.submit(new ExecThread(mainLatch,threadLatch,rollBack,resultList,list.subList(i*SIMPLE_TIME_COUNT,i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT),execFun));
futureList.add(future);
}else{
Future<R> future=executorService.submit(new ExecThread(mainLatch,threadLatch,rollBack,resultList,list.subList(i*SIMPLE_TIME_COUNT,list.size()),execFun));
futureList.add(future);
}
}
setResult(executorService,returnList,futureList,resultList,
mainLatch,threadLatch,rollBack,times);
return returnList;
}
public static <A>void exec(VoidFunction<Set<A>> execFun, Set<A> set){
if(set.size()<SIMPLE_TIME_COUNT){
execFun.apply(set);
return;
}
int times=set.size()/SIMPLE_TIME_COUNT;
if(set.size()%SIMPLE_TIME_COUNT>0){
times++;
}
CountDownLatch mainLatch=new CountDownLatch(1);
//监控子线程
CountDownLatch threadLatch=new CountDownLatch(times);
//根据子线程执行结果判断是否需要回滚
BlockingDeque<Boolean> resultList=new LinkedBlockingDeque<>();
//必须使用对象,如果使用变量会造成线程之间不能共享变量值
RollBack rollBack=new RollBack(false);
ExecutorService executorService=Executors.newFixedThreadPool(times);
List<A> list=new ArrayList<>(set);
List<Future> futureList=new ArrayList<>();
for (int i = 0; i <times ; i++) {
Future future;
if(i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT<list.size()){
future=executorService.submit(new VoidExecThread(mainLatch,threadLatch,rollBack,resultList,list.subList(i*SIMPLE_TIME_COUNT,i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT),execFun));
}else{
future=executorService.submit(new VoidExecThread(mainLatch,threadLatch,rollBack,resultList,list.subList(i*SIMPLE_TIME_COUNT,list.size()),execFun));
}
futureList.add(future);
}
/**存放子线程返回结果*/
List<Boolean> backUpResult=new ArrayList<>();
try{
//
boolean await=threadLatch.await(times*3,TimeUnit.SECONDS);
if(!await){
rollBack.setRollBack(true);
}else{
//查看执行情况,如果有存在需要回滚的线程,则全部回滚
for (int i = 0; i <times ; i++) {
Boolean result=resultList.take();
backUpResult.add(result);
if(result){
/**有线程执行异常,需要回滚子线程*/
rollBack.setRollBack(true);
}
}
}
}catch (InterruptedException e){
e.printStackTrace();
throw new ServiceException(e.getMessage());
}finally {
//子线程再次继续执行
mainLatch.countDown();
executorService.shutdown();
}
/**检查子线程是否有异常,有异常整体回滚*/
for (int i = 0; i <times ; i++) {
if(CollectionUtil.isNotEmpty(backUpResult)){
Boolean result=backUpResult.get(i);
if(result){
/**有线程执行异常,需要回滚子线程*/
throw new ServiceException("多线程执行异常");
}
}else{
throw new ServiceException("多线程执行异常");
}
}
for (Future future : futureList) {
try {
future.get();
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
}
}
public static <R>List<R> execFun(MultipleThreadStringParam<R>...params){
List<R> returnList=new ArrayList<>();
if(ArrayUtil.isEmpty(params)){
return returnList;
}
List<Integer> threadCountList=new ArrayList<>();
for (MultipleThreadStringParam param : params) {
List<String> idList= Arrays.asList(param.getIds().split(Constants.SPLIT_COMMA));
if(idList.size()<SIMPLE_TIME_COUNT){
threadCountList.add(1);
}else{
if(idList.size()%SIMPLE_TIME_COUNT>0){
threadCountList.add(idList.size()/SIMPLE_TIME_COUNT+1);
}else{
threadCountList.add(idList.size()/SIMPLE_TIME_COUNT);
}
}
}
int times=0;
for (Integer count : threadCountList) {
times+=count;
}
CountDownLatch mainLatch=new CountDownLatch(1);
//监控子线程
CountDownLatch threadLatch=new CountDownLatch(times);
//根据子线程执行结果判断是否需要回滚
BlockingDeque<Boolean> resultList=new LinkedBlockingDeque<>();
//必须使用对象,如果使用变量会造成线程之间不能共享变量值
RollBack rollBack=new RollBack(false);
ExecutorService executorService=Executors.newFixedThreadPool(times);
List<Future<R>> futureList=new ArrayList<>();
for (int i = 0; i < params.length; i++) {
MultipleThreadStringParam param=params[i];
List<String> idList= Arrays.asList(param.getIds().split(Constants.SPLIT_COMMA));
for (int j = 0; j <threadCountList.get(i) ; j++) {
if(j*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT<idList.size()){
Future<R> future=executorService.submit(new ExecByIdsStringThread<>(mainLatch,threadLatch,rollBack,resultList,StrUtil.join(Constants.SPLIT_COMMA,idList.subList(j*SIMPLE_TIME_COUNT,j*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT)),param.getFunction()));
futureList.add(future);
}else{
Future<R> future=executorService.submit(new ExecByIdsStringThread(mainLatch,threadLatch,rollBack,resultList,StrUtil.join(Constants.SPLIT_COMMA,idList.subList(j*SIMPLE_TIME_COUNT,idList.size())),param.getFunction()));
futureList.add(future);
}
}
}
setResult(executorService,returnList,futureList,resultList,
mainLatch,threadLatch,rollBack,times);
return returnList;
}
public static <R>List<R> execByIds(Function<String,R> execFun,String ids){
List<R> returnList=new ArrayList<>();
if(StrUtil.isEmpty(ids)){
return returnList;
}
List<String> idList= Arrays.asList(ids.split(Constants.SPLIT_COMMA));
if(idList.size()<SIMPLE_TIME_COUNT){
return Arrays.asList(execFun.apply(ids));
}
int times=idList.size()/SIMPLE_TIME_COUNT;
if(idList.size()%SIMPLE_TIME_COUNT>0){
times++;
}
CountDownLatch mainLatch=new CountDownLatch(1);
//监控子线程
CountDownLatch threadLatch=new CountDownLatch(times);
//根据子线程执行结果判断是否需要回滚
BlockingDeque<Boolean> resultList=new LinkedBlockingDeque<>();
//必须使用对象,如果使用变量会造成线程之间不能共享变量值
RollBack rollBack=new RollBack(false);
ExecutorService executorService=Executors.newFixedThreadPool(times);
List<Future<R>> futureList=new ArrayList<>();
for (int i = 0; i <times ; i++) {
if(i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT<idList.size()){
Future<R> future=executorService.submit(new ExecByIdsStringThread<>(mainLatch,threadLatch,rollBack,resultList,StrUtil.join(Constants.SPLIT_COMMA,idList.subList(i*SIMPLE_TIME_COUNT,i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT)),execFun));
futureList.add(future);
}else{
Future<R> future=executorService.submit(new ExecByIdsStringThread(mainLatch,threadLatch,rollBack,resultList,StrUtil.join(Constants.SPLIT_COMMA,idList.subList(i*SIMPLE_TIME_COUNT,idList.size())),execFun));
futureList.add(future);
}
}
setResult(executorService,returnList,futureList,resultList,
mainLatch,threadLatch,rollBack,times);
return returnList;
}
public static <R>List<R> execByIds(Function<List<String>,List<R>> execFun,List<String> idList){
List<R> returnList=new ArrayList<>();
if(CollectionUtil.isEmpty(idList)){
return returnList;
}
if(idList.size()<SIMPLE_TIME_COUNT){
return execFun.apply(idList);
}
int times=idList.size()/SIMPLE_TIME_COUNT;
if(idList.size()%SIMPLE_TIME_COUNT>0){
times++;
}
CountDownLatch mainLatch=new CountDownLatch(1);
//监控子线程
CountDownLatch threadLatch=new CountDownLatch(times);
//根据子线程执行结果判断是否需要回滚
BlockingDeque<Boolean> resultList=new LinkedBlockingDeque<>();
//必须使用对象,如果使用变量会造成线程之间不能共享变量值
RollBack rollBack=new RollBack(false);
ExecutorService executorService=Executors.newFixedThreadPool(times);
List<Future<List<R>>> futureList=new ArrayList<>();
for (int i = 0; i <times ; i++) {
if(i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT<idList.size()){
Future<List<R>> future=executorService.submit(new ExecByIdsStringListThread<>(mainLatch,threadLatch,rollBack,resultList,idList.subList(i*SIMPLE_TIME_COUNT,i*SIMPLE_TIME_COUNT+SIMPLE_TIME_COUNT),execFun));
futureList.add(future);
}else{
Future<List<R>> future=executorService.submit(new ExecByIdsStringListThread(mainLatch,threadLatch,rollBack,resultList,idList.subList(i*SIMPLE_TIME_COUNT,idList.size()),execFun));
futureList.add(future);
}
}
/**存放子线程返回结果*/
List<Boolean> backUpResult=new ArrayList<>();
try{
//
boolean await=threadLatch.await(times*3,TimeUnit.SECONDS);
if(!await){
rollBack.setRollBack(true);
}else{
//查看执行情况,如果有存在需要回滚的线程,则全部回滚
for (int i = 0; i <times ; i++) {
Boolean result=resultList.take();
backUpResult.add(result);
if(result){
/**有线程执行异常,需要回滚子线程*/
rollBack.setRollBack(true);
}
}
}
}catch (InterruptedException e){
e.printStackTrace();
throw new ServiceException("多线程执行异常");
}finally {
//子线程再次继续执行
mainLatch.countDown();
executorService.shutdown();
}
/**检查子线程是否有异常,有异常整体回滚*/
for (int i = 0; i <times ; i++) {
if(CollectionUtil.isNotEmpty(backUpResult)){
Boolean result=backUpResult.get(i);
if(result){
/**有线程执行异常,需要回滚子线程*/
throw new ServiceException("多线程执行异常");
}
}else{
throw new ServiceException("多线程执行异常");
}
}
for (Future<List<R>> future : futureList) {
try {
returnList.addAll(future.get());
} catch (Exception e) {
throw new ServiceException("多线程执行异常");
}
}
return returnList;
}
private static <R>void setResult(ExecutorService executorService,List<R> returnList,List<Future<R>> futureList,BlockingDeque<Boolean> resultList
,CountDownLatch mainLatch,CountDownLatch threadLatch,RollBack rollBack,int times){
/**存放子线程返回结果*/
List<Boolean> backUpResult=new ArrayList<>();
try{
//
boolean await=threadLatch.await(times*3,TimeUnit.SECONDS);
if(!await){
rollBack.setRollBack(true);
}else{
//查看执行情况,如果有存在需要回滚的线程,则全部回滚
for (int i = 0; i <times ; i++) {
Boolean result=resultList.take();
backUpResult.add(result);
if(result){
/**有线程执行异常,需要回滚子线程*/
rollBack.setRollBack(true);
}
}
}
}catch (InterruptedException e){
e.printStackTrace();
throw new ServiceException("多线程执行异常");
}finally {
//子线程再次继续执行
mainLatch.countDown();
executorService.shutdown();
}
/**检查子线程是否有异常,有异常整体回滚*/
for (int i = 0; i <times ; i++) {
if(CollectionUtil.isNotEmpty(backUpResult)){
Boolean result=backUpResult.get(i);
if(result){
/**有线程执行异常,需要回滚子线程*/
throw new ServiceException("多线程执行异常");
}
}else{
throw new ServiceException("多线程执行异常");
}
}
for (Future<R> future : futureList) {
try {
returnList.add(future.get());
} catch (Exception e) {
throw new ServiceException("多线程执行异常");
}
}
}
static class QueryThread<R> implements Callable<List<R>>{
private String ids;
private Function<String,List<R>> execFun;
public QueryThread(String ids,Function<String,List<R>> execFun){
this.ids=ids;
this.execFun=execFun;
}
@Override
public List<R> call(){
return execFun.apply(ids);
}
}
static class ExecThread<T,R> implements Callable<R>{
/**主线程监控*/
private CountDownLatch mainLatch;
/**子线程监控*/
private CountDownLatch threadLatch;
/**是否回滚*/
private RollBack rollBack;
private BlockingDeque<Boolean> resultList;
private List<T> list;
private Function<List<T>,R> execFun;
public ExecThread(CountDownLatch mainLatch,CountDownLatch threadLatch,RollBack rollBack,BlockingDeque<Boolean> resultList,List<T> list,Function<List<T>,R> execFun){
this.mainLatch=mainLatch;
this.threadLatch=threadLatch;
this.rollBack=rollBack;
this.resultList=resultList;
this.list=list;
this.execFun=execFun;
}
@Override
@Transactional(rollbackFor = Exception.class)
public R call(){
// 是否回滚
Boolean result=false;
R r=null;
try{
// 对数据库进行操作
r=execFun.apply(list);
}catch (Exception e){
e.printStackTrace();
result=true;
}
resultList.add(result);
// 子线程-1,切换到主线程执行
threadLatch.countDown();
try{
// 等待主线程执行
mainLatch.await();
}catch (InterruptedException e){
throw new ServiceException("多线程执行异常");
}
if(rollBack.getRollBack()){
throw new ServiceException("多线程执行异常");
}
return r;
}
}
static class VoidExecThread<T> implements Runnable{
/**主线程监控*/
private CountDownLatch mainLatch;
/**子线程监控*/
private CountDownLatch threadLatch;
/**是否回滚*/
private RollBack rollBack;
private BlockingDeque<Boolean> resultList;
private List<T> list;
private VoidFunction<Set<T>> execFun;
public VoidExecThread(CountDownLatch mainLatch,CountDownLatch threadLatch,RollBack rollBack,BlockingDeque<Boolean> resultList,List<T> list,VoidFunction<Set<T>> execFun){
this.mainLatch=mainLatch;
this.threadLatch=threadLatch;
this.rollBack=rollBack;
this.resultList=resultList;
this.list=list;
this.execFun=execFun;
}
@Override
public void run() {
Boolean result=false;
try{
execFun.apply(new HashSet<>(list));
}catch (Exception e){
e.printStackTrace();
result=true;
}
resultList.add(result);
threadLatch.countDown();
try{
mainLatch.await();
}catch (InterruptedException e){
throw new ServiceException("多线程执行异常");
}
if(rollBack.getRollBack()){
throw new ServiceException("多线程执行异常");
}
}
}
static class ExecByIdsStringThread<R> implements Callable<R>{
/**主线程监控*/
private CountDownLatch mainLatch;
/**子线程监控*/
private CountDownLatch threadLatch;
/**是否回滚*/
private RollBack rollBack;
private BlockingDeque<Boolean> resultList;
private String ids;
private Function<String,R> execFun;
public ExecByIdsStringThread(CountDownLatch mainLatch,CountDownLatch threadLatch,RollBack rollBack,BlockingDeque<Boolean> resultList,String ids,Function<String,R> execFun){
this.mainLatch=mainLatch;
this.threadLatch=threadLatch;
this.rollBack=rollBack;
this.resultList=resultList;
this.ids=ids;
this.execFun=execFun;
}
@Override
public R call(){
Boolean result=false;
R r=null;
try{
r=execFun.apply(ids);
}catch (Exception e){
e.printStackTrace();
result=true;
}
resultList.add(result);
threadLatch.countDown();
try{
mainLatch.await();
}catch (InterruptedException e){
throw new ServiceException("多线程执行异常");
}
if(rollBack.getRollBack()){
throw new ServiceException("多线程执行异常");
}
return r;
}
}
static class ExecByIdsStringListThread<R> implements Callable<R>{
/**主线程监控*/
private CountDownLatch mainLatch;
/**子线程监控*/
private CountDownLatch threadLatch;
/**是否回滚*/
private RollBack rollBack;
private BlockingDeque<Boolean> resultList;
private List<String> ids;
private Function<List<String>,R> execFun;
public ExecByIdsStringListThread(CountDownLatch mainLatch,CountDownLatch threadLatch,RollBack rollBack,BlockingDeque<Boolean> resultList,List<String> ids,Function<List<String>,R> execFun){
this.mainLatch=mainLatch;
this.threadLatch=threadLatch;
this.rollBack=rollBack;
this.resultList=resultList;
this.ids=ids;
this.execFun=execFun;
}
@Override
public R call(){
Boolean result=false;
R r=null;
try{
r=execFun.apply(ids);
}catch (Exception e){
e.printStackTrace();
result=true;
}
resultList.add(result);
threadLatch.countDown();
try{
mainLatch.await();
}catch (InterruptedException e){
throw new ServiceException("多线程执行异常");
}
if(rollBack.getRollBack()){
throw new ServiceException("多线程执行异常");
}
return r;
}
}
@Data
static class RollBack{
private Boolean rollBack;
public RollBack(Boolean rollBack){
this.rollBack=rollBack;
}
}
}
@@ -1,112 +0,0 @@
package com.ruoyi.common.utils.thread;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
/**
* @description 线程池工具类
* @Author wangqiong
* @Date 2023/11/7 15:41
* @Version V1.0
**/
@Slf4j
public class ThreadPoolUtil {
/** cpu核心数 */
private static int corePoolSize = (Runtime.getRuntime().availableProcessors());
/**创建固定大小线程池*/
private static ExecutorService executors = new ThreadPoolExecutor(
corePoolSize,
corePoolSize,
0L,
TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>());
/**
* 异步任务
* @param task
*/
public static void execute(Runnable task){
executors.execute(task);
}
/**
* 可获取返回结果的任务且可设置超时时间
* @param task
* @param timeout
* @param <T>
* @return
*/
public static <T> T execute(Callable<T> task, long timeout){
Future<T> future = executors.submit(task);
T result = null;
try {
result = future.get(timeout, TimeUnit.SECONDS);
} catch (InterruptedException e) {
future.cancel(true);
log.error("ThreadPoolUtil.InterruptedException. e:{}", e);
} catch (ExecutionException e) {
future.cancel(true);
log.error("ThreadPoolUtil.ExecutionException. e:{}", e);
} catch (TimeoutException e) {
future.cancel(true);
log.error("ThreadPoolUtil.TimeoutException. e:{}", e);
}
return result;
}
/**
* 可获取返回结果的任务
* @param task
* @return
*/
public static <T> Future<T> submit(Callable<T> task){
return executors.submit(task);
}
/**
* 可获取返回结果的任务
* @param tasks
* @param <T>
* @return
*/
public static <T> List<T> submit(Callable<T>... tasks){
List<Future<T>> list=new ArrayList<>();
List<T> resultList=new ArrayList<>();
if(tasks==null||tasks.length==0){
return resultList;
}
for(Callable<T> task:tasks){
list.add(executors.submit(task));
}
for(Future<T> future:list){
try {
resultList.add(future.get());
} catch (InterruptedException e) {
future.cancel(true);
log.error("ThreadPoolUtil.InterruptedException. e:{}", e);
} catch (ExecutionException e) {
future.cancel(true);
log.error("ThreadPoolUtil.ExecutionException. e:{}", e);
}
}
return resultList;
}
/**
* 执行完所有返回
* @param tasks
*/
public static void submit(Runnable ...tasks){
if(tasks==null||tasks.length==0){
return;
}
List<CompletableFuture> futureList=new ArrayList<>();
for (Runnable task : tasks) {
futureList.add(CompletableFuture.runAsync(task,executors));
}
CompletableFuture.allOf(futureList.toArray(new CompletableFuture[futureList.size()])).join();
}
}
@@ -1,140 +0,0 @@
package com.ruoyi.common.websocket;
import com.ruoyi.common.exception.ServiceException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArraySet;
/**
* @author wangqiong
* @description
* @date 2023-11-25 15:16
*/
@Component
@Slf4j
@ServerEndpoint("/websocket/{userName}")
public class MyWebSocketHandler {
// 接口路径 ws://127.0.0.1:9000/websocket;
private Session session;
//concurrent包的线程安全Set,用来存放每个客户端对应的WebSocket对象。
private static CopyOnWriteArraySet<Session> sessions = new CopyOnWriteArraySet<>();
// 用来存在线连接数
private static Map<String, Session> sessionPool = new HashMap<>();
/**
* 链接成功调用的方法
*/
@OnOpen
public void onOpen(Session session, @PathParam(value = "userName") String userName) {
try {
sessions.add(session);
sessionPool.put(userName, session);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 链接关闭调用的方法
*/
@OnClose
public void onClose(Session session,@PathParam(value = "userName") String userName) {
try {
if(session!=null && session.isOpen()){
session.close();
sessions.remove(session);
sessionPool.remove(userName);
}
log.info("【websocket消息】连接断开,总数为:" + sessions.size());
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 收到客户端消息后调用的方法
*
* @param message
* @param
*/
@OnMessage
public void onMessage(@PathParam(value = "userName") String userName, String message) {
System.out.println("【websocket消息】收到客户端消息:" + message);
// 将消息广播给其它用户
for (Session session : sessions) {
if(session!=null && session.isOpen()){
try {
session.getBasicRemote().sendText(message);
}catch (Exception e){
throw new ServiceException(e.getMessage());
}
}else {
try {
session.close();
} catch (IOException e) {
throw new ServiceException(e.getMessage());
}
sessions.remove(session);
sessionPool.remove(userName);
}
}
}
/**
* 发送错误时的处理
*
* @param session
* @param error
*/
@OnError
public void onError(Session session, Throwable error) {
throw new ServiceException(error.getMessage());
}
/**
* 推消息给前端
*
* @param userId
* @param message
* @return
*/
public static Runnable sendOneMessage(String userId, String message) {
Session session = sessionPool.get(userId);
if (session != null && session.isOpen()) {
try {
log.info("【推给前端消息】 :" + message);
//高并发下,防止session占用期间,被其他线程调用
synchronized (session) {
session.getBasicRemote().sendText(message);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return null;
}
}
@@ -1,26 +0,0 @@
package com.ruoyi.common.websocket;//package com.ruoyi.common.websocket;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
* @author wangqiong
* @description
* @date 2023-11-25 15:19
*/
@Configuration
public class WebSocketConfig {
/**
* 注入ServerEndpointExporter,
* 这个bean会自动注册使用了@ServerEndpoint注解声明的Websocket endpoint
*/
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage","/uploadPath/**","/websocket/**").permitAll()
.antMatchers("/login", "/register", "/captchaImage","/uploadPath/**").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
-7
View File
@@ -22,18 +22,11 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>pay</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.tencentyun</groupId>
<artifactId>tls-sig-api-v2</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>
@@ -115,6 +115,4 @@ public interface SysDeptMapper
* @return 结果
*/
public int deleteDeptById(Long deptId);
List<Long> selectUserDeptListByRoleId(@Param("roleId")Long roleId);
}
@@ -33,14 +33,6 @@ public interface SysPostMapper
*/
public SysPost selectPostById(Long postId);
/**
* 查询岗位为经办人的岗位信息
*
* @param postCode 岗位编码
* @return 角色对象信息
*/
public SysPost selectPostByPostCode(String postCode);
/**
* 根据用户ID获取岗位选择框列表
*
@@ -49,14 +49,6 @@ public interface SysRoleMapper
*/
public SysRole selectRoleById(Long roleId);
/**
* 根据角色名称查询角色id
* @param roleName
* @return
*/
public Long selectRoleIdByName(String roleName);
/**
* 根据用户ID查询角色
*
@@ -1,8 +1,6 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysUser;
@@ -21,12 +19,6 @@ public interface SysUserMapper
*/
public List<SysUser> selectUserList(SysUser sysUser);
/**
* 查询仲裁员角色下的用户
* @return
*/
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
/**
* 根据条件分页查询已配用户角色列表
*
@@ -58,13 +50,6 @@ public interface SysUserMapper
* @return 用户对象信息
*/
public SysUser selectUserById(Long userId);
/**
* 通过部门ID查询用户
*
* @param deptId 部门ID
* @return 用户对象信息
*/
public List<SysUser> selectUserByDeptId(Long deptId);
/**
* 新增用户信息
@@ -139,31 +124,4 @@ public interface SysUserMapper
* @return 结果
*/
public SysUser checkEmailUnique(String email);
List<SysUser> selectUserListByIds(@Param("idList") List<Long> idList);
/**
* 根据身份证号查询用户信息
* @param identityNo
* @return
*/
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
/**
* 根据手机号查询用户信息
* @param phone
* @return
*/
SysUser selectUserByPhone(@Param("phone")String phone);
/**
* 根据部门和角色查询用户
* @param applicationOrganId
* @param roleName
* @return
*/
List<SysUser> selectByDeptIdAndRole(@Param("deptId")String applicationOrganId, @Param("roleName")String roleName);
List<SysUser> selectRoleUserByDeptId(@Param("deptId")Long deptId,@Param("roleId") Long roleId );
}
@@ -1,10 +1,7 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
/**
* 用户 业务层
@@ -20,7 +17,6 @@ public interface ISysUserService
* @return 用户信息集合信息
*/
public List<SysUser> selectUserList(SysUser user);
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
/**
* 根据条件分页查询已分配用户角色列表
@@ -114,7 +110,7 @@ public interface ISysUserService
* @param user 用户信息
* @return 结果
*/
public AjaxResult insertUser(SysUser user);
public int insertUser(SysUser user);
/**
* 注册用户信息
@@ -130,7 +126,7 @@ public interface ISysUserService
* @param user 用户信息
* @return 结果
*/
public AjaxResult updateUser(SysUser user);
public int updateUser(SysUser user);
/**
* 用户授权角色
@@ -207,5 +203,4 @@ public interface ISysUserService
* @return 结果
*/
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
}
@@ -211,16 +211,13 @@ public class SysDeptServiceImpl implements ISysDeptService
@Override
public int insertDept(SysDept dept)
{
Long parentId = dept.getParentId();
if(parentId!=null){
SysDept info = deptMapper.selectDeptById(dept.getParentId());
// 如果父节点不为正常状态,则不允许新增子节点
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
{
throw new ServiceException("部门停用,不允许新增");
}
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
SysDept info = deptMapper.selectDeptById(dept.getParentId());
// 如果父节点不为正常状态,则不允许新增子节点
if (!UserConstants.DEPT_NORMAL.equals(info.getStatus()))
{
throw new ServiceException("部门停用,不允许新增");
}
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
return deptMapper.insertDept(dept);
}
@@ -1,15 +1,9 @@
package com.ruoyi.system.service.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -28,6 +22,11 @@ import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserPost;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.mapper.SysPostMapper;
import com.ruoyi.system.mapper.SysRoleMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserPostMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
@@ -37,7 +36,8 @@ import com.ruoyi.system.service.ISysUserService;
* @author ruoyi
*/
@Service
public class SysUserServiceImpl implements ISysUserService {
public class SysUserServiceImpl implements ISysUserService
{
private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
@Autowired
@@ -46,9 +46,6 @@ public class SysUserServiceImpl implements ISysUserService {
@Autowired
private SysRoleMapper roleMapper;
@Autowired
private SysDeptMapper sysDeptMapper;
@Autowired
private SysPostMapper postMapper;
@@ -72,15 +69,11 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u")
public List<SysUser> selectUserList(SysUser user) {
public List<SysUser> selectUserList(SysUser user)
{
return userMapper.selectUserList(user);
}
@Override
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
return userMapper.selectUserListByAdRole(arbitrator);
}
/**
* 根据条件分页查询已分配用户角色列表
*
@@ -89,7 +82,8 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u")
public List<SysUser> selectAllocatedList(SysUser user) {
public List<SysUser> selectAllocatedList(SysUser user)
{
return userMapper.selectAllocatedList(user);
}
@@ -101,7 +95,8 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u")
public List<SysUser> selectUnallocatedList(SysUser user) {
public List<SysUser> selectUnallocatedList(SysUser user)
{
return userMapper.selectUnallocatedList(user);
}
@@ -112,7 +107,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 用户对象信息
*/
@Override
public SysUser selectUserByUserName(String userName) {
public SysUser selectUserByUserName(String userName)
{
return userMapper.selectUserByUserName(userName);
}
@@ -123,7 +119,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 用户对象信息
*/
@Override
public SysUser selectUserById(Long userId) {
public SysUser selectUserById(Long userId)
{
return userMapper.selectUserById(userId);
}
@@ -134,9 +131,11 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public String selectUserRoleGroup(String userName) {
public String selectUserRoleGroup(String userName)
{
List<SysRole> list = roleMapper.selectRolesByUserName(userName);
if (CollectionUtils.isEmpty(list)) {
if (CollectionUtils.isEmpty(list))
{
return StringUtils.EMPTY;
}
return list.stream().map(SysRole::getRoleName).collect(Collectors.joining(","));
@@ -149,9 +148,11 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public String selectUserPostGroup(String userName) {
public String selectUserPostGroup(String userName)
{
List<SysPost> list = postMapper.selectPostsByUserName(userName);
if (CollectionUtils.isEmpty(list)) {
if (CollectionUtils.isEmpty(list))
{
return StringUtils.EMPTY;
}
return list.stream().map(SysPost::getPostName).collect(Collectors.joining(","));
@@ -164,10 +165,12 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public boolean checkUserNameUnique(SysUser user) {
public boolean checkUserNameUnique(SysUser user)
{
Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
SysUser info = userMapper.checkUserNameUnique(user.getUserName());
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) {
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
@@ -180,10 +183,12 @@ public class SysUserServiceImpl implements ISysUserService {
* @return
*/
@Override
public boolean checkPhoneUnique(SysUser user) {
public boolean checkPhoneUnique(SysUser user)
{
Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber());
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) {
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
@@ -196,10 +201,12 @@ public class SysUserServiceImpl implements ISysUserService {
* @return
*/
@Override
public boolean checkEmailUnique(SysUser user) {
public boolean checkEmailUnique(SysUser user)
{
Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
SysUser info = userMapper.checkEmailUnique(user.getEmail());
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) {
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
{
return UserConstants.NOT_UNIQUE;
}
return UserConstants.UNIQUE;
@@ -211,8 +218,10 @@ public class SysUserServiceImpl implements ISysUserService {
* @param user 用户信息
*/
@Override
public void checkUserAllowed(SysUser user) {
if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) {
public void checkUserAllowed(SysUser user)
{
if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
{
throw new ServiceException("不允许操作超级管理员用户");
}
}
@@ -223,12 +232,15 @@ public class SysUserServiceImpl implements ISysUserService {
* @param userId 用户id
*/
@Override
public void checkUserDataScope(Long userId) {
if (!SysUser.isAdmin(SecurityUtils.getUserId())) {
public void checkUserDataScope(Long userId)
{
if (!SysUser.isAdmin(SecurityUtils.getUserId()))
{
SysUser user = new SysUser();
user.setUserId(userId);
List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user);
if (StringUtils.isEmpty(users)) {
if (StringUtils.isEmpty(users))
{
throw new ServiceException("没有权限访问用户数据!");
}
}
@@ -242,34 +254,15 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@Transactional
public AjaxResult insertUser(SysUser user) {
Long deptId = user.getDeptId();
Long[] postIds = user.getPostIds();
if (deptId != null) {
SysDept dept = sysDeptMapper.selectDeptById(deptId);
Integer deptType = dept.getDeptType();
if (deptType!=null && deptType.intValue() == 1) {
SysPost sysPost = postMapper.selectPostByPostCode("jbr");
Long postId = sysPost.getPostId();
if (postIds.length > 0) {
boolean isContain = Arrays.asList(postIds).contains(postId);
if (isContain) {
List<SysUser> sysUsers = userMapper.selectUserByDeptId(deptId);
if (sysUsers != null && sysUsers.size() > 0) {
return AjaxResult.error("部门类型为仲裁机构的部门的岗位为经办人的用户只能有一个!");
}
}
}
}
}
public int insertUser(SysUser user)
{
// 新增用户信息
int rows = userMapper.insertUser(user);
// 新增用户岗位关联
insertUserPost(user);
// 新增用户与角色管理
insertUserRole(user);
return AjaxResult.success("新建用户成功");
return rows;
}
/**
@@ -279,7 +272,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public boolean registerUser(SysUser user) {
public boolean registerUser(SysUser user)
{
return userMapper.insertUser(user) > 0;
}
@@ -291,27 +285,8 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@Transactional
public AjaxResult updateUser(SysUser user) {
Long deptId = user.getDeptId();
Long[] postIds = user.getPostIds();
if (deptId != null) {
SysDept dept = sysDeptMapper.selectDeptById(deptId);
Integer deptType = dept.getDeptType();
if (deptType != null && deptType.intValue() == 1) {
SysPost sysPost = postMapper.selectPostByPostCode("jbr");
Long postId = sysPost.getPostId();
if (postIds.length > 0) {
boolean isContain = Arrays.asList(postIds).contains(postId);
if (isContain) {
List<SysUser> sysUsers = userMapper.selectUserByDeptId(deptId);
if (sysUsers != null && sysUsers.size() > 0) {
return AjaxResult.error("部门类型为仲裁机构的部门的岗位为经办人的用户只能有一个!");
}
}
}
}
}
public int updateUser(SysUser user)
{
Long userId = user.getUserId();
// 删除用户与角色关联
userRoleMapper.deleteUserRoleByUserId(userId);
@@ -321,19 +296,19 @@ public class SysUserServiceImpl implements ISysUserService {
userPostMapper.deleteUserPostByUserId(userId);
// 新增用户与岗位管理
insertUserPost(user);
userMapper.updateUser(user);
return AjaxResult.success("更新用户成功");
return userMapper.updateUser(user);
}
/**
* 用户授权角色
*
* @param userId 用户ID
* @param userId 用户ID
* @param roleIds 角色组
*/
@Override
@Transactional
public void insertUserAuth(Long userId, Long[] roleIds) {
public void insertUserAuth(Long userId, Long[] roleIds)
{
userRoleMapper.deleteUserRoleByUserId(userId);
insertUserRole(userId, roleIds);
}
@@ -345,7 +320,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public int updateUserStatus(SysUser user) {
public int updateUserStatus(SysUser user)
{
return userMapper.updateUser(user);
}
@@ -356,7 +332,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public int updateUserProfile(SysUser user) {
public int updateUserProfile(SysUser user)
{
return userMapper.updateUser(user);
}
@@ -364,11 +341,12 @@ public class SysUserServiceImpl implements ISysUserService {
* 修改用户头像
*
* @param userName 用户名
* @param avatar 头像地址
* @param avatar 头像地址
* @return 结果
*/
@Override
public boolean updateUserAvatar(String userName, String avatar) {
public boolean updateUserAvatar(String userName, String avatar)
{
return userMapper.updateUserAvatar(userName, avatar) > 0;
}
@@ -379,7 +357,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public int resetPwd(SysUser user) {
public int resetPwd(SysUser user)
{
return userMapper.updateUser(user);
}
@@ -391,7 +370,8 @@ public class SysUserServiceImpl implements ISysUserService {
* @return 结果
*/
@Override
public int resetUserPwd(String userName, String password) {
public int resetUserPwd(String userName, String password)
{
return userMapper.resetUserPwd(userName, password);
}
@@ -400,7 +380,8 @@ public class SysUserServiceImpl implements ISysUserService {
*
* @param user 用户对象
*/
public void insertUserRole(SysUser user) {
public void insertUserRole(SysUser user)
{
this.insertUserRole(user.getUserId(), user.getRoleIds());
}
@@ -409,12 +390,15 @@ public class SysUserServiceImpl implements ISysUserService {
*
* @param user 用户对象
*/
public void insertUserPost(SysUser user) {
public void insertUserPost(SysUser user)
{
Long[] posts = user.getPostIds();
if (StringUtils.isNotEmpty(posts)) {
if (StringUtils.isNotEmpty(posts))
{
// 新增用户与岗位管理
List<SysUserPost> list = new ArrayList<SysUserPost>(posts.length);
for (Long postId : posts) {
for (Long postId : posts)
{
SysUserPost up = new SysUserPost();
up.setUserId(user.getUserId());
up.setPostId(postId);
@@ -427,14 +411,17 @@ public class SysUserServiceImpl implements ISysUserService {
/**
* 新增用户角色信息
*
* @param userId 用户ID
* @param userId 用户ID
* @param roleIds 角色组
*/
public void insertUserRole(Long userId, Long[] roleIds) {
if (StringUtils.isNotEmpty(roleIds)) {
public void insertUserRole(Long userId, Long[] roleIds)
{
if (StringUtils.isNotEmpty(roleIds))
{
// 新增用户与角色管理
List<SysUserRole> list = new ArrayList<SysUserRole>(roleIds.length);
for (Long roleId : roleIds) {
for (Long roleId : roleIds)
{
SysUserRole ur = new SysUserRole();
ur.setUserId(userId);
ur.setRoleId(roleId);
@@ -452,7 +439,8 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@Transactional
public int deleteUserById(Long userId) {
public int deleteUserById(Long userId)
{
// 删除用户与角色关联
userRoleMapper.deleteUserRoleByUserId(userId);
// 删除用户与岗位表
@@ -468,8 +456,10 @@ public class SysUserServiceImpl implements ISysUserService {
*/
@Override
@Transactional
public int deleteUserByIds(Long[] userIds) {
for (Long userId : userIds) {
public int deleteUserByIds(Long[] userIds)
{
for (Long userId : userIds)
{
checkUserAllowed(new SysUser(userId));
checkUserDataScope(userId);
}
@@ -483,14 +473,16 @@ public class SysUserServiceImpl implements ISysUserService {
/**
* 导入用户数据
*
* @param userList 用户数据列表
* @param userList 用户数据列表
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
* @param operName 操作用户
* @param operName 操作用户
* @return 结果
*/
@Override
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName) {
if (StringUtils.isNull(userList) || userList.size() == 0) {
public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName)
{
if (StringUtils.isNull(userList) || userList.size() == 0)
{
throw new ServiceException("导入用户数据不能为空!");
}
int successNum = 0;
@@ -498,18 +490,23 @@ public class SysUserServiceImpl implements ISysUserService {
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
String password = configService.selectConfigByKey("sys.user.initPassword");
for (SysUser user : userList) {
try {
for (SysUser user : userList)
{
try
{
// 验证是否存在这个用户
SysUser u = userMapper.selectUserByUserName(user.getUserName());
if (StringUtils.isNull(u)) {
if (StringUtils.isNull(u))
{
BeanValidators.validateWithException(validator, user);
user.setPassword(SecurityUtils.encryptPassword(password));
user.setCreateBy(operName);
userMapper.insertUser(user);
successNum++;
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功");
} else if (isUpdateSupport) {
}
else if (isUpdateSupport)
{
BeanValidators.validateWithException(validator, user);
checkUserAllowed(u);
checkUserDataScope(u.getUserId());
@@ -518,25 +515,30 @@ public class SysUserServiceImpl implements ISysUserService {
userMapper.updateUser(user);
successNum++;
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功");
} else {
}
else
{
failureNum++;
failureMsg.append("<br/>" + failureNum + "、账号 " + user.getUserName() + " 已存在");
}
} catch (Exception e) {
}
catch (Exception e)
{
failureNum++;
String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:";
failureMsg.append(msg + e.getMessage());
log.error(msg, e);
}
}
if (failureNum > 0) {
if (failureNum > 0)
{
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
} else {
}
else
{
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
}
@@ -28,17 +28,6 @@ public class ArbitrateRecord extends BaseEntity {
/** 裁决书附件id */
private Integer annexId;
/** 被申请人是否缺席 */
private Integer isAbsence;
/** 被申请人质证意见 */
private String responCrossOpin;
/** 申请人质证意见 */
private String applicaCrossOpin;
/** 申请人是否缺席 */
private Integer appliIsAbsen;
/** 被申请人质证意见 */
private String responDefenOpini;
@@ -1,23 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import lombok.Data;
import java.util.List;
/**
* @author wangqiong
* @description 批量操作案件
* @date 2023-10-20 14:49
*/
@Data
public class BatchCaseApplication {
private List<Long> ids;
/**
* 是否同意,0拒绝,1同意
*/
private Integer agreeOrNotCheck;
/**
* 1同意,0拒绝
*/
private Integer opinion;
}
@@ -1,11 +1,8 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
public class CaseAffiliate extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
@@ -13,122 +10,11 @@ public class CaseAffiliate extends BaseEntity {
private Long id;
/** 案件申请id */
private Long caseAppliId;
/**
* 案件申请日志id
*/
private Long caseAppliLogId;
/** 身份类型 */
private int identityType;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/**
* 申请机构id
*/
private String applicationOrganId;
/**
* 申请机构名称
*/
private String applicationOrganName;
/**
* 法定代表人
*/
private String compLegalPerson;
/**
* 邮箱
*/
private String email;
/**
* 法定代表人职位
*/
private String compLegalperPost;
/**
* 被申请人性别
*/
private String responSex;
/**
* 被申请人出生年月日
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date responBirth;
/**
* 版本号
*/
private Integer version;
/**
* 改变的字段
*/
private String changeColumn;
public String getChangeColumn() {
return changeColumn;
}
public void setChangeColumn(String changeColumn) {
this.changeColumn = changeColumn;
}
public Long getCaseAppliLogId() {
return caseAppliLogId;
}
public void setCaseAppliLogId(Long caseAppliLogId) {
this.caseAppliLogId = caseAppliLogId;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Date getResponBirth() {
return responBirth;
}
public void setResponBirth(Date responBirth) {
this.responBirth = responBirth;
}
public String getCompLegalPerson() {
return compLegalPerson;
}
public void setCompLegalPerson(String compLegalPerson) {
this.compLegalPerson = compLegalPerson;
}
public String getCompLegalperPost() {
return compLegalperPost;
}
public void setCompLegalperPost(String compLegalperPost) {
this.compLegalperPost = compLegalperPost;
}
public String getResponSex() {
return responSex;
}
public void setResponSex(String responSex) {
this.responSex = responSex;
}
/** 身份证号 */
@Excel(name = "身份证号")
private String identityNum;
@@ -141,29 +27,6 @@ public class CaseAffiliate extends BaseEntity {
/** 联系地址 */
@Excel(name = "联系地址")
private String contactAddress;
/** 住所 */
@Excel(name = "住所")
private String residenAffili;
/** 申请人代理人职称 */
@Excel(name = "申请人代理人职称")
private String appliAgentTitle;
public String getResidenAffili() {
return residenAffili;
}
public void setResidenAffili(String residenAffili) {
this.residenAffili = residenAffili;
}
public String getAppliAgentTitle() {
return appliAgentTitle;
}
public void setAppliAgentTitle(String appliAgentTitle) {
this.appliAgentTitle = appliAgentTitle;
}
/** 单位地址 */
@Excel(name = "单位地址")
private String workAddress;
@@ -183,44 +46,9 @@ public class CaseAffiliate extends BaseEntity {
/** 送达电子邮件 */
private String sendEmail;
private String userId;
private String applicantAgentUserId;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getApplicantAgentUserId() {
return applicantAgentUserId;
}
public void setApplicantAgentUserId(String applicantAgentUserId) {
this.applicantAgentUserId = applicantAgentUserId;
}
/** 快递单号 */
private String trackNum;
public String getApplicationOrganId() {
return applicationOrganId;
}
public void setApplicationOrganId(String applicationOrganId) {
this.applicationOrganId = applicationOrganId;
}
public String getApplicationOrganName() {
return applicationOrganName;
}
public void setApplicationOrganName(String applicationOrganName) {
this.applicationOrganName = applicationOrganName;
}
public String getSendEmail() {
return sendEmail;
}
@@ -9,16 +9,9 @@ import java.util.List;
public class CaseApplication extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 查询案件时区分是否待办案件,0待办案件,1已办案件
*/
private String selectCaseStatus;
/** ID */
private Long id;
/** 案件名称 */
@Excel(name = "案件名称")
private String caseName;
/** 案件编号 */
// @Excel(name = "案件编号")
private String caseNum;
@@ -32,26 +25,6 @@ public class CaseApplication extends BaseEntity {
private Date registerDate;
/** 仲裁方式 */
private Integer arbitratMethod;
/**
* 是否导入,0手动录入,1导入,默认0
*/
private Integer importFlag;
public Integer getImportFlag() {
return importFlag;
}
public void setImportFlag(Integer importFlag) {
this.importFlag = importFlag;
}
public String getSelectCaseStatus() {
return selectCaseStatus;
}
public void setSelectCaseStatus(String selectCaseStatus) {
this.selectCaseStatus = selectCaseStatus;
}
public Integer getArbitratMethod() {
return arbitratMethod;
@@ -73,16 +46,6 @@ public class CaseApplication extends BaseEntity {
/** 案件状态 */
private Integer caseStatus;
/** 案件申请表ID */
private Long caseAppliId;
public Long getCaseAppliId() {
return caseAppliId;
}
public void setCaseAppliId(Long caseAppliId) {
this.caseAppliId = caseAppliId;
}
public Integer getCaseStatus() {
return caseStatus;
@@ -116,15 +79,8 @@ public class CaseApplication extends BaseEntity {
/** 申请人主张违约金 */
@Excel(name = "申请人主张违约金")
private BigDecimal claimLiquidDamag;
/** 申请人请求仲裁庭裁决 */
@Excel(name = "申请人请求仲裁庭裁决",width = 36)
private String requestRule;
/** 是否财产保全申请 */
@Excel(name = "是否财产保全申请",width = 26,combo= {"是","否"},readConverterExp = "0=否,1=是")
private Integer properPreser;
/** 申请人仲裁请求及事实和理由 */
@Excel(name = "申请人仲裁请求及事实和理由",width = 36)
/** 申请人仲裁诉求 */
@Excel(name = "申请人仲裁诉求")
private String arbitratClaims;
/** 仲裁应缴费用 */
private BigDecimal feePayable;
@@ -140,20 +96,11 @@ public class CaseApplication extends BaseEntity {
/** 仲裁员名称 */
private String arbitratorName;
/** 案件名称 */
private String caseName;
/** 案件描述 */
private String caseDescribe;
/** 裁决书URL */
private String filearbitraUrl;
public String getFilearbitraUrl() {
return filearbitraUrl;
}
public void setFilearbitraUrl(String filearbitraUrl) {
this.filearbitraUrl = filearbitraUrl;
}
/** 是否同意组庭 */
private Integer isAgreePendTral;
@@ -163,174 +110,10 @@ public class CaseApplication extends BaseEntity {
/** 是否需要开庭审理 */
private Integer openCourtHear;
/** 是否仲裁反请求 */
private Integer adjudicaCounter;
/**
* 仲裁反请求原因
*/
private String adjudicaCounterReason;
/** 被申请人是否缺席 */
private Integer isAbsence;
/** 是否管辖异议申请 */
private Integer objectiJuris;
/** 被申请人质证意见 */
private String responCrossOpin;
/** 被申请人的答辩意见 */
private String responDefenOpini;
/** 申请人是否缺席 */
private Integer appliIsAbsen;
public String getAdjudicaCounterReason() {
return adjudicaCounterReason;
}
public void setAdjudicaCounterReason(String adjudicaCounterReason) {
this.adjudicaCounterReason = adjudicaCounterReason;
}
public Integer getAppliIsAbsen() {
return appliIsAbsen;
}
public void setAppliIsAbsen(Integer appliIsAbsen) {
this.appliIsAbsen = appliIsAbsen;
}
public String getResponDefenOpini() {
return responDefenOpini;
}
public void setResponDefenOpini(String responDefenOpini) {
this.responDefenOpini = responDefenOpini;
}
public String getRequestRule() {
return requestRule;
}
public void setRequestRule(String requestRule) {
this.requestRule = requestRule;
}
public Integer getAdjudicaCounter() {
return adjudicaCounter;
}
public void setAdjudicaCounter(Integer adjudicaCounter) {
this.adjudicaCounter = adjudicaCounter;
}
public Integer getProperPreser() {
return properPreser;
}
public void setProperPreser(Integer properPreser) {
this.properPreser = properPreser;
}
public Integer getIsAbsence() {
return isAbsence;
}
public void setIsAbsence(Integer isAbsence) {
this.isAbsence = isAbsence;
}
public Integer getObjectiJuris() {
return objectiJuris;
}
public void setObjectiJuris(Integer objectiJuris) {
this.objectiJuris = objectiJuris;
}
public String getResponCrossOpin() {
return responCrossOpin;
}
public void setResponCrossOpin(String responCrossOpin) {
this.responCrossOpin = responCrossOpin;
}
public String getApplicaCrossOpin() {
return applicaCrossOpin;
}
public void setApplicaCrossOpin(String applicaCrossOpin) {
this.applicaCrossOpin = applicaCrossOpin;
}
/** 申请人质证意见 */
private String applicaCrossOpin;
/** 支付状态 */
private Integer paymentStatus;
/** 支付状态描述 */
private String paymentStatusName;
/**
* 支付方式code,0线上支付,1线下支付
*/
private Integer payTypeCode;
/**
* 支付方式name,0线上支付,1线下支付
*/
private String payTypeName;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
// 导入校验失败信息
private StringBuilder errorMsg;
/**
* 是否锁定,0-否,1-是
*/
private Integer lockStatus;
public Integer getLockStatus() {
return lockStatus;
}
public void setLockStatus(Integer lockStatus) {
this.lockStatus = lockStatus;
}
public Integer getPayTypeCode() {
return payTypeCode;
}
public void setPayTypeCode(Integer payTypeCode) {
this.payTypeCode = payTypeCode;
}
public String getPayTypeName() {
return payTypeName;
}
public void setPayTypeName(String payTypeName) {
this.payTypeName = payTypeName;
}
public List<CaseAttach> getPayOrderList() {
return payOrderList;
}
public void setPayOrderList(List<CaseAttach> payOrderList) {
this.payOrderList = payOrderList;
}
public StringBuilder getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(StringBuilder errorMsg) {
this.errorMsg = errorMsg;
}
public Integer getPaymentStatus() {
return paymentStatus;
@@ -377,8 +160,6 @@ public class CaseApplication extends BaseEntity {
/** 是否同意审核 */
private Integer agreeOrNotCheck;
public Integer getAgreeOrNotCheck() {
return agreeOrNotCheck;
}
@@ -399,111 +180,6 @@ public class CaseApplication extends BaseEntity {
private String applicantName;
/** 被申请人名称 */
private String respondentName;
/**
* 用户身份证号
*/
private String idCard;
/**
* 用户id
*/
private String userId;
/**
* 登录用户用户名
*/
private String loginUserName;
private List<Long> deptIds;
/**
* 部门长状态
*/
private List<Integer> deptHeadStatus;
/**
* 代理人角色有关部门
*/
private List<Long> agentDeptIds;
/**
* 财务状态
*/
private Integer financeStatus;
/**
* 是否是被申请人,仲裁员,部门长,财务,代理人,0-否,1-是
*/
private Integer isOtherRole;
/**
* 案件日志id
*/
private Long caseLogId;
public Long getCaseLogId() {
return caseLogId;
}
public void setCaseLogId(Long caseLogId) {
this.caseLogId = caseLogId;
}
public Integer getIsOtherRole() {
return isOtherRole;
}
public void setIsOtherRole(Integer isOtherRole) {
this.isOtherRole = isOtherRole;
}
public List<Long> getAgentDeptIds() {
return agentDeptIds;
}
public void setAgentDeptIds(List<Long> agentDeptIds) {
this.agentDeptIds = agentDeptIds;
}
public String getLoginUserName() {
return loginUserName;
}
public void setLoginUserName(String loginUserName) {
this.loginUserName = loginUserName;
}
public Integer getFinanceStatus() {
return financeStatus;
}
public void setFinanceStatus(Integer financeStatus) {
this.financeStatus = financeStatus;
}
public List<Integer> getDeptHeadStatus() {
return deptHeadStatus;
}
public void setDeptHeadStatus(List<Integer> deptHeadStatus) {
this.deptHeadStatus = deptHeadStatus;
}
public List<Long> getDeptIds() {
return deptIds;
}
public void setDeptIds(List<Long> deptIds) {
this.deptIds = deptIds;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public String getApplicantName() {
return applicantName;
@@ -656,21 +332,11 @@ public class CaseApplication extends BaseEntity {
* 申请人主体信息
*/
/** 姓名 */
@Excel(name = "申请人主体信息-申请人(机构)",width = 26)
@Excel(name = "申请人主体信息-申请人姓名",width = 26)
private String name;
/** 身份证号 */
@Excel(name = "申请人主体信息-代码",width = 26)
@Excel(name = "申请人主体信息-身份证号",width = 26)
private String identityNum;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人",width = 26)
private String compLegalPerson;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人职位",width = 26)
private String compLegalperPost;
/**
* 申请人主体信息-申请人(机构)id
*/
private String nameId;
/** 联系电话 */
@Excel(name = "申请人主体信息-联系电话",width = 26)
@@ -685,56 +351,19 @@ public class CaseApplication extends BaseEntity {
@Excel(name = "申请人主体信息-单位地址",width = 26)
private String workAddress;
/** 申请人住所 */
@Excel(name = "申请人主体信息-住所",width = 26)
private String residenAffiliAppli;
/** 申请人邮箱 */
@Excel(name = "申请人主体信息-邮箱",width = 26)
private String email;
/** 代理人姓名 */
@Excel(name = "申请人主体信息-代理人姓名",width = 26)
private String nameAgent;
/** 身份证号 */
@Excel(name = "申请人主体信息-代理人身份证号",width = 26)
private String identityNumAgent;
/** 联系电话 */
@Excel(name = "申请人主体信息-代理人联系电话",width = 26)
private String contactTelphoneAgent;
/** 联系地址 */
@Excel(name = "申请人主体信息-代理人联系地址",width = 26)
private String contactAddressAgent;
/** 申请人代理人职称 */
@Excel(name = "申请人主体信息-代理人职称",width = 26)
private String appliAgentTitle;
public String getResidenAffiliAppli() {
return residenAffiliAppli;
}
public void setResidenAffiliAppli(String residenAffiliAppli) {
this.residenAffiliAppli = residenAffiliAppli;
}
public String getAppliAgentTitle() {
return appliAgentTitle;
}
public void setAppliAgentTitle(String appliAgentTitle) {
this.appliAgentTitle = appliAgentTitle;
}
public String getResidenAffiliRespon() {
return residenAffiliRespon;
}
public void setResidenAffiliRespon(String residenAffiliRespon) {
this.residenAffiliRespon = residenAffiliRespon;
}
/**
/**
* 被申请人主体信息
*/
/** 姓名 */
@@ -743,48 +372,6 @@ public class CaseApplication extends BaseEntity {
/** 身份证号 */
@Excel(name = "被申请人主体信息-身份证号",width = 26)
private String debtorIdentityNum;
/** 被申请人主体信息-性别 */
@Excel(name = "被申请人主体信息-性别",width = 26,combo= {"男","女"},readConverterExp = "0=男,1=女")
private String responSex;
public Date getResponBirth() {
return responBirth;
}
public void setResponBirth(Date responBirth) {
this.responBirth = responBirth;
}
/** 被申请人主体信息-出生年月日 */
@Excel(name = "被申请人主体信息-出生年月日",width = 26)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date responBirth;
public String getCompLegalPerson() {
return compLegalPerson;
}
public void setCompLegalPerson(String compLegalPerson) {
this.compLegalPerson = compLegalPerson;
}
public String getCompLegalperPost() {
return compLegalperPost;
}
public void setCompLegalperPost(String compLegalperPost) {
this.compLegalperPost = compLegalperPost;
}
public String getResponSex() {
return responSex;
}
public void setResponSex(String responSex) {
this.responSex = responSex;
}
/** 联系电话 */
@Excel(name = "被申请人主体信息-联系电话",width = 26)
@@ -792,18 +379,12 @@ public class CaseApplication extends BaseEntity {
/** 联系地址 */
@Excel(name = "被申请人主体信息-联系地址",width = 26)
private String debtorContactAddress;
/** 被申请人住所 */
@Excel(name = "被申请人主体信息-住所",width = 26)
private String residenAffiliRespon;
/** 单位电话 */
@Excel(name = "被申请人主体信息-单位电话",width = 26)
private String debtorWorkTelphone;
/** 单位地址 */
@Excel(name = "被申请人主体信息-单位地址",width = 26)
private String debtorWorkAddress;
/** 邮箱 */
@Excel(name = "被申请人主体信息-邮箱",width = 26)
private String debtorEmail;
/** 代理人姓名 */
@Excel(name = "被申请人主体信息-代理人姓名",width = 26)
@@ -817,58 +398,6 @@ public class CaseApplication extends BaseEntity {
/** 联系地址 */
@Excel(name = "被申请人主体信息-代理人联系地址",width = 26)
private String debtorContactAddressAgent;
/**
* 申请机构id
*/
private String applicationOrganId;
/**
* 版本号
*/
private Integer version;
/**
* 修改案件的提交状态,0-未提交,1-已提交,2-同意,3-拒绝,4-撤销
*/
private Integer updateSubmitStatus;
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public Integer getUpdateSubmitStatus() {
return updateSubmitStatus;
}
public void setUpdateSubmitStatus(Integer updateSubmitStatus) {
this.updateSubmitStatus = updateSubmitStatus;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getDebtorEmail() {
return debtorEmail;
}
public void setDebtorEmail(String debtorEmail) {
this.debtorEmail = debtorEmail;
}
public String getApplicationOrganId() {
return applicationOrganId;
}
public void setApplicationOrganId(String applicationOrganId) {
this.applicationOrganId = applicationOrganId;
}
public int getIdentityType() {
return identityType;
@@ -886,14 +415,6 @@ public class CaseApplication extends BaseEntity {
this.name = name;
}
public String getNameId() {
return nameId;
}
public void setNameId(String nameId) {
this.nameId = nameId;
}
public String getIdentityNum() {
return identityNum;
}
@@ -1,23 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class CaseApplicationPay {
/** 案件编号 */
private String caseNum;
/** 案件标的 */
private BigDecimal caseSubjectAmount;
/** 仲裁应缴费用 */
private BigDecimal feePayable;
/** 案件状态 */
private Integer caseStatus;
/**申请人 */
private String caseAppName;
/**被申请人 */
private String caseResName;
}
@@ -18,10 +18,6 @@ public class CaseAttach {
* 案件申请id
*/
private Long caseAppliId;
/**
* 案件记录id
*/
private Long caseAppliLogId;
/**
* 附件名称
*/
@@ -31,7 +27,7 @@ public class CaseAttach {
*/
private String annexPath;
/**
* 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
* 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
*/
private Integer annexType;
/**
@@ -46,13 +42,5 @@ public class CaseAttach {
* 用户账户
*/
private String userName;
/**
* 印章状态(0未启用,1已启用)
*/
private Integer sealStatus;
/**
* 是否是证据上传,0-否,1-是
*/
private Integer isBatchUpload;
}
@@ -1,60 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.ArrayList;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CaseEvidenceDirectory extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 父id
*/
private Long parentId;
/**
* 证据名称
*/
private String evidenceName;
/**
* 附件id
*/
private Integer annexId;
/**
* 级数
*/
private Integer series;
/**
* 案件id
*/
private Long caseId;
/** 子目录 */
private List<CaseEvidenceDirectory> children = new ArrayList<>();
/**
* 附件名称
*/
private String annexName;
/**
* 附件路径
*/
private String annexPath;
}
@@ -1,9 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import lombok.Data;
import java.util.List;
@Data
public class CaseIds {
private List<Long> ids;
}
@@ -25,42 +25,6 @@ public class CaseLogRecord extends BaseEntity {
/** 案件编号 */
private String caseNum;
/**
* 展示的内容
*/
private String content;
/**
* 用户昵称
*/
private String createNickName;
/**
* 角色名称
*/
private String roleName;
/**
* 节点名称
*/
private String caseNodeName;
public String getCaseNodeName() {
return caseNodeName;
}
public void setCaseNodeName(String caseNodeName) {
this.caseNodeName = caseNodeName;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getCaseNum() {
return caseNum;
@@ -86,7 +50,7 @@ public class CaseLogRecord extends BaseEntity {
this.caseAppliId = caseAppliId;
}
public Integer getCaseNode() {
public int getCaseNode() {
return caseNode;
}
@@ -109,24 +73,4 @@ public class CaseLogRecord extends BaseEntity {
public void setNotes(String notes) {
this.notes = notes;
}
public void setCaseNode(Integer caseNode) {
this.caseNode = caseNode;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCreateNickName() {
return createNickName;
}
public void setCreateNickName(String nickName) {
this.createNickName = nickName;
}
}
@@ -38,8 +38,4 @@ public class CasePaymentRecord {
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
}
@@ -1,61 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
@Data
public class DeptIdentify extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 部门id */
private Long deptId;
/** 用户id */
private Long userId;
/** 机构名称 */
private String identifyName;
/** 认证状态 */
private Integer identifyStatus;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date identifyDate;
/** 是否启用 */
private Integer isUse;
/** 经办人姓名 */
private String operName;
/** 经办人用户名 */
private String operUserName;
/** 经办人手机号 */
private String operPhone;
/** 机构账号ID */
private String orgId;
/** 认证授权流程ID */
private String authFlowId;
/** 部门认证链接 */
private String identifyUrl;
/** 机构信用代码 */
private String creditCode;
/** 法人姓名 */
private String legalPerName;
/** 法人手机号 */
private String legalPerPhone;
/** 机构类型(1 仲裁机构) */
private Integer identifyType;
/** 机构邮箱 */
private String identifyEmail;
/** 删除标志(0代表存在 2代表删除) */
private Integer delFlag;
}
@@ -3,10 +3,9 @@ package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
@Data
public class IdentityAuthentication extends BaseEntity {
private static final long serialVersionUID = 1L;
@@ -16,20 +15,6 @@ public class IdentityAuthentication extends BaseEntity {
private String name;
/** 身份证号 */
private String identityNo;
/**
* 短信验证码
*/
private String VerifyCode;
private String passWord;
private String phone;
/**
* 邮箱
*/
private String email;
/**
* 身份证地址
*/
private String idAddress;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date certificationTime;
@@ -59,10 +44,6 @@ public class IdentityAuthentication extends BaseEntity {
private Long userId;
/** 用户账号 */
private String userName;
/**
* 用户昵称
*/
private String nickName;
/** EID商户id */
private String merchantId;
@@ -1,63 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* @author wangqiong
* @description 预定会议
* @Version 1.0
* @date 2023-11-09 16:51
*/
@Data
public class ReservedConference {
/**
* id
*/
private Long id;
/**
* 用户id
*/
private Long userId;
/**
* 用户名
*/
private String userName;
/**
* 案件id
*/
private Long caseId;
/**
* 房间号
*/
private long roomId;
/**
* 预定会议开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleStartTime;
/**
* 预定会议结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleEndTime;
/**
* 是否超过5分钟
*/
private Boolean isBeforeFiveMinutes;
public ReservedConference() {
}
public ReservedConference(Long caseId, Long userId, long roomId, Date scheduleStartTime, Date scheduleEndTime) {
this.caseId = caseId;
this.userId = userId;
this.roomId = roomId;
this.scheduleStartTime = scheduleStartTime;
this.scheduleEndTime = scheduleEndTime;
}
}
@@ -1,48 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
@Data
public class SealManage extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
/**
* 机构关联id
*/
private Long identifyId;
/**
* 印章名称
*/
private String sealName;
/**
* 印章id
*/
private String sealId;
/**
* 附件id
*/
private Integer annexId;
/**
* 印章审核状态(0未通过,1通过)
*/
private Integer sealStatus;
/**
* 印章使用状态(0禁用,1启用)
*/
private Integer isUse;
/**
* 附件路径
*/
private String annexPath;
}
@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity;
public class SealSignRecord extends BaseEntity {
public class SealSignRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
@@ -24,79 +24,6 @@ public class SealSignRecord extends BaseEntity {
/** 机构经办人名称 */
private String orgnizeNamepsnName;
String fileDownloadUrl;
public String getFileDownloadUrl() {
return fileDownloadUrl;
}
public void setFileDownloadUrl(String fileDownloadUrl) {
this.fileDownloadUrl = fileDownloadUrl;
}
/** 流程状态 */
private Integer signFlowStatus;
/** 签名状态 */
private Integer psnsignStatus;
/** 用印状态 */
private Integer orgsignStatus;
/** 签名链接 */
private String signUrl;
public String getSignUrl() {
return signUrl;
}
public void setSignUrl(String signUrl) {
this.signUrl = signUrl;
}
public String getSealUrl() {
return sealUrl;
}
public void setSealUrl(String sealUrl) {
this.sealUrl = sealUrl;
}
/** 用印链接 */
private String sealUrl;
private Long caseAppliId;
public Long getCaseAppliId() {
return caseAppliId;
}
public void setCaseAppliId(Long caseAppliId) {
this.caseAppliId = caseAppliId;
}
public Integer getPsnsignStatus() {
return psnsignStatus;
}
public void setPsnsignStatus(Integer psnsignStatus) {
this.psnsignStatus = psnsignStatus;
}
public Integer getOrgsignStatus() {
return orgsignStatus;
}
public void setOrgsignStatus(Integer orgsignStatus) {
this.orgsignStatus = orgsignStatus;
}
public Integer getSignFlowStatus() {
return signFlowStatus;
}
public void setSignFlowStatus(Integer signFlowStatus) {
this.signFlowStatus = signFlowStatus;
}
public String getFileid() {
return fileid;
}
@@ -222,7 +149,6 @@ public class SealSignRecord extends BaseEntity {
/** 印章位置y坐标 */
private double positionYorg;
public Long getId() {
return id;
}
@@ -1,115 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
public class SendMailRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
private Long id;
/** 案件申请id */
private Long caseId;
/**
* 邮件名称
*/
private String mailName;
/**
* 邮件内容
*/
private String mailContent;
/**
* 邮件地址
*/
private String mailAddress;
/**
* 发送时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date sendTime;
/** 案件编号 */
private String caseNum;
/** 发送状态 */
private Integer sendStatus;
public Integer getSendStatus() {
return sendStatus;
}
public void setSendStatus(Integer sendStatus) {
this.sendStatus = sendStatus;
}
public String getCaseNum() {
return caseNum;
}
public void setCaseNum(String caseNum) {
this.caseNum = caseNum;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCaseId() {
return caseId;
}
public void setCaseId(Long caseId) {
this.caseId = caseId;
}
public String getMailName() {
return mailName;
}
public void setMailName(String mailName) {
this.mailName = mailName;
}
public String getMailContent() {
return mailContent;
}
public void setMailContent(String mailContent) {
this.mailContent = mailContent;
}
public String getMailAddress() {
return mailAddress;
}
public void setMailAddress(String mailAddress) {
this.mailAddress = mailAddress;
}
public Date getSendTime() {
return sendTime;
}
public void setSendTime(Date sendTime) {
this.sendTime = sendTime;
}
}
@@ -1,45 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SmsSendRecord extends BaseEntity {
/**
* ID
*/
private Long id;
/**
* 案件申请id
*/
private Long caseId;
/**
* 案件编号
*/
private String caseNum;
/**
* 手机号
*/
private String phone;
/**
* 发送时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date sendTime;
/**
* 发送内容
*/
private String sendContent;
/**
* 发送状态
*/
private Integer sendStatus;
}
@@ -1,52 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
@Data
public class TemplateManage extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Long id;
/**
* 机构关联id
*/
private Long identifyId;
/**
* 模板名称
*/
private String temName;
/**
* 模板类型(1裁决书)
*/
private Integer temType;
/**
* 模板格式
*/
private String temFormat;
/**
* 文件名
*/
private String fileName;
/**
* 原模板路径
*/
private String temOrigPath;
/**
* 修订后模板路径
*/
private String temRevisPath;
/**
* 删除标志(0代表存在 2代表删除)
*/
private Integer delFlag;
/**
* 机构关联id
*/
private String identifyName;
}
@@ -1,33 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
@Data
public class TemplateManual {
/**
* ID
*/
private Long id;
/**
* 模板名称
*/
private String name;
/**
* 模板内容,用{}作为占位符动态替换其内容
*/
private String content;
/**
* 模板类型,1-裁决内容,2-调解协议,3-金融消费纠纷基本情况
*/
private Integer type;
/**
* 删除标志(0代表存在 2代表删除)
*/
private Integer delFlag;
}
@@ -1,255 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import lombok.Data;
import java.util.Date;
/**
* @author wangqiong
* @description 案件日志
* @date 2023-11-17 14:01
*/
@Data
public class CaseApplicationLogDTO {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 案件编号
*/
private String caseNum;
/**
* 案件标的
*/
private Double caseSubjectAmount;
/**
* 立案日期
*/
private Date registerDate;
/**
* 仲裁方式,视频仲裁(1)、书面仲裁(2)
*/
private Long arbitratMethod;
/**
* 案件状态,立案申请(0)、待立案审查(1)、 待缴费(2)、待缴费确认(3)、 待案件质证(4)、
*/
private Integer caseStatus;
/**
* 开庭日期
*/
private Date hearDate;
/**
* 申请人仲裁请求及事实和理由
*/
private String arbitratClaims;
/**
* 借款开始日期
*/
private Date loanStartDate;
/**
* 借款结束日期
*/
private Date loanEndDate;
/**
* 申请人主张欠本金
*/
private Double claimPrinciOwed;
/**
* 申请人主张欠利息
*/
private Double claimInterestOwed;
/**
* 申请人主张违约金
*/
private Double claimLiquidDamag;
/**
* 仲裁应缴费用
*/
private Double feePayable;
/**
* 开始在线视频时间
*/
private Date beginVideoDate;
/**
* 在线视频人员
*/
private String onlineVideoPerson;
/**
* 合同编号
*/
private String contractNumber;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建者
*/
private String createBy;
/**
* 仲裁员id
*/
private String arbitratorId;
/**
* 仲裁员名称
*/
private String arbitratorName;
/**
* 已确认组庭的仲裁员id
*/
private String pendedTrialArbitorid;
/**
* 是否指派仲裁员,1是,2否
*/
private Integer pendingAppointArbotrar;
/**
* 案件名称
*/
private String caseName;
/**
* 案件描述
*/
private String caseDescribe;
/**
* 仲裁结果
*/
private String caseResult;
/**
* 是否同意组庭,0否,1是
*/
private Integer isAgreePendTral;
/**
* 是否有异议需要举证,1是,0否
*/
private Integer objectionAddEviden;
/**
* 是否需要开庭审理,1是,0否
*/
private Integer openCourtHear;
/**
* paid_expenses
*/
private Double paidExpenses;
/**
* 裁决书URL
*/
private String filearbitraUrl;
/**
* 支付方式(0线上支付,1线下支付)
*/
private String payType;
/**
* 申请人请求仲裁庭裁决
*/
private String requestRule;
/**
* 是否仲裁反请求,1是,0否
*/
private Integer adjudicaCounter;
/**
* 是否财产保全申请,1是,0否
*/
private Integer properPreser;
/**
* 是否管辖异议申请,1是,0否
*/
private Integer objectiJuris;
/**
* 被申请人是否缺席,1是,0否
*/
private Integer isAbsence;
/**
* 被申请人质证意见
*/
private String responCrossOpin;
/**
* 申请人质证意见
*/
private String applicaCrossOpin;
/**
* 被申请人的答辩意见
*/
private String responDefenOpini;
/**
* 申请人是否缺席,1是,0否
*/
private Integer appliIsAbsen;
/**
* 是否锁定,0-否,1-是
*/
private Integer lockStatus;
/**
* 视频会议房间号id,多个用逗号拼接
*/
private String roomId;
/**
* 是否导入,0手动录入,1导入,默认0
*/
private Integer importFlag;
/**
* 版本号
*/
private Long version;
/**
* 修改案件的提交状态,0-未提交,1-已提交,2-同意,3,拒绝
*/
private Integer updateSubmitStatus;
}
@@ -1,28 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* 案件确认缴费传入对象
*/
@Data
public class CaseConfirmPayDTO {
/**
* 案件ids
*/
@NotNull(message = "案件id不能为空")
private List<Long> caseIds;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
}
@@ -29,15 +29,6 @@ public class CaseEvidenceDTO {
* 是否指派仲裁员,1是,2否
*/
private Integer pendingAppointArbotrar;
/** 是否仲裁反请求 */
private Integer adjudicaCounter;
/**
* 仲裁反请求原因
*/
private String adjudicaCounterReason;
/** 是否管辖异议申请 */
private Integer objectiJuris;
/**
* 案件仲裁员
@@ -1,10 +1,6 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import lombok.Data;
import java.util.List;
/**
* 案件缴费传入对象
*/
@@ -13,7 +9,7 @@ public class CasePayDTO {
/**
* 案件id
*/
private List<Long> caseIds;
private Long caseId;
/**
* 订单金额 单位:分
@@ -27,12 +23,4 @@ public class CasePayDTO {
* 支付方式 wxpay(微信) alipay(支付宝)
*/
private String platform;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
}
@@ -1,24 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
import lombok.Data;
import java.util.List;
@Data
public class ArchivesDetailVO {
/**
* 案件信息
*/
private CaseApplication caseApplication;
/**
* 案件日志信息
*/
private List<CaseLogRecord> caseLogRecordList;
/**
* 快递信息
*/
private List<LogisticsInfoVO> logisticsInfoVOList;
}
@@ -1,200 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 目录查询返回类
*/
public class CaseEvidenceDirectoryVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private Long id;
/**
* 父id
*/
private Long parentId;
/**
* 证据名称
*/
private String evidenceName;
/**
* 附件id
*/
private Integer annexId;
/**
* 级数
*/
private Integer series;
/**
* 案件id
*/
private Long caseId;
/** 子目录 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<CaseEvidenceDirectory> children;
/**
* 附件名称
*/
private String annexName;
/**
* 附件路径
*/
private String annexPath;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date createTime;
/**
* 创建者
*/
private String createBy;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private Date updateTime;
public CaseEvidenceDirectoryVO(){
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getEvidenceName() {
return evidenceName;
}
public void setEvidenceName(String evidenceName) {
this.evidenceName = evidenceName;
}
public Integer getAnnexId() {
return annexId;
}
public void setAnnexId(Integer annexId) {
this.annexId = annexId;
}
public Integer getSeries() {
return series;
}
public void setSeries(Integer series) {
this.series = series;
}
public Long getCaseId() {
return caseId;
}
public void setCaseId(Long caseId) {
this.caseId = caseId;
}
public List<CaseEvidenceDirectory> getChildren() {
return children;
}
public void setChildren(List<CaseEvidenceDirectory> children) {
this.children = children;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getAnnexName() {
return annexName;
}
public void setAnnexName(String annexName) {
this.annexName = annexName;
}
public void setAnnexPath(String annexPath) {
this.annexPath = annexPath;
}
public CaseEvidenceDirectoryVO(CaseEvidenceDirectory caseEvidenceDirectory) {
this.id = caseEvidenceDirectory.getId();
this.parentId = caseEvidenceDirectory.getParentId();
this.evidenceName = caseEvidenceDirectory.getEvidenceName();
this.annexId = caseEvidenceDirectory.getAnnexId();
this.series = caseEvidenceDirectory.getSeries();
this.caseId = caseEvidenceDirectory.getCaseId();
this.children = caseEvidenceDirectory.getChildren();
this.createTime = caseEvidenceDirectory.getCreateTime();
this.createBy = caseEvidenceDirectory.getCreateBy();
this.updateBy = caseEvidenceDirectory.getUpdateBy();
this.updateTime = caseEvidenceDirectory.getUpdateTime();
this.annexName = caseEvidenceDirectory.getAnnexName();
this.annexPath = caseEvidenceDirectory.getAnnexPath();
}
}
@@ -1,11 +1,8 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class CaseEvidenceVO {
/**
@@ -28,13 +25,4 @@ public class CaseEvidenceVO {
* 案件状态
*/
private Integer caseStatus;
/**
* 房间号
*/
private Long roomId;
/**
* 开庭时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleStartTime;
}
@@ -0,0 +1,29 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
import java.util.Date;
/**
* @description 案件操作日志实体
* @Author wangqiong
* @Date 2023/10/09 15:18
* @Version V1.0
**/
@Data
public class CaseLogVO {
/**日志id*/
private String logId;
/**操作人id*/
private String operatorId;
/**操作人名称*/
private String operatorName;
/**操作人ip*/
private String ip;
/**操作时间*/
private Date operateTime;
/**操作明细*/
private String operateDetail;
/**操作类型*/
private String operateType;
}
@@ -1,25 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplicationPay;
import lombok.Data;
import java.util.List;
@Data
public class CasePayListVO {
/**
* 订单总金额 单位:分
*/
private int totalFee;
/**
* 案件总条数
*/
private int CaseTotal;
/**
* 案件订单列表
*/
private List<CaseApplicationPay> caseApplicationList;
}
@@ -1,34 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 案件前后对比
* @author wangqiong
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CompareCaseVO {
/**
* 该版本前的案件
*/
private CaseApplication beforeCase;
/**
* 该版本后的案件
*/
private CaseApplication afterCase;
/**
* 变化字段,多个用,拼接
*/
private String changeColumn;
}
@@ -1,47 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @author wangqiong
* @description 预约会议
* @date 2023-11-08 11:05
*/
@Data
public class ReservedConferenceVO {
/**
* 用户id
*/
private String ownerId;
/**
* 房间号id
*/
private Long roomId;
/**
* 会议开始时间
*/
@NotNull(message = "会议开始时间不能为空")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleStartTime;
/**
* 会议结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleEndTime;
/**
* 案件id
*/
@NotNull(message = "案件id不能为空")
private Long caseId;
/**
* html内容
*/
private String htmlContent;
}
@@ -1,35 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
@Data
public class SealListVO {
/** 主键 */
private Long id;
/** 印章id */
private String sealId;
/** 印章名称 */
private String sealName;
/**
* 印章审核状态(0未通过,1通过)
*/
private Integer sealStatus;
/**
* 印章使用状态(0禁用,1启用)
*/
private Integer isUse;
/**
* 附件id
*/
private Integer annexId;
/**
* 附件路径
*/
private String annexPath;
/**
* 附件类型
*/
private Integer annexType;
}
@@ -1,29 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* @author wangqiong
* @description 发送房间号短信入参类
* @date 2023-10-10 15:20
*/
@Data
public class SendRoomNoMessageVO implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull(message = "案件id不能为空")
private Long id;
@NotEmpty(message = "房间号不能为空")
private String roomNo;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleEndTime;
}
@@ -1,33 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
/**
* @author wangqiong
* @description 待办数量
* @date 2023-10-17 09:48
*/
@Data
public class ToDoCount {
private int caseApply=0; // 立案申请
private int caseApplyCheck=0; // 待立案审查
private int caseApplyPay=0; // 待缴费
private int caseApplyPayCheck=0; // 待缴费确认
private int caseApplyEvidence=0; //待案件质证
private int caseApplyGroupCheck=0; // 待组庭审核
private int caseApplyGroupConfirm=0; // 待组庭确定
// private int caseApplyGroupNotice;
private int caseApplyArbitrateWay=0; // 待审核仲裁方式
private int caseApplyGroupOnline=0; // 待开庭审理
private int caseApplyGroupOffline=0; // 待书面审理
private int caseApplyAward=0; // 待生成仲裁文书
private int caseApplyAwardCheck=0; // 待核验仲裁文书
private int caseApplyAwardConfirm=0; // 待审核仲裁文书
private int caseApplyAwardSign=0; // 待仲裁文书签名
private int caseApplyAwardSeal=0; // 待仲裁文书用印
private int caseApplyAwardSend=0; // 待仲裁文书送达
private int caseApplyStored=0; // 待案件归档
private int caseApplyArchived=0; // 已归档
private int updateOnlineHearDate=0; // 待修改开庭时间
}
@@ -1,38 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 修改案件提交至秘书
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UpdateSubmitVO {
/**
* 案件id
*/
private Long caseId;
/**
* 版本号
*/
private Integer version;
/**
* 修改案件的提交状态,0-未提交,1-已提交,2-撤销,3-同意已修改的案件,4-拒绝已修改的案件,5-同意撤销,6-拒绝撤销
*/
private Integer updateSubmitStatus;
/**
* 是否同意,0-否,1-是
*/
private Integer isAgree;
/**
* 拒絕原因
*/
private String reason;
}
@@ -1,63 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
/**
* 微信小程序用户注册登录
*/
@Data
public class WeChatUserVO {
/**
* id
*/
private Long id;
/**
* 微信用户唯一标识
*/
private String openId;
/**
* 微信授权的code,用户登录凭证
*/
private String wxCode;
/**
* 姓名
*/
@NotEmpty(message = "姓名不能为空")
private String name;
/** 身份证号 */
@NotEmpty(message = "身份证号不能为空")
private String identityNo;
/** 认证时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date certificationTime;
/** 认证状态 */
private Integer certificationStatus;
private String password;
/**
* 电话
*/
@NotEmpty(message = "电话不能为空")
private String phone;
/**
* 验证码
*/
private String verifyCode;
/**
* 邮箱
*/
@NotEmpty(message = "邮箱不能为空")
private String email;
/**
* 创建人
*/
private String createBy;
private String updateBy;
}
@@ -1,12 +1,10 @@
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,10 +1,7 @@
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;
@@ -15,31 +12,9 @@ public interface CaseAffiliateMapper {
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,47 +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);
/**
* 根据案件id删除案件记录表和案件关联人日志表
* @param ids
*/
void batchDeleteLog(@Param("ids") List<Long> ids);
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
}
@@ -1,28 +1,16 @@
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);
@@ -34,13 +22,6 @@ public interface CaseApplicationMapper {
CaseApplication selectCaseApplication(CaseApplication caseApplication);
/**
* 根据案件id查询案件信息
* @param ids
* @return
*/
List<CaseApplication> listCaseApplicationByIds(@Param("ids")List<Long> ids);
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
/**
@@ -50,85 +31,4 @@ public interface CaseApplicationMapper {
* @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);
/**
* 查询秘书案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectSecretaryCase(CaseApplication caseApplication);
/**
* 查询申请人案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectApplicationCase(CaseApplication caseApplication);
}
@@ -1,30 +0,0 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CaseAttachLogMapper {
int save(CaseAttach caseAttach);
List<CaseAttach> queryAnnexPathByCaseId(Long id);
List<CaseAttach> queryCaseAttachList(CaseApplication caseApplication);
int updateCaseAttach(CaseAttach caseAttach);
int updateCaseAttachBycaseid(CaseAttach caseAttach);
int deleteByFileIds(@Param("ids") List<Integer> fileIds);
List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
CaseAttach queryAnnexById(Integer annexId);
}
@@ -2,34 +2,16 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CaseAttachMapper {
int save(CaseAttach caseAttach);
List<CaseAttach> queryAnnexPathByCaseId(Long id);
List<CaseAttach> queryAnnexPathByCaseId(Long id);
List<CaseAttach> queryCaseAttachList(CaseApplication caseApplication);
int updateCaseAttach(CaseAttach caseAttach);
int updateCaseAttachBycaseid(CaseAttach caseAttach);
int deleteByFileIds(@Param("ids") List<Integer> fileIds);
List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
CaseAttach queryAnnexById(Integer annexId);
/**
* 根据案件id和附件类型删除和上传类型
* @param caseAppliId
* @param annexType
*/
void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
}
@@ -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);
}
@@ -11,6 +11,5 @@ import java.util.List;
public interface CaseEvidenceMapper {
List<CaseEvidenceVO> getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
, @Param(value = "caseStatusList") List<Integer> caseStatusList
, @Param(value = "identityType" ) Integer identityType
);
, @Param(value = "identityType" ) Integer identityType);
}
@@ -2,11 +2,9 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
public interface CaseLogRecordMapper {

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