Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
238a6e5eea | ||
|
|
dc70ecbce7 | ||
|
|
f6ac03bca3 | ||
|
|
5abeaf5224 | ||
|
|
9e8724c525 | ||
|
|
a08092eb37 | ||
|
|
32846984c0 | ||
|
|
5a264e2ef0 | ||
|
|
9b8b004edf | ||
|
|
ea354f0967 | ||
|
|
3f55cee7e3 | ||
|
|
521f1e24b9 | ||
|
|
0bf88192cf | ||
|
|
b6d27fa7e1 | ||
|
|
b75a892a50 | ||
|
|
f1a5037af3 | ||
|
|
8f9f16254a | ||
|
|
6acf5e3bcc | ||
|
|
e35ffedea5 | ||
|
|
1110c97ef6 | ||
|
|
44b50777fb | ||
|
|
c84ba68599 | ||
|
|
3ec845fc46 | ||
|
|
7fb8b20955 | ||
|
|
8b490936aa | ||
|
|
2299906c55 | ||
|
|
95a91b4189 | ||
|
|
09c3555645 | ||
|
|
bda663a740 | ||
|
|
3637a7d65d | ||
|
|
cc4d7139dc | ||
|
|
0fb56c95db | ||
|
|
809e457480 | ||
|
|
e2c5fbf77d | ||
|
|
29d7cd37bf | ||
|
|
a73b5ca3b4 | ||
|
|
8718bece10 | ||
|
|
f6471058a3 | ||
|
|
b03cf6428b | ||
|
|
f8a9cc83fe | ||
|
|
e646b00333 | ||
|
|
7d6976224d | ||
|
|
918c1a8bad | ||
|
|
5e544e6d4e | ||
|
|
07dd08f824 | ||
|
|
f76a2e9850 | ||
|
|
504d1e371b | ||
|
|
7c3044811e | ||
|
|
a5e3b61d4f | ||
|
|
a03a23f2c1 | ||
|
|
58a5f083fe | ||
|
|
0367602fe3 | ||
|
|
6da9516d82 | ||
|
|
f94be91bb3 | ||
|
|
e5c8ebfb31 | ||
|
|
75da02d795 | ||
|
|
376e86cc28 | ||
|
|
b0aa7d09c4 | ||
|
|
a32386e726 | ||
|
|
333c162ab0 | ||
|
|
915b60f43b | ||
|
|
a6195fc255 | ||
|
|
a24635c429 | ||
|
|
b56288cc8c | ||
|
|
a851d66423 | ||
|
|
02ba078238 | ||
|
|
6559304793 | ||
|
|
dfddc6a9f4 | ||
|
|
4daceeb105 | ||
|
|
6314a583b9 | ||
|
|
36b5925786 | ||
|
|
17c9b2659e | ||
|
|
37ad9a3112 | ||
|
|
666090fbe3 | ||
|
|
9537faea90 | ||
|
|
72026ee6f4 | ||
|
|
08f4aca27c | ||
|
|
b0f71c6e3a | ||
|
|
653f814372 | ||
|
|
7fef478c00 | ||
|
|
a7f1f00cf9 | ||
|
|
c596c5654f |
@@ -391,7 +391,7 @@ public class WxPayElegentTrade implements ElegentTrade {
|
||||
private CloseableHttpClient getWxHttpClient() {
|
||||
try {
|
||||
//这里对秘钥进行加密使用的完全是官网上的代码
|
||||
//TODO 参考官网代码 https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_6_2.shtml
|
||||
// 参考官网代码 https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_6_2.shtml
|
||||
// 加载商户私钥(privateKey:私钥字符串)
|
||||
String key = FileUtil.readToStr("wxpay_private.key");
|
||||
|
||||
|
||||
+3
-2
@@ -9,7 +9,8 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
<artifactId>mediation</artifactId>
|
||||
<version>1.1.0</version>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
@@ -99,7 +100,7 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -2,9 +2,11 @@ package com.ruoyi;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -28,16 +30,13 @@ public class RuoYiApplication
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
System.out.println("(♥◠‿◠)ノ゙ 启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" _ _ _ _ \n" +
|
||||
" | |_(_) __ _ ___ (_|_) ___ \n" +
|
||||
" | __| |/ _` |/ _ \\ | | |/ _ \\\n" +
|
||||
" | |_| | (_| | (_) | | | | __/\n" +
|
||||
" \\__|_|\\__,_|\\___/ _/ |_|\\___|\n" +
|
||||
" |__/ ");
|
||||
// 启动成功后,查询用户表,将用户信息存到redis
|
||||
RedisCache redisCache = SpringUtils.getBean(RedisCache.class);
|
||||
SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
|
||||
@@ -47,5 +46,14 @@ public class RuoYiApplication
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+sysUser.getUserId(),sysUser);
|
||||
}
|
||||
}
|
||||
// 初始化角色redis
|
||||
SysRoleMapper roleMapper = SpringUtils.getBean(SysRoleMapper.class);
|
||||
List<SysRole> roles = roleMapper.selectRoleList(new SysRole());
|
||||
if(CollectionUtil.isNotEmpty(roles)){
|
||||
for (SysRole role : roles) {
|
||||
redisCache.setCacheObject(CacheConstants.ROLE_KEY+role.getRoleName(),role.getRoleId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.google.common.io.Files.getFileExtension;
|
||||
|
||||
/**
|
||||
* 通用请求处理
|
||||
*
|
||||
@@ -116,6 +118,7 @@ public class CommonController
|
||||
.annexType(annexType)
|
||||
.useId(SecurityUtils.getUserId())
|
||||
.useAccount(SecurityUtils.getUsername())
|
||||
.suffix(getFileExtension(path))
|
||||
.build();
|
||||
msCaseAttachMapper.save(caseAttach);
|
||||
return caseAttach.getAnnexId();
|
||||
|
||||
@@ -5,9 +5,11 @@ import cn.hutool.crypto.digest.MD5;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
@@ -22,6 +24,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -83,11 +87,20 @@ public class SysLoginController {
|
||||
public AjaxResult getInfo() {
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// 角色集合
|
||||
Set<String> roles = permissionService.getRolePermission(user);
|
||||
List<SysRole> roles = permissionService.getRolePermission(user);
|
||||
Set<String> permsSet = new HashSet<>();
|
||||
for (SysRole perm : roles)
|
||||
{
|
||||
if (StringUtils.isNotNull(perm))
|
||||
{
|
||||
permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
|
||||
}
|
||||
}
|
||||
user.setRoles(roles);
|
||||
// 权限集合
|
||||
Set<String> permissions = permissionService.getMenuPermission(user);
|
||||
//查询用户角色关联的案件状态
|
||||
Set<Integer> caseStatus = caseFlowService.getCaseStatusIdByRoleKey(roles);
|
||||
Set<Integer> caseStatus = caseFlowService.getCaseStatusIdByRoleKey(permsSet);
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("user", user);
|
||||
ajax.put("roles", roles);
|
||||
@@ -116,6 +129,17 @@ public class SysLoginController {
|
||||
}
|
||||
return loginService.loginSSO(loginBody);
|
||||
|
||||
}
|
||||
/**对接BM,根据用户名查询token*/
|
||||
@GetMapping("selectTokenByUserName")
|
||||
public AjaxResult selectTokenByUserName( LoginBody loginBody){
|
||||
if(StrUtil.isEmpty(loginBody.getUsername()) || StrUtil.isEmpty(loginBody.getTicket())
|
||||
){
|
||||
return AjaxResult.error("参数错误");
|
||||
}
|
||||
|
||||
return loginService.selectTokenByUserName(loginBody);
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
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.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 com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@@ -20,6 +8,12 @@ import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 菜单信息
|
||||
@@ -139,4 +133,13 @@ public class SysMenuController extends BaseController
|
||||
}
|
||||
return toAjax(menuService.deleteMenuById(menuId));
|
||||
}
|
||||
/**
|
||||
* 根据用户查询菜单权限字符
|
||||
*/
|
||||
@GetMapping("/getMenuPermsByUser")
|
||||
public AjaxResult getMenuPermsByUser()
|
||||
{
|
||||
|
||||
return menuService.getMenuPermsByUser();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.ruoyi.web.controller.tool;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
|
||||
import com.ruoyi.common.enums.DocumentTypeEnum;
|
||||
import com.ruoyi.common.enums.PushCaseStatusEnum;
|
||||
import com.ruoyi.system.service.impl.BeiMingInterfaceService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseStatusInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static com.ruoyi.common.utils.EncryptUtils.sm4Decrypt;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/beiming/api")
|
||||
public class TestApiController {
|
||||
@Autowired
|
||||
BeiMingInterfaceService beiMingInterfaceService;
|
||||
@Value("${beimingprivatekey}")
|
||||
public String privateKey;
|
||||
|
||||
@GetMapping("/test")
|
||||
@Anonymous
|
||||
public AjaxResult selectCaseFlow() {
|
||||
String token = beiMingInterfaceService.getApiToken("BWT_MEDIATION", "86251b190e3a40f3942v215d1762c663", System.currentTimeMillis());
|
||||
// token = "f910e1441fc56e49d3f31396e8d9aa04228045815ee986a9587d7a5cb7312f9d11c7f80041745f38ec686ea1f819c8b8227f9c03196c6dd004f89215c4805c24355be4b57abeddb7b9d2cbda45fae74c49f4a83fb6496d84302ca8c07245786d682ecb68aed966fcbda3188b9c4d4376089471bb5aee371a62073b0ce15d72dccd6fbc8fd13957e2fb7aa018cb5937938bfc9773e570ac06ac633617cea8405759cf609c832074aaa03f972c0a6a93cde531da0d91d07770c037fdea1368ee5772941ba2a55ef155979d1ed8222faad92ed342530ef04f3746aa96499dee6ea4869ce46bd0dcfe7a69e7db49eb2aec388c47824c201b49825f24ffe82dde41b5";
|
||||
System.out.println("toke:" + token);
|
||||
//解密
|
||||
if (token != null && !token.isEmpty()) {
|
||||
JSONObject jsonObject = JSON.parseObject(token);
|
||||
String tokenString = jsonObject.getString("data");
|
||||
System.out.println("data信息:" + tokenString);
|
||||
String tokenstr = sm4Decrypt(tokenString, privateKey);
|
||||
System.out.println("解密后的字符串:" + tokenstr);
|
||||
if (tokenstr != null && !tokenstr.isEmpty()) {
|
||||
JSONObject tokenObject = JSON.parseObject(tokenstr);
|
||||
String resultToken = tokenObject.getString("token");
|
||||
MsCaseStatusInfo info = MsCaseStatusInfo.builder().caseNo("zc2024032700012").statusCode(PushCaseStatusEnum.MEDIATE.getCode()).caseClosureExplanation(PushCaseStatusEnum.MEDIATE.getName()).build();
|
||||
JSONObject result = beiMingInterfaceService.submitCaseStatusInfo(resultToken, "zc2024032700012", "BWT_MEDIATION", info);
|
||||
System.out.println("jieguo:" + result.toString());
|
||||
if (result != null) {
|
||||
String data = result.getString("data");
|
||||
String datastr = sm4Decrypt(data, privateKey);
|
||||
System.out.println("最终解密后的字符串:" + datastr);
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/testfile")
|
||||
@Anonymous
|
||||
public AjaxResult testfile() {
|
||||
// File file = new File("D:/WorkDoc/TJ/File/证据1.png");
|
||||
File file = new File("D:/WorkDoc/TJ/File/证据3.png");
|
||||
MsCaseFileInfo jsonObject1 = beiMingInterfaceService.pushAttachmentInfo("BWT_MEDIATION", "86251b190e3a40f3942v215d1762c663", file, "BWT_MEDIATION", "zc2024032700012", AttachmentOperateTypeEnum.ADD, DocumentTypeEnum.EVEDENT_AGREEMENT);
|
||||
System.out.println("fanhui:" + jsonObject1.toString());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
+23
-5
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
@@ -8,10 +9,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
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.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/identityAuthentication")
|
||||
@@ -25,9 +23,26 @@ public class IdentityAuthenticationController extends BaseController {
|
||||
@Anonymous
|
||||
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
||||
public AjaxResult selectIdentityAuthenticaEIDtoken() {
|
||||
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
|
||||
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthEIDToken(false);
|
||||
return success(tokenResult);
|
||||
}
|
||||
/**
|
||||
* 获取PC端EIDtoken
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/selectPCIdentityAuthenticaEIDtoken")
|
||||
public AjaxResult selectPCIdentityAuthenticaEIDtoken() {
|
||||
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthEIDToken(true);
|
||||
return success(tokenResult);
|
||||
}
|
||||
/**
|
||||
* H5轮询获取E证通Token状态
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/selectPCEIDtokenStatus")
|
||||
public AjaxResult selectPCEIDtokenStatus(@RequestParam String eidToken) {
|
||||
return identityAuthenticationService.selectPCEIDtokenStatus(eidToken);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序人脸核身后查询身份认证结果
|
||||
@@ -35,6 +50,9 @@ public class IdentityAuthenticationController extends BaseController {
|
||||
@Anonymous
|
||||
@PostMapping("/selectIdentityAuthenticaRespon")
|
||||
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||
if(StrUtil.isEmpty(ientityAuthentication.getEidToken())){
|
||||
return error("EIDtoken不能为空");
|
||||
}
|
||||
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
+11
@@ -44,6 +44,17 @@ public class WeChatUserController extends BaseController {
|
||||
}
|
||||
return weChatUserService.sendCode(userVO);
|
||||
}
|
||||
/**
|
||||
* 获取邮箱验证码
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/sendEmailCode")
|
||||
public AjaxResult sendEmailCode( @RequestParam("email") String email)
|
||||
{
|
||||
return weChatUserService.sendEmailCode(email);
|
||||
}
|
||||
@Anonymous
|
||||
@GetMapping("/roles")
|
||||
public AjaxResult roles()
|
||||
|
||||
+4
-28
@@ -10,7 +10,6 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.IdCardUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
|
||||
@@ -73,11 +72,10 @@ public class MsCaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 新增案件
|
||||
*/
|
||||
// todo 重复提交校验
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult insert(@RequestBody MsCaseApplicationVO caseApplication )
|
||||
{
|
||||
if(caseApplication.getAffiliate()==null||caseApplication.getAffiliate().getOrganizeFlag()==null){
|
||||
if( caseApplication.getAffiliate()==null){
|
||||
error("参数校验失败");
|
||||
}
|
||||
AjaxResult ajaxResult = AjaxResult.success();
|
||||
@@ -252,7 +250,7 @@ public class MsCaseApplicationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/listMediator")
|
||||
public AjaxResult listMediator( @RequestParam(value = "caseAppliId",required = false) Long caseAppliId) {
|
||||
public AjaxResult listMediator( @RequestParam(value = "caseAppliId",required = true) Long caseAppliId) {
|
||||
return caseApplicationService.listMediator(caseAppliId);
|
||||
}
|
||||
/**
|
||||
@@ -312,7 +310,7 @@ public class MsCaseApplicationController extends BaseController {
|
||||
*/
|
||||
@PostMapping("/mediation")
|
||||
public AjaxResult mediation(@RequestBody MsCaseApplicationReq req) throws EsignDemoException, InterruptedException {
|
||||
if (req.getCaseFlowId() == null || req.getId() == null || req.getMediaResult()==null) {
|
||||
if (req.getCaseFlowId() == null || req.getId() == null ) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
|
||||
@@ -344,19 +342,7 @@ public class MsCaseApplicationController extends BaseController {
|
||||
|
||||
return caseApplicationService.updateTrialPen(attach);
|
||||
}
|
||||
/**
|
||||
* 确认调解书
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/confirmMediation")
|
||||
public AjaxResult confirmMediation(@RequestBody MsCaseAttachVO attach) throws EsignDemoException, InterruptedException {
|
||||
if (attach.getCaseFlowId()==null || attach.getCaseAppliId()==null ) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
|
||||
return caseApplicationService.confirmMediation(attach);
|
||||
}
|
||||
/**
|
||||
* 获取userSign
|
||||
* @param userId
|
||||
@@ -402,17 +388,7 @@ public class MsCaseApplicationController extends BaseController {
|
||||
|
||||
return success(videoService.reserveConferenceList(caseId));
|
||||
}
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/smsRecord")
|
||||
public TableDataInfo getSmsSendRecord(@RequestBody SmsSendRecord smsSendRecord){
|
||||
startPage();
|
||||
List<SmsSendRecord> list = caseApplicationService.getSmsSendRecord(smsSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存onlyOffice在线编辑的文件
|
||||
* @param
|
||||
|
||||
+1
-63
@@ -2,18 +2,15 @@ package com.ruoyi.web.controller.wisdomarbitrate.mscase;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
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.EsignDemoException;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseLogRecordVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
|
||||
import com.ruoyi.wisdomarbitrate.utils.SignVerifyUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -29,16 +26,7 @@ public class MsSignSealController extends BaseController {
|
||||
@Autowired
|
||||
private MsSignSealService msSignSealService;
|
||||
|
||||
/**
|
||||
* 调解书签名
|
||||
*/
|
||||
@PostMapping("/sureMediationSeal")
|
||||
public AjaxResult sureMediationSeal(@RequestBody MsCaseApplicationVO caseApplication ) throws EsignDemoException, InterruptedException {
|
||||
if(caseApplication.getId()==null){
|
||||
error("id不能为空");
|
||||
}
|
||||
return msSignSealService.sureMediationSeal(caseApplication);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用印申请
|
||||
@@ -151,55 +139,5 @@ public class MsSignSealController extends BaseController {
|
||||
return msSignSealService.msCaseSignUrlApplyPC(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* PC端被申请人签名
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/msCaseSignUrlResPC")
|
||||
public AjaxResult msCaseSignUrlResPC(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
if (dto.getCaseId() == null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return msSignSealService.msCaseSignUrlResPC(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 小程序端申请人签名
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/msCaseSignUrlApplyAPP")
|
||||
public AjaxResult msCaseSignUrlApplyAPP(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
if (dto.getCaseId() == null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return msSignSealService.msCaseSignUrlApplyAPP(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序端被申请人签名
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/msCaseSignUrlResAPP")
|
||||
public AjaxResult msCaseSignUrlResAPP(@RequestBody MsSignSealDTO dto) throws EsignDemoException {
|
||||
if (dto.getCaseId() == null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
return msSignSealService.msCaseSignUrlResAPP(dto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+153
-2
@@ -1,17 +1,33 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.mscase;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.AnnexTypeEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsReservedConferenceVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.SendRoomNoMessageVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.VideoCallBackVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.VideoConferenceService;
|
||||
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.util.Objects;
|
||||
|
||||
import static com.google.common.io.Files.getFileExtension;
|
||||
|
||||
/**
|
||||
* 视频会议控制层
|
||||
@@ -19,11 +35,18 @@ import javax.validation.Valid;
|
||||
* @Date 2024/01/8
|
||||
* @Version V1.0
|
||||
*/
|
||||
@CrossOrigin(origins = "*")
|
||||
@RestController
|
||||
@RequestMapping("/video")
|
||||
public class MsVideoConferenceController extends BaseController {
|
||||
@Autowired
|
||||
private VideoConferenceService videoService;
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
@Autowired
|
||||
private MsCaseAttachMapper msCaseAttachMapper;
|
||||
@Autowired
|
||||
private MsCaseApplicationService caseApplicationService;
|
||||
/**
|
||||
* 根据案件ID查询视频
|
||||
* @param caseId 案件id
|
||||
@@ -34,8 +57,111 @@ public class MsVideoConferenceController extends BaseController {
|
||||
|
||||
return videoService.videoList(caseId);
|
||||
}
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
* param officeFlag: 是否上传到onlyoffice,0-否,1-是
|
||||
* param isMediaBook: 是否上调解书,1-是,其余为否
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, @RequestParam(value = "isMediaBook",required = false) Integer isMediaBook, @RequestParam("annexType") Integer annexType, @RequestParam(value = "officeFlag", required = false) Integer officeFlag,@RequestParam(value = "caseId",required = false) Long caseId) throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String suffix = getFileExtension(fileName);
|
||||
if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
|
||||
// 上传到onlyoffice
|
||||
officeFlag=1;
|
||||
}
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
if(officeFlag != null && officeFlag == 1){
|
||||
// officeFlag,fileName为annexPath
|
||||
JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(fileName,caseId);
|
||||
if(jsonArray!=null && jsonArray.size() > 0) {
|
||||
// 先删除之前的附件
|
||||
if(Objects.equals(annexType, AnnexTypeEnum.MEDIATE_BOOK.getCode()) && caseId!=null) {
|
||||
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
|
||||
}
|
||||
MsCaseAttach caseAttach=null;
|
||||
for (Object obj : jsonArray) {
|
||||
JSONObject jsonObject = (JSONObject) obj;
|
||||
caseAttach = MsCaseAttach.builder()
|
||||
.caseAppliId(caseId)
|
||||
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
|
||||
.annexType(annexType)
|
||||
.onlyOfficeFileId(jsonObject.getString("fileId"))
|
||||
.build();
|
||||
if(jsonObject.get("filePath")!=null){
|
||||
String officePath = jsonObject.getString("filePath");
|
||||
String replace = officePath.replace("/home/ruoyi/uploadPath/", "/profile/");
|
||||
caseAttach.setAnnexPath(replace);
|
||||
|
||||
}
|
||||
caseAttach.setSuffix( (getFileExtension(caseAttach.getAnnexPath())));
|
||||
msCaseAttachMapper.save(caseAttach);
|
||||
}
|
||||
if(caseAttach==null){
|
||||
return AjaxResult.error("上传失败");
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("annexId", caseAttach.getAnnexId());
|
||||
ajax.put("annexType", annexType);
|
||||
ajax.put("onlyOfficeFileId", caseAttach.getOnlyOfficeFileId());
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}else {
|
||||
return AjaxResult.error("上传失败");
|
||||
}
|
||||
}else {
|
||||
// 如果是调解书并且是pdf,则删除之前的在新增
|
||||
if(isMediaBook != null && isMediaBook == 1 ){
|
||||
if(StrUtil.isNotEmpty(suffix)&&!suffix.equals("pdf")){
|
||||
return AjaxResult.error("请上传pdf格式文件");
|
||||
}
|
||||
annexType=AnnexTypeEnum.MEDIATE_BOOK_PDF.getCode();
|
||||
// 先删除之前的附件
|
||||
if(caseId!=null) {
|
||||
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseId, annexType);
|
||||
}
|
||||
}
|
||||
Long annexId = saveCaseAttach(annexType, fileName, file.getOriginalFilename(), caseId);
|
||||
// 是否上传到onlyoffice
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("annexId", annexId);
|
||||
ajax.put("annexType", annexType);
|
||||
ajax.put("url", url);
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
private Long saveCaseAttach(Integer annexType, String path, String originalFilename,Long caseId) {
|
||||
MsCaseAttach caseAttach = MsCaseAttach.builder()
|
||||
.annexName(originalFilename)
|
||||
.caseAppliId(caseId)
|
||||
.annexPath(path)
|
||||
.annexType(annexType)
|
||||
.useId(SecurityUtils.getUserId())
|
||||
.useAccount(SecurityUtils.getUsername())
|
||||
.suffix(getFileExtension(path))
|
||||
.build();
|
||||
|
||||
msCaseAttachMapper.save(caseAttach);
|
||||
return caseAttach.getAnnexId();
|
||||
}
|
||||
/**
|
||||
* 从腾讯云下载文件到本地
|
||||
* @param
|
||||
@@ -49,6 +175,20 @@ public class MsVideoConferenceController extends BaseController {
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 腾讯云短信回调
|
||||
* @param body
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/smsRollBack")
|
||||
public AjaxResult smsRollBack( @RequestBody String body, HttpServletRequest request) {
|
||||
logger.info("短信回调======"+body);
|
||||
videoService.smsRollBack(body,request);
|
||||
return success();
|
||||
}
|
||||
/**
|
||||
* 根据房间号绑定案件ID
|
||||
* @param
|
||||
@@ -106,9 +246,20 @@ public class MsVideoConferenceController extends BaseController {
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("secretaryRoleByUserId")
|
||||
public AjaxResult secretaryRoleByUserId( @RequestParam(value = "userId",required = true) Long userId) {
|
||||
public AjaxResult secretaryRoleByUserId( @RequestParam(value = "userId",required = true) Long userId,@RequestParam(value = "caseId",required = true) Long caseId) {
|
||||
|
||||
return videoService.secretaryRoleByUserId(userId);
|
||||
return videoService.secretaryRoleByUserId(userId,caseId);
|
||||
}
|
||||
/**
|
||||
* 根据案件id查询申请人/被申请人会议上传附件按钮权限
|
||||
* @param caseId
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("selectRoleMenuByCaseId")
|
||||
public AjaxResult selectRoleMenuByCaseId( @RequestParam(value = "caseId",required = true) Long caseId) {
|
||||
|
||||
return videoService.selectRoleMenuByCaseId(caseId);
|
||||
}
|
||||
/**
|
||||
* 根据html字符串转pdf并和案件关联
|
||||
|
||||
+23
-7
@@ -1,19 +1,18 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
||||
|
||||
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.dto.sendrecord.SendMailRecord;
|
||||
import com.ruoyi.wisdomarbitrate.service.sendrecord.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 org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/sendMailRecord")
|
||||
public class SendMailRecordController extends BaseController {
|
||||
public class SendMailRecordController extends BaseController {
|
||||
@Autowired
|
||||
private ISendMailRecordService sendMailRecordService;
|
||||
|
||||
@@ -21,13 +20,30 @@ public class SendMailRecordController extends BaseController {
|
||||
* 查询发送邮件记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SendMailRecord sendMailRecord)
|
||||
{
|
||||
public TableDataInfo list(SendMailRecord sendMailRecord) {
|
||||
startPage();
|
||||
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑邮件记录
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
public AjaxResult update(@RequestBody SendMailRecord sendMailRecord) {
|
||||
return sendMailRecordService.updateSendMailRecord(sendMailRecord);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重新发送邮件记录
|
||||
*/
|
||||
@PostMapping("/reSendMailRecord")
|
||||
public AjaxResult reSendMailRecord(@RequestBody SendMailRecord sendMailRecord) {
|
||||
Boolean aBoolean = sendMailRecordService.reSendMailRecord(sendMailRecord);
|
||||
if (aBoolean) {
|
||||
return AjaxResult.success("发送成功");
|
||||
} else {
|
||||
return AjaxResult.error("发送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.system.domain.entity.shortmessage.MeetingInfo;
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsSendRecordParam;
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsTemplateParam;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.mapper.shortmessage.MeetingInfoMapper;
|
||||
import com.ruoyi.system.mapper.sms.MsSmsSendHistoryRecordParamMapper;
|
||||
import com.ruoyi.system.mapper.sms.MsSmsSendRecordParamMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.shortmessage.MeetingInfoVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.shortmessage.ReSendMessageVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SmsRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.shortmessage.ShortMessageService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/shortMessage")
|
||||
public class ShortMessageController extends BaseController {
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Autowired
|
||||
private ShortMessageService shortMessageService;
|
||||
@Autowired
|
||||
MsSmsSendRecordParamMapper recordParamMapper;
|
||||
@Autowired
|
||||
MsSmsSendHistoryRecordParamMapper historyRecordParamMapper;
|
||||
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
*
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/recordList")
|
||||
public TableDataInfo smsSendRecordList(SmsSendRecord smsSendRecord) {
|
||||
startPage();
|
||||
List<SmsSendRecord> list = shortMessageService.smsSendRecordList(smsSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Anonymous
|
||||
@PostMapping("/updateSendContent")
|
||||
public AjaxResult update(@RequestBody SmsSendRecord smsSendRecord) {
|
||||
if (smsSendRecord == null || smsSendRecord.getId() == null || CollectionUtil.isEmpty(smsSendRecord.getTemplateParams())) {
|
||||
return AjaxResult.error("参数校验失败");
|
||||
}
|
||||
// 查询当前版本记录
|
||||
SmsSendRecord oldSendRecord = smsRecordMapper.selectById(smsSendRecord.getId());
|
||||
smsSendRecord.setUpdateTime(new Date());
|
||||
// 更新短信内容,先删除短信记录参数表
|
||||
Example recordParamExam = new Example(MsSmsSendRecordParam.class);
|
||||
recordParamExam.createCriteria().andEqualTo("smsRecordId", smsSendRecord.getId());
|
||||
recordParamMapper.deleteByExample(recordParamExam);
|
||||
// 新增短信记录参数表
|
||||
List<MsSmsSendRecordParam> recordParams = new ArrayList<>();
|
||||
for (MsSmsTemplateParam templateParam : smsSendRecord.getTemplateParams()) {
|
||||
MsSmsSendRecordParam recordParam = new MsSmsSendRecordParam();
|
||||
recordParam.setSmsRecordId(smsSendRecord.getId());
|
||||
recordParam.setParamValue(templateParam.getParamValue());
|
||||
recordParams.add(recordParam);
|
||||
}
|
||||
recordParamMapper.batchInsert(recordParams);
|
||||
shortMessageService.insertShortMessageHistoryRecord(oldSendRecord, recordParams);
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新发送短信
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/reSendShortMessage")
|
||||
public AjaxResult reSendShortMessage(@RequestBody ReSendMessageVO reSendMessageVO) {
|
||||
if (reSendMessageVO != null) {
|
||||
AjaxResult result = shortMessageService.reSendShortMessage(reSendMessageVO);
|
||||
return result;
|
||||
}
|
||||
return AjaxResult.error("参数缺失");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
MeetingInfoMapper meetingInfoMapper;
|
||||
@Autowired
|
||||
SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* 查询UID好的密钥
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/getMeetingInfo")
|
||||
public Object getEncryptInfoByUid(@RequestParam(name = "authId", required = true) String authId) {
|
||||
MeetingInfoVO result = new MeetingInfoVO();
|
||||
if (authId != null) {
|
||||
MeetingInfo meetingInfo = meetingInfoMapper.selectByPrimaryKey(authId);
|
||||
if (meetingInfo != null && meetingInfo.getUserId() != null) {
|
||||
BeanUtils.copyProperties(meetingInfo, result);
|
||||
SysUser sysUser = sysUserMapper.selectUserById(meetingInfo.getUserId());
|
||||
LoginUser loginUser = new LoginUser();
|
||||
loginUser.setUserId(sysUser.getUserId());
|
||||
loginUser.setUser(sysUser);
|
||||
String token = tokenService.createVideoToken(loginUser, 120);
|
||||
// String createToken = createToken(claims);
|
||||
result.setToken(token);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return AjaxResult.error("查询失败");
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.sms;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsTemplate;
|
||||
import com.ruoyi.wisdomarbitrate.service.sms.SMSTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信模板控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/smsTemplate")
|
||||
public class SMSTemplateController extends BaseController {
|
||||
@Autowired
|
||||
private SMSTemplateService templateService;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page( ){
|
||||
startPage();
|
||||
List<MsSmsTemplate> list = templateService.page();
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 新增或者修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult insert(@RequestBody MsSmsTemplate template){
|
||||
return templateService.insert(template);
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public AjaxResult delete(@RequestBody MsSmsTemplate template){
|
||||
if(template.getId()==null){
|
||||
return AjaxResult.warn("id不能为空");
|
||||
}
|
||||
return templateService.delete(template.getId());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,10 +72,10 @@ spring:
|
||||
host: 121.40.189.20
|
||||
# 端口,默认为6379
|
||||
port: 6389
|
||||
# 数据库索引
|
||||
# TODO 数据库索引,测试环境1,正式环境0
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
password: YMtj126!#%
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@@ -90,7 +90,7 @@ spring:
|
||||
max-wait: -1ms
|
||||
web:
|
||||
resources:
|
||||
static-locations: file:/home/ruoyi/
|
||||
static-locations: file:/home/ruoyi/
|
||||
mail:
|
||||
host: smtp.163.com
|
||||
port: 25
|
||||
@@ -121,7 +121,7 @@ token:
|
||||
# 令牌密钥
|
||||
secret: abcdefghijklmnopqrstuvwxyz
|
||||
# 令牌有效期(默认30分钟)
|
||||
expireTime: 30
|
||||
expireTime: 120
|
||||
|
||||
# MyBatis配置
|
||||
mybatis:
|
||||
@@ -131,8 +131,8 @@ mybatis:
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# configuration:
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
@@ -166,13 +166,17 @@ elegent:
|
||||
alipay:
|
||||
appId: 2021003141676135
|
||||
callback:
|
||||
domain: http://121.40.189.20:9001/
|
||||
# TODO
|
||||
domain: http://121.40.189.20:7001/
|
||||
watch: true
|
||||
cycle: 10
|
||||
identityAuthentication:
|
||||
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||
# 小程序端人脸核身商户id
|
||||
merchantId: 0NSJ2309281116194321
|
||||
# pc端人脸核身商户id
|
||||
pcMerchantId: 0NSJ2404231626029804
|
||||
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
|
||||
# 腾讯云即时通信相关配置
|
||||
imConfig:
|
||||
@@ -184,29 +188,38 @@ imConfig:
|
||||
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||
# 腾讯云密钥
|
||||
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||
# 调解机构代码配置
|
||||
# TODO 调解机构代码配置
|
||||
organizeConfig:
|
||||
# creditCode
|
||||
creditCode: 910000058386410047
|
||||
# 引入仲裁系统url配置
|
||||
creditCode: 910000870060480009
|
||||
# TODO 引入仲裁系统url配置
|
||||
arbitrateConfig:
|
||||
url: http://121.40.189.20:9001/callArbitrateCaseApplication/generateCaseApplication
|
||||
# 回调通知
|
||||
smsURL: http://121.40.189.20:9001/shortMessage/smsCallBack
|
||||
# TODO 回调通知
|
||||
signSealCallbackConfig:
|
||||
url: http://121.40.189.20:7001/mssignSeal/signSeaalCaseApplicaCallback
|
||||
# onlyOffice系统url配置
|
||||
onlyOfficeConfig:
|
||||
# url: http://172.16.0.254:9090/files/upload
|
||||
# url: http://172.16.0.254:9090/files/upload
|
||||
url: http://121.40.189.20:9090/files/upload
|
||||
#jodconverter:
|
||||
# local:
|
||||
# host: 121.40.189.20
|
||||
# 北明
|
||||
BMConfig:
|
||||
userName: BWT_MEDIATION
|
||||
password: 86251b190e3a40f3942v215d1762c663
|
||||
syncSource: BWT_MEDIATION
|
||||
#jodconverter:
|
||||
# local:
|
||||
# host: 121.40.189.20
|
||||
#暂时关闭预览,启动时会有点慢
|
||||
# enabled: true
|
||||
# enabled: true
|
||||
#设置libreoffice主目录 linux地址如:/usr/lib64/libreoffice
|
||||
# office-home: /usr/lib64/libreoffice/
|
||||
# office-home: D:\app\libreOffice\
|
||||
#开启多个libreoffice进程,每个端口对应一个进程
|
||||
# port-numbers: 8100
|
||||
#libreoffice进程重启前的最大进程数
|
||||
# office-home: /usr/lib64/libreoffice/
|
||||
# office-home: D:\app\libreOffice\
|
||||
#开启多个libreoffice进程,每个端口对应一个进程
|
||||
# port-numbers: 8100
|
||||
#libreoffice进程重启前的最大进程数
|
||||
# max-tasks-per-process: 100
|
||||
beimingapihost: https://zj.odrcloud.cn
|
||||
beimingapiprefix: /onestop/sync
|
||||
beimingprivatekey: d7724e72c4be93196a35203e8379ded5
|
||||
|
||||
@@ -1,24 +1,2 @@
|
||||
Application Version: ${ruoyi.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// _ooOoo_ //
|
||||
// o8888888o //
|
||||
// 88" . "88 //
|
||||
// (| ^_^ |) //
|
||||
// O\ = /O //
|
||||
// ____/`---'\____ //
|
||||
// .' \\| |// `. //
|
||||
// / \\||| : |||// \ //
|
||||
// / _||||| -:- |||||- \ //
|
||||
// | | \\\ - /// | | //
|
||||
// | \_| ''\---/'' | | //
|
||||
// \ .-\__ `-` ___/-. / //
|
||||
// ___`. .' /--.--\ `. . ___ //
|
||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
@@ -200,7 +200,7 @@
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||
<version>3.1.876</version>
|
||||
<version>3.1.962</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -283,6 +283,11 @@
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thymeleaf</groupId>
|
||||
<artifactId>thymeleaf</artifactId>
|
||||
<version>3.0.12.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate(ClientHttpRequestFactory factory){
|
||||
return new RestTemplate(factory);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ClientHttpRequestFactory simpleClientHttpRequestFactory(){
|
||||
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
|
||||
factory.setReadTimeout(5000);//单位为ms
|
||||
factory.setConnectTimeout(5000);//单位为ms
|
||||
return factory;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@ public class CacheConstants
|
||||
* 登录用户 redis key
|
||||
*/
|
||||
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
|
||||
/**
|
||||
* 登录用户名 redis key
|
||||
*/
|
||||
|
||||
public static final String LOGIN_USERNAME_TOKEN_KEY = "login_username_tokens:";
|
||||
|
||||
/**
|
||||
* 验证码 redis key
|
||||
@@ -42,6 +47,7 @@ public class CacheConstants
|
||||
*/
|
||||
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:";
|
||||
public static final String EMAIL_VERIFY_CODE_KEY="email_verify_code:";
|
||||
/**
|
||||
* 案件 redis key
|
||||
*/
|
||||
@@ -50,4 +56,13 @@ public class CacheConstants
|
||||
* 所有用户 redis key
|
||||
*/
|
||||
public static final String USER_KEY = "user_key:";
|
||||
/**
|
||||
* 用户邮箱 redis key
|
||||
*/
|
||||
// public static final String USER_EMAIL_KEY = "user_email_key:";
|
||||
/**
|
||||
* 角色 redis key
|
||||
*/
|
||||
public static final String ROLE_KEY = "role_key:";
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@ import io.jsonwebtoken.Claims;
|
||||
|
||||
/**
|
||||
* 通用常量信息
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class Constants
|
||||
{
|
||||
public class Constants {
|
||||
/**
|
||||
* UTF-8 字符集
|
||||
*/
|
||||
@@ -71,7 +70,7 @@ public class Constants
|
||||
* 登录失败
|
||||
*/
|
||||
public static final String LOGIN_FAIL = "Error";
|
||||
|
||||
|
||||
/**
|
||||
* 验证码有效期(分钟)
|
||||
*/
|
||||
@@ -95,6 +94,10 @@ public class Constants
|
||||
* 令牌前缀
|
||||
*/
|
||||
public static final String LOGIN_USER_KEY = "login_user_key";
|
||||
/**
|
||||
* 会议主键Id
|
||||
*/
|
||||
public static final String MEETING_KEY = "meeting_key";
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
@@ -141,21 +144,23 @@ public class Constants
|
||||
*/
|
||||
public static final String LOOKUP_LDAPS = "ldaps:";
|
||||
public static final String DEFAULT_PASSWORD = "123456";
|
||||
public static final String SPLIT_COMMA =",";
|
||||
// 英文逗号分隔符
|
||||
public static final String SPLIT_COMMA = ",";
|
||||
// 中文逗号分隔符
|
||||
public static final String CN_SPLIT_COMMA = ",";
|
||||
|
||||
/**
|
||||
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
||||
*/
|
||||
public static final String[] JSON_WHITELIST_STR = { "org.springframework", "com.ruoyi" };
|
||||
public static final String[] JSON_WHITELIST_STR = {"org.springframework", "com.ruoyi"};
|
||||
|
||||
/**
|
||||
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
||||
*/
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };
|
||||
public static final String[] JOB_WHITELIST_STR = {"com.ruoyi"};
|
||||
|
||||
/**
|
||||
* 定时任务违规的字符
|
||||
*/
|
||||
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
||||
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
|
||||
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config"};
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class UserConstants
|
||||
* 用户名长度限制
|
||||
*/
|
||||
public static final int USERNAME_MIN_LENGTH = 2;
|
||||
public static final int USERNAME_MAX_LENGTH = 20;
|
||||
public static final int USERNAME_MAX_LENGTH = 50;
|
||||
|
||||
/**
|
||||
* 密码长度限制
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -83,6 +84,9 @@ public class BaseController
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected TableDataInfo getDataTable(List<?> list)
|
||||
{
|
||||
if(list == null){
|
||||
list=new ArrayList<>();
|
||||
}
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
@@ -112,7 +116,7 @@ public class BaseController
|
||||
*/
|
||||
public AjaxResult success(String message)
|
||||
{
|
||||
return AjaxResult.success(message);
|
||||
return AjaxResult .success(message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Classname SMSNotice
|
||||
* @Description 消息通知
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/26 11:13
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SMSNotice {
|
||||
/**
|
||||
* 申请人通知
|
||||
*/
|
||||
private SMSNoticeDO applicantNotice;
|
||||
/**
|
||||
* 被申通知
|
||||
*/
|
||||
private SMSNoticeDO resNotice;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Classname SMSNoticeDO
|
||||
* @Description 消息通知实体
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/26 11:10
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SMSNoticeDO {
|
||||
/**
|
||||
* 主题
|
||||
*/
|
||||
private String subject;
|
||||
/**
|
||||
* 发送内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 模板参数
|
||||
*/
|
||||
private String[] templateParamSet;
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 部门表 sys_dept
|
||||
@@ -54,6 +55,68 @@ public class SysDept extends BaseEntity
|
||||
|
||||
/** 父部门名称 */
|
||||
private String parentName;
|
||||
/**
|
||||
* 代码(统一社会信用代码或者身份证号)
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 法定代表人
|
||||
*/
|
||||
private String compLegalPerson;
|
||||
/**
|
||||
* 住所
|
||||
*/
|
||||
private String home;
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
*
|
||||
* 国籍,0-国内,1-国外
|
||||
*/
|
||||
private Integer nationality;
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public Integer getNationality() {
|
||||
return nationality;
|
||||
}
|
||||
|
||||
public String getHome() {
|
||||
return home;
|
||||
}
|
||||
|
||||
public void setHome(String home) {
|
||||
this.home = home;
|
||||
}
|
||||
|
||||
public void setNationality(Integer nationality) {
|
||||
this.nationality = nationality;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCompLegalPerson() {
|
||||
return compLegalPerson;
|
||||
}
|
||||
|
||||
public void setCompLegalPerson(String compLegalPerson) {
|
||||
this.compLegalPerson = compLegalPerson;
|
||||
}
|
||||
|
||||
public Integer getDeptType() {
|
||||
return deptType;
|
||||
|
||||
@@ -69,6 +69,18 @@ public class SysUser extends BaseEntity
|
||||
/** 国籍,0-国内,1-国外,默认0 */
|
||||
|
||||
private Integer nationality;
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
private Date birth;
|
||||
/**
|
||||
* 住所
|
||||
*/
|
||||
private String home;
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/** 用户邮箱 */
|
||||
@Excel(name = "用户邮箱")
|
||||
@@ -140,6 +152,38 @@ public class SysUser extends BaseEntity
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Date getBirth() {
|
||||
return birth;
|
||||
}
|
||||
|
||||
public void setBirth(Date birth) {
|
||||
this.birth = birth;
|
||||
}
|
||||
|
||||
public String getHome() {
|
||||
return home;
|
||||
}
|
||||
|
||||
public void setHome(String home) {
|
||||
this.home = home;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public List<SysDept> getDepts() {
|
||||
return depts;
|
||||
}
|
||||
|
||||
public void setDepts(List<SysDept> depts) {
|
||||
this.depts = depts;
|
||||
}
|
||||
|
||||
public Integer getIdType() {
|
||||
return idType;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public enum AnnexTypeEnum implements EnumsInterface {
|
||||
RES_PAYMENT_RECEIPT(9, "被申请人缴费单"),
|
||||
SEAL_PICTURE(10, "印章图片"),
|
||||
FLOW_SVG(11, "流程节点SVG"),
|
||||
MEETING_FILE(12, "被申请人证据"),
|
||||
MEDIATE_BOOK_PDF(13, "PDF调解书或和解协议"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 案件附件操作类型
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum AttachmentOperateTypeEnum {
|
||||
ADD("ADD", "新增"), DEL("DEL", "删除"), UPD("UPD", "修改");
|
||||
private String code;
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum DocumentTypeEnum {
|
||||
EVEDENT_METERIAL("EVEDENT_METERIAL", "证据材料", 1),
|
||||
EVEDENT_APPLY_BOOK("EVEDENT_APPLY_BOOK", "调解申请书", 2),
|
||||
EVEDENT_MEDIATION_VIDEO("EVEDENT_MEDIATION_VIDEO", "调解视频", 3),
|
||||
EVEDENT_MEDIATION_RECORD("EVEDENT_MEDIATION_RECORD", "调解笔录", 4),
|
||||
EVEDENT_AGREEMENT("EVEDENT_AGREEMENT", "调解书或和解协议", 5),
|
||||
;
|
||||
private String code;
|
||||
private String name;
|
||||
private Integer value;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum PushCaseStatusEnum {
|
||||
MEDIATE("MEDIATE", "调解中", 1), SUCCESS("SUCCESS", "调解成功", 2), FAIL("FAIL", "调解失败", 3);
|
||||
private String code;
|
||||
private String name;
|
||||
private Integer value;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import com.ruoyi.common.interfaces.EnumsInterface;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 短信状态枚举
|
||||
* @date 2023-11-17 14:05
|
||||
*/
|
||||
public enum SMSStatusEnum implements EnumsInterface
|
||||
{
|
||||
SUCCESS(1, "成功"),
|
||||
SENDING(2, "发送中"),
|
||||
FAIL(3, "失败"),
|
||||
|
||||
;
|
||||
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
SMSStatusEnum(Integer code, String text)
|
||||
{
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Integer getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getText()
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取text
|
||||
* @param codeNo
|
||||
* @return
|
||||
*/
|
||||
public static String getTextByCode(Integer codeNo){
|
||||
for (SMSStatusEnum value : SMSStatusEnum.values()) {
|
||||
if (value.getCode().equals(codeNo)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return codeNo.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据text获取code
|
||||
* @param textStr
|
||||
* @return
|
||||
*/
|
||||
public static String getCodeByText(String textStr){
|
||||
for (SMSStatusEnum value : SMSStatusEnum.values()) {
|
||||
if (value.getText().equals(textStr)){
|
||||
return value.getText();
|
||||
}
|
||||
}
|
||||
return textStr;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.utils.uuid.UUID;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mail.MailException;
|
||||
import org.springframework.mail.SimpleMailMessage;
|
||||
import org.springframework.mail.javamail.JavaMailSender;
|
||||
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||
@@ -45,12 +47,12 @@ public class EmailOutUtil {
|
||||
// private static String fromOut;
|
||||
@Value("${spring.mail.host}")
|
||||
private String hostOut;
|
||||
// @Value("${spring.mail.username}")
|
||||
// private String usernameOut;
|
||||
private String usernameOut="wq18792927508@163.com";
|
||||
// @Value("${spring.mail.password}")
|
||||
// private String passwordOut;
|
||||
private String passwordOut= "WDFHKSEMCKVRELEA";
|
||||
@Value("${spring.mail.username}")
|
||||
private String usernameOut;
|
||||
|
||||
@Value("${spring.mail.password}")
|
||||
private String passwordOut;
|
||||
|
||||
@Value("${spring.mail.port}")
|
||||
private Integer portOut;
|
||||
|
||||
@@ -72,18 +74,29 @@ public class EmailOutUtil {
|
||||
* @param subject 邮件主题
|
||||
* @param content 邮件内容(发送内容)
|
||||
*/
|
||||
public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
|
||||
// 创建一个邮件对象
|
||||
SimpleMailMessage msg = new SimpleMailMessage();
|
||||
msg.setFrom(from);
|
||||
msg.setTo(to);
|
||||
// 设置邮件主题
|
||||
msg.setSubject(subject);
|
||||
// 设置邮件内容
|
||||
msg.setText(content);
|
||||
// 发送邮件
|
||||
mailSender.send(msg);
|
||||
////System.out.println("发送成功:" + from + ":to:" + to);
|
||||
public Boolean sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
|
||||
try {
|
||||
if(mailSender==null){
|
||||
mailSender= rebuildMailSender();
|
||||
}
|
||||
// 创建一个邮件对象
|
||||
SimpleMailMessage msg = new SimpleMailMessage();
|
||||
if(StrUtil.isEmpty(from)){
|
||||
msg.setFrom(usernameOut);
|
||||
}else {
|
||||
msg.setFrom(from);
|
||||
}
|
||||
msg.setTo(to);
|
||||
// 设置邮件主题
|
||||
msg.setSubject(subject);
|
||||
// 设置邮件内容
|
||||
msg.setText(content);
|
||||
// 发送邮件
|
||||
mailSender.send(msg);
|
||||
} catch (MailException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,8 +104,9 @@ public class EmailOutUtil {
|
||||
* @param message 邮件内容
|
||||
* @param subject 邮件主题
|
||||
* @param fileList 邮件附件
|
||||
* @param fileNameMap 附件名称map,附件路径-附件名称
|
||||
*/
|
||||
public Boolean sendEmil(String to, String message, String subject, List<File> fileList, File file) {
|
||||
public Boolean sendEmil(String to, String message, String subject, List<File> fileList, File file,Map<String,String> fileNameMap) {
|
||||
try {
|
||||
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
|
||||
MimeBodyPart messageBodyPart = new MimeBodyPart();
|
||||
@@ -149,7 +163,10 @@ public class EmailOutUtil {
|
||||
for (File tempfile : fileList) {
|
||||
MimeBodyPart attachmentPart = new MimeBodyPart();
|
||||
attachmentPart.attachFile(tempfile);
|
||||
attachmentPart.setFileName(MimeUtility.encodeText(tempfile.getName()));
|
||||
// 设置附件名称
|
||||
if(fileNameMap!=null && fileNameMap.containsKey(tempfile.getPath())) {
|
||||
attachmentPart.setFileName(MimeUtility.encodeText(fileNameMap.get(tempfile.getPath())));
|
||||
}
|
||||
multipart.addBodyPart(attachmentPart);
|
||||
}
|
||||
msg.setContent(multipart);
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.Key;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.Security;
|
||||
import java.util.UUID;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
|
||||
|
||||
@Slf4j
|
||||
public class EncryptUtils {
|
||||
static {
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
}
|
||||
|
||||
/**
|
||||
* sm4加密
|
||||
* @explain 加密模式:ECB 密文长度不固定,会随着被加密字符串长度的变化而变化
|
||||
* @param paramStr 待加密字符串
|
||||
* @return 返回16进制的加密字符串
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String sm4Encrypt(String paramStr, String secretKey) {
|
||||
if (StringUtils.isBlank(paramStr)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
// 16进制字符串-->byte[]
|
||||
byte[] keyData = ByteUtils.fromHexString(secretKey);
|
||||
// String-->byte[]
|
||||
byte[] srcData = paramStr.getBytes(StandardCharsets.UTF_8);
|
||||
// 加密后的数组
|
||||
Cipher cipher = Cipher.getInstance("SM4/ECB/PKCS5Padding", BouncyCastleProvider.PROVIDER_NAME);
|
||||
Key sm4Key = new SecretKeySpec(keyData, "SM4");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, sm4Key);
|
||||
byte[] cipherArray = cipher.doFinal(srcData);
|
||||
// byte[]-->hexString
|
||||
return ByteUtils.toHexString(cipherArray);
|
||||
} catch (Exception e) {
|
||||
log.error("sm4加密失败:{}", paramStr, e);
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* sm4解密
|
||||
* @explain 解密模式:采用ECB
|
||||
* @param cipherText 16进制的加密字符串(忽略大小写)
|
||||
* @return 解密后的字符串
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String sm4Decrypt(String cipherText, String secretKey) {
|
||||
if (StringUtils.isBlank(cipherText)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
// hexString-->byte[]
|
||||
byte[] keyData = ByteUtils.fromHexString(secretKey);
|
||||
// hexString-->byte[]
|
||||
byte[] cipherData = ByteUtils.fromHexString(cipherText);
|
||||
// 解密
|
||||
Cipher cipher = Cipher.getInstance("SM4/ECB/PKCS5Padding", BouncyCastleProvider.PROVIDER_NAME);
|
||||
Key sm4Key = new SecretKeySpec(keyData, "SM4");
|
||||
cipher.init(Cipher.DECRYPT_MODE, sm4Key);
|
||||
byte[] cipherArray = cipher.doFinal(cipherData);
|
||||
// byte[]-->String
|
||||
return new String(cipherArray, StandardCharsets.UTF_8);
|
||||
} catch (Exception e) {
|
||||
log.error("sm4解密失败:{}", cipherText, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 初始化 HmacMD5 密钥
|
||||
*/
|
||||
public static String initHmacMD5Key() throws NoSuchAlgorithmException {
|
||||
//Init KeyGenerator.
|
||||
KeyGenerator generator = KeyGenerator.getInstance("HmacSHA224");
|
||||
//Generate key.
|
||||
SecretKey secretKey = generator.generateKey();
|
||||
return ByteUtils.toHexString(secretKey.getEncoded());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: HmacMD5 消息摘要
|
||||
*/
|
||||
public static String encodeHmacMD5(String data, String key) throws NoSuchAlgorithmException, InvalidKeyException {
|
||||
//Restore key.
|
||||
SecretKey secretKey = new SecretKeySpec(ByteUtils.fromHexString(key), "HmacSHA224");
|
||||
//Instantiate Mac.
|
||||
Mac mac = Mac.getInstance(secretKey.getAlgorithm());
|
||||
//Init Mac.
|
||||
mac.init(secretKey);
|
||||
//Execute.
|
||||
return ByteUtils.toHexString(mac.doFinal(ByteUtils.fromHexString(data)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String privateKey = "936df5fd9aba3b86adc3c1a1c52dcde1";
|
||||
ObjectNode param = new ObjectMapper().createObjectNode();
|
||||
param.put("userName", "张三");
|
||||
param.put("caseNo", "ZC1234125");
|
||||
param.put("userId", "124124");
|
||||
param.put("roomId", "124125");
|
||||
param.put("systemType", "tiaojiexitong");
|
||||
String encryptString = sm4Encrypt(param.toString(), privateKey);
|
||||
System.out.println("加密后的字符串:" + encryptString);
|
||||
String uid = UUID.randomUUID().toString().replace("-", "");
|
||||
System.out.println("uid:" + uid);
|
||||
System.out.println("解密后的字符串:" + sm4Decrypt(encryptString, privateKey));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,22 +4,16 @@ 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转换工具类
|
||||
@@ -44,7 +38,7 @@ public class PdfUtils {
|
||||
document.setMarginMirroring(false);
|
||||
document.open();
|
||||
// 解决PDF中文不显示
|
||||
String fontPath = "/D:/simsun.ttf"; //字体文件路径
|
||||
String fontPath = "/home/ruoyi/uploadPath/songfont/simsun.ttf"; //字体文件路径
|
||||
XMLWorkerFontProvider provider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
|
||||
provider.register(fontPath);//注册字体
|
||||
log.error("注册字体");
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import com.tencentcloudapi.common.Credential;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
import com.tencentcloudapi.sms.v20210111.SmsClient;
|
||||
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
|
||||
import com.tencentcloudapi.sms.v20210111.models.SendStatus;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import lombok.var;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
public class SmsUtils {
|
||||
//应用id
|
||||
private static final String SDK_APP_ID = "1400854852";
|
||||
//API的SecretId
|
||||
private static final String SECRET_ID = "AKIDeEf2A8uX1HSainvvnXAc3X9ZlhtyvkMp";
|
||||
//API的SecretKey
|
||||
private static final String SECRET_KEY = "QjphKo8zkHZigT8j9PVtFPJyfIvO3d6V";
|
||||
//签名内容
|
||||
private static final String SIGN_NAME = "乙巢智慧仲裁网";
|
||||
|
||||
public static Boolean sendSms(SendSmsRequest request) {
|
||||
Credential cred = new Credential(SECRET_ID, SECRET_KEY );
|
||||
|
||||
SmsClient client = new SmsClient(cred, "ap-guangzhou");
|
||||
|
||||
final var req = new com.tencentcloudapi.sms.v20210111.models.SendSmsRequest();
|
||||
req.setPhoneNumberSet(new String[]{"+86" + request.getPhone()});
|
||||
req.setSmsSdkAppId(SDK_APP_ID );
|
||||
req.setSignName(SIGN_NAME);
|
||||
req.setTemplateId(request.getTemplateId());
|
||||
req.setTemplateParamSet(request.getTemplateParamSet());
|
||||
SendSmsResponse res = null;
|
||||
try {
|
||||
res = client.SendSms(req);
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.error("发送短信出错:", e);
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
SendStatus sendStatus = res.getSendStatusSet()[0];
|
||||
log.info("发送短信结果:Code={}, Message={}", sendStatus.getCode(), sendStatus.getMessage());
|
||||
|
||||
if (Objects.nonNull(res.getSendStatusSet()) && res.getSendStatusSet().length > 0 && "Ok".equals(res.getSendStatusSet()[0].getCode())){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
public static Boolean sendSms(Long caseId,String templateId,String phone,String[] templateParamSet) {
|
||||
SendSmsRequest request = new SendSmsRequest(phone,templateId,templateParamSet,caseId);
|
||||
Credential cred = new Credential(SECRET_ID, SECRET_KEY );
|
||||
|
||||
SmsClient client = new SmsClient(cred, "ap-guangzhou");
|
||||
|
||||
final var req = new com.tencentcloudapi.sms.v20210111.models.SendSmsRequest();
|
||||
req.setPhoneNumberSet(new String[]{"+86" + request.getPhone()});
|
||||
req.setSmsSdkAppId(SDK_APP_ID );
|
||||
req.setSignName(SIGN_NAME);
|
||||
req.setTemplateId(request.getTemplateId());
|
||||
req.setTemplateParamSet(request.getTemplateParamSet());
|
||||
SendSmsResponse res = null;
|
||||
try {
|
||||
res = client.SendSms(req);
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.error("发送短信出错:", e);
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
SendStatus sendStatus = res.getSendStatusSet()[0];
|
||||
log.info("发送短信结果:Code={}, Message={}", sendStatus.getCode(), sendStatus.getMessage());
|
||||
|
||||
if (Objects.nonNull(res.getSendStatusSet()) && res.getSendStatusSet().length > 0 && "Ok".equals(res.getSendStatusSet()[0].getCode())){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
/**
|
||||
* 参数对象
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class SendSmsRequest {
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 模板 ID: 必须填写已审核通过的模板 ID
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空
|
||||
*/
|
||||
private String[] templateParamSet;
|
||||
private Long caseId;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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 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;
|
||||
@@ -205,6 +198,24 @@ public class WordUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换标签内容
|
||||
* @param map
|
||||
* @param templatePath 模板路径
|
||||
* @param outputPath 文件输出路径
|
||||
*/
|
||||
public static void render(Map<String, Object> map,String templatePath,String outputPath){
|
||||
XWPFTemplate template = XWPFTemplate.compile(templatePath).render(map);
|
||||
try {
|
||||
FileOutputStream out = new FileOutputStream(outputPath);
|
||||
template.write(out);
|
||||
out.flush();
|
||||
out.close();
|
||||
template.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
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 {
|
||||
@@ -88,43 +81,27 @@ public class SaaSAPIFileUtils {
|
||||
|
||||
|
||||
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("");
|
||||
fileDownloadUrl("8425b244bf4b417dbb22fd39a1c2d65f");
|
||||
|
||||
|
||||
// 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);
|
||||
// }
|
||||
|
||||
|
||||
// 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());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.framework.web.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
@@ -20,6 +21,7 @@ import com.ruoyi.framework.manager.AsyncManager;
|
||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.framework.security.context.AuthenticationContextHolder;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -55,6 +57,8 @@ public class SysLoginService
|
||||
private ISysConfigService configService;
|
||||
@Autowired
|
||||
private SysRoleMapper roleMapper;
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
@@ -230,16 +234,20 @@ public class SysLoginService
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
String username = loginBody.getUsername();
|
||||
// 根据用户名获取用户信息,如果用户不存在则新增用户
|
||||
SysUser user = userService.selectUserByUserName(username);
|
||||
SysUser user =null;
|
||||
if(username.contains("@")) {
|
||||
user= userMapper.selectUserByEmail(username);
|
||||
}else {
|
||||
user= userService.selectUserByUserName(username);
|
||||
}
|
||||
if(user==null){
|
||||
// 新增用户
|
||||
user = new SysUser();
|
||||
user.setUserName(username);
|
||||
user.setPassword(SecurityUtils.encryptPassword("abc123456"));
|
||||
user.setNickName(username);
|
||||
// 代理人角色相当于申请人角色
|
||||
if(loginBody.getRoleName().contains("代理人")){
|
||||
loginBody.setRoleName("申请人");
|
||||
if(username.contains("@")){
|
||||
user.setEmail(username);
|
||||
}
|
||||
// 根据角色名查询角色id
|
||||
Long roleIdByName = roleMapper.selectRoleIdByName(loginBody.getRoleName());
|
||||
@@ -258,4 +266,26 @@ public class SysLoginService
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对接BM,根据用户名查询token
|
||||
* @param loginBody
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult selectTokenByUserName(LoginBody loginBody) {
|
||||
String username = loginBody.getUsername();
|
||||
String currentTicket = MD5.create().digestHex("BM" + username);
|
||||
if(!currentTicket.equals(loginBody.getTicket())){
|
||||
return AjaxResult.error("ticket校验失败");
|
||||
}
|
||||
|
||||
Object cacheObject = redisCache.getCacheObject(CacheConstants.LOGIN_USERNAME_TOKEN_KEY + username);
|
||||
if(ObjectUtil.isEmpty(cacheObject)){
|
||||
return AjaxResult.error("登录时间过长,请重新登录");
|
||||
}
|
||||
|
||||
AjaxResult result = AjaxResult.success();
|
||||
result.put("token",(String) cacheObject);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+17
-10
@@ -1,15 +1,17 @@
|
||||
package com.ruoyi.framework.web.service;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户权限处理
|
||||
@@ -31,13 +33,16 @@ public class SysPermissionService
|
||||
* @param user 用户信息
|
||||
* @return 角色权限信息
|
||||
*/
|
||||
public Set<String> getRolePermission(SysUser user)
|
||||
public List<SysRole> getRolePermission(SysUser user)
|
||||
{
|
||||
Set<String> roles = new HashSet<String>();
|
||||
List<SysRole> roles = new ArrayList<>();
|
||||
// 管理员拥有所有权限
|
||||
if (user.isAdmin())
|
||||
{
|
||||
roles.add("admin");
|
||||
SysRole sysRole = new SysRole();
|
||||
sysRole.setRoleId(1L);
|
||||
sysRole.setRoleKey("admin");
|
||||
roles.add(sysRole);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -58,7 +63,9 @@ public class SysPermissionService
|
||||
// 管理员拥有所有权限
|
||||
if (user.isAdmin())
|
||||
{
|
||||
perms.add("*:*:*");
|
||||
// 查询所有数据权限,排除案件管理下的权限即可
|
||||
perms.addAll(menuService.selectAdminMenu());
|
||||
// perms.add("*:*:*");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -123,9 +123,24 @@ public class TokenService
|
||||
claims.put("userName",loginUser.getUsername());
|
||||
claims.put("userId",loginUser.getUserId());
|
||||
claims.put(Constants.LOGIN_USER_KEY, token);
|
||||
return createToken(claims);
|
||||
String createToken = createToken(claims);
|
||||
redisCache.setCacheObject(CacheConstants.LOGIN_USERNAME_TOKEN_KEY+loginUser.getUsername(),createToken, expireTime, TimeUnit.MINUTES);
|
||||
return createToken;
|
||||
}
|
||||
public String createVideoToken(LoginUser loginUser,int expireTime)
|
||||
{
|
||||
String token = IdUtils.fastUUID();
|
||||
loginUser.setToken(token);
|
||||
setUserAgent(loginUser);
|
||||
refreshToken(loginUser);
|
||||
Map<String, Object> claims = new HashMap<>();
|
||||
claims.put("userName",loginUser.getUsername());
|
||||
claims.put("userId",loginUser.getUserId());
|
||||
claims.put(Constants.LOGIN_USER_KEY, token);
|
||||
String createToken = createToken(claims);
|
||||
redisCache.setCacheObject(CacheConstants.LOGIN_USERNAME_TOKEN_KEY+loginUser.getUsername(),createToken, expireTime, TimeUnit.MINUTES);
|
||||
return createToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证令牌有效期,相差不足20分钟,自动刷新缓存
|
||||
*
|
||||
@@ -154,6 +169,7 @@ public class TokenService
|
||||
// 根据uuid将loginUser缓存
|
||||
String userKey = getTokenKey(loginUser.getToken());
|
||||
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+16
-16
@@ -45,20 +45,20 @@
|
||||
<version>2.1.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- <build>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <exclude>-->
|
||||
<!-- <groupId>org.projectlombok</groupId>-->
|
||||
<!-- <artifactId>lombok</artifactId>-->
|
||||
<!-- </exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>9</source><target>9</target></configuration></plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- </build>-->
|
||||
</project>
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.domain.entity.flow;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_case_flow_role_sms_related")
|
||||
public class MsCaseFlowRoleSmsRelated {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 案件流程id
|
||||
*/
|
||||
@Column(name = "flow_id")
|
||||
private Integer flowId;
|
||||
|
||||
/**
|
||||
* 用户角色id
|
||||
*/
|
||||
@Column(name = "receive_role_id")
|
||||
private Long receiveRoleId;
|
||||
|
||||
/**
|
||||
* 短信模版id
|
||||
*/
|
||||
@Column(name = "sms_template_id")
|
||||
private Long smsTemplateId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
package com.ruoyi.system.domain.entity.log;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_request_log")
|
||||
public class MsRequestLog {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 状态,0-成功,1-失败
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 请求url
|
||||
*/
|
||||
@Column(name = "request_url")
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 请求内容
|
||||
*/
|
||||
@Column(name = "content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
@Column(name = "reason")
|
||||
private String reason;
|
||||
/**
|
||||
* 返回内容
|
||||
*/
|
||||
@Column(name = "return_content")
|
||||
private String returnContent;
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.system.domain.entity.shortmessage;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "meeting_info")
|
||||
public class MeetingInfo {
|
||||
/**
|
||||
* 主键Id
|
||||
*/
|
||||
@Id
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 案件Id
|
||||
*/
|
||||
@Column(name = "case_id")
|
||||
private Long caseId;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
@Column(name = "user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@Column(name = "user_name")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 房间Id
|
||||
*/
|
||||
@Column(name = "room_id")
|
||||
private String roomId;
|
||||
|
||||
/**
|
||||
* 系统类型
|
||||
*/
|
||||
@Column(name = "system_type")
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package com.ruoyi.system.domain.entity.shortmessage;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_send_mail_history_record")
|
||||
public class MsSendMailHistoryRecord {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 邮件名称
|
||||
*/
|
||||
@Column(name = "mail_name")
|
||||
private String mailName;
|
||||
|
||||
/**
|
||||
* 邮件接收地址
|
||||
*/
|
||||
@Column(name = "mail_address")
|
||||
private String mailAddress;
|
||||
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
@Column(name = "send_time")
|
||||
private Date sendTime;
|
||||
|
||||
/**
|
||||
* 案件编号
|
||||
*/
|
||||
@Column(name = "case_num")
|
||||
private String caseNum;
|
||||
|
||||
/**
|
||||
* 发送状态
|
||||
*/
|
||||
@Column(name = "send_status")
|
||||
private Long sendStatus;
|
||||
|
||||
/**
|
||||
* 立案申请id
|
||||
*/
|
||||
@Column(name = "case_id")
|
||||
private Long caseId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@Column(name = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@Column(name = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 附件id用英文逗号隔开
|
||||
*/
|
||||
@Column(name = "file_ids")
|
||||
private String fileIds;
|
||||
|
||||
/**
|
||||
* 邮件主题
|
||||
*/
|
||||
@Column(name = "mail_subject")
|
||||
private String mailSubject;
|
||||
|
||||
/**
|
||||
* 邮件发送地址
|
||||
*/
|
||||
@Column(name = "mail_from_address")
|
||||
private String mailFromAddress;
|
||||
|
||||
/**
|
||||
* 邮件父类id
|
||||
*/
|
||||
@Column(name = "parent_id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 邮件内容
|
||||
*/
|
||||
@Column(name = "mail_content")
|
||||
private String mailContent;
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.system.domain.entity.shortmessage;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Table(name = "ms_sms_send_history_record")
|
||||
public class MsSmsSendHistoryRecord {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 案件id
|
||||
*/
|
||||
@Column(name = "case_appli_id")
|
||||
private Long caseAppliId;
|
||||
/**
|
||||
* 短信模板表主键id
|
||||
*/
|
||||
@Column(name = "ms_sms_template_id")
|
||||
private Long msSmsTemplateId;
|
||||
|
||||
/**
|
||||
* 案件编号
|
||||
*/
|
||||
@Column(name = "case_num")
|
||||
private String caseNum;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
@Column(name = "send_time")
|
||||
private Date sendTime;
|
||||
|
||||
/**
|
||||
* 发送状态,0-失败,1-成功
|
||||
*/
|
||||
@Column(name = "send_status")
|
||||
private Long sendStatus;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Column(name = "create_by")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@Column(name = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 发送短信唯一标识
|
||||
*/
|
||||
private String sid;
|
||||
|
||||
/**
|
||||
* 父类短信id
|
||||
*/
|
||||
@Column(name = "parent_id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
private String reason;
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.system.domain.entity.sms;
|
||||
|
||||
import javax.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_sms_send_history_record_param")
|
||||
public class MsSmsSendHistoryRecordParam {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 短信历史记录表id
|
||||
*/
|
||||
@Column(name = "sms_record_history_id")
|
||||
private Long smsRecordHistoryId;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*/
|
||||
@Column(name = "param_value")
|
||||
private String paramValue;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.system.domain.entity.sms;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_sms_send_record_param")
|
||||
public class MsSmsSendRecordParam {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 短信记录表id
|
||||
*/
|
||||
@Column(name = "sms_record_id")
|
||||
private Long smsRecordId;
|
||||
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*/
|
||||
@Column(name = "param_value")
|
||||
private String paramValue;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.system.domain.entity.sms;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_sms_template")
|
||||
public class MsSmsTemplate {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 腾讯云模板id
|
||||
*/
|
||||
@Column(name = "template_id")
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 模板参数
|
||||
*/
|
||||
@Transient
|
||||
private List<MsSmsTemplateParam> templateParams;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.system.domain.entity.sms;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_sms_template_param")
|
||||
public class MsSmsTemplateParam {
|
||||
@Id
|
||||
@GeneratedValue(generator = "JDBC")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* ms_sms_template表id
|
||||
*/
|
||||
@Column(name = "sms_template_id")
|
||||
private Long smsTemplateId;
|
||||
|
||||
/**
|
||||
* 参数
|
||||
*/
|
||||
private String param;
|
||||
/**
|
||||
* 参数名
|
||||
*/
|
||||
@Column(name = "param_name")
|
||||
private String paramName;
|
||||
/**
|
||||
* 参数值
|
||||
*/
|
||||
@Transient
|
||||
private String paramValue;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.ruoyi.system.domain.vo.flow;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Data
|
||||
public class MsCaseFlowRoleSmsRelatedVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 流程节点id
|
||||
*/
|
||||
private Integer flowId;
|
||||
|
||||
|
||||
/**
|
||||
* 短信模版id
|
||||
*/
|
||||
private Long smsTemplateId;
|
||||
/**
|
||||
* 发送短信的角色id
|
||||
*/
|
||||
private List<Long> receiveRoleIds;
|
||||
/**
|
||||
* 接收短信角色名称
|
||||
*/
|
||||
public List<JSONObject> receiveRoleNames;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.domain.vo.flow;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -64,5 +65,16 @@ public class MsCaseFlowVO {
|
||||
* svg图片路径
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 短信模版id
|
||||
*/
|
||||
private Long smsTemplateId;
|
||||
/**
|
||||
* 发送短信的角色id
|
||||
*/
|
||||
private List<Long> receiveRoleIds;
|
||||
/**
|
||||
* 接收短信角色名称
|
||||
*/
|
||||
public List<JSONObject> receiveRoleNames;
|
||||
}
|
||||
@@ -78,6 +78,13 @@ public interface SysDeptMapper
|
||||
*/
|
||||
public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
|
||||
|
||||
/**
|
||||
* 根据部门名称查询部门信息
|
||||
* @param deptName
|
||||
* @return
|
||||
*/
|
||||
public SysDept selectDeptByName(@Param("deptName") String deptName);
|
||||
|
||||
/**
|
||||
* 新增部门信息
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户表 数据层
|
||||
@@ -143,12 +143,13 @@ public interface SysUserMapper
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
|
||||
SysUser selectUserByPhone(@Param("phonenumber")String phonenumber);
|
||||
/**
|
||||
* 根据手机号查询用户信息
|
||||
* @param phone
|
||||
* 根据邮箱查询用户信息
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByPhone(@Param("phone")String phone);
|
||||
SysUser selectUserByEmail(@Param("email")String email);
|
||||
|
||||
/**
|
||||
* 根据部门和角色查询用户
|
||||
|
||||
@@ -67,4 +67,11 @@ public interface SysUserRoleMapper
|
||||
* @param roleId
|
||||
*/
|
||||
void insertUserRole(@Param("userId")Long userId, @Param("roleId")Long roleId);
|
||||
|
||||
/**
|
||||
* 根据用户id查询关联的角色id
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public List<Long> selectRoleIdsByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.system.mapper.flow;
|
||||
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlowRoleSmsRelated;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MsCaseFlowRoleSmsRelatedMapper extends Mapper<MsCaseFlowRoleSmsRelated> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.system.mapper.log;
|
||||
|
||||
import com.ruoyi.system.domain.entity.log.MsRequestLog;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MsRequestLogMapper extends Mapper<MsRequestLog> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.system.mapper.shortmessage;
|
||||
|
||||
import com.ruoyi.system.domain.entity.shortmessage.MeetingInfo;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MeetingInfoMapper extends Mapper<MeetingInfo> {
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.system.mapper.shortmessage;
|
||||
|
||||
import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MsSendMailHistoryRecordMapper extends Mapper<MsSendMailHistoryRecord> {
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.system.mapper.shortmessage;
|
||||
|
||||
import com.ruoyi.system.domain.entity.shortmessage.MsSmsSendHistoryRecord;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MsSmsSendHistoryRecordMapper extends Mapper<MsSmsSendHistoryRecord> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.sms;
|
||||
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsSendHistoryRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MsSmsSendHistoryRecordParamMapper extends Mapper<MsSmsSendHistoryRecordParam> {
|
||||
/**
|
||||
* 批量新增
|
||||
* @param historyRecordParams
|
||||
*/
|
||||
@Select("<script> INSERT INTO ms_sms_send_history_record_param (sms_record_history_id, param_value)\n" +
|
||||
" VALUES\n" +
|
||||
" <foreach item=\"item\" index=\"index\" collection=\"list\" separator=\",\">\n" +
|
||||
" (#{item.smsRecordHistoryId}, #{item.paramValue})\n" +
|
||||
" </foreach> " +
|
||||
"</script>")
|
||||
void batchInsert(@Param("list") List<MsSmsSendHistoryRecordParam> historyRecordParams);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.sms;
|
||||
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsSendRecordParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MsSmsSendRecordParamMapper extends Mapper<MsSmsSendRecordParam> {
|
||||
/**
|
||||
* 批量插入
|
||||
* @param list
|
||||
*/
|
||||
@Select("<script> INSERT INTO ms_sms_send_record_param (sms_record_id, param_value)\n" +
|
||||
" VALUES\n" +
|
||||
" <foreach item=\"item\" index=\"index\" collection=\"list\" separator=\",\">\n" +
|
||||
" (#{item.smsRecordId}, #{item.paramValue})\n" +
|
||||
" </foreach> " +
|
||||
"</script>")
|
||||
void batchInsert(@Param("list") List<MsSmsSendRecordParam> list);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.ruoyi.system.mapper.sms;
|
||||
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsTemplate;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MsSmsTemplateMapper extends Mapper<MsSmsTemplate> {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.system.mapper.sms;
|
||||
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsTemplateParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MsSmsTemplateParamMapper extends Mapper<MsSmsTemplateParam> {
|
||||
@Select("<script> INSERT INTO ms_sms_template_param (sms_template_id, param,param_name)\n" +
|
||||
" VALUES\n" +
|
||||
" <foreach item=\"item\" index=\"index\" collection=\"list\" separator=\",\">\n" +
|
||||
" (#{item.smsTemplateId}, #{item.param}, #{item.paramName})\n" +
|
||||
" </foreach> " +
|
||||
"</script>")
|
||||
void batchInsert(@Param("list") List<MsSmsTemplateParam> templateParams);
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
|
||||
import com.ruoyi.common.enums.DocumentTypeEnum;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseStatusInfo;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public interface BeiMingInterface {
|
||||
/**
|
||||
* 1.获取北明接口令牌token对象
|
||||
*
|
||||
* @param userName
|
||||
* @param password
|
||||
* @param times
|
||||
* @return
|
||||
*/
|
||||
String getApiToken(String userName, String password, Long times);
|
||||
|
||||
|
||||
/**
|
||||
* 2.提交案件状态信息
|
||||
*
|
||||
* @param token 令牌
|
||||
* @param abutmentId 第三方平台案件唯一标识
|
||||
* @param msCaseStatusInfo 案件状态信息
|
||||
* @return
|
||||
*/
|
||||
JSONObject submitCaseStatusInfo(String token, String abutmentId, String syncSource, MsCaseStatusInfo msCaseStatusInfo);
|
||||
|
||||
/**
|
||||
* 3.上传附件
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
JSONObject uploadFile(File file, String token, String syncSource);
|
||||
|
||||
/**
|
||||
* 4.同步附件信息
|
||||
*
|
||||
* @param action
|
||||
* @param caseNo
|
||||
* @param msCaseFileInfo
|
||||
* @return
|
||||
*/
|
||||
JSONObject syncAttachmentInfo(String token, String syncSource, String action, String caseNo, MsCaseFileInfo msCaseFileInfo);
|
||||
|
||||
/**
|
||||
* 推送案件状态信息(调解系统推送案件状态时调用)
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @param caseNo 案件编号
|
||||
* @param statusCode 案件状态编码
|
||||
* @param caseClosureExplanation 案件状态描述(或结案信息)
|
||||
* @return
|
||||
*/
|
||||
JSONObject pushCaseStatusInfo(String username, String password, String caseNo, String statusCode, String caseClosureExplanation);
|
||||
|
||||
/**
|
||||
* 推送案件附件信息(调解系统推送案件附件信息时调用)
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param password 密码
|
||||
* @param file 文件
|
||||
* @param abutmentId 调解系统文件Id
|
||||
* @param syncSource 用户名
|
||||
* @param caseNo 案件编号
|
||||
* @return
|
||||
*/
|
||||
MsCaseFileInfo pushAttachmentInfo(String username, String password, File file, String syncSource, String caseNo, AttachmentOperateTypeEnum operateTypeEnum, DocumentTypeEnum documentTypeEnum);
|
||||
|
||||
/**
|
||||
* 删除附件
|
||||
* @param file
|
||||
* @param caseNo
|
||||
* @return
|
||||
*/
|
||||
public JSONObject deleteAttachmentInfo( String caseNo,String fileId,String fileName);
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.TreeSelect;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.system.domain.vo.RouterVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 菜单 业务层
|
||||
*
|
||||
@@ -141,4 +143,17 @@ public interface ISysMenuService
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean checkMenuNameUnique(SysMenu menu);
|
||||
|
||||
/**
|
||||
* 查询管理员权限
|
||||
* @return
|
||||
*/
|
||||
|
||||
Set<String> selectAdminMenu();
|
||||
|
||||
/**
|
||||
* 根据用户查询菜单权限字符
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getMenuPermsByUser();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色业务层
|
||||
*
|
||||
@@ -34,7 +34,7 @@ public interface ISysRoleService
|
||||
* @param userId 用户ID
|
||||
* @return 权限列表
|
||||
*/
|
||||
public Set<String> selectRolePermissionByUserId(Long userId);
|
||||
public List<SysRole> selectRolePermissionByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询所有角色
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.system.domain.entity.log.MsRequestLog;
|
||||
|
||||
/**
|
||||
* @Classname MsRequestLogService
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/4/2 14:18
|
||||
* @Created wangqiong
|
||||
*/
|
||||
public interface MsRequestLogService {
|
||||
void insert(MsRequestLog requestLog);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.system.service.flow;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowRoleSmsRelatedVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowSearchVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||
|
||||
@@ -9,18 +10,22 @@ import java.util.Set;
|
||||
public interface CaseFlowService {
|
||||
/**
|
||||
* 查询案件流程节点信息
|
||||
*
|
||||
* @param caseFlowSearchVO
|
||||
* @return
|
||||
*/
|
||||
Object queryCaseFlowInfo(MsCaseFlowSearchVO caseFlowSearchVO);
|
||||
|
||||
/**
|
||||
* 查询案件流程信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectCaseFlow();
|
||||
|
||||
/**
|
||||
* 新增或编辑案件流程节点信息
|
||||
*
|
||||
* @param caseFlowVO
|
||||
* @return
|
||||
*/
|
||||
@@ -28,6 +33,7 @@ public interface CaseFlowService {
|
||||
|
||||
/**
|
||||
* 删除案件流程节点信息
|
||||
*
|
||||
* @param caseFlowVO
|
||||
* @return
|
||||
*/
|
||||
@@ -35,6 +41,7 @@ public interface CaseFlowService {
|
||||
|
||||
/**
|
||||
* 排序案件流程节点
|
||||
*
|
||||
* @param caseFlowSearchVO
|
||||
* @return
|
||||
*/
|
||||
@@ -42,10 +49,14 @@ public interface CaseFlowService {
|
||||
|
||||
/**
|
||||
* 查询用户角色关联的案件状态
|
||||
*
|
||||
* @param roles
|
||||
* @return
|
||||
*/
|
||||
Set<Integer> getCaseStatusIdByRoleKey(Set<String> roles);
|
||||
|
||||
|
||||
/**
|
||||
* 查询流程节点接收信息配置记录
|
||||
*/
|
||||
MsCaseFlowRoleSmsRelatedVO queryFlowReceiveRoleSmsRelated(Integer flowId);
|
||||
}
|
||||
|
||||
+137
-32
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.service.flow;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -7,12 +8,15 @@ import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlowRoleRelated;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlowRoleSmsRelated;
|
||||
import com.ruoyi.system.domain.vo.flow.MsBaseCaseFlow;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowRoleSmsRelatedVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowSearchVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
|
||||
import com.ruoyi.system.mapper.flow.MsCaseFlowRoleRelatedMapper;
|
||||
import com.ruoyi.system.mapper.flow.MsCaseFlowRoleSmsRelatedMapper;
|
||||
import com.ruoyi.system.util.NewStringUtil;
|
||||
import com.ruoyi.system.util.TableDataUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -90,6 +94,30 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
MsCaseFlow msCaseFlow1 = msCaseFlowMapper.selectByPrimaryKey(msCaseFlow.getBackFlowId());
|
||||
temp.setBackFlowName(msCaseFlow1 != null ? msCaseFlow1.getNodeName() : "");
|
||||
}
|
||||
//短信接收角色
|
||||
if (msCaseFlow.getId() != null) {
|
||||
Example example1 = new Example(MsCaseFlowRoleSmsRelated.class);
|
||||
Example.Criteria criteria1 = example1.createCriteria();
|
||||
criteria1.andEqualTo("flowId", msCaseFlow.getId());
|
||||
List<MsCaseFlowRoleSmsRelated> msCaseFlowRoleSmsRelateds = msCaseFlowRoleSmsRelatedMapper.selectByExample(example1);
|
||||
List<JSONObject> receiveRoleNames = new ArrayList<>();
|
||||
List<Long> receiveRoleIds = new ArrayList<>();
|
||||
for (int k = 0; k < msCaseFlowRoleSmsRelateds.size(); k++) {
|
||||
MsCaseFlowRoleSmsRelated msCaseFlowRoleSmsRelated = msCaseFlowRoleSmsRelateds.get(k);
|
||||
if (msCaseFlowRoleSmsRelated.getReceiveRoleId() != null) {
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(msCaseFlowRoleSmsRelated.getReceiveRoleId());
|
||||
if (sysRole != null) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("roleId", sysRole.getRoleId());
|
||||
jsonObject.put("roleName", sysRole.getRoleName());
|
||||
receiveRoleNames.add(jsonObject);
|
||||
receiveRoleIds.add(sysRole.getRoleId());
|
||||
}
|
||||
}
|
||||
}
|
||||
temp.setReceiveRoleIds(receiveRoleIds);
|
||||
temp.setReceiveRoleNames(receiveRoleNames);
|
||||
}
|
||||
list.add(temp);
|
||||
}
|
||||
TableDataInfo tableDataInfo = TableDataUtil.rebuildTableDataInfo(list, total);
|
||||
@@ -134,15 +162,16 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
|
||||
/**
|
||||
* 本地图片装64
|
||||
*
|
||||
* @param imgPath
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String convertToBase64( String imgPath) {
|
||||
public static String convertToBase64(String imgPath) {
|
||||
byte[] data = null;
|
||||
// 读取图片字节数组
|
||||
try {
|
||||
imgPath=imgPath.replace("/profile/upload", "/home/ruoyi/uploadPath/upload/");
|
||||
imgPath = imgPath.replace("/profile/upload", "/home/ruoyi/uploadPath/upload/");
|
||||
InputStream in = Files.newInputStream(Paths.get(imgPath));
|
||||
data = new byte[in.available()];
|
||||
in.read(data);
|
||||
@@ -153,6 +182,7 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
// 返回Base64编码过的字节数组字符串
|
||||
return Base64.getEncoder().encodeToString(Objects.requireNonNull(data));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增或编辑案件流程节点信息
|
||||
*
|
||||
@@ -161,40 +191,78 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean saveCaseFlow(MsCaseFlowVO caseFlowVO) {
|
||||
|
||||
if (caseFlowVO.getId() != null) {
|
||||
//更新案件流程信息
|
||||
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
||||
BeanUtils.copyProperties(caseFlowVO, msCaseFlow);
|
||||
int i = msCaseFlowMapper.updateByPrimaryKey(msCaseFlow);
|
||||
if (i > 0) {
|
||||
//更新流程节点和角色之间的关系
|
||||
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
int sort = 1;
|
||||
Example example = new Example(MsCaseFlow.class);
|
||||
example.setOrderByClause("sort DESC limit 1");
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
List<MsCaseFlow> msCaseFlows = msCaseFlowMapper.selectByExample(example);
|
||||
if (msCaseFlows != null && msCaseFlows.size() > 0) {
|
||||
sort = msCaseFlows.get(0).getSort() + 1;
|
||||
}
|
||||
//新增案件流程信息
|
||||
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
||||
BeanUtils.copyProperties(caseFlowVO, msCaseFlow);
|
||||
msCaseFlow.setSort(sort);
|
||||
int insert = msCaseFlowMapper.insert(msCaseFlow);
|
||||
if (insert > 0) {
|
||||
//更新流程节点和角色之间的关系
|
||||
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
||||
return true;
|
||||
try {
|
||||
if (caseFlowVO.getId() != null) {
|
||||
//更新案件流程信息
|
||||
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
||||
BeanUtils.copyProperties(caseFlowVO, msCaseFlow);
|
||||
int i = msCaseFlowMapper.updateByPrimaryKey(msCaseFlow);
|
||||
if (i > 0) {
|
||||
//更新流程节点和角色之间的关系
|
||||
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
||||
//更新流程节点和短信模板之间的关系
|
||||
updateFlowMessageRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getReceiveRoleIds(), caseFlowVO.getSmsTemplateId());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
int sort = 1;
|
||||
Example example = new Example(MsCaseFlow.class);
|
||||
example.setOrderByClause("sort DESC limit 1");
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
List<MsCaseFlow> msCaseFlows = msCaseFlowMapper.selectByExample(example);
|
||||
if (msCaseFlows != null && msCaseFlows.size() > 0) {
|
||||
sort = msCaseFlows.get(0).getSort() + 1;
|
||||
}
|
||||
//新增案件流程信息
|
||||
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
||||
BeanUtils.copyProperties(caseFlowVO, msCaseFlow);
|
||||
msCaseFlow.setSort(sort);
|
||||
int insert = msCaseFlowMapper.insert(msCaseFlow);
|
||||
if (insert > 0) {
|
||||
//更新流程节点和角色之间的关系
|
||||
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
||||
//更新流程节点和短信模板之间的关系
|
||||
updateFlowMessageRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getReceiveRoleIds(), caseFlowVO.getSmsTemplateId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
MsCaseFlowRoleSmsRelatedMapper msCaseFlowRoleSmsRelatedMapper;
|
||||
|
||||
/**
|
||||
* 更新流程节点和短信模板之间的关系
|
||||
*
|
||||
* @param flowId
|
||||
* @param receiveRoleIds
|
||||
* @param smsTemplateId
|
||||
*/
|
||||
private void updateFlowMessageRoleByFlowId(Integer flowId, List<Long> receiveRoleIds, Long smsTemplateId) {
|
||||
if (receiveRoleIds != null && receiveRoleIds.size() > 0) {
|
||||
//删除历史流程与短信发送设置记录
|
||||
Example example = new Example(MsCaseFlowRoleSmsRelated.class);
|
||||
example.createCriteria().andEqualTo("flowId", flowId);
|
||||
int count = msCaseFlowRoleSmsRelatedMapper.deleteByExample(example);
|
||||
//新增流程节点与短信发送设置记录
|
||||
for (int i = 0; i < receiveRoleIds.size(); i++) {
|
||||
MsCaseFlowRoleSmsRelated msCaseFlowRoleSmsRelated = new MsCaseFlowRoleSmsRelated();
|
||||
msCaseFlowRoleSmsRelated.setFlowId(flowId);
|
||||
msCaseFlowRoleSmsRelated.setReceiveRoleId(receiveRoleIds.get(i));
|
||||
msCaseFlowRoleSmsRelated.setSmsTemplateId(smsTemplateId);
|
||||
msCaseFlowRoleSmsRelated.setCreateTime(new Date());
|
||||
msCaseFlowRoleSmsRelatedMapper.insertSelective(msCaseFlowRoleSmsRelated);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新流程节点和角色之间的关系
|
||||
*
|
||||
@@ -258,7 +326,6 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 排序案件流程节点
|
||||
*
|
||||
@@ -352,6 +419,44 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
return caseStatusIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流程节点接收信息配置记录
|
||||
*
|
||||
* @param flowId
|
||||
*/
|
||||
@Override
|
||||
public MsCaseFlowRoleSmsRelatedVO queryFlowReceiveRoleSmsRelated(Integer flowId) {
|
||||
MsCaseFlowRoleSmsRelatedVO result = new MsCaseFlowRoleSmsRelatedVO();
|
||||
//短信接收角色
|
||||
if (flowId != null) {
|
||||
Example example1 = new Example(MsCaseFlowRoleSmsRelated.class);
|
||||
Example.Criteria criteria1 = example1.createCriteria();
|
||||
criteria1.andEqualTo("flowId", flowId);
|
||||
List<MsCaseFlowRoleSmsRelated> msCaseFlowRoleSmsRelateds = msCaseFlowRoleSmsRelatedMapper.selectByExample(example1);
|
||||
List<JSONObject> receiveRoleNames = new ArrayList<>();
|
||||
List<Long> receiveRoleIds = new ArrayList<>();
|
||||
for (int k = 0; k < msCaseFlowRoleSmsRelateds.size(); k++) {
|
||||
MsCaseFlowRoleSmsRelated msCaseFlowRoleSmsRelated = msCaseFlowRoleSmsRelateds.get(k);
|
||||
if (k == 0) {
|
||||
BeanUtils.copyProperties(msCaseFlowRoleSmsRelated, result);
|
||||
}
|
||||
if (msCaseFlowRoleSmsRelated.getReceiveRoleId() != null) {
|
||||
SysRole sysRole = sysRoleMapper.selectRoleById(msCaseFlowRoleSmsRelated.getReceiveRoleId());
|
||||
if (sysRole != null) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("roleId", sysRole.getRoleId());
|
||||
jsonObject.put("roleName", sysRole.getRoleName());
|
||||
receiveRoleNames.add(jsonObject);
|
||||
receiveRoleIds.add(sysRole.getRoleId());
|
||||
}
|
||||
}
|
||||
}
|
||||
result.setReceiveRoleIds(receiveRoleIds);
|
||||
result.setReceiveRoleNames(receiveRoleNames);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询角色的案件状态id
|
||||
*
|
||||
|
||||
+391
@@ -0,0 +1,391 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
|
||||
import com.ruoyi.common.enums.DocumentTypeEnum;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.system.domain.entity.log.MsRequestLog;
|
||||
import com.ruoyi.system.service.BeiMingInterface;
|
||||
import com.ruoyi.system.service.MsRequestLogService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseStatusInfo;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CommonInputStreamResource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.client.RestClientException;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import static com.ruoyi.common.utils.EncryptUtils.sm4Decrypt;
|
||||
import static com.ruoyi.common.utils.EncryptUtils.sm4Encrypt;
|
||||
|
||||
/**
|
||||
* @author ym
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BeiMingInterfaceService implements BeiMingInterface {
|
||||
@Autowired
|
||||
RestTemplate restTemplate;
|
||||
@Autowired
|
||||
MsRequestLogService requestLogService;
|
||||
@Autowired
|
||||
BeiMingInterfaceService beiMingInterfaceService;
|
||||
/**
|
||||
* 接口地址
|
||||
*/
|
||||
@Value("${beimingapihost}")
|
||||
public String apihost;
|
||||
/**
|
||||
* 接口路径前缀
|
||||
*/
|
||||
@Value("${beimingapiprefix}")
|
||||
public String apiprefix;
|
||||
@Value("${beimingprivatekey}")
|
||||
public String privateKey;
|
||||
// 北明配置
|
||||
@Value("${BMConfig.userName}")
|
||||
private String BMUserName;
|
||||
@Value("${BMConfig.password}")
|
||||
private String BMPassword;
|
||||
@Value("${BMConfig.syncSource}")
|
||||
private String BMSyncSource;
|
||||
|
||||
/**
|
||||
* 1.获取北明接口令牌token
|
||||
*
|
||||
* @param userName
|
||||
* @param password
|
||||
* @param times
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public String getApiToken(String userName, String password, Long times) {
|
||||
JSONObject result = new JSONObject();
|
||||
MsRequestLog requestLog = new MsRequestLog();
|
||||
try {
|
||||
//设置请求头
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
//传递请求体时必须设置传递参数的格式,为Content-Type : application/json
|
||||
httpHeaders.add("Content-Type", "application/json;charset=UTF-8");
|
||||
httpHeaders.add("syncSource", userName);
|
||||
// 2.请求头 & 请求体
|
||||
HttpEntity<JSON> fromEntity = new HttpEntity(httpHeaders);
|
||||
JSONObject body = new JSONObject();
|
||||
// body.put("account", userName);
|
||||
// body.put("password", password);
|
||||
// body.put("timestamp", times);
|
||||
//对整体请求进行加密
|
||||
ObjectNode param = new ObjectMapper().createObjectNode();
|
||||
param.put("account", userName);
|
||||
param.put("password", password);
|
||||
param.put("timestamp", times);
|
||||
String encryptString = sm4Encrypt(param.toString(), privateKey);
|
||||
body.put("encryptString", encryptString);
|
||||
System.out.println("encryptString:" + encryptString);
|
||||
fromEntity = new HttpEntity(body, httpHeaders);
|
||||
String url = apihost + apiprefix + "/getToken";
|
||||
|
||||
requestLog.setRequestUrl(url);
|
||||
requestLog.setContent(param.toString());
|
||||
requestLog.setCreateTime((new Date()));
|
||||
requestLog.setStatus(0);
|
||||
result = restTemplate.postForObject(url, fromEntity, JSONObject.class);
|
||||
requestLog.setReturnContent(result!=null?result.toString():null);
|
||||
} catch (RestClientException e) {
|
||||
e.printStackTrace();
|
||||
requestLog.setReason(e.getMessage());
|
||||
requestLog.setStatus(1);
|
||||
requestLogService.insert(requestLog);
|
||||
throw new ServiceException("推送失败");
|
||||
}
|
||||
requestLogService.insert(requestLog);
|
||||
return analysisResultToken(Objects.requireNonNull(result).toString());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析加密后端token
|
||||
*
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
public String analysisResultToken(String token) {
|
||||
String resultToken = null;
|
||||
if (token != null && !token.isEmpty()) {
|
||||
JSONObject jsonObject = JSON.parseObject(token);
|
||||
String tokenString = jsonObject.getString("data");
|
||||
String tokenstr = sm4Decrypt(tokenString, privateKey);
|
||||
if (tokenstr != null && !tokenstr.isEmpty()) {
|
||||
JSONObject tokenObject = JSON.parseObject(tokenstr);
|
||||
resultToken = tokenObject.getString("token");
|
||||
}
|
||||
}
|
||||
return resultToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2.推送案件状态信息
|
||||
*
|
||||
* @param token 令牌
|
||||
* @param abutmentId 第三方平台案件唯一标识
|
||||
* @param msCaseStatusInfo 案件状态信息
|
||||
* @param syncSource 同步来源(账户名)
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public JSONObject submitCaseStatusInfo(String token, String abutmentId, String syncSource, MsCaseStatusInfo msCaseStatusInfo) {
|
||||
JSONObject result = new JSONObject();
|
||||
MsRequestLog requestLog = new MsRequestLog();
|
||||
try {
|
||||
//设置请求头
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
//传递请求体时必须设置传递参数的格式,为Content-Type : application/json
|
||||
httpHeaders.add("Content-Type", "application/json;charset=UTF-8");
|
||||
httpHeaders.add("token", token);
|
||||
httpHeaders.add("syncSource", syncSource);
|
||||
//对整体请求进行加密
|
||||
ObjectNode param = new ObjectMapper().createObjectNode();
|
||||
param.put("abutmentId", abutmentId);
|
||||
param.put("caseNo", msCaseStatusInfo.getCaseNo());
|
||||
param.put("statusCode", msCaseStatusInfo.getStatusCode());
|
||||
param.put("caseClosureExplanation", msCaseStatusInfo.getCaseClosureExplanation());
|
||||
String encryptString = sm4Encrypt(param.toString(), privateKey);
|
||||
// 2.请求头 & 请求体
|
||||
HttpEntity<JSON> fromEntity = new HttpEntity(httpHeaders);
|
||||
JSONObject body = new JSONObject();
|
||||
// body.put("abutmentId", Encrypt("abutmentId",abutmentId));
|
||||
// body.put("caseNo", Encrypt("caseNo", msCaseStatusInfo.getCaseNo()));
|
||||
// body.put("statusCode", Encrypt("statusCode",msCaseStatusInfo.getStatusCode()));
|
||||
// body.put("caseClosureExplanation", Encrypt("caseClosureExplanation", msCaseStatusInfo.getCaseClosureExplanation()));
|
||||
//对整体请求进行加密
|
||||
body.put("encryptString", encryptString);
|
||||
fromEntity = new HttpEntity(body, httpHeaders);
|
||||
|
||||
String url = apihost + apiprefix + "/caseMediation/status";
|
||||
requestLog.setRequestUrl(url);
|
||||
requestLog.setContent(param.toString());
|
||||
requestLog.setCreateTime((new Date()));
|
||||
requestLog.setStatus(0);
|
||||
result = restTemplate.postForObject(url, fromEntity, JSONObject.class);
|
||||
requestLog.setReturnContent(result!=null?result.toString():null);
|
||||
} catch (RestClientException e) {
|
||||
e.printStackTrace();
|
||||
requestLog.setReason(e.getMessage());
|
||||
requestLog.setStatus(1);
|
||||
requestLogService.insert(requestLog);
|
||||
throw new ServiceException("推送失败");
|
||||
}
|
||||
requestLogService.insert(requestLog);
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 3.上传附件
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public JSONObject uploadFile(File file, String token, String syncSource) {
|
||||
System.out.println("文件:" + file.getName());
|
||||
System.out.println("文件:" + file.toString());
|
||||
JSONObject result = new JSONObject();
|
||||
MsRequestLog requestLog = new MsRequestLog();
|
||||
try {
|
||||
//设置请求头
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
//传递请求体时必须设置传递参数的格式,为Content-Type : application/json
|
||||
httpHeaders.add("Content-Type", "multipart/form-data");
|
||||
httpHeaders.add("token", token);
|
||||
httpHeaders.add("syncSource", syncSource);
|
||||
// 构建请求体
|
||||
MultiValueMap<String, Object> requestBody = new LinkedMultiValueMap<>();
|
||||
CommonInputStreamResource commonInputStreamResource = null;
|
||||
try {
|
||||
FileInputStream fileInputStream = new FileInputStream(file);
|
||||
commonInputStreamResource = new CommonInputStreamResource(fileInputStream, file.length(), file.getName());
|
||||
} catch (Exception e) {
|
||||
log.error("文件输入流转换错误", e);
|
||||
}
|
||||
requestBody.add("file", commonInputStreamResource);
|
||||
HttpEntity<MultiValueMap> fromEntity = new HttpEntity<MultiValueMap>(requestBody, httpHeaders);
|
||||
String url = apihost + apiprefix + "/uploadFile";
|
||||
requestLog.setRequestUrl(url);
|
||||
requestLog.setContent(fromEntity.toString());
|
||||
requestLog.setCreateTime((new Date()));
|
||||
requestLog.setStatus(0);
|
||||
result = restTemplate.postForObject(url, fromEntity, JSONObject.class);
|
||||
requestLog.setReturnContent(result!=null?result.toString():null);
|
||||
} catch (RestClientException e) {
|
||||
e.printStackTrace();
|
||||
requestLog.setReason(e.getMessage());
|
||||
requestLog.setStatus(1);
|
||||
requestLogService.insert(requestLog);
|
||||
throw new ServiceException("推送失败");
|
||||
}
|
||||
requestLogService.insert(requestLog);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.同步附件信息
|
||||
*
|
||||
* @param token
|
||||
* @param syncSource 用户名
|
||||
* @param action 附件操作类型
|
||||
* @param caseNo 案件编号
|
||||
* @param msCaseFileInfo 案件附件信息
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public JSONObject syncAttachmentInfo(String token, String syncSource, String action, String caseNo, MsCaseFileInfo msCaseFileInfo) {
|
||||
JSONObject result = new JSONObject();
|
||||
MsRequestLog requestLog = new MsRequestLog();
|
||||
try {
|
||||
//设置请求头
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
//传递请求体时必须设置传递参数的格式,为Content-Type : application/json
|
||||
httpHeaders.add("Content-Type", "application/json;charset=UTF-8");
|
||||
httpHeaders.add("token", token);
|
||||
httpHeaders.add("syncSource", syncSource);
|
||||
//对整体请求进行加密
|
||||
ObjectNode param = new ObjectMapper().createObjectNode();
|
||||
param.put("caseNo", caseNo);
|
||||
param.put("action", action);
|
||||
param.put("abutmentId", msCaseFileInfo.getAbutmentId());
|
||||
param.put("abutmentCaseId", msCaseFileInfo.getAbutmentCaseId());
|
||||
param.put("documentSubject", msCaseFileInfo.getDocumentSubject());
|
||||
param.put("documentType", msCaseFileInfo.getDocumentType());
|
||||
param.put("fileName", msCaseFileInfo.getFileName());
|
||||
param.put("fileId", msCaseFileInfo.getFileId());
|
||||
if (msCaseFileInfo.getOwnerType() != null) {
|
||||
param.put("ownerType", msCaseFileInfo.getOwnerType());
|
||||
}
|
||||
if (msCaseFileInfo.getOwnerId() != null) {
|
||||
param.put("ownerId", msCaseFileInfo.getOwnerId());
|
||||
}
|
||||
if (msCaseFileInfo.getOwnerName() != null) {
|
||||
param.put("ownerName", msCaseFileInfo.getOwnerName());
|
||||
}
|
||||
String encryptString = sm4Encrypt(param.toString(), privateKey);
|
||||
// 2.请求体
|
||||
HttpEntity<JSON> fromEntity = new HttpEntity(httpHeaders);
|
||||
JSONObject body = new JSONObject();
|
||||
//对整体请求进行加密
|
||||
body.put("encryptString", encryptString);
|
||||
fromEntity = new HttpEntity(body, httpHeaders);
|
||||
String url = apihost + apiprefix + "/caseMediation/attachment/accept";
|
||||
requestLog.setRequestUrl(url);
|
||||
requestLog.setContent(param.toString());
|
||||
requestLog.setCreateTime((new Date()));
|
||||
requestLog.setStatus(0);
|
||||
result = restTemplate.postForObject(url, fromEntity, JSONObject.class);
|
||||
requestLog.setReturnContent(result!=null?result.toString():null);
|
||||
} catch (RestClientException e) {
|
||||
e.printStackTrace();
|
||||
requestLog.setReason(e.getMessage());
|
||||
requestLog.setStatus(1);
|
||||
requestLogService.insert(requestLog);
|
||||
throw new ServiceException("推送失败");
|
||||
}
|
||||
requestLogService.insert(requestLog);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送案件状态信息
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public JSONObject pushCaseStatusInfo(String username, String password, String caseNo, String statusCode, String caseClosureExplanation) {
|
||||
JSONObject result = new JSONObject();
|
||||
String token = beiMingInterfaceService.getApiToken(username, password, System.currentTimeMillis());
|
||||
if (token != null && !token.isEmpty()) {
|
||||
MsCaseStatusInfo info = MsCaseStatusInfo.builder().caseNo(caseNo).statusCode(statusCode).caseClosureExplanation(caseClosureExplanation).build();
|
||||
result = submitCaseStatusInfo(token, caseNo, username, info);
|
||||
System.out.println("jieguo:" + result.toString());
|
||||
if (result != null) {
|
||||
String data = result.getString("data");
|
||||
String datastr = sm4Decrypt(data, privateKey);
|
||||
System.out.println("最终解密后的字符串:" + datastr);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 推送案件附件信息
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public MsCaseFileInfo pushAttachmentInfo(String username, String password, File file, String syncSource, String caseNo, AttachmentOperateTypeEnum operateTypeEnum, DocumentTypeEnum documentTypeEnum) {
|
||||
JSONObject result = new JSONObject();
|
||||
MsCaseFileInfo fileInfo=null;
|
||||
//1.获取token
|
||||
String token = beiMingInterfaceService.getApiToken(username, password, System.currentTimeMillis());
|
||||
if (token != null && !token.isEmpty()) {
|
||||
//2.上传文件
|
||||
JSONObject fileResult = uploadFile(file, token, syncSource);
|
||||
if (fileResult != null) {
|
||||
String data = fileResult.getString("data");
|
||||
String datastr = sm4Decrypt(data, privateKey);
|
||||
System.out.println("最终解密后的字符串:" + datastr);
|
||||
if (datastr != null) {
|
||||
JSONObject parse = JSON.parseObject(datastr);
|
||||
if (parse != null) {
|
||||
String fileId = parse.getString("fileId");
|
||||
System.out.println("fileId====:" + fileId);
|
||||
if (fileId != null) {
|
||||
//3.同步附件更新信息
|
||||
fileInfo = MsCaseFileInfo.builder().fileId(fileId).fileName(file.getName()).abutmentId(fileId).abutmentCaseId(caseNo).documentSubject("EVEDENT").documentType(documentTypeEnum.getCode()).build();
|
||||
result = syncAttachmentInfo(token, username, operateTypeEnum.getCode(), caseNo, fileInfo);
|
||||
// 更新到附件表将fileId
|
||||
// result = syncAttachmentInfo(token, username, AttachmentOperateTypeEnum.UPD.getCode(), caseNo, fileInfo);
|
||||
// result = syncAttachmentInfo(token, username, AttachmentOperateTypeEnum.DEL.getCode(), caseNo, fileInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return fileInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject deleteAttachmentInfo( String caseNo,String fileId,String fileName) {
|
||||
String token = beiMingInterfaceService.getApiToken(BMUserName, BMPassword, System.currentTimeMillis());
|
||||
MsCaseFileInfo fileInfo = MsCaseFileInfo.builder().fileId(fileId).fileName(fileName).abutmentId(fileId).abutmentCaseId(caseNo).documentSubject("EVEDENT").documentType("EVEDENT_METERIAL").build();
|
||||
|
||||
return syncAttachmentInfo(token, BMUserName, AttachmentOperateTypeEnum.DEL.getCode(), caseNo, fileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对字段值进行加密
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String Encrypt(String filed, String filedValue) {
|
||||
ObjectNode param = new ObjectMapper().createObjectNode();
|
||||
param.put(filed, filedValue);
|
||||
String encryptString = sm4Encrypt(param.toString(), privateKey);
|
||||
return encryptString;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.system.domain.entity.log.MsRequestLog;
|
||||
import com.ruoyi.system.mapper.log.MsRequestLogMapper;
|
||||
import com.ruoyi.system.service.MsRequestLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Classname MsRequestLogServiceImpl
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/4/2 14:19
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Service
|
||||
public class MsRequestLogServiceImpl implements MsRequestLogService {
|
||||
@Autowired
|
||||
private MsRequestLogMapper logMapper;
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
@Override
|
||||
public void insert(MsRequestLog requestLog) {
|
||||
logMapper.insert(requestLog);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,13 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.TreeSelect;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
@@ -20,6 +16,14 @@ import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 部门管理 服务实现
|
||||
@@ -34,6 +38,10 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper roleMapper;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
MsCaseApplicationMapper caseApplicationMapper;
|
||||
|
||||
/**
|
||||
* 查询部门管理数据
|
||||
@@ -221,7 +229,8 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
}
|
||||
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
||||
}
|
||||
return deptMapper.insertDept(dept);
|
||||
int i = deptMapper.insertDept(dept);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -293,6 +302,12 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
@Override
|
||||
public int deleteDeptById(Long deptId)
|
||||
{
|
||||
// 查询部门是否与案件有关
|
||||
List<Long> caseList = caseApplicationMapper.selectCaseByDeptId(deptId);
|
||||
if(CollectionUtil.isNotEmpty(caseList)){
|
||||
throw new ServiceException("该部门有关联案件,不允许删除");
|
||||
}
|
||||
|
||||
return deptMapper.deleteDeptById(deptId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.TreeSelect;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
@@ -24,6 +16,11 @@ import com.ruoyi.system.mapper.SysMenuMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 菜单 业务层处理
|
||||
@@ -120,6 +117,36 @@ public class SysMenuServiceImpl implements ISysMenuService
|
||||
}
|
||||
return permsSet;
|
||||
}
|
||||
/**
|
||||
* 查询管理员权限
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Set<String> selectAdminMenu() {
|
||||
Set<String> permsSet = new HashSet<>();
|
||||
List<SysMenu> sysMenus = menuMapper.selectMenuList(new SysMenu());
|
||||
Long caseMenuId =null;
|
||||
if(CollectionUtil.isNotEmpty(sysMenus)){
|
||||
Optional<SysMenu> optional = sysMenus.stream().filter(sysMenu -> sysMenu.getMenuName().equals("案件列表")).findFirst();
|
||||
if(optional.isPresent()){
|
||||
caseMenuId= optional.get().getMenuId();
|
||||
}
|
||||
for (SysMenu sysMenu : sysMenus) {
|
||||
if(!sysMenu.getParentId().equals(caseMenuId)&&StringUtils.isNotEmpty(sysMenu.getPerms())){
|
||||
permsSet.addAll(Arrays.asList(sysMenu.getPerms().trim().split(",")));
|
||||
}
|
||||
}
|
||||
}
|
||||
return permsSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getMenuPermsByUser() {
|
||||
AjaxResult result = AjaxResult.success();
|
||||
List<String> perms = menuMapper.selectMenuPermsByUserId(SecurityUtils.getUserId());
|
||||
result.put("perms",perms);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询菜单
|
||||
@@ -346,6 +373,8 @@ public class SysMenuServiceImpl implements ISysMenuService
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取路由名称
|
||||
*
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
@@ -24,6 +19,12 @@ import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
|
||||
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 角色 业务层处理
|
||||
@@ -44,6 +45,8 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
|
||||
@Autowired
|
||||
private SysRoleDeptMapper roleDeptMapper;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询角色数据
|
||||
@@ -90,18 +93,11 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
* @return 权限列表
|
||||
*/
|
||||
@Override
|
||||
public Set<String> selectRolePermissionByUserId(Long userId)
|
||||
public List<SysRole> selectRolePermissionByUserId(Long userId)
|
||||
{
|
||||
List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
|
||||
Set<String> permsSet = new HashSet<>();
|
||||
for (SysRole perm : perms)
|
||||
{
|
||||
if (StringUtils.isNotNull(perm))
|
||||
{
|
||||
permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
|
||||
}
|
||||
}
|
||||
return permsSet;
|
||||
|
||||
return perms;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,6 +229,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
{
|
||||
// 新增角色信息
|
||||
roleMapper.insertRole(role);
|
||||
redisCache.setCacheObject(CacheConstants.ROLE_KEY+role.getRoleName(),role.getRoleId());
|
||||
return insertRoleMenu(role);
|
||||
}
|
||||
|
||||
@@ -250,6 +247,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
roleMapper.updateRole(role);
|
||||
// 删除角色与菜单关联
|
||||
roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
|
||||
redisCache.setCacheObject(CacheConstants.ROLE_KEY+role.getRoleName(),role.getRoleId());
|
||||
return insertRoleMenu(role);
|
||||
}
|
||||
|
||||
@@ -341,10 +339,15 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
@Transactional
|
||||
public int deleteRoleById(Long roleId)
|
||||
{
|
||||
// 根据角色id查询角色名
|
||||
SysRole role = roleMapper.selectRoleById(roleId);
|
||||
// 删除角色与菜单关联
|
||||
roleMenuMapper.deleteRoleMenuByRoleId(roleId);
|
||||
// 删除角色与部门关联
|
||||
roleDeptMapper.deleteRoleDeptByRoleId(roleId);
|
||||
if(role!=null) {
|
||||
redisCache.deleteObject(CacheConstants.ROLE_KEY + role.getRoleName());
|
||||
}
|
||||
return roleMapper.deleteRoleById(roleId);
|
||||
}
|
||||
|
||||
@@ -358,6 +361,11 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
@Transactional
|
||||
public int deleteRoleByIds(Long[] roleIds)
|
||||
{
|
||||
List<SysRole> roles = roleMapper.selectRoleList(new SysRole());
|
||||
if(CollectionUtil.isEmpty(roles)){
|
||||
return 0;
|
||||
}
|
||||
Map<Long, String> roleMap = roles.stream().collect(Collectors.toMap(SysRole::getRoleId, SysRole::getRoleName, (n1, n2) -> n2));
|
||||
for (Long roleId : roleIds)
|
||||
{
|
||||
checkRoleAllowed(new SysRole(roleId));
|
||||
@@ -367,6 +375,9 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||
{
|
||||
throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName()));
|
||||
}
|
||||
if(roleMap.containsKey(roleId)) {
|
||||
redisCache.deleteObject(CacheConstants.ROLE_KEY + roleMap.get(roleId));
|
||||
}
|
||||
}
|
||||
// 删除角色与菜单关联
|
||||
roleMenuMapper.deleteRoleMenu(roleIds);
|
||||
|
||||
@@ -2,11 +2,13 @@ package com.ruoyi.system.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.entity.SysUserDept;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
@@ -19,6 +21,7 @@ import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.mapper.*;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -28,6 +31,7 @@ import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.validation.Validator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -66,6 +70,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
|
||||
@Autowired
|
||||
protected Validator validator;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
MsCaseApplicationMapper msCaseApplicationMapper;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
@@ -245,6 +253,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
user.setCreateBy("admin");
|
||||
user.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = userMapper.insertUser(user);
|
||||
|
||||
// 新增用户部门关联
|
||||
if(CollectionUtil.isNotEmpty(user.getDeptIds())) {
|
||||
// 先删除用户与部门关联
|
||||
@@ -262,6 +271,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
insertUserPost(user);
|
||||
// 新增用户与角色管理
|
||||
insertUserRole(user);
|
||||
// redis缓存
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
return AjaxResult.success("新建用户成功");
|
||||
}
|
||||
|
||||
@@ -273,7 +284,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
*/
|
||||
@Override
|
||||
public boolean registerUser(SysUser user) {
|
||||
return userMapper.insertUser(user) > 0;
|
||||
int i = userMapper.insertUser(user);
|
||||
// redis缓存
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
return i > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -308,6 +322,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
// 新增用户与岗位管理
|
||||
insertUserPost(user);
|
||||
userMapper.updateUser(user);
|
||||
// redis缓存
|
||||
user=userMapper.selectUserById(userId);
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
return AjaxResult.success("更新用户成功");
|
||||
}
|
||||
|
||||
@@ -332,7 +349,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
*/
|
||||
@Override
|
||||
public int updateUserStatus(SysUser user) {
|
||||
return userMapper.updateUser(user);
|
||||
int i = userMapper.updateUser(user);
|
||||
// redis缓存
|
||||
// redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,7 +363,11 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
*/
|
||||
@Override
|
||||
public int updateUserProfile(SysUser user) {
|
||||
return userMapper.updateUser(user);
|
||||
int i = userMapper.updateUser(user);
|
||||
// redis缓存
|
||||
user=userMapper.selectUserById(user.getUserId());
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -366,7 +390,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
*/
|
||||
@Override
|
||||
public int resetPwd(SysUser user) {
|
||||
return userMapper.updateUser(user);
|
||||
int i = userMapper.updateUser(user);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -440,10 +465,20 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
@Transactional
|
||||
public int deleteUserById(Long userId) {
|
||||
// 删除用户与角色关联
|
||||
userRoleMapper.deleteUserRoleByUserId(userId);
|
||||
// userRoleMapper.deleteUserRoleByUserId(userId);
|
||||
// 删除用户与岗位表
|
||||
userPostMapper.deleteUserPostByUserId(userId);
|
||||
return userMapper.deleteUserById(userId);
|
||||
// userPostMapper.deleteUserPostByUserId(userId);
|
||||
// 与案件有关的人员不能删除
|
||||
List<Long> userIds = new ArrayList<>();
|
||||
userIds.add(userId);
|
||||
List<Long> caseIds= msCaseApplicationMapper.countCasePerson(userIds);
|
||||
if(CollectionUtil.isNotEmpty(caseIds)){
|
||||
throw new ServiceException("该人员已参与案件,不能删除");
|
||||
}
|
||||
int i = userMapper.deleteUserById(userId);
|
||||
// 删除缓存
|
||||
redisCache.deleteObject(CacheConstants.USER_KEY+userId);
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -455,17 +490,30 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteUserByIds(Long[] userIds) {
|
||||
// 校验是否与案件关联
|
||||
if(userIds==null || userIds.length==0){
|
||||
throw new ServiceException("请选择删除的用户");
|
||||
}
|
||||
List<Long> caseIds= msCaseApplicationMapper.countCasePerson(new ArrayList<>(Arrays.asList(userIds)));
|
||||
if(CollectionUtil.isNotEmpty(caseIds)){
|
||||
throw new ServiceException("删除人员中存在与案件关联的人员,不能删除");
|
||||
}
|
||||
for (Long userId : userIds) {
|
||||
checkUserAllowed(new SysUser(userId));
|
||||
checkUserDataScope(userId);
|
||||
}
|
||||
// 删除用户与角色关联
|
||||
userRoleMapper.deleteUserRole(userIds);
|
||||
// userRoleMapper.deleteUserRole(userIds);
|
||||
// 删除用户与岗位关联
|
||||
userPostMapper.deleteUserPost(userIds);
|
||||
// userPostMapper.deleteUserPost(userIds);
|
||||
// 删除用户部门关联
|
||||
userDeptMapper.deleteUserByIds(userIds);
|
||||
return userMapper.deleteUserByIds(userIds);
|
||||
// userDeptMapper.deleteUserByIds(userIds);
|
||||
int i = userMapper.deleteUserByIds(userIds);
|
||||
for (Long userId : userIds) {
|
||||
// 删除缓存
|
||||
redisCache.deleteObject(CacheConstants.USER_KEY+userId);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,6 +543,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
user.setPassword(SecurityUtils.encryptPassword(password));
|
||||
user.setCreateBy(operName);
|
||||
userMapper.insertUser(user);
|
||||
// redis缓存
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功");
|
||||
} else if (isUpdateSupport) {
|
||||
@@ -504,6 +554,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
user.setUserId(u.getUserId());
|
||||
user.setUpdateBy(operName);
|
||||
userMapper.updateUser(user);
|
||||
// redis缓存
|
||||
user=userMapper.selectUserById(user.getUserId());
|
||||
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功");
|
||||
} else {
|
||||
|
||||
+12
@@ -31,6 +31,10 @@ public class IdentityAuthentication extends BaseEntity {
|
||||
* 短信验证码
|
||||
*/
|
||||
private String VerifyCode;
|
||||
/**
|
||||
* email验证码
|
||||
*/
|
||||
private String emailVerifyCode;
|
||||
private String passWord;
|
||||
private String phone;
|
||||
/**
|
||||
@@ -47,6 +51,14 @@ public class IdentityAuthentication extends BaseEntity {
|
||||
/** 认证状态 */
|
||||
private Integer certificationStatus;
|
||||
|
||||
public String getEmailVerifyCode() {
|
||||
return emailVerifyCode;
|
||||
}
|
||||
|
||||
public void setEmailVerifyCode(String emailVerifyCode) {
|
||||
this.emailVerifyCode = emailVerifyCode;
|
||||
}
|
||||
|
||||
public Integer getCertificationStatus() {
|
||||
return certificationStatus;
|
||||
}
|
||||
|
||||
+14
-1
@@ -1,11 +1,14 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SendMailRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -40,6 +43,16 @@ public class SendMailRecord extends BaseEntity {
|
||||
private Integer sendStatus;
|
||||
|
||||
|
||||
/** 附件id */
|
||||
private String fileIds;
|
||||
|
||||
/** 邮件主题 */
|
||||
private String mailSubject;
|
||||
|
||||
/** 邮件发件人地址 */
|
||||
private String mailFromAddress;
|
||||
private List<MsCaseAttach> caseAttachList;
|
||||
|
||||
|
||||
public Integer getSendStatus() {
|
||||
return sendStatus;
|
||||
|
||||
+29
-5
@@ -2,11 +2,13 @@ package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsTemplateParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@@ -16,6 +18,10 @@ public class SmsSendRecord extends BaseEntity {
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 短信模板主键id
|
||||
*/
|
||||
private Long msSmsTemplateId;
|
||||
/**
|
||||
* 案件申请id
|
||||
*/
|
||||
@@ -33,21 +39,39 @@ public class SmsSendRecord extends BaseEntity {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date sendTime;
|
||||
/**
|
||||
* 发送内容
|
||||
*/
|
||||
private String sendContent;
|
||||
|
||||
/**
|
||||
* 发送状态
|
||||
*/
|
||||
private Integer sendStatus;
|
||||
/**
|
||||
* 短信sid,发送的唯一标识
|
||||
*/
|
||||
private String sid;
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 短信内容
|
||||
*/
|
||||
private String sendContent;
|
||||
/**
|
||||
* 腾讯云模板id
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
private String templateContent;
|
||||
private List<MsSmsTemplateParam> templateParams;
|
||||
|
||||
public SmsSendRecord(Long caseId, String caseNum, String phone, Date sendTime, String sendContent) {
|
||||
public SmsSendRecord(Long caseId, String caseNum, String phone, Date sendTime, String sendContent,String sid) {
|
||||
this.caseId = caseId;
|
||||
this.caseNum = caseNum;
|
||||
this.phone = phone;
|
||||
this.sendTime = sendTime;
|
||||
this.sendContent = sendContent;
|
||||
this.sid = sid;
|
||||
}
|
||||
}
|
||||
|
||||
+100
-117
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.entity.mscase;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@@ -7,161 +8,143 @@ import lombok.ToString;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import java.util.Date;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Table(name = "ms_case_affiliate")
|
||||
public class MsCaseAffiliate {
|
||||
public class MsCaseAffiliate{
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 案件主表id,案件申请表主键
|
||||
*/
|
||||
@Id
|
||||
@Column(name = "case_appli_id")
|
||||
private Long caseAppliId;
|
||||
/**
|
||||
* 是否机构申请,0-自然人,1-申请机构,默认0
|
||||
* 用户id,用户表user_id关联
|
||||
*/
|
||||
@Column(name = "organize_flag")
|
||||
private Integer organizeFlag;
|
||||
|
||||
|
||||
@Column(name = "user_id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 申请人id
|
||||
* 申请机构id,和部门表id关联
|
||||
*/
|
||||
@Column(name = "application_id")
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 申请人名称
|
||||
*/
|
||||
@Column(name = "application_name")
|
||||
private String applicationName;
|
||||
@Column(name = "applicant_dept_id")
|
||||
private Long applicantDeptId;
|
||||
|
||||
/**
|
||||
* 代码(统一社会信用代码或者身份证号)
|
||||
*/
|
||||
@Column(name = "code")
|
||||
@Transient
|
||||
private String code;
|
||||
/**
|
||||
* 申请人联系电话
|
||||
* 用户名
|
||||
*/
|
||||
@Column(name = "application_phone")
|
||||
private String applicationPhone;
|
||||
/**
|
||||
* 申请人邮箱
|
||||
*/
|
||||
@Column(name = "application_email")
|
||||
private String applicationEmail;
|
||||
@Transient
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 法定代表人
|
||||
*/
|
||||
@Column(name = "comp_legal_person")
|
||||
@Transient
|
||||
private String compLegalPerson;
|
||||
/**
|
||||
* 角色类别,1-申请操作人/申请人,2-申请人代理人,3-被申请人操作人/被申请人,4-被申请人代理人
|
||||
*/
|
||||
@Column(name = "role_type")
|
||||
private Integer roleType=1;
|
||||
/**
|
||||
* 组别
|
||||
*/
|
||||
@Column(name = "group_order")
|
||||
private Integer groupOrder;
|
||||
/**
|
||||
* 是否操作人,0-否,1-是
|
||||
*/
|
||||
@Column(name = "operator_flag")
|
||||
private Integer operatorFlag=1;
|
||||
/**
|
||||
* 是否机构申请,0-自然人,1-申请机构,默认0
|
||||
*/
|
||||
@Column(name = "organize_flag")
|
||||
private Integer organizeFlag=0;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@Transient
|
||||
private String phone;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Transient
|
||||
private String email;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Transient
|
||||
private String name;
|
||||
/**
|
||||
* 住所
|
||||
*/
|
||||
@Transient
|
||||
private String home;
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@Transient
|
||||
private String address;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@Transient
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 申请人住所
|
||||
* '身份类别,0-身份证,1-护照,默认0'
|
||||
*/
|
||||
@Column(name = "applicant_home")
|
||||
private String applicantHome;
|
||||
|
||||
@Transient
|
||||
private Integer idType;
|
||||
/**
|
||||
* 申请人联系地址
|
||||
* 国籍,0-境内,1-境外,默认0
|
||||
*/
|
||||
@Column(name = "applicant_address")
|
||||
private String applicantAddress;
|
||||
|
||||
@Transient
|
||||
private Integer nationality;
|
||||
/**
|
||||
* 委托代理人姓名
|
||||
* 生日
|
||||
*/
|
||||
@Column(name = "name_agent")
|
||||
private String nameAgent;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
@Transient
|
||||
private Date birth;
|
||||
/**
|
||||
* 代理人联系电话
|
||||
* 性别,0-男,1-女
|
||||
*/
|
||||
@Column(name = "contact_telphone_agent")
|
||||
private String contactTelphoneAgent;
|
||||
|
||||
/**
|
||||
* 代理人邮箱
|
||||
*/
|
||||
@Column(name = "agent_email")
|
||||
private String agentEmail;
|
||||
|
||||
/**
|
||||
* 申请人快递单号
|
||||
*/
|
||||
@Column(name = "applicant_track_num")
|
||||
private String applicantTrackNum;
|
||||
|
||||
@Transient
|
||||
private String sex;
|
||||
/**
|
||||
* 被申请人姓名
|
||||
*/
|
||||
@Column(name = "respondent_name")
|
||||
private String respondentName;
|
||||
@Transient
|
||||
private String resName;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
@Transient
|
||||
private String roleName;
|
||||
/**
|
||||
* 申请机构名称
|
||||
*/
|
||||
@Transient
|
||||
private String applicantOrgName;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
@Transient
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 被申请人身份证号
|
||||
*/
|
||||
@Column(name = "respondent_identity_num")
|
||||
private String respondentIdentityNum;
|
||||
/**
|
||||
* 被申请人联系电话
|
||||
*/
|
||||
@Column(name = "respondent_phone")
|
||||
private String respondentPhone;
|
||||
|
||||
/**
|
||||
* 被申请人性别(0=男,女=1)
|
||||
*/
|
||||
@Column(name = "respondent_sex")
|
||||
private String respondentSex;
|
||||
|
||||
/**
|
||||
* 被申请人出生年月日
|
||||
*/
|
||||
@Column(name = "respondent_birth")
|
||||
private Date respondentBirth;
|
||||
|
||||
/**
|
||||
* 被申请人申请人住所
|
||||
*/
|
||||
@Column(name = "respondent_home")
|
||||
private String respondentHome;
|
||||
|
||||
/**
|
||||
* 被申请人邮箱
|
||||
*/
|
||||
@Column(name = "respondent_email")
|
||||
private String respondentEmail;
|
||||
|
||||
/**
|
||||
* 被申请人快递单号
|
||||
*/
|
||||
@Column(name = "respondent_track_num")
|
||||
private String respondentTrackNum;
|
||||
|
||||
/**
|
||||
* 申请人是否签收
|
||||
*/
|
||||
@Column(name = "is_sign_apply")
|
||||
private Integer isSignApply;
|
||||
/**
|
||||
* 被申请人是否签收
|
||||
*/
|
||||
@Column(name = "is_sign_respon")
|
||||
private Integer isSignRespon;
|
||||
/**
|
||||
* 身份类别,0-身份证,1-护照,默认0
|
||||
*/
|
||||
@Column(name = "id_type")
|
||||
private Integer idType;
|
||||
/**
|
||||
* 国籍,0-国内,1-国外,默认0
|
||||
*/
|
||||
@Column(name = "nationality")
|
||||
private Integer nationality;
|
||||
}
|
||||
+19
-4
@@ -6,10 +6,7 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -209,4 +206,22 @@ public class MsCaseApplication {
|
||||
@Column(name = "is_reconci")
|
||||
private Integer isReconci;
|
||||
|
||||
/**
|
||||
* 案件来源,YC-乙巢,空字符串-北明
|
||||
*/
|
||||
@Column(name = "case_source")
|
||||
private String caseSource;
|
||||
/**
|
||||
* 是否需要用印,1-需要
|
||||
*/
|
||||
@Column(name = "seal_flag")
|
||||
private Integer sealFlag;
|
||||
/**
|
||||
* 拒绝原因
|
||||
*/
|
||||
@Transient
|
||||
private String rejectReason;
|
||||
@Transient
|
||||
private Integer organizeFlag=0;
|
||||
|
||||
}
|
||||
+10
@@ -77,4 +77,14 @@ public class MsCaseAttach {
|
||||
*/
|
||||
@Column(name = "only_office_file_id")
|
||||
private String onlyOfficeFileId;
|
||||
/**
|
||||
* 对接其它系统返回的附件id
|
||||
*/
|
||||
@Column(name = "other_sys_file_id")
|
||||
private String otherSysFileId;
|
||||
/**
|
||||
* 附件后缀
|
||||
*/
|
||||
@Column(name = "suffix")
|
||||
private String suffix;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Classname MsCaseAffiliateList
|
||||
* @Description TODO
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/27 16:08
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
public class MsCaseAffiliateBase {
|
||||
/**
|
||||
* 申请人/操作人
|
||||
*/
|
||||
private MsCaseAffiliate applicant;
|
||||
/**
|
||||
* 申请人代理人
|
||||
*/
|
||||
private MsCaseAffiliate applicantAgent;
|
||||
/**
|
||||
* 被申请人/操作人
|
||||
*/
|
||||
private MsCaseAffiliate res;
|
||||
/**
|
||||
* 被申请人代理人
|
||||
*/
|
||||
private MsCaseAffiliate resAgent;
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
/**
|
||||
* @Classname MsCaseAffiliateParent
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/27 16:05
|
||||
* @Created wangqiong
|
||||
*/
|
||||
public class MsCaseAffiliateParent extends MsCaseAffiliateVO {
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Classname MsCaseAffiliateVO
|
||||
* @Description TODO
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/22 11:46
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Data
|
||||
public class MsCaseAffiliateVO {
|
||||
/**
|
||||
* 申请人/操作人
|
||||
*/
|
||||
private List<MsCaseAffiliateBase> applicant;
|
||||
|
||||
/**
|
||||
* 被申请人/操作人
|
||||
*/
|
||||
private List<MsCaseAffiliateBase> res;
|
||||
|
||||
}
|
||||
+25
-1
@@ -107,5 +107,29 @@ public class MsCaseApplicationReq {
|
||||
* 代理人电话
|
||||
*/
|
||||
private String contactTelphoneAgent;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String resEmail;
|
||||
/**
|
||||
* 申请人邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 角色类别
|
||||
*/
|
||||
private Integer roleType;
|
||||
private Long userId;
|
||||
/**
|
||||
* 案件id
|
||||
*/
|
||||
private Long caseId;
|
||||
/**
|
||||
* 是否需要用印,0-不需要,1-需要
|
||||
*/
|
||||
private Integer sealFlag=1;
|
||||
}
|
||||
+33
-2
@@ -1,7 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -30,11 +29,15 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
||||
* 被申请人姓名
|
||||
*/
|
||||
private String respondentName;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String creatBy;
|
||||
|
||||
/**
|
||||
* 案件相关人员
|
||||
*/
|
||||
private MsCaseAffiliate affiliate;
|
||||
private MsCaseAffiliateVO affiliate;
|
||||
/**
|
||||
* 是否压缩包导入,默认false
|
||||
*/
|
||||
@@ -84,5 +87,33 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private Date endTime;
|
||||
/**
|
||||
* 是否申请操作人签名按钮权限,0-否,1-是
|
||||
*/
|
||||
private Integer appOperatorFlag;
|
||||
/**
|
||||
* 是否被申请操作人签名按钮权限,0-否,1-是
|
||||
*/
|
||||
private Integer resOperatorFlag;
|
||||
/**
|
||||
* 是否财务,部门长,秘书,0-否,1-是
|
||||
*/
|
||||
private Integer otherFlag;
|
||||
/**
|
||||
* 第三方代理人,0-否,1-是
|
||||
*/
|
||||
private Integer agentFlag;
|
||||
/**
|
||||
* 调解员,0-否,1-是
|
||||
*/
|
||||
private Integer mediatorFlag;
|
||||
/**
|
||||
* 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
|
||||
*/
|
||||
private Integer mediationFileFlag=0;
|
||||
/**
|
||||
* 是否申请人被申请人签收按钮权限,0-否,1-是
|
||||
*/
|
||||
private Integer signFlag=0;
|
||||
|
||||
}
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 北明接口案件附件信息入参
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MsCaseFileInfo {
|
||||
|
||||
/**
|
||||
* 第三方文件唯一标识
|
||||
*/
|
||||
private String abutmentId;
|
||||
/**
|
||||
* 第三方平台案件唯一标识
|
||||
*/
|
||||
private String abutmentCaseId;
|
||||
/**
|
||||
* 第一级文件类型
|
||||
*/
|
||||
private String documentSubject;
|
||||
/**
|
||||
* 第二级文件类型
|
||||
*/
|
||||
private String documentType;
|
||||
/**
|
||||
* 所属人类型(可不传)
|
||||
*/
|
||||
private String ownerType;
|
||||
/**
|
||||
* 文件所属人第三方平台对应的人员唯一标识(可不传)
|
||||
*/
|
||||
private String ownerId;
|
||||
/**
|
||||
* 文件所属人名称(可不传)
|
||||
*/
|
||||
private String ownerName;
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String fileName;
|
||||
/**
|
||||
* 一站式平台返回的文件ID
|
||||
*/
|
||||
private String fileId;
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 北明接口案件状态入参
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MsCaseStatusInfo {
|
||||
/**
|
||||
* 案号
|
||||
* 案件状态编码
|
||||
* 结案说明
|
||||
*/
|
||||
private String caseNo;
|
||||
|
||||
/**
|
||||
* 案件状态编码
|
||||
*/
|
||||
private String statusCode;
|
||||
|
||||
/**
|
||||
* 结案说明
|
||||
*/
|
||||
private String caseClosureExplanation;
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.shortmessage;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MeetingInfoVO {
|
||||
/**
|
||||
* 案件Id
|
||||
*/
|
||||
private Long caseId;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 房间Id
|
||||
*/
|
||||
private String roomId;
|
||||
|
||||
/**
|
||||
* 系统类型
|
||||
*/
|
||||
private String systemType;
|
||||
/**
|
||||
* 登录认证令牌
|
||||
*/
|
||||
private String token;
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.shortmessage;
|
||||
|
||||
import com.ruoyi.system.domain.entity.sms.MsSmsTemplateParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ReSendMessageVO {
|
||||
/**
|
||||
* 短信模版Id
|
||||
*/
|
||||
private String templateId;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 短信id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 短信模版参数值
|
||||
*/
|
||||
private List<MsSmsTemplateParam> templateParams;
|
||||
|
||||
}
|
||||
+23
@@ -1,7 +1,30 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper.mscase;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MsCaseAffiliateMapper extends Mapper<MsCaseAffiliate> {
|
||||
/**
|
||||
* 查询申请人被申请人
|
||||
* @param caseIds
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseAffiliate> listGroupConcat(@Param("caseIds") List<Long> caseIds);
|
||||
|
||||
/**
|
||||
* 根据案件id查询案件人员
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseAffiliate> selectByCaseId(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 根据案件id查询相关人员及角色
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseAffiliate> selectUserRoleByCaseIds(@Param("caseIds") List<Long> caseIds);
|
||||
}
|
||||
+15
-153
@@ -29,125 +29,14 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
" </script>")
|
||||
Integer selectCaseNumLike(@Param("caseNum") String caseNum, @Param("length") int length);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 案件列表查询
|
||||
* @param req
|
||||
* @param caseStatusNames
|
||||
* @param caseFlowIds
|
||||
* @return
|
||||
*/
|
||||
@Select("<script> select t.* from (select c.media_result mediaResult,c.id,c.room_id roomId,c.mediation_method mediationMethod," +
|
||||
" CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
|
||||
+
|
||||
"0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
|
||||
"a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
|
||||
"c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_application c " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> "
|
||||
+
|
||||
"<if test=\"req.mediatorId != null \">" +
|
||||
" AND c.mediator_id = #{req.mediatorId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0 '> and (a.application_id in" +
|
||||
"<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
|
||||
"#{organId}" +
|
||||
"</foreach> or a.contact_telphone_agent=#{req.contactTelphoneAgent} )" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c.case_status_name in" +
|
||||
"<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
|
||||
"#{caseStatus}" +
|
||||
"</foreach>" +
|
||||
"</if> " +
|
||||
"<if test=\"req.batchNumber != null and req.batchNumber != ''\">" +
|
||||
" AND c.batch_number = #{req.batchNumber} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseFlowId != null \">" +
|
||||
" AND c.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.mediationMethod != null \">" +
|
||||
" AND c.mediation_method = #{req.mediationMethod} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.caseNum != null and req.caseNum != ''\">" +
|
||||
" AND c.case_num like concat('%', #{req.caseNum}, '%') "+
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.startTime != null and req.startTime != ''\">" +
|
||||
"and c.create_time >= #{req.startTime}</if>" +
|
||||
"<if test=\"req.endTime != null and req.endTime != ''\">" +
|
||||
"and c.create_time <= #{req.endTime}</if>" +
|
||||
" </where> " +
|
||||
"union select c.media_result mediaResult,c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
|
||||
+
|
||||
" CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
|
||||
+
|
||||
"1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
|
||||
"a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
|
||||
"c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
|
||||
"join ms_case_application c on r.case_appli_id=c.id " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> r.create_by=#{req.userName} and c.id not in (" +
|
||||
"select c1.id from ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
|
||||
+
|
||||
"<if test=\"req.mediatorId != null \">" +
|
||||
" AND c1.mediator_id = #{req.mediatorId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.mediationMethod != null \">" +
|
||||
" AND c1.mediation_method = #{req.mediationMethod} " +
|
||||
"</if> "
|
||||
+
|
||||
|
||||
"<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0 '> and (a.application_id in" +
|
||||
"<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
|
||||
"#{organId}" +
|
||||
"</foreach> or a.contact_telphone_agent=#{req.contactTelphoneAgent} )" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c1.case_status_name in" +
|
||||
"<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
|
||||
"#{caseStatus}" +
|
||||
"</foreach>" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.caseFlowId != null \">" +
|
||||
" AND c1.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseNum != null and req.caseNum != ''\">" +
|
||||
" AND c1.case_num like concat('%', #{req.caseNum}, '%') " +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.startTime != null and req.startTime != ''\">" +
|
||||
"and c1.create_time >= #{req.startTime}</if>" +
|
||||
"<if test=\"req.endTime != null and req.endTime != ''\">" +
|
||||
"and c1.create_time <= #{req.endTime}</if>" +
|
||||
" </where> " +
|
||||
" ) "
|
||||
+
|
||||
"<if test=\"req.caseFlowId != null \">" +
|
||||
" AND c.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseNum != null and req.caseNum != ''\">" +
|
||||
" AND c.case_num like concat('%', #{req.caseNum}, '%')" +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
"</if> "
|
||||
+
|
||||
|
||||
"<if test=\"req.startTime != null and req.startTime != ''\">" +
|
||||
"and c.create_time >= #{req.startTime}</if>" +
|
||||
"<if test=\"req.endTime != null and req.endTime != ''\">" +
|
||||
"and c.create_time <= #{req.endTime}</if>" +
|
||||
" ) t order by t.createTime desc,t.caseNum desc" +
|
||||
" </script>")
|
||||
List<MsCaseApplicationVO> list(@Param("req")MsCaseApplicationReq req, @Param("caseStatusNames") List<String> caseStatusNames);
|
||||
List<MsCaseApplicationVO> list(@Param("req")MsCaseApplicationReq req, @Param("caseFlowIds") List<Integer> caseFlowIds , @Param("roleIds") List<Long> roleIds );
|
||||
|
||||
/**
|
||||
* 查询调解员列表
|
||||
@@ -162,46 +51,19 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
@Select("select max(room_id) maxRoomId from ms_reserved_conference")
|
||||
Long selectMaxRoomId();
|
||||
|
||||
List<CaseToDoCount> todoCount(@Param("req")MsCaseApplicationReq req, @Param("caseFlowIds") List<Integer> caseFlowIds, @Param("roleIds") List<Long> roleIds);
|
||||
|
||||
/**
|
||||
* 待办数量
|
||||
* @param o
|
||||
* 根据用户id查询是否和案件有关
|
||||
* @param userIds
|
||||
* @return
|
||||
*/
|
||||
@Select(" <script> SELECT c.case_flow_id caseFlowId,count(c.id) caseCount " +
|
||||
"FROM ms_case_application c " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> " +
|
||||
"<if test=\"req.mediatorId != null \">" +
|
||||
" AND c.mediator_id = #{req.mediatorId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0 '> and (a.application_id in" +
|
||||
"<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
|
||||
"#{organId}" +
|
||||
"</foreach> or a.contact_telphone_agent=#{req.contactTelphoneAgent} )" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c.case_status_name in" +
|
||||
"<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
|
||||
"#{caseStatus}" +
|
||||
"</foreach>" +
|
||||
"</if> " +
|
||||
"<if test=\"req.batchNumber != null and req.batchNumber != ''\">" +
|
||||
" AND c.batch_number = #{req.batchNumber} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseFlowId != null \">" +
|
||||
" AND c.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.mediationMethod != null \">" +
|
||||
" AND c.mediation_method = #{req.mediationMethod} " +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
"</if> "
|
||||
+
|
||||
" </where> " +
|
||||
"group by c.case_flow_id,c.case_status_name"+
|
||||
" </script>"
|
||||
)
|
||||
List<CaseToDoCount> todoCount(@Param("req")MsCaseApplicationReq req, @Param("caseStatusNames") List<String> caseStatusNames);
|
||||
List<Long> countCasePerson(@Param("userIds") List<Long> userIds);
|
||||
|
||||
/**
|
||||
* 查询部门是否与案件有关
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
List<Long> selectCaseByDeptId(@Param("deptId") Long deptId);
|
||||
}
|
||||
+8
@@ -25,6 +25,7 @@ public interface MsCaseAttachMapper {
|
||||
int deleteByFileIds(@Param("ids") List<Integer> fileIds);
|
||||
|
||||
List<MsCaseAttach> listCaseAttachByCaseIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType);
|
||||
List<MsCaseAttach> listCaseAttachByCaseIdAndTypes(@Param("caseAppliId")Long caseAppliId,@Param("annexTypes") List<Integer> annexTypes);
|
||||
|
||||
MsCaseAttach queryAnnexById(@Param("annexId") Long annexId);
|
||||
|
||||
@@ -49,4 +50,11 @@ public interface MsCaseAttachMapper {
|
||||
* @return
|
||||
*/
|
||||
int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId);
|
||||
|
||||
/**
|
||||
* 根据ids查询
|
||||
* @param fileIds
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseAttach> selectByIds(@Param("ids") List<String> fileIds);
|
||||
}
|
||||
|
||||
+25
-3
@@ -5,10 +5,32 @@ import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||
import java.util.List;
|
||||
|
||||
public interface SendMailRecordMapper {
|
||||
/**
|
||||
* 新增发送邮件记录
|
||||
*
|
||||
* @param sendMailRecord 发送邮件记录
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
int saveSendMailRecord(SendMailRecord sendMailRecord);
|
||||
|
||||
/**
|
||||
* 查询发送邮件记录
|
||||
*
|
||||
* @param sendMailRecord 发送邮件记录
|
||||
* @return 结果
|
||||
*/
|
||||
List<SendMailRecord> selectSendMailRecord(SendMailRecord sendMailRecord);
|
||||
/**
|
||||
* 修改发送邮件记录
|
||||
*
|
||||
* @param sendMailRecord 发送邮件记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSendMailRecord(SendMailRecord sendMailRecord);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据id查询发送邮件记录
|
||||
* @param id
|
||||
*/
|
||||
SendMailRecord querySendMailRecordById(Long id);
|
||||
}
|
||||
|
||||
+9
@@ -19,4 +19,13 @@ public interface SmsRecordMapper {
|
||||
* @return
|
||||
*/
|
||||
int batchSaveSmsSendRecord(@Param("list") List<SmsSendRecord> smsSendRecordList);
|
||||
SmsSendRecord selectBySId(@Param("sid") String sid);
|
||||
void updateStatus (SmsSendRecord smsSendRecord);
|
||||
|
||||
/**
|
||||
* 通过id查询短信发送记录
|
||||
*/
|
||||
SmsSendRecord selectById(@Param("id") Long id);
|
||||
|
||||
void update(SmsSendRecord smsSendRecord);
|
||||
}
|
||||
|
||||
+18
-12
@@ -47,6 +47,7 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.google.common.io.Files.getFileExtension;
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
|
||||
@Service
|
||||
@@ -256,6 +257,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttach.setSuffix(getFileExtension(savePath));
|
||||
int i1 = msCaseAttachMapper.save(caseAttach);
|
||||
if (i1 > 0) {
|
||||
//将附件id保存到公章管理表里
|
||||
@@ -324,6 +326,8 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
if (identifyName == null) {
|
||||
AjaxResult.error("请检查参数是否完整");
|
||||
}
|
||||
// 查询是否存在机构
|
||||
SysDept sysDept = sysDeptMapper.selectDeptByName(identifyName);
|
||||
Integer identifyType = deptIdentify.getIdentifyType();
|
||||
if (identifyType == null) {
|
||||
deptIdentify.setIdentifyType(1); // 设置机构默认为仲裁机构
|
||||
@@ -331,11 +335,19 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
deptIdentify.setIdentifyStatus(0); //设置认证状态默认为未认证
|
||||
deptIdentify.setIsUse(0); //设置机构默认为未启用
|
||||
//将机构名称保存到部门表里
|
||||
SysDept sysDept = new SysDept();
|
||||
sysDept.setDeptName(identifyName);
|
||||
sysDept.setParentId(0L);
|
||||
sysDept.setDeptType(1);
|
||||
int i1 = sysDeptMapper.insertDept(sysDept);
|
||||
int i1=0;
|
||||
if(sysDept == null) {
|
||||
sysDept = new SysDept();
|
||||
sysDept.setParentId(0L);
|
||||
sysDept.setDeptName(identifyName);
|
||||
sysDept.setDeptType(1);
|
||||
i1 = sysDeptMapper.insertDept(sysDept);
|
||||
}
|
||||
else {
|
||||
sysDept.setDeptType(1);
|
||||
sysDeptMapper.updateDept(sysDept);
|
||||
}
|
||||
|
||||
if (i1 > 0) {
|
||||
/* //将经办人信息存入到用户表里
|
||||
Long deptId = sysDept.getDeptId();
|
||||
@@ -658,11 +670,5 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
return ajax;
|
||||
}
|
||||
|
||||
private String getFileExtension(String fileName) {
|
||||
int lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex > 0 && lastDotIndex < fileName.length() - 1) {
|
||||
return fileName.substring(lastDotIndex + 1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -19,10 +19,10 @@ public interface IdentityAuthenticationService {
|
||||
|
||||
/**
|
||||
* 获取Eidtoken
|
||||
*
|
||||
* isPC 是否PC端
|
||||
* @return
|
||||
*/
|
||||
JSONObject selectIdentityAuthenticaEIDtoken();
|
||||
JSONObject selectIdentityAuthEIDToken(boolean isPC);
|
||||
|
||||
/**
|
||||
* 小程序人脸核身后查询身份认证结果
|
||||
@@ -31,4 +31,10 @@ public interface IdentityAuthenticationService {
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
|
||||
|
||||
/**
|
||||
* H5轮询获取EIDtoken状态
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectPCEIDtokenStatus(String eidToken);
|
||||
}
|
||||
|
||||
+8
@@ -14,4 +14,12 @@ public interface WeChatUserService {
|
||||
|
||||
|
||||
AjaxResult registerUser(IdentityAuthentication ientityAuthentication);
|
||||
|
||||
/**
|
||||
* 获取邮箱验证码
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
|
||||
AjaxResult sendEmailCode(String email);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user