Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c54981e584 | ||
|
|
cf42c93c6d | ||
|
|
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 |
@@ -1,11 +1,19 @@
|
||||
package com.ruoyi;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
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.SysUserMapper;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
@@ -30,5 +38,14 @@ public class RuoYiApplication
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
// 启动成功后,查询用户表,将用户信息存到redis
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,7 @@ import com.ruoyi.system.domain.vo.flow.MsCaseFlowSearchVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||
import com.ruoyi.system.service.flow.CaseFlowService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||
|
||||
@@ -28,6 +25,13 @@ public class CaseFlowController {
|
||||
public Object queryCaseFlowInfo(@RequestBody MsCaseFlowSearchVO 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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.Anonymous;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
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.system.service.ISysDictDataService;
|
||||
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);
|
||||
}
|
||||
/**
|
||||
* 根据字典类型查询字典数据信息,跳过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,17 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
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.flow.CaseFlowService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
||||
@@ -12,15 +21,9 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
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.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
@@ -43,6 +46,8 @@ public class SysLoginController {
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private CaseFlowService caseFlowService;
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
@@ -102,4 +107,19 @@ public class SysLoginController {
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println( MD5.create().digestHex("BMceshi" ));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+31
-3
@@ -4,12 +4,18 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.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.vo.miniprogress.WeChatUserVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.miniprogress.WeChatUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 微信小程序用户注册登录
|
||||
@@ -20,7 +26,10 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class WeChatUserController extends BaseController {
|
||||
@Autowired
|
||||
private WeChatUserService weChatUserService;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper roleMapper;
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
/**
|
||||
* 小程序端获取手机验证码
|
||||
* @param userVO
|
||||
@@ -35,14 +44,22 @@ public class WeChatUserController extends BaseController {
|
||||
}
|
||||
return weChatUserService.sendCode(userVO);
|
||||
}
|
||||
@Anonymous
|
||||
@GetMapping("/roles")
|
||||
public AjaxResult roles()
|
||||
{
|
||||
List<SysRole> list = roleMapper.selectRoleAll();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
/**
|
||||
* 小程序注册
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/registerUser")
|
||||
public AjaxResult registerUser( @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||
if(ientityAuthentication.getId()==null
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getName())
|
||||
if(
|
||||
// ientityAuthentication.getId()==null ||
|
||||
StrUtil.isEmpty(ientityAuthentication.getName())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getUserName())
|
||||
@@ -54,5 +71,16 @@ public class WeChatUserController extends BaseController {
|
||||
logger.info("调用小程序注册==="+ientityAuthentication.toString());
|
||||
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("用户名已存在!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+107
-13
@@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.IdCardUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
|
||||
@@ -47,33 +48,63 @@ public class MsCaseApplicationController extends BaseController {
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo page(MsCaseApplicationReq req)
|
||||
{
|
||||
//startPage();
|
||||
List<MsCaseApplicationVO> list = caseApplicationService.list(req);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 首页待办数量
|
||||
*/
|
||||
@GetMapping("/todoCount")
|
||||
public AjaxResult todoCount()
|
||||
{
|
||||
CaseToDoCountVO vo= caseApplicationService.todoCount();
|
||||
return success(vo);
|
||||
}
|
||||
/**
|
||||
* 根据登录人返回用户信息
|
||||
*/
|
||||
@GetMapping("/getUserInfo")
|
||||
public AjaxResult getUserInfo()
|
||||
{
|
||||
|
||||
|
||||
return success(caseApplicationService.getUserInfo());
|
||||
}
|
||||
/**
|
||||
* 新增案件
|
||||
*/
|
||||
// todo 重复提交校验
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult insert(@RequestBody MsCaseApplicationVO caseApplication )
|
||||
{
|
||||
if(caseApplication.getAffiliate()==null||caseApplication.getAffiliate().getOrganizeFlag()==null){
|
||||
error("参数校验失败");
|
||||
}
|
||||
|
||||
return success(caseApplicationService.insert(caseApplication));
|
||||
AjaxResult ajaxResult = AjaxResult.success();
|
||||
ajaxResult.put("caseNum",caseApplicationService.insert(caseApplication));
|
||||
return ajaxResult;
|
||||
}
|
||||
/**
|
||||
* 批量新增案件
|
||||
*/
|
||||
@PostMapping("/batchInsert")
|
||||
public AjaxResult batchInsert(@RequestBody MsCaseBatchInsertVO list )
|
||||
{
|
||||
|
||||
return caseApplicationService.batchInsert(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份证号获取性别和出生日期
|
||||
*/
|
||||
@GetMapping("/getInfoByIdCard")
|
||||
public AjaxResult getInfoByIdCard(@RequestParam("idCard") String idCard)
|
||||
public AjaxResult getInfoByIdCard(@RequestParam(value = "idCard" ,required = false) String idCard)
|
||||
{
|
||||
if(StrUtil.isEmpty(idCard)){
|
||||
error("参数校验失败");
|
||||
return error("身份证号不能为空");
|
||||
}
|
||||
if(!IdcardUtil.isValidCard(idCard)){
|
||||
error("身份证不合法,请输入正确的身份证号");
|
||||
return error("身份证不合法,请输入正确的身份证号");
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
Map<String, String> identityNumMap = IdCardUtils.getBirAgeSex(idCard);
|
||||
@@ -105,16 +136,27 @@ public class MsCaseApplicationController extends BaseController {
|
||||
}
|
||||
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查询案件
|
||||
*/
|
||||
@GetMapping("/selectById")
|
||||
public AjaxResult selectById(@RequestParam Long id )
|
||||
public AjaxResult selectById(@RequestParam(required = false) Long id ,@RequestParam(required = false) String caseNum )
|
||||
{
|
||||
if(id==null){
|
||||
error("id不能为空");
|
||||
if(id==null && caseNum==null ){
|
||||
error("参数校验失败");
|
||||
}
|
||||
return success(caseApplicationService.selectById(id));
|
||||
return success(caseApplicationService.selectById(id,caseNum));
|
||||
}
|
||||
/**
|
||||
* 案件压缩包导入
|
||||
@@ -122,6 +164,7 @@ public class MsCaseApplicationController extends BaseController {
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
|
||||
@PostMapping("/uploadCaseZipFile")
|
||||
public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file, @RequestParam("templateId") Long templateId) throws IOException {
|
||||
if(file.isEmpty()||templateId==null){
|
||||
@@ -129,6 +172,20 @@ public class MsCaseApplicationController extends BaseController {
|
||||
}
|
||||
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 +252,8 @@ public class MsCaseApplicationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/listMediator")
|
||||
public AjaxResult listMediator( ) {
|
||||
return caseApplicationService.listMediator();
|
||||
public AjaxResult listMediator( @RequestParam(value = "caseAppliId",required = false) Long caseAppliId) {
|
||||
return caseApplicationService.listMediator(caseAppliId);
|
||||
}
|
||||
/**
|
||||
* 保存预约
|
||||
@@ -255,12 +312,25 @@ public class MsCaseApplicationController extends BaseController {
|
||||
*/
|
||||
@PostMapping("/mediation")
|
||||
public AjaxResult mediation(@RequestBody MsCaseApplicationReq req) throws EsignDemoException, InterruptedException {
|
||||
if (req.getCaseFlowId() == null || req.getId() == null) {
|
||||
if (req.getCaseFlowId() == null || req.getId() == null || req.getMediaResult()==null) {
|
||||
return error("参数校验失败");
|
||||
}
|
||||
|
||||
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
|
||||
@@ -332,4 +402,28 @@ public class MsCaseApplicationController extends BaseController {
|
||||
|
||||
return success(videoService.reserveConferenceList(caseId));
|
||||
}
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/smsRecord")
|
||||
public TableDataInfo getSmsSendRecord(@RequestBody SmsSendRecord smsSendRecord){
|
||||
startPage();
|
||||
List<SmsSendRecord> list = caseApplicationService.getSmsSendRecord(smsSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 保存onlyOffice在线编辑的文件
|
||||
* @param
|
||||
* @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 缴费传入参数
|
||||
* @return 统一响应结果
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ public class MsCaseApplicationPayController extends BaseController {
|
||||
return casePaymentService.confirmPayment(dto);
|
||||
}
|
||||
/**
|
||||
* 确认已缴费,支持批量(batchNumber不为空,则为批量)
|
||||
* 财务确认已缴费,支持批量(batchNumber不为空,则为批量)
|
||||
* @param dto 缴费传入参数
|
||||
* @return 统一响应结果
|
||||
*/
|
||||
@@ -91,5 +91,18 @@ public class MsCaseApplicationPayController extends BaseController {
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.wisdomarbitrate.mscase;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
@@ -10,6 +12,8 @@ import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseLogRecordVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsSignSealService;
|
||||
import com.ruoyi.wisdomarbitrate.utils.SignVerifyUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -57,6 +61,38 @@ public class MsSignSealController extends BaseController {
|
||||
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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询案件进度
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,8 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
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
|
||||
password: YMzc157#
|
||||
# 从库数据源
|
||||
|
||||
@@ -17,8 +17,8 @@ ruoyi:
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 6001
|
||||
# 测试环境6001,开发环境7001
|
||||
port: 7001
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
@@ -131,8 +131,8 @@ mybatis:
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# configuration:
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
@@ -184,6 +184,20 @@ imConfig:
|
||||
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||
# 腾讯云密钥
|
||||
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||
# 调解机构代码配置
|
||||
organizeConfig:
|
||||
# creditCode
|
||||
creditCode: 910000058386410047
|
||||
# 引入仲裁系统url配置
|
||||
arbitrateConfig:
|
||||
url: http://121.40.189.20:9001/callArbitrateCaseApplication/generateCaseApplication
|
||||
# 回调通知
|
||||
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
|
||||
#jodconverter:
|
||||
# local:
|
||||
# host: 121.40.189.20
|
||||
|
||||
@@ -42,4 +42,12 @@ public class CacheConstants
|
||||
*/
|
||||
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
|
||||
public static final String WE_CHAT_SMS_VERIFY_CODE_KEY="we_chat_sms_verify_code:";
|
||||
/**
|
||||
* 案件 redis key
|
||||
*/
|
||||
public static final String CASE_KEY = "case_codes:";
|
||||
/**
|
||||
* 所有用户 redis key
|
||||
*/
|
||||
public static final String USER_KEY = "user_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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -63,8 +63,12 @@ public class SysUser extends BaseEntity
|
||||
|
||||
|
||||
/** 用户身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
/** 身份类别,0-身份证,1-护照,默认0 */
|
||||
private Integer idType;
|
||||
/** 国籍,0-国内,1-国外,默认0 */
|
||||
|
||||
private Integer nationality;
|
||||
|
||||
/** 用户邮箱 */
|
||||
@Excel(name = "用户邮箱")
|
||||
@@ -136,6 +140,22 @@ public class SysUser extends BaseEntity
|
||||
this.userId = 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 Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
@@ -361,6 +381,8 @@ public class SysUser extends BaseEntity
|
||||
.append("deptIds", getDeptIds())
|
||||
.append("userName", getUserName())
|
||||
.append("idCard", getIdCard())
|
||||
.append("idType", getIdType())
|
||||
.append("nationality", getNationality())
|
||||
.append("nickName", getNickName())
|
||||
.append("email", getEmail())
|
||||
.append("phonenumber", getPhonenumber())
|
||||
|
||||
@@ -26,12 +26,36 @@ public class LoginBody
|
||||
* 唯一标识
|
||||
*/
|
||||
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()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public String getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public void setTicket(String ticket) {
|
||||
this.ticket = ticket;
|
||||
}
|
||||
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
|
||||
@@ -16,10 +16,11 @@ public enum AnnexTypeEnum implements EnumsInterface {
|
||||
PAYMENT_RECEIPT(4, "申请人缴费单"),
|
||||
MEETING_VIDEO(5, "会议视频"),
|
||||
MEDIATE(6, "庭审笔录"),
|
||||
MEDIATE_BOOK(7, "调解书"),
|
||||
MEDIATE_BOOK(7, "调解书或和解协议"),
|
||||
MEDIATION_FILES(8, "调解资料"),
|
||||
RES_PAYMENT_RECEIPT(9, "被申请人缴费单"),
|
||||
SEAL_PICTURE(10, "印章图片"),
|
||||
FLOW_SVG(11, "流程节点SVG"),
|
||||
|
||||
|
||||
;
|
||||
|
||||
@@ -10,9 +10,10 @@ import com.ruoyi.common.interfaces.EnumsInterface;
|
||||
* @Created wangqiong
|
||||
*/
|
||||
public enum TemplateTypeEnum implements EnumsInterface {
|
||||
MEDIATION_APPLICATION(1, "调解申请书模板"),
|
||||
MEDIATION_APPLICATION(1, "机构调解申请书模板"),
|
||||
MEDIATION_AGREEMENT(2, "和解协议模板"),
|
||||
MEDIATE_BOOK(3, "调解书模板"),
|
||||
PERSON_MEDIATION_APPLICATION(4, "自然人调解申请书模板"),
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.mail.*;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
@Slf4j
|
||||
public final class EmailUtil {
|
||||
@@ -27,8 +24,8 @@ public final class EmailUtil {
|
||||
BodyPart bodyPart = multipart.getBodyPart(i);
|
||||
if(bodyPart.getContentType().contains("Message/Rfc822")){
|
||||
MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
|
||||
if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("裁决书")){
|
||||
String[] split = mimeMessage.getSubject().split("裁决书");
|
||||
if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("调解书")){
|
||||
String[] split = mimeMessage.getSubject().split("调解书");
|
||||
if(split.length>0){
|
||||
return split[0];
|
||||
}
|
||||
|
||||
@@ -16,8 +16,9 @@ public class MimeTypeUtils
|
||||
public static final String IMAGE_BMP = "image/bmp";
|
||||
|
||||
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" };
|
||||
|
||||
@@ -28,7 +29,7 @@ public class MimeTypeUtils
|
||||
|
||||
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
|
||||
// 图片
|
||||
"bmp", "gif", "jpg", "jpeg", "png",
|
||||
"bmp", "gif", "jpg", "jpeg", "png","svg",
|
||||
// word excel powerpoint
|
||||
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
|
||||
// 压缩文件
|
||||
@@ -52,6 +53,8 @@ public class MimeTypeUtils
|
||||
return "bmp";
|
||||
case IMAGE_GIF:
|
||||
return "gif";
|
||||
case IMAGE_SVG:
|
||||
return "svg";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
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 org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
@@ -75,10 +80,32 @@ public class RedisConfig extends CachingConfigurerSupport
|
||||
public ApplicationListener applicationListener() {
|
||||
return (ApplicationListener<RedisKeyExpiredEvent>) event -> {
|
||||
String key = new String(event.getSource());
|
||||
// 根据key查询案件表
|
||||
caseApplicationService.notAccept(key,"已超过案件受理期限五日,");
|
||||
if(key.startsWith(CacheConstants.CASE_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()
|
||||
// 对于登录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("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
|
||||
+103
-23
@@ -1,33 +1,35 @@
|
||||
package com.ruoyi.framework.web.service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
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.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
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;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 登录校验方法
|
||||
@@ -51,6 +53,8 @@ public class SysLoginService
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
@Autowired
|
||||
private SysRoleMapper roleMapper;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
@@ -63,7 +67,6 @@ public class SysLoginService
|
||||
*/
|
||||
public String login(String username, String password, String code, String uuid)
|
||||
{
|
||||
// 验证码校验
|
||||
validateCaptcha(username, code, uuid);
|
||||
// 登录前置校验
|
||||
loginPreCheck(username, password);
|
||||
@@ -99,6 +102,45 @@ public class SysLoginService
|
||||
// 生成token
|
||||
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 +220,42 @@ public class SysLoginService
|
||||
sysUser.setLoginDate(DateUtils.getNowDate());
|
||||
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 = userService.selectUserByUserName(username);
|
||||
if(user==null){
|
||||
// 新增用户
|
||||
user = new SysUser();
|
||||
user.setUserName(username);
|
||||
user.setPassword(SecurityUtils.encryptPassword("abc123456"));
|
||||
user.setNickName(username);
|
||||
// 代理人角色相当于申请人角色
|
||||
if(loginBody.getRoleName().contains("代理人")){
|
||||
loginBody.setRoleName("申请人");
|
||||
}
|
||||
// 根据角色名查询角色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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
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.Constants;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
@@ -22,6 +13,16 @@ import eu.bitwalker.useragentutils.UserAgent;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
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验证处理
|
||||
@@ -119,6 +120,8 @@ public class TokenService
|
||||
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);
|
||||
return createToken(claims);
|
||||
}
|
||||
@@ -207,14 +210,24 @@ public class TokenService
|
||||
Claims claims = parseToken(token);
|
||||
return claims.getSubject();
|
||||
}
|
||||
|
||||
/**
|
||||
* 从令牌中获取用户名
|
||||
*
|
||||
* @param token 令牌
|
||||
* @return 用户名
|
||||
*/
|
||||
public String getUserNameFromToken(String token)
|
||||
{
|
||||
Claims claims = parseToken(token);
|
||||
return claims.get("userName").toString();
|
||||
}
|
||||
/**
|
||||
* 获取请求token
|
||||
*
|
||||
* @param request
|
||||
* @return token
|
||||
*/
|
||||
private String getToken(HttpServletRequest request)
|
||||
public String getToken(HttpServletRequest request)
|
||||
{
|
||||
String token = request.getHeader(header);
|
||||
if (StringUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX))
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.ruoyi.system.domain.entity.flow;
|
||||
|
||||
import javax.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@@ -51,4 +52,9 @@ public class MsCaseFlow {
|
||||
*/
|
||||
@Column(name = "button_auth_flag")
|
||||
private String buttonAuthFlag;
|
||||
/**
|
||||
* svg路径
|
||||
*/
|
||||
@Column(name = "file_name")
|
||||
private String fileName;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -57,4 +56,13 @@ public class MsCaseFlowVO {
|
||||
* 按钮权限标识符
|
||||
*/
|
||||
private String buttonAuthFlag;
|
||||
/**
|
||||
* 角色名
|
||||
*/
|
||||
private String roleName;
|
||||
/**
|
||||
* svg图片路径
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.system.mapper.flow;
|
||||
|
||||
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 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 ")
|
||||
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);
|
||||
|
||||
@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);
|
||||
|
||||
@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();
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.service.flow;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowSearchVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||
|
||||
@@ -12,6 +13,11 @@ public interface CaseFlowService {
|
||||
* @return
|
||||
*/
|
||||
Object queryCaseFlowInfo(MsCaseFlowSearchVO caseFlowSearchVO);
|
||||
/**
|
||||
* 查询案件流程信息
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectCaseFlow();
|
||||
|
||||
/**
|
||||
* 新增或编辑案件流程节点信息
|
||||
@@ -40,4 +46,6 @@ public interface CaseFlowService {
|
||||
* @return
|
||||
*/
|
||||
Set<Integer> getCaseStatusIdByRoleKey(Set<String> roles);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,12 @@ package com.ruoyi.system.service.flow;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
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.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlowRoleRelated;
|
||||
import com.ruoyi.system.domain.vo.flow.MsBaseCaseFlow;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowSearchVO;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
@@ -14,12 +15,15 @@ import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
|
||||
import com.ruoyi.system.mapper.flow.MsCaseFlowRoleRelatedMapper;
|
||||
import com.ruoyi.system.util.NewStringUtil;
|
||||
import com.ruoyi.system.util.TableDataUtil;
|
||||
import org.bouncycastle.crypto.DataLengthException;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
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.stream.Collectors;
|
||||
|
||||
@@ -40,15 +44,12 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
*/
|
||||
@Override
|
||||
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());
|
||||
} else if (caseFlowSearchVO == null) {
|
||||
//查询所有案件流程节点信息
|
||||
return msCaseFlowMapper.selectAll();
|
||||
} else if (caseFlowSearchVO.getPageNum() == null || caseFlowSearchVO.getPageSize() == null) {
|
||||
//查询所有案件流程节点信息
|
||||
return msCaseFlowMapper.selectAll();
|
||||
} else {
|
||||
//分页查询案件流程节点信息
|
||||
Map<Integer, List<SysRole>> sysRoleMap = queryRoleByFlowId(null);
|
||||
@@ -96,6 +97,12 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectCaseFlow() {
|
||||
List<MsBaseCaseFlow> caseFlows = msCaseFlowMapper.selectCaseFlow();
|
||||
return AjaxResult.success(caseFlows);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流程信息相关的角色信息
|
||||
*
|
||||
@@ -125,6 +132,27 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
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 +161,7 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean saveCaseFlow(MsCaseFlowVO caseFlowVO) {
|
||||
|
||||
if (caseFlowVO.getId() != null) {
|
||||
//更新案件流程信息
|
||||
MsCaseFlow msCaseFlow = new MsCaseFlow();
|
||||
@@ -228,6 +257,8 @@ public class CaseFlowServiceImpl implements CaseFlowService {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 排序案件流程节点
|
||||
*
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.entity.SysUserDept;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.bean.BeanValidators;
|
||||
@@ -241,6 +242,8 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||
@Transactional
|
||||
public AjaxResult insertUser(SysUser user) {
|
||||
// 新增用户信息
|
||||
user.setCreateBy("admin");
|
||||
user.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = userMapper.insertUser(user);
|
||||
// 新增用户部门关联
|
||||
if(CollectionUtil.isNotEmpty(user.getDeptIds())) {
|
||||
|
||||
+28
-1
@@ -1,7 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto.miniprogress;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,10 +11,22 @@ public class IdentityAuthentication extends BaseEntity {
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Long roleId;
|
||||
/** 姓名 */
|
||||
private String name;
|
||||
/** 身份证号 */
|
||||
private String identityNo;
|
||||
/**
|
||||
* 身份类别,0-身份证,1-护照,默认0
|
||||
*/
|
||||
private Integer idType;
|
||||
/**
|
||||
* 国籍,0-国内,1-国外,默认0
|
||||
*/
|
||||
private Integer nationality;
|
||||
/**
|
||||
* 短信验证码
|
||||
*/
|
||||
@@ -100,6 +111,22 @@ public class IdentityAuthentication extends BaseEntity {
|
||||
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) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
+12
@@ -30,5 +30,17 @@ public class CaseConfirmPayDTO {
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<MsCaseAttach> payOrderList;
|
||||
/**
|
||||
* 是否同意,0-拒绝,1-同意
|
||||
*/
|
||||
private Integer yesOrNo;
|
||||
/**
|
||||
* 拒绝原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 是否申请人确认缴费
|
||||
*/
|
||||
private Boolean applicantConfirm=true;
|
||||
|
||||
}
|
||||
+21
@@ -144,6 +144,27 @@ public class MsSealSignRecord {
|
||||
@Column(name = "position_ypsn_medi")
|
||||
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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+10
@@ -154,4 +154,14 @@ public class MsCaseAffiliate {
|
||||
*/
|
||||
@Column(name = "is_sign_respon")
|
||||
private Integer isSignRespon;
|
||||
/**
|
||||
* 身份类别,0-身份证,1-护照,默认0
|
||||
*/
|
||||
@Column(name = "id_type")
|
||||
private Integer idType;
|
||||
/**
|
||||
* 国籍,0-国内,1-国外,默认0
|
||||
*/
|
||||
@Column(name = "nationality")
|
||||
private Integer nationality;
|
||||
}
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class MsCaseApplication {
|
||||
private String payType;
|
||||
|
||||
/**
|
||||
* 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁
|
||||
* 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁,5-达成和解
|
||||
*/
|
||||
@Column(name = "media_result")
|
||||
private Integer mediaResult;
|
||||
|
||||
+3
-3
@@ -73,8 +73,8 @@ public class MsCaseAttach {
|
||||
private Long sealStatus;
|
||||
|
||||
/**
|
||||
* 是否是证据上传,0-否,1-是
|
||||
* onlyOffice附件id
|
||||
*/
|
||||
@Column(name = "is_batch_upload")
|
||||
private Long isBatchUpload;
|
||||
@Column(name = "only_office_file_id")
|
||||
private String onlyOfficeFileId;
|
||||
}
|
||||
+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;
|
||||
}
|
||||
+1
-1
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
public class StringIdsReq {
|
||||
private List<String> ids;
|
||||
/**
|
||||
* 签署人账号(即仲裁员手机号)
|
||||
* 签署人账号(即调解员手机号)
|
||||
*/
|
||||
private String psnAccount;
|
||||
/**
|
||||
|
||||
+3
-4
@@ -2,7 +2,6 @@ package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import lombok.Data;
|
||||
@@ -40,13 +39,13 @@ public class CaseApplicationVO {
|
||||
/** 立案日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date registerDate;
|
||||
/** 仲裁方式 */
|
||||
/** 调解方式 */
|
||||
private Integer arbitratMethod;
|
||||
/**
|
||||
* 是否导入,0手动录入,1导入,默认0
|
||||
*/
|
||||
private Integer importFlag;
|
||||
/** 仲裁方式名称 */
|
||||
/** 调解方式名称 */
|
||||
private String arbitratMethodName;
|
||||
|
||||
/** 案件状态 */
|
||||
@@ -60,7 +59,7 @@ public class CaseApplicationVO {
|
||||
private Integer respondentIsWrittenHear;
|
||||
/** 开庭方式是否一致 */
|
||||
private Integer arbitraMethodIssame;
|
||||
/** 仲裁方式说明 */
|
||||
/** 调解方式说明 */
|
||||
private String arbitratMethodIllustrate;
|
||||
|
||||
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Classname CaseToDoCount
|
||||
* @Description 代办案件数量
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/1/15 15:48
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
public class CaseToDoCount {
|
||||
/**
|
||||
* 流程表id
|
||||
*/
|
||||
private Integer caseFlowId;
|
||||
/**
|
||||
* 流程状态
|
||||
*/
|
||||
private String caseStatusName;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Long caseCount;
|
||||
/**
|
||||
* base64
|
||||
*/
|
||||
private String fileName;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Classname CaseToDoCountVO
|
||||
* @Description 代办案件数量返回VO
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/1/15 15:48
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
public class CaseToDoCountVO {
|
||||
/**
|
||||
* 待办数量
|
||||
*/
|
||||
private List<CaseToDoCount> toDoCountList;
|
||||
|
||||
}
|
||||
@@ -31,4 +31,8 @@ public class MediatorVO {
|
||||
* 已办数量
|
||||
*/
|
||||
private Long completeAmount;
|
||||
/**
|
||||
* 是否回显,true为回显,false为不回显
|
||||
*/
|
||||
private Boolean EchoFlag=false;
|
||||
}
|
||||
|
||||
+9
-1
@@ -35,7 +35,7 @@ public class MsCaseApplicationReq {
|
||||
/**
|
||||
* 申请机构
|
||||
*/
|
||||
private String applicationOrganId;
|
||||
private List<Long> applicationOrganIds;
|
||||
/**
|
||||
* 是否申请人,不为空则是申请人
|
||||
*/
|
||||
@@ -95,9 +95,17 @@ public class MsCaseApplicationReq {
|
||||
* 是否小程序,1-是
|
||||
*/
|
||||
private Integer miniProgressFlag ;
|
||||
/**
|
||||
* 是否线上调解,1-线上调解
|
||||
*/
|
||||
private Integer mediationMethod ;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private List<MsCaseAttach> attachList;
|
||||
/**
|
||||
* 代理人电话
|
||||
*/
|
||||
private String contactTelphoneAgent;
|
||||
|
||||
}
|
||||
+19
-1
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
@@ -7,6 +8,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -65,6 +67,22 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
||||
* 拒绝原因
|
||||
*/
|
||||
private String rejectReason;
|
||||
|
||||
/**
|
||||
* 调解方式名称,1-线上调解,2-线下调解
|
||||
*/
|
||||
private String mediationMethodName;
|
||||
/**
|
||||
* 缴费拒绝原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 签名按钮显示,0-显示,1-不显示
|
||||
*/
|
||||
private Integer signButtonFlag;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Classname MsCaseBatchInsertVO
|
||||
* @Description 批量新增案件
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/11 10:04
|
||||
* @Created wangqiong
|
||||
*/
|
||||
@Data
|
||||
public class MsCaseBatchInsertVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private List<MsCaseApplicationVO> list;
|
||||
}
|
||||
+4
@@ -64,6 +64,10 @@ public class MsCaseLogRecordVO {
|
||||
*/
|
||||
private String content;
|
||||
|
||||
private Integer nodeId;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+2
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.mapper.dept;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,4 +25,5 @@ public interface DeptIdentifyMapper {
|
||||
* @return
|
||||
*/
|
||||
String selectById(@Param("id") Long identifyId);
|
||||
|
||||
}
|
||||
|
||||
+89
-7
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper.mscase;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.CaseToDoCount;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationReq;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -34,10 +35,24 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
* @param caseStatusNames
|
||||
* @return
|
||||
*/
|
||||
@Select("<script> select t.* from (select c.id,c.room_id roomId,c.mediation_method mediationMethod,0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
|
||||
@Select("<script> select t.* from (select c.media_result mediaResult,c.id,c.room_id roomId,c.mediation_method mediationMethod," +
|
||||
" CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
|
||||
+
|
||||
"0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
|
||||
"a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
|
||||
"c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_application c " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> "
|
||||
+
|
||||
"<if test=\"req.mediatorId != null \">" +
|
||||
" AND c.mediator_id = #{req.mediatorId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0 '> and (a.application_id in" +
|
||||
"<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
|
||||
"#{organId}" +
|
||||
"</foreach> or a.contact_telphone_agent=#{req.contactTelphoneAgent} )" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c.case_status_name in" +
|
||||
"<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
|
||||
"#{caseStatus}" +
|
||||
@@ -48,9 +63,14 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
"</if> " +
|
||||
"<if test=\"req.caseFlowId != null \">" +
|
||||
" AND c.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.mediationMethod != null \">" +
|
||||
" AND c.mediation_method = #{req.mediationMethod} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.caseNum != null and req.caseNum != ''\">" +
|
||||
" AND c.case_num = #{req.caseNum} " +
|
||||
" AND c.case_num like concat('%', #{req.caseNum}, '%') "+
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
@@ -61,13 +81,32 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
"<if test=\"req.endTime != null and req.endTime != ''\">" +
|
||||
"and c.create_time <= #{req.endTime}</if>" +
|
||||
" </where> " +
|
||||
"union select c.id id,c.room_id roomId,c.mediation_method mediationMethod,1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
|
||||
"union select c.media_result mediaResult,c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
|
||||
+
|
||||
" CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
|
||||
+
|
||||
"1 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
|
||||
"a.application_name applicationName,a.respondent_name respondentName,c.mediator_name mediatorName," +
|
||||
"c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime from ms_case_log_record r " +
|
||||
"join ms_case_application c on r.case_appli_id=c.id " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> r.create_by=#{req.userName} and c.id not in (" +
|
||||
"select c1.id from ms_case_application c1 JOIN ms_case_affiliate a1 ON a1.case_appli_id = c1.id"
|
||||
+
|
||||
"<if test=\"req.mediatorId != null \">" +
|
||||
" AND c1.mediator_id = #{req.mediatorId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.mediationMethod != null \">" +
|
||||
" AND c1.mediation_method = #{req.mediationMethod} " +
|
||||
"</if> "
|
||||
+
|
||||
|
||||
"<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0 '> and (a.application_id in" +
|
||||
"<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
|
||||
"#{organId}" +
|
||||
"</foreach> or a.contact_telphone_agent=#{req.contactTelphoneAgent} )" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c1.case_status_name in" +
|
||||
"<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
|
||||
"#{caseStatus}" +
|
||||
@@ -78,7 +117,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
" AND c1.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseNum != null and req.caseNum != ''\">" +
|
||||
" AND c1.case_num = #{req.caseNum} " +
|
||||
" AND c1.case_num like concat('%', #{req.caseNum}, '%') " +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a1.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
@@ -95,7 +134,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
" AND c.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseNum != null and req.caseNum != ''\">" +
|
||||
" AND c.case_num = #{req.caseNum} " +
|
||||
" AND c.case_num like concat('%', #{req.caseNum}, '%')" +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
@@ -122,4 +161,47 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
|
||||
*/
|
||||
@Select("select max(room_id) maxRoomId from ms_reserved_conference")
|
||||
Long selectMaxRoomId();
|
||||
|
||||
/**
|
||||
* 待办数量
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
@Select(" <script> SELECT c.case_flow_id caseFlowId,count(c.id) caseCount " +
|
||||
"FROM ms_case_application c " +
|
||||
"join ms_case_affiliate a on c.id=a.case_appli_id <where> " +
|
||||
"<if test=\"req.mediatorId != null \">" +
|
||||
" AND c.mediator_id = #{req.mediatorId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='req.applicantFlag != null and req.applicationOrganIds != null and req.applicationOrganIds.size() > 0 '> and (a.application_id in" +
|
||||
"<foreach item='organId' index='index' collection='req.applicationOrganIds' open='(' separator=',' close=')'>" +
|
||||
"#{organId}" +
|
||||
"</foreach> or a.contact_telphone_agent=#{req.contactTelphoneAgent} )" +
|
||||
"</if> "
|
||||
+
|
||||
"<if test='caseStatusNames != null and caseStatusNames.size() > 0 '> and c.case_status_name in" +
|
||||
"<foreach item='caseStatus' index='index' collection='caseStatusNames' open='(' separator=',' close=')'>" +
|
||||
"#{caseStatus}" +
|
||||
"</foreach>" +
|
||||
"</if> " +
|
||||
"<if test=\"req.batchNumber != null and req.batchNumber != ''\">" +
|
||||
" AND c.batch_number = #{req.batchNumber} " +
|
||||
"</if> " +
|
||||
"<if test=\"req.caseFlowId != null \">" +
|
||||
" AND c.case_flow_id = #{req.caseFlowId} " +
|
||||
"</if> "
|
||||
+
|
||||
"<if test=\"req.mediationMethod != null \">" +
|
||||
" AND c.mediation_method = #{req.mediationMethod} " +
|
||||
"</if> "
|
||||
+ "<if test=\"req.respondentIdentityNum != null and req.respondentIdentityNum != ''\">" +
|
||||
" AND a.respondent_identity_num = #{req.respondentIdentityNum} " +
|
||||
"</if> "
|
||||
+
|
||||
" </where> " +
|
||||
"group by c.case_flow_id,c.case_status_name"+
|
||||
" </script>"
|
||||
)
|
||||
List<CaseToDoCount> todoCount(@Param("req")MsCaseApplicationReq req, @Param("caseStatusNames") List<String> caseStatusNames);
|
||||
}
|
||||
+12
-1
@@ -35,7 +35,18 @@ public interface MsCaseAttachMapper {
|
||||
*/
|
||||
void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
|
||||
|
||||
void deleteCaseAttachByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType);
|
||||
void deleteCaseAttachByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") Integer annexType);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
*/
|
||||
void batchDelete(@Param("ids")List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据附件名查找数量
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId);
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper.mscase;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAudit;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MsCaseAuditMapper extends Mapper<MsCaseAudit> {
|
||||
/**
|
||||
* 查询拒绝原因
|
||||
* @param id
|
||||
* @param caseFlowId
|
||||
* @return
|
||||
*/
|
||||
@Select("select reason from ms_case_audit where case_appli_id=#{caseAppliId} and case_node=#{caseFlowId} order by id desc limit 1")
|
||||
String selectByCaseId(@Param("caseAppliId") Long id, @Param("caseFlowId") Integer caseFlowId);
|
||||
}
|
||||
+19
-20
@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface MsCaseLogRecordMapper extends Mapper<MsCaseLogRecord> {
|
||||
@@ -16,26 +17,12 @@ public interface MsCaseLogRecordMapper extends Mapper<MsCaseLogRecord> {
|
||||
*/
|
||||
List<MsCaseLogRecord> selectCompleteByCreateBy(@Param("list") List<String> list);
|
||||
|
||||
@Select("<script> select cl.case_node caseNode ,cl.case_node_time caseNodeTime ,cl.notes ,cl.id ,cl.case_appli_id caseAppliId," +
|
||||
" cl.create_by createBy,cl.create_nick_name createNickName,cl.create_time createTime, " +
|
||||
" CASE cl.case_node when 0 then '新增案件' " +
|
||||
"when 1 then '提交案件' when 2 then '缴费' " +
|
||||
" when 3 then '确认缴费' when 4 then '受理分配' when 5 then '选择调解员' " +
|
||||
" when 6 then '核实调解员' when 7 then '确认调解员' when 8 then '确定调解时间' " +
|
||||
" when 9 then '调解' when 10 then '确认调解书' when 11 then '签名' " +
|
||||
" when 12 then '用印申请' when 13 then '用印' when 14 then '归档' " +
|
||||
" when 15 then '签收' when 16 then '结束' " +
|
||||
" ELSE '无案件状态' " +
|
||||
" END content, " +
|
||||
" CASE cl.case_node when 1 then '申请人' when 2 then '申请人' " +
|
||||
" when 3 then '财务' when 4 then '法律顾问' when 5 then '申请人' " +
|
||||
" when 6 then '法律顾问' when 7 then '部门长' when 8 then '法律顾问' " +
|
||||
" when 9 then '法律顾问' when 10 then '申请人' when 11 then '申请人' " +
|
||||
" when 12 then '法律顾问' when 13 then '部门长' when 14 then '法律顾问' " +
|
||||
" when 15 then '申请人' when 16 then '无角色' " +
|
||||
" ELSE '无角色' " +
|
||||
" END roleName " +
|
||||
" from ms_case_log_record cl " +
|
||||
|
||||
@Select("<script> select cl.case_node caseNode ,cl.case_status_name caseStatusName ,cl.case_node_time caseNodeTime , cl.notes , " +
|
||||
" cl.id ,cl.case_appli_id caseAppliId ,cl.create_by createBy ,cl.create_nick_name createNickName, " +
|
||||
" cl.create_time createTime ,f.node_name content " +
|
||||
" from ms_case_log_record cl left join ms_case_flow f " +
|
||||
" on cl.case_node = f.node_id " +
|
||||
" <where> " +
|
||||
" <if test=\"caseLogRecord.caseAppliId != null and caseLogRecord.caseAppliId != ''\">" +
|
||||
" AND cl.case_appli_id = #{caseLogRecord.caseAppliId} " +
|
||||
@@ -44,4 +31,16 @@ public interface MsCaseLogRecordMapper extends Mapper<MsCaseLogRecord> {
|
||||
" order by create_time asc " +
|
||||
" </script>")
|
||||
List<MsCaseLogRecordVO> selectCaseLogRecordList(@Param("caseLogRecord") MsCaseLogRecord caseLogRecord);
|
||||
|
||||
@Select("SELECT group_concat( DISTINCT t.createNickName) createNickName,t.nodeName content,t.nodeId,t.sort ,t.caseStatusName FROM (SELECT l.create_nick_name createNickName ,f.node_name nodeName,f.node_id nodeId, f.sort, f.case_status_name caseStatusName FROM ms_case_log_record l left join ms_case_flow f on l.case_node = f.node_id WHERE l.case_appli_id = #{caseAppliId} and f.node_name is not null ) t group by t.nodeName,t.nodeId,t.sort ,t.caseStatusName order by t.sort ")
|
||||
List<MsCaseLogRecordVO> selectCaseLogRecordListCaseProgress(Long caseAppliId);
|
||||
|
||||
/**
|
||||
* 根据案件id查询结束时间
|
||||
* @param caseAppliId
|
||||
* @param caseStatusName
|
||||
* @return
|
||||
*/
|
||||
@Select("SELECT create_time endTime FROM ms_case_log_record where case_appli_id=#{caseAppliId} and case_status_name=#{caseStatusName} order by create_time desc limit 1")
|
||||
Date selectEndTimeByCaseId(@Param("caseAppliId") Long caseAppliId, @Param("caseStatusName") String caseStatusName);
|
||||
}
|
||||
+15
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface TemplateManageMapper {
|
||||
List<TemplateManage> selectTemplateList(TemplateManage templateManage);
|
||||
List<TemplateManage> selectTemplateListByIds(@Param("fileIds") List<Long> fileIds);
|
||||
|
||||
int insertTemplateManage(TemplateManage templateManage);
|
||||
|
||||
@@ -56,6 +57,13 @@ public interface TemplateManageMapper {
|
||||
*/
|
||||
void deleteTemplateManageFileById(@Param("id")Long id, @Param("fileIds")List<Long> annexIds);
|
||||
|
||||
/**
|
||||
* 根据id和附件类型删除
|
||||
* @param id
|
||||
* @param types
|
||||
*/
|
||||
void deleteTemplateManageFileByIdAndType(@Param("id")Long id, @Param("types")List<Integer> types);
|
||||
|
||||
/**
|
||||
* 根据模板id和类型查询
|
||||
* @param templateId
|
||||
@@ -78,4 +86,11 @@ public interface TemplateManageMapper {
|
||||
* @return
|
||||
*/
|
||||
List<TemplateManage> selectTemplateListById(@Param("id")Long id);
|
||||
|
||||
/**
|
||||
* 根据调解机构代码查询模板id
|
||||
* @param creditCode
|
||||
* @return
|
||||
*/
|
||||
Long selectByCreditCode(@Param("creditCode")long creditCode);
|
||||
}
|
||||
|
||||
+11
-1
@@ -427,12 +427,21 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
Long id = templateManage.getId();
|
||||
templateManage.setUpdateBy(getUsername());
|
||||
int i = templateManageMapper.updateTemplateManage(templateManage);
|
||||
|
||||
// 先删除附件
|
||||
if (CollectionUtil.isNotEmpty(templateManage.getAnnexIds())) {
|
||||
templateManageMapper.deleteTemplateManageFileById(id, templateManage.getAnnexIds());
|
||||
// 根据附件id查询附件类型
|
||||
List<TemplateManage> templateManages = templateManageMapper.selectTemplateListByIds(templateManage.getAnnexIds());
|
||||
if(CollectionUtil.isNotEmpty(templateManages)) {
|
||||
List<Integer> types = templateManages.stream().map(TemplateManage::getTemType).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(types)) {
|
||||
// 根据模板id和类型删除附件
|
||||
templateManageMapper.deleteTemplateManageFileByIdAndType(id, types);
|
||||
// 修改附件表
|
||||
templateManageMapper.updateFileByIds(templateManage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
return AjaxResult.success("修改成功");
|
||||
@@ -641,6 +650,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
ajax.put("temName",list.get(0).getTemName());
|
||||
// 调节申请书
|
||||
ajax.put("applicationFile",manageMap.get(TemplateTypeEnum.MEDIATION_APPLICATION.getCode()));
|
||||
ajax.put("personApplicationFile",manageMap.get(TemplateTypeEnum.PERSON_MEDIATION_APPLICATION.getCode()));
|
||||
// 和解协议
|
||||
ajax.put("agreementFile",manageMap.get(TemplateTypeEnum.MEDIATION_AGREEMENT.getCode()));
|
||||
// 调解书
|
||||
|
||||
+11
-5
@@ -123,10 +123,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
|
||||
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
||||
// 查询角色
|
||||
Long roleIdByName = roleMapper.selectRoleIdByName("被申请人");
|
||||
if(roleIdByName==null){
|
||||
return AjaxResult.warn("被申请人角色不存在,请联系系统管理员新增角色");
|
||||
}
|
||||
Long roleIdByName =ientityAuthentication.getRoleId();
|
||||
// if(roleIdByName==null){
|
||||
// return AjaxResult.warn("被申请人角色不存在,请联系系统管理员新增角色");
|
||||
// }
|
||||
if(sysUser!=null){
|
||||
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
||||
sysUser.setNickName(ientityAuthentication.getName());
|
||||
@@ -137,7 +137,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
sysUserMapper.updateUser(sysUser);
|
||||
ientityAuthentication.setUserId(sysUser.getUserId());
|
||||
int count=0;
|
||||
if(CollectionUtil.isNotEmpty(sysUser.getRoles()) ){
|
||||
if(CollectionUtil.isNotEmpty(sysUser.getRoles()) && roleIdByName!=null){
|
||||
|
||||
for (SysRole role : sysUser.getRoles()) {
|
||||
if(Objects.equals(role.getRoleId(), roleIdByName)){
|
||||
@@ -147,9 +147,11 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
}
|
||||
}
|
||||
if(CollectionUtil.isEmpty(sysUser.getRoles())||count==0){
|
||||
if(roleIdByName!=null) {
|
||||
// 用户未关联被申请人角色,关联角色
|
||||
userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
sysUser=new SysUser();
|
||||
@@ -159,14 +161,18 @@ public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
sysUser.setPhonenumber(ientityAuthentication.getPhone());
|
||||
sysUser.setEmail(ientityAuthentication.getEmail());
|
||||
sysUser.setCreateBy(ientityAuthentication.getUserName());
|
||||
sysUser.setIdType(ientityAuthentication.getIdType());
|
||||
sysUser.setNationality(ientityAuthentication.getNationality());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
||||
int row = sysUserMapper.insertUser(sysUser);
|
||||
if(row<1) {
|
||||
return AjaxResult.warn("注册失败");
|
||||
}
|
||||
if(roleIdByName!=null) {
|
||||
// 用户关联被申请人角色
|
||||
userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
|
||||
}
|
||||
}
|
||||
|
||||
ientityAuthentication.setUserId(sysUser.getUserId());
|
||||
ientityAuthentication.setUserName(sysUser.getUserName());
|
||||
|
||||
+67
-7
@@ -1,16 +1,16 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.mscase;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.BookingVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationReq;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseAttachVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
@@ -30,20 +30,38 @@ public interface MsCaseApplicationService {
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseApplicationVO> list(MsCaseApplicationReq req);
|
||||
/**
|
||||
* 首页待办数量
|
||||
* @return
|
||||
*/
|
||||
CaseToDoCountVO todoCount();
|
||||
|
||||
/**
|
||||
* 根据id查询案件
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
MsCaseApplicationVO selectById(Long id);
|
||||
MsCaseApplicationVO selectById(Long id ,String caseNum );
|
||||
|
||||
/**
|
||||
* 新增案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
int insert(MsCaseApplicationVO caseApplication);
|
||||
String insert(MsCaseApplicationVO caseApplication);
|
||||
|
||||
/**
|
||||
* 新增案件
|
||||
* @param caseApplication
|
||||
* @param caseFlow
|
||||
*/
|
||||
String insert(MsCaseApplicationVO caseApplication, MsCaseFlow caseFlow);
|
||||
/**
|
||||
* 批量新增案件
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult batchInsert(MsCaseBatchInsertVO vo);
|
||||
/**
|
||||
* 新增用户
|
||||
* @param affiliate
|
||||
@@ -72,6 +90,13 @@ public interface MsCaseApplicationService {
|
||||
*/
|
||||
AjaxResult uploadCaseZipFile(MultipartFile file, Long templateId);
|
||||
|
||||
/**
|
||||
* 用户信息压缩包导入
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
AjaxResult userIdentify(MultipartFile file);
|
||||
|
||||
/**
|
||||
* 生成调解申请书
|
||||
* @param req
|
||||
@@ -125,12 +150,18 @@ public interface MsCaseApplicationService {
|
||||
* @return
|
||||
*/
|
||||
AjaxResult submit(MsCaseApplication req);
|
||||
/**
|
||||
* 删除案件
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
AjaxResult delete(MsCaseApplication req);
|
||||
|
||||
/**
|
||||
* 查询调解员
|
||||
* @return
|
||||
*/
|
||||
AjaxResult listMediator();
|
||||
AjaxResult listMediator(Long caseAppliId);
|
||||
/**
|
||||
* 保存预约
|
||||
* @param
|
||||
@@ -158,6 +189,12 @@ public interface MsCaseApplicationService {
|
||||
* @return
|
||||
*/
|
||||
AjaxResult mediation(MsCaseApplicationReq req) throws EsignDemoException, InterruptedException;
|
||||
/**
|
||||
* 确定会议结果
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
AjaxResult confirmMeetingResult(MsCaseApplicationReq req);
|
||||
|
||||
/**
|
||||
* 修改庭审笔录
|
||||
@@ -183,6 +220,11 @@ public interface MsCaseApplicationService {
|
||||
* @param dictDataList 内置字段
|
||||
*/
|
||||
void createMediateApplication(MsCaseApplication application, MsCaseAffiliate affiliate, String templatePath, List<String> bookmarkList, List<SysDictData> dictDataList, Integer templateType) ;
|
||||
/**
|
||||
* 调解书上传到onlyoffice服务器
|
||||
* @param annexPath
|
||||
*/
|
||||
JSONArray uploadOnlyOffice(String annexPath,Long id);
|
||||
/**
|
||||
* 案件受理
|
||||
* @param application
|
||||
@@ -208,4 +250,22 @@ public interface MsCaseApplicationService {
|
||||
* @param caseId
|
||||
*/
|
||||
void notAccept(String caseId,String reason);
|
||||
|
||||
/**
|
||||
* 根据登录人返回用户信息
|
||||
*/
|
||||
SysUser getUserInfo();
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord);
|
||||
/**
|
||||
* 保存onlyOffice在线编辑的文件
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
|
||||
AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach);
|
||||
}
|
||||
|
||||
+8
-1
@@ -47,7 +47,14 @@ public interface MsCasePaymentService {
|
||||
* @param nextFlow
|
||||
* @param application
|
||||
*/
|
||||
public void confirmPaid(MsCaseFlow currentFlow, MsCaseFlow nextFlow, MsCaseApplication application);
|
||||
public void confirmPaid(CaseConfirmPayDTO dto,MsCaseFlow currentFlow, MsCaseFlow nextFlow, MsCaseApplication application);
|
||||
/**
|
||||
* 被申请人确认已缴费
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult resConfirmPaid(CaseConfirmPayDTO dto);
|
||||
|
||||
/**
|
||||
* 确认缴费
|
||||
*
|
||||
|
||||
+5
@@ -7,6 +7,7 @@ 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 java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public interface MsSignSealService {
|
||||
@@ -34,4 +35,8 @@ public interface MsSignSealService {
|
||||
AjaxResult msCaseSignUrlApplyAPP(MsSignSealDTO dto) throws EsignDemoException;
|
||||
|
||||
AjaxResult msCaseSignUrlResAPP(MsSignSealDTO dto) throws EsignDemoException;
|
||||
|
||||
AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException;
|
||||
|
||||
AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException;
|
||||
}
|
||||
|
||||
+1542
-245
File diff suppressed because it is too large
Load Diff
+152
-32
@@ -5,13 +5,16 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.ruoyi.ElegentPay;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.enums.AnnexTypeEnum;
|
||||
import com.ruoyi.common.enums.PaymentStatusEnum;
|
||||
import com.ruoyi.common.enums.YesOrNoEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
import com.ruoyi.dto.PayResponse;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||
@@ -19,15 +22,9 @@ import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CasePayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCasePaymentRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.mscase.PaymentDetailVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAffiliateMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCasePaymentRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.mscase.*;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SmsRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsCaseApplicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.mscase.MsCasePaymentService;
|
||||
@@ -66,6 +63,8 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
MsCasePaymentService casePaymentService;
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private MsCaseAuditMapper auditMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -273,13 +272,25 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
if (currentFlow == null) {
|
||||
return AjaxResult.error("未找到当前流程节点");
|
||||
}
|
||||
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
|
||||
if (nextFlow == null) {
|
||||
MsCaseFlow flow =null;
|
||||
// 如果同意,查找下一个流程节点,拒绝,查找上一个流程
|
||||
if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
|
||||
// 同意,根据流程id查找下一个流程节点
|
||||
flow = caseFlowMapper.nextFlow(dto.getCaseFlowId());
|
||||
if (flow == null) {
|
||||
return AjaxResult.error("未找到下一个流程节点");
|
||||
}
|
||||
} else {
|
||||
if (currentFlow.getBackFlowId() == null) {
|
||||
return AjaxResult.error("未找到驳回流程");
|
||||
}
|
||||
// 拒绝,查找驳回流程
|
||||
flow = caseFlowMapper.selectByPrimaryKey(currentFlow.getBackFlowId());
|
||||
if (flow == null) {
|
||||
return AjaxResult.error("未找到驳回流程");
|
||||
}
|
||||
|
||||
}
|
||||
if (StrUtil.isNotEmpty(dto.getBatchNumber())) {
|
||||
// 批量
|
||||
List<MsCaseApplication> applicationList = applicationService.listByBatchNumber(dto.getBatchNumber(), dto.getCaseFlowId());
|
||||
@@ -287,27 +298,28 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
return AjaxResult.error("该批号下未找到案件");
|
||||
}
|
||||
for (MsCaseApplication application : applicationList) {
|
||||
casePaymentService.confirmPaid(currentFlow,nextFlow, application);
|
||||
casePaymentService.confirmPaid(dto, currentFlow, flow, application);
|
||||
}
|
||||
} else {
|
||||
MsCaseApplication caseApplication = new MsCaseApplication();
|
||||
caseApplication.setId(dto.getCaseId());
|
||||
caseApplication.setLockStatus(YesOrNoEnum.YES.getCode());
|
||||
casePaymentService.confirmPaid(currentFlow,nextFlow,caseApplication );
|
||||
casePaymentService.confirmPaid(dto, currentFlow, flow, caseApplication);
|
||||
}
|
||||
|
||||
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认已缴费
|
||||
* @param nextFlow
|
||||
* @param flow
|
||||
* @param application
|
||||
* @param
|
||||
*/
|
||||
@Transactional
|
||||
public void confirmPaid(MsCaseFlow currentFlow,MsCaseFlow nextFlow, MsCaseApplication application) {
|
||||
public void confirmPaid(CaseConfirmPayDTO dto, MsCaseFlow currentFlow, MsCaseFlow flow, MsCaseApplication application) {
|
||||
// 查询案件
|
||||
MsCaseApplication caseAppllication = caseApplicationMapper.selectByPrimaryKey(application.getId());
|
||||
if (caseAppllication == null) {
|
||||
@@ -315,28 +327,88 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
}
|
||||
//更改记录表里的支付状态和支付时间
|
||||
MsCasePaymentRecord casePaymentRecord = new MsCasePaymentRecord();
|
||||
if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
|
||||
// 同意
|
||||
casePaymentRecord.setPaymentStatus(1);
|
||||
casePaymentRecord.setCaseId(application.getId());
|
||||
casePaymentRecord.setPaymentTime(new Date());
|
||||
casePaymentRecord.setUpdateTime(new Date());
|
||||
}else {
|
||||
casePaymentRecord.setPaymentStatus(0);
|
||||
}
|
||||
casePaymentRecord.setCaseId(application.getId());
|
||||
Example example = new Example(MsCasePaymentRecord.class);
|
||||
example.createCriteria().andEqualTo("caseId", casePaymentRecord.getCaseId());
|
||||
casePaymentRecordMapper.updateByExampleSelective(casePaymentRecord,example);
|
||||
example.createCriteria().andEqualTo("caseId", casePaymentRecord.getCaseId());casePaymentRecordMapper.updateByExampleSelective(casePaymentRecord, example);
|
||||
// 更改案件流程id和案件状态
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
application.setCaseFlowId(flow.getId());
|
||||
application.setCaseStatusName(flow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
// 将该案件存放到redis,5日之内如果案件状态还是待受理状态,则发送不受理通知书并自动结束
|
||||
redisCache.setCacheObject(String.valueOf(application.getId()), application, Constants.CASE_ACCEPT_EXPIRATION, TimeUnit.DAYS);
|
||||
if (dto.getApplicantConfirm() && dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
|
||||
// 申请人确认缴费后将该案件存放到redis,5日之内如果案件状态还是待受理状态,则发送不受理通知书并自动结束
|
||||
// redisCache.setCacheObject(CacheConstants.CASE_KEY+application.getId(), application, Constants.CASE_ACCEPT_EXPIRATION, TimeUnit.DAYS);
|
||||
SpringUtils.getBean(RedisCache.class).setCacheObject(getVerifyCodeCacheKey(String.valueOf(application.getId())), application, Constants.CASE_ACCEPT_EXPIRATION, TimeUnit.DAYS);
|
||||
|
||||
}
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"确认已缴费");
|
||||
|
||||
if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), null);
|
||||
}else {
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "拒绝确认缴费,拒绝原因为:"+dto.getReason());
|
||||
}
|
||||
if (dto.getYesOrNo().equals(YesOrNoEnum.NO.getCode())) {
|
||||
// 拒绝,新增审核记录
|
||||
MsCaseAudit audit = new MsCaseAudit();
|
||||
audit.setCaseNode(flow.getId());
|
||||
audit.setCaseStatusName(flow.getCaseStatusName());
|
||||
audit.setCaseAppliId(dto.getCaseId());
|
||||
audit.setYesOrNo(dto.getYesOrNo());
|
||||
audit.setReason(dto.getReason());
|
||||
audit.setCreateTime(new Date());
|
||||
if (SecurityUtils.getLoginUser().getUser() != null) {
|
||||
audit.setCreateBy(SecurityUtils.getUsername());
|
||||
audit.setCreateNickName(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
}
|
||||
auditMapper.insert(audit);
|
||||
}
|
||||
// 查询申请人电话,如果是自然人,代理人不为空,则给代理人发短信,代理人为空,给申请人发短信
|
||||
MsCaseAffiliate affiliate = caseAffiliateMapper.selectByPrimaryKey(application.getId());
|
||||
// 发送缴费通知
|
||||
sendPaymentSms(dto,caseAppllication, affiliate,flow);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static String getVerifyCodeCacheKey(String key) {
|
||||
return CacheConstants.CASE_KEY + key;
|
||||
}
|
||||
/**
|
||||
* 被申请人确认已缴费
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult resConfirmPaid(CaseConfirmPayDTO dto) {
|
||||
dto.setApplicantConfirm(false);
|
||||
confirmPaid(dto);
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送缴费短信
|
||||
* @param dto
|
||||
* @param caseAppllication
|
||||
* @param affiliate
|
||||
*/
|
||||
private void sendPaymentSms(CaseConfirmPayDTO dto, MsCaseApplication caseAppllication, MsCaseAffiliate affiliate,MsCaseFlow flow) {
|
||||
if (affiliate != null) {
|
||||
// 受理通知
|
||||
String phone = "";
|
||||
String userName = "";
|
||||
// 缴费通知
|
||||
String payPhone = "";
|
||||
String payUserName = "";
|
||||
if (affiliate.getOrganizeFlag().equals(0)) {
|
||||
// 自然人
|
||||
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
||||
@@ -352,21 +424,59 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
userName = affiliate.getNameAgent();
|
||||
}
|
||||
if (StrUtil.isNotEmpty(phone)) {
|
||||
// 发送短信 2051914 调解缴费成功通知 尊敬的{1},您的调解申请费用已缴费成功。
|
||||
Boolean smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2051914", phone, new String[]{userName});
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(), "申请人调解缴费成功通知短信,尊敬的" + userName + ",您的调解申请费用已缴费成功。");
|
||||
|
||||
payPhone=phone;
|
||||
payUserName=userName;
|
||||
if(!dto.getApplicantConfirm()) {
|
||||
// 被申请人发送通知
|
||||
payPhone=affiliate.getRespondentPhone();
|
||||
payUserName=affiliate.getRespondentName();
|
||||
}
|
||||
Boolean smsFlag =true;
|
||||
SmsSendRecord smsSendRecord=null;
|
||||
// 申请人被申请人发送缴费成功短信 2051914 调解缴费成功通知 尊敬的{1},您的调解申请费用已缴费成功。
|
||||
if (dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
|
||||
smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2051914", payPhone, new String[]{payUserName});
|
||||
smsSendRecord = new SmsSendRecord(caseAppllication.getId(), caseAppllication.getCaseNum(), payPhone, new Date(), "尊敬的" + payUserName + ",您的调解申请费用已缴费成功。");
|
||||
} else {
|
||||
smsFlag = SmsUtils.sendSms(affiliate.getCaseAppliId(), "2074402", payPhone, new String[]{payUserName, caseAppllication.getCaseNum(), dto.getReason()});
|
||||
// 2074402 调解系统确认缴费不通过通知 尊敬的{1}用户,您的{2}案件,确认缴费未通过,理由为{3},请知晓,如非本人操作,请忽略本短信
|
||||
smsSendRecord = new SmsSendRecord(caseAppllication.getId(), caseAppllication.getCaseNum(), payPhone, new Date(), "尊敬的" + payUserName + "用户,您的" + caseAppllication.getCaseNum() + "案件,确认缴费未通过,理由为" + dto.getReason() + ",请知晓,如非本人操作,请忽略本短信");
|
||||
}
|
||||
// 新增短信记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord(application.getId(), caseAppllication.getCaseNum(), phone, new Date(), "尊敬的" + userName + ",您的调解申请费用已缴费成功。");
|
||||
if (smsFlag) {
|
||||
smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
if(!dto.getApplicantConfirm()&& dto.getYesOrNo().equals(YesOrNoEnum.YES.getCode())) {
|
||||
// 申请人发送受理短信
|
||||
sendAcceptSms(dto, caseAppllication, userName, phone);
|
||||
// 被申请人发送受理短信
|
||||
sendAcceptSms(dto, caseAppllication, affiliate.getRespondentName(), affiliate.getRespondentPhone());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送受理短信
|
||||
* @param dto
|
||||
* @param caseAppllication
|
||||
*/
|
||||
private void sendAcceptSms(CaseConfirmPayDTO dto, MsCaseApplication caseAppllication,String userName,String phone ) {
|
||||
// 申请人被申请人发送受理通知书 2073601 尊敬的{1}用户,您的{2}案件,已成功受理,请知晓,如非本人操作,请忽略本短信。
|
||||
Boolean smsFlag = SmsUtils.sendSms(caseAppllication.getId(), "2073601", phone, new String[]{userName, caseAppllication.getCaseNum()});
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord(caseAppllication.getId(), caseAppllication.getCaseNum(), phone, new Date(), "尊敬的" + userName + "用户,您的" + caseAppllication.getCaseNum() + "案件,已成功受理,请知晓,如非本人操作,请忽略本短信。");
|
||||
// 新增短信记录
|
||||
if (smsFlag) {
|
||||
smsSendRecord.setSendStatus(YesOrNoEnum.YES.getCode());
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(YesOrNoEnum.NO.getCode());
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认缴费
|
||||
@@ -380,7 +490,17 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
application.setPayType(dto.getPayType());
|
||||
// 修改缴费附件
|
||||
if (CollectionUtil.isNotEmpty(dto.getPayOrderList())) {
|
||||
|
||||
|
||||
for (MsCaseAttach caseAttach : dto.getPayOrderList()) {
|
||||
// 先删除之前的缴费
|
||||
if(currentFlow.getButtonAuthFlag().equals("caseManagement:list:pay")){
|
||||
// 申请人附件
|
||||
caseAttachMapper.deleteCaseAttachByCasedIdAndType(application.getId(),AnnexTypeEnum.PAYMENT_RECEIPT.getCode());
|
||||
}else {
|
||||
// 被申请人缴费附件
|
||||
caseAttachMapper.deleteCaseAttachByCasedIdAndType(application.getId(),AnnexTypeEnum.RES_PAYMENT_RECEIPT.getCode());
|
||||
}
|
||||
caseAttach.setCaseAppliId(application.getId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
@@ -389,7 +509,7 @@ public class MsCasePaymentServiceImpl implements MsCasePaymentService {
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"确认缴费");
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+591
-66
@@ -25,14 +25,15 @@ import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||
import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
|
||||
import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.dept.SealManage;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.MsSignSealDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.dept.MsSealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
|
||||
@@ -59,6 +60,7 @@ import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -82,6 +84,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
MsCaseFlowMapper caseFlowMapper;
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
@Autowired
|
||||
private MsCaseAttachMapper caseAttachMapper;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
@@ -391,6 +395,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
if (nextFlow == null) {
|
||||
return AjaxResult.error("未找到下一个流程节点");
|
||||
}
|
||||
// 查询当前节点
|
||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(dto.getCaseFlowId());
|
||||
if (currentFlow == null) {
|
||||
return AjaxResult.error("当前流程不存在");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(dto.getBatchNumber())) {
|
||||
// 批量操作
|
||||
// 查询该批号下该流程的案件
|
||||
@@ -402,9 +411,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"用印申请");
|
||||
|
||||
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),null);
|
||||
}
|
||||
} else {
|
||||
// 单独
|
||||
@@ -414,9 +421,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"用印申请");
|
||||
|
||||
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),null);
|
||||
}
|
||||
return AjaxResult.success("用印申请成功");
|
||||
|
||||
@@ -452,44 +457,101 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
public AjaxResult selectCaseProgress(MsSignSealDTO dto) {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
Long id = dto.getCaseId();
|
||||
MsCaseLogRecord caseLogRecord = new MsCaseLogRecord();
|
||||
caseLogRecord.setCaseAppliId(id);
|
||||
List<MsCaseLogRecordVO> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
||||
// MsCaseLogRecord caseLogRecord = new MsCaseLogRecord();
|
||||
// caseLogRecord.setCaseAppliId(id);
|
||||
List<MsCaseLogRecordVO> records = caseLogRecordMapper.selectCaseLogRecordListCaseProgress(dto.getCaseId());
|
||||
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(id);
|
||||
Integer caseFlowId = caseApplicationselect.getCaseFlowId();
|
||||
MsCaseFlow msCaseFlow = caseFlowMapper.selectByPrimaryKey(caseFlowId);
|
||||
|
||||
String nodeName = "";
|
||||
if(msCaseFlow!=null){
|
||||
nodeName = msCaseFlow.getNodeName();
|
||||
List<MsCaseLogRecordVO> recordsNew = new ArrayList<>();
|
||||
if (records != null && records.size() > 0) {
|
||||
for (MsCaseLogRecordVO msCaseLogRecordVO : records) {
|
||||
// String content = msCaseLogRecordVO.getContent();
|
||||
String content = msCaseLogRecordVO.getCaseStatusName();
|
||||
if(StringUtils.isNotEmpty(content)){
|
||||
if(content.equals("结束")){
|
||||
recordsNew.add(msCaseLogRecordVO);
|
||||
}else {
|
||||
if(!content.equals(msCaseFlow.getCaseStatusName())){
|
||||
recordsNew.add(msCaseLogRecordVO);
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
CaseLogRecord caseLogRecordin = getInCasenode(nodeName);
|
||||
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
|
||||
String nodeName1 = "";
|
||||
if(nextFlow!=null){
|
||||
nodeName1 = nextFlow.getNodeName();
|
||||
}
|
||||
CaseLogRecord caseLogRecordnext = getNextRole(nodeName1);
|
||||
caseLogRecordin.setNextRoleName(caseLogRecordnext.getNextRoleName());
|
||||
}
|
||||
}
|
||||
|
||||
CaseLogRecord caseLogRecordin = new CaseLogRecord();
|
||||
List<MsCaseLogRecordVO> caseLogRecordsin = new ArrayList<>();
|
||||
if(!"结束".equals(msCaseFlow.getNodeName())){
|
||||
caseLogRecordin.setCaseNodeName(msCaseFlow.getNodeName());
|
||||
List<MsCaseFlowVO> msCaseFlowvos = caseFlowMapper.selectFlowRole(caseFlowId);
|
||||
StringBuilder roleIn = new StringBuilder();
|
||||
for(MsCaseFlowVO mscaseFlowVO:msCaseFlowvos){
|
||||
if(!"结束".equals(mscaseFlowVO.getNodeName())){
|
||||
roleIn.append( mscaseFlowVO.getRoleName()+"正在进行"+mscaseFlowVO.getNodeName()+";");
|
||||
}
|
||||
}
|
||||
caseLogRecordin.setContent(roleIn.toString().substring(0,roleIn.toString().length()-1));
|
||||
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseFlowId);
|
||||
if(nextFlow!=null){
|
||||
String nodeName = nextFlow.getNodeName();
|
||||
if(StringUtils.isNotEmpty(nodeName)){
|
||||
if(!"结束".equals(nodeName)){
|
||||
List<MsCaseFlowVO> nextMsCaseFlowvo = caseFlowMapper.selectFlowRole(nextFlow.getId());
|
||||
StringBuilder roleIn1 = new StringBuilder();
|
||||
for(MsCaseFlowVO mscaseFlowVO:nextMsCaseFlowvo){
|
||||
roleIn1.append( mscaseFlowVO.getRoleName()+";");
|
||||
}
|
||||
caseLogRecordin.setNextRoleName("下一节点角色:"+roleIn1.toString().substring(0,roleIn1.toString().length()-1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MsCaseLogRecordVO msCaseLogRecordVO = new MsCaseLogRecordVO();
|
||||
BeanUtil.copyProperties(caseLogRecordin, msCaseLogRecordVO);
|
||||
List<MsCaseLogRecordVO> caseLogRecordsin = new ArrayList<>();
|
||||
caseLogRecordsin.add(msCaseLogRecordVO);
|
||||
}
|
||||
|
||||
List<MsCaseFlow> nextFlowall = caseFlowMapper.nextFlowall(caseApplicationselect.getCaseFlowId());
|
||||
List<MsCaseLogRecordVO> caseLogRecordsnext = new ArrayList<>();
|
||||
if (nextFlowall != null && nextFlowall.size() > 0) {
|
||||
for (MsCaseFlow msCaseFlow1 : nextFlowall) {
|
||||
caseLogRecordsnext.add(getNextCaseLogRecord(msCaseFlow1.getNodeName()));
|
||||
List<MsCaseFlowVO> msCaseFlowVOs = caseFlowMapper.selectFlowRole(msCaseFlow1.getId());
|
||||
MsCaseLogRecordVO caseLogRecord1 = new MsCaseLogRecordVO();
|
||||
caseLogRecord1.setCaseNodeName(msCaseFlowVOs.get(0).getNodeName());
|
||||
|
||||
StringBuilder rolenext = new StringBuilder();
|
||||
for(MsCaseFlowVO mscaseFlowVO:msCaseFlowVOs){
|
||||
String nodeName1 = mscaseFlowVO.getNodeName();
|
||||
if(StringUtils.isNotEmpty(nodeName1)){
|
||||
if("结束".equals(nodeName1)){
|
||||
rolenext.append("结束;");
|
||||
}else {
|
||||
rolenext.append( mscaseFlowVO.getRoleName()+"将进行"+mscaseFlowVO.getNodeName()+";");
|
||||
}
|
||||
}
|
||||
}
|
||||
caseLogRecord1.setContent( rolenext.toString().substring(0,rolenext.toString().length()-1));
|
||||
caseLogRecordsnext.add(caseLogRecord1);
|
||||
}
|
||||
|
||||
datas.put("finishCasenode", records);
|
||||
}
|
||||
if(caseLogRecordsin!=null&&caseLogRecordsin.size()>0){
|
||||
datas.put("finishCasenode", recordsNew);
|
||||
}else {
|
||||
MsCaseLogRecordVO msCaseLogRecordVO1 = new MsCaseLogRecordVO();
|
||||
msCaseLogRecordVO1.setContent("结束");
|
||||
recordsNew.add(msCaseLogRecordVO1);
|
||||
datas.put("finishCasenode", recordsNew);
|
||||
}
|
||||
datas.put("inCasenode", caseLogRecordsin);
|
||||
datas.put("nextCasenode", caseLogRecordsnext);
|
||||
|
||||
return success(datas);
|
||||
}
|
||||
|
||||
@@ -506,10 +568,18 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
if(record.getCreateTime()!=null){
|
||||
caseNodeTime= DateUtil.format(record.getCreateTime(), DatePattern.NORM_DATETIME_FORMATTER);
|
||||
}
|
||||
|
||||
Integer caseNode = record.getCaseNode();
|
||||
String createBy = record.getCreateBy();
|
||||
if(StrUtil.isNotEmpty(createBy)){
|
||||
contentBuilder.append(Optional.ofNullable(record.getCreateNickName()).orElse("")).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime);
|
||||
}else{
|
||||
contentBuilder.append(Optional.ofNullable(record.getCreateNickName()).orElse("")).append("于").append(caseNodeTime);
|
||||
}
|
||||
|
||||
if(StrUtil.isNotEmpty(record.getContent())){
|
||||
contentBuilder.append(record.getContent());
|
||||
}else if(caseNode.intValue() == 0){
|
||||
contentBuilder.append(record.getCaseStatusName());
|
||||
}
|
||||
if(StrUtil.isNotEmpty(record.getNotes())){
|
||||
contentBuilder.append(",").append(record.getNotes());
|
||||
@@ -522,7 +592,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult msCaseFile(List<Long> ids){
|
||||
try {
|
||||
for (Long id : ids) {
|
||||
@@ -606,6 +676,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
}
|
||||
}
|
||||
Integer caseFlowId = caseApplication1.getCaseFlowId();
|
||||
// 查询当前节点
|
||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseFlowId);
|
||||
if(currentFlow==null){
|
||||
return AjaxResult.error("未找到当前流程节点");
|
||||
}
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseFlowId);
|
||||
caseApplication1.setCaseFlowId(nextFlow.getId());
|
||||
@@ -615,60 +690,68 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
String appEmail = "";
|
||||
String resEmail = "";
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(id);
|
||||
appEmail = caseAffiliate.getAgentEmail();
|
||||
resEmail = caseAffiliate.getRespondentEmail();
|
||||
|
||||
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
|
||||
if(organizeFlag!=null){
|
||||
if(organizeFlag.intValue()==1){
|
||||
appEmail = caseAffiliate.getAgentEmail();
|
||||
}else {
|
||||
appEmail = caseAffiliate.getApplicationEmail();
|
||||
}
|
||||
}
|
||||
resEmail = caseAffiliate.getRespondentEmail();
|
||||
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
|
||||
|
||||
// SendMailRecord sendMailRecord = new SendMailRecord();
|
||||
// sendMailRecord.setCaseId(id);
|
||||
// sendMailRecord.setMailAddress(appEmail);
|
||||
// sendMailRecord.setMailContent("您好,审核后的裁决书在附件中请查阅");
|
||||
//// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
|
||||
// sendMailRecord.setMailName("签署后的裁决书");
|
||||
// sendMailRecord.setSendTime(new Date());
|
||||
// sendMailRecord.setCreateBy(getUsername());
|
||||
// if (appEmailFlag) {
|
||||
// sendMailRecord.setSendStatus(1);
|
||||
// } else {
|
||||
// sendMailRecord.setSendStatus(0);
|
||||
// }
|
||||
// sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
||||
SendMailRecord sendMailRecord = new SendMailRecord();
|
||||
sendMailRecord.setCaseId(id);
|
||||
sendMailRecord.setMailAddress(appEmail);
|
||||
sendMailRecord.setMailContent("您好,审核后的调解书在附件中请查阅");
|
||||
// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
|
||||
sendMailRecord.setMailName("签署后的调解书");
|
||||
sendMailRecord.setSendTime(new Date());
|
||||
sendMailRecord.setCreateBy(SecurityUtils.getUsername());
|
||||
if (appEmailFlag) {
|
||||
sendMailRecord.setSendStatus(1);
|
||||
} else {
|
||||
sendMailRecord.setSendStatus(0);
|
||||
}
|
||||
sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
||||
|
||||
boolean resEmailFlag = sendCaseEmail(caseApplication1, resEmail, caseAttachList);
|
||||
|
||||
// SendMailRecord sendMailRecord1 = new SendMailRecord();
|
||||
// sendMailRecord1.setCaseId(id);
|
||||
// sendMailRecord1.setMailAddress(resEmail);
|
||||
//// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
|
||||
// sendMailRecord1.setMailContent("您好,审核后的裁决书在附件中请查阅");
|
||||
// sendMailRecord1.setMailName("签署后的裁决书");
|
||||
// sendMailRecord1.setSendTime(new Date());
|
||||
// sendMailRecord1.setCreateBy(getUsername());
|
||||
// if (resEmailFlag) {
|
||||
// sendMailRecord1.setSendStatus(1);
|
||||
// }else {
|
||||
// sendMailRecord1.setSendStatus(0);
|
||||
// }
|
||||
// sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
|
||||
SendMailRecord sendMailRecord1 = new SendMailRecord();
|
||||
sendMailRecord1.setCaseId(id);
|
||||
sendMailRecord1.setMailAddress(resEmail);
|
||||
// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
|
||||
sendMailRecord1.setMailContent("您好,审核后的调解书在附件中请查阅");
|
||||
sendMailRecord1.setMailName("签署后的调解书");
|
||||
sendMailRecord1.setSendTime(new Date());
|
||||
sendMailRecord1.setCreateBy(SecurityUtils.getUsername());
|
||||
if (resEmailFlag) {
|
||||
sendMailRecord1.setSendStatus(1);
|
||||
}else {
|
||||
sendMailRecord1.setSendStatus(0);
|
||||
}
|
||||
sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
|
||||
if(!appEmailFlag&&!resEmailFlag){
|
||||
throw new ServiceException("裁决书发送失败");
|
||||
throw new ServiceException("调解书发送失败");
|
||||
}
|
||||
if(!appEmailFlag){
|
||||
throw new ServiceException("申请人裁决书发送失败");
|
||||
throw new ServiceException("申请人调解书发送失败");
|
||||
}
|
||||
if(!resEmailFlag){
|
||||
throw new ServiceException("被申请人裁决书发送失败");
|
||||
throw new ServiceException("被申请人调解书发送失败");
|
||||
}
|
||||
|
||||
CaseLogUtils.insertCaseLog(caseApplication1.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"归档");
|
||||
CaseLogUtils.insertCaseLog(caseApplication1.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
throw new ServiceException("调解书发送失败");
|
||||
}
|
||||
|
||||
return AjaxResult.success("归档成功");
|
||||
return AjaxResult.success("");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -677,6 +760,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
Long caseId = dto.getCaseId();
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseId);
|
||||
// 查询当前节点
|
||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseApplicationselect.getCaseFlowId());
|
||||
if (currentFlow == null) {
|
||||
return AjaxResult.error("当前流程不存在");
|
||||
}
|
||||
// if (dto.getIsSignApply() != null && dto.getIsSignApply().intValue() == 1) {
|
||||
// caseAffiliate.setIsSignApply(1);
|
||||
// msCaseAffiliateMapper.updateByPrimaryKeySelective(caseAffiliate);
|
||||
@@ -698,7 +786,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
caseApplicationselect.setCaseFlowId(nextFlow.getId());
|
||||
caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
|
||||
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
|
||||
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),null);
|
||||
}
|
||||
// if (dto.getIsSignRespon() != null && dto.getIsSignRespon().intValue() == 1) {
|
||||
// caseAffiliate.setIsSignRespon(1);
|
||||
@@ -722,7 +810,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
caseApplicationselect.setCaseFlowId(nextFlow.getId());
|
||||
caseApplicationselect.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(caseApplicationselect);
|
||||
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"签收");
|
||||
CaseLogUtils.insertCaseLog(caseApplicationselect.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),null);
|
||||
}
|
||||
|
||||
return AjaxResult.success("签收成功");
|
||||
@@ -735,6 +823,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
MsCaseAffiliate caseAffiliate = msCaseAffiliateMapper.selectByPrimaryKey(caseId);
|
||||
Integer organizeFlag = caseAffiliate.getOrganizeFlag();
|
||||
|
||||
MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(caseId);
|
||||
|
||||
SysUser user = new SysUser();
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
user.setUserId(userId);
|
||||
@@ -803,6 +893,36 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
}else {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
}else if(roleNames.contains("调解员")){
|
||||
SealSignRecord sealSignRecordres = new SealSignRecord();
|
||||
MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
|
||||
mssealSignRecord.setCaseAppliId(caseId);
|
||||
List<MsSealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecord(mssealSignRecord);
|
||||
if (sealSignRecords != null && sealSignRecords.size() > 0) {
|
||||
String signFlowid = sealSignRecords.get(0).getSignFlowId();
|
||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||
|
||||
Long arbitratorId = caseApplication.getMediatorId();
|
||||
if (arbitratorId!=null) {
|
||||
SysUser sysUser = sysUserMapper.selectUserById(arbitratorId);
|
||||
if (sysUser == null) {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
|
||||
}
|
||||
sealSignRecord.setSignFlowid(signFlowid);
|
||||
|
||||
Gson gson = new Gson();
|
||||
EsignHttpResponse signUrl = SignAward.signUrl(sealSignRecord);
|
||||
JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
String urlapply = signUrlData.get("shortUrl").getAsString();
|
||||
sealSignRecordres.setSealUrl(urlapply);
|
||||
return AjaxResult.success(sealSignRecordres);
|
||||
}else {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@@ -897,6 +1017,411 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
return AjaxResult.success(sealSignRecordres);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult signSeaalCaseApplicaCallback(String reqbodystr) throws EsignDemoException, IOException {
|
||||
JSONObject jsonObjectCallback = JSONObject.parseObject(reqbodystr);
|
||||
Gson gson = new Gson();
|
||||
if (jsonObjectCallback != null) {
|
||||
int signResult = jsonObjectCallback.getIntValue("signResult");
|
||||
String action = jsonObjectCallback.getString("action");
|
||||
String signFlowId = jsonObjectCallback.getString("signFlowId");
|
||||
Long operateTime = jsonObjectCallback.getLongValue("operateTime");
|
||||
JSONObject operator = jsonObjectCallback.getJSONObject("operator");
|
||||
JSONObject psnAccount = operator.getJSONObject("psnAccount");
|
||||
String accountMobile = psnAccount.getString("accountMobile");
|
||||
|
||||
Example msSealSignRecordExample = new Example(MsSealSignRecord.class);
|
||||
msSealSignRecordExample.createCriteria().andEqualTo("signFlowId", signFlowId);
|
||||
MsSealSignRecord sealSignRecordsel = sealSignRecordMapper.selectOneByExample(msSealSignRecordExample);
|
||||
|
||||
String pensonAccountApply = sealSignRecordsel.getPensonAccount();
|
||||
String orgnNamePsnAcc = sealSignRecordsel.getOrgnNamePsnAcc();
|
||||
String pensonAccountRes = sealSignRecordsel.getPensonAccountRes();
|
||||
String pensonAccountMedi = sealSignRecordsel.getPensonAccountMedi();
|
||||
String pensonName = sealSignRecordsel.getPensonName();
|
||||
String orgnNamePsnName = sealSignRecordsel.getOrgnNamePsnName();
|
||||
String pensonNameRes = sealSignRecordsel.getPensonNameRes();
|
||||
String pensonNameMedi = sealSignRecordsel.getPensonNameMedi();
|
||||
Date dateOperate = new Date(operateTime);
|
||||
|
||||
Integer signStatusApply = sealSignRecordsel.getSignStatusApply();
|
||||
Integer signStatusResponse = sealSignRecordsel.getSignStatusResponse();
|
||||
Integer signStatusMediator = sealSignRecordsel.getSignStatusMediator();
|
||||
Integer sealStatus = sealSignRecordsel.getSealStatus();
|
||||
|
||||
Long caseAppliId = sealSignRecordsel.getCaseAppliId();
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(caseAppliId);
|
||||
Integer mediaResult = caseApplicationselect.getMediaResult();
|
||||
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(caseApplicationselect.getCaseFlowId());
|
||||
Integer caseNode = currentFlow.getNodeId();
|
||||
String caseStatusName = currentFlow.getCaseStatusName();
|
||||
if("SIGN_MISSON_COMPLETE".equals(action) && signResult==2){
|
||||
if(mediaResult.intValue()==1){
|
||||
//调解
|
||||
if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(pensonAccountApply)){
|
||||
//申请人签名
|
||||
sealSignRecordsel.setSignStatusApply(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(pensonName);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
if(signStatusResponse!=null&&signStatusResponse.intValue()==1&&
|
||||
signStatusMediator!=null&&signStatusMediator.intValue()==1){
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
sealSignRecordsel.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
}
|
||||
}else if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(pensonAccountRes)){
|
||||
//被申请人签名
|
||||
sealSignRecordsel.setSignStatusResponse(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(pensonNameRes);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
if(signStatusApply!=null&&signStatusApply.intValue()==1&&
|
||||
signStatusMediator!=null&&signStatusMediator.intValue()==1){
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
sealSignRecordsel.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
}
|
||||
}else if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(pensonAccountMedi)){
|
||||
//调解员签名
|
||||
sealSignRecordsel.setSignStatusMediator(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(pensonNameMedi);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
if(signStatusApply!=null&&signStatusApply.intValue()==1&&
|
||||
signStatusResponse!=null&&signStatusResponse.intValue()==1){
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
sealSignRecordsel.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
}
|
||||
}else if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(orgnNamePsnAcc)){
|
||||
sealSignRecordsel.setSealStatus(1);
|
||||
sealSignRecordsel.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(orgnNamePsnName);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//下载审核完成的调解书
|
||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
||||
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
if (filesArray != null && filesArray.size() > 0) {
|
||||
JsonObject fileObject = (JsonObject) filesArray.get(0);
|
||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
// String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
// String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
String saveName = fileName;
|
||||
String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
|
||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(7);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else if(mediaResult.intValue()==5){
|
||||
//和解
|
||||
if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(pensonAccountApply)){
|
||||
//申请人签名
|
||||
sealSignRecordsel.setSignStatusApply(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(pensonName);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
if(signStatusResponse!=null&&signStatusResponse.intValue()==1){
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为完成
|
||||
sealSignRecordsel.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
|
||||
//下载审核完成的调解书
|
||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
||||
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
if (filesArray != null && filesArray.size() > 0) {
|
||||
JsonObject fileObject = (JsonObject) filesArray.get(0);
|
||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
// String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
// String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
String saveName = fileName;
|
||||
String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
|
||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(7);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else if(StringUtils.isNotEmpty(accountMobile)&&accountMobile.equals(pensonAccountRes)){
|
||||
//被申请人签名
|
||||
sealSignRecordsel.setSignStatusResponse(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(pensonNameRes);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
if(signStatusApply!=null&&signStatusApply.intValue()==1){
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow1(caseApplicationselect.getCaseFlowId().intValue());
|
||||
MsCaseApplication application = new MsCaseApplication();
|
||||
application.setId(caseApplicationselect.getId());
|
||||
application.setCaseFlowId(nextFlow.getId());
|
||||
application.setCaseStatusName(nextFlow.getCaseStatusName());
|
||||
caseApplicationMapper.updateByPrimaryKeySelective(application);
|
||||
|
||||
//修改"签署用印记录表"的状态为完成
|
||||
sealSignRecordsel.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
|
||||
//下载审核完成的调解书
|
||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
||||
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
if (filesArray != null && filesArray.size() > 0) {
|
||||
JsonObject fileObject = (JsonObject) filesArray.get(0);
|
||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
// String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
// String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
String saveName = fileName;
|
||||
String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
|
||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setCaseAppliId(caseAppliId);
|
||||
caseAttach.setAnnexType(7);
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
return AjaxResult.error("error");
|
||||
}
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult sealCheckCallback(String reqbodystr) throws EsignDemoException, IOException {
|
||||
JSONObject jsonObjectCallback = JSONObject.parseObject(reqbodystr);
|
||||
Gson gson = new Gson();
|
||||
if (jsonObjectCallback != null) {
|
||||
int auditStatus = jsonObjectCallback.getIntValue("auditStatus");
|
||||
String action = jsonObjectCallback.getString("action");
|
||||
String orgId = jsonObjectCallback.getString("orgId");
|
||||
String sealId = jsonObjectCallback.getString("sealId");
|
||||
|
||||
SealManage sealManage = new SealManage();
|
||||
DeptIdentify deptIdentify1 = new DeptIdentify();
|
||||
deptIdentify1.setOrgId(orgId);
|
||||
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify1);
|
||||
if (deptIdentifies != null && deptIdentifies.size() > 0) {
|
||||
Long iddeptIdent = deptIdentifies.get(0).getId();
|
||||
SealManage sealManageSel = new SealManage();
|
||||
sealManageSel.setIdentifyId(iddeptIdent);
|
||||
sealManageSel.setSealId(sealId);
|
||||
List<String> sealIdList = new ArrayList<>();
|
||||
List<SealManage> selectSealList = sealManageMapper.selectSealList(sealManageSel);
|
||||
if (selectSealList != null && selectSealList.size() > 0) {
|
||||
sealManage = selectSealList.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
if("SEAL_AUDIT".equals(action) && auditStatus==1){
|
||||
EsignHttpResponse response = SignAward.getOrgSeal(orgId, sealId);
|
||||
JSONObject jsonObject = JSONObject.parseObject(response.getBody());
|
||||
int code = jsonObject.getIntValue("code");
|
||||
if (code == 0) {
|
||||
JSONObject data = jsonObject.getJSONObject("data");
|
||||
int sealStatus = data.getIntValue("sealStatus");
|
||||
if (sealStatus == 1) {//印章状态 1已启用,2待审核,3审核不通过,4 挂起
|
||||
//已启用证明审核通过,下载到数据库
|
||||
String sealImageDownloadUrl = data.getString("sealImageDownloadUrl");
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".jpg";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String savePath = "/home/ruoyi/uploadPath/upload/";
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
File resultFilePathFile = new File(resultFilePath);
|
||||
if (!resultFilePathFile.exists()) {
|
||||
resultFilePathFile.createNewFile();
|
||||
}
|
||||
boolean downLoadFile = FileTransformation.downLoadFileByUrl(sealImageDownloadUrl, resultFilePath);
|
||||
if (downLoadFile) {
|
||||
MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
||||
caseAttach.setAnnexPath(savePath);
|
||||
caseAttach.setAnnexName(saveName);
|
||||
int i1 = caseAttachMapper.save(caseAttach);
|
||||
if (i1 > 0) {
|
||||
//将附件id保存到公章管理表里
|
||||
Long annexId1 = caseAttach.getAnnexId();
|
||||
sealManage.setAnnexId(annexId1);
|
||||
sealManage.setSealStatus(1);
|
||||
sealManage.setIsUse(0);
|
||||
sealManageMapper.updateSealManage(sealManage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.error("error");
|
||||
}
|
||||
return AjaxResult.success("success");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过邮件发送裁决书文件
|
||||
*
|
||||
@@ -926,7 +1451,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
|
||||
if (file != null && file.exists()) {
|
||||
try {
|
||||
Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
||||
Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的调解书在附件中请查阅", "签署后的调解书", fileList, null);
|
||||
|
||||
if (aBoolean) {
|
||||
return Boolean.TRUE;
|
||||
|
||||
+16
-5
@@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.enums.AnnexTypeEnum;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.PdfUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
@@ -52,8 +53,7 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
|
||||
import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
|
||||
import static com.ruoyi.common.utils.file.FileUploadUtils.*;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
@@ -178,11 +178,16 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
@Transactional
|
||||
@Override
|
||||
public String createRoomId(Long caseId) {
|
||||
// 查询案件
|
||||
MsCaseApplication caseApplication = caseApplicationMapper.selectByPrimaryKey(caseId);
|
||||
if(null == caseApplication){
|
||||
throw new ServiceException("未找到该案件");
|
||||
}
|
||||
long roomId = generateRoomId();
|
||||
// 绑定案件与房间号
|
||||
bindCaseId(caseId, String.valueOf(roomId));
|
||||
// 新增预约会议表
|
||||
ReservedConference conference = new ReservedConference(caseId, SecurityUtils.getUserId(), roomId,
|
||||
ReservedConference conference = new ReservedConference(caseId,caseApplication.getMediatorId(), roomId,
|
||||
null, null);
|
||||
// 先删除之前的会议
|
||||
reservedConferenceMapper.deletByCaseId(caseId);
|
||||
@@ -448,15 +453,20 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
|
||||
fileName = fileName.replace("/", "");
|
||||
fileName=fileId+fileName;
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
|
||||
String annexName=System.currentTimeMillis()+fileName;
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), annexName).getAbsolutePath();
|
||||
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
||||
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
|
||||
if(downloadFile>0) {
|
||||
|
||||
Example example = new Example(MsCaseApplication.class);
|
||||
example.createCriteria().andEqualTo("roomId", roomId);
|
||||
MsCaseApplication caseApplication = caseApplicationMapper.selectOneByExample(example);
|
||||
if(caseApplication != null) {
|
||||
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
||||
// 根据文件名称查询附件,如果该视频已存在则不存入数据库
|
||||
int count= caseAttachMapper.countByfileName(fileName,caseApplication.getId());
|
||||
if(count<1) {
|
||||
annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), annexName);
|
||||
// 存入数据库
|
||||
MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(caseApplication.getId())
|
||||
.annexName(fileName)
|
||||
@@ -468,6 +478,7 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
public class DigesdateUtils {
|
||||
|
||||
public static String getSignStr(String paramsStr, String accessSec ) {
|
||||
Mac macDiges = null;
|
||||
try {
|
||||
macDiges = Mac.getInstance("HmacSHA256");
|
||||
SecretKeySpec accessSecKey = new SecretKeySpec(accessSec.getBytes("UTF-8"), "HmacSHA256");
|
||||
macDiges.init(accessSecKey);
|
||||
macDiges.update(paramsStr.getBytes("UTF-8"));
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} catch (InvalidKeyException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
return byteTrasferhex(macDiges.doFinal());
|
||||
}
|
||||
|
||||
public static String byteTrasferhex(byte[] byteArrayData) {
|
||||
StringBuilder hashBuilder = new StringBuilder();
|
||||
String stmpHex;
|
||||
for (int n = 0; byteArrayData != null && n < byteArrayData.length; n++) {
|
||||
stmpHex = Integer.toHexString(byteArrayData[n] & 0XFF);
|
||||
if (stmpHex.length() == 1)
|
||||
hashBuilder.append('0');
|
||||
hashBuilder.append(stmpHex);
|
||||
}
|
||||
return hashBuilder.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+6
-5
@@ -243,7 +243,7 @@ public class FixSelectFlowDetailUtils {
|
||||
/*
|
||||
定时查询签署流程详情
|
||||
*/
|
||||
@Scheduled(cron = "0/10 * * * * ?")
|
||||
// @Scheduled(cron = "0/10 * * * * ?")
|
||||
@Transactional
|
||||
public void fixExecuteSelectFlowDetailUtils() {
|
||||
Gson gson = new Gson();
|
||||
@@ -286,9 +286,10 @@ public class FixSelectFlowDetailUtils {
|
||||
List<Integer> psnsignStatusListnew = psnsignStatusList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
Integer isReconci = caseApplicationselect.getIsReconci();
|
||||
if(isReconci!=null){
|
||||
if(isReconci.intValue()==1){
|
||||
// Integer isReconci = caseApplicationselect.getIsReconci();
|
||||
Integer mediaResult = caseApplicationselect.getMediaResult();
|
||||
if(mediaResult!=null){
|
||||
if(mediaResult.intValue()==5){
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2))) {
|
||||
//更新立案申请状态为待送达
|
||||
// MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
@@ -350,7 +351,7 @@ public class FixSelectFlowDetailUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
}else if(mediaResult.intValue()==1){
|
||||
if (( psnsignStatusListnew.size()==1 && (psnsignStatusListnew.get(0).intValue() == 2)) && (orgsignStatus.intValue() == 1)) {
|
||||
//更新立案申请状态为待用印
|
||||
// MsCaseApplication caseApplicationselect = msCaseApplicationMapper.selectByPrimaryKey(sealSignRecord.getCaseAppliId());
|
||||
|
||||
@@ -3,19 +3,17 @@ package com.ruoyi.wisdomarbitrate.utils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.EsignApplicaConfig;
|
||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||
import com.ruoyi.common.utils.SealUtil;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.base.StringIdsReq;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.dept.DeptIdentify;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.mscase.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.base.StringIdsReq;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -25,6 +23,9 @@ public class SignAward {
|
||||
private static String eSignAppId = EsignApplicaConfig.EsignAppId;
|
||||
private static String eSignAppSecret = EsignApplicaConfig.EsignAppSecret;
|
||||
|
||||
@Value("${signSealCallbackConfig.url}")
|
||||
private static String signSealCallbackUrl;
|
||||
|
||||
|
||||
public static void main(String[] args) throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
@@ -354,7 +355,7 @@ public class SignAward {
|
||||
" \"signConfig\": {\n" +
|
||||
" \"availableSignClientTypes\": \"1\"\n" +
|
||||
" },\n" +
|
||||
|
||||
// " \"notifyUrl\": \"" + signSealCallbackUrl + "\",\n" +
|
||||
" \"autoFinish\": true\n" +
|
||||
" },\n" +
|
||||
|
||||
@@ -826,8 +827,8 @@ public class SignAward {
|
||||
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
|
||||
String jsonParm = "{\n" +
|
||||
" \"keywords\": [\n" +
|
||||
" \"仲裁员:\",\n" +
|
||||
" \"(仲裁委员会盖章)\"\n" +
|
||||
" \"调解员:\",\n" +
|
||||
" \"(调解委员会盖章)\"\n" +
|
||||
" ]\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
import com.ruoyi.common.utils.EsignApplicaConfig;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.wisdomarbitrate.service.miniprogress.impl.IdentityAuthenticationServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
public class SignVerifyUtils {
|
||||
private static String eSignAppSecret = EsignApplicaConfig.EsignAppSecret;
|
||||
|
||||
|
||||
|
||||
public static boolean checkSignuter() throws Exception {
|
||||
HttpServletRequest httprequest = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
|
||||
String orialsignature = httprequest.getHeader("X-Tsign-Open-SIGNATURE");
|
||||
String timestampreq = httprequest.getHeader("X-Tsign-Open-TIMESTAMP");
|
||||
String reqQuerystr =getHttpreqQuery();
|
||||
//获取请求参数
|
||||
String reqbodystr =getRequestBody();
|
||||
String signOriaData = timestampreq + reqQuerystr + reqbodystr;
|
||||
String newDisgSignuter= DigesdateUtils.getSignStr(signOriaData, eSignAppSecret);
|
||||
|
||||
|
||||
if (StringUtils.equals(orialsignature, newDisgSignuter)) {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String getHttpreqQuery() {
|
||||
HttpServletRequest httprequest = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
|
||||
List<String> reqNames= new ArrayList();
|
||||
Enumeration<String> httpreqEle =httprequest.getParameterNames();
|
||||
while (httpreqEle.hasMoreElements()){
|
||||
reqNames.add(httpreqEle.nextElement());
|
||||
}
|
||||
Collections.sort(reqNames);
|
||||
String httpreqQuery = "";
|
||||
for (String reqName : reqNames) {
|
||||
String reqvalue = httprequest.getParameter(reqName);
|
||||
httpreqQuery += reqvalue == null ? "" : reqvalue;
|
||||
}
|
||||
return httpreqQuery;
|
||||
}
|
||||
|
||||
public static String getRequestBody() {
|
||||
HttpServletRequest httprequest = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
|
||||
String requestBody = "";
|
||||
int reqContentLen = httprequest.getContentLength();
|
||||
if (reqContentLen < 0) {
|
||||
return null;
|
||||
}
|
||||
byte bufByteArray[] = new byte[reqContentLen];
|
||||
try {
|
||||
for (int i = 0; i < reqContentLen;) {
|
||||
int lengthReadInputStream = httprequest.getInputStream().read(bufByteArray, i, reqContentLen - i);
|
||||
if (lengthReadInputStream == -1) {
|
||||
break;
|
||||
}
|
||||
i += lengthReadInputStream;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
requestBody = new String(bufByteArray, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -7,6 +7,6 @@ targetprojectpath=D:/ymPro/Mediation-Backend/ruoyi-system/src/main/resources/map
|
||||
#模块名称
|
||||
moduleName=mscase
|
||||
#表名
|
||||
tableName=ms_case_affiliate
|
||||
tableName=ms_case_audit
|
||||
#主键
|
||||
premaryId=id
|
||||
|
||||
@@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="idType" column="id_type" />
|
||||
<result property="nationality" column="nationality" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
@@ -50,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.user_name, u.nick_name,u.specialty, u.id_card,u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card,u.id_type,u.nationality
|
||||
from ms_sys_user u
|
||||
left join ms_sys_user_role ur on u.user_id = ur.user_id
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
@@ -200,6 +202,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="idType != null ">id_type,</if>
|
||||
<if test="nationality != null ">nationality,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
@@ -216,6 +220,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="idType != null ">#{idType},</if>
|
||||
<if test="nationality != null ">#{nationality},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
@@ -272,6 +278,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="idType != null">id_type = #{idType},</if>
|
||||
<if test="nationality != null">nationality = #{nationality},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<result column="position_xorg" jdbcType="DOUBLE" property="positionXorg" />
|
||||
<result column="position_yorg" jdbcType="DOUBLE" property="positionYorg" />
|
||||
<result column="file_download_url" jdbcType="LONGVARCHAR" property="fileDownloadUrl" />
|
||||
<result column="sign_status_apply" jdbcType="INTEGER" property="signStatusApply" />
|
||||
<result column="sign_status_response" jdbcType="INTEGER" property="signStatusResponse" />
|
||||
<result column="sign_status_mediator" jdbcType="INTEGER" property="signStatusMediator" />
|
||||
<result column="seal_status" jdbcType="INTEGER" property="sealStatus" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
<if test="sealStatus != null">
|
||||
AND seal_status = #{sealStatus}
|
||||
</if>
|
||||
<if test="sealId != null and sealId != ''">
|
||||
AND seal_id = #{sealId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
+20
-10
@@ -13,18 +13,19 @@
|
||||
<result property="sealStatus" column="seal_status" />
|
||||
<result property="useId" column="use_id" />
|
||||
<result property="useAccount" column="use_account" />
|
||||
<result property="onlyOfficeFileId" column="only_office_file_id" />
|
||||
</resultMap>
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{isBatchUpload})
|
||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{onlyOfficeFileId})
|
||||
</insert>
|
||||
<insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
|
||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,is_batch_upload)
|
||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id)
|
||||
VALUES
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
|
||||
|
||||
(#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.isBatchUpload})
|
||||
(#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.onlyOfficeFileId})
|
||||
</foreach>
|
||||
</insert>
|
||||
<delete id="deleteByFileIds">
|
||||
@@ -38,19 +39,16 @@
|
||||
delete from ms_case_attach
|
||||
where case_appli_id = #{caseAppliId}
|
||||
and annex_type = #{annexType}
|
||||
<if test="isBatchUpload != null ">
|
||||
AND is_batch_upload = #{isBatchUpload}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from ms_case_attach
|
||||
where case_appli_id =#{id}
|
||||
</select>
|
||||
|
||||
<select id="listCaseAttachByCaseIdAndType" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from ms_case_attach
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
@@ -65,11 +63,20 @@
|
||||
<delete id="deleteCaseAttachByCasedIdAndType">
|
||||
delete from ms_case_attach
|
||||
where case_appli_id = #{caseAppliId}
|
||||
<if test="annexType != null ">
|
||||
and annex_type = #{annexType}
|
||||
</if>
|
||||
</delete>
|
||||
<delete id="batchDelete">
|
||||
delete from ms_case_attach
|
||||
where case_appli_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="queryCaseAttachList" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
select *
|
||||
from ms_case_attach
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
@@ -95,6 +102,9 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="countByfileName" resultType="java.lang.Integer">
|
||||
select count(1) from ms_case_attach where case_appli_id=#{caseAppliId} and annex_name=#{annexName}
|
||||
</select>
|
||||
|
||||
<update id="updateCaseAttach" parameterType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach">
|
||||
update ms_case_attach
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAuditMapper">
|
||||
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAudit">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="case_appli_id" jdbcType="BIGINT" property="caseAppliId" />
|
||||
<result column="case_node" jdbcType="INTEGER" property="caseNode" />
|
||||
<result column="case_status_name" jdbcType="VARCHAR" property="caseStatusName" />
|
||||
<result column="yes_or_no" jdbcType="INTEGER" property="yesOrNo" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_nick_name" jdbcType="VARCHAR" property="createNickName" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="reason" jdbcType="LONGVARCHAR" property="reason" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
<select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord" resultMap="SendMailRecordResult">
|
||||
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
|
||||
s.update_by ,s.update_time , s.send_status ,c.case_num
|
||||
from send_mail_record s left join ms_case_application c
|
||||
from ms_send_mail_record s left join ms_case_application c
|
||||
on s.case_id = c.id
|
||||
<where>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
@@ -30,7 +30,7 @@
|
||||
</select>
|
||||
|
||||
<insert id="saveSendMailRecord">
|
||||
insert into send_mail_record(
|
||||
insert into ms_send_mail_record(
|
||||
<if test="mailName != null and mailName != ''">mail_name,</if>
|
||||
<if test="mailContent != null and mailContent != ''">mail_content,</if>
|
||||
<if test="mailAddress != null and mailAddress != ''">mail_address,</if>
|
||||
|
||||
+25
-2
@@ -64,7 +64,18 @@
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectTemplateListByIds" resultMap="TemplateManageResult">
|
||||
SELECT *
|
||||
FROM ms_template_manage_file
|
||||
<where>
|
||||
<if test="fileIds != null">
|
||||
and file_id in
|
||||
<foreach collection="fileIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectById" resultMap="TemplateManageResult">
|
||||
select * from ms_template_manage where id=#{id}
|
||||
</select>
|
||||
@@ -135,10 +146,18 @@
|
||||
|
||||
;
|
||||
</delete>
|
||||
<delete id="deleteTemplateManageFileByIdAndType">
|
||||
delete from ms_template_manage_file where template_manage_id = #{id} and tem_type in
|
||||
<foreach collection="types" item="it" open="(" separator="," close=")">
|
||||
#{it}
|
||||
</foreach>
|
||||
|
||||
;
|
||||
</delete>
|
||||
|
||||
<select id="selectByIdAndType" resultMap="TemplateManageResult">
|
||||
select f.* from ms_template_manage m join ms_template_manage_file f on m.id=f.template_manage_id
|
||||
where f.template_manage_id=#{templateId} and f.tem_type=#{type} oeder by f.file_id desc limit 1
|
||||
where f.template_manage_id=#{templateId} and f.tem_type=#{type} order by f.file_id desc limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectFileById" resultMap="TemplateManageResult">
|
||||
@@ -150,4 +169,8 @@
|
||||
select m.* ,f.* from ms_template_manage m join ms_template_manage_file f on m.id=f.template_manage_id
|
||||
where m.id=#{id}
|
||||
</select>
|
||||
<select id="selectByCreditCode" resultType="java.lang.Long">
|
||||
select m.id from ms_dept_identify i join ms_template_manage m on m.identify_id=i.id
|
||||
where i.credit_code=#{creditCode} and i.del_flag=0 and i.identify_status=1 limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user