立案申请组庭功能开发 #4
+42
@@ -0,0 +1,42 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/arbitrator")
|
||||
public class ArbitratorController extends BaseController {
|
||||
@Autowired
|
||||
private IArbitratorService arbitratorService;
|
||||
|
||||
/**
|
||||
* 查询仲裁员信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('arbitrator:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Arbitrator arbitrator)
|
||||
{
|
||||
startPage();
|
||||
List<Arbitrator> list = arbitratorService.selectArbitratorList(arbitrator);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+50
-2
@@ -15,7 +15,11 @@ 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 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;
|
||||
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
||||
@@ -27,12 +31,13 @@ public class CaseApplicationController extends BaseController {
|
||||
@Autowired
|
||||
private ICaseApplicationService caseApplicationService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询立案数据
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:list')")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(@Validated @RequestBody CaseApplication caseApplication)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CaseApplication caseApplication)
|
||||
{
|
||||
startPage();
|
||||
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
|
||||
@@ -102,6 +107,49 @@ public class CaseApplicationController extends BaseController {
|
||||
return success(caseApplicationselect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 立案申请导入模板下载
|
||||
*/
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
|
||||
util.importTemplateExcel(response, "立案申请数据");
|
||||
}
|
||||
|
||||
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file) throws Exception {
|
||||
ExcelUtil<CaseApplication> util = new ExcelUtil<CaseApplication>(CaseApplication.class);
|
||||
List<CaseApplication> caseApplicationList = util.importExcel(file.getInputStream());
|
||||
String operName = getUsername();
|
||||
String message = caseApplicationService.importCaseApplication(caseApplicationList,operName);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 组庭
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
|
||||
@Log(title = "组庭", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pendTral")
|
||||
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
return toAjax(caseApplicationService.pendTral(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否指派仲裁员
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
|
||||
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/pendingAppointArbotrar")
|
||||
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication)
|
||||
{
|
||||
return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
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;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/identityAuthentication")
|
||||
public class IdentityAuthenticationController extends BaseController {
|
||||
@Autowired
|
||||
private IdentityAuthenticationService identityAuthenticationService;
|
||||
|
||||
/**
|
||||
* 查询身份证信息
|
||||
*/
|
||||
@PostMapping("/selectIdentityInformation")
|
||||
public AjaxResult selectIdentityInformation()
|
||||
{
|
||||
IdentityAuthentication identityAuthentication = identityAuthenticationService.selectIdentityInformation();
|
||||
return success(identityAuthentication);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -126,6 +126,13 @@
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java-ocr</artifactId>
|
||||
<version>3.1.701</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -10,10 +10,35 @@ public class CaseApplicationConstants {
|
||||
public static final int PENDING_PAYMENT = 1;
|
||||
/** 待缴费确认 */
|
||||
public static final int PENDING_PAYMENT_CONFIRM = 2;
|
||||
/** 待确认是否应诉 */
|
||||
public static final int CONFIRMDED_RESPOND = 3;
|
||||
/** 待确认证据 */
|
||||
public static final int EVIDENCE_CONFREMED = 3;
|
||||
public static final int CONFIRMDED_EVIDENCE = 4;
|
||||
/** 待确定是否指派仲裁员 */
|
||||
public static final int PENDING_APPOINT_ARBOTRATAR = 5;
|
||||
/** 待组庭 */
|
||||
public static final int PENDING_TRIAL = 4;
|
||||
public static final int PENDING_TRIAL = 6;
|
||||
/** 待组庭确定 */
|
||||
public static final int CONFIRMDED_PENDING_TRIAL = 7;
|
||||
/** 待组庭审核 */
|
||||
public static final int CONFIRMDED_PENDING_TRIAL_SUBMMIT = 8;
|
||||
/** 待选择仲裁方式 */
|
||||
public static final int SELECTED_ARBITRATION_METHOD = 9;
|
||||
/** 待开庭 */
|
||||
public static final int PENDING_OPENCOURT = 10;
|
||||
/** 待生成仲裁文书 */
|
||||
public static final int GENERATED_ARBITRATION = 11;
|
||||
/** 待确认仲裁文书 */
|
||||
public static final int CONFIRMED_ARBITRATION = 12;
|
||||
/** 待仲裁文书用印 */
|
||||
public static final int ARBITRATED_SEAL = 13;
|
||||
/** 待仲裁文书用印审核 */
|
||||
public static final int ARBITRATED_SEAL_REVIEW = 14;
|
||||
/** 待仲裁文书送达 */
|
||||
public static final int ARBITRATION_DELIVERY = 15;
|
||||
/** 待案件归档*/
|
||||
public static final int CASE_FILING = 16;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
public class Arbitrator extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 仲裁员姓名 */
|
||||
private String arbitratorName;
|
||||
/** 职称 */
|
||||
private String title;
|
||||
/** 职业 */
|
||||
private String career;
|
||||
/** 专业分类 */
|
||||
private String professiClassifi;
|
||||
/** 学历 */
|
||||
private String education;
|
||||
/** 所在地区 */
|
||||
private String area;
|
||||
/** 联系电话 */
|
||||
private String telephone;
|
||||
|
||||
public String getArbitratorName() {
|
||||
return arbitratorName;
|
||||
}
|
||||
|
||||
public void setArbitratorName(String arbitratorName) {
|
||||
this.arbitratorName = arbitratorName;
|
||||
}
|
||||
|
||||
/** 当前案件数量 */
|
||||
private int currentCaseNum;
|
||||
/** 已结案数量 */
|
||||
private int closedCaseNum;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getCareer() {
|
||||
return career;
|
||||
}
|
||||
|
||||
public void setCareer(String career) {
|
||||
this.career = career;
|
||||
}
|
||||
|
||||
public String getProfessiClassifi() {
|
||||
return professiClassifi;
|
||||
}
|
||||
|
||||
public void setProfessiClassifi(String professiClassifi) {
|
||||
this.professiClassifi = professiClassifi;
|
||||
}
|
||||
|
||||
public String getEducation() {
|
||||
return education;
|
||||
}
|
||||
|
||||
public void setEducation(String education) {
|
||||
this.education = education;
|
||||
}
|
||||
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public int getCurrentCaseNum() {
|
||||
return currentCaseNum;
|
||||
}
|
||||
|
||||
public void setCurrentCaseNum(int currentCaseNum) {
|
||||
this.currentCaseNum = currentCaseNum;
|
||||
}
|
||||
|
||||
public int getClosedCaseNum() {
|
||||
return closedCaseNum;
|
||||
}
|
||||
|
||||
public void setClosedCaseNum(int closedCaseNum) {
|
||||
this.closedCaseNum = closedCaseNum;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.annotation.Excels;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@@ -11,17 +12,15 @@ public class CaseApplication extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
@Excel(name = "ID", cellType = Excel.ColumnType.NUMERIC, prompt = "ID")
|
||||
private Long id;
|
||||
/** 案件编号 */
|
||||
@Excel(name = "案件编号")
|
||||
private String caseNum;
|
||||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNumber;
|
||||
/** 案件标的 */
|
||||
@Excel(name = "案件标的")
|
||||
private BigDecimal caseSubjectAmount;
|
||||
|
||||
|
||||
/** 立案日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date registerDate;
|
||||
@@ -36,10 +35,15 @@ public class CaseApplication extends BaseEntity {
|
||||
private String arbitratClaims;
|
||||
/** 借款开始日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "借款开始日期")
|
||||
private Date loanStartDate;
|
||||
/** 借款结束日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "借款结束日期")
|
||||
private Date loanEndDate;
|
||||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNumber;
|
||||
/** 申请人主张欠本金 */
|
||||
@Excel(name = "申请人主张欠本金")
|
||||
private BigDecimal claimPrinciOwed;
|
||||
@@ -59,9 +63,179 @@ public class CaseApplication extends BaseEntity {
|
||||
/** 在线视频人员 */
|
||||
private String onlineVideoPerson;
|
||||
|
||||
/** 仲裁员id */
|
||||
private String arbitratorId;
|
||||
/** 仲裁员名称 */
|
||||
private String arbitratorName;
|
||||
|
||||
public String getArbitratorName() {
|
||||
return arbitratorName;
|
||||
}
|
||||
|
||||
public void setArbitratorName(String arbitratorName) {
|
||||
this.arbitratorName = arbitratorName;
|
||||
}
|
||||
|
||||
/** 是否指派仲裁员 */
|
||||
private int pendingAppointArbotrar;
|
||||
|
||||
public int getPendingAppointArbotrar() {
|
||||
return pendingAppointArbotrar;
|
||||
}
|
||||
|
||||
public void setPendingAppointArbotrar(int pendingAppointArbotrar) {
|
||||
this.pendingAppointArbotrar = pendingAppointArbotrar;
|
||||
}
|
||||
|
||||
public String getArbitratorId() {
|
||||
return arbitratorId;
|
||||
}
|
||||
|
||||
public void setArbitratorId(String arbitratorId) {
|
||||
this.arbitratorId = arbitratorId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 案件关联人信息 */
|
||||
private List<CaseAffiliate> caseAffiliates;
|
||||
|
||||
/** 案件仲裁员 */
|
||||
private List<Arbitrator> arbitrators;
|
||||
|
||||
public List<Arbitrator> getArbitrators() {
|
||||
return arbitrators;
|
||||
}
|
||||
|
||||
public void setArbitrators(List<Arbitrator> arbitrators) {
|
||||
this.arbitrators = arbitrators;
|
||||
}
|
||||
|
||||
/** 身份类型 */
|
||||
@Excel(name = "身份类型")
|
||||
private int identityType;
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String identityNum;
|
||||
/** 单位电话 */
|
||||
@Excel(name = "单位电话")
|
||||
private String workTelphone;
|
||||
/** 联系电话 */
|
||||
@Excel(name = "联系电话")
|
||||
private String contactTelphone;
|
||||
/** 联系地址 */
|
||||
@Excel(name = "联系地址")
|
||||
private String contactAddress;
|
||||
/** 单位地址 */
|
||||
@Excel(name = "单位地址")
|
||||
private String workAddress;
|
||||
|
||||
/** 代理人姓名 */
|
||||
@Excel(name = "代理人姓名")
|
||||
private String nameAgent;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "代理人身份证号")
|
||||
private String identityNumAgent;
|
||||
/** 联系电话 */
|
||||
@Excel(name = "代理人联系电话")
|
||||
private String contactTelphoneAgent;
|
||||
|
||||
public int getIdentityType() {
|
||||
return identityType;
|
||||
}
|
||||
|
||||
public void setIdentityType(int identityType) {
|
||||
this.identityType = identityType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIdentityNum() {
|
||||
return identityNum;
|
||||
}
|
||||
|
||||
public void setIdentityNum(String identityNum) {
|
||||
this.identityNum = identityNum;
|
||||
}
|
||||
|
||||
public String getWorkTelphone() {
|
||||
return workTelphone;
|
||||
}
|
||||
|
||||
public void setWorkTelphone(String workTelphone) {
|
||||
this.workTelphone = workTelphone;
|
||||
}
|
||||
|
||||
public String getContactTelphone() {
|
||||
return contactTelphone;
|
||||
}
|
||||
|
||||
public void setContactTelphone(String contactTelphone) {
|
||||
this.contactTelphone = contactTelphone;
|
||||
}
|
||||
|
||||
public String getContactAddress() {
|
||||
return contactAddress;
|
||||
}
|
||||
|
||||
public void setContactAddress(String contactAddress) {
|
||||
this.contactAddress = contactAddress;
|
||||
}
|
||||
|
||||
public String getWorkAddress() {
|
||||
return workAddress;
|
||||
}
|
||||
|
||||
public void setWorkAddress(String workAddress) {
|
||||
this.workAddress = workAddress;
|
||||
}
|
||||
|
||||
public String getNameAgent() {
|
||||
return nameAgent;
|
||||
}
|
||||
|
||||
public void setNameAgent(String nameAgent) {
|
||||
this.nameAgent = nameAgent;
|
||||
}
|
||||
|
||||
public String getIdentityNumAgent() {
|
||||
return identityNumAgent;
|
||||
}
|
||||
|
||||
public void setIdentityNumAgent(String identityNumAgent) {
|
||||
this.identityNumAgent = identityNumAgent;
|
||||
}
|
||||
|
||||
public String getContactTelphoneAgent() {
|
||||
return contactTelphoneAgent;
|
||||
}
|
||||
|
||||
public void setContactTelphoneAgent(String contactTelphoneAgent) {
|
||||
this.contactTelphoneAgent = contactTelphoneAgent;
|
||||
}
|
||||
|
||||
public String getContactAddressAgent() {
|
||||
return contactAddressAgent;
|
||||
}
|
||||
|
||||
public void setContactAddressAgent(String contactAddressAgent) {
|
||||
this.contactAddressAgent = contactAddressAgent;
|
||||
}
|
||||
|
||||
/** 联系地址 */
|
||||
@Excel(name = "代理人联系地址")
|
||||
private String contactAddressAgent;
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getId() {
|
||||
@@ -215,4 +389,11 @@ public class CaseApplication extends BaseEntity {
|
||||
public void setCaseAffiliates(List<CaseAffiliate> caseAffiliates) {
|
||||
this.caseAffiliates = caseAffiliates;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class IdentityAuthentication extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 姓名 */
|
||||
private String name;
|
||||
/** 身份证号 */
|
||||
private String identityNo;
|
||||
/** 认证时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date certificationTime;
|
||||
/** 认证状态 */
|
||||
private int certificationStatus;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIdentityNo() {
|
||||
return identityNo;
|
||||
}
|
||||
|
||||
public void setIdentityNo(String identityNo) {
|
||||
this.identityNo = identityNo;
|
||||
}
|
||||
|
||||
public Date getCertificationTime() {
|
||||
return certificationTime;
|
||||
}
|
||||
|
||||
public void setCertificationTime(Date certificationTime) {
|
||||
this.certificationTime = certificationTime;
|
||||
}
|
||||
|
||||
public int getCertificationStatus() {
|
||||
return certificationStatus;
|
||||
}
|
||||
|
||||
public void setCertificationStatus(int certificationStatus) {
|
||||
this.certificationStatus = certificationStatus;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ArbitratorMapper {
|
||||
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
public interface IdentityAuthenticationMapper {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IArbitratorService {
|
||||
List<Arbitrator> selectArbitratorList(Arbitrator arbitrator);
|
||||
|
||||
|
||||
|
||||
}
|
||||
+6
@@ -19,4 +19,10 @@ public interface ICaseApplicationService {
|
||||
int deletecaseApplicationByIds(CaseApplication caseApplication);
|
||||
|
||||
CaseApplication selectCaseApplication(CaseApplication caseApplication);
|
||||
|
||||
String importCaseApplication(List<CaseApplication> caseApplicationList, String operName);
|
||||
|
||||
int pendTral(CaseApplication caseApplication);
|
||||
|
||||
int pendingAppointArbotrar(CaseApplication caseApplication);
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
|
||||
public interface IdentityAuthenticationService {
|
||||
|
||||
|
||||
IdentityAuthentication selectIdentityInformation();
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ArbitratorServiceImpl implements IArbitratorService {
|
||||
@Autowired
|
||||
private ArbitratorMapper arbitratorMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Arbitrator> selectArbitratorList(Arbitrator arbitrator) {
|
||||
return arbitratorMapper.selectArbitratorList(arbitrator);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+164
-2
@@ -1,6 +1,10 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAffiliateMapper;
|
||||
@@ -11,9 +15,15 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
||||
import static java.util.stream.Collectors.collectingAndThen;
|
||||
import static java.util.stream.Collectors.toCollection;
|
||||
|
||||
@Service
|
||||
public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
@@ -89,10 +99,162 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
caseAffiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<CaseAffiliate> caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
|
||||
caseApplicationselect.setCaseAffiliates(caseAffiliatListeselect);
|
||||
|
||||
if(caseApplicationselect!=null){
|
||||
caseApplicationselect.setCaseAffiliates(caseAffiliatListeselect);
|
||||
}
|
||||
return caseApplicationselect;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String importCaseApplication(List<CaseApplication> caseApplicationList, String operName) {
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
if(caseApplicationList!=null&&caseApplicationList.size()>0){
|
||||
List<CaseApplication> caseApplicationListinsert = new ArrayList<>();
|
||||
for (int i = 0; i < caseApplicationList.size(); i++){
|
||||
CaseApplication caseApplication = caseApplicationList.get(i);
|
||||
//赋值CaseApplication的案件关联人信息
|
||||
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
||||
assignmentCaseAffiliates(caseApplication,caseAffiliatesnew);
|
||||
|
||||
int caseApplicationCount = selectCaseApplicationCount(caseApplication);
|
||||
if(caseApplicationCount>0){
|
||||
failureNum++;
|
||||
failureMsg.append("<br/>" + failureNum + "、立案编号 " + caseApplication.getCaseNum() + " 已存在");
|
||||
}else {
|
||||
caseApplicationListinsert.add(caseApplication);
|
||||
}
|
||||
}
|
||||
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
|
||||
List<CaseApplication> caseApplicationListinsertDiffer = caseApplicationListinsert.stream().collect(
|
||||
collectingAndThen(
|
||||
toCollection(() -> new TreeSet<>(Comparator.comparing(CaseApplication::getCaseNum))),
|
||||
ArrayList::new));
|
||||
|
||||
|
||||
//对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
|
||||
if(caseApplicationListinsertDiffer!=null&&caseApplicationListinsertDiffer.size()>0){
|
||||
List<CaseApplication> caseApplicationNewList = new ArrayList<>();
|
||||
for (int i = 0; i < caseApplicationListinsertDiffer.size(); i++){
|
||||
CaseApplication caseApplicationinsertDiffer = caseApplicationListinsertDiffer.get(i);
|
||||
List<CaseAffiliate> caseAffiliatesnew = new ArrayList<>();
|
||||
CaseApplication caseApplicationNew = new CaseApplication();
|
||||
copyCaseApplication(caseApplicationinsertDiffer,caseApplicationNew);
|
||||
if(caseApplicationListinsert!=null&&caseApplicationListinsert.size()>0){
|
||||
for (int j = 0; j < caseApplicationListinsert.size(); j++){
|
||||
CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
|
||||
|
||||
if(StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum())&&
|
||||
caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())){
|
||||
|
||||
caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
|
||||
}
|
||||
}
|
||||
caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
|
||||
caseApplicationNewList.add(caseApplicationNew);
|
||||
}
|
||||
|
||||
for (int k = 0; k < caseApplicationNewList.size(); k++){
|
||||
CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
|
||||
// 新增立案信息
|
||||
caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
||||
int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
|
||||
List<CaseAffiliate> caseAffiliates = caseApplicationItera.getCaseAffiliates();
|
||||
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
||||
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
||||
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
||||
}
|
||||
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}else {
|
||||
throw new ServiceException("导入立案申请数据不能为空!");
|
||||
}
|
||||
|
||||
return successMsg.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int pendTral(CaseApplication caseApplication) {
|
||||
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
||||
int rows = 0;
|
||||
if(arbitrators!=null&&arbitrators.size()>0){
|
||||
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
||||
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
||||
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
caseApplication.setArbitratorId(idstr);
|
||||
caseApplication.setArbitratorName(arbitratorNamestr);
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
}
|
||||
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int pendingAppointArbotrar(CaseApplication caseApplication) {
|
||||
int pendingAppointArbotrar = caseApplication.getPendingAppointArbotrar();
|
||||
List<Arbitrator> arbitrators = caseApplication.getArbitrators();
|
||||
int rows = 0;
|
||||
if(pendingAppointArbotrar==1){
|
||||
if(arbitrators!=null&&arbitrators.size()>0){
|
||||
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
|
||||
List<String> arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
|
||||
String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
caseApplication.setArbitratorId(idstr);
|
||||
caseApplication.setArbitratorName(arbitratorNamestr);
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||
caseApplication.setPendingAppointArbotrar(1);
|
||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
}
|
||||
|
||||
}else {
|
||||
caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_TRIAL);
|
||||
caseApplication.setPendingAppointArbotrar(2);
|
||||
rows = caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||
|
||||
}
|
||||
|
||||
return rows;
|
||||
|
||||
}
|
||||
|
||||
private void assignmentCaseAffiliates(CaseApplication caseApplication, List<CaseAffiliate> caseAffiliatesnew) {
|
||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||
// BeanUtils.copyBeanProp(caseApplication,caseAffiliate);
|
||||
BeanUtils.copyBeanProp(caseAffiliate,caseApplication);
|
||||
caseAffiliatesnew.add(caseAffiliate);
|
||||
caseApplication.setCaseAffiliates(caseAffiliatesnew);
|
||||
}
|
||||
|
||||
private void copyCaseApplication(CaseApplication caseApplicationinsertDiffer, CaseApplication caseApplicationNew) {
|
||||
caseApplicationNew.setArbitratClaims(caseApplicationinsertDiffer.getArbitratClaims());
|
||||
caseApplicationNew.setCaseNum(caseApplicationinsertDiffer.getCaseNum());
|
||||
caseApplicationNew.setCaseSubjectAmount(caseApplicationinsertDiffer.getCaseSubjectAmount());
|
||||
caseApplicationNew.setLoanStartDate(caseApplicationinsertDiffer.getLoanStartDate());
|
||||
caseApplicationNew.setLoanEndDate(caseApplicationinsertDiffer.getLoanEndDate());
|
||||
caseApplicationNew.setContractNumber(caseApplicationinsertDiffer.getContractNumber());
|
||||
caseApplicationNew.setClaimInterestOwed(caseApplicationinsertDiffer.getClaimInterestOwed());
|
||||
caseApplicationNew.setClaimPrinciOwed(caseApplicationinsertDiffer.getClaimPrinciOwed());
|
||||
caseApplicationNew.setClaimLiquidDamag(caseApplicationinsertDiffer.getClaimLiquidDamag());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
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.ocr.v20181119.OcrClient;
|
||||
import com.tencentcloudapi.ocr.v20181119.models.RecognizeTableAccurateOCRRequest;
|
||||
import com.tencentcloudapi.ocr.v20181119.models.RecognizeTableAccurateOCRResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Base64;
|
||||
|
||||
@Service
|
||||
public class IdentityAuthenticationServiceImpl implements IdentityAuthenticationService {
|
||||
|
||||
@Value("${identityAuthentication.credentialSecretId}")
|
||||
private String credentialSecretId;
|
||||
@Value("${identityAuthentication.credentialSecretKey}")
|
||||
private String credentialSecretKey;
|
||||
|
||||
@Autowired
|
||||
private IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(IdentityAuthenticationServiceImpl.class);
|
||||
|
||||
@Override
|
||||
public IdentityAuthentication selectIdentityInformation() {
|
||||
IdentityAuthentication identityAuthentication = new IdentityAuthentication();
|
||||
try{
|
||||
Credential credIdentityAuthentication = new Credential(credentialSecretId, credentialSecretKey);
|
||||
HttpProfile httpProfileIdentityAuthentication = new HttpProfile();
|
||||
httpProfileIdentityAuthentication.setEndpoint("ocr.tencentcloudapi.com");
|
||||
String imagePathIdentityAuthentication = "本地png/jpg文件的绝对地址";
|
||||
InputStream inputStreamIdentityAuthentication = null;
|
||||
byte[] buffer = null;
|
||||
//读取图片字节数组
|
||||
try {
|
||||
inputStreamIdentityAuthentication = new FileInputStream(imagePathIdentityAuthentication);
|
||||
int count = 0;
|
||||
while (count == 0) {
|
||||
count = inputStreamIdentityAuthentication.available();
|
||||
}
|
||||
buffer = new byte[count];
|
||||
inputStreamIdentityAuthentication.read(buffer);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (inputStreamIdentityAuthentication != null) {
|
||||
try {
|
||||
// 关闭inputStream流
|
||||
inputStreamIdentityAuthentication.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String imageBase64IdentityAuthentication = Base64.getEncoder().encodeToString(buffer);
|
||||
|
||||
ClientProfile clientProfileIdentityAuthentication = new ClientProfile();
|
||||
clientProfileIdentityAuthentication.setHttpProfile(httpProfileIdentityAuthentication);
|
||||
OcrClient clientIdentityAuthentication = new OcrClient(credIdentityAuthentication, "ap-shanghai", clientProfileIdentityAuthentication);
|
||||
RecognizeTableAccurateOCRRequest reqIdentityAuthentication = new RecognizeTableAccurateOCRRequest();
|
||||
reqIdentityAuthentication.setImageBase64(imageBase64IdentityAuthentication);
|
||||
RecognizeTableAccurateOCRResponse respIdentityAuthentication = clientIdentityAuthentication.RecognizeTableAccurateOCR(reqIdentityAuthentication);
|
||||
String stringRes = RecognizeTableAccurateOCRResponse.toJsonString(respIdentityAuthentication);
|
||||
JSONObject stringObjectRes = (JSONObject) JSON.parse(stringRes);
|
||||
JSONObject stringres = (JSONObject) stringObjectRes.get("Response");
|
||||
|
||||
|
||||
identityAuthentication.setName(stringres.get("name").toString());
|
||||
identityAuthentication.setIdentityNo(stringres.get("IdNum").toString());
|
||||
|
||||
// System.out.println(RecognizeTableAccurateOCRResponse.toJsonString(respIdentityAuthentication);
|
||||
|
||||
} catch (TencentCloudSDKException e) {
|
||||
log.error("身份认证失败", e);
|
||||
}
|
||||
|
||||
return identityAuthentication;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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.ArbitratorMapper">
|
||||
<resultMap type="Arbitrator" id="ArbitratorResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="arbitratorName" column="arbitrator_name" />
|
||||
<result property="title" column="title" />
|
||||
<result property="career" column="career" />
|
||||
<result property="professiClassifi" column="professi_classifi" />
|
||||
<result property="education" column="education" />
|
||||
<result property="area" column="area" />
|
||||
<result property="telephone" column="telephone" />
|
||||
<result property="currentCaseNum" column="current_case_num" />
|
||||
<result property="closedCaseNum" column="closed_case_num" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectArbitratorList" parameterType="Arbitrator" resultMap="ArbitratorResult">
|
||||
select a.id ,a.arbitrator_name ,a.title ,a.career ,a.professi_classifi ,
|
||||
a.education ,a.area ,a.telephone ,a.current_case_num ,a.closed_case_num
|
||||
from arbitrator a
|
||||
<where>
|
||||
<if test="arbitratorName != null and arbitratorName != ''">
|
||||
AND a.arbitrator_name like concat('%', #{arbitratorName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -135,7 +135,10 @@
|
||||
<update id="submitCaseApplication" parameterType="CaseApplication">
|
||||
update case_application
|
||||
<set>
|
||||
<if test="caseStatus != null">case_status = #{caseStatus}</if>
|
||||
<if test="caseStatus != null">case_status = #{caseStatus},</if>
|
||||
<if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
|
||||
<if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
|
||||
<if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?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.IdentityAuthenticationMapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user