Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bced304c2 | ||
|
|
df8ed662e8 | ||
|
|
41660a5056 | ||
|
|
969a4f09f8 | ||
|
|
4a6e28b629 | ||
|
|
8eddc035c5 | ||
|
|
26c90d4c32 | ||
|
|
c91bbf834a | ||
|
|
913ca3547a | ||
|
|
5906bbc9ec | ||
|
|
b3b6d25d91 | ||
|
|
b323e88504 | ||
|
|
775d7c0d56 | ||
|
|
3def3b69dc | ||
|
|
9132518de4 | ||
|
|
c52adbde4b | ||
|
|
870c514a15 | ||
|
|
2300df715c | ||
|
|
94b304d417 | ||
|
|
c64b709e33 | ||
|
|
6b56829d92 | ||
|
|
2a40d552e3 | ||
|
|
032c7bfca1 | ||
|
|
01d86180a9 | ||
|
|
edfd847318 | ||
|
|
36ad2c9ecd | ||
|
|
ce01c9366a | ||
|
|
a74345ea5f | ||
|
|
b7b46f1350 | ||
|
|
c21e092c89 | ||
|
|
867ce2d4ba | ||
|
|
0a16acb362 | ||
|
|
9a59fac610 | ||
|
|
f20736282b | ||
|
|
08a6e72cc2 | ||
|
|
16bfd769aa | ||
|
|
3c22cec221 | ||
|
|
a583b2b195 | ||
|
|
bf92e05cbe | ||
|
|
7a2a662c5f | ||
|
|
e4fa622b71 | ||
|
|
d6da8ddd2f | ||
|
|
8306ae0f39 | ||
|
|
616be649b5 | ||
|
|
a0ecc6bd69 | ||
|
|
3dcf07881a | ||
|
|
4d4276847b | ||
|
|
c7fad71ae2 | ||
|
|
dbc73da777 | ||
|
|
b28a16dcea | ||
|
|
cf73d6e338 | ||
|
|
dcb1139a6a | ||
|
|
52e0baa614 | ||
|
|
ede7c4452d | ||
|
|
0ee4c53252 | ||
|
|
a9c86dc6dc | ||
|
|
12ed3200a2 | ||
|
|
23614f7e9c | ||
|
|
40b623024c | ||
|
|
be6ec797c7 | ||
|
|
35556e2acd | ||
|
|
72d02890b0 | ||
|
|
bcc07b181d | ||
|
|
00f6ad1417 | ||
|
|
3398f0db3d | ||
|
|
3262548b25 | ||
|
|
08bb2af98e | ||
|
|
8b3c5a3741 | ||
|
|
bb642be13b | ||
|
|
b2621ace43 | ||
|
|
2a6a1b50af | ||
|
|
5a17ed48ae | ||
|
|
c4fa3466a7 | ||
|
|
f9230eacc8 | ||
|
|
2101dddcc6 | ||
|
|
9c6303addb | ||
|
|
8ec8971f2a | ||
|
|
2158a9ee48 | ||
|
|
26bdf8f577 | ||
|
|
6a913f49f0 |
@@ -3,6 +3,7 @@ package com.ruoyi;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@EnableScheduling
|
||||
public class RuoYiApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
|
||||
@@ -22,12 +22,11 @@ import com.ruoyi.system.service.ISysMenuService;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class SysLoginController
|
||||
{
|
||||
public class SysLoginController {
|
||||
@Autowired
|
||||
private SysLoginService loginService;
|
||||
|
||||
@@ -37,40 +36,36 @@ public class SysLoginController
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
@Autowired
|
||||
private IdentityAuthenticationService identityAuthenticationService;
|
||||
IdentityAuthenticationService identityAuthenticationService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public AjaxResult login(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
public AjaxResult login(@RequestBody LoginBody loginBody) {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||
loginBody.getUuid());
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
|
||||
// IdentityAuthentication identityAuthentication = new IdentityAuthentication();
|
||||
// identityAuthentication.setUserName(loginBody.getUsername());
|
||||
// IdentityAuthentication identityAuthenticationselect = identityAuthenticationService.selectIdentityAuthentication(identityAuthentication);
|
||||
// ajax.put("certificationStatusName", identityAuthenticationselect.getCertificationStatusName());
|
||||
// ajax.put("certificationStatus", identityAuthenticationselect.getCertificationStatus());
|
||||
|
||||
//判断该用户是否已经实名认证(certificationStatus1已认证0未认证)
|
||||
IdentityAuthentication identityAuthentication=new IdentityAuthentication();
|
||||
identityAuthentication.setUserName(loginBody.getUsername());
|
||||
String status = identityAuthenticationService.checkIsAuthentication(identityAuthentication);
|
||||
ajax.put("certificationStatus", status);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@GetMapping("getInfo")
|
||||
public AjaxResult getInfo()
|
||||
{
|
||||
public AjaxResult getInfo() {
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// 角色集合
|
||||
Set<String> roles = permissionService.getRolePermission(user);
|
||||
@@ -85,12 +80,11 @@ public class SysLoginController
|
||||
|
||||
/**
|
||||
* 获取路由信息
|
||||
*
|
||||
*
|
||||
* @return 路由信息
|
||||
*/
|
||||
@GetMapping("getRouters")
|
||||
public AjaxResult getRouters()
|
||||
{
|
||||
public AjaxResult getRouters() {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||
return AjaxResult.success(menuService.buildMenus(menus));
|
||||
|
||||
+33
-9
@@ -4,11 +4,15 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/adjudication")
|
||||
public class AdjudicationController extends BaseController {
|
||||
@@ -27,17 +31,12 @@ public class AdjudicationController extends BaseController {
|
||||
|
||||
/**
|
||||
* 裁决书送达(电子邮件)
|
||||
* @param id 案件id
|
||||
* @param appEmail 申请人邮箱
|
||||
* @param resEmail 被申请人邮箱
|
||||
* @param apptrackingNum 申请人快递单号
|
||||
* @param restrackingNum 被申请人快递单号
|
||||
* @param bookSendVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/delivery")
|
||||
public AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail
|
||||
,String apptrackingNum,String restrackingNum){
|
||||
return adjudicationService.sendDocumentByEmail(id,appEmail,resEmail,apptrackingNum,restrackingNum);
|
||||
public AjaxResult sendDocumentByEmail(@RequestBody BookSendVO bookSendVO){
|
||||
return adjudicationService.sendDocumentByEmail(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,8 +45,10 @@ public class AdjudicationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/logistics")
|
||||
// @PreAuthorize("@ss.hasPermi('delivery:detail')")
|
||||
public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
|
||||
return adjudicationService.getLogisticsInfo(caseApplication);
|
||||
List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
|
||||
return AjaxResult.success(logisticsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,6 +57,7 @@ public class AdjudicationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/signature")
|
||||
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
|
||||
public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
|
||||
return adjudicationService.signature(caseApplication);
|
||||
}
|
||||
@@ -66,6 +68,7 @@ public class AdjudicationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/caseFile")
|
||||
// @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
|
||||
public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
|
||||
return adjudicationService.caseFile(caseApplication);
|
||||
}
|
||||
@@ -76,7 +79,28 @@ public class AdjudicationController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/service")
|
||||
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
|
||||
public AjaxResult service(@RequestBody BookSendVO bookSendVO){
|
||||
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
|
||||
}
|
||||
/**
|
||||
* 用印(暂时只改案件状态)
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/stamp")
|
||||
// @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
|
||||
public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
|
||||
return adjudicationService.stamp(caseApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 档案详情查询
|
||||
* @param id 案件id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/archives")
|
||||
public AjaxResult getArchivesDetail(Long id){
|
||||
return adjudicationService.getArchivesDetail(id);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-3
@@ -1,7 +1,10 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -16,17 +19,17 @@ import java.util.List;
|
||||
@RequestMapping("/arbitrator")
|
||||
public class ArbitratorController extends BaseController {
|
||||
@Autowired
|
||||
private IArbitratorService arbitratorService;
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 查询仲裁员信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('arbitrator:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Arbitrator arbitrator)
|
||||
{
|
||||
startPage();
|
||||
List<Arbitrator> list = arbitratorService.selectArbitratorList(arbitrator);
|
||||
List<SysUser> list = sysUserService.selectUserListByAdRole(arbitrator);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
+98
-53
@@ -1,15 +1,18 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
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;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.WxAppletNotifyUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -18,14 +21,12 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/caseApplication")
|
||||
public class CaseApplicationController extends BaseController {
|
||||
public class CaseApplicationController extends BaseController {
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
|
||||
@@ -33,10 +34,9 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 查询立案数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CaseApplication caseApplication)
|
||||
{
|
||||
public TableDataInfo list(CaseApplication caseApplication) {
|
||||
startPage();
|
||||
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
|
||||
return getDataTable(list);
|
||||
@@ -45,15 +45,12 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 新增立案数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:add')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
|
||||
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/addCaseApplication")
|
||||
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
|
||||
if(caseApplicationCount>0){
|
||||
return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
|
||||
}
|
||||
|
||||
caseApplication.setCreateBy(getUsername());
|
||||
return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
|
||||
}
|
||||
@@ -61,11 +58,10 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 修改立案数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:edit')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
|
||||
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editCaseApplication")
|
||||
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
|
||||
caseApplication.setUpdateBy(getUsername());
|
||||
return toAjax(caseApplicationService.editCaseApplication(caseApplication));
|
||||
@@ -74,11 +70,10 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 提交立案申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:submit')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
|
||||
@Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/submitCaseApplication")
|
||||
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
|
||||
return toAjax(caseApplicationService.submitCaseApplication(caseApplication));
|
||||
}
|
||||
@@ -86,11 +81,10 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 删除立案数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:remove')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
|
||||
@Log(title = "删除立案数据", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/removeCaseApplication")
|
||||
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
|
||||
return toAjax(caseApplicationService.deletecaseApplicationByIds(caseApplication));
|
||||
}
|
||||
@@ -98,110 +92,133 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 查询立案信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
|
||||
@PostMapping("/selectCaseApplication")
|
||||
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
|
||||
return success(caseApplicationselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已签署裁决书URL
|
||||
*/
|
||||
@PostMapping("/selectSignSealUrl")
|
||||
public AjaxResult selectSignSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
|
||||
CaseApplication caseApplicationselect = caseApplicationService.selectSignSealUrl(caseApplication);
|
||||
return success(caseApplicationselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询签名链接
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
|
||||
@PostMapping("/selectSignUrl")
|
||||
public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
|
||||
SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
|
||||
return success(sealSignRecordselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用印链接
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
|
||||
@PostMapping("/selectSealUrl")
|
||||
public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
|
||||
SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
|
||||
return success(sealUrlRecordselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 立案申请导入模板下载
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
|
||||
util.importTemplateExcel(response, "立案申请数据");
|
||||
}
|
||||
|
||||
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:import')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file) throws Exception {
|
||||
if(file==null){
|
||||
return warn("请上传文件");
|
||||
}
|
||||
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
|
||||
List<CaseApplication> caseApplicationList = util.importExcel(file.getInputStream());
|
||||
String operName = getUsername();
|
||||
String message = caseApplicationService.importCaseApplication(caseApplicationList,operName);
|
||||
String message = caseApplicationService.importCaseApplication(caseApplicationList, operName);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 组庭
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
|
||||
@Log(title = "组庭", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pendTral")
|
||||
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return toAjax(caseApplicationService.pendTral(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 组庭审核
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralCheck')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
|
||||
@Log(title = "组庭审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pendTralCheck")
|
||||
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return toAjax(caseApplicationService.pendTralCheck(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 组庭确认
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralSure')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
|
||||
@Log(title = "组庭确认", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pendTralSure")
|
||||
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return toAjax(caseApplicationService.pendTralSure(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 核验裁决书
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
|
||||
@Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/verificationArbitrateRecord")
|
||||
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return toAjax(caseApplicationService.verificationArbitrateRecord(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核裁决书
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
|
||||
@Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/checkArbitrateRecord")
|
||||
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return toAjax(caseApplicationService.checkArbitrateRecord(caseApplication));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 是否指派仲裁员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
|
||||
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pendingAppointArbotrar")
|
||||
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交立案审查
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:submitCaseApplicationCheck')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
|
||||
@Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/submitCaseApplicationCheck")
|
||||
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
|
||||
return toAjax(caseApplicationService.submitCaseApplicationCheck(caseApplication));
|
||||
}
|
||||
@@ -209,14 +226,42 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 确认缴费查询立案信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
|
||||
@PostMapping("/selectCaseApplicationConfirm")
|
||||
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
|
||||
return success(caseApplicationselect);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送房间号短信
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/sendRoomNoMessage")
|
||||
public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO) {
|
||||
String result = caseApplicationService.sendRoomNoMessage(messageVO);
|
||||
return success(result);
|
||||
}
|
||||
/**
|
||||
* 获取UrlScheme
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/getUrlScheme")
|
||||
public AjaxResult getUrlScheme() {
|
||||
String schemeUrl = WxAppletNotifyUtils.jumpAppletSchemeUrl();
|
||||
return success(schemeUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成庭审笔录
|
||||
* @param arbitrateRecord
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/creatTrialRecord")
|
||||
@PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
|
||||
public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
|
||||
return caseApplicationService.creatTrialRecord(arbitrateRecord);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -6,6 +6,7 @@ import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -22,6 +23,7 @@ public class CaseArbitrateController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/method")
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
|
||||
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
|
||||
,Integer opinion){
|
||||
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
|
||||
@@ -34,6 +36,7 @@ public class CaseArbitrateController extends BaseController {
|
||||
*/
|
||||
@PostMapping("/writtenHear")
|
||||
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
|
||||
arbitrateRecord.setCreateBy(getUsername());
|
||||
return caseArbitrateService.writtenHear(arbitrateRecord);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-5
@@ -8,6 +8,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -37,7 +38,7 @@ public class CaseEvidenceController extends BaseController {
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
|
||||
String username = this.getUsername();
|
||||
return caseEvidenceService.getCaseDetailsById(id,username);
|
||||
return caseEvidenceService.getCaseDetailsById(id, username);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,16 +53,17 @@ public class CaseEvidenceController extends BaseController {
|
||||
public AjaxResult uploadEvidence(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
|
||||
String username = this.getUsername();
|
||||
Long userId = this.getUserId();
|
||||
return caseEvidenceService.uploadEvidence(file, annexType, id,username,userId);
|
||||
return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前用户案件列表
|
||||
*
|
||||
* @param identityNum
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/all")
|
||||
public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
|
||||
public TableDataInfo getCaseListAll(@RequestParam(required = false) String identityNum) {
|
||||
startPage();
|
||||
List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
|
||||
if (list != null) {
|
||||
@@ -72,21 +74,23 @@ public class CaseEvidenceController extends BaseController {
|
||||
|
||||
/**
|
||||
* 证据确认
|
||||
*
|
||||
* @param caseApplication 案件对象
|
||||
* @return 统一返回结果
|
||||
*/
|
||||
@PutMapping("/confirm")
|
||||
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication){
|
||||
public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return caseEvidenceService.evidenceConfirmation(caseApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 案件质证
|
||||
*
|
||||
* @param caseEvidenceDTO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/crossexami")
|
||||
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO){
|
||||
public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
|
||||
return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ public class CaseLogRecordController extends BaseController {
|
||||
/**
|
||||
* 查询案件日志列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseLogRecord:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('caseLog:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CaseLogRecord caseLogRecord)
|
||||
{
|
||||
|
||||
+14
@@ -2,9 +2,11 @@ package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -24,16 +26,28 @@ public class CasePaymentController {
|
||||
* @param casePayDTO 缴费传入参数
|
||||
* @return 统一响应结果
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
|
||||
@PostMapping("/casePay")
|
||||
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
|
||||
return paymentService.casePay(casePayDTO);
|
||||
}
|
||||
/**
|
||||
* 确认缴费
|
||||
* @param payDTO 缴费传入参数
|
||||
* @return 统一响应结果
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
|
||||
@PostMapping("/confirmPay")
|
||||
public AjaxResult confirmPay(@Validated @RequestBody CaseConfirmPayDTO payDTO) {
|
||||
return paymentService.confirmPay(payDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 缴费确认
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
|
||||
@PutMapping("/confirm")
|
||||
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
|
||||
return paymentService.confirmPayment(caseApplication);
|
||||
|
||||
+10
-23
@@ -1,8 +1,8 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -14,40 +14,27 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/identityAuthentication")
|
||||
public class IdentityAuthenticationController extends BaseController {
|
||||
public class IdentityAuthenticationController extends BaseController {
|
||||
@Autowired
|
||||
private IdentityAuthenticationService identityAuthenticationService;
|
||||
|
||||
/**
|
||||
* 查询身份认证EIDtoken
|
||||
* 获取EIDtoken
|
||||
*/
|
||||
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
||||
public AjaxResult selectIdentityAuthenticaEIDtoken()
|
||||
{
|
||||
IdentityAuthentication ientityAuthentication = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
|
||||
return success(ientityAuthentication);
|
||||
public AjaxResult selectIdentityAuthenticaEIDtoken() {
|
||||
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
|
||||
return success(tokenResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询身份认证结果
|
||||
* 小程序人脸核身后查询身份认证结果
|
||||
*/
|
||||
@PostMapping("/selectIdentityAuthenticaRespon")
|
||||
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication)
|
||||
{
|
||||
String username = this.getUsername();
|
||||
Long userId = this.getUserId();
|
||||
ientityAuthentication.setUserId(userId);
|
||||
ientityAuthentication.setUserName(username);
|
||||
IdentityAuthentication ientityAuthenticationRes = identityAuthenticationService.selectIdentityAuthenticaRespon( ientityAuthentication);
|
||||
return success(ientityAuthenticationRes);
|
||||
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://121.40.189.20:3306/arbitrate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
url: jdbc:mysql://121.40.189.20:3306/smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
username: root
|
||||
password: root123456
|
||||
password: YMzc157#
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
@@ -94,14 +94,20 @@ spring:
|
||||
mail:
|
||||
host: smtp.163.com
|
||||
port: 25
|
||||
username: hjbjava@163.com
|
||||
password: BSRSSEPJWGNNVYYL
|
||||
username: lmj1549843951@163.com
|
||||
password: JGIOQVFCLAZKXRKO
|
||||
default-encoding: UTF-8
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
connectiontimeout: 5000
|
||||
timeout: 5000
|
||||
writetimeout: 5000
|
||||
socketFactoryClass: javax.net.ssl.SSLSocketFactory
|
||||
socketFactoryFallback: false
|
||||
socketFactoryPort: 465
|
||||
debug: false
|
||||
protocol: smtp
|
||||
#上上签配置参数
|
||||
ssq:
|
||||
developerId: 1695872832013855470
|
||||
@@ -166,4 +172,4 @@ identityAuthentication:
|
||||
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||
merchantId: 0NSJ2309281116194321
|
||||
privateKeyHexDecodeinfo: MHcCAQEEIEw7MRv3uYlpmU6Fko4GlXSh6Vd38k0cUQZ5zDwvRg+voAoGCCqBHM9VAYItoUQDQgAEUdxIAWhGg4LUXf1GoPdb8XMbGudpexPQCuaaRi9BCnNbpaF1kcwRhhsBKvop9ZmW/nOz4wQ1r/iIEOrc9qCXgQ==
|
||||
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
|
||||
+15
-24
@@ -52,19 +52,19 @@
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 动态数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
@@ -136,27 +136,15 @@
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||
<version>3.1.270</version>
|
||||
<version>3.1.876</version>
|
||||
</dependency>
|
||||
<!--
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
|
||||
<version>3.1.871</version>
|
||||
<version>3.1.875</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java-common</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--用户信息解密-->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
@@ -195,7 +183,10 @@
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.config;
|
||||
|
||||
public class EsignApplicaConfig {
|
||||
public class EsignDemoConfig {
|
||||
|
||||
// 应用ID
|
||||
public static final String EsignAppId = "7438987614";
|
||||
+24
-21
@@ -9,8 +9,8 @@
|
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
package com.ruoyi.common.constant;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
||||
@@ -26,6 +26,9 @@ import java.util.*;
|
||||
|
||||
/**
|
||||
* @description 请求数据通用处理类
|
||||
* @author 澄泓
|
||||
* @date 2020年10月22日 下午14:25:31
|
||||
* @since JDK1.7
|
||||
*/
|
||||
public class EsignEncryption {
|
||||
|
||||
@@ -40,7 +43,7 @@ public class EsignEncryption {
|
||||
* @param url
|
||||
* @return
|
||||
*/
|
||||
public static String appendSignDataString(String httpMethod, String contentMd5,String accept,String contentType,String headers,String date, String url) throws EsignInterfacException {
|
||||
public static String appendSignDataString(String httpMethod, String contentMd5,String accept,String contentType,String headers,String date, String url) throws EsignDemoException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(httpMethod).append("\n").append(accept).append("\n").append(contentMd5).append("\n")
|
||||
.append(contentType).append("\n");
|
||||
@@ -62,9 +65,9 @@ public class EsignEncryption {
|
||||
* Content-MD5的计算方法
|
||||
* @param str 待计算的消息
|
||||
* @return MD5计算后摘要值的Base64编码(ContentMD5)
|
||||
* @throws EsignInterfacException 加密过程中的异常信息
|
||||
* @throws EsignDemoException 加密过程中的异常信息
|
||||
*/
|
||||
public static String doContentMD5(String str) throws EsignInterfacException {
|
||||
public static String doContentMD5(String str) throws EsignDemoException {
|
||||
byte[] md5Bytes = null;
|
||||
MessageDigest md5 = null;
|
||||
String contentMD5 = null;
|
||||
@@ -78,7 +81,7 @@ public class EsignEncryption {
|
||||
contentMD5 = Base64.encodeBase64String(md5Bytes);
|
||||
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
|
||||
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
@@ -92,9 +95,9 @@ public class EsignEncryption {
|
||||
* @param message 待签名字符串
|
||||
* @param secret 密钥APP KEY
|
||||
* @return reqSignature HmacSHA256计算后摘要值的Base64编码
|
||||
* @throws EsignInterfacException 加密过程中的异常信息
|
||||
* @throws EsignDemoException 加密过程中的异常信息
|
||||
*/
|
||||
public static String doSignatureBase64(String message, String secret) throws EsignInterfacException {
|
||||
public static String doSignatureBase64(String message, String secret) throws EsignDemoException {
|
||||
String algorithm = "HmacSHA256";
|
||||
Mac hmacSha256;
|
||||
String digestBase64 = null;
|
||||
@@ -108,11 +111,11 @@ public class EsignEncryption {
|
||||
// 把摘要后的结果digestBytes使用Base64进行编码
|
||||
digestBase64 = Base64.encodeBase64String(digestBytes);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
|
||||
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (InvalidKeyException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("无效的密钥规范",e);
|
||||
EsignDemoException ex = new EsignDemoException("无效的密钥规范",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
@@ -151,7 +154,7 @@ public class EsignEncryption {
|
||||
* hash散列加密算法
|
||||
* @return
|
||||
*/
|
||||
public static String Hmac_SHA256(String message,String key) throws EsignInterfacException {
|
||||
public static String Hmac_SHA256(String message,String key) throws EsignDemoException {
|
||||
byte[] rawHmac=null;
|
||||
try {
|
||||
SecretKeySpec sk = new SecretKeySpec(key.getBytes(), "HmacSHA256");
|
||||
@@ -159,15 +162,15 @@ public class EsignEncryption {
|
||||
mac.init(sk);
|
||||
rawHmac = mac.doFinal(message.getBytes());
|
||||
}catch (InvalidKeyException e){
|
||||
EsignInterfacException ex = new EsignInterfacException("无效的密钥规范",e);
|
||||
EsignDemoException ex = new EsignDemoException("无效的密钥规范",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
|
||||
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}catch (Exception e){
|
||||
EsignInterfacException ex = new EsignInterfacException("hash散列加密算法报错",e);
|
||||
EsignDemoException ex = new EsignDemoException("hash散列加密算法报错",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}finally {
|
||||
@@ -179,14 +182,14 @@ public class EsignEncryption {
|
||||
/**
|
||||
* MD5加密32位
|
||||
*/
|
||||
public static String MD5Digest(String text) throws EsignInterfacException {
|
||||
public static String MD5Digest(String text) throws EsignDemoException {
|
||||
byte[] digest=null;
|
||||
try {
|
||||
MessageDigest md5 = MessageDigest.getInstance("MD5");
|
||||
md5.update(text.getBytes());
|
||||
digest = md5.digest();
|
||||
}catch (NoSuchAlgorithmException e){
|
||||
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
|
||||
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}finally {
|
||||
@@ -233,7 +236,7 @@ public class EsignEncryption {
|
||||
* @return 排序后的API接口地址
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String sortApiUrl(String apiUrl) throws EsignInterfacException {
|
||||
public static String sortApiUrl(String apiUrl) throws EsignDemoException {
|
||||
|
||||
if (!apiUrl.contains("?")) {
|
||||
return apiUrl;
|
||||
@@ -255,7 +258,7 @@ public class EsignEncryption {
|
||||
String value = str.substring(index + 1);
|
||||
if (queryParamsMap.containsKey(key)) {
|
||||
String msg = MessageFormat.format("请求URL中的Query参数的{0}重复", key);
|
||||
throw new EsignInterfacException(msg);
|
||||
throw new EsignDemoException(msg);
|
||||
}
|
||||
queryParamsMap.put(key, value);
|
||||
}
|
||||
@@ -297,9 +300,9 @@ public class EsignEncryption {
|
||||
*获取query
|
||||
* @param apiUrl
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static ArrayList<BasicNameValuePair> getQuery(String apiUrl) throws EsignInterfacException {
|
||||
public static ArrayList<BasicNameValuePair> getQuery(String apiUrl) throws EsignDemoException {
|
||||
ArrayList<BasicNameValuePair> BasicNameValuePairList = new ArrayList<>();
|
||||
|
||||
if (!apiUrl.contains("?")) {
|
||||
@@ -318,7 +321,7 @@ public class EsignEncryption {
|
||||
String value = str.substring(index + 1);
|
||||
if (queryParamsMap.containsKey(key)) {
|
||||
String msg = MessageFormat.format("请求URL中的Query参数的{0}重复", key);
|
||||
throw new EsignInterfacException(msg);
|
||||
throw new EsignDemoException(msg);
|
||||
}
|
||||
BasicNameValuePairList.add(new BasicNameValuePair(key,value));
|
||||
queryParamsMap.put(key, value);
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.constant;
|
||||
/**
|
||||
* @description 头部信息常量
|
||||
* @author 澄泓
|
||||
+24
-17
@@ -9,8 +9,10 @@
|
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
package com.ruoyi.common.constant;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import org.apache.http.*;
|
||||
import org.apache.http.auth.AuthScope;
|
||||
import org.apache.http.auth.UsernamePasswordCredentials;
|
||||
@@ -22,6 +24,7 @@ import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpRequestBase;
|
||||
import org.apache.http.client.protocol.HttpClientContext;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.config.Registry;
|
||||
import org.apache.http.config.RegistryBuilder;
|
||||
import org.apache.http.conn.ConnectTimeoutException;
|
||||
@@ -37,6 +40,7 @@ import org.apache.http.impl.client.BasicCredentialsProvider;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
@@ -49,12 +53,15 @@ import java.net.UnknownHostException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description Http请求 辅助类
|
||||
* @author 澄泓
|
||||
* @since JDK1.7
|
||||
*/
|
||||
public class EsignHttpCfgHelper {
|
||||
|
||||
@@ -226,16 +233,16 @@ public class EsignHttpCfgHelper {
|
||||
* @param param
|
||||
* {@link Object} 参数
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
* @author 澄泓
|
||||
*/
|
||||
public static EsignHttpResponse sendHttp(EsignRequestType reqType, String httpUrl, Map<String, String> headers, Object param, boolean debug)
|
||||
throws EsignInterfacException {
|
||||
throws EsignDemoException {
|
||||
HttpRequestBase reqBase=null;
|
||||
if(httpUrl.startsWith("http")){
|
||||
reqBase=reqType.getHttpType(httpUrl);
|
||||
}else{
|
||||
throw new EsignInterfacException("请求url地址格式错误");
|
||||
throw new EsignDemoException("请求url地址格式错误");
|
||||
}
|
||||
if(debug){
|
||||
LOGGER.info("请求头:{}",headers+"\n");
|
||||
@@ -288,29 +295,29 @@ public class EsignHttpCfgHelper {
|
||||
LOGGER.info("----------------------------end------------------------");
|
||||
}
|
||||
} catch (NoHttpResponseException e) {
|
||||
throw new EsignInterfacException("服务器丢失了",e);
|
||||
throw new EsignDemoException("服务器丢失了",e);
|
||||
} catch (SSLHandshakeException e){
|
||||
String msg = MessageFormat.format("SSL握手异常", e);
|
||||
EsignInterfacException ex = new EsignInterfacException(msg, e);
|
||||
EsignDemoException ex = new EsignDemoException(msg, e);
|
||||
throw ex;
|
||||
} catch (UnknownHostException e){
|
||||
EsignInterfacException ex = new EsignInterfacException("服务器找不到", e);
|
||||
EsignDemoException ex = new EsignDemoException("服务器找不到", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch(ConnectTimeoutException e){
|
||||
EsignInterfacException ex = new EsignInterfacException("连接超时", e);
|
||||
EsignDemoException ex = new EsignDemoException("连接超时", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch(SSLException e){
|
||||
EsignInterfacException ex = new EsignInterfacException("SSL异常",e);
|
||||
EsignDemoException ex = new EsignDemoException("SSL异常",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (ClientProtocolException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("请求头异常",e);
|
||||
EsignDemoException ex = new EsignDemoException("请求头异常",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("网络请求失败",e);
|
||||
EsignDemoException ex = new EsignDemoException("网络请求失败",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -318,7 +325,7 @@ public class EsignHttpCfgHelper {
|
||||
try {
|
||||
res.close();
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("--->>关闭请求响应失败",e);
|
||||
EsignDemoException ex = new EsignDemoException("--->>关闭请求响应失败",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
@@ -358,7 +365,7 @@ public class EsignHttpCfgHelper {
|
||||
* @return
|
||||
* @author 澄泓
|
||||
*/
|
||||
private static void cfgPoolMgr() throws EsignInterfacException {
|
||||
private static void cfgPoolMgr() throws EsignDemoException {
|
||||
ConnectionSocketFactory plainsf = PlainConnectionSocketFactory.getSocketFactory();
|
||||
LayeredConnectionSocketFactory sslsf = SSLConnectionSocketFactory.getSocketFactory();
|
||||
if(!SSL_VERIFY){
|
||||
@@ -431,7 +438,7 @@ public class EsignHttpCfgHelper {
|
||||
/**
|
||||
* 忽略域名校验
|
||||
*/
|
||||
private static SSLConnectionSocketFactory sslConnectionSocketFactory() throws EsignInterfacException {
|
||||
private static SSLConnectionSocketFactory sslConnectionSocketFactory() throws EsignDemoException {
|
||||
try {
|
||||
SSLContext ctx = SSLContext.getInstance("TLS"); // 创建一个上下文(此处指定的协议类型似乎不是重点)
|
||||
X509TrustManager tm = new X509TrustManager() { // 创建一个跳过SSL证书的策略
|
||||
@@ -448,7 +455,7 @@ public class EsignHttpCfgHelper {
|
||||
ctx.init(null, new TrustManager[] { tm }, null); // 使用上面的策略初始化上下文
|
||||
return new SSLConnectionSocketFactory(ctx, new String[] { "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2" }, null, NoopHostnameVerifier.INSTANCE);
|
||||
}catch (Exception e){
|
||||
EsignInterfacException ex = new EsignInterfacException("忽略域名校验失败",e);
|
||||
EsignDemoException ex = new EsignDemoException("忽略域名校验失败",e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
@@ -461,7 +468,7 @@ public class EsignHttpCfgHelper {
|
||||
* @return
|
||||
* @author 澄泓
|
||||
*/
|
||||
private static synchronized CloseableHttpClient getHttpClient() throws EsignInterfacException {
|
||||
private static synchronized CloseableHttpClient getHttpClient() throws EsignDemoException {
|
||||
if(httpClient==null) {
|
||||
CredentialsProvider credsProvider = new BasicCredentialsProvider();
|
||||
credsProvider.setCredentials(new AuthScope(PROXY_IP,PROXY_PORT),new UsernamePasswordCredentials(PROXY_USERNAME, PROXY_PASSWORD));
|
||||
+31
-27
@@ -9,8 +9,9 @@
|
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.constant;
|
||||
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import java.io.*;
|
||||
@@ -22,7 +23,10 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 澄泓
|
||||
* @version JDK1.7
|
||||
* @description 文件转换类
|
||||
* @date 2020/10/26 10:47
|
||||
*/
|
||||
public class FileTransformation {
|
||||
|
||||
@@ -31,9 +35,9 @@ public class FileTransformation {
|
||||
*
|
||||
* @param srcFilePath 本地文件路径
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static byte[] fileToBytes(String srcFilePath) throws EsignInterfacException {
|
||||
public static byte[] fileToBytes(String srcFilePath) throws EsignDemoException {
|
||||
return getBytes(srcFilePath);
|
||||
}
|
||||
|
||||
@@ -42,9 +46,9 @@ public class FileTransformation {
|
||||
*
|
||||
* @param filePath 本地文件路径
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static String fileToBase64(String filePath) throws EsignInterfacException {
|
||||
public static String fileToBase64(String filePath) throws EsignDemoException {
|
||||
byte[] bytes;
|
||||
String base64 = null;
|
||||
bytes = fileToBytes(filePath);
|
||||
@@ -53,7 +57,7 @@ public class FileTransformation {
|
||||
return base64;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws EsignInterfacException {
|
||||
public static void main(String[] args) throws EsignDemoException {
|
||||
System.out.println(getFileContentMD5("D:\\文档\\PLT2022-02124CT.pdf"));
|
||||
}
|
||||
|
||||
@@ -62,7 +66,7 @@ public class FileTransformation {
|
||||
* @param filePath 文件路径
|
||||
* @return
|
||||
*/
|
||||
public static String getFileContentMD5(String filePath) throws EsignInterfacException {
|
||||
public static String getFileContentMD5(String filePath) throws EsignDemoException {
|
||||
// 获取文件MD5的二进制数组(128位)
|
||||
byte[] bytes = getFileMD5Bytes128(filePath);
|
||||
// 对文件MD5的二进制数组进行base64编码
|
||||
@@ -75,7 +79,7 @@ public class FileTransformation {
|
||||
* @param httpUrl 网络文件地址url
|
||||
* @return
|
||||
*/
|
||||
public static boolean downLoadFileByUrl(String httpUrl, String dir) throws EsignInterfacException {
|
||||
public static boolean downLoadFileByUrl(String httpUrl, String dir) throws EsignDemoException {
|
||||
InputStream fis = null;
|
||||
FileOutputStream fileOutputStream = null;
|
||||
try {
|
||||
@@ -92,7 +96,7 @@ public class FileTransformation {
|
||||
fileOutputStream.write(buffer, 0, length);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("获取文件流异常", e);
|
||||
EsignDemoException ex = new EsignDemoException("获取文件流异常", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -104,7 +108,7 @@ public class FileTransformation {
|
||||
fileOutputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("关闭文件流异常", e);
|
||||
EsignDemoException ex = new EsignDemoException("关闭文件流异常", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
@@ -119,7 +123,7 @@ public class FileTransformation {
|
||||
* @param fileUrl 网络文件地址url
|
||||
* @return
|
||||
*/
|
||||
public static Map fileUrlToBytes(String fileUrl) throws EsignInterfacException {
|
||||
public static Map fileUrlToBytes(String fileUrl) throws EsignDemoException {
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
try {
|
||||
URL url = new URL(fileUrl);
|
||||
@@ -144,11 +148,11 @@ public class FileTransformation {
|
||||
fis.close();
|
||||
map.put("md5Bytes", md5Bytes);
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("获取文件流异常", e);
|
||||
EsignDemoException ex = new EsignDemoException("获取文件流异常", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("文件计算异常", e);
|
||||
EsignDemoException ex = new EsignDemoException("文件计算异常", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
@@ -159,9 +163,9 @@ public class FileTransformation {
|
||||
* 获取文件MD5的二进制数组(128位)
|
||||
* @param filePath
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static byte[] getFileMD5Bytes128(String filePath) throws EsignInterfacException {
|
||||
public static byte[] getFileMD5Bytes128(String filePath) throws EsignDemoException {
|
||||
FileInputStream fis = null;
|
||||
byte[] md5Bytes = null;
|
||||
try {
|
||||
@@ -176,15 +180,15 @@ public class FileTransformation {
|
||||
md5Bytes = md5.digest();
|
||||
fis.close();
|
||||
} catch (FileNotFoundException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("文件找不到", e);
|
||||
EsignDemoException ex = new EsignDemoException("文件找不到", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("不支持此算法", e);
|
||||
EsignDemoException ex = new EsignDemoException("不支持此算法", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("输入流或输出流异常", e);
|
||||
EsignDemoException ex = new EsignDemoException("输入流或输出流异常", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -192,7 +196,7 @@ public class FileTransformation {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("关闭文件输入流失败", e);
|
||||
EsignDemoException ex = new EsignDemoException("关闭文件输入流失败", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
@@ -204,12 +208,12 @@ public class FileTransformation {
|
||||
/**
|
||||
* @param path
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
* @description 根据文件路径,获取文件base64
|
||||
* @author 宫清
|
||||
* @date 2019年7月21日 下午4:22:08
|
||||
*/
|
||||
public static String getBase64Str(String path) throws EsignInterfacException {
|
||||
public static String getBase64Str(String path) throws EsignDemoException {
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = new FileInputStream(new File(path));
|
||||
@@ -217,7 +221,7 @@ public class FileTransformation {
|
||||
is.read(bytes);
|
||||
return Base64.encodeBase64String(bytes);
|
||||
} catch (Exception e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("获取文件输入流失败", e);
|
||||
EsignDemoException ex = new EsignDemoException("获取文件输入流失败", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -225,7 +229,7 @@ public class FileTransformation {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("关闭文件输入流失败", e);
|
||||
EsignDemoException ex = new EsignDemoException("关闭文件输入流失败", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
@@ -247,12 +251,12 @@ public class FileTransformation {
|
||||
/**
|
||||
* @param filePath {@link String} 文件地址
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
* @description 获取文件字节流
|
||||
* @date 2019年7月10日 上午9:17:00
|
||||
* @author 宫清
|
||||
*/
|
||||
public static byte[] getBytes(String filePath) throws EsignInterfacException {
|
||||
public static byte[] getBytes(String filePath) throws EsignDemoException {
|
||||
File file = new File(filePath);
|
||||
FileInputStream fis = null;
|
||||
byte[] buffer = null;
|
||||
@@ -261,7 +265,7 @@ public class FileTransformation {
|
||||
buffer = new byte[(int) file.length()];
|
||||
fis.read(buffer);
|
||||
} catch (Exception e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("获取文件字节流失败", e);
|
||||
EsignDemoException ex = new EsignDemoException("获取文件字节流失败", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
} finally {
|
||||
@@ -269,7 +273,7 @@ public class FileTransformation {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException e) {
|
||||
EsignInterfacException ex = new EsignInterfacException("关闭文件字节流失败", e);
|
||||
EsignDemoException ex = new EsignDemoException("关闭文件字节流失败", e);
|
||||
ex.initCause(e);
|
||||
throw ex;
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
/**
|
||||
* esignSDK-core信息类
|
||||
* @author 澄泓
|
||||
+1
-4
@@ -1,9 +1,6 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.core.domain.entity;
|
||||
/**
|
||||
* 网络请求的response类
|
||||
* @author 澄泓
|
||||
* @date 2022/2/21 17:28
|
||||
* @version
|
||||
*/
|
||||
public class EsignHttpResponse {
|
||||
private int status;
|
||||
@@ -33,9 +33,14 @@ public class SysUser extends BaseEntity
|
||||
@Excel(name = "登录名称")
|
||||
private String userName;
|
||||
|
||||
|
||||
|
||||
/** 用户昵称 */
|
||||
@Excel(name = "用户名称")
|
||||
private String nickName;
|
||||
/** 用户身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
/** 用户邮箱 */
|
||||
@Excel(name = "用户邮箱")
|
||||
@@ -297,12 +302,21 @@ public class SysUser extends BaseEntity
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("userId", getUserId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("userName", getUserName())
|
||||
.append("idCard", getIdCard())
|
||||
.append("nickName", getNickName())
|
||||
.append("email", getEmail())
|
||||
.append("phonenumber", getPhonenumber())
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.enums;
|
||||
|
||||
import org.apache.http.client.methods.*;
|
||||
|
||||
+7
-5
@@ -1,22 +1,24 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.exception;
|
||||
|
||||
/**
|
||||
* description 自定义全局异常
|
||||
* @author 澄泓
|
||||
* datetime 2019年7月1日上午10:43:24
|
||||
*/
|
||||
public class EsignInterfacException extends Exception {
|
||||
public class EsignDemoException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 4359180081622082792L;
|
||||
private Exception e;
|
||||
|
||||
public EsignInterfacException(String msg) {
|
||||
public EsignDemoException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public EsignInterfacException(String msg, Throwable cause) {
|
||||
public EsignDemoException(String msg, Throwable cause) {
|
||||
super(msg,cause);
|
||||
}
|
||||
|
||||
public EsignInterfacException(){
|
||||
public EsignDemoException(){
|
||||
|
||||
}
|
||||
|
||||
+19
-9
@@ -1,5 +1,13 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
|
||||
import com.ruoyi.common.constant.EsignEncryption;
|
||||
import com.ruoyi.common.constant.EsignHeaderConstant;
|
||||
import com.ruoyi.common.constant.EsignHttpCfgHelper;
|
||||
import com.ruoyi.common.core.domain.entity.EsignCoreSdkInfo;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -28,11 +36,13 @@ public class EsignHttpHelper {
|
||||
* @param url 请求路径
|
||||
* @param paramStr 请求参数
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
* @author 澄泓
|
||||
*/
|
||||
public static EsignHttpResponse doCommHttp(String host, String url,EsignRequestType reqType, Object paramStr ,Map<String,String> httpHeader,boolean debug) throws EsignInterfacException {
|
||||
public static EsignHttpResponse doCommHttp(String host, String url, EsignRequestType reqType, Object paramStr , Map<String,String> httpHeader, boolean debug) throws EsignDemoException {
|
||||
|
||||
return EsignHttpCfgHelper.sendHttp(reqType, host+url,httpHeader, paramStr, debug);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +55,11 @@ public class EsignHttpHelper {
|
||||
* @param fileContentMd5 文件fileContentMd5
|
||||
* @param contentType 文件MIME类型
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
* @author 澄泓
|
||||
*/
|
||||
public static EsignHttpResponse doUploadHttp( String uploadUrl,EsignRequestType reqType,byte[] param, String fileContentMd5,
|
||||
String contentType, boolean debug) throws EsignInterfacException {
|
||||
String contentType, boolean debug) throws EsignDemoException {
|
||||
Map<String, String> uploadHeader = buildUploadHeader(fileContentMd5, contentType);
|
||||
if(debug){
|
||||
LOGGER.info("----------------------------start------------------------");
|
||||
@@ -86,7 +96,7 @@ public class EsignHttpHelper {
|
||||
* * charset}
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,String> signAndBuildSignAndJsonHeader(String projectId, String secret,String paramStr,String httpMethod,String url,boolean debug) throws EsignInterfacException {
|
||||
public static Map<String,String> signAndBuildSignAndJsonHeader(String projectId, String secret,String paramStr,String httpMethod,String url,boolean debug) throws EsignDemoException {
|
||||
String contentMD5="";
|
||||
//统一转大写处理
|
||||
httpMethod = httpMethod.toUpperCase();
|
||||
@@ -95,9 +105,9 @@ public class EsignHttpHelper {
|
||||
contentMD5="";
|
||||
} else if("PUT".equals(httpMethod)||"POST".equals(httpMethod)){
|
||||
//对body体做md5摘要
|
||||
contentMD5=EsignEncryption.doContentMD5(paramStr);
|
||||
contentMD5= EsignEncryption.doContentMD5(paramStr);
|
||||
}else{
|
||||
throw new EsignInterfacException(String.format("不支持的请求方法%s",httpMethod));
|
||||
throw new EsignDemoException(String.format("不支持的请求方法%s",httpMethod));
|
||||
}
|
||||
//构造一个初步的请求头
|
||||
Map<String, String> esignHeaderMap = buildSignAndJsonHeader(projectId, contentMD5, EsignHeaderConstant.ACCEPT.VALUE(), EsignHeaderConstant.CONTENTTYPE_JSON.VALUE(), EsignHeaderConstant.AUTHMODE.VALUE());
|
||||
@@ -127,7 +137,7 @@ public class EsignHttpHelper {
|
||||
*/
|
||||
public static Map<String, String> buildTokenAndJsonHeader(String appid,String token) {
|
||||
Map<String, String> esignHeader = new HashMap<>();
|
||||
esignHeader.put("X-Tsign-Open-Version-Sdk",EsignCoreSdkInfo.getSdkVersion());
|
||||
esignHeader.put("X-Tsign-Open-Version-Sdk", EsignCoreSdkInfo.getSdkVersion());
|
||||
esignHeader.put("Content-Type", EsignHeaderConstant.CONTENTTYPE_JSON.VALUE());
|
||||
esignHeader.put("X-Tsign-Open-App-Id", appid);
|
||||
esignHeader.put("X-Tsign-Open-Token", token);
|
||||
@@ -1,360 +0,0 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.bean.SealSignRecord;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class SignAward {
|
||||
|
||||
private static String eSignHost= EsignApplicaConfig.EsignHost;
|
||||
private static String eSignAppId=EsignApplicaConfig.EsignAppId;
|
||||
private static String eSignAppSecret=EsignApplicaConfig.EsignAppSecret;
|
||||
// public static String fileId = "95d0c307d91e4985bdb8874f6f84daa5";
|
||||
public static String fileId = "a0c2ad21065f48ff8b872412c39d5d3a";
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
|
||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||
|
||||
sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
|
||||
sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
|
||||
sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
||||
|
||||
|
||||
sealSignRecord.setPensonAccount("18209231185");
|
||||
sealSignRecord.setPensonName("秦桃则");
|
||||
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
||||
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
||||
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
||||
sealSignRecord.setPositionPagepsn("2");
|
||||
|
||||
sealSignRecord.setPositionXpsn(279+20);
|
||||
sealSignRecord.setPositionYpsn(216.336-20);
|
||||
|
||||
sealSignRecord.setPositionPageorg("2");
|
||||
|
||||
sealSignRecord.setPositionXorg(342+30);
|
||||
sealSignRecord.setPositionYorg(185.136);
|
||||
|
||||
|
||||
|
||||
|
||||
/* 发起签署*/
|
||||
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
|
||||
// JsonObject createByFileJsonObject = gson.fromJson(createByFile.getBody(), JsonObject.class);
|
||||
// JsonObject createByFileData = createByFileJsonObject.getAsJsonObject("data");
|
||||
// String signFlowId = createByFileData.get("signFlowId").getAsString();
|
||||
// System.err.println("流程id:"+signFlowId);
|
||||
|
||||
/* 获取文件签名印章位置*/
|
||||
EsignHttpResponse positions = getPositions(sealSignRecord);
|
||||
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
|
||||
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
|
||||
JsonArray keywordPositions = positionsData.get("keywordPositions").getAsJsonArray();
|
||||
System.out.println("获取文件签名印章位置:" +keywordPositions.toString());
|
||||
|
||||
// String signFlowId = "c9955453716344f9971d308abdc13464";
|
||||
//获取合同文件签名链接
|
||||
// EsignHttpResponse signUrl = signUrl(sealSignRecord);
|
||||
// JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
|
||||
// JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
// String shortUrl = signUrlData.get("shortUrl").getAsString();
|
||||
// String url = signUrlData.get("url").getAsString();
|
||||
// System.out.println("签署短链接:" +shortUrl);
|
||||
// System.out.println("签署长链接:"+url);
|
||||
|
||||
//获取合同文件用印链接
|
||||
// EsignHttpResponse usesealUrl = usesealUrl(sealSignRecord);
|
||||
// JsonObject usesealUrlJsonObject = gson.fromJson(usesealUrl.getBody(), JsonObject.class);
|
||||
// JsonObject usesealUrlData = usesealUrlJsonObject.getAsJsonObject("data");
|
||||
// String shortusesealUrl = usesealUrlData.get("shortUrl").getAsString();
|
||||
// String sealUrl = usesealUrlData.get("url").getAsString();
|
||||
// System.out.println("签署长链接:" +shortusesealUrl);
|
||||
// System.out.println("签署短链接:"+sealUrl);
|
||||
|
||||
//查询签署流程详情
|
||||
// EsignHttpResponse signFlowDetail = signFlowDetail(sealSignRecord);
|
||||
// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
||||
// System.out.println(signFlowDetailJsonObject);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询签署流程详情
|
||||
* @return
|
||||
*/
|
||||
public static EsignHttpResponse signFlowDetail(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
String apiaddr= "/v3/sign-flow/"+ signFlowId + "/detail";
|
||||
String jsonParm = null;
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.GET;
|
||||
//生成签名鉴权方式的的header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发起签署
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String apiaddr = "/v3/sign-flow/create-by-file";
|
||||
|
||||
String fileId = sealSignRecord.getFileid();
|
||||
String fileName = sealSignRecord.getFilename();
|
||||
|
||||
String psnAccount = sealSignRecord.getPensonAccount();
|
||||
String psnName = sealSignRecord.getPensonName();
|
||||
|
||||
String orgName = sealSignRecord.getOrgnizeName();
|
||||
String orgNamePsnAccount = sealSignRecord.getOrgnizeNamePsnAccount();
|
||||
String orgNamepsnName = sealSignRecord.getOrgnizeNamepsnName();
|
||||
|
||||
String positionPagepsn = sealSignRecord.getPositionPagepsn();
|
||||
double positionXpsn = sealSignRecord.getPositionXpsn();
|
||||
double positionYpsn = sealSignRecord.getPositionYpsn();
|
||||
|
||||
String positionPageorg = sealSignRecord.getPositionPageorg();
|
||||
double positionXorg = sealSignRecord.getPositionXorg();
|
||||
double positionYorg = sealSignRecord.getPositionYorg();
|
||||
|
||||
|
||||
String jsonParm = "{\n" +
|
||||
" \"docs\": [\n" +
|
||||
" {\n" +
|
||||
|
||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
|
||||
// " \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
|
||||
" \"fileName\": \"" + fileName + "\"\n" +
|
||||
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signFlowConfig\": {\n" +
|
||||
" \"signFlowTitle\": \"测试合同\",\n" +
|
||||
" \"autoStart\": true,\n" +
|
||||
" \"authConfig\": {\n" +
|
||||
" \"willingnessAuthModes\": [\n" +
|
||||
" \"CODE_SMS\"\n" +
|
||||
" ],\n" +
|
||||
" \"psnAvailableAuthModes\": [\n" +
|
||||
" \"PSN_MOBILE3\"\n" +
|
||||
" ],\n" +
|
||||
" \"orgAvailableAuthModes\": [\n" +
|
||||
" \"ORG_LEGALREP\"\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
" \"autoFinish\": true\n" +
|
||||
" },\n" +
|
||||
|
||||
" \"signers\": [\n" +
|
||||
|
||||
" {\n" +
|
||||
|
||||
" \"psnSignerInfo\": {\n" +
|
||||
|
||||
// " \"psnAccount\": \"18209231185\",\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\",\n" +
|
||||
|
||||
" \"psnInfo\": {\n" +
|
||||
|
||||
// " \"psnName\": \"秦桃则\"\n" +
|
||||
" \"psnName\": \"" + psnName + "\"\n" +
|
||||
" }\n" +
|
||||
|
||||
|
||||
" },\n" +
|
||||
|
||||
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
|
||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
" \"autoSign\": false,\n" +
|
||||
" \"freeMode\": false,\n" +
|
||||
" \"movableSignField\": false,\n" +
|
||||
" \"signFieldPosition\": {\n" +
|
||||
|
||||
// " \"positionPage\": \"2\",\n" +
|
||||
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
|
||||
|
||||
// " \"positionX\": 310.0,\n" +
|
||||
" \"positionX\": " + positionXpsn + ",\n" +
|
||||
|
||||
// " \"positionY\": 247.536\n" +
|
||||
" \"positionY\": " + positionYpsn + "\n" +
|
||||
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
" },\n" +
|
||||
" \"signFieldType\": 0\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signerType\": 0\n" +
|
||||
" },\n" +
|
||||
|
||||
|
||||
" {\n" +
|
||||
" \"orgSignerInfo\": {\n" +
|
||||
|
||||
// " \"orgName\": \"西安云美电子科技有限公司\",\n" +
|
||||
" \"orgName\": \"" + orgName + "\",\n" +
|
||||
|
||||
" \"transactorInfo\": {\n" +
|
||||
|
||||
|
||||
// " \"psnAccount\": \"17691338406\",\n" +
|
||||
" \"psnAccount\": \"" + orgNamePsnAccount + "\",\n" +
|
||||
|
||||
" \"psnInfo\": {\n" +
|
||||
|
||||
// " \"psnName\": \"韩超勃\"\n" +
|
||||
" \"psnName\": \"" + orgNamepsnName + "\"\n" +
|
||||
" }\n" +
|
||||
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
|
||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
" \"autoSign\": false,\n" +
|
||||
" \"freeMode\": false,\n" +
|
||||
|
||||
" \"signFieldPosition\": {\n" +
|
||||
|
||||
// " \"positionPage\": \"2\",\n" +
|
||||
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
||||
|
||||
// " \"positionX\": 340.0,\n" +
|
||||
" \"positionX\": " + positionXorg + ",\n" +
|
||||
|
||||
// " \"positionY\": 340.736\n" +
|
||||
" \"positionY\": " + positionYorg + "\n" +
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
" },\n" +
|
||||
" \"signFieldType\": 0\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signerType\": 1\n" +
|
||||
" }\n" +
|
||||
|
||||
" ]\n" +
|
||||
"}";
|
||||
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成请求签名鉴权方式的Header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合同文件签名链接
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
String psnAccount = sealSignRecord.getPensonAccount();
|
||||
|
||||
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
|
||||
String jsonParm = "{\n" +
|
||||
" \"operator\": {\n" +
|
||||
// " \"psnAccount\":\"18209231185\"\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成请求签名鉴权方式的Header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取合同文件用印链接
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
|
||||
|
||||
String psnAccount = sealSignRecord.getOrgnizeNamePsnAccount();
|
||||
String orgName = sealSignRecord.getOrgnizeName();
|
||||
|
||||
String jsonParm = "{\n" +
|
||||
// " \"needLogin\": true,\n" +
|
||||
" \"operator\": {\n" +
|
||||
|
||||
// " \"psnAccount\":\"17691338406\"\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
||||
" },\n" +
|
||||
" \"organization\": {\n" +
|
||||
|
||||
// " \"orgName\": \"西安云美电子科技有限公司\"\n" +
|
||||
" \"orgName\": \"" + orgName + "\"\n" +
|
||||
|
||||
" }\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成请求签名鉴权方式的Header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件签名印章位置
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String fileId = sealSignRecord.getFileid();
|
||||
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
|
||||
String jsonParm = "{\n" +
|
||||
" \"keywords\": [\n" +
|
||||
" \"仲裁员:\",\n" +
|
||||
" \"(仲裁委员会盖章)\"\n" +
|
||||
" ]\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成请求签名鉴权方式的Header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 获取微信小程序url scheme
|
||||
* @date 2023-10-13 10:16
|
||||
*/
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
public class WxAppletNotifyUtils {
|
||||
|
||||
/**
|
||||
* scheme 跳转微信小程序,需中转H5
|
||||
|
||||
*/
|
||||
public static String jumpAppletSchemeUrl(){
|
||||
|
||||
String token= getAccessToken();
|
||||
|
||||
//接口地址
|
||||
String url = "https://api.weixin.qq.com/wxa/generatescheme?access_token="+token;
|
||||
JSONObject body = JSONUtil.createObj();
|
||||
JSONObject jumpWxa = JSONUtil.createObj();
|
||||
jumpWxa.putOpt("path","pages/login");
|
||||
jumpWxa.putOpt("query","");
|
||||
jumpWxa.putOpt("env_version","release");
|
||||
body.putOpt("jump_wxa",jumpWxa);
|
||||
//链接过期类型:0时间戳 1间隔天数
|
||||
body.putOpt("expire_type",1);
|
||||
body.putOpt("is_expire",true);
|
||||
//指定失效天数,最多30
|
||||
body.putOpt("expire_interval",30);
|
||||
String post = HttpUtil.post(url,body.toJSONString(2));
|
||||
JSONObject result = JSONUtil.parseObj(post);
|
||||
if(result!=null && result.containsKey("openlink")){
|
||||
return result.getStr("openlink");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
//凭证调用
|
||||
public static String getAccessToken(){
|
||||
String token;
|
||||
//小程序APPID
|
||||
String appid="wx91cb8459dca561b4";//自行获取
|
||||
//小程序secret
|
||||
String secret="190aaa3bda96a65d25318fbb0e133fc6";//自己去公众号后台获取
|
||||
String httpUrl="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
|
||||
|
||||
httpUrl= httpUrl+"&appid="+appid+"&secret="+secret;
|
||||
//get请求
|
||||
String result = HttpUtil.get(httpUrl);
|
||||
//解析结果
|
||||
JSONObject jsonObject = JSONUtil.parseObj(result);
|
||||
//get AccessToken
|
||||
token=jsonObject.get("access_token",String.class,false);
|
||||
return token;
|
||||
}
|
||||
|
||||
}
|
||||
+9
-5
@@ -1,4 +1,8 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
package com.ruoyi.common.utils.bean;
|
||||
|
||||
|
||||
import com.ruoyi.common.constant.FileTransformation;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -19,12 +23,12 @@ public class EsignFileBean {
|
||||
private String filePath;
|
||||
|
||||
|
||||
public EsignFileBean(String filePath) throws EsignInterfacException {
|
||||
public EsignFileBean(String filePath) throws EsignDemoException {
|
||||
this.filePath=filePath;
|
||||
this.fileContentMD5 = FileTransformation.getFileContentMD5(filePath);
|
||||
File file = new File(filePath);
|
||||
if (!file.exists()) {
|
||||
throw new EsignInterfacException("文件不存在");
|
||||
throw new EsignDemoException("文件不存在");
|
||||
}
|
||||
this.fileName = file.getName();
|
||||
this.fileSize = (int) file.length();
|
||||
@@ -45,9 +49,9 @@ public class EsignFileBean {
|
||||
/**
|
||||
* 传入本地文件地址获取二进制数据
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public byte[] getFileBytes() throws EsignInterfacException {
|
||||
public byte[] getFileBytes() throws EsignDemoException {
|
||||
return FileTransformation.fileToBytes(filePath);
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
package com.ruoyi.common.utils.bean;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
public class SealSignRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 文件id */
|
||||
private String fileid;
|
||||
/** 文件名称 */
|
||||
private String filename;
|
||||
/** 流程id */
|
||||
private String signFlowid;
|
||||
/** 签名人账户 */
|
||||
private String pensonAccount;
|
||||
/** 签名人姓名 */
|
||||
private String pensonName;
|
||||
/** 机构名称 */
|
||||
private String orgnizeName;
|
||||
/** 机构经办人 */
|
||||
private String orgnizeNamePsnAccount;
|
||||
/** 机构经办人名称 */
|
||||
private String orgnizeNamepsnName;
|
||||
|
||||
public String getFileid() {
|
||||
return fileid;
|
||||
}
|
||||
|
||||
public void setFileid(String fileid) {
|
||||
this.fileid = fileid;
|
||||
}
|
||||
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public String getSignFlowid() {
|
||||
return signFlowid;
|
||||
}
|
||||
|
||||
public void setSignFlowid(String signFlowid) {
|
||||
this.signFlowid = signFlowid;
|
||||
}
|
||||
|
||||
public String getPensonAccount() {
|
||||
return pensonAccount;
|
||||
}
|
||||
|
||||
public void setPensonAccount(String pensonAccount) {
|
||||
this.pensonAccount = pensonAccount;
|
||||
}
|
||||
|
||||
public String getPensonName() {
|
||||
return pensonName;
|
||||
}
|
||||
|
||||
public void setPensonName(String pensonName) {
|
||||
this.pensonName = pensonName;
|
||||
}
|
||||
|
||||
public String getOrgnizeName() {
|
||||
return orgnizeName;
|
||||
}
|
||||
|
||||
public void setOrgnizeName(String orgnizeName) {
|
||||
this.orgnizeName = orgnizeName;
|
||||
}
|
||||
|
||||
public String getOrgnizeNamePsnAccount() {
|
||||
return orgnizeNamePsnAccount;
|
||||
}
|
||||
|
||||
public void setOrgnizeNamePsnAccount(String orgnizeNamePsnAccount) {
|
||||
this.orgnizeNamePsnAccount = orgnizeNamePsnAccount;
|
||||
}
|
||||
|
||||
public String getOrgnizeNamepsnName() {
|
||||
return orgnizeNamepsnName;
|
||||
}
|
||||
|
||||
public void setOrgnizeNamepsnName(String orgnizeNamepsnName) {
|
||||
this.orgnizeNamepsnName = orgnizeNamepsnName;
|
||||
}
|
||||
|
||||
public String getPositionPagepsn() {
|
||||
return positionPagepsn;
|
||||
}
|
||||
|
||||
public void setPositionPagepsn(String positionPagepsn) {
|
||||
this.positionPagepsn = positionPagepsn;
|
||||
}
|
||||
|
||||
public double getPositionXpsn() {
|
||||
return positionXpsn;
|
||||
}
|
||||
|
||||
public void setPositionXpsn(double positionXpsn) {
|
||||
this.positionXpsn = positionXpsn;
|
||||
}
|
||||
|
||||
public double getPositionYpsn() {
|
||||
return positionYpsn;
|
||||
}
|
||||
|
||||
public void setPositionYpsn(double positionYpsn) {
|
||||
this.positionYpsn = positionYpsn;
|
||||
}
|
||||
|
||||
public String getPositionPageorg() {
|
||||
return positionPageorg;
|
||||
}
|
||||
|
||||
public void setPositionPageorg(String positionPageorg) {
|
||||
this.positionPageorg = positionPageorg;
|
||||
}
|
||||
|
||||
public double getPositionXorg() {
|
||||
return positionXorg;
|
||||
}
|
||||
|
||||
public void setPositionXorg(double positionXorg) {
|
||||
this.positionXorg = positionXorg;
|
||||
}
|
||||
|
||||
public double getPositionYorg() {
|
||||
return positionYorg;
|
||||
}
|
||||
|
||||
public void setPositionYorg(double positionYorg) {
|
||||
this.positionYorg = positionYorg;
|
||||
}
|
||||
|
||||
/** 签名位置页数 */
|
||||
private String positionPagepsn;
|
||||
/** 签名位置x坐标 */
|
||||
private double positionXpsn;
|
||||
/** 签名位置y坐标 */
|
||||
private double positionYpsn;
|
||||
/** 印章位置页数 */
|
||||
private String positionPageorg;
|
||||
/** 印章位置x坐标 */
|
||||
private double positionXorg;
|
||||
/** 印章位置y坐标 */
|
||||
private double positionYorg;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.ruoyi.common.utils.file;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.config.EsignDemoConfig;
|
||||
import com.ruoyi.common.constant.EsignHeaderConstant;
|
||||
import com.ruoyi.common.constant.FileTransformation;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||
import com.ruoyi.common.utils.bean.EsignFileBean;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Map;
|
||||
|
||||
public class SaaSAPIFileUtils {
|
||||
private static String eSignHost= EsignDemoConfig.EsignHost;
|
||||
private static String eSignAppId= EsignDemoConfig.EsignAppId;
|
||||
private static String eSignAppSecret=EsignDemoConfig.EsignAppSecret;
|
||||
/**
|
||||
* 获取文件上传地址
|
||||
*/
|
||||
public static EsignHttpResponse getUploadUrl(String filePath) throws EsignDemoException {
|
||||
//自定义的文件封装类,传入文件地址可以获取文件的名称大小,文件流等数据
|
||||
EsignFileBean esignFileBean = new EsignFileBean(filePath);
|
||||
String apiaddr = "/v3/files/file-upload-url";
|
||||
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
|
||||
String jsonParm = "{\n" +
|
||||
" \"contentMd5\": \"" + esignFileBean.getFileContentMD5() + "\",\n" +
|
||||
" \"fileName\":\"" + esignFileBean.getFileName() + "\"," +
|
||||
" \"fileSize\": " + esignFileBean.getFileSize() + ",\n" +
|
||||
" \"convertToPDF\":" +true+ ",\n" +
|
||||
" \"contentType\": \"" + EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE() + "\"\n" +
|
||||
"}";
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成签名鉴权方式的的header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
|
||||
}
|
||||
/**
|
||||
* 上传文件流
|
||||
*/
|
||||
public static EsignHttpResponse uploadFile(String uploadUrl,String filePath) throws EsignDemoException {
|
||||
//根据文件地址获取文件contentMd5
|
||||
EsignFileBean esignFileBean = new EsignFileBean(filePath);
|
||||
//请求方法
|
||||
EsignRequestType requestType= EsignRequestType.PUT;
|
||||
return EsignHttpHelper.doUploadHttp(uploadUrl,requestType,esignFileBean.getFileBytes(),esignFileBean.getFileContentMD5(), EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE(),true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件上传状态
|
||||
*/
|
||||
public static EsignHttpResponse getFileStatus(String fileId) throws EsignDemoException {
|
||||
String apiaddr="/v3/files/"+fileId;
|
||||
|
||||
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
|
||||
String jsonParm=null;
|
||||
//请求方法
|
||||
EsignRequestType requestType= EsignRequestType.GET;
|
||||
//生成签名鉴权方式的的header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载已签署文件及附属材料
|
||||
*/
|
||||
public static EsignHttpResponse fileDownloadUrl(String signFlowId) throws EsignDemoException {
|
||||
String apiaddr = "/v3/sign-flow/"+ signFlowId +"/file-download-url";
|
||||
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
|
||||
String jsonParm=null;
|
||||
//请求方法
|
||||
EsignRequestType requestType= EsignRequestType.GET;
|
||||
//生成签名鉴权方式的的header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
||||
}
|
||||
|
||||
public static void main1(String[] args) throws EsignDemoException {
|
||||
String filePath = "D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\23893bfd3f2249ffa5c82850c11c482e.docx";
|
||||
EsignHttpResponse uploadUrl = getUploadUrl(filePath);
|
||||
String body = uploadUrl.getBody();
|
||||
JSONObject jsonObject = new JSONObject(body);
|
||||
JSONObject dataObj = jsonObject.getJSONObject("data");
|
||||
String fileUploadUrl = dataObj.get("fileUploadUrl").toString();
|
||||
System.out.println("这是fileUploadUrl:"+fileUploadUrl);
|
||||
String fileId = dataObj.get("fileId").toString();
|
||||
System.out.println("这是fileId:"+fileId);
|
||||
//String fileUploadUrl = "https://esignoss.esign.cn/1111564182/ccf6db5a-92da-4523-89ba-385a30423596/23893bfd3f2249ffa5c82850c11c482e.docx?Expires=1697021257&OSSAccessKeyId=STS.NTmgvSC8n5Zg1y7EciQftF23N&Signature=CxVZmpwFksWmLYkxPjVz9K4mVyA%3D&callback-var=eyJ4OmZpbGVfa2V5IjoiJDAyODhjOTg3LWNlNzgtNDM1OC04NWYwLTdlNmUyM2NjOTJmNiQzNDk1NzQ3MjE5In0%3D%0A&callback=eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9zbWx0YXBpLnRzaWduLmNuL2FueWRvb3IvZmlsZS1zeXN0ZW0vY2FsbGJhY2svYWxpb3NzIiwiY2FsbGJhY2tCb2R5IjogIntcIm1pbWVUeXBlXCI6JHttaW1lVHlwZX0sXCJzaXplXCI6ICR7c2l6ZX0sXCJidWNrZXRcIjogJHtidWNrZXR9LFwib2JqZWN0XCI6ICR7b2JqZWN0fSxcImV0YWdcIjogJHtldGFnfSxcImZpbGVfa2V5XCI6JHt4OmZpbGVfa2V5fX0iLCJjYWxsYmFja0JvZHlUeXBlIjogImFwcGxpY2F0aW9uL2pzb24ifQ%3D%3D%0A&security-token=CAIS%2BAF1q6Ft5B2yfSjIr5fYLMznrudPgpiMM1%2BGoWM8XelYqfeYrDz2IHtKdXRvBu8Xs%2F4wnmxX7f4YlqB6T55OSAmcNZEofT7katr4MeT7oMWQweEurv%2FMQBqyaXPS2MvVfJ%2BOLrf0ceusbFbpjzJ6xaCAGxypQ12iN%2B%2Fm6%2FNgdc9FHHPPD1x8CcxROxFppeIDKHLVLozNCBPxhXfKB0ca0WgVy0EHsPnvm5DNs0uH1AKjkbRM9r6ceMb0M5NeW75kSMqw0eBMca7M7TVd8RAi9t0t1%2FIVpGiY4YDAWQYLv0rda7DOltFiMkpla7MmXqlft%2BhzcgeQY0pc%2FRqAAaxcPCSY0Du8wgErfR1llD8t2zeFG%2B1mktU4Rsl7AgxsSFxrwILBUk2x7imVsFVA0kkS8rNBMDKGIsIZTCl5M7S2L%2BD8364htwcZgIZYHK2fCN6gCuy%2Bfk9C%2FfQaTc00IWBMw8OubuJ%2Fq2mdMh32yoi7dLuJyhwt1z%2F%2BWf5vIFHdIAA%3D";
|
||||
EsignHttpResponse esignHttpResponse = uploadFile(fileUploadUrl, filePath);
|
||||
System.out.println("这是上传文件流的结果:"+esignHttpResponse.getBody());
|
||||
// EsignHttpResponse fileStatus = getFileStatus(fileId);
|
||||
// System.out.println("这是获取文件上传状态的结果:"+fileStatus.getBody());
|
||||
// getFileStatus("a808f1f39a744357a2f018e4ab34c55d");
|
||||
// fileDownloadUrl("");
|
||||
}
|
||||
public static void main(String[] args) throws EsignDemoException {
|
||||
String signFlowId = "41e6732b48c54c63a91b2379c352212d";
|
||||
Gson gson = new Gson();
|
||||
EsignHttpResponse fileDownload = fileDownloadUrl(signFlowId);
|
||||
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
|
||||
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
if(filesArray!=null&&filesArray.size()>0){
|
||||
JsonObject fileObject = (JsonObject)filesArray.get(0);
|
||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
String fileName = java.util.UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
String savePath = "/home/ruoyi/uploadPath/upload";
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String dir = "F:\\ymkf\\shanghaixm\\testCaijueshu\\" + fileName;
|
||||
String fileDownloadUrlnew = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||
FileTransformation.downLoadFileByUrl(fileDownloadUrlnew,dir);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -115,4 +115,6 @@ public interface SysDeptMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeptById(Long deptId);
|
||||
|
||||
List<Long> selectUserDeptListByRoleId(@Param("roleId")Long roleId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
|
||||
@@ -19,6 +21,12 @@ public interface SysUserMapper
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser sysUser);
|
||||
|
||||
/**
|
||||
* 查询仲裁员角色下的用户
|
||||
* @return
|
||||
*/
|
||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已配用户角色列表
|
||||
*
|
||||
@@ -124,4 +132,6 @@ public interface SysUserMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public SysUser checkEmailUnique(String email);
|
||||
|
||||
List<SysUser> selectUserListByIds(@Param("idList") List<Long> idList);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
|
||||
/**
|
||||
* 用户 业务层
|
||||
@@ -17,6 +18,7 @@ public interface ISysUserService
|
||||
* @return 用户信息集合信息
|
||||
*/
|
||||
public List<SysUser> selectUserList(SysUser user);
|
||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -74,6 +76,11 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
return userMapper.selectUserList(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
|
||||
return userMapper.selectUserListByAdRole(arbitrator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询已分配用户角色列表
|
||||
*
|
||||
|
||||
@@ -15,6 +15,14 @@ public class CaseAffiliate extends BaseEntity {
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
/**
|
||||
* 申请机构id
|
||||
*/
|
||||
private String applicationOrganId;
|
||||
/**
|
||||
* 申请机构名称
|
||||
*/
|
||||
private String applicationOrganName;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String identityNum;
|
||||
@@ -49,6 +57,22 @@ public class CaseAffiliate extends BaseEntity {
|
||||
/** 快递单号 */
|
||||
private String trackNum;
|
||||
|
||||
public String getApplicationOrganId() {
|
||||
return applicationOrganId;
|
||||
}
|
||||
|
||||
public void setApplicationOrganId(String applicationOrganId) {
|
||||
this.applicationOrganId = applicationOrganId;
|
||||
}
|
||||
|
||||
public String getApplicationOrganName() {
|
||||
return applicationOrganName;
|
||||
}
|
||||
|
||||
public void setApplicationOrganName(String applicationOrganName) {
|
||||
this.applicationOrganName = applicationOrganName;
|
||||
}
|
||||
|
||||
public String getSendEmail() {
|
||||
return sendEmail;
|
||||
}
|
||||
|
||||
@@ -101,6 +101,16 @@ public class CaseApplication extends BaseEntity {
|
||||
|
||||
/** 案件描述 */
|
||||
private String caseDescribe;
|
||||
/** 裁决书URL */
|
||||
private String filearbitraUrl;
|
||||
|
||||
public String getFilearbitraUrl() {
|
||||
return filearbitraUrl;
|
||||
}
|
||||
|
||||
public void setFilearbitraUrl(String filearbitraUrl) {
|
||||
this.filearbitraUrl = filearbitraUrl;
|
||||
}
|
||||
|
||||
/** 是否同意组庭 */
|
||||
private Integer isAgreePendTral;
|
||||
@@ -114,6 +124,52 @@ public class CaseApplication extends BaseEntity {
|
||||
private Integer paymentStatus;
|
||||
/** 支付状态描述 */
|
||||
private String paymentStatusName;
|
||||
/**
|
||||
* 支付方式code,0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payTypeCode;
|
||||
/**
|
||||
* 支付方式name,0线上支付,1线下支付
|
||||
*/
|
||||
private String payTypeName;
|
||||
/**
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<CaseAttach> payOrderList;
|
||||
// 导入校验失败信息
|
||||
private StringBuilder errorMsg;
|
||||
|
||||
public Integer getPayTypeCode() {
|
||||
return payTypeCode;
|
||||
}
|
||||
|
||||
public void setPayTypeCode(Integer payTypeCode) {
|
||||
this.payTypeCode = payTypeCode;
|
||||
}
|
||||
|
||||
public String getPayTypeName() {
|
||||
return payTypeName;
|
||||
}
|
||||
|
||||
public void setPayTypeName(String payTypeName) {
|
||||
this.payTypeName = payTypeName;
|
||||
}
|
||||
|
||||
public List<CaseAttach> getPayOrderList() {
|
||||
return payOrderList;
|
||||
}
|
||||
|
||||
public void setPayOrderList(List<CaseAttach> payOrderList) {
|
||||
this.payOrderList = payOrderList;
|
||||
}
|
||||
|
||||
public StringBuilder getErrorMsg() {
|
||||
return errorMsg;
|
||||
}
|
||||
|
||||
public void setErrorMsg(StringBuilder errorMsg) {
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
|
||||
public Integer getPaymentStatus() {
|
||||
return paymentStatus;
|
||||
@@ -180,6 +236,39 @@ public class CaseApplication extends BaseEntity {
|
||||
private String applicantName;
|
||||
/** 被申请人名称 */
|
||||
private String respondentName;
|
||||
/**
|
||||
* 用户身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private String userId;
|
||||
private List<Long> deptIds;
|
||||
|
||||
public List<Long> getDeptIds() {
|
||||
return deptIds;
|
||||
}
|
||||
|
||||
public void setDeptIds(List<Long> deptIds) {
|
||||
this.deptIds = deptIds;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getApplicantName() {
|
||||
return applicantName;
|
||||
@@ -332,10 +421,14 @@ public class CaseApplication extends BaseEntity {
|
||||
* 申请人主体信息
|
||||
*/
|
||||
/** 姓名 */
|
||||
@Excel(name = "申请人主体信息-申请人姓名",width = 26)
|
||||
@Excel(name = "申请人主体信息-申请人(机构)",width = 26)
|
||||
private String name;
|
||||
/**
|
||||
* 申请人主体信息-申请人(机构)id
|
||||
*/
|
||||
private String nameId;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "申请人主体信息-身份证号",width = 26)
|
||||
@Excel(name = "申请人主体信息-代码",width = 26)
|
||||
private String identityNum;
|
||||
|
||||
/** 联系电话 */
|
||||
@@ -415,6 +508,14 @@ public class CaseApplication extends BaseEntity {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNameId() {
|
||||
return nameId;
|
||||
}
|
||||
|
||||
public void setNameId(String nameId) {
|
||||
this.nameId = nameId;
|
||||
}
|
||||
|
||||
public String getIdentityNum() {
|
||||
return identityNum;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class CaseAttach {
|
||||
*/
|
||||
private String annexPath;
|
||||
/**
|
||||
* 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
|
||||
* 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
|
||||
*/
|
||||
private Integer annexType;
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,15 @@ public class CaseLogRecord extends BaseEntity {
|
||||
|
||||
/** 案件编号 */
|
||||
private String caseNum;
|
||||
/**
|
||||
* 展示的内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String createNickName;
|
||||
|
||||
|
||||
public String getCaseNum() {
|
||||
return caseNum;
|
||||
@@ -50,7 +59,7 @@ public class CaseLogRecord extends BaseEntity {
|
||||
this.caseAppliId = caseAppliId;
|
||||
}
|
||||
|
||||
public int getCaseNode() {
|
||||
public Integer getCaseNode() {
|
||||
return caseNode;
|
||||
}
|
||||
|
||||
@@ -73,4 +82,24 @@ public class CaseLogRecord extends BaseEntity {
|
||||
public void setNotes(String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
public void setCaseNode(Integer caseNode) {
|
||||
this.caseNode = caseNode;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getCreateNickName() {
|
||||
return createNickName;
|
||||
}
|
||||
|
||||
public void setCreateNickName(String nickName) {
|
||||
this.createNickName = nickName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,8 @@ public class CasePaymentRecord {
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payType;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
public class SealSignRecord extends BaseEntity {
|
||||
public class SealSignRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
@@ -24,6 +24,79 @@ public class SealSignRecord extends BaseEntity {
|
||||
/** 机构经办人名称 */
|
||||
private String orgnizeNamepsnName;
|
||||
|
||||
String fileDownloadUrl;
|
||||
|
||||
public String getFileDownloadUrl() {
|
||||
return fileDownloadUrl;
|
||||
}
|
||||
|
||||
public void setFileDownloadUrl(String fileDownloadUrl) {
|
||||
this.fileDownloadUrl = fileDownloadUrl;
|
||||
}
|
||||
|
||||
/** 流程状态 */
|
||||
private Integer signFlowStatus;
|
||||
/** 签名状态 */
|
||||
private Integer psnsignStatus;
|
||||
/** 用印状态 */
|
||||
private Integer orgsignStatus;
|
||||
|
||||
/** 签名链接 */
|
||||
private String signUrl;
|
||||
|
||||
public String getSignUrl() {
|
||||
return signUrl;
|
||||
}
|
||||
|
||||
public void setSignUrl(String signUrl) {
|
||||
this.signUrl = signUrl;
|
||||
}
|
||||
|
||||
public String getSealUrl() {
|
||||
return sealUrl;
|
||||
}
|
||||
|
||||
public void setSealUrl(String sealUrl) {
|
||||
this.sealUrl = sealUrl;
|
||||
}
|
||||
|
||||
/** 用印链接 */
|
||||
private String sealUrl;
|
||||
|
||||
private Long caseAppliId;
|
||||
|
||||
public Long getCaseAppliId() {
|
||||
return caseAppliId;
|
||||
}
|
||||
|
||||
public void setCaseAppliId(Long caseAppliId) {
|
||||
this.caseAppliId = caseAppliId;
|
||||
}
|
||||
|
||||
public Integer getPsnsignStatus() {
|
||||
return psnsignStatus;
|
||||
}
|
||||
|
||||
public void setPsnsignStatus(Integer psnsignStatus) {
|
||||
this.psnsignStatus = psnsignStatus;
|
||||
}
|
||||
|
||||
public Integer getOrgsignStatus() {
|
||||
return orgsignStatus;
|
||||
}
|
||||
|
||||
public void setOrgsignStatus(Integer orgsignStatus) {
|
||||
this.orgsignStatus = orgsignStatus;
|
||||
}
|
||||
|
||||
public Integer getSignFlowStatus() {
|
||||
return signFlowStatus;
|
||||
}
|
||||
|
||||
public void setSignFlowStatus(Integer signFlowStatus) {
|
||||
this.signFlowStatus = signFlowStatus;
|
||||
}
|
||||
|
||||
public String getFileid() {
|
||||
return fileid;
|
||||
}
|
||||
@@ -149,6 +222,7 @@ public class SealSignRecord extends BaseEntity {
|
||||
/** 印章位置y坐标 */
|
||||
private double positionYorg;
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 案件确认缴费传入对象
|
||||
*/
|
||||
@Data
|
||||
public class CaseConfirmPayDTO {
|
||||
/**
|
||||
* 案件id
|
||||
*/
|
||||
@NotNull(message = "案件id不能为空")
|
||||
private Long caseId;
|
||||
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payType;
|
||||
/**
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<CaseAttach> payOrderList;
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 案件缴费传入对象
|
||||
*/
|
||||
@@ -23,4 +27,12 @@ public class CasePayDTO {
|
||||
* 支付方式 wxpay(微信) alipay(支付宝)
|
||||
*/
|
||||
private String platform;
|
||||
/**
|
||||
* 支付方式 0线上支付,1线下支付
|
||||
*/
|
||||
private Integer payType;
|
||||
/**
|
||||
* 缴费凭证
|
||||
*/
|
||||
private List<CaseAttach> payOrderList;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ArchivesDetailVO {
|
||||
/**
|
||||
* 案件信息
|
||||
*/
|
||||
private CaseApplication caseApplication;
|
||||
/**
|
||||
* 案件日志信息
|
||||
*/
|
||||
private List<CaseLogRecord> caseLogRecordList;
|
||||
/**
|
||||
* 快递信息
|
||||
*/
|
||||
private List<LogisticsInfoVO> logisticsInfoVOList;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description 案件操作日志实体
|
||||
* @Author wangqiong
|
||||
* @Date 2023/10/09 15:18
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Data
|
||||
public class CaseLogVO {
|
||||
/**日志id*/
|
||||
private String logId;
|
||||
/**操作人id*/
|
||||
private String operatorId;
|
||||
/**操作人名称*/
|
||||
private String operatorName;
|
||||
/**操作人ip*/
|
||||
private String ip;
|
||||
/**操作时间*/
|
||||
private Date operateTime;
|
||||
/**操作明细*/
|
||||
private String operateDetail;
|
||||
/**操作类型*/
|
||||
private String operateType;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 发送房间号短信入参类
|
||||
* @date 2023-10-10 15:20
|
||||
*/
|
||||
@Data
|
||||
public class SendRoomNoMessageVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@NotNull(message = "案件id不能为空")
|
||||
private Long id;
|
||||
@NotEmpty(message = "房间号不能为空")
|
||||
private String roomNo;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArbitratorMapper {
|
||||
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,6 +16,7 @@ public interface CaseAffiliateMapper {
|
||||
|
||||
|
||||
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
|
||||
|
||||
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
|
||||
}
|
||||
|
||||
+22
@@ -1,7 +1,9 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -11,6 +13,13 @@ public interface CaseApplicationMapper {
|
||||
|
||||
int selectCaseApplicationCount(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 查询超级管理员案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
|
||||
|
||||
int insertCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
|
||||
@@ -31,4 +40,17 @@ public interface CaseApplicationMapper {
|
||||
* @return
|
||||
*/
|
||||
Integer selectCaseNumLike(@Param("caseNum") String caseNum, @Param("length") int length);
|
||||
|
||||
/**
|
||||
* 查询仲裁员根据案件id
|
||||
* @param arbitrator
|
||||
* @return
|
||||
*/
|
||||
String selectArbitratorList(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 修改支付方式
|
||||
* @param payDTO
|
||||
*/
|
||||
void updatePayType(CaseConfirmPayDTO payDTO);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,4 +15,7 @@ public interface CaseAttachMapper {
|
||||
|
||||
|
||||
int updateCaseAttach(CaseAttach caseAttach);
|
||||
|
||||
int updateCaseAttachBycaseid(CaseAttach caseAttach);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -8,4 +8,6 @@ public interface CasePaymentRecordMapper {
|
||||
CasePaymentRecord queryRecord(String orderNumber);
|
||||
|
||||
void update(CasePaymentRecord casePaymentRecord);
|
||||
|
||||
CasePaymentRecord selectRecordByCaseId(Long id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SealSignRecordMapper {
|
||||
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
|
||||
|
||||
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
|
||||
|
||||
int updataSealSignRecord(SealSignRecord sealSignRecord);
|
||||
|
||||
|
||||
void insertSealSignRecord(SealSignRecord sealSignRecord);
|
||||
}
|
||||
+7
-1
@@ -2,13 +2,16 @@ package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IAdjudicationService {
|
||||
AjaxResult createDocument(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
|
||||
|
||||
AjaxResult getLogisticsInfo(CaseApplication caseApplication);
|
||||
List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult signature(CaseApplication caseApplication);
|
||||
|
||||
@@ -16,4 +19,7 @@ public interface IAdjudicationService {
|
||||
|
||||
AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
|
||||
|
||||
AjaxResult stamp(CaseApplication caseApplication);
|
||||
|
||||
AjaxResult getArchivesDetail(Long id);
|
||||
}
|
||||
|
||||
+15
@@ -1,6 +1,11 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,4 +42,14 @@ public interface ICaseApplicationService {
|
||||
int submitCaseApplicationCheck(CaseApplication caseApplication);
|
||||
|
||||
CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
|
||||
|
||||
String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
|
||||
|
||||
SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
|
||||
SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
|
||||
AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
|
||||
|
||||
CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||
|
||||
public interface ICasePaymentService {
|
||||
@@ -12,4 +13,11 @@ public interface ICasePaymentService {
|
||||
AjaxResult casePay(CasePayDTO casePayDTO);
|
||||
|
||||
AjaxResult confirmPayment(CaseApplication caseApplication);
|
||||
|
||||
/**
|
||||
* 确认缴费
|
||||
* @param payDTO
|
||||
* @return
|
||||
*/
|
||||
AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
|
||||
}
|
||||
|
||||
+23
-4
@@ -1,15 +1,34 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
|
||||
public interface IdentityAuthenticationService {
|
||||
|
||||
|
||||
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||
|
||||
/**
|
||||
* 检查是否已经认证的用户
|
||||
*
|
||||
* @param identityAuthentication
|
||||
* @return
|
||||
*/
|
||||
String checkIsAuthentication(IdentityAuthentication identityAuthentication);
|
||||
|
||||
IdentityAuthentication selectIdentityAuthenticaEIDtoken();
|
||||
/**
|
||||
* 获取Eidtoken
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
JSONObject selectIdentityAuthenticaEIDtoken();
|
||||
|
||||
IdentityAuthentication selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
|
||||
/**
|
||||
* 小程序人脸核身后查询身份认证结果
|
||||
*
|
||||
* @param ientityAuthentication
|
||||
* @return
|
||||
*/
|
||||
AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
|
||||
}
|
||||
|
||||
+111
-34
@@ -2,12 +2,13 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.EmailOutUtil;
|
||||
import com.ruoyi.common.utils.WordUtil;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.ArchivesDetailVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||
@@ -15,8 +16,8 @@ import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.xwpf.usermodel.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mail.MailSendException;
|
||||
import org.springframework.mail.javamail.JavaMailSender;
|
||||
@@ -32,7 +33,6 @@ import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
@@ -52,8 +52,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
private EmailOutUtil emailOutUtil;
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
@Autowired
|
||||
private ICaseLogRecordService caseLogRecordService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult createDocument(CaseApplication caseApplication) {
|
||||
try {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
@@ -116,20 +119,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
datas.put("rulingFollows", arbitrateRecord1.getRulingFollows());
|
||||
}
|
||||
datas.put("legalProvisions", "仲裁法");
|
||||
if (arbitratorName == null) {
|
||||
datas.put("arbitratorName1", null);
|
||||
datas.put("arbitratorName2", null);
|
||||
} else if (arbitratorName.contains(",")) {
|
||||
String[] nameArray = arbitratorName.split(",");
|
||||
String firstName = nameArray[0];
|
||||
String secondName = nameArray[1];
|
||||
datas.put("arbitratorName1", firstName);
|
||||
datas.put("arbitratorName2", secondName);
|
||||
} else {
|
||||
String secondName = "";
|
||||
datas.put("arbitratorName1", arbitratorName);
|
||||
datas.put("arbitratorName2", secondName);
|
||||
}
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
@@ -138,9 +127,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
datas.put("months", month);
|
||||
datas.put("day", day);
|
||||
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||
//String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||
// String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
//String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
// String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
@@ -200,9 +189,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
String annexPath = caseAttach.getAnnexPath();
|
||||
//File file = new File("/home/ruoyi/" + annexPath);
|
||||
String path = "/home/ruoyi/" + annexPath;
|
||||
File file = new File(path);
|
||||
System.out.println("文件是:" + file);
|
||||
String path = "/home/ruoyi" + annexPath;
|
||||
System.out.println("原文件路径是:" + path);
|
||||
String newpath = path.replace("/", "\\");
|
||||
System.out.println("新文件路径是:" + newpath);
|
||||
File file = new File(newpath);
|
||||
System.out.println("新文件是:" + file);
|
||||
fileList.add(file);
|
||||
}
|
||||
}
|
||||
@@ -248,7 +240,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getLogisticsInfo(CaseApplication caseApplication) {
|
||||
public List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication) {
|
||||
try {
|
||||
//快递单号查询
|
||||
String key = "729437f92468910aee6c12dbfeaee3c1";
|
||||
@@ -293,11 +285,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
}
|
||||
} else {
|
||||
// 请求失败
|
||||
return AjaxResult.error("请求失败,错误码:" + responseCode);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(logisticsInfoVOList);
|
||||
return logisticsInfoVOList;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
@@ -310,6 +302,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
//更改案件状态(暂时)
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
|
||||
|
||||
return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
|
||||
}
|
||||
|
||||
@@ -318,6 +313,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
//更改案件状态(暂时)
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
|
||||
|
||||
return AjaxResult.success("归档成功,案件状态已改为已归档");
|
||||
}
|
||||
|
||||
@@ -349,23 +347,102 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//发送邮件
|
||||
sendCaseEmail(caseApplication1, appEmail, resEmail);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
|
||||
|
||||
return AjaxResult.success("仲裁文书送达成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过邮件发送裁决书文件
|
||||
*
|
||||
* @param caseApplication1
|
||||
* @param appEmail
|
||||
* @param resEmail
|
||||
*/
|
||||
private void sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
|
||||
List<File> fileList = new ArrayList<>();
|
||||
File file = null;
|
||||
List<CaseAttach> caseAttachList = caseApplication1.getCaseAttachList();
|
||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
if (caseAttach.getAnnexType() == 3) {
|
||||
String annexPath = caseAttach.getAnnexPath();
|
||||
String path = "/home/ruoyi/" + annexPath;
|
||||
// String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
|
||||
// String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
|
||||
file = new File(path);
|
||||
fileList.add(file);
|
||||
System.out.println("文件长度:" + file.length());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file != null) {
|
||||
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
|
||||
try {
|
||||
// emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
|
||||
emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
|
||||
} catch (Exception e) {
|
||||
System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult stamp(CaseApplication caseApplication) {
|
||||
//更改案件状态(暂时)
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATION_DELIVERY, "");
|
||||
|
||||
return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getArchivesDetail(Long id) {
|
||||
ArchivesDetailVO archivesDetailVO = new ArchivesDetailVO();
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(id);
|
||||
//查询案件信息
|
||||
CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
|
||||
if (caseApplication1 != null) {
|
||||
archivesDetailVO.setCaseApplication(caseApplication1);
|
||||
}
|
||||
//查询案件日志信息
|
||||
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||
caseLogRecord.setCaseAppliId(id);
|
||||
List<CaseLogRecord> caseLogRecords = caseLogRecordService.selectCaseLogRecordList(caseLogRecord);
|
||||
if (caseLogRecords != null && caseLogRecords.size() > 0) {
|
||||
archivesDetailVO.setCaseLogRecordList(caseLogRecords);
|
||||
}
|
||||
//查询快递信息
|
||||
List<LogisticsInfoVO> logisticsInfo = this.getLogisticsInfo(caseApplication);
|
||||
if (logisticsInfo != null && logisticsInfo.size() > 0) {
|
||||
archivesDetailVO.setLogisticsInfoVOList(logisticsInfo);
|
||||
}
|
||||
return AjaxResult.success(archivesDetailVO);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
List<File> fileList = new ArrayList<>();
|
||||
fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
|
||||
File file = fileList.get(0);
|
||||
// List<File> fileList = new ArrayList<>();
|
||||
// fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
|
||||
// File file = fileList.get(0);//System.out.println("这是文件"+file);
|
||||
//电子邮件送达
|
||||
EmailOutUtil emailOutUtil = new EmailOutUtil();
|
||||
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
|
||||
if (javaMailSender != null) {
|
||||
emailOutUtil.sendMessageCarryFile("1154956315@qq.com", "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
||||
, "hjbjava@163.com", javaMailSender);
|
||||
}
|
||||
// EmailOutUtil emailOutUtil = new EmailOutUtil();
|
||||
// JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
|
||||
// if (javaMailSender != null) {
|
||||
// emailOutUtil.sendMessageCarryFile("1154956315@qq.com", "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
|
||||
// , "hjbjava@163.com", javaMailSender);
|
||||
// }
|
||||
} catch (MailSendException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+975
-55
File diff suppressed because it is too large
Load Diff
+144
-22
@@ -2,21 +2,24 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.WordUtil;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.ArbitrateRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
@@ -28,6 +31,8 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
private CaseLogRecordMapper caseLogRecordMapper;
|
||||
@Autowired
|
||||
private ArbitrateRecordMapper arbitrateRecordMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@@ -44,18 +49,30 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
caseApplication1.setArbitratMethod(1); // 更改仲裁方式
|
||||
//修改案件状态为待开庭审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
|
||||
|
||||
}else {
|
||||
caseApplication1.setArbitratMethod(2);
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
|
||||
|
||||
}
|
||||
}else {
|
||||
if (arbitratMethod == 2){
|
||||
//修改案件状态为待书面审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_WRIITEN_HEAR,"");
|
||||
|
||||
}else {
|
||||
//修改案件状态为待开庭审理
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
|
||||
|
||||
}
|
||||
}
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
@@ -87,21 +104,23 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_OPENCOURT_HEAR,"");
|
||||
|
||||
return AjaxResult.success("审核成功");
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public AjaxResult writtenHear(ArbitrateRecord arbitrateRecord) {
|
||||
//查询案件详情
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(arbitrateRecord.getCaseAppliId());
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
String createBy = caseApplication1.getCreateBy();
|
||||
if (createBy!=null){
|
||||
arbitrateRecord.setCreateBy(createBy);
|
||||
}
|
||||
String createBy = arbitrateRecord.getCreateBy();
|
||||
|
||||
//先判断案件是否已经提交过仲裁结果
|
||||
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||
if (arbitrateRecord1!=null){
|
||||
@@ -115,10 +134,9 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
caseLogRecord.setCreateBy(createBy);
|
||||
}
|
||||
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||
//修改案件状态
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
return AjaxResult.success("提交成功");
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
|
||||
|
||||
}
|
||||
}else {
|
||||
//提交仲裁结果
|
||||
@@ -133,12 +151,116 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
|
||||
caseLogRecord.setCreateBy(createBy);
|
||||
}
|
||||
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||
//修改案件状态
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
return AjaxResult.success("提交成功");
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
|
||||
|
||||
}
|
||||
}
|
||||
return AjaxResult.error("暂无需要提交仲裁结果的案件");
|
||||
|
||||
//生成庭审笔录
|
||||
try {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
Long id = caseApplication.getId();
|
||||
|
||||
|
||||
//获取案件关联人信息
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(id);
|
||||
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
if (caseAffiliates != null && caseAffiliates.size() > 0) {
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
//获取身份类型
|
||||
int identityType = affiliate.getIdentityType();
|
||||
if (identityType == 1) { //申请人
|
||||
datas.put("appName", affiliate.getName());
|
||||
datas.put("appIDNo", affiliate.getIdentityNum());
|
||||
datas.put("appAddress", affiliate.getContactAddress());
|
||||
datas.put("appAgentName", affiliate.getNameAgent());
|
||||
datas.put("appAgentIDNo", affiliate.getIdentityNumAgent());
|
||||
} else if (identityType == 2) { //被申请人
|
||||
datas.put("resName", affiliate.getName());
|
||||
datas.put("resIDNo", affiliate.getIdentityNum());
|
||||
datas.put("resAddress", affiliate.getContactAddress());
|
||||
datas.put("resAgentName", affiliate.getNameAgent());
|
||||
datas.put("resAgentIDNo", affiliate.getIdentityNumAgent());
|
||||
}
|
||||
}
|
||||
}
|
||||
String arbitratorName = caseApplication.getArbitratorName();
|
||||
datas.put("caseName", caseApplication.getCaseName());
|
||||
datas.put("arbitratorName", arbitratorName);
|
||||
Date hearDate = caseApplication.getHearDate();
|
||||
if (hearDate != null) {
|
||||
LocalDate localDate = hearDate.toInstant()
|
||||
.atZone(ZoneId.systemDefault())
|
||||
.toLocalDate();
|
||||
datas.put("hearYear", localDate.getYear());
|
||||
datas.put("hearMonths", localDate.getMonthValue());
|
||||
datas.put("hearDay", localDate.getDayOfMonth());
|
||||
} else {
|
||||
datas.put("hearYear", null);
|
||||
datas.put("hearMonths", null);
|
||||
datas.put("hearDay", null);
|
||||
}
|
||||
datas.put("appArbitrationClaims", caseApplication.getArbitratClaims());
|
||||
datas.put("evidenDetermi", arbitrateRecord.getEvidenDetermi());
|
||||
datas.put("factDetermi", arbitrateRecord.getFactDetermi());
|
||||
datas.put("caseSketch", arbitrateRecord.getCaseSketch());
|
||||
datas.put("arbitrateThink", arbitrateRecord.getArbitrateThink());
|
||||
datas.put("rulingFollows", arbitrateRecord.getRulingFollows());
|
||||
datas.put("legalProvisions", "仲裁法");
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = Integer.toString(now.getYear());
|
||||
String month = String.format("%02d", now.getMonthValue());
|
||||
String day = String.format("%02d", now.getDayOfMonth());
|
||||
datas.put("year", year);
|
||||
datas.put("months", month);
|
||||
datas.put("day", day);
|
||||
String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
|
||||
// String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
|
||||
String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
// String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
|
||||
String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
|
||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
// 创建日期目录
|
||||
File saveFolder = new File(saveFolderPath);
|
||||
if (!saveFolder.exists()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
Path sourcePath = new File(modalFilePath).toPath();
|
||||
Path destinationPath = new File(resultFilePath).toPath();
|
||||
Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
|
||||
String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
|
||||
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||
|
||||
//修改案件状态
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
|
||||
//将裁决书保存到附件表里
|
||||
CaseAttach caseAttach = CaseAttach.builder()
|
||||
.caseAppliId(id)
|
||||
.annexName(saveName)
|
||||
.annexPath(savePath)
|
||||
.annexType(3)
|
||||
.build();
|
||||
int i = caseAttachMapper.save(caseAttach);
|
||||
if (i > 0) {
|
||||
if (arbitrateRecord1 != null) {
|
||||
Integer annexId = caseAttach.getAnnexId();
|
||||
//将附件id保存到仲裁记录表里面
|
||||
arbitrateRecord1.setAnnexId(annexId);
|
||||
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("裁决书已生成");
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error("裁决书生成异常");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+24
-10
@@ -3,6 +3,10 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
|
||||
@@ -97,7 +101,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
.userName(userName)
|
||||
.build();
|
||||
int count = caseAttachMapper.save(caseAttach);
|
||||
if (count > 0) {
|
||||
if (count > 0 && annexType!=null && annexType!=8) {
|
||||
if(id!=null){
|
||||
//修改案件状态
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
@@ -119,8 +123,21 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||
|
||||
@Override
|
||||
public List<CaseEvidenceVO> getCaseListAll(String identityNum) {
|
||||
if(StringUtils.isBlank(identityNum)){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
String username = loginUser.getUsername();
|
||||
IdentityAuthentication authentication=new IdentityAuthentication();
|
||||
authentication.setUserName(username);
|
||||
IdentityAuthentication authentication1 = identityAuthenticationMapper.selectIdentityAuthentication(authentication);
|
||||
if(authentication1!=null){
|
||||
identityNum = authentication1.getIdentityNo();
|
||||
}
|
||||
}
|
||||
List<Integer> caseStatusList = Arrays.asList(CaseApplicationConstants.CASE_CROSSEXAMI);
|
||||
return getCaseEvidenceVOList(identityNum, caseStatusList, null);
|
||||
}
|
||||
@@ -130,6 +147,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
if (i > 0) {
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.PENDING_TRIAL,"");
|
||||
|
||||
return AjaxResult.success("证据确认成功");
|
||||
}
|
||||
return AjaxResult.error("暂无需要确认的证据");
|
||||
@@ -165,15 +185,9 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
||||
}
|
||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
if (i > 0) {
|
||||
//案件日志表里添加数据
|
||||
CaseLogRecord caseLogRecord = new CaseLogRecord();
|
||||
caseLogRecord.setCaseAppliId(caseApplication1.getId());
|
||||
caseLogRecord.setCaseNode(caseStatus);
|
||||
String createBy = caseApplication1.getCreateBy();
|
||||
if (createBy != null) {
|
||||
caseLogRecord.setCreateBy(createBy);
|
||||
}
|
||||
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT,"");
|
||||
|
||||
return AjaxResult.success("提交成功");
|
||||
}
|
||||
}
|
||||
|
||||
+22
-1
@@ -1,5 +1,9 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
|
||||
@@ -16,7 +20,24 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
|
||||
|
||||
@Override
|
||||
public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord caseLogRecord) {
|
||||
return caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
||||
List<CaseLogRecord> records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
|
||||
if(CollectionUtil.isNotEmpty(records)){
|
||||
records.forEach(record->{
|
||||
StringBuilder contentBuilder = new StringBuilder();
|
||||
String caseNodeTime="";
|
||||
if(record.getCaseNodeTime()!=null){
|
||||
caseNodeTime= DateUtil.format(record.getCaseNodeTime(), DatePattern.NORM_DATETIME_FORMATTER);
|
||||
}
|
||||
|
||||
contentBuilder.append(record.getCreateNickName()).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime);
|
||||
if(StrUtil.isNotEmpty(record.getContent())){
|
||||
contentBuilder.append(record.getContent());
|
||||
}
|
||||
record.setContent(contentBuilder.toString());
|
||||
|
||||
});
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+37
-8
@@ -1,9 +1,16 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.ElegentPay;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.dto.PayRequest;
|
||||
import com.ruoyi.dto.PayResponse;
|
||||
@@ -19,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,6 +35,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
private final CaseApplicationMapper caseApplicationMapper;
|
||||
private final CasePaymentRecordMapper casePaymentRecordMapper;
|
||||
private final CaseAffiliateMapper caseAffiliateMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
|
||||
@Autowired
|
||||
public CasePaymentServiceImpl(ElegentPay elegentPay
|
||||
@@ -78,13 +86,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
casePaymentRecord.setPaymentTime(new Date());
|
||||
casePaymentRecord.setUpdateTime(new Date());
|
||||
casePaymentRecordMapper.update(casePaymentRecord);
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(caseId);
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
|
||||
return AjaxResult.success("支付成功");
|
||||
}
|
||||
|
||||
@@ -127,9 +129,36 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
||||
SmsUtils.sendSms(request);
|
||||
}
|
||||
}
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_CROSSEXAMI,"");
|
||||
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
return AjaxResult.error("暂无需要确认的缴费清单");
|
||||
}
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult confirmPay(CaseConfirmPayDTO payDTO) {
|
||||
if(payDTO.getCaseId()!=null&&payDTO.getPayType()!=null){
|
||||
// 修改支付方式
|
||||
|
||||
caseApplicationMapper.updatePayType(payDTO);
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(payDTO.getPayOrderList())){
|
||||
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
|
||||
caseAttach.setCaseAppliId(payDTO.getCaseId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// 修改节点状态
|
||||
//根据案件id查询案件信息
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(payDTO.getCaseId());
|
||||
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
|
||||
//修改案件状态
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication1);
|
||||
return AjaxResult.success("确认缴费成功");
|
||||
}
|
||||
}
|
||||
|
||||
+150
-84
@@ -1,27 +1,27 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.crypto.SmUtil;
|
||||
import cn.hutool.crypto.asymmetric.SM2;
|
||||
import cn.hutool.crypto.symmetric.SymmetricCrypto;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.exceptions.TradeException;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
|
||||
|
||||
import com.tencentcloudapi.common.Credential;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
import com.tencentcloudapi.common.profile.ClientProfile;
|
||||
import com.tencentcloudapi.common.profile.HttpProfile;
|
||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||
import com.tencentcloudapi.faceid.v20180301.FaceidClient;
|
||||
import com.tencentcloudapi.faceid.v20180301.models.*;
|
||||
|
||||
import com.tencentcloudapi.faceid.v20180301.models.GetEidResultRequest;
|
||||
import com.tencentcloudapi.faceid.v20180301.models.GetEidResultResponse;
|
||||
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenRequest;
|
||||
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -29,15 +29,10 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class IdentityAuthenticationServiceImpl implements IdentityAuthenticationService {
|
||||
public class IdentityAuthenticationServiceImpl implements IdentityAuthenticationService {
|
||||
|
||||
@Value("${identityAuthentication.credentialSecretId}")
|
||||
private String credentialSecretId;
|
||||
@@ -58,9 +53,9 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
||||
@Override
|
||||
public IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication) {
|
||||
IdentityAuthentication identityAuthenticationselect = identityAuthenticationMapper.selectIdentityAuthentication(identityAuthentication);
|
||||
if(identityAuthenticationselect!=null){
|
||||
if (identityAuthenticationselect != null) {
|
||||
identityAuthenticationselect.setCertificationStatusName("已身份认证");
|
||||
}else {
|
||||
} else {
|
||||
IdentityAuthentication identityAuthenticationselectnew = new IdentityAuthentication();
|
||||
identityAuthenticationselectnew.setCertificationStatusName("未身份认证");
|
||||
identityAuthenticationselectnew.setCertificationStatus(0);
|
||||
@@ -70,86 +65,157 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否已经认证的用户
|
||||
*
|
||||
* @param identityAuthentication
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IdentityAuthentication selectIdentityAuthenticaEIDtoken() {
|
||||
IdentityAuthentication identityAuthentication = new IdentityAuthentication();
|
||||
try{
|
||||
Credential authenti = new Credential(credentialSecretId, credentialSecretKey);
|
||||
HttpProfile httpProfileIdenAuth = new HttpProfile();
|
||||
httpProfileIdenAuth.setEndpoint("faceid.tencentcloudapi.com");
|
||||
ClientProfile clientInv= new ClientProfile();
|
||||
clientInv.setHttpProfile(httpProfileIdenAuth);
|
||||
FaceidClient clientIdenAuth = new FaceidClient(authenti, "", clientInv);
|
||||
// 实例化一个请求对象
|
||||
GetEidTokenRequest reqest = new GetEidTokenRequest();
|
||||
//设置请求参数
|
||||
reqest.setMerchantId(merchantId);
|
||||
GetEidTokenResponse respIdenAuth = clientIdenAuth.GetEidToken(reqest);
|
||||
String respJSON = GetEidTokenResponse.toJsonString(respIdenAuth);
|
||||
JSONObject objJSON = JSON.parseObject(respJSON);
|
||||
String eidToken = objJSON.getString("EidToken");
|
||||
String requestId = objJSON.getString("RequestId");
|
||||
identityAuthentication.setEidToken(eidToken);
|
||||
}catch (TencentCloudSDKException e) {
|
||||
log.error("获取Eidtoke异常:", e);
|
||||
throw new RuntimeException("获取Eidtoke异常");
|
||||
public String checkIsAuthentication(IdentityAuthentication identityAuthentication) {
|
||||
IdentityAuthentication identityAuthenticationselect = identityAuthenticationMapper.selectIdentityAuthentication(identityAuthentication);
|
||||
if (identityAuthenticationselect != null) {
|
||||
return "1";
|
||||
} else {
|
||||
return "0";
|
||||
}
|
||||
|
||||
return identityAuthentication;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取EIDtoken
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JSONObject selectIdentityAuthenticaEIDtoken() {
|
||||
JSONObject objJSON = new JSONObject();
|
||||
objJSON.put("EidToken", "");
|
||||
try {
|
||||
Credential cred = new Credential(credentialSecretId, credentialSecretKey);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.setEndpoint("faceid.tencentcloudapi.com");
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
clientProfile.setHttpProfile(httpProfile);
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
FaceidClient client = new FaceidClient(cred, "", clientProfile);
|
||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||
GetEidTokenRequest req = new GetEidTokenRequest();
|
||||
req.setMerchantId(merchantId);
|
||||
// 返回的resp是一个GetEidTokenResponse的实例,与请求对象对应
|
||||
GetEidTokenResponse resp = client.GetEidToken(req);
|
||||
// 输出json格式的字符串回包
|
||||
String respJSON = GetEidTokenResponse.toJsonString(resp);
|
||||
objJSON = JSON.parseObject(respJSON);
|
||||
} catch (TencentCloudSDKException e) {
|
||||
System.out.println(e.toString());
|
||||
System.out.println("获取Eidtoken失败");
|
||||
}
|
||||
return objJSON;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密用户信息
|
||||
*/
|
||||
public JSONObject DecodeUserInfo(String deskey, String userInfo) {
|
||||
JSONObject parse = null;
|
||||
try {
|
||||
byte[] desKeyBytes = Base64.decode(deskey);
|
||||
final SM2 sm2 = new SM2(privateKeyHexDecodeinfo, null, null);
|
||||
sm2.usePlainEncoding();
|
||||
byte[] sm4KeyBytes = sm2.decrypt(desKeyBytes);
|
||||
SymmetricCrypto sm4 = SmUtil.sm4(sm4KeyBytes);
|
||||
byte[] plaintext = sm4.decrypt(Base64.decode(userInfo));
|
||||
if (plaintext != null && plaintext.length > 0) {
|
||||
String s = new String(plaintext);
|
||||
parse = JSON.parseObject(s);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
return parse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序人脸核身后查询身份认证结果
|
||||
*
|
||||
* @param ientityAuthentication
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public IdentityAuthentication selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication) {
|
||||
public AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication) {
|
||||
String eidToken = ientityAuthentication.getEidToken();
|
||||
Long userId = ientityAuthentication.getUserId();
|
||||
String userName = ientityAuthentication.getUserName();
|
||||
IdentityAuthentication IdentityAuthenticationRespon = new IdentityAuthentication();
|
||||
IdentityAuthentication IdentityAuthenticationResult = new IdentityAuthentication();
|
||||
if(StringUtils.isNotEmpty(eidToken)){
|
||||
try{
|
||||
Credential authenti = new Credential(credentialSecretId, credentialSecretKey);
|
||||
HttpProfile httpProfileIdenAuth = new HttpProfile();
|
||||
httpProfileIdenAuth.setEndpoint("faceid.tencentcloudapi.com");
|
||||
ClientProfile clientInv= new ClientProfile();
|
||||
clientInv.setHttpProfile(httpProfileIdenAuth);
|
||||
FaceidClient clientIdenAuth = new FaceidClient(authenti, "", clientInv);
|
||||
// 实例化一个请求对象
|
||||
GetEidResultRequest reqest = new GetEidResultRequest();
|
||||
//设置请求参数
|
||||
reqest.setEidToken(eidToken);
|
||||
|
||||
// reqest.setInfoType("1");
|
||||
// reqest.setInfoType("13");
|
||||
// reqest.setInfoType("2");
|
||||
try {
|
||||
Credential cred = new Credential(credentialSecretId, credentialSecretKey);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.setEndpoint("faceid.tencentcloudapi.com");
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
clientProfile.setHttpProfile(httpProfile);
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
FaceidClient client = new FaceidClient(cred, "", clientProfile);
|
||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||
GetEidResultRequest req = new GetEidResultRequest();
|
||||
req.setEidToken(eidToken);
|
||||
// 返回的resp是一个GetEidResultResponse的实例,与请求对象对应
|
||||
GetEidResultResponse resp = client.GetEidResult(req);
|
||||
// 输出json格式的字符串回包
|
||||
String s = GetEidResultResponse.toJsonString(resp);
|
||||
JSONObject objJSON = JSON.parseObject(s);
|
||||
//查看是否核验成功
|
||||
JSONObject text = objJSON.getJSONObject("Text");
|
||||
if (text != null) {
|
||||
Integer comparestatus = text.getInteger("Comparestatus");
|
||||
if (comparestatus != null && comparestatus == 0) {
|
||||
JSONObject eidInfo = objJSON.getJSONObject("EidInfo");
|
||||
if (eidInfo != null) {
|
||||
String desKey = eidInfo.getString("DesKey");
|
||||
String userInfo = eidInfo.getString("UserInfo");
|
||||
//1.解密用户的信息
|
||||
JSONObject info = DecodeUserInfo(desKey, userInfo);
|
||||
if (info != null) {
|
||||
String idcardno = info.getString("idnum");
|
||||
String name = info.getString("name");
|
||||
//2.在用户认证表中插入用户认证记录
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
IdentityAuthentication authentication = new IdentityAuthentication();
|
||||
/**
|
||||
* 用户名
|
||||
* 用户名id
|
||||
* 姓名
|
||||
* 身份证号
|
||||
* 认证时间
|
||||
* 认证状态0表示成功
|
||||
* 请求id
|
||||
*/
|
||||
authentication.setUserName(loginUser.getUsername());
|
||||
authentication.setUserId(loginUser.getUserId());
|
||||
authentication.setName(name);
|
||||
authentication.setIdentityNo(idcardno);
|
||||
authentication.setCertificationTime(new Date());
|
||||
authentication.setCertificationStatus(0);
|
||||
authentication.setCreateBy(loginUser.getUsername());
|
||||
try {
|
||||
identityAuthenticationMapper.insertIdentityAuthentication(authentication);
|
||||
} catch (Exception e) {
|
||||
System.out.println("认证记录新增失败");
|
||||
}
|
||||
|
||||
//获得身份认证结果
|
||||
GetEidResultResponse respIdenAuth = clientIdenAuth.GetEidResult(reqest);
|
||||
String respJSON = GetEidResultResponse.toJsonString(respIdenAuth);
|
||||
JSONObject objJSON = JSON.parseObject(respJSON);
|
||||
IdentityAuthenticationRespon.setCertificationStatus(1);
|
||||
IdentityAuthenticationRespon.setUserName(userName);
|
||||
IdentityAuthenticationRespon.setUserId(userId);
|
||||
}
|
||||
|
||||
JSONObject objEidInfo = JSON.parseObject(objJSON.getString("EidInfo"));
|
||||
// identityAuthenticationMapper.insertIdentityAuthentication(IdentityAuthenticationRespon);
|
||||
IdentityAuthenticationResult.setCertificationStatus(1);
|
||||
IdentityAuthenticationResult.setCertificationStatusName("认证成功");
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.error("认证失败:", e);
|
||||
throw new RuntimeException("认证失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success();
|
||||
} catch (TencentCloudSDKException e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
return IdentityAuthenticationResult;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 案件记录日志文件
|
||||
*
|
||||
* @author wangqiong
|
||||
*/
|
||||
public class CaseLogUtils
|
||||
{
|
||||
private static CaseLogRecordMapper caseLogRecordMapper= SpringUtil.getBean(CaseLogRecordMapper.class);
|
||||
|
||||
/**
|
||||
* 新增案件日志
|
||||
* @param caseAppliId 案件id,不能为空
|
||||
* @param caseNode 案件节点,不能为空
|
||||
* @param notes 备注
|
||||
*/
|
||||
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes ){
|
||||
// 获取当前的用户
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
String nickName = loginUser.getUser().getNickName();
|
||||
CaseLogRecord operLog = new CaseLogRecord();
|
||||
operLog.setCreateBy(loginUser.getUsername());
|
||||
operLog.setCreateNickName(nickName);
|
||||
operLog.setUpdateBy(loginUser.getUsername());
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setNotes(notes);
|
||||
caseLogRecordMapper.insertCaseLogRecord(operLog);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
package com.ruoyi.wisdomarbitrate.utils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.constant.FileTransformation;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Component
|
||||
public class FixSelectFlowDetailUtils {
|
||||
|
||||
@Autowired
|
||||
private CaseApplicationMapper caseApplicationMapper;
|
||||
@Autowired
|
||||
private SealSignRecordMapper sealSignRecordMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
|
||||
@Scheduled(cron = "0/3 * * * * ?")
|
||||
@Transactional
|
||||
public void fixExecuteSelectFlowDetailUtils() throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
|
||||
SealSignRecord sealSignRecordselect = new SealSignRecord();
|
||||
// sealSignRecordselect.setSignFlowStatus(1);
|
||||
List<SealSignRecord> sealSignRecords = sealSignRecordMapper.selectSealSignRecordbyStat(sealSignRecordselect);
|
||||
if(sealSignRecords!=null&&sealSignRecords.size()>0){
|
||||
for (int i = 0; i < sealSignRecords.size(); i++) {
|
||||
SealSignRecord sealSignRecord = sealSignRecords.get(i);
|
||||
EsignHttpResponse signFlowDetail = SignAward.signFlowDetail(sealSignRecord);
|
||||
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
||||
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
||||
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
||||
Integer psnsignStatus = null;
|
||||
Integer orgsignStatus = null;
|
||||
for (int j = 0; j < signersArray.size(); j++) {
|
||||
JsonObject signerObject = (JsonObject)signersArray.get(j);
|
||||
|
||||
if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
||||
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
||||
if(psnSignerData!=null){
|
||||
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
||||
}
|
||||
}
|
||||
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
||||
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||
if(orgSignerData!=null){
|
||||
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==1)){
|
||||
//更新立案申请状态为待用印
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||
|
||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.SIGN_ARBITRATION){
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
|
||||
//修改"签署用印记录表"的状态为待用印
|
||||
sealSignRecord.setSignFlowStatus(2);
|
||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if((psnsignStatus.intValue()==2)&&(orgsignStatus.intValue()==2)){
|
||||
//更新立案申请状态为待送达
|
||||
CaseApplication caseApplication = new CaseApplication();
|
||||
caseApplication.setId(sealSignRecord.getCaseAppliId());
|
||||
|
||||
CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
|
||||
if(caseApplicationselect.getCaseStatus().intValue()==CaseApplicationConstants.ARBITRATED_SEAL){
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
|
||||
//下载审核完成的裁决书,
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(),JsonObject.class);
|
||||
JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
if(filesArray!=null&&filesArray.size()>0){
|
||||
JsonObject fileObject = (JsonObject)filesArray.get(0);
|
||||
String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
//修改"签署用印记录表"的状态为签署完成
|
||||
sealSignRecord.setSignFlowStatus(3);
|
||||
sealSignRecord.setFileDownloadUrl(fileDownloadUrl.substring(1,fileDownloadUrl.length()-1));
|
||||
sealSignRecordMapper.updataSealSignRecord(sealSignRecord);
|
||||
String filearbitraUrl = fileDownloadUrl.substring(1,fileDownloadUrl.length()-1);
|
||||
caseApplication.setFilearbitraUrl(filearbitraUrl);
|
||||
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -3,6 +3,11 @@ package com.ruoyi.wisdomarbitrate.utils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.enums.EsignRequestType;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.EsignApplicaConfig;
|
||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -10,40 +15,18 @@ import java.util.Map;
|
||||
public class SignAward {
|
||||
|
||||
private static String eSignHost= EsignApplicaConfig.EsignHost;
|
||||
private static String eSignAppId=EsignApplicaConfig.EsignAppId;
|
||||
private static String eSignAppSecret=EsignApplicaConfig.EsignAppSecret;
|
||||
private static String eSignAppId= EsignApplicaConfig.EsignAppId;
|
||||
private static String eSignAppSecret= EsignApplicaConfig.EsignAppSecret;
|
||||
// public static String fileId = "95d0c307d91e4985bdb8874f6f84daa5";
|
||||
public static String fileId = "a0c2ad21065f48ff8b872412c39d5d3a";
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws EsignInterfacException {
|
||||
public static void main(String[] args) throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
|
||||
SealSignRecord sealSignRecord = new SealSignRecord();
|
||||
|
||||
sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
|
||||
sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
|
||||
sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
|
||||
|
||||
|
||||
sealSignRecord.setPensonAccount("18209231185");
|
||||
sealSignRecord.setPensonName("秦桃则");
|
||||
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
|
||||
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
|
||||
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
|
||||
sealSignRecord.setPositionPagepsn("2");
|
||||
|
||||
sealSignRecord.setPositionXpsn(279+20);
|
||||
sealSignRecord.setPositionYpsn(216.336-20);
|
||||
|
||||
sealSignRecord.setPositionPageorg("2");
|
||||
|
||||
sealSignRecord.setPositionXorg(342+30);
|
||||
sealSignRecord.setPositionYorg(185.136);
|
||||
|
||||
|
||||
|
||||
|
||||
/* 发起签署*/
|
||||
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
|
||||
@@ -70,24 +53,70 @@ public class SignAward {
|
||||
// System.out.println("签署长链接:"+url);
|
||||
|
||||
//获取合同文件用印链接
|
||||
EsignHttpResponse usesealUrl = usesealUrl(sealSignRecord);
|
||||
JsonObject usesealUrlJsonObject = gson.fromJson(usesealUrl.getBody(), JsonObject.class);
|
||||
JsonObject usesealUrlData = usesealUrlJsonObject.getAsJsonObject("data");
|
||||
String shortusesealUrl = usesealUrlData.get("shortUrl").getAsString();
|
||||
String sealUrl = usesealUrlData.get("url").getAsString();
|
||||
System.out.println("签署长链接:" +shortusesealUrl);
|
||||
System.out.println("签署短链接:"+sealUrl);
|
||||
// EsignHttpResponse usesealUrl = usesealUrl(sealSignRecord);
|
||||
// JsonObject usesealUrlJsonObject = gson.fromJson(usesealUrl.getBody(), JsonObject.class);
|
||||
// JsonObject usesealUrlData = usesealUrlJsonObject.getAsJsonObject("data");
|
||||
// String shortusesealUrl = usesealUrlData.get("shortUrl").getAsString();
|
||||
// String sealUrl = usesealUrlData.get("url").getAsString();
|
||||
// System.out.println("签署长链接:" +shortusesealUrl);
|
||||
// System.out.println("签署短链接:"+sealUrl);
|
||||
|
||||
//查询签署流程详情
|
||||
EsignHttpResponse signFlowDetail = signFlowDetail(sealSignRecord);
|
||||
JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
|
||||
JsonObject flowDetailData = signFlowDetailJsonObject.getAsJsonObject("data");
|
||||
JsonArray signersArray = flowDetailData.get("signers").getAsJsonArray();
|
||||
for (int i = 0; i < signersArray.size(); i++) {
|
||||
JsonObject signerObject = (JsonObject)signersArray.get(i);
|
||||
Integer psnsignStatus ;
|
||||
Integer orgsignStatus ;
|
||||
if(!(signerObject.get("psnSigner").toString()).equals("null")){
|
||||
JsonObject psnSignerData = signerObject.getAsJsonObject("psnSigner");
|
||||
if(psnSignerData!=null){
|
||||
psnsignStatus = signerObject.get("signStatus").getAsInt();
|
||||
sealSignRecord.setPsnsignStatus(psnsignStatus);
|
||||
}
|
||||
}
|
||||
if(!(signerObject.get("orgSigner").toString()).equals("null")){
|
||||
JsonObject orgSignerData = signerObject.getAsJsonObject("orgSigner");
|
||||
if(orgSignerData!=null){
|
||||
orgsignStatus = signerObject.get("signStatus").getAsInt();
|
||||
sealSignRecord.setOrgsignStatus(orgsignStatus);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(signFlowDetailJsonObject);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询签署流程详情
|
||||
* @return
|
||||
*/
|
||||
public static EsignHttpResponse signFlowDetail(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
String apiaddr= "/v3/sign-flow/"+ signFlowId + "/detail";
|
||||
String jsonParm = null;
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.GET;
|
||||
//生成签名鉴权方式的的header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发起签署
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignInterfacException {
|
||||
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String apiaddr = "/v3/sign-flow/create-by-file";
|
||||
|
||||
String fileId = sealSignRecord.getFileid();
|
||||
@@ -108,15 +137,10 @@ public class SignAward {
|
||||
double positionXorg = sealSignRecord.getPositionXorg();
|
||||
double positionYorg = sealSignRecord.getPositionYorg();
|
||||
|
||||
|
||||
String jsonParm = "{\n" +
|
||||
" \"docs\": [\n" +
|
||||
" {\n" +
|
||||
|
||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
|
||||
// " \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
|
||||
" \"fileName\": \"" + fileName + "\"\n" +
|
||||
|
||||
" }\n" +
|
||||
@@ -143,24 +167,16 @@ public class SignAward {
|
||||
" {\n" +
|
||||
|
||||
" \"psnSignerInfo\": {\n" +
|
||||
|
||||
// " \"psnAccount\": \"18209231185\",\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\",\n" +
|
||||
|
||||
" \"psnInfo\": {\n" +
|
||||
|
||||
// " \"psnName\": \"秦桃则\"\n" +
|
||||
" \"psnName\": \"" + psnName + "\"\n" +
|
||||
" }\n" +
|
||||
|
||||
|
||||
" },\n" +
|
||||
|
||||
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
|
||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
@@ -168,16 +184,9 @@ public class SignAward {
|
||||
" \"freeMode\": false,\n" +
|
||||
" \"movableSignField\": false,\n" +
|
||||
" \"signFieldPosition\": {\n" +
|
||||
|
||||
// " \"positionPage\": \"2\",\n" +
|
||||
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
|
||||
|
||||
// " \"positionX\": 310.0,\n" +
|
||||
" \"positionX\": " + positionXpsn + ",\n" +
|
||||
|
||||
// " \"positionY\": 247.536\n" +
|
||||
" \"positionY\": " + positionYpsn + "\n" +
|
||||
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
" },\n" +
|
||||
@@ -190,19 +199,12 @@ public class SignAward {
|
||||
|
||||
" {\n" +
|
||||
" \"orgSignerInfo\": {\n" +
|
||||
|
||||
// " \"orgName\": \"西安云美电子科技有限公司\",\n" +
|
||||
" \"orgName\": \"" + orgName + "\",\n" +
|
||||
|
||||
" \"transactorInfo\": {\n" +
|
||||
|
||||
|
||||
// " \"psnAccount\": \"17691338406\",\n" +
|
||||
" \"psnAccount\": \"" + orgNamePsnAccount + "\",\n" +
|
||||
|
||||
" \"psnInfo\": {\n" +
|
||||
|
||||
// " \"psnName\": \"韩超勃\"\n" +
|
||||
" \"psnName\": \"" + orgNamepsnName + "\"\n" +
|
||||
" }\n" +
|
||||
|
||||
@@ -211,8 +213,6 @@ public class SignAward {
|
||||
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
|
||||
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
@@ -221,13 +221,8 @@ public class SignAward {
|
||||
|
||||
" \"signFieldPosition\": {\n" +
|
||||
|
||||
// " \"positionPage\": \"2\",\n" +
|
||||
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
||||
|
||||
// " \"positionX\": 340.0,\n" +
|
||||
" \"positionX\": " + positionXorg + ",\n" +
|
||||
|
||||
// " \"positionY\": 340.736\n" +
|
||||
" \"positionY\": " + positionYorg + "\n" +
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
@@ -252,9 +247,9 @@ public class SignAward {
|
||||
/**
|
||||
* 获取合同文件签名链接
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignInterfacException {
|
||||
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
String psnAccount = sealSignRecord.getPensonAccount();
|
||||
@@ -262,7 +257,6 @@ public class SignAward {
|
||||
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
|
||||
String jsonParm = "{\n" +
|
||||
" \"operator\": {\n" +
|
||||
// " \"psnAccount\":\"18209231185\"\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
@@ -277,9 +271,9 @@ public class SignAward {
|
||||
/**
|
||||
* 获取合同文件用印链接
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignInterfacException {
|
||||
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String signFlowId = sealSignRecord.getSignFlowid();
|
||||
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
|
||||
|
||||
@@ -287,15 +281,11 @@ public class SignAward {
|
||||
String orgName = sealSignRecord.getOrgnizeName();
|
||||
|
||||
String jsonParm = "{\n" +
|
||||
// " \"needLogin\": true,\n" +
|
||||
" \"operator\": {\n" +
|
||||
|
||||
// " \"psnAccount\":\"17691338406\"\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\"\n" +
|
||||
" },\n" +
|
||||
" \"organization\": {\n" +
|
||||
|
||||
// " \"orgName\": \"西安云美电子科技有限公司\"\n" +
|
||||
" \"orgName\": \"" + orgName + "\"\n" +
|
||||
|
||||
" }\n" +
|
||||
@@ -311,9 +301,9 @@ public class SignAward {
|
||||
/**
|
||||
* 获取文件签名印章位置
|
||||
* @return
|
||||
* @throws EsignInterfacException
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignInterfacException {
|
||||
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String fileId = sealSignRecord.getFileid();
|
||||
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
|
||||
String jsonParm = "{\n" +
|
||||
|
||||
@@ -86,8 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectDeptVo"/>
|
||||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept">
|
||||
<select id="selectUserDeptListByRoleId" resultType="java.lang.Long">
|
||||
select u.dept_id from sys_user_role r
|
||||
join sys_user u on r.role_id=#{roleId} and r.user_id=u.user_id
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept" useGeneratedKeys="true" keyColumn="dept_id" keyProperty="deptId">
|
||||
insert into sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
@@ -112,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="updateDept" parameterType="SysDept">
|
||||
|
||||
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
@@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="leader" column="leader" />
|
||||
<result property="status" column="dept_status" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="RoleResult" type="SysRole">
|
||||
@@ -49,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.id_card
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@@ -57,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
@@ -86,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@@ -103,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.id_card, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
@@ -141,13 +143,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectUserListByAdRole" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.id_card, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u
|
||||
join sys_user_role ur on ur.user_id =u.user_id
|
||||
join sys_role r on ur.role_id = r.role_id and r.role_name='仲裁员'
|
||||
where r.del_flag = '0' and r.status='0'
|
||||
and u.del_flag = '0' and u.status='0'
|
||||
<if test="arbitratorName != null and arbitratorName != ''">
|
||||
AND u.nick_name like concat('%', #{arbitratorName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND u.user_id in
|
||||
<foreach item="id" collection="idList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
<select id="selectUserListByIds" resultMap="SysUserResult">
|
||||
select u.user_id, u.nick_name, u.user_name,u.id_card, u.phonenumber, u.remark from sys_user u
|
||||
|
||||
<where>
|
||||
<if test="idList != null and idList.size() > 0">
|
||||
AND u.user_id in
|
||||
<foreach item="id" collection="idList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</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>
|
||||
@@ -162,6 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<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="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
@@ -180,6 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<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="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
|
||||
@@ -37,21 +37,4 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -19,13 +19,15 @@
|
||||
<result property="contactTelphoneAgent" column="contact_telphone_agent" />
|
||||
<result property="contactAddressAgent" column="contact_address_agent" />
|
||||
<result property="trackNum" column="track_num" />
|
||||
<result property="applicationOrganId" column="application_organ_id" />
|
||||
<result property="applicationOrganName" column="application_organ_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
||||
select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
|
||||
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
|
||||
c.track_num
|
||||
c.track_num,c.application_organ_id,c.application_organ_name
|
||||
from case_affiliate c
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
@@ -33,14 +35,28 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCaseAffiliateByIdentityType" resultMap="CaseAffiliateResult">
|
||||
select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
|
||||
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
|
||||
c.track_num,c.application_organ_id,c.application_organ_name
|
||||
from case_affiliate c
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND c.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
<if test="caseAppliId != null ">
|
||||
AND c.identity_type = #{identityType}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="batchCaseAffiliate">
|
||||
insert into case_affiliate(case_appli_id, identity_type,name,identity_num,contact_telphone,
|
||||
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
||||
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
||||
contact_address_agent ) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliId},#{item.identityType},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
|
||||
#{item.contactTelphoneAgent},#{item.contactAddressAgent})
|
||||
</foreach>
|
||||
@@ -53,6 +69,8 @@
|
||||
set
|
||||
case_appli_id=#{caseAppliId},
|
||||
identity_type= #{identityType},
|
||||
application_organ_id= #{applicationOrganId},
|
||||
application_organ_name= #{applicationOrganName},
|
||||
name = #{name},
|
||||
identity_num = #{identityNum},
|
||||
contact_telphone = #{contactTelphone},
|
||||
|
||||
@@ -34,11 +34,12 @@
|
||||
<result property="arbitratorName" column="arbitrator_name" />
|
||||
<result property="paymentStatus" column="payment_status" />
|
||||
<result property="paymentStatusName" column="paymentStatusName" />
|
||||
<result property="filearbitraUrl" column="filearbitra_url" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
select t1.* from(
|
||||
select t.* from(
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
@@ -49,14 +50,16 @@
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time , c.arbitrator_name
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
|
||||
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
<where>
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
@@ -71,6 +74,73 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
) t
|
||||
<where>
|
||||
|
||||
<!--被申请人-->
|
||||
<if test="idCard != null and idCard != ''">
|
||||
or (t.identity_num=#{idCard} AND t.identity_type=2)
|
||||
</if>
|
||||
<!--仲裁员-->
|
||||
<if test="userId != null and userId != ''">
|
||||
or instr (t.arbitrator_id,#{userId})>0
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
or t.name
|
||||
in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</where>
|
||||
) t1
|
||||
<where>
|
||||
<!--申请人-->
|
||||
<if test="nameId != null and nameId != ''">
|
||||
and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1 )
|
||||
</if>
|
||||
</where>
|
||||
order by t1.create_time desc,t1.case_num desc
|
||||
</select>
|
||||
<select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
c.case_status ,
|
||||
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
||||
<where>
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
</if>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
AND c.case_num = #{caseNum}
|
||||
</if>
|
||||
<if test="nameId != null and nameId != ''">
|
||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
||||
</if>
|
||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
||||
and c.case_status in
|
||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by c.create_time desc,c.case_num desc
|
||||
</select>
|
||||
|
||||
@@ -88,7 +158,7 @@
|
||||
|
||||
<if test="caseNum != null and caseNum != ''">case_num,</if>
|
||||
<if test="caseSubjectAmount != null">case_subject_amount,</if>
|
||||
<if test="registerDate != null">register_date,</if>
|
||||
register_date,
|
||||
<if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
|
||||
<if test="caseStatus != null ">case_status,</if>
|
||||
<if test="hearDate != null ">hear_date,</if>
|
||||
@@ -109,7 +179,7 @@
|
||||
)values(
|
||||
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
||||
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
|
||||
<if test="registerDate != null">#{registerDate},</if>
|
||||
sysdate(),
|
||||
<if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
|
||||
<if test="caseStatus != null ">#{caseStatus},</if>
|
||||
<if test="hearDate != null ">#{hearDate},</if>
|
||||
@@ -176,9 +246,13 @@
|
||||
<if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
|
||||
<if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
|
||||
<if test="hearDate != null">hear_date = #{hearDate},</if>
|
||||
<if test="filearbitraUrl != null and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updatePayType">
|
||||
update case_application set pay_type=#{payType} where id = #{caseId}
|
||||
</update>
|
||||
|
||||
<delete id="deletecaseApplication" parameterType="CaseApplication">
|
||||
delete from case_application where id = #{id}
|
||||
@@ -201,8 +275,10 @@
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
|
||||
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
|
||||
<where>
|
||||
<if test="id != null ">
|
||||
AND c.id = #{id}
|
||||
@@ -231,7 +307,8 @@
|
||||
p.payment_status ,
|
||||
CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
|
||||
ELSE '无支付状态'
|
||||
END paymentStatusName
|
||||
END paymentStatusName,c.pay_type,
|
||||
CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
|
||||
from case_application c left join case_payment_record p on c.id = p.case_id
|
||||
where c.case_status = 3 and p.payment_status = 1
|
||||
AND c.id = #{id}
|
||||
@@ -241,6 +318,9 @@
|
||||
select max(substring(case_num, #{length}+1,12)+1) as maxCaseNum
|
||||
from case_application where case_num like CONCAT(#{caseNum},'%') ;
|
||||
</select>
|
||||
<select id="selectArbitratorList" resultType="java.lang.String">
|
||||
select a.arbitrator_id id from case_application a where a.id=#{id}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -17,6 +17,7 @@
|
||||
INSERT INTO case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account)
|
||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{userId},#{userName})
|
||||
</insert>
|
||||
|
||||
<select id="queryAnnexPathByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.CaseAttach" resultMap="CaseAttachResult">
|
||||
select annex_id,case_appli_id,annex_name,annex_path,annex_type,note,use_id,use_account
|
||||
from case_attach
|
||||
@@ -49,6 +50,22 @@
|
||||
where annex_id = #{annexId}
|
||||
</update>
|
||||
|
||||
<update id="updateCaseAttachBycaseid" parameterType="CaseAttach">
|
||||
update case_attach
|
||||
<set>
|
||||
<if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
||||
<if test="annexPath != null and annexPath != ''">annex_path = #{annexPath}</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="caseAppliId != null ">
|
||||
AND case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
<if test="annexType != null ">
|
||||
AND annex_type = #{annexType}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -10,43 +10,39 @@
|
||||
<result property="caseNodeTime" column="case_node_time" />
|
||||
<result property="notes" column="notes" />
|
||||
<result property="caseNum" column="case_num" />
|
||||
<result property="createBy" column=" create_by" />
|
||||
<result property="createNickName" column="create_nick_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertCaseLogRecord">
|
||||
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_time ) values(
|
||||
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},sysdate()
|
||||
insert into case_log_record(case_appli_id, case_node,case_node_time,notes,create_by,create_nick_name,create_time,update_by,update_time ) values(
|
||||
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
|
||||
)
|
||||
</insert>
|
||||
<select id="selectCaseLogRecordList" resultType="com.ruoyi.wisdomarbitrate.domain.CaseLogRecord">
|
||||
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,cl.update_by updateBy,cl.update_time updateTime,
|
||||
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 '送达仲裁文书' when 17 then '案件归档'
|
||||
when 26 then '证据确认成功'
|
||||
ELSE '无案件状态'
|
||||
END content
|
||||
from case_log_record cl
|
||||
|
||||
<where>
|
||||
|
||||
<if test="caseAppliId != null and caseAppliId != ''">
|
||||
AND cl.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time asc
|
||||
|
||||
<select id="selectCaseLogRecordList" parameterType="CaseLogRecord" resultMap="CaseLogRecordResult">
|
||||
select cl.case_node ,cl.case_node_time ,cl.notes ,c.case_num ,cl.id ,cl.case_appli_id
|
||||
from case_log_record cl left join case_application c on cl.case_appli_id = c.id
|
||||
<where>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
AND c.case_num = #{caseNum}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -11,6 +11,7 @@
|
||||
<result property="paymentTime" column="payment_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="payType" column="pay_type" />
|
||||
</resultMap>
|
||||
<insert id="saveRecord">
|
||||
INSERT INTO case_payment_record (case_id, order_number, payment_status , create_time)
|
||||
@@ -24,6 +25,7 @@
|
||||
<if test="paymentTime != null ">payment_time = #{paymentTime},</if>
|
||||
<if test="paymentStatus != null ">payment_status = #{paymentStatus},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="payType != null ">pay_type = #{payType},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="identityNo != null and identityNo != ''">identity_no,</if>
|
||||
certification_time,
|
||||
<if test="certificationStatus != null and certificationStatus != ''">certification_status,</if>
|
||||
<if test="certificationStatus != null">certification_status,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper">
|
||||
|
||||
<insert id="insertSealSignRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO seal_sign_record (file_id, file_name, sign_flow_id , penson_account
|
||||
,penson_name,orgnize_name,orgn_name_psn_acc,orgn_name_psn_name,position_pagepsn
|
||||
,position_xpsn,position_ypsn,position_pageorg,position_xorg,position_yorg,case_appli_id
|
||||
,sign_flow_status)
|
||||
VALUES (#{fileid}, #{filename}, #{signFlowid},#{pensonAccount},#{pensonName},#{orgnizeName}
|
||||
,#{orgnizeNamePsnAccount},#{orgnizeNamepsnName},#{positionPagepsn},#{positionXpsn},#{positionYpsn}
|
||||
,#{positionPageorg},#{positionXorg},#{positionYorg},#{caseAppliId},#{signFlowStatus})
|
||||
</insert>
|
||||
|
||||
|
||||
<resultMap type="SealSignRecord" id="SealSignRecordResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="caseAppliId" column="case_appli_id" />
|
||||
<result property="fileid" column="file_id" />
|
||||
<result property="signFlowid" column="sign_flow_id" />
|
||||
<result property="signFlowStatus" column="sign_flow_status" />
|
||||
|
||||
<result property="pensonAccount" column="penson_account" />
|
||||
<result property="orgnizeName" column="orgnize_name" />
|
||||
<result property="orgnizeNamePsnAccount" column="orgn_name_psn_acc" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectSealSignRecord" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.penson_account ,s.orgnize_name ,s.orgn_name_psn_acc
|
||||
from seal_sign_record s
|
||||
<where>
|
||||
<if test="signFlowStatus != null ">
|
||||
AND s.sign_flow_status = #{signFlowStatus}
|
||||
</if>
|
||||
<if test="caseAppliId != null ">
|
||||
AND s.case_appli_id = #{caseAppliId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id
|
||||
from seal_sign_record s
|
||||
where s.sign_flow_status in (1,2)
|
||||
</select>
|
||||
|
||||
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
||||
update seal_sign_record
|
||||
<set>
|
||||
<if test="signFlowStatus != null">sign_flow_status = #{signFlowStatus},</if>
|
||||
<if test="fileDownloadUrl != null and fileDownloadUrl != ''">file_download_url = #{fileDownloadUrl}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user