Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c0f59f731 | ||
|
|
dc70ecbce7 | ||
|
|
f6ac03bca3 | ||
|
|
cde1d5eb81 | ||
|
|
5abeaf5224 | ||
|
|
9e8724c525 | ||
|
|
8e8b402ced | ||
|
|
a08092eb37 | ||
|
|
32846984c0 | ||
|
|
5a264e2ef0 | ||
|
|
9b8b004edf | ||
|
|
ea354f0967 | ||
|
|
3f55cee7e3 | ||
|
|
521f1e24b9 | ||
|
|
0bf88192cf | ||
|
|
b6d27fa7e1 | ||
|
|
b75a892a50 | ||
|
|
f1a5037af3 | ||
|
|
8f9f16254a | ||
|
|
6acf5e3bcc | ||
|
|
e35ffedea5 | ||
|
|
fbe9359595 | ||
|
|
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 | ||
|
|
c48d18b13f | ||
|
|
b0f71c6e3a | ||
|
|
653f814372 | ||
|
|
7fef478c00 | ||
|
|
a7f1f00cf9 | ||
|
|
c54981e584 | ||
|
|
cf42c93c6d | ||
|
|
c596c5654f | ||
|
|
bf343b7e5a | ||
|
|
de0d26882e | ||
|
|
7977c89ab4 | ||
|
|
35f0663fb3 | ||
|
|
1256a9dd50 | ||
|
|
249b11ee61 | ||
|
|
a64aa29a4e | ||
|
|
4502b8128f | ||
|
|
9f52637abd | ||
|
|
8a7cf059fd | ||
|
|
21e86a4c47 | ||
|
|
a9bf9379ba | ||
|
|
983edd6dd9 | ||
|
|
fb36d28f56 | ||
|
|
3e00799963 | ||
|
|
dd776e6fab | ||
|
|
4875ac4b70 | ||
|
|
1cece4a0d1 | ||
|
|
b22b49763c | ||
|
|
3c1eb3ba55 | ||
|
|
abeca57c83 | ||
|
|
0fc6595fb3 | ||
|
|
d7d48a3ff3 | ||
|
|
b4e54bd501 | ||
|
|
92c619f123 | ||
|
|
6ce906e04c | ||
|
|
2b5765d935 | ||
|
|
619734469d | ||
|
|
9f94b61bfb | ||
|
|
13422f5c2d | ||
|
|
6f8879c5d1 | ||
|
|
609e0470fb | ||
|
|
40666adb10 | ||
|
|
df108c15eb | ||
|
|
658ce02b8f | ||
|
|
8e235b6135 | ||
|
|
4b615599b4 | ||
|
|
c042d9e611 | ||
|
|
6be935061c | ||
|
|
327aa07c21 | ||
|
|
bf0a834577 | ||
|
|
2afcbb6f73 | ||
|
|
2696ac1156 | ||
|
|
80fd24e1c3 | ||
|
|
ac0278a1c5 | ||
|
|
c927559270 | ||
|
|
9c36ade13f | ||
|
|
07a1bad4a1 | ||
|
|
dc95793394 | ||
|
|
134c5b880a | ||
|
|
b3398e9828 | ||
|
|
988e763abd | ||
|
|
e02dc53776 | ||
|
|
dc0826ddad | ||
|
|
c97c5965f9 | ||
|
|
1a3848e339 | ||
|
|
beb7989c5e | ||
|
|
49c99ecb5e | ||
|
|
f87943e9f5 | ||
|
|
0579a94658 | ||
|
|
4a2155f7eb | ||
|
|
badbdf8c13 | ||
|
|
694a7667f4 | ||
|
|
1ddfff3e51 | ||
|
|
02575e8bfc | ||
|
|
ba28986510 | ||
|
|
e2bf519221 | ||
|
|
ef5f37d83a | ||
|
|
dc990ef8bb | ||
|
|
ce307a7912 | ||
|
|
86b8305dc2 | ||
|
|
da4a49956c | ||
|
|
7ad9bdd869 | ||
|
|
766f9e9fb7 | ||
|
|
d8cb453153 | ||
|
|
9fe2684b33 | ||
|
|
5ad63c8905 | ||
|
|
ea727fc760 | ||
|
|
657e748cb3 | ||
|
|
d69913799c | ||
|
|
e00d61949b | ||
|
|
ba20a9d807 | ||
|
|
48aa6625f4 | ||
|
|
1c90f35d47 | ||
|
|
dc26290e28 | ||
|
|
8d61792ec6 | ||
|
|
66131d6b1a | ||
|
|
4a7194c9ea | ||
|
|
0d246d5917 | ||
|
|
657df6d9a5 | ||
|
|
aa8522293f | ||
|
|
5e4fe7df97 | ||
|
|
6ae4f4bec7 | ||
|
|
7377980330 | ||
|
|
854f98c560 | ||
|
|
8e54eba40a | ||
|
|
f595820ec4 | ||
|
|
5c0439f1f0 | ||
|
|
1fc66789aa | ||
|
|
398d4a80d0 | ||
|
|
0fe491cf84 | ||
|
|
158e6ee9fd | ||
|
|
32db41e641 | ||
|
|
e67d6d2d3f | ||
|
|
e6160f71d4 | ||
|
|
a98413baba | ||
|
|
8309678cb4 | ||
|
|
0b96d4351d | ||
|
|
b8ad0dfc8c | ||
|
|
6ee2fd571a | ||
|
|
483128ca87 | ||
|
|
af4922ce3c | ||
|
|
5f6b9495b1 | ||
|
|
7b7ee0ab63 | ||
|
|
fb76ba3a21 | ||
|
|
d014a5e76b | ||
|
|
962e28c0d8 | ||
|
|
39c7bb43bd | ||
|
|
784f7c0675 | ||
|
|
54dea94f6a | ||
|
|
164642ae58 |
@@ -391,7 +391,7 @@ public class WxPayElegentTrade implements ElegentTrade {
|
|||||||
private CloseableHttpClient getWxHttpClient() {
|
private CloseableHttpClient getWxHttpClient() {
|
||||||
try {
|
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:私钥字符串)
|
// 加载商户私钥(privateKey:私钥字符串)
|
||||||
String key = FileUtil.readToStr("wxpay_private.key");
|
String key = FileUtil.readToStr("wxpay_private.key");
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -9,7 +9,8 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<artifactId>ruoyi-admin</artifactId>
|
<artifactId>mediation</artifactId>
|
||||||
|
<version>1.1.0</version>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
web服务入口
|
web服务入口
|
||||||
@@ -99,7 +100,7 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,11 +1,21 @@
|
|||||||
package com.ruoyi;
|
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.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
*
|
*
|
||||||
@@ -20,15 +30,30 @@ public class RuoYiApplication
|
|||||||
{
|
{
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(RuoYiApplication.class, args);
|
SpringApplication.run(RuoYiApplication.class, args);
|
||||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
System.out.println("(♥◠‿◠)ノ゙ 启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
" .-------. ____ __ \n" +
|
" _ _ _ _ \n" +
|
||||||
" | _ _ \\ \\ \\ / / \n" +
|
" | |_(_) __ _ ___ (_|_) ___ \n" +
|
||||||
" | ( ' ) | \\ _. / ' \n" +
|
" | __| |/ _` |/ _ \\ | | |/ _ \\\n" +
|
||||||
" |(_ o _) / _( )_ .' \n" +
|
" | |_| | (_| | (_) | | | | __/\n" +
|
||||||
" | (_,_).' __ ___(_ o _)' \n" +
|
" \\__|_|\\__,_|\\___/ _/ |_|\\___|\n" +
|
||||||
" | |\\ \\ | || |(_,_)' \n" +
|
" |__/ ");
|
||||||
" | | \\ `' /| `-' / \n" +
|
// 启动成功后,查询用户表,将用户信息存到redis
|
||||||
" | | \\ / \\ / \n" +
|
RedisCache redisCache = SpringUtils.getBean(RedisCache.class);
|
||||||
" ''-' `'-' `-..-' ");
|
SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
|
||||||
|
List<SysUser> sysUsers = userMapper.selectUserListByIds(null);
|
||||||
|
if(CollectionUtil.isNotEmpty(sysUsers)){
|
||||||
|
for (SysUser sysUser : sysUsers) {
|
||||||
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用请求处理
|
* 通用请求处理
|
||||||
*
|
*
|
||||||
@@ -116,6 +118,7 @@ public class CommonController
|
|||||||
.annexType(annexType)
|
.annexType(annexType)
|
||||||
.useId(SecurityUtils.getUserId())
|
.useId(SecurityUtils.getUserId())
|
||||||
.useAccount(SecurityUtils.getUsername())
|
.useAccount(SecurityUtils.getUsername())
|
||||||
|
.suffix(getFileExtension(path))
|
||||||
.build();
|
.build();
|
||||||
msCaseAttachMapper.save(caseAttach);
|
msCaseAttachMapper.save(caseAttach);
|
||||||
return caseAttach.getAnnexId();
|
return caseAttach.getAnnexId();
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import com.ruoyi.system.domain.vo.flow.MsCaseFlowSearchVO;
|
|||||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||||
import com.ruoyi.system.service.flow.CaseFlowService;
|
import com.ruoyi.system.service.flow.CaseFlowService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||||
|
|
||||||
@@ -28,6 +25,13 @@ public class CaseFlowController {
|
|||||||
public Object queryCaseFlowInfo(@RequestBody MsCaseFlowSearchVO caseFlowSearchVO) {
|
public Object queryCaseFlowInfo(@RequestBody MsCaseFlowSearchVO caseFlowSearchVO) {
|
||||||
return caseFlowService.queryCaseFlowInfo(caseFlowSearchVO);
|
return caseFlowService.queryCaseFlowInfo(caseFlowSearchVO);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询案件流程信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectCaseFlow")
|
||||||
|
public AjaxResult selectCaseFlow() {
|
||||||
|
return caseFlowService.selectCaseFlow();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增或编辑案件流程节点信息
|
* 新增或编辑案件流程节点信息
|
||||||
|
|||||||
+23
-14
@@ -1,19 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
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.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
@@ -24,6 +11,14 @@ import com.ruoyi.common.utils.StringUtils;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.service.ISysDictDataService;
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
import com.ruoyi.system.service.ISysDictTypeService;
|
import com.ruoyi.system.service.ISysDictTypeService;
|
||||||
|
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 javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
@@ -82,6 +77,20 @@ public class SysDictDataController extends BaseController
|
|||||||
}
|
}
|
||||||
return success(data);
|
return success(data);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据字典类型查询字典数据信息,跳过token
|
||||||
|
*/
|
||||||
|
@Anonymous
|
||||||
|
@GetMapping(value = "/type/skipToken/{dictType}")
|
||||||
|
public AjaxResult skipToken(@PathVariable String dictType)
|
||||||
|
{
|
||||||
|
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||||
|
if (StringUtils.isNull(data))
|
||||||
|
{
|
||||||
|
data = new ArrayList<SysDictData>();
|
||||||
|
}
|
||||||
|
return success(data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增字典类型
|
* 新增字典类型
|
||||||
|
|||||||
@@ -1,8 +1,19 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import java.util.Set;
|
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;
|
||||||
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
import com.ruoyi.system.service.flow.CaseFlowService;
|
import com.ruoyi.system.service.flow.CaseFlowService;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
||||||
@@ -12,15 +23,11 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ruoyi.common.constant.Constants;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import java.util.Arrays;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import java.util.HashSet;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import java.util.List;
|
||||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
import java.util.Set;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.framework.web.service.SysLoginService;
|
|
||||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录验证
|
* 登录验证
|
||||||
@@ -43,6 +50,8 @@ public class SysLoginController {
|
|||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseFlowService caseFlowService;
|
private CaseFlowService caseFlowService;
|
||||||
|
@Autowired
|
||||||
|
private TokenService tokenService;
|
||||||
/**
|
/**
|
||||||
* 登录方法
|
* 登录方法
|
||||||
*
|
*
|
||||||
@@ -78,11 +87,20 @@ public class SysLoginController {
|
|||||||
public AjaxResult getInfo() {
|
public AjaxResult getInfo() {
|
||||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
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<String> permissions = permissionService.getMenuPermission(user);
|
||||||
//查询用户角色关联的案件状态
|
//查询用户角色关联的案件状态
|
||||||
Set<Integer> caseStatus = caseFlowService.getCaseStatusIdByRoleKey(roles);
|
Set<Integer> caseStatus = caseFlowService.getCaseStatusIdByRoleKey(permsSet);
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
ajax.put("user", user);
|
ajax.put("user", user);
|
||||||
ajax.put("roles", roles);
|
ajax.put("roles", roles);
|
||||||
@@ -102,4 +120,30 @@ public class SysLoginController {
|
|||||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||||
return AjaxResult.success(menuService.buildMenus(menus));
|
return AjaxResult.success(menuService.buildMenus(menus));
|
||||||
}
|
}
|
||||||
|
/**sso登录接口*/
|
||||||
|
@PostMapping("login/sso")
|
||||||
|
public AjaxResult loginSSO( @RequestBody LoginBody loginBody){
|
||||||
|
if(StrUtil.isEmpty(loginBody.getUsername()) || StrUtil.isEmpty(loginBody.getTicket())
|
||||||
|
|| StrUtil.isEmpty(loginBody.getRoleName()) ){
|
||||||
|
return AjaxResult.error("参数错误");
|
||||||
}
|
}
|
||||||
|
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) {
|
||||||
|
System.out.println( MD5.create().digestHex("BMceshi" ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
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.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
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.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
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));
|
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;
|
package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ruoyi.common.annotation.Anonymous;
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
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 com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/identityAuthentication")
|
@RequestMapping("/identityAuthentication")
|
||||||
@@ -25,9 +23,26 @@ public class IdentityAuthenticationController extends BaseController {
|
|||||||
@Anonymous
|
@Anonymous
|
||||||
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
||||||
public AjaxResult selectIdentityAuthenticaEIDtoken() {
|
public AjaxResult selectIdentityAuthenticaEIDtoken() {
|
||||||
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
|
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthEIDToken(false);
|
||||||
return success(tokenResult);
|
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
|
@Anonymous
|
||||||
@PostMapping("/selectIdentityAuthenticaRespon")
|
@PostMapping("/selectIdentityAuthenticaRespon")
|
||||||
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||||
|
if(StrUtil.isEmpty(ientityAuthentication.getEidToken())){
|
||||||
|
return error("EIDtoken不能为空");
|
||||||
|
}
|
||||||
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
||||||
return checkResult;
|
return checkResult;
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-3
@@ -4,12 +4,18 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.ruoyi.common.annotation.Anonymous;
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
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.system.mapper.SysRoleMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.miniprogress.WeChatUserVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.miniprogress.WeChatUserVO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.miniprogress.WeChatUserService;
|
import com.ruoyi.wisdomarbitrate.service.miniprogress.WeChatUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wangqiong
|
* @author wangqiong
|
||||||
* @description 微信小程序用户注册登录
|
* @description 微信小程序用户注册登录
|
||||||
@@ -20,7 +26,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
public class WeChatUserController extends BaseController {
|
public class WeChatUserController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private WeChatUserService weChatUserService;
|
private WeChatUserService weChatUserService;
|
||||||
|
@Autowired
|
||||||
|
private SysRoleMapper roleMapper;
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper userMapper;
|
||||||
/**
|
/**
|
||||||
* 小程序端获取手机验证码
|
* 小程序端获取手机验证码
|
||||||
* @param userVO
|
* @param userVO
|
||||||
@@ -35,14 +44,33 @@ public class WeChatUserController extends BaseController {
|
|||||||
}
|
}
|
||||||
return weChatUserService.sendCode(userVO);
|
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()
|
||||||
|
{
|
||||||
|
List<SysRole> list = roleMapper.selectRoleAll();
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 小程序注册
|
* 小程序注册
|
||||||
*/
|
*/
|
||||||
@Anonymous
|
@Anonymous
|
||||||
@PostMapping("/registerUser")
|
@PostMapping("/registerUser")
|
||||||
public AjaxResult registerUser( @RequestBody IdentityAuthentication ientityAuthentication) {
|
public AjaxResult registerUser( @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||||
if(ientityAuthentication.getId()==null
|
if(
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getName())
|
// ientityAuthentication.getId()==null ||
|
||||||
|
StrUtil.isEmpty(ientityAuthentication.getName())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|
||||||
|| StrUtil.isEmpty(ientityAuthentication.getUserName())
|
|| StrUtil.isEmpty(ientityAuthentication.getUserName())
|
||||||
@@ -54,5 +82,16 @@ public class WeChatUserController extends BaseController {
|
|||||||
logger.info("调用小程序注册==="+ientityAuthentication.toString());
|
logger.info("调用小程序注册==="+ientityAuthentication.toString());
|
||||||
return weChatUserService.registerUser(ientityAuthentication);
|
return weChatUserService.registerUser(ientityAuthentication);
|
||||||
}
|
}
|
||||||
|
@Anonymous
|
||||||
|
@GetMapping("/verifyUserName")
|
||||||
|
public AjaxResult verifyUserName(@RequestParam("userName") String userName)
|
||||||
|
{
|
||||||
|
SysUser sysUser = userMapper.checkUserNameUnique(userName);
|
||||||
|
if(sysUser==null){
|
||||||
|
return AjaxResult.success();
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("用户名已存在!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+95
-25
@@ -47,33 +47,62 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo page(MsCaseApplicationReq req)
|
public TableDataInfo page(MsCaseApplicationReq req)
|
||||||
{
|
{
|
||||||
//startPage();
|
|
||||||
List<MsCaseApplicationVO> list = caseApplicationService.list(req);
|
List<MsCaseApplicationVO> list = caseApplicationService.list(req);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 首页待办数量
|
||||||
|
*/
|
||||||
|
@GetMapping("/todoCount")
|
||||||
|
public AjaxResult todoCount()
|
||||||
|
{
|
||||||
|
CaseToDoCountVO vo= caseApplicationService.todoCount();
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据登录人返回用户信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/getUserInfo")
|
||||||
|
public AjaxResult getUserInfo()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
return success(caseApplicationService.getUserInfo());
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 新增案件
|
* 新增案件
|
||||||
*/
|
*/
|
||||||
@PostMapping("/insert")
|
@PostMapping("/insert")
|
||||||
public AjaxResult insert(@RequestBody MsCaseApplicationVO caseApplication )
|
public AjaxResult insert(@RequestBody MsCaseApplicationVO caseApplication )
|
||||||
{
|
{
|
||||||
if(caseApplication.getAffiliate()==null||caseApplication.getAffiliate().getOrganizeFlag()==null){
|
if( caseApplication.getAffiliate()==null){
|
||||||
error("参数校验失败");
|
error("参数校验失败");
|
||||||
}
|
}
|
||||||
|
AjaxResult ajaxResult = AjaxResult.success();
|
||||||
return success(caseApplicationService.insert(caseApplication));
|
ajaxResult.put("caseNum",caseApplicationService.insert(caseApplication));
|
||||||
|
return ajaxResult;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 批量新增案件
|
||||||
|
*/
|
||||||
|
@PostMapping("/batchInsert")
|
||||||
|
public AjaxResult batchInsert(@RequestBody MsCaseBatchInsertVO list )
|
||||||
|
{
|
||||||
|
|
||||||
|
return caseApplicationService.batchInsert(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据身份证号获取性别和出生日期
|
* 根据身份证号获取性别和出生日期
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getInfoByIdCard")
|
@GetMapping("/getInfoByIdCard")
|
||||||
public AjaxResult getInfoByIdCard(@RequestParam("idCard") String idCard)
|
public AjaxResult getInfoByIdCard(@RequestParam(value = "idCard" ,required = false) String idCard)
|
||||||
{
|
{
|
||||||
if(StrUtil.isEmpty(idCard)){
|
if(StrUtil.isEmpty(idCard)){
|
||||||
error("参数校验失败");
|
return error("身份证号不能为空");
|
||||||
}
|
}
|
||||||
if(!IdcardUtil.isValidCard(idCard)){
|
if(!IdcardUtil.isValidCard(idCard)){
|
||||||
error("身份证不合法,请输入正确的身份证号");
|
return error("身份证不合法,请输入正确的身份证号");
|
||||||
}
|
}
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
Map<String, String> identityNumMap = IdCardUtils.getBirAgeSex(idCard);
|
Map<String, String> identityNumMap = IdCardUtils.getBirAgeSex(idCard);
|
||||||
@@ -105,16 +134,27 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
}
|
}
|
||||||
return success(caseApplicationService.update(caseApplication));
|
return success(caseApplicationService.update(caseApplication));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 删除案件
|
||||||
|
*/
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public AjaxResult delete(@RequestBody MsCaseApplication req ) {
|
||||||
|
if (req.getCaseFlowId() == null
|
||||||
|
|| (req.getId() == null && StrUtil.isEmpty(req.getBatchNumber()))) {
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
return caseApplicationService.delete(req);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 根据id查询案件
|
* 根据id查询案件
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectById")
|
@GetMapping("/selectById")
|
||||||
public AjaxResult selectById(@RequestParam Long id )
|
public AjaxResult selectById(@RequestParam(required = false) Long id ,@RequestParam(required = false) String caseNum )
|
||||||
{
|
{
|
||||||
if(id==null){
|
if(id==null && caseNum==null ){
|
||||||
error("id不能为空");
|
error("参数校验失败");
|
||||||
}
|
}
|
||||||
return success(caseApplicationService.selectById(id));
|
return success(caseApplicationService.selectById(id,caseNum));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 案件压缩包导入
|
* 案件压缩包导入
|
||||||
@@ -122,6 +162,7 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@PostMapping("/uploadCaseZipFile")
|
@PostMapping("/uploadCaseZipFile")
|
||||||
public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file, @RequestParam("templateId") Long templateId) throws IOException {
|
public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file, @RequestParam("templateId") Long templateId) throws IOException {
|
||||||
if(file.isEmpty()||templateId==null){
|
if(file.isEmpty()||templateId==null){
|
||||||
@@ -129,6 +170,20 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
}
|
}
|
||||||
return caseApplicationService.uploadCaseZipFile(file,templateId);
|
return caseApplicationService.uploadCaseZipFile(file,templateId);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 用户信息压缩包导入
|
||||||
|
* @param file
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@Anonymous
|
||||||
|
@PostMapping("/userIdentify")
|
||||||
|
public AjaxResult userIdentify(@RequestParam("file") MultipartFile file) throws IOException {
|
||||||
|
if(file.isEmpty()){
|
||||||
|
return error("参数不能为空");
|
||||||
|
}
|
||||||
|
return caseApplicationService.userIdentify(file);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成调解申请书
|
* 生成调解申请书
|
||||||
@@ -195,8 +250,8 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/listMediator")
|
@GetMapping("/listMediator")
|
||||||
public AjaxResult listMediator( ) {
|
public AjaxResult listMediator( @RequestParam(value = "caseAppliId",required = true) Long caseAppliId) {
|
||||||
return caseApplicationService.listMediator();
|
return caseApplicationService.listMediator(caseAppliId);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 保存预约
|
* 保存预约
|
||||||
@@ -261,6 +316,19 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
|
|
||||||
return caseApplicationService.mediation(req);
|
return caseApplicationService.mediation(req);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 确定会议结果
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/confirmMeetingResult")
|
||||||
|
public AjaxResult confirmMeetingResult(@RequestBody MsCaseApplicationReq req) {
|
||||||
|
if (req.getCaseFlowId() == null || req.getId() == null || req.getMediaResult()==null) {
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
return caseApplicationService.confirmMeetingResult(req);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 修改庭审笔录
|
* 修改庭审笔录
|
||||||
* @param
|
* @param
|
||||||
@@ -274,19 +342,7 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
|
|
||||||
return caseApplicationService.updateTrialPen(attach);
|
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
|
* 获取userSign
|
||||||
* @param userId
|
* @param userId
|
||||||
@@ -332,4 +388,18 @@ public class MsCaseApplicationController extends BaseController {
|
|||||||
|
|
||||||
return success(videoService.reserveConferenceList(caseId));
|
return success(videoService.reserveConferenceList(caseId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存onlyOffice在线编辑的文件
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/saveOnlyOfficeFile")
|
||||||
|
public AjaxResult saveOnlyOfficeFile( @RequestBody MsCaseAttach caseAttach) {
|
||||||
|
if(caseAttach.getCaseAppliId()==null||StrUtil.isEmpty(caseAttach.getOnlyOfficeFileId())||StrUtil.isEmpty(caseAttach.getAnnexPath())){
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
return caseApplicationService.saveOnlyOfficeFile(caseAttach);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-3
@@ -65,7 +65,7 @@ public class MsCaseApplicationPayController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认缴费,支持批量(batchNumber不为空,则为批量)
|
* 申请人/被申请人确认缴费,支持批量(batchNumber不为空,则为批量)
|
||||||
* @param dto 缴费传入参数
|
* @param dto 缴费传入参数
|
||||||
* @return 统一响应结果
|
* @return 统一响应结果
|
||||||
*/
|
*/
|
||||||
@@ -79,7 +79,7 @@ public class MsCaseApplicationPayController extends BaseController {
|
|||||||
return casePaymentService.confirmPayment(dto);
|
return casePaymentService.confirmPayment(dto);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 确认已缴费,支持批量(batchNumber不为空,则为批量)
|
* 财务确认已缴费,支持批量(batchNumber不为空,则为批量)
|
||||||
* @param dto 缴费传入参数
|
* @param dto 缴费传入参数
|
||||||
* @return 统一响应结果
|
* @return 统一响应结果
|
||||||
*/
|
*/
|
||||||
@@ -91,5 +91,18 @@ public class MsCaseApplicationPayController extends BaseController {
|
|||||||
}
|
}
|
||||||
return casePaymentService.confirmPaid(dto);
|
return casePaymentService.confirmPaid(dto);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 财务确认被申请人已缴费,支持批量(batchNumber不为空,则为批量)
|
||||||
|
* @param dto 缴费传入参数
|
||||||
|
* @return 统一响应结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/resConfirmPaid")
|
||||||
|
public AjaxResult resConfirmPaid(@RequestBody CaseConfirmPayDTO dto) {
|
||||||
|
if ((dto.getCaseId() == null && StrUtil.isEmpty(dto.getBatchNumber()))
|
||||||
|
|| dto.getCaseFlowId() == null) {
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
dto.setApplicantConfirm(false);
|
||||||
|
return casePaymentService.confirmPaid(dto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-62
@@ -2,14 +2,15 @@ package com.ruoyi.web.controller.wisdomarbitrate.mscase;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
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.domain.vo.mscase.MsCaseLogRecordVO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
|
import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
|
||||||
|
import com.ruoyi.wisdomarbitrate.utils.SignVerifyUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -17,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@@ -26,16 +26,7 @@ public class MsSignSealController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private MsSignSealService msSignSealService;
|
private MsSignSealService msSignSealService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 调解书签名
|
|
||||||
*/
|
|
||||||
@PostMapping("/sureMediationSeal")
|
|
||||||
public AjaxResult sureMediationSeal(@RequestBody MsCaseApplicationVO caseApplication ) throws EsignDemoException, InterruptedException {
|
|
||||||
if(caseApplication.getId()==null){
|
|
||||||
error("id不能为空");
|
|
||||||
}
|
|
||||||
return msSignSealService.sureMediationSeal(caseApplication);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用印申请
|
* 用印申请
|
||||||
@@ -58,6 +49,38 @@ public class MsSignSealController extends BaseController {
|
|||||||
return success(sealUrlRecordselect);
|
return success(sealUrlRecordselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名用印回调
|
||||||
|
*/
|
||||||
|
@Anonymous
|
||||||
|
@PostMapping("/signSeaalCaseApplicaCallback")
|
||||||
|
public AjaxResult signSeaalCaseApplicaCallback() throws Exception {
|
||||||
|
boolean checkResult= SignVerifyUtils.checkSignuter();
|
||||||
|
if(checkResult){
|
||||||
|
String reqbodystr =SignVerifyUtils.getRequestBody();
|
||||||
|
return msSignSealService.signSeaalCaseApplicaCallback(reqbodystr);
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("error");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 印章审核回调
|
||||||
|
*/
|
||||||
|
@Anonymous
|
||||||
|
@PostMapping("/sealCheckCallback")
|
||||||
|
public AjaxResult sealCheckCallback() throws Exception {
|
||||||
|
boolean checkResult= SignVerifyUtils.checkSignuter();
|
||||||
|
if(checkResult){
|
||||||
|
String reqbodystr =SignVerifyUtils.getRequestBody();
|
||||||
|
return msSignSealService.sealCheckCallback(reqbodystr);
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("error");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询案件进度
|
* 查询案件进度
|
||||||
*/
|
*/
|
||||||
@@ -116,55 +139,5 @@ public class MsSignSealController extends BaseController {
|
|||||||
return msSignSealService.msCaseSignUrlApplyPC(dto);
|
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;
|
package com.ruoyi.web.controller.wisdomarbitrate.mscase;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
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.annotation.Anonymous;
|
||||||
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
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.MsReservedConferenceVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.SendRoomNoMessageVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.VideoCallBackVO;
|
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 com.ruoyi.wisdomarbitrate.service.mscase.VideoConferenceService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.validation.Valid;
|
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
|
* @Date 2024/01/8
|
||||||
* @Version V1.0
|
* @Version V1.0
|
||||||
*/
|
*/
|
||||||
|
@CrossOrigin(origins = "*")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/video")
|
@RequestMapping("/video")
|
||||||
public class MsVideoConferenceController extends BaseController {
|
public class MsVideoConferenceController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private VideoConferenceService videoService;
|
private VideoConferenceService videoService;
|
||||||
|
@Autowired
|
||||||
|
private ServerConfig serverConfig;
|
||||||
|
@Autowired
|
||||||
|
private MsCaseAttachMapper msCaseAttachMapper;
|
||||||
|
@Autowired
|
||||||
|
private MsCaseApplicationService caseApplicationService;
|
||||||
/**
|
/**
|
||||||
* 根据案件ID查询视频
|
* 根据案件ID查询视频
|
||||||
* @param caseId 案件id
|
* @param caseId 案件id
|
||||||
@@ -34,8 +57,111 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
|
|
||||||
return videoService.videoList(caseId);
|
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
|
* @param
|
||||||
@@ -49,6 +175,20 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
}
|
}
|
||||||
return success();
|
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
|
* 根据房间号绑定案件ID
|
||||||
* @param
|
* @param
|
||||||
@@ -106,9 +246,20 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@Anonymous
|
@Anonymous
|
||||||
@GetMapping("secretaryRoleByUserId")
|
@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并和案件关联
|
* 根据html字符串转pdf并和案件关联
|
||||||
|
|||||||
+22
-6
@@ -1,13 +1,12 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
||||||
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -21,13 +20,30 @@ public class SendMailRecordController extends BaseController {
|
|||||||
* 查询发送邮件记录列表
|
* 查询发送邮件记录列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SendMailRecord sendMailRecord)
|
public TableDataInfo list(SendMailRecord sendMailRecord) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
||||||
return getDataTable(list);
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,7 +6,8 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://121.40.189.20:3306/mediation_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
# url: jdbc:mysql://121.40.189.20:3306/mediation_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
||||||
|
url: jdbc:mysql://121.40.189.20:3306/mediation_system_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: YMzc157#
|
password: YMzc157#
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ ruoyi:
|
|||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 测试环境6001,开发环境7001
|
||||||
port: 6001
|
port: 7001
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
@@ -72,7 +72,7 @@ spring:
|
|||||||
host: 121.40.189.20
|
host: 121.40.189.20
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6389
|
port: 6389
|
||||||
# 数据库索引
|
# TODO 数据库索引,测试环境1,正式环境0
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
password:
|
password:
|
||||||
@@ -121,7 +121,7 @@ token:
|
|||||||
# 令牌密钥
|
# 令牌密钥
|
||||||
secret: abcdefghijklmnopqrstuvwxyz
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
# 令牌有效期(默认30分钟)
|
# 令牌有效期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 120
|
||||||
|
|
||||||
# MyBatis配置
|
# MyBatis配置
|
||||||
mybatis:
|
mybatis:
|
||||||
@@ -166,13 +166,17 @@ elegent:
|
|||||||
alipay:
|
alipay:
|
||||||
appId: 2021003141676135
|
appId: 2021003141676135
|
||||||
callback:
|
callback:
|
||||||
domain: http://121.40.189.20:9001/
|
# TODO
|
||||||
|
domain: http://121.40.189.20:7001/
|
||||||
watch: true
|
watch: true
|
||||||
cycle: 10
|
cycle: 10
|
||||||
identityAuthentication:
|
identityAuthentication:
|
||||||
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||||
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||||
|
# 小程序端人脸核身商户id
|
||||||
merchantId: 0NSJ2309281116194321
|
merchantId: 0NSJ2309281116194321
|
||||||
|
# pc端人脸核身商户id
|
||||||
|
pcMerchantId: 0NSJ2404231626029804
|
||||||
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
|
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
|
||||||
# 腾讯云即时通信相关配置
|
# 腾讯云即时通信相关配置
|
||||||
imConfig:
|
imConfig:
|
||||||
@@ -184,6 +188,26 @@ imConfig:
|
|||||||
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||||
# 腾讯云密钥
|
# 腾讯云密钥
|
||||||
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||||
|
# TODO 调解机构代码配置
|
||||||
|
organizeConfig:
|
||||||
|
# creditCode
|
||||||
|
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://121.40.189.20:9090/files/upload
|
||||||
|
# 北明
|
||||||
|
BMConfig:
|
||||||
|
userName: BWT_MEDIATION
|
||||||
|
password: 86251b190e3a40f3942v215d1762c663
|
||||||
|
syncSource: BWT_MEDIATION
|
||||||
#jodconverter:
|
#jodconverter:
|
||||||
# local:
|
# local:
|
||||||
# host: 121.40.189.20
|
# host: 121.40.189.20
|
||||||
@@ -196,3 +220,6 @@ imConfig:
|
|||||||
# port-numbers: 8100
|
# port-numbers: 8100
|
||||||
#libreoffice进程重启前的最大进程数
|
#libreoffice进程重启前的最大进程数
|
||||||
# max-tasks-per-process: 100
|
# max-tasks-per-process: 100
|
||||||
|
beimingapihost: https://zj.odrcloud.cn
|
||||||
|
beimingapiprefix: /onestop/sync
|
||||||
|
beimingprivatekey: d7724e72c4be93196a35203e8379ded5
|
||||||
|
|||||||
@@ -1,24 +1,2 @@
|
|||||||
Application Version: ${ruoyi.version}
|
Application Version: ${ruoyi.version}
|
||||||
Spring Boot Version: ${spring-boot.version}
|
Spring Boot Version: ${spring-boot.version}
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// _ooOoo_ //
|
|
||||||
// o8888888o //
|
|
||||||
// 88" . "88 //
|
|
||||||
// (| ^_^ |) //
|
|
||||||
// O\ = /O //
|
|
||||||
// ____/`---'\____ //
|
|
||||||
// .' \\| |// `. //
|
|
||||||
// / \\||| : |||// \ //
|
|
||||||
// / _||||| -:- |||||- \ //
|
|
||||||
// | | \\\ - /// | | //
|
|
||||||
// | \_| ''\---/'' | | //
|
|
||||||
// \ .-\__ `-` ___/-. / //
|
|
||||||
// ___`. .' /--.--\ `. . ___ //
|
|
||||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
|
||||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
|
||||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
|
||||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
|
||||||
// `=---=' //
|
|
||||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
|
||||||
// 佛祖保佑 永不宕机 永无BUG //
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tencentcloudapi</groupId>
|
<groupId>com.tencentcloudapi</groupId>
|
||||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||||
<version>3.1.876</version>
|
<version>3.1.962</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -283,6 +283,11 @@
|
|||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.thymeleaf</groupId>
|
||||||
|
<artifactId>thymeleaf</artifactId>
|
||||||
|
<version>3.0.12.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</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
|
* 登录用户 redis key
|
||||||
*/
|
*/
|
||||||
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
|
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
|
||||||
|
/**
|
||||||
|
* 登录用户名 redis key
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static final String LOGIN_USERNAME_TOKEN_KEY = "login_username_tokens:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码 redis key
|
* 验证码 redis key
|
||||||
@@ -42,4 +47,22 @@ public class CacheConstants
|
|||||||
*/
|
*/
|
||||||
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
|
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 WE_CHAT_SMS_VERIFY_CODE_KEY="we_chat_sms_verify_code:";
|
||||||
|
public static final String EMAIL_VERIFY_CODE_KEY="email_verify_code:";
|
||||||
|
/**
|
||||||
|
* 案件 redis key
|
||||||
|
*/
|
||||||
|
public static final String CASE_KEY = "case_codes:";
|
||||||
|
/**
|
||||||
|
* 所有用户 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:";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
package com.ruoyi.common.constant;
|
|
||||||
/**
|
|
||||||
* 立案申请案件状态
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class CaseApplicationConstants {
|
|
||||||
/** 立案申请 */
|
|
||||||
public static final int CASE_APPLICATION = 0;
|
|
||||||
/** 待立案审查 */
|
|
||||||
public static final int CASE_CHECK = 1;
|
|
||||||
/** 待缴费 */
|
|
||||||
public static final int PENDING_PAYMENT = 2;
|
|
||||||
/** 待缴费确认 */
|
|
||||||
public static final int PENDING_PAYMENT_CONFIRM = 3;
|
|
||||||
/** 待案件质证 */
|
|
||||||
public static final int CASE_CROSSEXAMI = 4;
|
|
||||||
|
|
||||||
/** 待组庭 */
|
|
||||||
public static final int PENDING_TRIAL = 26;
|
|
||||||
/** 待组庭审核 */
|
|
||||||
public static final int CONFIRMDED_PENDING_TRIAL_SUBMMIT = 5;
|
|
||||||
/** 待组庭确定 */
|
|
||||||
public static final int CONFIRMDED_PENDING_TRIAL = 6;
|
|
||||||
|
|
||||||
/** 待审核仲裁方式 */
|
|
||||||
public static final int CHECK_ARBITRATION_METHOD = 7;
|
|
||||||
/** 待开庭审理 */
|
|
||||||
public static final int PENDING_OPENCOURT_HEAR = 8;
|
|
||||||
/** 待书面审理 */
|
|
||||||
public static final int PENDING_WRIITEN_HEAR = 9;
|
|
||||||
/** 待生成仲裁文书 */
|
|
||||||
public static final int GENERATED_ARBITRATION = 10;
|
|
||||||
/**待秘书核验仲裁文书*/
|
|
||||||
public static final int VERPRIF_ARBITRATION = 11;
|
|
||||||
/**待部门长审核仲裁文书*/
|
|
||||||
public static final int CHECK_ARBITRATION = 12;
|
|
||||||
/**待仲裁文书签名*/
|
|
||||||
public static final int SIGN_ARBITRATION = 13;
|
|
||||||
/** 待仲裁文书用印 */
|
|
||||||
public static final int ARBITRATED_SEAL = 14;
|
|
||||||
/** 待仲裁文书送达 */
|
|
||||||
public static final int ARBITRATION_DELIVERY = 15;
|
|
||||||
/** 待案件归档*/
|
|
||||||
public static final int CASE_FILING = 16;
|
|
||||||
/** 已归档*/
|
|
||||||
public static final int CASE_ARCHIVED = 17;
|
|
||||||
|
|
||||||
/** 待修改开庭时间*/
|
|
||||||
public static final int MODIFY_HEARDATE = 31;
|
|
||||||
/**待仲裁员审核仲裁文书*/
|
|
||||||
public static final int HEAD_CHECK_ARBITRATION = 18;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -7,8 +7,7 @@ import io.jsonwebtoken.Claims;
|
|||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class Constants
|
public class Constants {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* UTF-8 字符集
|
* UTF-8 字符集
|
||||||
*/
|
*/
|
||||||
@@ -95,6 +94,10 @@ public class Constants
|
|||||||
* 令牌前缀
|
* 令牌前缀
|
||||||
*/
|
*/
|
||||||
public static final String LOGIN_USER_KEY = "login_user_key";
|
public static final String LOGIN_USER_KEY = "login_user_key";
|
||||||
|
/**
|
||||||
|
* 会议主键Id
|
||||||
|
*/
|
||||||
|
public static final String MEETING_KEY = "meeting_key";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户ID
|
* 用户ID
|
||||||
@@ -141,7 +144,10 @@ public class Constants
|
|||||||
*/
|
*/
|
||||||
public static final String LOOKUP_LDAPS = "ldaps:";
|
public static final String LOOKUP_LDAPS = "ldaps:";
|
||||||
public static final String DEFAULT_PASSWORD = "123456";
|
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对象白名单配置(仅允许解析的包名,范围越小越安全)
|
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
||||||
@@ -156,6 +162,5 @@ public class Constants
|
|||||||
/**
|
/**
|
||||||
* 定时任务违规的字符
|
* 定时任务违规的字符
|
||||||
*/
|
*/
|
||||||
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
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"};
|
||||||
"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_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 org.springframework.web.bind.annotation.InitBinder;
|
||||||
|
|
||||||
import java.beans.PropertyEditorSupport;
|
import java.beans.PropertyEditorSupport;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -83,6 +84,9 @@ public class BaseController
|
|||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
protected TableDataInfo getDataTable(List<?> list)
|
protected TableDataInfo getDataTable(List<?> list)
|
||||||
{
|
{
|
||||||
|
if(list == null){
|
||||||
|
list=new ArrayList<>();
|
||||||
|
}
|
||||||
TableDataInfo rspData = new TableDataInfo();
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
rspData.setCode(HttpStatus.SUCCESS);
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
rspData.setMsg("查询成功");
|
rspData.setMsg("查询成功");
|
||||||
|
|||||||
@@ -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;
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import java.util.List;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import java.util.ArrayList;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import java.util.List;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表 sys_dept
|
* 部门表 sys_dept
|
||||||
@@ -54,6 +55,68 @@ public class SysDept extends BaseEntity
|
|||||||
|
|
||||||
/** 父部门名称 */
|
/** 父部门名称 */
|
||||||
private String parentName;
|
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() {
|
public Integer getDeptType() {
|
||||||
return deptType;
|
return deptType;
|
||||||
|
|||||||
@@ -63,8 +63,24 @@ public class SysUser extends BaseEntity
|
|||||||
|
|
||||||
|
|
||||||
/** 用户身份证号 */
|
/** 用户身份证号 */
|
||||||
@Excel(name = "身份证号")
|
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
/** 身份类别,0-身份证,1-护照,默认0 */
|
||||||
|
private Integer idType;
|
||||||
|
/** 国籍,0-国内,1-国外,默认0 */
|
||||||
|
|
||||||
|
private Integer nationality;
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
private Date birth;
|
||||||
|
/**
|
||||||
|
* 住所
|
||||||
|
*/
|
||||||
|
private String home;
|
||||||
|
/**
|
||||||
|
* 联系地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
/** 用户邮箱 */
|
/** 用户邮箱 */
|
||||||
@Excel(name = "用户邮箱")
|
@Excel(name = "用户邮箱")
|
||||||
@@ -136,6 +152,54 @@ public class SysUser extends BaseEntity
|
|||||||
this.userId = userId;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdType(Integer idType) {
|
||||||
|
this.idType = idType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNationality() {
|
||||||
|
return nationality;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNationality(Integer nationality) {
|
||||||
|
this.nationality = nationality;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getUserId()
|
public Long getUserId()
|
||||||
{
|
{
|
||||||
return userId;
|
return userId;
|
||||||
@@ -361,6 +425,8 @@ public class SysUser extends BaseEntity
|
|||||||
.append("deptIds", getDeptIds())
|
.append("deptIds", getDeptIds())
|
||||||
.append("userName", getUserName())
|
.append("userName", getUserName())
|
||||||
.append("idCard", getIdCard())
|
.append("idCard", getIdCard())
|
||||||
|
.append("idType", getIdType())
|
||||||
|
.append("nationality", getNationality())
|
||||||
.append("nickName", getNickName())
|
.append("nickName", getNickName())
|
||||||
.append("email", getEmail())
|
.append("email", getEmail())
|
||||||
.append("phonenumber", getPhonenumber())
|
.append("phonenumber", getPhonenumber())
|
||||||
|
|||||||
@@ -26,12 +26,36 @@ public class LoginBody
|
|||||||
* 唯一标识
|
* 唯一标识
|
||||||
*/
|
*/
|
||||||
private String uuid;
|
private String uuid;
|
||||||
|
/**
|
||||||
|
* 密文:BM+用户名用MD5加密
|
||||||
|
*/
|
||||||
|
private String ticket;
|
||||||
|
/**
|
||||||
|
* 角色名,申请人,被申请人,委托代理人
|
||||||
|
*/
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
public String getRoleName() {
|
||||||
|
return roleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoleName(String roleName) {
|
||||||
|
this.roleName = roleName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getUsername()
|
public String getUsername()
|
||||||
{
|
{
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTicket() {
|
||||||
|
return ticket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicket(String ticket) {
|
||||||
|
this.ticket = ticket;
|
||||||
|
}
|
||||||
|
|
||||||
public void setUsername(String username)
|
public void setUsername(String username)
|
||||||
{
|
{
|
||||||
this.username = username;
|
this.username = username;
|
||||||
|
|||||||
@@ -16,10 +16,13 @@ public enum AnnexTypeEnum implements EnumsInterface {
|
|||||||
PAYMENT_RECEIPT(4, "申请人缴费单"),
|
PAYMENT_RECEIPT(4, "申请人缴费单"),
|
||||||
MEETING_VIDEO(5, "会议视频"),
|
MEETING_VIDEO(5, "会议视频"),
|
||||||
MEDIATE(6, "庭审笔录"),
|
MEDIATE(6, "庭审笔录"),
|
||||||
MEDIATE_BOOK(7, "调解书"),
|
MEDIATE_BOOK(7, "调解书或和解协议"),
|
||||||
MEDIATION_FILES(8, "调解资料"),
|
MEDIATION_FILES(8, "调解资料"),
|
||||||
RES_PAYMENT_RECEIPT(9, "被申请人缴费单"),
|
RES_PAYMENT_RECEIPT(9, "被申请人缴费单"),
|
||||||
SEAL_PICTURE(10, "印章图片"),
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,9 +10,10 @@ import com.ruoyi.common.interfaces.EnumsInterface;
|
|||||||
* @Created wangqiong
|
* @Created wangqiong
|
||||||
*/
|
*/
|
||||||
public enum TemplateTypeEnum implements EnumsInterface {
|
public enum TemplateTypeEnum implements EnumsInterface {
|
||||||
MEDIATION_APPLICATION(1, "调解申请书模板"),
|
MEDIATION_APPLICATION(1, "机构调解申请书模板"),
|
||||||
MEDIATION_AGREEMENT(2, "和解协议模板"),
|
MEDIATION_AGREEMENT(2, "和解协议模板"),
|
||||||
MEDIATE_BOOK(3, "调解书模板"),
|
MEDIATE_BOOK(3, "调解书模板"),
|
||||||
|
PERSON_MEDIATION_APPLICATION(4, "自然人调解申请书模板"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.ruoyi.common.utils;
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.common.utils.uuid.UUID;
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.mail.MailException;
|
||||||
import org.springframework.mail.SimpleMailMessage;
|
import org.springframework.mail.SimpleMailMessage;
|
||||||
import org.springframework.mail.javamail.JavaMailSender;
|
import org.springframework.mail.javamail.JavaMailSender;
|
||||||
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||||
@@ -45,12 +47,12 @@ public class EmailOutUtil {
|
|||||||
// private static String fromOut;
|
// private static String fromOut;
|
||||||
@Value("${spring.mail.host}")
|
@Value("${spring.mail.host}")
|
||||||
private String hostOut;
|
private String hostOut;
|
||||||
// @Value("${spring.mail.username}")
|
@Value("${spring.mail.username}")
|
||||||
// private String usernameOut;
|
private String usernameOut;
|
||||||
private String usernameOut="wq18792927508@163.com";
|
|
||||||
// @Value("${spring.mail.password}")
|
@Value("${spring.mail.password}")
|
||||||
// private String passwordOut;
|
private String passwordOut;
|
||||||
private String passwordOut= "WDFHKSEMCKVRELEA";
|
|
||||||
@Value("${spring.mail.port}")
|
@Value("${spring.mail.port}")
|
||||||
private Integer portOut;
|
private Integer portOut;
|
||||||
|
|
||||||
@@ -72,10 +74,18 @@ public class EmailOutUtil {
|
|||||||
* @param subject 邮件主题
|
* @param subject 邮件主题
|
||||||
* @param content 邮件内容(发送内容)
|
* @param content 邮件内容(发送内容)
|
||||||
*/
|
*/
|
||||||
public void sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
|
public Boolean sendMessage(String to, String subject, String content, String from, JavaMailSender mailSender) {
|
||||||
|
try {
|
||||||
|
if(mailSender==null){
|
||||||
|
mailSender= rebuildMailSender();
|
||||||
|
}
|
||||||
// 创建一个邮件对象
|
// 创建一个邮件对象
|
||||||
SimpleMailMessage msg = new SimpleMailMessage();
|
SimpleMailMessage msg = new SimpleMailMessage();
|
||||||
|
if(StrUtil.isEmpty(from)){
|
||||||
|
msg.setFrom(usernameOut);
|
||||||
|
}else {
|
||||||
msg.setFrom(from);
|
msg.setFrom(from);
|
||||||
|
}
|
||||||
msg.setTo(to);
|
msg.setTo(to);
|
||||||
// 设置邮件主题
|
// 设置邮件主题
|
||||||
msg.setSubject(subject);
|
msg.setSubject(subject);
|
||||||
@@ -83,7 +93,10 @@ public class EmailOutUtil {
|
|||||||
msg.setText(content);
|
msg.setText(content);
|
||||||
// 发送邮件
|
// 发送邮件
|
||||||
mailSender.send(msg);
|
mailSender.send(msg);
|
||||||
////System.out.println("发送成功:" + from + ":to:" + to);
|
} catch (MailException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -91,8 +104,9 @@ public class EmailOutUtil {
|
|||||||
* @param message 邮件内容
|
* @param message 邮件内容
|
||||||
* @param subject 邮件主题
|
* @param subject 邮件主题
|
||||||
* @param fileList 邮件附件
|
* @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 {
|
try {
|
||||||
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
|
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
|
||||||
MimeBodyPart messageBodyPart = new MimeBodyPart();
|
MimeBodyPart messageBodyPart = new MimeBodyPart();
|
||||||
@@ -149,7 +163,10 @@ public class EmailOutUtil {
|
|||||||
for (File tempfile : fileList) {
|
for (File tempfile : fileList) {
|
||||||
MimeBodyPart attachmentPart = new MimeBodyPart();
|
MimeBodyPart attachmentPart = new MimeBodyPart();
|
||||||
attachmentPart.attachFile(tempfile);
|
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);
|
multipart.addBodyPart(attachmentPart);
|
||||||
}
|
}
|
||||||
msg.setContent(multipart);
|
msg.setContent(multipart);
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
|
|
||||||
import javax.mail.*;
|
import javax.mail.*;
|
||||||
import javax.mail.internet.MimeMessage;
|
import javax.mail.internet.MimeMessage;
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public final class EmailUtil {
|
public final class EmailUtil {
|
||||||
@@ -27,8 +24,8 @@ public final class EmailUtil {
|
|||||||
BodyPart bodyPart = multipart.getBodyPart(i);
|
BodyPart bodyPart = multipart.getBodyPart(i);
|
||||||
if(bodyPart.getContentType().contains("Message/Rfc822")){
|
if(bodyPart.getContentType().contains("Message/Rfc822")){
|
||||||
MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
|
MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
|
||||||
if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("裁决书")){
|
if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("调解书")){
|
||||||
String[] split = mimeMessage.getSubject().split("裁决书");
|
String[] split = mimeMessage.getSubject().split("调解书");
|
||||||
if(split.length>0){
|
if(split.length>0){
|
||||||
return split[0];
|
return split[0];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.api.IConverter;
|
||||||
import com.documents4j.job.LocalConverter;
|
import com.documents4j.job.LocalConverter;
|
||||||
import com.itextpdf.text.Document;
|
import com.itextpdf.text.Document;
|
||||||
import com.itextpdf.text.Font;
|
|
||||||
import com.itextpdf.text.PageSize;
|
import com.itextpdf.text.PageSize;
|
||||||
import com.itextpdf.text.pdf.BaseFont;
|
|
||||||
import com.itextpdf.text.pdf.PdfWriter;
|
import com.itextpdf.text.pdf.PdfWriter;
|
||||||
import com.itextpdf.tool.xml.XMLWorkerFontProvider;
|
import com.itextpdf.tool.xml.XMLWorkerFontProvider;
|
||||||
import com.itextpdf.tool.xml.XMLWorkerHelper;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
||||||
import static cn.hutool.core.util.ClassLoaderUtil.getClassLoader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wangqiong
|
* @author wangqiong
|
||||||
* @description pdf转换工具类
|
* @description pdf转换工具类
|
||||||
@@ -44,7 +38,7 @@ public class PdfUtils {
|
|||||||
document.setMarginMirroring(false);
|
document.setMarginMirroring(false);
|
||||||
document.open();
|
document.open();
|
||||||
// 解决PDF中文不显示
|
// 解决PDF中文不显示
|
||||||
String fontPath = "/D:/simsun.ttf"; //字体文件路径
|
String fontPath = "/home/ruoyi/uploadPath/songfont/simsun.ttf"; //字体文件路径
|
||||||
XMLWorkerFontProvider provider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
|
XMLWorkerFontProvider provider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
|
||||||
provider.register(fontPath);//注册字体
|
provider.register(fontPath);//注册字体
|
||||||
log.error("注册字体");
|
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;
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.io.resource.ClassPathResource;
|
|
||||||
import com.deepoove.poi.XWPFTemplate;
|
import com.deepoove.poi.XWPFTemplate;
|
||||||
import com.deepoove.poi.config.Configure;
|
import com.deepoove.poi.config.Configure;
|
||||||
import com.deepoove.poi.data.*;
|
import com.deepoove.poi.data.*;
|
||||||
import com.deepoove.poi.data.style.ParagraphStyle;
|
import com.deepoove.poi.data.style.ParagraphStyle;
|
||||||
import com.deepoove.poi.data.style.Style;
|
import com.deepoove.poi.data.style.Style;
|
||||||
import com.deepoove.poi.policy.PictureRenderPolicy;
|
|
||||||
import com.deepoove.poi.util.PoitlIOUtils;
|
import com.deepoove.poi.util.PoitlIOUtils;
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
|
||||||
import org.apache.poi.ss.usermodel.CellType;
|
|
||||||
import org.apache.poi.ss.usermodel.Row;
|
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
|
||||||
import org.apache.poi.wp.usermodel.Paragraph;
|
|
||||||
import org.apache.poi.xwpf.usermodel.*;
|
import org.apache.poi.xwpf.usermodel.*;
|
||||||
|
|
||||||
import javax.print.Doc;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,9 @@ public class MimeTypeUtils
|
|||||||
public static final String IMAGE_BMP = "image/bmp";
|
public static final String IMAGE_BMP = "image/bmp";
|
||||||
|
|
||||||
public static final String IMAGE_GIF = "image/gif";
|
public static final String IMAGE_GIF = "image/gif";
|
||||||
|
public static final String IMAGE_SVG = "image/svg";
|
||||||
|
|
||||||
public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" };
|
public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png","svg" };
|
||||||
|
|
||||||
public static final String[] FLASH_EXTENSION = { "swf", "flv" };
|
public static final String[] FLASH_EXTENSION = { "swf", "flv" };
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ public class MimeTypeUtils
|
|||||||
|
|
||||||
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
|
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
|
||||||
// 图片
|
// 图片
|
||||||
"bmp", "gif", "jpg", "jpeg", "png",
|
"bmp", "gif", "jpg", "jpeg", "png","svg",
|
||||||
// word excel powerpoint
|
// word excel powerpoint
|
||||||
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
|
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
|
||||||
// 压缩文件
|
// 压缩文件
|
||||||
@@ -52,6 +53,8 @@ public class MimeTypeUtils
|
|||||||
return "bmp";
|
return "bmp";
|
||||||
case IMAGE_GIF:
|
case IMAGE_GIF:
|
||||||
return "gif";
|
return "gif";
|
||||||
|
case IMAGE_SVG:
|
||||||
|
return "svg";
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
package com.ruoyi.common.utils.file;
|
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.config.EsignDemoConfig;
|
||||||
import com.ruoyi.common.constant.EsignHeaderConstant;
|
import com.ruoyi.common.constant.EsignHeaderConstant;
|
||||||
import com.ruoyi.common.constant.FileTransformation;
|
|
||||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
import com.ruoyi.common.enums.EsignRequestType;
|
import com.ruoyi.common.enums.EsignRequestType;
|
||||||
import com.ruoyi.common.exception.EsignDemoException;
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||||
import com.ruoyi.common.utils.bean.EsignFileBean;
|
import com.ruoyi.common.utils.bean.EsignFileBean;
|
||||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class SaaSAPIFileUtils {
|
public class SaaSAPIFileUtils {
|
||||||
@@ -88,43 +81,27 @@ public class SaaSAPIFileUtils {
|
|||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) throws EsignDemoException {
|
public static void main(String[] args) throws EsignDemoException {
|
||||||
String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\23893bfd3f2249ffa5c82850c11c482e.docx";
|
fileDownloadUrl("8425b244bf4b417dbb22fd39a1c2d65f");
|
||||||
|
|
||||||
EsignHttpResponse uploadUrl = getUploadUrl(filePath);
|
|
||||||
String body = uploadUrl.getBody();
|
|
||||||
JSONObject jsonObject = new JSONObject(body);
|
|
||||||
JSONObject dataObj = jsonObject.getJSONObject("data");
|
|
||||||
String fileUploadUrl = dataObj.get("fileUploadUrl").toString();
|
|
||||||
System.out.println("这是fileUploadUrl:"+fileUploadUrl);
|
|
||||||
String fileId = dataObj.get("fileId").toString();
|
|
||||||
System.out.println("这是fileId:"+fileId);
|
|
||||||
//String fileUploadUrl = "https://esignoss.esign.cn/1111564182/ccf6db5a-92da-4523-89ba-385a30423596/23893bfd3f2249ffa5c82850c11c482e.docx?Expires=1697021257&OSSAccessKeyId=STS.NTmgvSC8n5Zg1y7EciQftF23N&Signature=CxVZmpwFksWmLYkxPjVz9K4mVyA%3D&callback-var=eyJ4OmZpbGVfa2V5IjoiJDAyODhjOTg3LWNlNzgtNDM1OC04NWYwLTdlNmUyM2NjOTJmNiQzNDk1NzQ3MjE5In0%3D%0A&callback=eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9zbWx0YXBpLnRzaWduLmNuL2FueWRvb3IvZmlsZS1zeXN0ZW0vY2FsbGJhY2svYWxpb3NzIiwiY2FsbGJhY2tCb2R5IjogIntcIm1pbWVUeXBlXCI6JHttaW1lVHlwZX0sXCJzaXplXCI6ICR7c2l6ZX0sXCJidWNrZXRcIjogJHtidWNrZXR9LFwib2JqZWN0XCI6ICR7b2JqZWN0fSxcImV0YWdcIjogJHtldGFnfSxcImZpbGVfa2V5XCI6JHt4OmZpbGVfa2V5fX0iLCJjYWxsYmFja0JvZHlUeXBlIjogImFwcGxpY2F0aW9uL2pzb24ifQ%3D%3D%0A&security-token=CAIS%2BAF1q6Ft5B2yfSjIr5fYLMznrudPgpiMM1%2BGoWM8XelYqfeYrDz2IHtKdXRvBu8Xs%2F4wnmxX7f4YlqB6T55OSAmcNZEofT7katr4MeT7oMWQweEurv%2FMQBqyaXPS2MvVfJ%2BOLrf0ceusbFbpjzJ6xaCAGxypQ12iN%2B%2Fm6%2FNgdc9FHHPPD1x8CcxROxFppeIDKHLVLozNCBPxhXfKB0ca0WgVy0EHsPnvm5DNs0uH1AKjkbRM9r6ceMb0M5NeW75kSMqw0eBMca7M7TVd8RAi9t0t1%2FIVpGiY4YDAWQYLv0rda7DOltFiMkpla7MmXqlft%2BhzcgeQY0pc%2FRqAAaxcPCSY0Du8wgErfR1llD8t2zeFG%2B1mktU4Rsl7AgxsSFxrwILBUk2x7imVsFVA0kkS8rNBMDKGIsIZTCl5M7S2L%2BD8364htwcZgIZYHK2fCN6gCuy%2Bfk9C%2FfQaTc00IWBMw8OubuJ%2Fq2mdMh32yoi7dLuJyhwt1z%2F%2BWf5vIFHdIAA%3D";
|
|
||||||
EsignHttpResponse esignHttpResponse = uploadFile(fileUploadUrl, filePath);
|
|
||||||
System.out.println("这是上传文件流的结果:"+esignHttpResponse.getBody());
|
|
||||||
EsignHttpResponse fileStatus = getFileStatus(fileId);
|
|
||||||
System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
|
|
||||||
// getFileStatus("a808f1f39a744357a2f018e4ab34c55d");
|
|
||||||
// fileDownloadUrl("");
|
|
||||||
|
|
||||||
|
|
||||||
// Gson gson = new Gson();
|
|
||||||
// EsignHttpResponse fileDownload = fileDownloadUrl(signFlowId);
|
|
||||||
// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
|
// String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\23893bfd3f2249ffa5c82850c11c482e.docx";
|
||||||
// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
//
|
||||||
// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
// EsignHttpResponse uploadUrl = getUploadUrl(filePath);
|
||||||
// if(filesArray!=null&&filesArray.size()>0){
|
// String body = uploadUrl.getBody();
|
||||||
// JsonObject fileObject = (JsonObject)filesArray.get(0);
|
// JSONObject jsonObject = new JSONObject(body);
|
||||||
// String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
// JSONObject dataObj = jsonObject.getJSONObject("data");
|
||||||
// String fileName = java.util.UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
// String fileUploadUrl = dataObj.get("fileUploadUrl").toString();
|
||||||
// String savePath = "/home/ruoyi/uploadPath/upload";
|
// System.out.println("这是fileUploadUrl:"+fileUploadUrl);
|
||||||
// LocalDate now = LocalDate.now();
|
// String fileId = dataObj.get("fileId").toString();
|
||||||
// String year = Integer.toString(now.getYear());
|
// System.out.println("这是fileId:"+fileId);
|
||||||
// String month = String.format("%02d", now.getMonthValue());
|
// //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";
|
||||||
// String day = String.format("%02d", now.getDayOfMonth());
|
// EsignHttpResponse esignHttpResponse = uploadFile(fileUploadUrl, filePath);
|
||||||
// String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
// System.out.println("这是上传文件流的结果:"+esignHttpResponse.getBody());
|
||||||
// String fileDownloadUrlnew = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
// EsignHttpResponse fileStatus = getFileStatus(fileId);
|
||||||
// FileTransformation.downLoadFileByUrl(fileDownloadUrlnew,dir);
|
// System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package com.ruoyi.framework.config;
|
package com.ruoyi.framework.config;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
|
import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
|
||||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||||
import org.springframework.cache.annotation.EnableCaching;
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
@@ -75,10 +80,32 @@ public class RedisConfig extends CachingConfigurerSupport
|
|||||||
public ApplicationListener applicationListener() {
|
public ApplicationListener applicationListener() {
|
||||||
return (ApplicationListener<RedisKeyExpiredEvent>) event -> {
|
return (ApplicationListener<RedisKeyExpiredEvent>) event -> {
|
||||||
String key = new String(event.getSource());
|
String key = new String(event.getSource());
|
||||||
// 根据key查询案件表
|
if(key.startsWith(CacheConstants.CASE_KEY)) {
|
||||||
caseApplicationService.notAccept(key,"已超过案件受理期限五日,");
|
String[] split = key.split(CacheConstants.CASE_KEY);
|
||||||
|
if(split.length>1 && StrUtil.isNotEmpty(split[1])) {
|
||||||
|
caseApplicationService.notAccept(split[1], "已超过案件受理期限五日,");
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取字典缓存
|
||||||
|
*
|
||||||
|
* @param key 参数键
|
||||||
|
* @return dictDatas 字典数据列表
|
||||||
|
*/
|
||||||
|
public static String getCodeCache(String key)
|
||||||
|
{
|
||||||
|
String codeCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getVerifyCodeCacheKey(key));
|
||||||
|
if (StringUtils.isNotNull(codeCache))
|
||||||
|
{
|
||||||
|
return codeCache;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
private static String getVerifyCodeCacheKey(String key) {
|
||||||
|
return CacheConstants.CASE_KEY + key;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 限流脚本
|
* 限流脚本
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
// 过滤请求
|
// 过滤请求
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||||
.antMatchers("/login", "/register", "/captchaImage","/uploadPath/**","/websocket/**").permitAll()
|
.antMatchers("/login","/login/sso", "/register", "/captchaImage","/uploadPath/**","/websocket/**").permitAll()
|
||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||||
|
|||||||
+133
-23
@@ -1,33 +1,37 @@
|
|||||||
package com.ruoyi.framework.web.service;
|
package com.ruoyi.framework.web.service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.crypto.digest.MD5;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
|
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.entity.SysUser;
|
||||||
|
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||||
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.exception.user.*;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.ip.IpUtils;
|
||||||
|
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;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
import org.springframework.security.authentication.AuthenticationManager;
|
||||||
import org.springframework.security.authentication.BadCredentialsException;
|
import org.springframework.security.authentication.BadCredentialsException;
|
||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.constant.CacheConstants;
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
import javax.annotation.Resource;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
|
||||||
import com.ruoyi.common.exception.user.BlackListException;
|
|
||||||
import com.ruoyi.common.exception.user.CaptchaException;
|
|
||||||
import com.ruoyi.common.exception.user.CaptchaExpireException;
|
|
||||||
import com.ruoyi.common.exception.user.UserNotExistsException;
|
|
||||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
|
||||||
import com.ruoyi.common.utils.MessageUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.ip.IpUtils;
|
|
||||||
import com.ruoyi.framework.manager.AsyncManager;
|
|
||||||
import com.ruoyi.framework.manager.factory.AsyncFactory;
|
|
||||||
import com.ruoyi.framework.security.context.AuthenticationContextHolder;
|
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录校验方法
|
* 登录校验方法
|
||||||
@@ -51,6 +55,10 @@ public class SysLoginService
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysConfigService configService;
|
private ISysConfigService configService;
|
||||||
|
@Autowired
|
||||||
|
private SysRoleMapper roleMapper;
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper userMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录验证
|
* 登录验证
|
||||||
@@ -63,7 +71,6 @@ public class SysLoginService
|
|||||||
*/
|
*/
|
||||||
public String login(String username, String password, String code, String uuid)
|
public String login(String username, String password, String code, String uuid)
|
||||||
{
|
{
|
||||||
// 验证码校验
|
|
||||||
validateCaptcha(username, code, uuid);
|
validateCaptcha(username, code, uuid);
|
||||||
// 登录前置校验
|
// 登录前置校验
|
||||||
loginPreCheck(username, password);
|
loginPreCheck(username, password);
|
||||||
@@ -99,6 +106,45 @@ public class SysLoginService
|
|||||||
// 生成token
|
// 生成token
|
||||||
return tokenService.createToken(loginUser);
|
return tokenService.createToken(loginUser);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 无需验证码登录
|
||||||
|
* 重写login方法将验证码模块去掉
|
||||||
|
* @param username
|
||||||
|
* @param password
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String loginNoCaptcha(String username, String password, String uuid)
|
||||||
|
{
|
||||||
|
// 用户验证
|
||||||
|
Authentication authentication = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
|
||||||
|
AuthenticationContextHolder.setContext(authenticationToken);
|
||||||
|
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
|
||||||
|
authentication = authenticationManager.authenticate(authenticationToken);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
if (e instanceof BadCredentialsException)
|
||||||
|
{
|
||||||
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
|
||||||
|
throw new UserPasswordNotMatchException();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
|
||||||
|
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||||
|
recordLoginInfo(loginUser.getUserId());
|
||||||
|
// 生成token
|
||||||
|
return tokenService.createToken(loginUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验验证码
|
* 校验验证码
|
||||||
@@ -178,4 +224,68 @@ public class SysLoginService
|
|||||||
sysUser.setLoginDate(DateUtils.getNowDate());
|
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||||
userService.updateUserProfile(sysUser);
|
userService.updateUserProfile(sysUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AjaxResult loginSSO(LoginBody loginBody) {
|
||||||
|
// MD5加密并和Ticket比对
|
||||||
|
String currentTicket = MD5.create().digestHex("BM" + loginBody.getUsername());
|
||||||
|
if(!currentTicket.equals(loginBody.getTicket())){
|
||||||
|
return AjaxResult.error("ticket校验失败");
|
||||||
|
}
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
String username = loginBody.getUsername();
|
||||||
|
// 根据用户名获取用户信息,如果用户不存在则新增用户
|
||||||
|
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(username.contains("@")){
|
||||||
|
user.setEmail(username);
|
||||||
|
}
|
||||||
|
// 根据角色名查询角色id
|
||||||
|
Long roleIdByName = roleMapper.selectRoleIdByName(loginBody.getRoleName());
|
||||||
|
if(roleIdByName==null){
|
||||||
|
return AjaxResult.error("角色不存在");
|
||||||
|
}
|
||||||
|
user.setRoleIds( new Long[]{roleIdByName});
|
||||||
|
userService.insertUser(user);
|
||||||
|
|
||||||
|
}// 生成token
|
||||||
|
LoginUser loginUser = new LoginUser();
|
||||||
|
loginUser.setUser(user);
|
||||||
|
loginUser.setUserId(user.getUserId());
|
||||||
|
String token = tokenService.createToken(loginUser);
|
||||||
|
ajax.put("userName", user.getUserName());
|
||||||
|
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;
|
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.SysRole;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
import com.ruoyi.system.service.ISysMenuService;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
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 用户信息
|
* @param user 用户信息
|
||||||
* @return 角色权限信息
|
* @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())
|
if (user.isAdmin())
|
||||||
{
|
{
|
||||||
roles.add("admin");
|
SysRole sysRole = new SysRole();
|
||||||
|
sysRole.setRoleId(1L);
|
||||||
|
sysRole.setRoleKey("admin");
|
||||||
|
roles.add(sysRole);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -58,7 +63,9 @@ public class SysPermissionService
|
|||||||
// 管理员拥有所有权限
|
// 管理员拥有所有权限
|
||||||
if (user.isAdmin())
|
if (user.isAdmin())
|
||||||
{
|
{
|
||||||
perms.add("*:*:*");
|
// 查询所有数据权限,排除案件管理下的权限即可
|
||||||
|
perms.addAll(menuService.selectAdminMenu());
|
||||||
|
// perms.add("*:*:*");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.ruoyi.framework.web.service;
|
package com.ruoyi.framework.web.service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import com.ruoyi.common.constant.CacheConstants;
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
@@ -22,6 +13,16 @@ import eu.bitwalker.useragentutils.UserAgent;
|
|||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* token验证处理
|
* token验证处理
|
||||||
@@ -119,10 +120,27 @@ public class TokenService
|
|||||||
refreshToken(loginUser);
|
refreshToken(loginUser);
|
||||||
|
|
||||||
Map<String, Object> claims = new HashMap<>();
|
Map<String, Object> claims = new HashMap<>();
|
||||||
|
claims.put("userName",loginUser.getUsername());
|
||||||
|
claims.put("userId",loginUser.getUserId());
|
||||||
claims.put(Constants.LOGIN_USER_KEY, token);
|
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分钟,自动刷新缓存
|
* 验证令牌有效期,相差不足20分钟,自动刷新缓存
|
||||||
*
|
*
|
||||||
@@ -151,6 +169,7 @@ public class TokenService
|
|||||||
// 根据uuid将loginUser缓存
|
// 根据uuid将loginUser缓存
|
||||||
String userKey = getTokenKey(loginUser.getToken());
|
String userKey = getTokenKey(loginUser.getToken());
|
||||||
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
|
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -207,14 +226,24 @@ public class TokenService
|
|||||||
Claims claims = parseToken(token);
|
Claims claims = parseToken(token);
|
||||||
return claims.getSubject();
|
return claims.getSubject();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 从令牌中获取用户名
|
||||||
|
*
|
||||||
|
* @param token 令牌
|
||||||
|
* @return 用户名
|
||||||
|
*/
|
||||||
|
public String getUserNameFromToken(String token)
|
||||||
|
{
|
||||||
|
Claims claims = parseToken(token);
|
||||||
|
return claims.get("userName").toString();
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 获取请求token
|
* 获取请求token
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @return token
|
* @return token
|
||||||
*/
|
*/
|
||||||
private String getToken(HttpServletRequest request)
|
public String getToken(HttpServletRequest request)
|
||||||
{
|
{
|
||||||
String token = request.getHeader(header);
|
String token = request.getHeader(header);
|
||||||
if (StringUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX))
|
if (StringUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX))
|
||||||
|
|||||||
+16
-16
@@ -45,20 +45,20 @@
|
|||||||
<version>2.1.5</version>
|
<version>2.1.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<!-- <build>-->
|
||||||
<plugins>
|
<!-- <plugins>-->
|
||||||
<plugin>
|
<!-- <plugin>-->
|
||||||
<groupId>org.springframework.boot</groupId>
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||||
<configuration>
|
<!-- <configuration>-->
|
||||||
<excludes>
|
<!-- <excludes>-->
|
||||||
<exclude>
|
<!-- <exclude>-->
|
||||||
<groupId>org.projectlombok</groupId>
|
<!-- <groupId>org.projectlombok</groupId>-->
|
||||||
<artifactId>lombok</artifactId>
|
<!-- <artifactId>lombok</artifactId>-->
|
||||||
</exclude>
|
<!-- </exclude>-->
|
||||||
</excludes>
|
<!-- </excludes>-->
|
||||||
</configuration>
|
<!-- </configuration>-->
|
||||||
</plugin>
|
<!-- </plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>9</source><target>9</target></configuration></plugin>-->
|
||||||
</plugins>
|
<!-- </plugins>-->
|
||||||
</build>
|
<!-- </build>-->
|
||||||
</project>
|
</project>
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package com.ruoyi.system.domain.entity.flow;
|
package com.ruoyi.system.domain.entity.flow;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@@ -51,4 +52,9 @@ public class MsCaseFlow {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "button_auth_flag")
|
@Column(name = "button_auth_flag")
|
||||||
private String buttonAuthFlag;
|
private String buttonAuthFlag;
|
||||||
|
/**
|
||||||
|
* svg路径
|
||||||
|
*/
|
||||||
|
@Column(name = "file_name")
|
||||||
|
private String fileName;
|
||||||
}
|
}
|
||||||
+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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.ruoyi.system.domain.vo.flow;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
public class MsBaseCaseFlow {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件状态名称
|
||||||
|
*/
|
||||||
|
private String caseStatusName;
|
||||||
|
}
|
||||||
+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,11 +1,11 @@
|
|||||||
package com.ruoyi.system.domain.vo.flow;
|
package com.ruoyi.system.domain.vo.flow;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -57,4 +57,24 @@ public class MsCaseFlowVO {
|
|||||||
* 按钮权限标识符
|
* 按钮权限标识符
|
||||||
*/
|
*/
|
||||||
private String buttonAuthFlag;
|
private String buttonAuthFlag;
|
||||||
|
/**
|
||||||
|
* 角色名
|
||||||
|
*/
|
||||||
|
private String roleName;
|
||||||
|
/**
|
||||||
|
* 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);
|
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;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
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
|
* @return
|
||||||
*/
|
*/
|
||||||
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
|
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
|
||||||
|
SysUser selectUserByPhone(@Param("phonenumber")String phonenumber);
|
||||||
/**
|
/**
|
||||||
* 根据手机号查询用户信息
|
* 根据邮箱查询用户信息
|
||||||
* @param phone
|
* @param email
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SysUser selectUserByPhone(@Param("phone")String phone);
|
SysUser selectUserByEmail(@Param("email")String email);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门和角色查询用户
|
* 根据部门和角色查询用户
|
||||||
|
|||||||
@@ -67,4 +67,11 @@ public interface SysUserRoleMapper
|
|||||||
* @param roleId
|
* @param roleId
|
||||||
*/
|
*/
|
||||||
void insertUserRole(@Param("userId")Long userId, @Param("roleId")Long roleId);
|
void insertUserRole(@Param("userId")Long userId, @Param("roleId")Long roleId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id查询关联的角色id
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Long> selectRoleIdsByUserId(@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.system.mapper.flow;
|
package com.ruoyi.system.mapper.flow;
|
||||||
|
|
||||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||||
|
import com.ruoyi.system.domain.vo.flow.MsBaseCaseFlow;
|
||||||
|
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
@@ -16,9 +18,15 @@ public interface MsCaseFlowMapper extends Mapper<MsCaseFlow> {
|
|||||||
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort=f2.sort+1 ")
|
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort=f2.sort+1 ")
|
||||||
MsCaseFlow nextFlow(Integer caseFlowId);
|
MsCaseFlow nextFlow(Integer caseFlowId);
|
||||||
|
|
||||||
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort >= f2.sort+1 ")
|
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort >= f2.sort+1 order by f1.sort ")
|
||||||
List<MsCaseFlow> nextFlowall(Integer caseFlowId);
|
List<MsCaseFlow> nextFlowall(Integer caseFlowId);
|
||||||
|
|
||||||
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort=f2.sort+3 ")
|
@Select("select f1.id,f1.node_id nodeId,f1.node_name nodeName,f1.case_status_name caseStatusName,f1.back_flow_id backFlowId,f1.sort from ms_case_flow f1 join ms_case_flow f2 on f2.id=#{caseFlowId} and f1.sort=f2.sort+3 ")
|
||||||
MsCaseFlow nextFlow1(Integer caseFlowId);
|
MsCaseFlow nextFlow1(Integer caseFlowId);
|
||||||
|
|
||||||
|
@Select("SELECT r.role_name as roleName ,f.node_name as nodeName ,f.case_status_name as caseStatusName FROM ms_case_flow f left join ms_case_flow_role_related fr on f.id = fr.flow_id left join ms_sys_role r on fr.roleid = r.role_id WHERE f.id = #{caseFlowId} ")
|
||||||
|
List<MsCaseFlowVO> selectFlowRole(Integer caseFlowId);
|
||||||
|
@Select("select f1.id,f1.case_status_name caseStatusName,f1.sort from ms_case_flow f1 order by f1.sort")
|
||||||
|
|
||||||
|
List<MsBaseCaseFlow> selectCaseFlow();
|
||||||
}
|
}
|
||||||
+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;
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
import java.util.List;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import java.util.Set;
|
|
||||||
import com.ruoyi.common.core.domain.TreeSelect;
|
import com.ruoyi.common.core.domain.TreeSelect;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
import com.ruoyi.system.domain.vo.RouterVo;
|
import com.ruoyi.system.domain.vo.RouterVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单 业务层
|
* 菜单 业务层
|
||||||
*
|
*
|
||||||
@@ -141,4 +143,17 @@ public interface ISysMenuService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public boolean checkMenuNameUnique(SysMenu menu);
|
public boolean checkMenuNameUnique(SysMenu menu);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询管理员权限
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
|
Set<String> selectAdminMenu();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户查询菜单权限字符
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult getMenuPermsByUser();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.ruoyi.system.service;
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.system.domain.SysUserRole;
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色业务层
|
* 角色业务层
|
||||||
*
|
*
|
||||||
@@ -34,7 +34,7 @@ public interface ISysRoleService
|
|||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 权限列表
|
* @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,5 +1,7 @@
|
|||||||
package com.ruoyi.system.service.flow;
|
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.MsCaseFlowSearchVO;
|
||||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||||
|
|
||||||
@@ -8,13 +10,22 @@ import java.util.Set;
|
|||||||
public interface CaseFlowService {
|
public interface CaseFlowService {
|
||||||
/**
|
/**
|
||||||
* 查询案件流程节点信息
|
* 查询案件流程节点信息
|
||||||
|
*
|
||||||
* @param caseFlowSearchVO
|
* @param caseFlowSearchVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Object queryCaseFlowInfo(MsCaseFlowSearchVO caseFlowSearchVO);
|
Object queryCaseFlowInfo(MsCaseFlowSearchVO caseFlowSearchVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询案件流程信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult selectCaseFlow();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增或编辑案件流程节点信息
|
* 新增或编辑案件流程节点信息
|
||||||
|
*
|
||||||
* @param caseFlowVO
|
* @param caseFlowVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -22,6 +33,7 @@ public interface CaseFlowService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除案件流程节点信息
|
* 删除案件流程节点信息
|
||||||
|
*
|
||||||
* @param caseFlowVO
|
* @param caseFlowVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -29,6 +41,7 @@ public interface CaseFlowService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序案件流程节点
|
* 排序案件流程节点
|
||||||
|
*
|
||||||
* @param caseFlowSearchVO
|
* @param caseFlowSearchVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -36,8 +49,14 @@ public interface CaseFlowService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户角色关联的案件状态
|
* 查询用户角色关联的案件状态
|
||||||
|
*
|
||||||
* @param roles
|
* @param roles
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Set<Integer> getCaseStatusIdByRoleKey(Set<String> roles);
|
Set<Integer> getCaseStatusIdByRoleKey(Set<String> roles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询流程节点接收信息配置记录
|
||||||
|
*/
|
||||||
|
MsCaseFlowRoleSmsRelatedVO queryFlowReceiveRoleSmsRelated(Integer flowId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,33 @@
|
|||||||
package com.ruoyi.system.service.flow;
|
package com.ruoyi.system.service.flow;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlowRoleRelated;
|
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.MsCaseFlowSearchVO;
|
||||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||||
import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
|
import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
|
||||||
import com.ruoyi.system.mapper.flow.MsCaseFlowRoleRelatedMapper;
|
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.NewStringUtil;
|
||||||
import com.ruoyi.system.util.TableDataUtil;
|
import com.ruoyi.system.util.TableDataUtil;
|
||||||
import org.bouncycastle.crypto.DataLengthException;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import tk.mybatis.mapper.entity.Example;
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -40,15 +48,12 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object queryCaseFlowInfo(MsCaseFlowSearchVO caseFlowSearchVO) {
|
public Object queryCaseFlowInfo(MsCaseFlowSearchVO caseFlowSearchVO) {
|
||||||
|
if (caseFlowSearchVO == null || caseFlowSearchVO.getPageNum() == null || caseFlowSearchVO.getPageSize() == null) {
|
||||||
|
//查询所有案件流程节点信息
|
||||||
|
return msCaseFlowMapper.selectAll();
|
||||||
|
} else if (caseFlowSearchVO.getId() != null) {
|
||||||
//查询某个案件流程节点信息
|
//查询某个案件流程节点信息
|
||||||
if (caseFlowSearchVO.getId() != null) {
|
|
||||||
return msCaseFlowMapper.selectByPrimaryKey(caseFlowSearchVO.getId());
|
return msCaseFlowMapper.selectByPrimaryKey(caseFlowSearchVO.getId());
|
||||||
} else if (caseFlowSearchVO == null) {
|
|
||||||
//查询所有案件流程节点信息
|
|
||||||
return msCaseFlowMapper.selectAll();
|
|
||||||
} else if (caseFlowSearchVO.getPageNum() == null || caseFlowSearchVO.getPageSize() == null) {
|
|
||||||
//查询所有案件流程节点信息
|
|
||||||
return msCaseFlowMapper.selectAll();
|
|
||||||
} else {
|
} else {
|
||||||
//分页查询案件流程节点信息
|
//分页查询案件流程节点信息
|
||||||
Map<Integer, List<SysRole>> sysRoleMap = queryRoleByFlowId(null);
|
Map<Integer, List<SysRole>> sysRoleMap = queryRoleByFlowId(null);
|
||||||
@@ -89,6 +94,30 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
MsCaseFlow msCaseFlow1 = msCaseFlowMapper.selectByPrimaryKey(msCaseFlow.getBackFlowId());
|
MsCaseFlow msCaseFlow1 = msCaseFlowMapper.selectByPrimaryKey(msCaseFlow.getBackFlowId());
|
||||||
temp.setBackFlowName(msCaseFlow1 != null ? msCaseFlow1.getNodeName() : "");
|
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);
|
list.add(temp);
|
||||||
}
|
}
|
||||||
TableDataInfo tableDataInfo = TableDataUtil.rebuildTableDataInfo(list, total);
|
TableDataInfo tableDataInfo = TableDataUtil.rebuildTableDataInfo(list, total);
|
||||||
@@ -96,6 +125,12 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult selectCaseFlow() {
|
||||||
|
List<MsBaseCaseFlow> caseFlows = msCaseFlowMapper.selectCaseFlow();
|
||||||
|
return AjaxResult.success(caseFlows);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询流程信息相关的角色信息
|
* 查询流程信息相关的角色信息
|
||||||
*
|
*
|
||||||
@@ -125,6 +160,29 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地图片装64
|
||||||
|
*
|
||||||
|
* @param imgPath
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static String convertToBase64(String imgPath) {
|
||||||
|
byte[] data = null;
|
||||||
|
// 读取图片字节数组
|
||||||
|
try {
|
||||||
|
imgPath = imgPath.replace("/profile/upload", "/home/ruoyi/uploadPath/upload/");
|
||||||
|
InputStream in = Files.newInputStream(Paths.get(imgPath));
|
||||||
|
data = new byte[in.available()];
|
||||||
|
in.read(data);
|
||||||
|
in.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 返回Base64编码过的字节数组字符串
|
||||||
|
return Base64.getEncoder().encodeToString(Objects.requireNonNull(data));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增或编辑案件流程节点信息
|
* 新增或编辑案件流程节点信息
|
||||||
*
|
*
|
||||||
@@ -133,6 +191,7 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean saveCaseFlow(MsCaseFlowVO caseFlowVO) {
|
public Boolean saveCaseFlow(MsCaseFlowVO caseFlowVO) {
|
||||||
|
try {
|
||||||
if (caseFlowVO.getId() != null) {
|
if (caseFlowVO.getId() != null) {
|
||||||
//更新案件流程信息
|
//更新案件流程信息
|
||||||
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
||||||
@@ -141,7 +200,11 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
//更新流程节点和角色之间的关系
|
//更新流程节点和角色之间的关系
|
||||||
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
||||||
|
//更新流程节点和短信模板之间的关系
|
||||||
|
updateFlowMessageRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getReceiveRoleIds(), caseFlowVO.getSmsTemplateId());
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int sort = 1;
|
int sort = 1;
|
||||||
@@ -160,12 +223,46 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
if (insert > 0) {
|
if (insert > 0) {
|
||||||
//更新流程节点和角色之间的关系
|
//更新流程节点和角色之间的关系
|
||||||
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
updateFlowRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getRoleIds());
|
||||||
|
//更新流程节点和短信模板之间的关系
|
||||||
|
updateFlowMessageRoleByFlowId(msCaseFlow.getId(), caseFlowVO.getReceiveRoleIds(), caseFlowVO.getSmsTemplateId());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return false;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新流程节点和角色之间的关系
|
* 更新流程节点和角色之间的关系
|
||||||
*
|
*
|
||||||
@@ -228,6 +325,7 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序案件流程节点
|
* 排序案件流程节点
|
||||||
*
|
*
|
||||||
@@ -321,6 +419,44 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
|||||||
return caseStatusIds;
|
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
|
* 查询角色的案件状态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;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
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 com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.domain.TreeSelect;
|
import com.ruoyi.common.core.domain.TreeSelect;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
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.core.text.Convert;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
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.SysDeptMapper;
|
||||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
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
|
@Autowired
|
||||||
private SysRoleMapper roleMapper;
|
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());
|
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
|
@Override
|
||||||
public int deleteDeptById(Long deptId)
|
public int deleteDeptById(Long deptId)
|
||||||
{
|
{
|
||||||
|
// 查询部门是否与案件有关
|
||||||
|
List<Long> caseList = caseApplicationMapper.selectCaseByDeptId(deptId);
|
||||||
|
if(CollectionUtil.isNotEmpty(caseList)){
|
||||||
|
throw new ServiceException("该部门有关联案件,不允许删除");
|
||||||
|
}
|
||||||
|
|
||||||
return deptMapper.deleteDeptById(deptId);
|
return deptMapper.deleteDeptById(deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
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 com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
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.TreeSelect;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
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.SysRoleMapper;
|
||||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
|
import com.ruoyi.system.mapper.SysRoleMenuMapper;
|
||||||
import com.ruoyi.system.service.ISysMenuService;
|
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 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查询菜单
|
* 根据用户ID查询菜单
|
||||||
@@ -346,6 +373,8 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
return UserConstants.UNIQUE;
|
return UserConstants.UNIQUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取路由名称
|
* 获取路由名称
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
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 com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
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.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
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.SysRoleMenuMapper;
|
||||||
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
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
|
@Autowired
|
||||||
private SysRoleDeptMapper roleDeptMapper;
|
private SysRoleDeptMapper roleDeptMapper;
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询角色数据
|
* 根据条件分页查询角色数据
|
||||||
@@ -90,18 +93,11 @@ public class SysRoleServiceImpl implements ISysRoleService
|
|||||||
* @return 权限列表
|
* @return 权限列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Set<String> selectRolePermissionByUserId(Long userId)
|
public List<SysRole> selectRolePermissionByUserId(Long userId)
|
||||||
{
|
{
|
||||||
List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
|
List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
|
||||||
Set<String> permsSet = new HashSet<>();
|
|
||||||
for (SysRole perm : perms)
|
return perms;
|
||||||
{
|
|
||||||
if (StringUtils.isNotNull(perm))
|
|
||||||
{
|
|
||||||
permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return permsSet;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -233,6 +229,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
|||||||
{
|
{
|
||||||
// 新增角色信息
|
// 新增角色信息
|
||||||
roleMapper.insertRole(role);
|
roleMapper.insertRole(role);
|
||||||
|
redisCache.setCacheObject(CacheConstants.ROLE_KEY+role.getRoleName(),role.getRoleId());
|
||||||
return insertRoleMenu(role);
|
return insertRoleMenu(role);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,6 +247,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
|||||||
roleMapper.updateRole(role);
|
roleMapper.updateRole(role);
|
||||||
// 删除角色与菜单关联
|
// 删除角色与菜单关联
|
||||||
roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
|
roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
|
||||||
|
redisCache.setCacheObject(CacheConstants.ROLE_KEY+role.getRoleName(),role.getRoleId());
|
||||||
return insertRoleMenu(role);
|
return insertRoleMenu(role);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,10 +339,15 @@ public class SysRoleServiceImpl implements ISysRoleService
|
|||||||
@Transactional
|
@Transactional
|
||||||
public int deleteRoleById(Long roleId)
|
public int deleteRoleById(Long roleId)
|
||||||
{
|
{
|
||||||
|
// 根据角色id查询角色名
|
||||||
|
SysRole role = roleMapper.selectRoleById(roleId);
|
||||||
// 删除角色与菜单关联
|
// 删除角色与菜单关联
|
||||||
roleMenuMapper.deleteRoleMenuByRoleId(roleId);
|
roleMenuMapper.deleteRoleMenuByRoleId(roleId);
|
||||||
// 删除角色与部门关联
|
// 删除角色与部门关联
|
||||||
roleDeptMapper.deleteRoleDeptByRoleId(roleId);
|
roleDeptMapper.deleteRoleDeptByRoleId(roleId);
|
||||||
|
if(role!=null) {
|
||||||
|
redisCache.deleteObject(CacheConstants.ROLE_KEY + role.getRoleName());
|
||||||
|
}
|
||||||
return roleMapper.deleteRoleById(roleId);
|
return roleMapper.deleteRoleById(roleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,6 +361,11 @@ public class SysRoleServiceImpl implements ISysRoleService
|
|||||||
@Transactional
|
@Transactional
|
||||||
public int deleteRoleByIds(Long[] roleIds)
|
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)
|
for (Long roleId : roleIds)
|
||||||
{
|
{
|
||||||
checkRoleAllowed(new SysRole(roleId));
|
checkRoleAllowed(new SysRole(roleId));
|
||||||
@@ -367,6 +375,9 @@ public class SysRoleServiceImpl implements ISysRoleService
|
|||||||
{
|
{
|
||||||
throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName()));
|
throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName()));
|
||||||
}
|
}
|
||||||
|
if(roleMap.containsKey(roleId)) {
|
||||||
|
redisCache.deleteObject(CacheConstants.ROLE_KEY + roleMap.get(roleId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 删除角色与菜单关联
|
// 删除角色与菜单关联
|
||||||
roleMenuMapper.deleteRoleMenu(roleIds);
|
roleMenuMapper.deleteRoleMenu(roleIds);
|
||||||
|
|||||||
@@ -2,12 +2,15 @@ package com.ruoyi.system.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
|
import com.ruoyi.common.constant.CacheConstants;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUserDept;
|
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.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.bean.BeanValidators;
|
import com.ruoyi.common.utils.bean.BeanValidators;
|
||||||
@@ -18,6 +21,7 @@ import com.ruoyi.system.domain.SysUserRole;
|
|||||||
import com.ruoyi.system.mapper.*;
|
import com.ruoyi.system.mapper.*;
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -27,6 +31,7 @@ import org.springframework.util.CollectionUtils;
|
|||||||
|
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -65,6 +70,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected Validator validator;
|
protected Validator validator;
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
@Autowired
|
||||||
|
MsCaseApplicationMapper msCaseApplicationMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询用户列表
|
* 根据条件分页查询用户列表
|
||||||
@@ -241,7 +250,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult insertUser(SysUser user) {
|
public AjaxResult insertUser(SysUser user) {
|
||||||
// 新增用户信息
|
// 新增用户信息
|
||||||
|
user.setCreateBy("admin");
|
||||||
|
user.setCreateTime(DateUtils.getNowDate());
|
||||||
int rows = userMapper.insertUser(user);
|
int rows = userMapper.insertUser(user);
|
||||||
|
|
||||||
// 新增用户部门关联
|
// 新增用户部门关联
|
||||||
if(CollectionUtil.isNotEmpty(user.getDeptIds())) {
|
if(CollectionUtil.isNotEmpty(user.getDeptIds())) {
|
||||||
// 先删除用户与部门关联
|
// 先删除用户与部门关联
|
||||||
@@ -259,6 +271,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
insertUserPost(user);
|
insertUserPost(user);
|
||||||
// 新增用户与角色管理
|
// 新增用户与角色管理
|
||||||
insertUserRole(user);
|
insertUserRole(user);
|
||||||
|
// redis缓存
|
||||||
|
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||||
return AjaxResult.success("新建用户成功");
|
return AjaxResult.success("新建用户成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,7 +284,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean registerUser(SysUser user) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -305,6 +322,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
// 新增用户与岗位管理
|
// 新增用户与岗位管理
|
||||||
insertUserPost(user);
|
insertUserPost(user);
|
||||||
userMapper.updateUser(user);
|
userMapper.updateUser(user);
|
||||||
|
// redis缓存
|
||||||
|
user=userMapper.selectUserById(userId);
|
||||||
|
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||||
return AjaxResult.success("更新用户成功");
|
return AjaxResult.success("更新用户成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +349,10 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateUserStatus(SysUser user) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -340,7 +363,11 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateUserProfile(SysUser user) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -363,7 +390,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int resetPwd(SysUser user) {
|
public int resetPwd(SysUser user) {
|
||||||
return userMapper.updateUser(user);
|
int i = userMapper.updateUser(user);
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -437,10 +465,20 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public int deleteUserById(Long userId) {
|
public int deleteUserById(Long userId) {
|
||||||
// 删除用户与角色关联
|
// 删除用户与角色关联
|
||||||
userRoleMapper.deleteUserRoleByUserId(userId);
|
// userRoleMapper.deleteUserRoleByUserId(userId);
|
||||||
// 删除用户与岗位表
|
// 删除用户与岗位表
|
||||||
userPostMapper.deleteUserPostByUserId(userId);
|
// userPostMapper.deleteUserPostByUserId(userId);
|
||||||
return userMapper.deleteUserById(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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -452,17 +490,30 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int deleteUserByIds(Long[] userIds) {
|
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) {
|
for (Long userId : userIds) {
|
||||||
checkUserAllowed(new SysUser(userId));
|
checkUserAllowed(new SysUser(userId));
|
||||||
checkUserDataScope(userId);
|
checkUserDataScope(userId);
|
||||||
}
|
}
|
||||||
// 删除用户与角色关联
|
// 删除用户与角色关联
|
||||||
userRoleMapper.deleteUserRole(userIds);
|
// userRoleMapper.deleteUserRole(userIds);
|
||||||
// 删除用户与岗位关联
|
// 删除用户与岗位关联
|
||||||
userPostMapper.deleteUserPost(userIds);
|
// userPostMapper.deleteUserPost(userIds);
|
||||||
// 删除用户部门关联
|
// 删除用户部门关联
|
||||||
userDeptMapper.deleteUserByIds(userIds);
|
// userDeptMapper.deleteUserByIds(userIds);
|
||||||
return userMapper.deleteUserByIds(userIds);
|
int i = userMapper.deleteUserByIds(userIds);
|
||||||
|
for (Long userId : userIds) {
|
||||||
|
// 删除缓存
|
||||||
|
redisCache.deleteObject(CacheConstants.USER_KEY+userId);
|
||||||
|
}
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -492,6 +543,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
user.setPassword(SecurityUtils.encryptPassword(password));
|
user.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
user.setCreateBy(operName);
|
user.setCreateBy(operName);
|
||||||
userMapper.insertUser(user);
|
userMapper.insertUser(user);
|
||||||
|
// redis缓存
|
||||||
|
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||||
successNum++;
|
successNum++;
|
||||||
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功");
|
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功");
|
||||||
} else if (isUpdateSupport) {
|
} else if (isUpdateSupport) {
|
||||||
@@ -501,6 +554,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||||||
user.setUserId(u.getUserId());
|
user.setUserId(u.getUserId());
|
||||||
user.setUpdateBy(operName);
|
user.setUpdateBy(operName);
|
||||||
userMapper.updateUser(user);
|
userMapper.updateUser(user);
|
||||||
|
// redis缓存
|
||||||
|
user=userMapper.selectUserById(user.getUserId());
|
||||||
|
redisCache.setCacheObject(CacheConstants.USER_KEY+user.getUserId(),user);
|
||||||
successNum++;
|
successNum++;
|
||||||
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功");
|
successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+40
-1
@@ -1,7 +1,6 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.domain.dto.miniprogress;
|
package com.ruoyi.wisdomarbitrate.domain.dto.miniprogress;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -12,14 +11,30 @@ public class IdentityAuthentication extends BaseEntity {
|
|||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 角色id
|
||||||
|
*/
|
||||||
|
private Long roleId;
|
||||||
/** 姓名 */
|
/** 姓名 */
|
||||||
private String name;
|
private String name;
|
||||||
/** 身份证号 */
|
/** 身份证号 */
|
||||||
private String identityNo;
|
private String identityNo;
|
||||||
|
/**
|
||||||
|
* 身份类别,0-身份证,1-护照,默认0
|
||||||
|
*/
|
||||||
|
private Integer idType;
|
||||||
|
/**
|
||||||
|
* 国籍,0-国内,1-国外,默认0
|
||||||
|
*/
|
||||||
|
private Integer nationality;
|
||||||
/**
|
/**
|
||||||
* 短信验证码
|
* 短信验证码
|
||||||
*/
|
*/
|
||||||
private String VerifyCode;
|
private String VerifyCode;
|
||||||
|
/**
|
||||||
|
* email验证码
|
||||||
|
*/
|
||||||
|
private String emailVerifyCode;
|
||||||
private String passWord;
|
private String passWord;
|
||||||
private String phone;
|
private String phone;
|
||||||
/**
|
/**
|
||||||
@@ -36,6 +51,14 @@ public class IdentityAuthentication extends BaseEntity {
|
|||||||
/** 认证状态 */
|
/** 认证状态 */
|
||||||
private Integer certificationStatus;
|
private Integer certificationStatus;
|
||||||
|
|
||||||
|
public String getEmailVerifyCode() {
|
||||||
|
return emailVerifyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmailVerifyCode(String emailVerifyCode) {
|
||||||
|
this.emailVerifyCode = emailVerifyCode;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getCertificationStatus() {
|
public Integer getCertificationStatus() {
|
||||||
return certificationStatus;
|
return certificationStatus;
|
||||||
}
|
}
|
||||||
@@ -100,6 +123,22 @@ public class IdentityAuthentication extends BaseEntity {
|
|||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getIdType() {
|
||||||
|
return idType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdType(Integer idType) {
|
||||||
|
this.idType = idType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNationality() {
|
||||||
|
return nationality;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNationality(Integer nationality) {
|
||||||
|
this.nationality = nationality;
|
||||||
|
}
|
||||||
|
|
||||||
public void setUserId(Long userId) {
|
public void setUserId(Long userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
@@ -30,5 +30,17 @@ public class CaseConfirmPayDTO {
|
|||||||
* 缴费凭证
|
* 缴费凭证
|
||||||
*/
|
*/
|
||||||
private List<MsCaseAttach> payOrderList;
|
private List<MsCaseAttach> payOrderList;
|
||||||
|
/**
|
||||||
|
* 是否同意,0-拒绝,1-同意
|
||||||
|
*/
|
||||||
|
private Integer yesOrNo;
|
||||||
|
/**
|
||||||
|
* 拒绝原因
|
||||||
|
*/
|
||||||
|
private String reason;
|
||||||
|
/**
|
||||||
|
* 是否申请人确认缴费
|
||||||
|
*/
|
||||||
|
private Boolean applicantConfirm=true;
|
||||||
|
|
||||||
}
|
}
|
||||||
+14
-1
@@ -1,11 +1,14 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
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.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class SendMailRecord extends BaseEntity {
|
public class SendMailRecord extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -40,6 +43,16 @@ public class SendMailRecord extends BaseEntity {
|
|||||||
private Integer sendStatus;
|
private Integer sendStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/** 附件id */
|
||||||
|
private String fileIds;
|
||||||
|
|
||||||
|
/** 邮件主题 */
|
||||||
|
private String mailSubject;
|
||||||
|
|
||||||
|
/** 邮件发件人地址 */
|
||||||
|
private String mailFromAddress;
|
||||||
|
private List<MsCaseAttach> caseAttachList;
|
||||||
|
|
||||||
|
|
||||||
public Integer getSendStatus() {
|
public Integer getSendStatus() {
|
||||||
return sendStatus;
|
return sendStatus;
|
||||||
|
|||||||
+29
-5
@@ -2,11 +2,13 @@ package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.ruoyi.system.domain.entity.sms.MsSmsTemplateParam;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -16,6 +18,10 @@ public class SmsSendRecord extends BaseEntity {
|
|||||||
* ID
|
* ID
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 短信模板主键id
|
||||||
|
*/
|
||||||
|
private Long msSmsTemplateId;
|
||||||
/**
|
/**
|
||||||
* 案件申请id
|
* 案件申请id
|
||||||
*/
|
*/
|
||||||
@@ -33,21 +39,39 @@ public class SmsSendRecord extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date sendTime;
|
private Date sendTime;
|
||||||
/**
|
|
||||||
* 发送内容
|
|
||||||
*/
|
|
||||||
private String sendContent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送状态
|
* 发送状态
|
||||||
*/
|
*/
|
||||||
private Integer sendStatus;
|
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.caseId = caseId;
|
||||||
this.caseNum = caseNum;
|
this.caseNum = caseNum;
|
||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
this.sendTime = sendTime;
|
this.sendTime = sendTime;
|
||||||
this.sendContent = sendContent;
|
this.sendContent = sendContent;
|
||||||
|
this.sid = sid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -144,6 +144,27 @@ public class MsSealSignRecord {
|
|||||||
@Column(name = "position_ypsn_medi")
|
@Column(name = "position_ypsn_medi")
|
||||||
private double positionYpsnMedi;
|
private double positionYpsnMedi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人签名状态
|
||||||
|
*/
|
||||||
|
@Column(name = "sign_status_apply")
|
||||||
|
private Integer signStatusApply;
|
||||||
|
/**
|
||||||
|
* 被申请人签名状态
|
||||||
|
*/
|
||||||
|
@Column(name = "sign_status_response")
|
||||||
|
private Integer signStatusResponse;
|
||||||
|
/**
|
||||||
|
* 调解员签名状态
|
||||||
|
*/
|
||||||
|
@Column(name = "sign_status_mediator")
|
||||||
|
private Integer signStatusMediator;
|
||||||
|
/**
|
||||||
|
* 用印状态
|
||||||
|
*/
|
||||||
|
@Column(name = "seal_status")
|
||||||
|
private Integer sealStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+99
-106
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.domain.entity.mscase;
|
package com.ruoyi.wisdomarbitrate.domain.entity.mscase;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
@@ -7,6 +8,7 @@ import lombok.ToString;
|
|||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Transient;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -15,143 +17,134 @@ import java.util.Date;
|
|||||||
@Table(name = "ms_case_affiliate")
|
@Table(name = "ms_case_affiliate")
|
||||||
public class MsCaseAffiliate{
|
public class MsCaseAffiliate{
|
||||||
/**
|
/**
|
||||||
* 案件主表id,案件申请表主键
|
* id
|
||||||
*/
|
*/
|
||||||
@Id
|
@Id
|
||||||
|
@Column(name = "id")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 案件主表id,案件申请表主键
|
||||||
|
*/
|
||||||
@Column(name = "case_appli_id")
|
@Column(name = "case_appli_id")
|
||||||
private Long caseAppliId;
|
private Long caseAppliId;
|
||||||
/**
|
/**
|
||||||
* 是否机构申请,0-自然人,1-申请机构,默认0
|
* 用户id,用户表user_id关联
|
||||||
*/
|
*/
|
||||||
@Column(name = "organize_flag")
|
@Column(name = "user_id")
|
||||||
private Integer organizeFlag;
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 申请人id
|
* 申请机构id,和部门表id关联
|
||||||
*/
|
*/
|
||||||
@Column(name = "application_id")
|
@Column(name = "applicant_dept_id")
|
||||||
private String applicationId;
|
private Long applicantDeptId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请人名称
|
|
||||||
*/
|
|
||||||
@Column(name = "application_name")
|
|
||||||
private String applicationName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 代码(统一社会信用代码或者身份证号)
|
* 代码(统一社会信用代码或者身份证号)
|
||||||
*/
|
*/
|
||||||
@Column(name = "code")
|
@Transient
|
||||||
private String code;
|
private String code;
|
||||||
/**
|
/**
|
||||||
* 申请人联系电话
|
* 用户名
|
||||||
*/
|
*/
|
||||||
@Column(name = "application_phone")
|
@Transient
|
||||||
private String applicationPhone;
|
private String userName;
|
||||||
/**
|
|
||||||
* 申请人邮箱
|
|
||||||
*/
|
|
||||||
@Column(name = "application_email")
|
|
||||||
private String applicationEmail;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 法定代表人
|
* 法定代表人
|
||||||
*/
|
*/
|
||||||
@Column(name = "comp_legal_person")
|
@Transient
|
||||||
private String compLegalPerson;
|
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")
|
@Transient
|
||||||
private String applicantHome;
|
private Integer idType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 申请人联系地址
|
* 国籍,0-境内,1-境外,默认0
|
||||||
*/
|
*/
|
||||||
@Column(name = "applicant_address")
|
@Transient
|
||||||
private String applicantAddress;
|
private Integer nationality;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 委托代理人姓名
|
* 生日
|
||||||
*/
|
*/
|
||||||
@Column(name = "name_agent")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||||
private String nameAgent;
|
@Transient
|
||||||
|
private Date birth;
|
||||||
/**
|
/**
|
||||||
* 代理人联系电话
|
* 性别,0-男,1-女
|
||||||
*/
|
*/
|
||||||
@Column(name = "contact_telphone_agent")
|
@Transient
|
||||||
private String contactTelphoneAgent;
|
private String sex;
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理人邮箱
|
|
||||||
*/
|
|
||||||
@Column(name = "agent_email")
|
|
||||||
private String agentEmail;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请人快递单号
|
|
||||||
*/
|
|
||||||
@Column(name = "applicant_track_num")
|
|
||||||
private String applicantTrackNum;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 被申请人姓名
|
* 被申请人姓名
|
||||||
*/
|
*/
|
||||||
@Column(name = "respondent_name")
|
@Transient
|
||||||
private String respondentName;
|
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;
|
|
||||||
}
|
}
|
||||||
+20
-5
@@ -6,10 +6,7 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.*;
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@@ -99,7 +96,7 @@ public class MsCaseApplication {
|
|||||||
private String payType;
|
private String payType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁
|
* 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁,5-达成和解
|
||||||
*/
|
*/
|
||||||
@Column(name = "media_result")
|
@Column(name = "media_result")
|
||||||
private Integer mediaResult;
|
private Integer mediaResult;
|
||||||
@@ -209,4 +206,22 @@ public class MsCaseApplication {
|
|||||||
@Column(name = "is_reconci")
|
@Column(name = "is_reconci")
|
||||||
private Integer isReconci;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
+13
-3
@@ -73,8 +73,18 @@ public class MsCaseAttach {
|
|||||||
private Long sealStatus;
|
private Long sealStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是证据上传,0-否,1-是
|
* onlyOffice附件id
|
||||||
*/
|
*/
|
||||||
@Column(name = "is_batch_upload")
|
@Column(name = "only_office_file_id")
|
||||||
private Long isBatchUpload;
|
private String onlyOfficeFileId;
|
||||||
|
/**
|
||||||
|
* 对接其它系统返回的附件id
|
||||||
|
*/
|
||||||
|
@Column(name = "other_sys_file_id")
|
||||||
|
private String otherSysFileId;
|
||||||
|
/**
|
||||||
|
* 附件后缀
|
||||||
|
*/
|
||||||
|
@Column(name = "suffix")
|
||||||
|
private String suffix;
|
||||||
}
|
}
|
||||||
+69
@@ -0,0 +1,69 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.domain.entity.mscase;
|
||||||
|
|
||||||
|
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_case_audit")
|
||||||
|
public class MsCaseAudit {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(generator = "JDBC")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件申请id
|
||||||
|
*/
|
||||||
|
@Column(name = "case_appli_id")
|
||||||
|
private Long caseAppliId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件节点
|
||||||
|
*/
|
||||||
|
@Column(name = "case_node")
|
||||||
|
private Integer caseNode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件状态
|
||||||
|
*/
|
||||||
|
@Column(name = "case_status_name")
|
||||||
|
private String caseStatusName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否同意,0-拒绝,1-同意,默认1同意
|
||||||
|
*/
|
||||||
|
@Column(name = "yes_or_no")
|
||||||
|
private Integer yesOrNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人用户名
|
||||||
|
*/
|
||||||
|
@Column(name = "create_by")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人用户昵称
|
||||||
|
*/
|
||||||
|
@Column(name = "create_nick_name")
|
||||||
|
private String createNickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒绝原因
|
||||||
|
*/
|
||||||
|
@Column(name = "reason")
|
||||||
|
private String reason;
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user