2 Commits
Author SHA1 Message Date
qitz 752fc00837 实现签名功能 2023-10-12 12:11:37 +08:00
qitz b78065223b 实现用印签名功能 2023-10-12 10:04:57 +08:00
74 changed files with 1155 additions and 2964 deletions
@@ -3,7 +3,6 @@ package com.ruoyi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动程序
@@ -11,7 +10,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
* @author ruoyi
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
public class RuoYiApplication
{
public static void main(String[] args)
@@ -22,11 +22,12 @@ import com.ruoyi.system.service.ISysMenuService;
/**
* 登录验证
*
*
* @author ruoyi
*/
@RestController
public class SysLoginController {
public class SysLoginController
{
@Autowired
private SysLoginService loginService;
@@ -36,36 +37,40 @@ public class SysLoginController {
@Autowired
private SysPermissionService permissionService;
@Autowired
IdentityAuthenticationService identityAuthenticationService;
private 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);
//判断该用户是否已经实名认证(certificationStatus1已认证0未认证)
IdentityAuthentication identityAuthentication=new IdentityAuthentication();
identityAuthentication.setUserName(loginBody.getUsername());
String status = identityAuthenticationService.checkIsAuthentication(identityAuthentication);
ajax.put("certificationStatus", status);
// IdentityAuthentication identityAuthentication = new IdentityAuthentication();
// identityAuthentication.setUserName(loginBody.getUsername());
// IdentityAuthentication identityAuthenticationselect = identityAuthenticationService.selectIdentityAuthentication(identityAuthentication);
// ajax.put("certificationStatusName", identityAuthenticationselect.getCertificationStatusName());
// ajax.put("certificationStatus", identityAuthenticationselect.getCertificationStatus());
return ajax;
}
/**
* 获取用户信息
*
*
* @return 用户信息
*/
@GetMapping("getInfo")
public AjaxResult getInfo() {
public AjaxResult getInfo()
{
SysUser user = SecurityUtils.getLoginUser().getUser();
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
@@ -80,11 +85,12 @@ 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));
@@ -4,15 +4,11 @@ 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 {
@@ -31,12 +27,17 @@ public class AdjudicationController extends BaseController {
/**
* 裁决书送达(电子邮件)
* @param bookSendVO
* @param id 案件id
* @param appEmail 申请人邮箱
* @param resEmail 被申请人邮箱
* @param apptrackingNum 申请人快递单号
* @param restrackingNum 被申请人快递单号
* @return
*/
@PostMapping("/delivery")
public AjaxResult sendDocumentByEmail(@RequestBody BookSendVO bookSendVO){
return adjudicationService.sendDocumentByEmail(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
public AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail
,String apptrackingNum,String restrackingNum){
return adjudicationService.sendDocumentByEmail(id,appEmail,resEmail,apptrackingNum,restrackingNum);
}
/**
@@ -45,10 +46,8 @@ public class AdjudicationController extends BaseController {
* @return
*/
@GetMapping("/logistics")
// @PreAuthorize("@ss.hasPermi('delivery:detail')")
public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
List<LogisticsInfoVO> logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
return AjaxResult.success(logisticsInfo);
return adjudicationService.getLogisticsInfo(caseApplication);
}
/**
@@ -57,7 +56,6 @@ 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);
}
@@ -68,7 +66,6 @@ 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);
}
@@ -79,28 +76,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/service")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
public AjaxResult service(@RequestBody BookSendVO bookSendVO){
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
}
/**
* 用印(暂时只改案件状态)
* @param caseApplication
* @return
*/
@PostMapping("/stamp")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.stamp(caseApplication);
}
/**
* 档案详情查询
* @param id 案件id
* @return
*/
@GetMapping("/archives")
public AjaxResult getArchivesDetail(Long id){
return adjudicationService.getArchivesDetail(id);
}
}
@@ -1,10 +1,7 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -19,17 +16,17 @@ import java.util.List;
@RequestMapping("/arbitrator")
public class ArbitratorController extends BaseController {
@Autowired
private ISysUserService sysUserService;
private IArbitratorService arbitratorService;
/**
* 查询仲裁员信息
*/
// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
@PreAuthorize("@ss.hasPermi('arbitrator:list')")
@GetMapping("/list")
public TableDataInfo list(Arbitrator arbitrator)
{
startPage();
List<SysUser> list = sysUserService.selectUserListByAdRole(arbitrator);
List<Arbitrator> list = arbitratorService.selectArbitratorList(arbitrator);
return getDataTable(list);
}
@@ -1,18 +1,15 @@
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.exception.EsignDemoException;
import com.ruoyi.common.utils.WxAppletNotifyUtils;
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
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;
@@ -21,12 +18,14 @@ 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;
@@ -34,9 +33,10 @@ public class CaseApplicationController extends BaseController {
/**
* 查询立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list')")
@PreAuthorize("@ss.hasPermi('caseApplication:list')")
@GetMapping("/list")
public TableDataInfo list(CaseApplication caseApplication) {
public TableDataInfo list(CaseApplication caseApplication)
{
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
return getDataTable(list);
@@ -45,12 +45,15 @@ public class CaseApplicationController extends BaseController {
/**
* 新增立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
@PreAuthorize("@ss.hasPermi('caseApplication:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
int caseApplicationCount = caseApplicationService.selectCaseApplicationCount(caseApplication);
if(caseApplicationCount>0){
return error("新增立案申请'" + caseApplication.getCaseNum() + "'案件编号已存在");
}
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
}
@@ -58,10 +61,11 @@ public class CaseApplicationController extends BaseController {
/**
* 修改立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@PreAuthorize("@ss.hasPermi('caseApplication:edit')")
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplication")
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
{
caseApplication.setUpdateBy(getUsername());
return toAjax(caseApplicationService.editCaseApplication(caseApplication));
@@ -70,10 +74,11 @@ public class CaseApplicationController extends BaseController {
/**
* 提交立案申请
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
@PreAuthorize("@ss.hasPermi('caseApplication: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));
}
@@ -81,10 +86,11 @@ public class CaseApplicationController extends BaseController {
/**
* 删除立案数据
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
@PreAuthorize("@ss.hasPermi('caseApplication:remove')")
@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));
}
@@ -92,133 +98,110 @@ 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('caseManagement:list:import')")
@PreAuthorize("@ss.hasPermi('caseApplication:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception {
if(file==null){
return warn("请上传文件");
}
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
List<CaseApplication> caseApplicationList = util.importExcel(file.getInputStream());
String operName = getUsername();
String message = caseApplicationService.importCaseApplication(caseApplicationList, operName);
String message = caseApplicationService.importCaseApplication(caseApplicationList,operName);
return success(message);
}
/**
* 组庭
*/
// @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@Log(title = "组庭", businessType = BusinessType.UPDATE)
@PostMapping("/pendTral")
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendTral(caseApplication));
}
/**
* 组庭审核
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralCheck')")
@Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendTralCheck(caseApplication));
}
/**
* 组庭确认
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
@PreAuthorize("@ss.hasPermi('caseApplication:pendTralSure')")
@Log(title = "组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSure")
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication)
{
return toAjax(caseApplicationService.pendTralSure(caseApplication));
}
/**
* 核验裁决书
*/
// @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('caseManagement:list:check')")
@PreAuthorize("@ss.hasPermi('caseApplication:submitCaseApplicationCheck')")
@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));
}
@@ -226,42 +209,14 @@ 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);
}
}
@@ -6,7 +6,6 @@ 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.*;
@@ -23,7 +22,6 @@ 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);
@@ -36,7 +34,6 @@ public class CaseArbitrateController extends BaseController {
*/
@PostMapping("/writtenHear")
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
arbitrateRecord.setCreateBy(getUsername());
return caseArbitrateService.writtenHear(arbitrateRecord);
}
}
@@ -8,7 +8,6 @@ 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;
@@ -38,7 +37,7 @@ public class CaseEvidenceController extends BaseController {
@GetMapping("/{id}")
public AjaxResult getCaseDetailsById(@PathVariable Long id) {
String username = this.getUsername();
return caseEvidenceService.getCaseDetailsById(id, username);
return caseEvidenceService.getCaseDetailsById(id,username);
}
/**
@@ -53,17 +52,16 @@ 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(required = false) String identityNum) {
public TableDataInfo getCaseListAll(@RequestParam String identityNum) {
startPage();
List<CaseEvidenceVO> list = caseEvidenceService.getCaseListAll(identityNum);
if (list != null) {
@@ -74,23 +72,21 @@ 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);
}
}
@@ -22,7 +22,7 @@ public class CaseLogRecordController extends BaseController {
/**
* 查询案件日志列表
*/
// @PreAuthorize("@ss.hasPermi('caseLog:list')")
@PreAuthorize("@ss.hasPermi('caseLogRecord:list')")
@GetMapping("/list")
public TableDataInfo list(CaseLogRecord caseLogRecord)
{
@@ -2,11 +2,9 @@ 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.*;
@@ -26,28 +24,16 @@ 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);
@@ -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,27 +14,40 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/identityAuthentication")
public class IdentityAuthenticationController extends BaseController {
public class IdentityAuthenticationController extends BaseController {
@Autowired
private IdentityAuthenticationService identityAuthenticationService;
/**
* 获取EIDtoken
* 查询身份认证EIDtoken
*/
@PostMapping("/selectIdentityAuthenticaEIDtoken")
public AjaxResult selectIdentityAuthenticaEIDtoken() {
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
return success(tokenResult);
public AjaxResult selectIdentityAuthenticaEIDtoken()
{
IdentityAuthentication ientityAuthentication = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
return success(ientityAuthentication);
}
/**
* 小程序人脸核身后查询身份认证结果
* 查询身份认证结果
*/
@PostMapping("/selectIdentityAuthenticaRespon")
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
return checkResult;
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication)
{
String username = this.getUsername();
Long userId = this.getUserId();
ientityAuthentication.setUserId(userId);
ientityAuthentication.setUserName(username);
IdentityAuthentication ientityAuthenticationRes = identityAuthenticationService.selectIdentityAuthenticaRespon( ientityAuthentication);
return success(ientityAuthenticationRes);
}
}
@@ -6,9 +6,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://121.40.189.20:3306/smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
url: jdbc:mysql://121.40.189.20:3306/arbitrate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
password: root123456
# 从库数据源
slave:
# 从数据源开关/默认关闭
@@ -94,20 +94,14 @@ spring:
mail:
host: smtp.163.com
port: 25
username: lmj1549843951@163.com
password: JGIOQVFCLAZKXRKO
username: hjbjava@163.com
password: BSRSSEPJWGNNVYYL
default-encoding: UTF-8
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
socketFactoryClass: javax.net.ssl.SSLSocketFactory
socketFactoryFallback: false
socketFactoryPort: 465
debug: false
protocol: smtp
#上上签配置参数
ssq:
developerId: 1695872832013855470
@@ -172,4 +166,4 @@ identityAuthentication:
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
merchantId: 0NSJ2309281116194321
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
privateKeyHexDecodeinfo: MHcCAQEEIEw7MRv3uYlpmU6Fko4GlXSh6Vd38k0cUQZ5zDwvRg+voAoGCCqBHM9VAYItoUQDQgAEUdxIAWhGg4LUXf1GoPdb8XMbGudpexPQCuaaRi9BCnNbpaF1kcwRhhsBKvop9ZmW/nOz4wQ1r/iIEOrc9qCXgQ==
+24 -15
View File
@@ -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,15 +136,27 @@
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.876</version>
<version>3.1.270</version>
</dependency>
<!--
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
<version>3.1.875</version>
<version>3.1.871</version>
</dependency>
<!--用户信息解密-->
-->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-faceid</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-common</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
@@ -183,10 +195,7 @@
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
</dependencies>
@@ -33,14 +33,9 @@ public class SysUser extends BaseEntity
@Excel(name = "登录名称")
private String userName;
/** 用户昵称 */
@Excel(name = "用户名称")
private String nickName;
/** 用户身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
@@ -302,21 +297,12 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("deptId", getDeptId())
.append("userName", getUserName())
.append("idCard", getIdCard())
.append("nickName", getNickName())
.append("email", getEmail())
.append("phonenumber", getPhonenumber())
@@ -0,0 +1,360 @@
package com.ruoyi.common.utils;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
import com.ruoyi.common.enums.EsignRequestType;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.utils.bean.SealSignRecord;
import java.util.Map;
public class SignAward {
private static String eSignHost= EsignApplicaConfig.EsignHost;
private static String eSignAppId=EsignApplicaConfig.EsignAppId;
private static String eSignAppSecret=EsignApplicaConfig.EsignAppSecret;
// public static String fileId = "95d0c307d91e4985bdb8874f6f84daa5";
public static String fileId = "a0c2ad21065f48ff8b872412c39d5d3a";
public static void main(String[] args) throws EsignDemoException {
Gson gson = new Gson();
SealSignRecord sealSignRecord = new SealSignRecord();
sealSignRecord.setFileid("a808f1f39a744357a2f018e4ab34c55d");
sealSignRecord.setFilename("23893bfd3f2249ffa5c82850c11c482e.pdf");
sealSignRecord.setSignFlowid("41e6732b48c54c63a91b2379c352212d");
sealSignRecord.setPensonAccount("18209231185");
sealSignRecord.setPensonName("秦桃则");
sealSignRecord.setOrgnizeName("西安云美电子科技有限公司");
sealSignRecord.setOrgnizeNamePsnAccount("17691338406");
sealSignRecord.setOrgnizeNamepsnName("韩超勃");
sealSignRecord.setPositionPagepsn("2");
sealSignRecord.setPositionXpsn(279+20);
sealSignRecord.setPositionYpsn(216.336-20);
sealSignRecord.setPositionPageorg("2");
sealSignRecord.setPositionXorg(342+30);
sealSignRecord.setPositionYorg(185.136);
/* 发起签署*/
// EsignHttpResponse createByFile = createByFile(sealSignRecord);
// JsonObject createByFileJsonObject = gson.fromJson(createByFile.getBody(), JsonObject.class);
// JsonObject createByFileData = createByFileJsonObject.getAsJsonObject("data");
// String signFlowId = createByFileData.get("signFlowId").getAsString();
// System.err.println("流程id:"+signFlowId);
/* 获取文件签名印章位置*/
EsignHttpResponse positions = getPositions(sealSignRecord);
JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
JsonArray keywordPositions = positionsData.get("keywordPositions").getAsJsonArray();
System.out.println("获取文件签名印章位置:" +keywordPositions.toString());
// String signFlowId = "c9955453716344f9971d308abdc13464";
//获取合同文件签名链接
// EsignHttpResponse signUrl = signUrl(sealSignRecord);
// JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
// JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
// String shortUrl = signUrlData.get("shortUrl").getAsString();
// String url = signUrlData.get("url").getAsString();
// System.out.println("签署短链接:" +shortUrl);
// System.out.println("签署长链接:"+url);
//获取合同文件用印链接
// EsignHttpResponse usesealUrl = usesealUrl(sealSignRecord);
// JsonObject usesealUrlJsonObject = gson.fromJson(usesealUrl.getBody(), JsonObject.class);
// JsonObject usesealUrlData = usesealUrlJsonObject.getAsJsonObject("data");
// String shortusesealUrl = usesealUrlData.get("shortUrl").getAsString();
// String sealUrl = usesealUrlData.get("url").getAsString();
// System.out.println("签署长链接:" +shortusesealUrl);
// System.out.println("签署短链接:"+sealUrl);
//查询签署流程详情
// EsignHttpResponse signFlowDetail = signFlowDetail(sealSignRecord);
// JsonObject signFlowDetailJsonObject = gson.fromJson(signFlowDetail.getBody(),JsonObject.class);
// System.out.println(signFlowDetailJsonObject);
}
/**
* 查询签署流程详情
* @return
*/
public static EsignHttpResponse signFlowDetail(SealSignRecord sealSignRecord) throws EsignDemoException {
String signFlowId = sealSignRecord.getSignFlowid();
String apiaddr= "/v3/sign-flow/"+ signFlowId + "/detail";
String jsonParm = null;
//请求方法
EsignRequestType requestType = EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
}
/**
* 发起签署
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignDemoException {
String apiaddr = "/v3/sign-flow/create-by-file";
String fileId = sealSignRecord.getFileid();
String fileName = sealSignRecord.getFilename();
String psnAccount = sealSignRecord.getPensonAccount();
String psnName = sealSignRecord.getPensonName();
String orgName = sealSignRecord.getOrgnizeName();
String orgNamePsnAccount = sealSignRecord.getOrgnizeNamePsnAccount();
String orgNamepsnName = sealSignRecord.getOrgnizeNamepsnName();
String positionPagepsn = sealSignRecord.getPositionPagepsn();
double positionXpsn = sealSignRecord.getPositionXpsn();
double positionYpsn = sealSignRecord.getPositionYpsn();
String positionPageorg = sealSignRecord.getPositionPageorg();
double positionXorg = sealSignRecord.getPositionXorg();
double positionYorg = sealSignRecord.getPositionYorg();
String jsonParm = "{\n" +
" \"docs\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
// " \"fileName\": \"477470a7741b4536a200c792b6ddf966.pdf\"\n" +
" \"fileName\": \"" + fileName + "\"\n" +
" }\n" +
" ],\n" +
" \"signFlowConfig\": {\n" +
" \"signFlowTitle\": \"测试合同\",\n" +
" \"autoStart\": true,\n" +
" \"authConfig\": {\n" +
" \"willingnessAuthModes\": [\n" +
" \"CODE_SMS\"\n" +
" ],\n" +
" \"psnAvailableAuthModes\": [\n" +
" \"PSN_MOBILE3\"\n" +
" ],\n" +
" \"orgAvailableAuthModes\": [\n" +
" \"ORG_LEGALREP\"\n" +
" ]\n" +
" },\n" +
" \"autoFinish\": true\n" +
" },\n" +
" \"signers\": [\n" +
" {\n" +
" \"psnSignerInfo\": {\n" +
// " \"psnAccount\": \"18209231185\",\n" +
" \"psnAccount\": \"" + psnAccount + "\",\n" +
" \"psnInfo\": {\n" +
// " \"psnName\": \"秦桃则\"\n" +
" \"psnName\": \"" + psnName + "\"\n" +
" }\n" +
" },\n" +
" \"signFields\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
" \"normalSignFieldConfig\": {\n" +
" \"autoSign\": false,\n" +
" \"freeMode\": false,\n" +
" \"movableSignField\": false,\n" +
" \"signFieldPosition\": {\n" +
// " \"positionPage\": \"2\",\n" +
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
// " \"positionX\": 310.0,\n" +
" \"positionX\": " + positionXpsn + ",\n" +
// " \"positionY\": 247.536\n" +
" \"positionY\": " + positionYpsn + "\n" +
" },\n" +
" \"signFieldStyle\": 1\n" +
" },\n" +
" \"signFieldType\": 0\n" +
" }\n" +
" ],\n" +
" \"signerType\": 0\n" +
" },\n" +
" {\n" +
" \"orgSignerInfo\": {\n" +
// " \"orgName\": \"西安云美电子科技有限公司\",\n" +
" \"orgName\": \"" + orgName + "\",\n" +
" \"transactorInfo\": {\n" +
// " \"psnAccount\": \"17691338406\",\n" +
" \"psnAccount\": \"" + orgNamePsnAccount + "\",\n" +
" \"psnInfo\": {\n" +
// " \"psnName\": \"韩超勃\"\n" +
" \"psnName\": \"" + orgNamepsnName + "\"\n" +
" }\n" +
" }\n" +
" },\n" +
" \"signFields\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
" \"normalSignFieldConfig\": {\n" +
" \"autoSign\": false,\n" +
" \"freeMode\": false,\n" +
" \"signFieldPosition\": {\n" +
// " \"positionPage\": \"2\",\n" +
" \"positionPage\": \"" + positionPageorg + "\",\n" +
// " \"positionX\": 340.0,\n" +
" \"positionX\": " + positionXorg + ",\n" +
// " \"positionY\": 340.736\n" +
" \"positionY\": " + positionYorg + "\n" +
" },\n" +
" \"signFieldStyle\": 1\n" +
" },\n" +
" \"signFieldType\": 0\n" +
" }\n" +
" ],\n" +
" \"signerType\": 1\n" +
" }\n" +
" ]\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 获取合同文件签名链接
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
String signFlowId = sealSignRecord.getSignFlowid();
String psnAccount = sealSignRecord.getPensonAccount();
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
String jsonParm = "{\n" +
" \"operator\": {\n" +
// " \"psnAccount\":\"18209231185\"\n" +
" \"psnAccount\": \"" + psnAccount + "\"\n" +
" }\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 获取合同文件用印链接
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
String signFlowId = sealSignRecord.getSignFlowid();
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
String psnAccount = sealSignRecord.getOrgnizeNamePsnAccount();
String orgName = sealSignRecord.getOrgnizeName();
String jsonParm = "{\n" +
// " \"needLogin\": true,\n" +
" \"operator\": {\n" +
// " \"psnAccount\":\"17691338406\"\n" +
" \"psnAccount\": \"" + psnAccount + "\"\n" +
" },\n" +
" \"organization\": {\n" +
// " \"orgName\": \"西安云美电子科技有限公司\"\n" +
" \"orgName\": \"" + orgName + "\"\n" +
" }\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 获取文件签名印章位置
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignDemoException {
String fileId = sealSignRecord.getFileid();
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
String jsonParm = "{\n" +
" \"keywords\": [\n" +
" \"仲裁员:\",\n" +
" \"(仲裁委员会盖章)\"\n" +
" ]\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
}
@@ -1,64 +0,0 @@
package com.ruoyi.common.utils;
/**
* @author wangqiong
* @description 获取微信小程序url scheme
* @date 2023-10-13 10:16
*/
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
public class WxAppletNotifyUtils {
/**
* scheme 跳转微信小程序,需中转H5
*/
public static String jumpAppletSchemeUrl(){
String token= getAccessToken();
//接口地址
String url = "https://api.weixin.qq.com/wxa/generatescheme?access_token="+token;
JSONObject body = JSONUtil.createObj();
JSONObject jumpWxa = JSONUtil.createObj();
jumpWxa.putOpt("path","pages/login");
jumpWxa.putOpt("query","");
jumpWxa.putOpt("env_version","release");
body.putOpt("jump_wxa",jumpWxa);
//链接过期类型:0时间戳 1间隔天数
body.putOpt("expire_type",1);
body.putOpt("is_expire",true);
//指定失效天数,最多30
body.putOpt("expire_interval",30);
String post = HttpUtil.post(url,body.toJSONString(2));
JSONObject result = JSONUtil.parseObj(post);
if(result!=null && result.containsKey("openlink")){
return result.getStr("openlink");
}
return null;
}
//凭证调用
public static String getAccessToken(){
String token;
//小程序APPID
String appid="wx91cb8459dca561b4";//自行获取
//小程序secret
String secret="190aaa3bda96a65d25318fbb0e133fc6";//自己去公众号后台获取
String httpUrl="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
httpUrl= httpUrl+"&appid="+appid+"&secret="+secret;
//get请求
String result = HttpUtil.get(httpUrl);
//解析结果
JSONObject jsonObject = JSONUtil.parseObj(result);
//get AccessToken
token=jsonObject.get("access_token",String.class,false);
return token;
}
}
@@ -0,0 +1,161 @@
package com.ruoyi.common.utils.bean;
import com.ruoyi.common.core.domain.BaseEntity;
public class SealSignRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 文件id */
private String fileid;
/** 文件名称 */
private String filename;
/** 流程id */
private String signFlowid;
/** 签名人账户 */
private String pensonAccount;
/** 签名人姓名 */
private String pensonName;
/** 机构名称 */
private String orgnizeName;
/** 机构经办人 */
private String orgnizeNamePsnAccount;
/** 机构经办人名称 */
private String orgnizeNamepsnName;
public String getFileid() {
return fileid;
}
public void setFileid(String fileid) {
this.fileid = fileid;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getSignFlowid() {
return signFlowid;
}
public void setSignFlowid(String signFlowid) {
this.signFlowid = signFlowid;
}
public String getPensonAccount() {
return pensonAccount;
}
public void setPensonAccount(String pensonAccount) {
this.pensonAccount = pensonAccount;
}
public String getPensonName() {
return pensonName;
}
public void setPensonName(String pensonName) {
this.pensonName = pensonName;
}
public String getOrgnizeName() {
return orgnizeName;
}
public void setOrgnizeName(String orgnizeName) {
this.orgnizeName = orgnizeName;
}
public String getOrgnizeNamePsnAccount() {
return orgnizeNamePsnAccount;
}
public void setOrgnizeNamePsnAccount(String orgnizeNamePsnAccount) {
this.orgnizeNamePsnAccount = orgnizeNamePsnAccount;
}
public String getOrgnizeNamepsnName() {
return orgnizeNamepsnName;
}
public void setOrgnizeNamepsnName(String orgnizeNamepsnName) {
this.orgnizeNamepsnName = orgnizeNamepsnName;
}
public String getPositionPagepsn() {
return positionPagepsn;
}
public void setPositionPagepsn(String positionPagepsn) {
this.positionPagepsn = positionPagepsn;
}
public double getPositionXpsn() {
return positionXpsn;
}
public void setPositionXpsn(double positionXpsn) {
this.positionXpsn = positionXpsn;
}
public double getPositionYpsn() {
return positionYpsn;
}
public void setPositionYpsn(double positionYpsn) {
this.positionYpsn = positionYpsn;
}
public String getPositionPageorg() {
return positionPageorg;
}
public void setPositionPageorg(String positionPageorg) {
this.positionPageorg = positionPageorg;
}
public double getPositionXorg() {
return positionXorg;
}
public void setPositionXorg(double positionXorg) {
this.positionXorg = positionXorg;
}
public double getPositionYorg() {
return positionYorg;
}
public void setPositionYorg(double positionYorg) {
this.positionYorg = positionYorg;
}
/** 签名位置页数 */
private String positionPagepsn;
/** 签名位置x坐标 */
private double positionXpsn;
/** 签名位置y坐标 */
private double positionYpsn;
/** 印章位置页数 */
private String positionPageorg;
/** 印章位置x坐标 */
private double positionXorg;
/** 印章位置y坐标 */
private double positionYorg;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
@@ -1,135 +0,0 @@
package com.ruoyi.common.utils.file;
import cn.hutool.json.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.ruoyi.common.config.EsignDemoConfig;
import com.ruoyi.common.constant.EsignHeaderConstant;
import com.ruoyi.common.constant.FileTransformation;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
import com.ruoyi.common.enums.EsignRequestType;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.utils.EsignHttpHelper;
import com.ruoyi.common.utils.bean.EsignFileBean;
import com.ruoyi.common.utils.uuid.IdUtils;
import java.time.LocalDate;
import java.util.Map;
public class SaaSAPIFileUtils {
private static String eSignHost= EsignDemoConfig.EsignHost;
private static String eSignAppId= EsignDemoConfig.EsignAppId;
private static String eSignAppSecret=EsignDemoConfig.EsignAppSecret;
/**
* 获取文件上传地址
*/
public static EsignHttpResponse getUploadUrl(String filePath) throws EsignDemoException {
//自定义的文件封装类,传入文件地址可以获取文件的名称大小,文件流等数据
EsignFileBean esignFileBean = new EsignFileBean(filePath);
String apiaddr = "/v3/files/file-upload-url";
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm = "{\n" +
" \"contentMd5\": \"" + esignFileBean.getFileContentMD5() + "\",\n" +
" \"fileName\":\"" + esignFileBean.getFileName() + "\"," +
" \"fileSize\": " + esignFileBean.getFileSize() + ",\n" +
" \"convertToPDF\":" +true+ ",\n" +
" \"contentType\": \"" + EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE() + "\"\n" +
"}";
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, true);
}
/**
* 上传文件流
*/
public static EsignHttpResponse uploadFile(String uploadUrl,String filePath) throws EsignDemoException {
//根据文件地址获取文件contentMd5
EsignFileBean esignFileBean = new EsignFileBean(filePath);
//请求方法
EsignRequestType requestType= EsignRequestType.PUT;
return EsignHttpHelper.doUploadHttp(uploadUrl,requestType,esignFileBean.getFileBytes(),esignFileBean.getFileContentMD5(), EsignHeaderConstant.CONTENTTYPE_STREAM.VALUE(),true);
}
/**
* 获取文件上传状态
*/
public static EsignHttpResponse getFileStatus(String fileId) throws EsignDemoException {
String apiaddr="/v3/files/"+fileId;
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm=null;
//请求方法
EsignRequestType requestType= EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
}
/**
* 下载已签署文件及附属材料
*/
public static EsignHttpResponse fileDownloadUrl(String signFlowId) throws EsignDemoException {
String apiaddr = "/v3/sign-flow/"+ signFlowId +"/file-download-url";
//请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
String jsonParm=null;
//请求方法
EsignRequestType requestType= EsignRequestType.GET;
//生成签名鉴权方式的的header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId,eSignAppSecret,jsonParm,requestType.name(),apiaddr,true);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,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,6 +115,4 @@ public interface SysDeptMapper
* @return 结果
*/
public int deleteDeptById(Long deptId);
List<Long> selectUserDeptListByRoleId(@Param("roleId")Long roleId);
}
@@ -1,8 +1,6 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysUser;
@@ -21,12 +19,6 @@ public interface SysUserMapper
*/
public List<SysUser> selectUserList(SysUser sysUser);
/**
* 查询仲裁员角色下的用户
* @return
*/
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
/**
* 根据条件分页查询已配用户角色列表
*
@@ -132,6 +124,4 @@ public interface SysUserMapper
* @return 结果
*/
public SysUser checkEmailUnique(String email);
List<SysUser> selectUserListByIds(@Param("idList") List<Long> idList);
}
@@ -2,7 +2,6 @@ package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
/**
* 用户 业务层
@@ -18,7 +17,6 @@ public interface ISysUserService
* @return 用户信息集合信息
*/
public List<SysUser> selectUserList(SysUser user);
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator);
/**
* 根据条件分页查询已分配用户角色列表
@@ -4,8 +4,6 @@ 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;
@@ -76,11 +74,6 @@ public class SysUserServiceImpl implements ISysUserService
return userMapper.selectUserList(user);
}
@Override
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
return userMapper.selectUserListByAdRole(arbitrator);
}
/**
* 根据条件分页查询已分配用户角色列表
*
@@ -15,14 +15,6 @@ public class CaseAffiliate extends BaseEntity {
/** 姓名 */
@Excel(name = "姓名")
private String name;
/**
* 申请机构id
*/
private String applicationOrganId;
/**
* 申请机构名称
*/
private String applicationOrganName;
/** 身份证号 */
@Excel(name = "身份证号")
private String identityNum;
@@ -57,22 +49,6 @@ 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,16 +101,6 @@ 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;
@@ -124,52 +114,6 @@ 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;
@@ -236,39 +180,6 @@ 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;
@@ -421,14 +332,10 @@ 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;
/** 联系电话 */
@@ -508,14 +415,6 @@ public class CaseApplication extends BaseEntity {
this.name = name;
}
public String getNameId() {
return nameId;
}
public void setNameId(String nameId) {
this.nameId = nameId;
}
public String getIdentityNum() {
return identityNum;
}
@@ -27,7 +27,7 @@ public class CaseAttach {
*/
private String annexPath;
/**
* 附件类型,立案申请书(1)、申请人证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)、被申请人证据材料 (6)、庭审笔录(7)、缴费凭证(8)'
* 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
*/
private Integer annexType;
/**
@@ -25,15 +25,6 @@ public class CaseLogRecord extends BaseEntity {
/** 案件编号 */
private String caseNum;
/**
* 展示的内容
*/
private String content;
/**
* 用户昵称
*/
private String createNickName;
public String getCaseNum() {
return caseNum;
@@ -59,7 +50,7 @@ public class CaseLogRecord extends BaseEntity {
this.caseAppliId = caseAppliId;
}
public Integer getCaseNode() {
public int getCaseNode() {
return caseNode;
}
@@ -82,24 +73,4 @@ public class CaseLogRecord extends BaseEntity {
public void setNotes(String notes) {
this.notes = notes;
}
public void setCaseNode(Integer caseNode) {
this.caseNode = caseNode;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCreateNickName() {
return createNickName;
}
public void setCreateNickName(String nickName) {
this.createNickName = nickName;
}
}
@@ -38,8 +38,4 @@ public class CasePaymentRecord {
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
}
@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity;
public class SealSignRecord extends BaseEntity {
public class SealSignRecord extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
@@ -24,79 +24,6 @@ public class SealSignRecord extends BaseEntity {
/** 机构经办人名称 */
private String orgnizeNamepsnName;
String fileDownloadUrl;
public String getFileDownloadUrl() {
return fileDownloadUrl;
}
public void setFileDownloadUrl(String fileDownloadUrl) {
this.fileDownloadUrl = fileDownloadUrl;
}
/** 流程状态 */
private Integer signFlowStatus;
/** 签名状态 */
private Integer psnsignStatus;
/** 用印状态 */
private Integer orgsignStatus;
/** 签名链接 */
private String signUrl;
public String getSignUrl() {
return signUrl;
}
public void setSignUrl(String signUrl) {
this.signUrl = signUrl;
}
public String getSealUrl() {
return sealUrl;
}
public void setSealUrl(String sealUrl) {
this.sealUrl = sealUrl;
}
/** 用印链接 */
private String sealUrl;
private Long caseAppliId;
public Long getCaseAppliId() {
return caseAppliId;
}
public void setCaseAppliId(Long caseAppliId) {
this.caseAppliId = caseAppliId;
}
public Integer getPsnsignStatus() {
return psnsignStatus;
}
public void setPsnsignStatus(Integer psnsignStatus) {
this.psnsignStatus = psnsignStatus;
}
public Integer getOrgsignStatus() {
return orgsignStatus;
}
public void setOrgsignStatus(Integer orgsignStatus) {
this.orgsignStatus = orgsignStatus;
}
public Integer getSignFlowStatus() {
return signFlowStatus;
}
public void setSignFlowStatus(Integer signFlowStatus) {
this.signFlowStatus = signFlowStatus;
}
public String getFileid() {
return fileid;
}
@@ -222,7 +149,6 @@ public class SealSignRecord extends BaseEntity {
/** 印章位置y坐标 */
private double positionYorg;
public Long getId() {
return id;
}
@@ -1,28 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* 案件确认缴费传入对象
*/
@Data
public class CaseConfirmPayDTO {
/**
* 案件id
*/
@NotNull(message = "案件id不能为空")
private Long caseId;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
}
@@ -1,10 +1,6 @@
package com.ruoyi.wisdomarbitrate.domain.dto;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import lombok.Data;
import java.util.List;
/**
* 案件缴费传入对象
*/
@@ -27,12 +23,4 @@ public class CasePayDTO {
* 支付方式 wxpay(微信) alipay(支付宝)
*/
private String platform;
/**
* 支付方式 0线上支付,1线下支付
*/
private Integer payType;
/**
* 缴费凭证
*/
private List<CaseAttach> payOrderList;
}
@@ -1,24 +0,0 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.mapper.CaseLogRecordMapper;
import lombok.Data;
import java.util.List;
@Data
public class ArchivesDetailVO {
/**
* 案件信息
*/
private CaseApplication caseApplication;
/**
* 案件日志信息
*/
private List<CaseLogRecord> caseLogRecordList;
/**
* 快递信息
*/
private List<LogisticsInfoVO> logisticsInfoVOList;
}
@@ -0,0 +1,29 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
import java.util.Date;
/**
* @description 案件操作日志实体
* @Author wangqiong
* @Date 2023/10/09 15:18
* @Version V1.0
**/
@Data
public class CaseLogVO {
/**日志id*/
private String logId;
/**操作人id*/
private String operatorId;
/**操作人名称*/
private String operatorName;
/**操作人ip*/
private String ip;
/**操作时间*/
private Date operateTime;
/**操作明细*/
private String operateDetail;
/**操作类型*/
private String operateType;
}
@@ -1,24 +0,0 @@
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,12 +1,10 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ArbitratorMapper {
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
}
@@ -2,7 +2,6 @@ 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;
@@ -16,7 +15,6 @@ public interface CaseAffiliateMapper {
List<CaseAffiliate> selectCaseAffiliate(CaseAffiliate caseAffiliate);
CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
int updataCaseAffiliate(CaseAffiliate caseAffiliate);
}
@@ -1,9 +1,7 @@
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;
@@ -13,13 +11,6 @@ public interface CaseApplicationMapper {
int selectCaseApplicationCount(CaseApplication caseApplication);
/**
* 查询超级管理员案件
* @param caseApplication
* @return
*/
List<CaseApplication> selectAdminCaseApplicationList(CaseApplication caseApplication);
int insertCaseApplication(CaseApplication caseApplication);
@@ -40,17 +31,4 @@ 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,7 +2,6 @@ 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;
@@ -15,7 +14,4 @@ public interface CaseAttachMapper {
int updateCaseAttach(CaseAttach caseAttach);
int updateCaseAttachBycaseid(CaseAttach caseAttach);
}
@@ -8,6 +8,4 @@ public interface CasePaymentRecordMapper {
CasePaymentRecord queryRecord(String orderNumber);
void update(CasePaymentRecord casePaymentRecord);
CasePaymentRecord selectRecordByCaseId(Long id);
}
@@ -1,18 +0,0 @@
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);
}
@@ -2,16 +2,13 @@ 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);
List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication);
AjaxResult getLogisticsInfo(CaseApplication caseApplication);
AjaxResult signature(CaseApplication caseApplication);
@@ -19,7 +16,4 @@ public interface IAdjudicationService {
AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
AjaxResult stamp(CaseApplication caseApplication);
AjaxResult getArchivesDetail(Long id);
}
@@ -1,11 +1,6 @@
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;
@@ -42,14 +37,4 @@ 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,7 +3,6 @@ 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 {
@@ -13,11 +12,4 @@ public interface ICasePaymentService {
AjaxResult casePay(CasePayDTO casePayDTO);
AjaxResult confirmPayment(CaseApplication caseApplication);
/**
* 确认缴费
* @param payDTO
* @return
*/
AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
}
@@ -1,34 +1,15 @@
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);
/**
* 获取Eidtoken
*
* @return
*/
JSONObject selectIdentityAuthenticaEIDtoken();
IdentityAuthentication selectIdentityAuthenticaEIDtoken();
/**
* 小程序人脸核身后查询身份认证结果
*
* @param ientityAuthentication
* @return
*/
AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
IdentityAuthentication selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
}
@@ -2,13 +2,12 @@ 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;
@@ -16,8 +15,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;
@@ -33,6 +32,7 @@ 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,11 +52,8 @@ 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<>();
@@ -119,6 +116,20 @@ 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());
@@ -127,9 +138,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;
@@ -189,12 +200,9 @@ 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;
System.out.println("原文件路径是:" + path);
String newpath = path.replace("/", "\\");
System.out.println("新文件路径是:" + newpath);
File file = new File(newpath);
System.out.println("新文件是:" + file);
String path = "/home/ruoyi/" + annexPath;
File file = new File(path);
System.out.println("文件是:" + file);
fileList.add(file);
}
}
@@ -240,7 +248,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
@Override
public List<LogisticsInfoVO> getLogisticsInfo(CaseApplication caseApplication) {
public AjaxResult getLogisticsInfo(CaseApplication caseApplication) {
try {
//快递单号查询
String key = "729437f92468910aee6c12dbfeaee3c1";
@@ -285,11 +293,11 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
} else {
// 请求失败
return null;
return AjaxResult.error("请求失败,错误码:" + responseCode);
}
}
}
return logisticsInfoVOList;
return AjaxResult.success(logisticsInfoVOList);
}
} catch (IOException e) {
e.printStackTrace();
@@ -302,9 +310,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
}
@@ -313,9 +318,6 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
return AjaxResult.success("归档成功,案件状态已改为已归档");
}
@@ -347,102 +349,23 @@ 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);//System.out.println("这是文件"+file);
List<File> fileList = new ArrayList<>();
fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
File file = fileList.get(0);
//电子邮件送达
// 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();
}
}
}
@@ -2,24 +2,21 @@ 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.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.*;
import java.util.List;
@Service
public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
@@ -31,8 +28,6 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
private CaseLogRecordMapper caseLogRecordMapper;
@Autowired
private ArbitrateRecordMapper arbitrateRecordMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Override
@Transactional
@@ -49,30 +44,18 @@ 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);
@@ -104,23 +87,21 @@ 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 = arbitrateRecord.getCreateBy();
String createBy = caseApplication1.getCreateBy();
if (createBy!=null){
arbitrateRecord.setCreateBy(createBy);
}
//先判断案件是否已经提交过仲裁结果
ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
if (arbitrateRecord1!=null){
@@ -134,9 +115,10 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
caseLogRecord.setCreateBy(createBy);
}
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
//修改案件状态
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
caseApplicationMapper.submitCaseApplication(caseApplication);
return AjaxResult.success("提交成功");
}
}else {
//提交仲裁结果
@@ -151,116 +133,12 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
caseLogRecord.setCreateBy(createBy);
}
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.GENERATED_ARBITRATION,"");
//修改案件状态
caseApplication.setCaseStatus(CaseApplicationConstants.GENERATED_ARBITRATION);
caseApplicationMapper.submitCaseApplication(caseApplication);
return AjaxResult.success("提交成功");
}
}
//生成庭审笔录
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("裁决书生成异常");
}
return AjaxResult.error("暂无需要提交仲裁结果的案件");
}
}
@@ -3,10 +3,6 @@ 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;
@@ -101,7 +97,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
.userName(userName)
.build();
int count = caseAttachMapper.save(caseAttach);
if (count > 0 && annexType!=null && annexType!=8) {
if (count > 0) {
if(id!=null){
//修改案件状态
CaseApplication caseApplication = new CaseApplication();
@@ -123,21 +119,8 @@ 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);
}
@@ -147,9 +130,6 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
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("暂无需要确认的证据");
@@ -185,9 +165,15 @@ IdentityAuthenticationMapper identityAuthenticationMapper;
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT,"");
//案件日志表里添加数据
CaseLogRecord caseLogRecord = new CaseLogRecord();
caseLogRecord.setCaseAppliId(caseApplication1.getId());
caseLogRecord.setCaseNode(caseStatus);
String createBy = caseApplication1.getCreateBy();
if (createBy != null) {
caseLogRecord.setCreateBy(createBy);
}
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
return AjaxResult.success("提交成功");
}
}
@@ -1,9 +1,5 @@
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;
@@ -20,24 +16,7 @@ public class CaseLogRecordServiceImpl implements ICaseLogRecordService {
@Override
public List<CaseLogRecord> selectCaseLogRecordList(CaseLogRecord 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;
return caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
}
@@ -1,16 +1,9 @@
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;
@@ -26,6 +19,7 @@ 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;
@@ -35,8 +29,6 @@ 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
@@ -86,7 +78,13 @@ 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("支付成功");
}
@@ -129,36 +127,9 @@ 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("确认缴费成功");
}
}
@@ -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.core.domain.model.LoginUser;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.exceptions.TradeException;
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.GetEidResultRequest;
import com.tencentcloudapi.faceid.v20180301.models.GetEidResultResponse;
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenRequest;
import com.tencentcloudapi.faceid.v20180301.models.GetEidTokenResponse;
import com.tencentcloudapi.faceid.v20180301.models.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -29,10 +29,15 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
@Service
public class IdentityAuthenticationServiceImpl implements IdentityAuthenticationService {
public class IdentityAuthenticationServiceImpl implements IdentityAuthenticationService {
@Value("${identityAuthentication.credentialSecretId}")
private String credentialSecretId;
@@ -53,9 +58,9 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
@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);
@@ -65,157 +70,86 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
}
/**
* 检查是否已经认证的用户
*
* @param identityAuthentication
* @return
*/
@Override
public String checkIsAuthentication(IdentityAuthentication identityAuthentication) {
IdentityAuthentication identityAuthenticationselect = identityAuthenticationMapper.selectIdentityAuthentication(identityAuthentication);
if (identityAuthenticationselect != null) {
return "1";
} else {
return "0";
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异常");
}
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 AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication) {
public IdentityAuthentication 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);
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("认证记录新增失败");
}
// reqest.setInfoType("1");
// reqest.setInfoType("13");
// reqest.setInfoType("2");
}
//获得身份认证结果
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 null;
return IdentityAuthenticationResult;
}
}
@@ -1,42 +0,0 @@
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);
}
}
@@ -1,6 +1,6 @@
package com.ruoyi.common.config;
package com.ruoyi.wisdomarbitrate.utils;
public class EsignDemoConfig {
public class EsignApplicaConfig {
// 应用ID
public static final String EsignAppId = "7438987614";
@@ -1,4 +1,4 @@
package com.ruoyi.common.core.domain.entity;
package com.ruoyi.wisdomarbitrate.utils;
/**
* esignSDK-core信息类
* @author 澄泓
@@ -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.common.constant;
import com.ruoyi.common.exception.EsignDemoException;
package com.ruoyi.wisdomarbitrate.utils;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.message.BasicNameValuePair;
@@ -26,9 +26,6 @@ import java.util.*;
/**
* @description 请求数据通用处理类
* @author 澄泓
* @date 2020年10月22日 下午14:25:31
* @since JDK1.7
*/
public class EsignEncryption {
@@ -43,7 +40,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 EsignDemoException {
public static String appendSignDataString(String httpMethod, String contentMd5,String accept,String contentType,String headers,String date, String url) throws EsignInterfacException {
StringBuffer sb = new StringBuffer();
sb.append(httpMethod).append("\n").append(accept).append("\n").append(contentMd5).append("\n")
.append(contentType).append("\n");
@@ -65,9 +62,9 @@ public class EsignEncryption {
* Content-MD5的计算方法
* @param str 待计算的消息
* @return MD5计算后摘要值的Base64编码(ContentMD5)
* @throws EsignDemoException 加密过程中的异常信息
* @throws EsignInterfacException 加密过程中的异常信息
*/
public static String doContentMD5(String str) throws EsignDemoException {
public static String doContentMD5(String str) throws EsignInterfacException {
byte[] md5Bytes = null;
MessageDigest md5 = null;
String contentMD5 = null;
@@ -81,7 +78,7 @@ public class EsignEncryption {
contentMD5 = Base64.encodeBase64String(md5Bytes);
} catch (NoSuchAlgorithmException e) {
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
ex.initCause(e);
throw ex;
} catch (UnsupportedEncodingException e) {
@@ -95,9 +92,9 @@ public class EsignEncryption {
* @param message 待签名字符串
* @param secret 密钥APP KEY
* @return reqSignature HmacSHA256计算后摘要值的Base64编码
* @throws EsignDemoException 加密过程中的异常信息
* @throws EsignInterfacException 加密过程中的异常信息
*/
public static String doSignatureBase64(String message, String secret) throws EsignDemoException {
public static String doSignatureBase64(String message, String secret) throws EsignInterfacException {
String algorithm = "HmacSHA256";
Mac hmacSha256;
String digestBase64 = null;
@@ -111,11 +108,11 @@ public class EsignEncryption {
// 把摘要后的结果digestBytes使用Base64进行编码
digestBase64 = Base64.encodeBase64String(digestBytes);
} catch (NoSuchAlgorithmException e) {
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
ex.initCause(e);
throw ex;
} catch (InvalidKeyException e) {
EsignDemoException ex = new EsignDemoException("无效的密钥规范",e);
EsignInterfacException ex = new EsignInterfacException("无效的密钥规范",e);
ex.initCause(e);
throw ex;
} catch (UnsupportedEncodingException e) {
@@ -154,7 +151,7 @@ public class EsignEncryption {
* hash散列加密算法
* @return
*/
public static String Hmac_SHA256(String message,String key) throws EsignDemoException {
public static String Hmac_SHA256(String message,String key) throws EsignInterfacException {
byte[] rawHmac=null;
try {
SecretKeySpec sk = new SecretKeySpec(key.getBytes(), "HmacSHA256");
@@ -162,15 +159,15 @@ public class EsignEncryption {
mac.init(sk);
rawHmac = mac.doFinal(message.getBytes());
}catch (InvalidKeyException e){
EsignDemoException ex = new EsignDemoException("无效的密钥规范",e);
EsignInterfacException ex = new EsignInterfacException("无效的密钥规范",e);
ex.initCause(e);
throw ex;
} catch (NoSuchAlgorithmException e) {
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
ex.initCause(e);
throw ex;
}catch (Exception e){
EsignDemoException ex = new EsignDemoException("hash散列加密算法报错",e);
EsignInterfacException ex = new EsignInterfacException("hash散列加密算法报错",e);
ex.initCause(e);
throw ex;
}finally {
@@ -182,14 +179,14 @@ public class EsignEncryption {
/**
* MD5加密32位
*/
public static String MD5Digest(String text) throws EsignDemoException {
public static String MD5Digest(String text) throws EsignInterfacException {
byte[] digest=null;
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(text.getBytes());
digest = md5.digest();
}catch (NoSuchAlgorithmException e){
EsignDemoException ex = new EsignDemoException("不支持此算法",e);
EsignInterfacException ex = new EsignInterfacException("不支持此算法",e);
ex.initCause(e);
throw ex;
}finally {
@@ -236,7 +233,7 @@ public class EsignEncryption {
* @return 排序后的API接口地址
* @throws Exception
*/
public static String sortApiUrl(String apiUrl) throws EsignDemoException {
public static String sortApiUrl(String apiUrl) throws EsignInterfacException {
if (!apiUrl.contains("?")) {
return apiUrl;
@@ -258,7 +255,7 @@ public class EsignEncryption {
String value = str.substring(index + 1);
if (queryParamsMap.containsKey(key)) {
String msg = MessageFormat.format("请求URL中的Query参数的{0}重复", key);
throw new EsignDemoException(msg);
throw new EsignInterfacException(msg);
}
queryParamsMap.put(key, value);
}
@@ -300,9 +297,9 @@ public class EsignEncryption {
*获取query
* @param apiUrl
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static ArrayList<BasicNameValuePair> getQuery(String apiUrl) throws EsignDemoException {
public static ArrayList<BasicNameValuePair> getQuery(String apiUrl) throws EsignInterfacException {
ArrayList<BasicNameValuePair> BasicNameValuePairList = new ArrayList<>();
if (!apiUrl.contains("?")) {
@@ -321,7 +318,7 @@ public class EsignEncryption {
String value = str.substring(index + 1);
if (queryParamsMap.containsKey(key)) {
String msg = MessageFormat.format("请求URL中的Query参数的{0}重复", key);
throw new EsignDemoException(msg);
throw new EsignInterfacException(msg);
}
BasicNameValuePairList.add(new BasicNameValuePair(key,value));
queryParamsMap.put(key, value);
@@ -1,8 +1,4 @@
package com.ruoyi.common.utils.bean;
import com.ruoyi.common.constant.FileTransformation;
import com.ruoyi.common.exception.EsignDemoException;
package com.ruoyi.wisdomarbitrate.utils;
import java.io.File;
@@ -23,12 +19,12 @@ public class EsignFileBean {
private String filePath;
public EsignFileBean(String filePath) throws EsignDemoException {
public EsignFileBean(String filePath) throws EsignInterfacException {
this.filePath=filePath;
this.fileContentMD5 = FileTransformation.getFileContentMD5(filePath);
File file = new File(filePath);
if (!file.exists()) {
throw new EsignDemoException("文件不存在");
throw new EsignInterfacException("文件不存在");
}
this.fileName = file.getName();
this.fileSize = (int) file.length();
@@ -49,9 +45,9 @@ public class EsignFileBean {
/**
* 传入本地文件地址获取二进制数据
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public byte[] getFileBytes() throws EsignDemoException {
public byte[] getFileBytes() throws EsignInterfacException {
return FileTransformation.fileToBytes(filePath);
}
}
@@ -1,4 +1,4 @@
package com.ruoyi.common.constant;
package com.ruoyi.wisdomarbitrate.utils;
/**
* @description 头部信息常量
* @author 澄泓
@@ -9,10 +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.common.constant;
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
import com.ruoyi.common.enums.EsignRequestType;
import com.ruoyi.common.exception.EsignDemoException;
package com.ruoyi.wisdomarbitrate.utils;
import org.apache.http.*;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
@@ -24,7 +22,6 @@ 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;
@@ -40,7 +37,6 @@ 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;
@@ -53,15 +49,12 @@ 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 {
@@ -233,16 +226,16 @@ public class EsignHttpCfgHelper {
* @param param
* {@link Object} 参数
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
* @author 澄泓
*/
public static EsignHttpResponse sendHttp(EsignRequestType reqType, String httpUrl, Map<String, String> headers, Object param, boolean debug)
throws EsignDemoException {
throws EsignInterfacException {
HttpRequestBase reqBase=null;
if(httpUrl.startsWith("http")){
reqBase=reqType.getHttpType(httpUrl);
}else{
throw new EsignDemoException("请求url地址格式错误");
throw new EsignInterfacException("请求url地址格式错误");
}
if(debug){
LOGGER.info("请求头:{}",headers+"\n");
@@ -295,29 +288,29 @@ public class EsignHttpCfgHelper {
LOGGER.info("----------------------------end------------------------");
}
} catch (NoHttpResponseException e) {
throw new EsignDemoException("服务器丢失了",e);
throw new EsignInterfacException("服务器丢失了",e);
} catch (SSLHandshakeException e){
String msg = MessageFormat.format("SSL握手异常", e);
EsignDemoException ex = new EsignDemoException(msg, e);
EsignInterfacException ex = new EsignInterfacException(msg, e);
throw ex;
} catch (UnknownHostException e){
EsignDemoException ex = new EsignDemoException("服务器找不到", e);
EsignInterfacException ex = new EsignInterfacException("服务器找不到", e);
ex.initCause(e);
throw ex;
} catch(ConnectTimeoutException e){
EsignDemoException ex = new EsignDemoException("连接超时", e);
EsignInterfacException ex = new EsignInterfacException("连接超时", e);
ex.initCause(e);
throw ex;
} catch(SSLException e){
EsignDemoException ex = new EsignDemoException("SSL异常",e);
EsignInterfacException ex = new EsignInterfacException("SSL异常",e);
ex.initCause(e);
throw ex;
} catch (ClientProtocolException e) {
EsignDemoException ex = new EsignDemoException("请求头异常",e);
EsignInterfacException ex = new EsignInterfacException("请求头异常",e);
ex.initCause(e);
throw ex;
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("网络请求失败",e);
EsignInterfacException ex = new EsignInterfacException("网络请求失败",e);
ex.initCause(e);
throw ex;
} finally {
@@ -325,7 +318,7 @@ public class EsignHttpCfgHelper {
try {
res.close();
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("--->>关闭请求响应失败",e);
EsignInterfacException ex = new EsignInterfacException("--->>关闭请求响应失败",e);
ex.initCause(e);
throw ex;
}
@@ -365,7 +358,7 @@ public class EsignHttpCfgHelper {
* @return
* @author 澄泓
*/
private static void cfgPoolMgr() throws EsignDemoException {
private static void cfgPoolMgr() throws EsignInterfacException {
ConnectionSocketFactory plainsf = PlainConnectionSocketFactory.getSocketFactory();
LayeredConnectionSocketFactory sslsf = SSLConnectionSocketFactory.getSocketFactory();
if(!SSL_VERIFY){
@@ -438,7 +431,7 @@ public class EsignHttpCfgHelper {
/**
* 忽略域名校验
*/
private static SSLConnectionSocketFactory sslConnectionSocketFactory() throws EsignDemoException {
private static SSLConnectionSocketFactory sslConnectionSocketFactory() throws EsignInterfacException {
try {
SSLContext ctx = SSLContext.getInstance("TLS"); // 创建一个上下文(此处指定的协议类型似乎不是重点)
X509TrustManager tm = new X509TrustManager() { // 创建一个跳过SSL证书的策略
@@ -455,7 +448,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){
EsignDemoException ex = new EsignDemoException("忽略域名校验失败",e);
EsignInterfacException ex = new EsignInterfacException("忽略域名校验失败",e);
ex.initCause(e);
throw ex;
}
@@ -468,7 +461,7 @@ public class EsignHttpCfgHelper {
* @return
* @author 澄泓
*/
private static synchronized CloseableHttpClient getHttpClient() throws EsignDemoException {
private static synchronized CloseableHttpClient getHttpClient() throws EsignInterfacException {
if(httpClient==null) {
CredentialsProvider credsProvider = new BasicCredentialsProvider();
credsProvider.setCredentials(new AuthScope(PROXY_IP,PROXY_PORT),new UsernamePasswordCredentials(PROXY_USERNAME, PROXY_PASSWORD));
@@ -1,13 +1,5 @@
package com.ruoyi.common.utils;
package com.ruoyi.wisdomarbitrate.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;
@@ -36,13 +28,11 @@ public class EsignHttpHelper {
* @param url 请求路径
* @param paramStr 请求参数
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
* @author 澄泓
*/
public static EsignHttpResponse doCommHttp(String host, String url, EsignRequestType reqType, Object paramStr , Map<String,String> httpHeader, boolean debug) throws EsignDemoException {
public static EsignHttpResponse doCommHttp(String host, String url,EsignRequestType reqType, Object paramStr ,Map<String,String> httpHeader,boolean debug) throws EsignInterfacException {
return EsignHttpCfgHelper.sendHttp(reqType, host+url,httpHeader, paramStr, debug);
}
@@ -55,11 +45,11 @@ public class EsignHttpHelper {
* @param fileContentMd5 文件fileContentMd5
* @param contentType 文件MIME类型
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
* @author 澄泓
*/
public static EsignHttpResponse doUploadHttp( String uploadUrl,EsignRequestType reqType,byte[] param, String fileContentMd5,
String contentType, boolean debug) throws EsignDemoException {
String contentType, boolean debug) throws EsignInterfacException {
Map<String, String> uploadHeader = buildUploadHeader(fileContentMd5, contentType);
if(debug){
LOGGER.info("----------------------------start------------------------");
@@ -96,7 +86,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 EsignDemoException {
public static Map<String,String> signAndBuildSignAndJsonHeader(String projectId, String secret,String paramStr,String httpMethod,String url,boolean debug) throws EsignInterfacException {
String contentMD5="";
//统一转大写处理
httpMethod = httpMethod.toUpperCase();
@@ -105,9 +95,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 EsignDemoException(String.format("不支持的请求方法%s",httpMethod));
throw new EsignInterfacException(String.format("不支持的请求方法%s",httpMethod));
}
//构造一个初步的请求头
Map<String, String> esignHeaderMap = buildSignAndJsonHeader(projectId, contentMD5, EsignHeaderConstant.ACCEPT.VALUE(), EsignHeaderConstant.CONTENTTYPE_JSON.VALUE(), EsignHeaderConstant.AUTHMODE.VALUE());
@@ -137,7 +127,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,6 +1,9 @@
package com.ruoyi.common.core.domain.entity;
package com.ruoyi.wisdomarbitrate.utils;
/**
* 网络请求的response类
* @author 澄泓
* @date 2022/2/21 17:28
* @version
*/
public class EsignHttpResponse {
private int status;
@@ -1,24 +1,22 @@
package com.ruoyi.common.exception;
package com.ruoyi.wisdomarbitrate.utils;
/**
* description 自定义全局异常
* @author 澄泓
* datetime 2019年7月1日上午10:43:24
*/
public class EsignDemoException extends Exception {
public class EsignInterfacException extends Exception {
private static final long serialVersionUID = 4359180081622082792L;
private Exception e;
public EsignDemoException(String msg) {
public EsignInterfacException(String msg) {
super(msg);
}
public EsignDemoException(String msg, Throwable cause) {
public EsignInterfacException(String msg, Throwable cause) {
super(msg,cause);
}
public EsignDemoException(){
public EsignInterfacException(){
}
@@ -1,4 +1,4 @@
package com.ruoyi.common.enums;
package com.ruoyi.wisdomarbitrate.utils;
import org.apache.http.client.methods.*;
@@ -9,9 +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.common.constant;
package com.ruoyi.wisdomarbitrate.utils;
import com.ruoyi.common.exception.EsignDemoException;
import org.apache.commons.codec.binary.Base64;
import java.io.*;
@@ -23,10 +22,7 @@ import java.util.HashMap;
import java.util.Map;
/**
* @author 澄泓
* @version JDK1.7
* @description 文件转换类
* @date 2020/10/26 10:47
*/
public class FileTransformation {
@@ -35,9 +31,9 @@ public class FileTransformation {
*
* @param srcFilePath 本地文件路径
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static byte[] fileToBytes(String srcFilePath) throws EsignDemoException {
public static byte[] fileToBytes(String srcFilePath) throws EsignInterfacException {
return getBytes(srcFilePath);
}
@@ -46,9 +42,9 @@ public class FileTransformation {
*
* @param filePath 本地文件路径
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static String fileToBase64(String filePath) throws EsignDemoException {
public static String fileToBase64(String filePath) throws EsignInterfacException {
byte[] bytes;
String base64 = null;
bytes = fileToBytes(filePath);
@@ -57,7 +53,7 @@ public class FileTransformation {
return base64;
}
public static void main(String[] args) throws EsignDemoException {
public static void main(String[] args) throws EsignInterfacException {
System.out.println(getFileContentMD5("D:\\文档\\PLT2022-02124CT.pdf"));
}
@@ -66,7 +62,7 @@ public class FileTransformation {
* @param filePath 文件路径
* @return
*/
public static String getFileContentMD5(String filePath) throws EsignDemoException {
public static String getFileContentMD5(String filePath) throws EsignInterfacException {
// 获取文件MD5的二进制数组(128位)
byte[] bytes = getFileMD5Bytes128(filePath);
// 对文件MD5的二进制数组进行base64编码
@@ -79,7 +75,7 @@ public class FileTransformation {
* @param httpUrl 网络文件地址url
* @return
*/
public static boolean downLoadFileByUrl(String httpUrl, String dir) throws EsignDemoException {
public static boolean downLoadFileByUrl(String httpUrl, String dir) throws EsignInterfacException {
InputStream fis = null;
FileOutputStream fileOutputStream = null;
try {
@@ -96,7 +92,7 @@ public class FileTransformation {
fileOutputStream.write(buffer, 0, length);
}
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("获取文件流异常", e);
EsignInterfacException ex = new EsignInterfacException("获取文件流异常", e);
ex.initCause(e);
throw ex;
} finally {
@@ -108,7 +104,7 @@ public class FileTransformation {
fileOutputStream.close();
}
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("关闭文件流异常", e);
EsignInterfacException ex = new EsignInterfacException("关闭文件流异常", e);
ex.initCause(e);
throw ex;
}
@@ -123,7 +119,7 @@ public class FileTransformation {
* @param fileUrl 网络文件地址url
* @return
*/
public static Map fileUrlToBytes(String fileUrl) throws EsignDemoException {
public static Map fileUrlToBytes(String fileUrl) throws EsignInterfacException {
HashMap<String, Object> map = new HashMap<String, Object>();
try {
URL url = new URL(fileUrl);
@@ -148,11 +144,11 @@ public class FileTransformation {
fis.close();
map.put("md5Bytes", md5Bytes);
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("获取文件流异常", e);
EsignInterfacException ex = new EsignInterfacException("获取文件流异常", e);
ex.initCause(e);
throw ex;
} catch (NoSuchAlgorithmException e) {
EsignDemoException ex = new EsignDemoException("文件计算异常", e);
EsignInterfacException ex = new EsignInterfacException("文件计算异常", e);
ex.initCause(e);
throw ex;
}
@@ -163,9 +159,9 @@ public class FileTransformation {
* 获取文件MD5的二进制数组(128位)
* @param filePath
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static byte[] getFileMD5Bytes128(String filePath) throws EsignDemoException {
public static byte[] getFileMD5Bytes128(String filePath) throws EsignInterfacException {
FileInputStream fis = null;
byte[] md5Bytes = null;
try {
@@ -180,15 +176,15 @@ public class FileTransformation {
md5Bytes = md5.digest();
fis.close();
} catch (FileNotFoundException e) {
EsignDemoException ex = new EsignDemoException("文件找不到", e);
EsignInterfacException ex = new EsignInterfacException("文件找不到", e);
ex.initCause(e);
throw ex;
} catch (NoSuchAlgorithmException e) {
EsignDemoException ex = new EsignDemoException("不支持此算法", e);
EsignInterfacException ex = new EsignInterfacException("不支持此算法", e);
ex.initCause(e);
throw ex;
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("输入流或输出流异常", e);
EsignInterfacException ex = new EsignInterfacException("输入流或输出流异常", e);
ex.initCause(e);
throw ex;
} finally {
@@ -196,7 +192,7 @@ public class FileTransformation {
try {
fis.close();
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("关闭文件输入流失败", e);
EsignInterfacException ex = new EsignInterfacException("关闭文件输入流失败", e);
ex.initCause(e);
throw ex;
}
@@ -208,12 +204,12 @@ public class FileTransformation {
/**
* @param path
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
* @description 根据文件路径,获取文件base64
* @author 宫清
* @date 2019年7月21日 下午4:22:08
*/
public static String getBase64Str(String path) throws EsignDemoException {
public static String getBase64Str(String path) throws EsignInterfacException {
InputStream is = null;
try {
is = new FileInputStream(new File(path));
@@ -221,7 +217,7 @@ public class FileTransformation {
is.read(bytes);
return Base64.encodeBase64String(bytes);
} catch (Exception e) {
EsignDemoException ex = new EsignDemoException("获取文件输入流失败", e);
EsignInterfacException ex = new EsignInterfacException("获取文件输入流失败", e);
ex.initCause(e);
throw ex;
} finally {
@@ -229,7 +225,7 @@ public class FileTransformation {
try {
is.close();
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("关闭文件输入流失败", e);
EsignInterfacException ex = new EsignInterfacException("关闭文件输入流失败", e);
ex.initCause(e);
throw ex;
}
@@ -251,12 +247,12 @@ public class FileTransformation {
/**
* @param filePath {@link String} 文件地址
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
* @description 获取文件字节流
* @date 2019年7月10日 上午9:17:00
* @author 宫清
*/
public static byte[] getBytes(String filePath) throws EsignDemoException {
public static byte[] getBytes(String filePath) throws EsignInterfacException {
File file = new File(filePath);
FileInputStream fis = null;
byte[] buffer = null;
@@ -265,7 +261,7 @@ public class FileTransformation {
buffer = new byte[(int) file.length()];
fis.read(buffer);
} catch (Exception e) {
EsignDemoException ex = new EsignDemoException("获取文件字节流失败", e);
EsignInterfacException ex = new EsignInterfacException("获取文件字节流失败", e);
ex.initCause(e);
throw ex;
} finally {
@@ -273,7 +269,7 @@ public class FileTransformation {
try {
fis.close();
} catch (IOException e) {
EsignDemoException ex = new EsignDemoException("关闭文件字节流失败", e);
EsignInterfacException ex = new EsignInterfacException("关闭文件字节流失败", e);
ex.initCause(e);
throw ex;
}
@@ -1,128 +0,0 @@
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,11 +3,6 @@ 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;
@@ -15,18 +10,40 @@ 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 EsignDemoException {
public static void main(String[] args) throws EsignInterfacException {
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);
@@ -53,70 +70,24 @@ 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 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);
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);
}
/**
* 查询签署流程详情
* @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
* @throws EsignInterfacException
*/
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignDemoException {
public static EsignHttpResponse createByFile(SealSignRecord sealSignRecord) throws EsignInterfacException {
String apiaddr = "/v3/sign-flow/create-by-file";
String fileId = sealSignRecord.getFileid();
@@ -137,10 +108,15 @@ 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" +
@@ -167,16 +143,24 @@ 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" +
@@ -184,9 +168,16 @@ 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" +
@@ -199,12 +190,19 @@ 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" +
@@ -213,6 +211,8 @@ public class SignAward {
" \"signFields\": [\n" +
" {\n" +
// " \"fileId\": \"5bd34a81e8084acaab3287c019e82fe8\",\n" +
" \"fileId\": \"" + fileId + "\",\n" +
" \"normalSignFieldConfig\": {\n" +
@@ -221,8 +221,13 @@ 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" +
@@ -247,9 +252,9 @@ public class SignAward {
/**
* 获取合同文件签名链接
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
public static EsignHttpResponse signUrl(SealSignRecord sealSignRecord) throws EsignInterfacException {
String signFlowId = sealSignRecord.getSignFlowid();
String psnAccount = sealSignRecord.getPensonAccount();
@@ -257,6 +262,7 @@ public class SignAward {
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
String jsonParm = "{\n" +
" \"operator\": {\n" +
// " \"psnAccount\":\"18209231185\"\n" +
" \"psnAccount\": \"" + psnAccount + "\"\n" +
" }\n" +
"}";
@@ -271,9 +277,9 @@ public class SignAward {
/**
* 获取合同文件用印链接
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignDemoException {
public static EsignHttpResponse usesealUrl(SealSignRecord sealSignRecord) throws EsignInterfacException {
String signFlowId = sealSignRecord.getSignFlowid();
String apiaddr = "/v3/sign-flow/" + signFlowId + "/sign-url";
@@ -281,11 +287,15 @@ 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" +
@@ -301,9 +311,9 @@ public class SignAward {
/**
* 获取文件签名印章位置
* @return
* @throws EsignDemoException
* @throws EsignInterfacException
*/
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignDemoException {
public static EsignHttpResponse getPositions(SealSignRecord sealSignRecord) throws EsignInterfacException {
String fileId = sealSignRecord.getFileid();
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
String jsonParm = "{\n" +
@@ -86,12 +86,8 @@ 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>
<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 id="insertDept" parameterType="SysDept">
insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
<if test="parentId != null and parentId != 0">parent_id,</if>
@@ -116,7 +112,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,7 +9,6 @@ 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" />
@@ -36,7 +35,6 @@ 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">
@@ -51,7 +49,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,u.id_card
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
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
@@ -59,7 +57,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.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
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
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
@@ -88,7 +86,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.id_card, u.email, u.phonenumber, u.status, u.create_time
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, 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
@@ -105,7 +103,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.id_card, u.email, u.phonenumber, u.status, u.create_time
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, 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
@@ -143,47 +141,13 @@ 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>
@@ -198,7 +162,6 @@ 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>
@@ -217,7 +180,6 @@ 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,4 +37,21 @@
</where>
</select>
</mapper>
@@ -19,15 +19,13 @@
<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.application_organ_id,c.application_organ_name
c.track_num
from case_affiliate c
<where>
<if test="caseAppliId != null ">
@@ -35,28 +33,14 @@
</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,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
insert into case_affiliate(case_appli_id, identity_type,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.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
(#{item.caseAppliId},#{item.identityType},#{item.name},#{item.identityNum},#{item.contactTelphone},
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
#{item.contactTelphoneAgent},#{item.contactAddressAgent})
</foreach>
@@ -69,8 +53,6 @@
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,12 +34,11 @@
<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 '无审理方式'
@@ -50,16 +49,14 @@ select t1.* from(
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 15 then '待仲裁文书送达' when 16 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.name,ca.application_organ_id,ca.application_organ_name as applicantName,
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
c.update_by ,c.update_time , c.arbitrator_name
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}
@@ -74,73 +71,6 @@ select t1.* from(
</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>
@@ -158,7 +88,7 @@ select t1.* from(
<if test="caseNum != null and caseNum != ''">case_num,</if>
<if test="caseSubjectAmount != null">case_subject_amount,</if>
register_date,
<if test="registerDate != null">register_date,</if>
<if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
<if test="caseStatus != null ">case_status,</if>
<if test="hearDate != null ">hear_date,</if>
@@ -179,7 +109,7 @@ select t1.* from(
)values(
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
sysdate(),
<if test="registerDate != null">#{registerDate},</if>
<if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
<if test="caseStatus != null ">#{caseStatus},</if>
<if test="hearDate != null ">#{hearDate},</if>
@@ -246,13 +176,9 @@ select t1.* from(
<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}
@@ -275,10 +201,8 @@ select t1.* from(
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,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
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}
@@ -307,8 +231,7 @@ select t1.* from(
p.payment_status ,
CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
ELSE '无支付状态'
END paymentStatusName,c.pay_type,
CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
END paymentStatusName
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}
@@ -318,9 +241,6 @@ select t1.* from(
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,7 +17,6 @@
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
@@ -50,22 +49,6 @@
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,39 +10,43 @@
<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_nick_name,create_time,update_by,update_time ) values(
#{caseAppliId},#{caseNode},sysdate(),#{notes},#{createBy},#{createNickName},sysdate(),#{updateBy},sysdate()
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>
<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,7 +11,6 @@
<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)
@@ -25,7 +24,6 @@
<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>
@@ -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">certification_status,</if>
<if test="certificationStatus != null and certificationStatus != ''">certification_status,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
@@ -1,60 +0,0 @@
<?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>