Merge branch 'qtz' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #22.
This commit is contained in:
@@ -2,6 +2,9 @@ package com.ruoyi.web.controller.system;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -33,6 +36,8 @@ public class SysLoginController
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysPermissionService permissionService;
|
private SysPermissionService permissionService;
|
||||||
|
@Autowired
|
||||||
|
private IdentityAuthenticationService identityAuthenticationService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录方法
|
* 登录方法
|
||||||
@@ -48,6 +53,13 @@ public class SysLoginController
|
|||||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||||
loginBody.getUuid());
|
loginBody.getUuid());
|
||||||
ajax.put(Constants.TOKEN, token);
|
ajax.put(Constants.TOKEN, token);
|
||||||
|
|
||||||
|
// IdentityAuthentication identityAuthentication = new IdentityAuthentication();
|
||||||
|
// identityAuthentication.setUserName(loginBody.getUsername());
|
||||||
|
// IdentityAuthentication identityAuthenticationselect = identityAuthenticationService.selectIdentityAuthentication(identityAuthentication);
|
||||||
|
// ajax.put("certificationStatusName", identityAuthenticationselect.getCertificationStatusName());
|
||||||
|
// ajax.put("certificationStatus", identityAuthenticationselect.getCertificationStatus());
|
||||||
|
|
||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-9
@@ -18,15 +18,7 @@ public class IdentityAuthenticationController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IdentityAuthenticationService identityAuthenticationService;
|
private IdentityAuthenticationService identityAuthenticationService;
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询身份证信息
|
|
||||||
*/
|
|
||||||
@PostMapping("/selectIdentityInformation")
|
|
||||||
public AjaxResult selectIdentityInformation()
|
|
||||||
{
|
|
||||||
IdentityAuthentication identityAuthentication = identityAuthenticationService.selectIdentityInformation();
|
|
||||||
return success(identityAuthentication);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public class ArbitrateRecord extends BaseEntity {
|
|||||||
private String verificaOpinion;
|
private String verificaOpinion;
|
||||||
/** 审核裁决书意见 */
|
/** 审核裁决书意见 */
|
||||||
private String checkOpinion;
|
private String checkOpinion;
|
||||||
|
/** 裁决书附件id */
|
||||||
|
private Long annexId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+41
-7
@@ -19,7 +19,47 @@ public class IdentityAuthentication extends BaseEntity {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date certificationTime;
|
private Date certificationTime;
|
||||||
/** 认证状态 */
|
/** 认证状态 */
|
||||||
private int certificationStatus;
|
private Integer certificationStatus;
|
||||||
|
|
||||||
|
public Integer getCertificationStatus() {
|
||||||
|
return certificationStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCertificationStatus(Integer certificationStatus) {
|
||||||
|
this.certificationStatus = certificationStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 认证状态名称 */
|
||||||
|
private String certificationStatusName;
|
||||||
|
|
||||||
|
public String getCertificationStatusName() {
|
||||||
|
return certificationStatusName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCertificationStatusName(String certificationStatusName) {
|
||||||
|
this.certificationStatusName = certificationStatusName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 用户ID */
|
||||||
|
private Long userId;
|
||||||
|
/** 用户账号 */
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -53,11 +93,5 @@ public class IdentityAuthentication extends BaseEntity {
|
|||||||
this.certificationTime = certificationTime;
|
this.certificationTime = certificationTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCertificationStatus() {
|
|
||||||
return certificationStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCertificationStatus(int certificationStatus) {
|
|
||||||
this.certificationStatus = certificationStatus;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -1,4 +1,13 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.mapper;
|
package com.ruoyi.wisdomarbitrate.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||||
|
|
||||||
public interface IdentityAuthenticationMapper {
|
public interface IdentityAuthenticationMapper {
|
||||||
|
int insertIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||||
|
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -5,5 +5,7 @@ import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
|||||||
public interface IdentityAuthenticationService {
|
public interface IdentityAuthenticationService {
|
||||||
|
|
||||||
|
|
||||||
IdentityAuthentication selectIdentityInformation();
|
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-53
@@ -38,62 +38,21 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthenticatio
|
|||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(IdentityAuthenticationServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(IdentityAuthenticationServiceImpl.class);
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IdentityAuthentication selectIdentityInformation() {
|
public IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication) {
|
||||||
/* IdentityAuthentication identityAuthentication = new IdentityAuthentication();
|
IdentityAuthentication identityAuthenticationselect = identityAuthenticationMapper.selectIdentityAuthentication(identityAuthentication);
|
||||||
try{
|
if(identityAuthenticationselect!=null){
|
||||||
Credential credIdentityAuthentication = new Credential(credentialSecretId, credentialSecretKey);
|
identityAuthenticationselect.setCertificationStatusName("已身份注册");
|
||||||
HttpProfile httpProfileIdentityAuthentication = new HttpProfile();
|
}else {
|
||||||
httpProfileIdentityAuthentication.setEndpoint("ocr.tencentcloudapi.com");
|
IdentityAuthentication identityAuthenticationselectnew = new IdentityAuthentication();
|
||||||
String imagePathIdentityAuthentication = "本地png/jpg文件的绝对地址";
|
identityAuthenticationselectnew.setCertificationStatusName("未身份注册");
|
||||||
InputStream inputStreamIdentityAuthentication = null;
|
return identityAuthenticationselectnew;
|
||||||
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 identityAuthenticationselect;
|
||||||
|
|
||||||
return identityAuthentication;*/
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<result property="rulingFollows" column="ruling_follows" />
|
<result property="rulingFollows" column="ruling_follows" />
|
||||||
<result property="verificaOpinion" column="verifica_opinion" />
|
<result property="verificaOpinion" column="verifica_opinion" />
|
||||||
<result property="checkOpinion" column="check_opinion" />
|
<result property="checkOpinion" column="check_opinion" />
|
||||||
|
<result property="annexId" column="annex_id" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@@ -54,6 +55,7 @@
|
|||||||
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows = #{rulingFollows},</if>
|
<if test="rulingFollows != null and rulingFollows != ''">ruling_follows = #{rulingFollows},</if>
|
||||||
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion = #{verificaOpinion},</if>
|
<if test="verificaOpinion != null and verificaOpinion != ''">verifica_opinion = #{verificaOpinion},</if>
|
||||||
<if test="checkOpinion != null and checkOpinion != ''">check_opinion = #{checkOpinion},</if>
|
<if test="checkOpinion != null and checkOpinion != ''">check_opinion = #{checkOpinion},</if>
|
||||||
|
<if test="annexId != null ">annex_id = #{annexId},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
@@ -63,7 +65,7 @@
|
|||||||
|
|
||||||
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
|
<select id="selectArbitrateRecord" parameterType="ArbitrateRecord" resultMap="ArbitrateRecordResult">
|
||||||
SELECT a.id ,a.case_appli_id ,a.eviden_determi ,a.fact_determi ,a.case_sketch ,a.arbitrate_think ,a.ruling_follows ,
|
SELECT a.id ,a.case_appli_id ,a.eviden_determi ,a.fact_determi ,a.case_sketch ,a.arbitrate_think ,a.ruling_follows ,
|
||||||
a.verifica_opinion ,a.check_opinion
|
a.verifica_opinion ,a.check_opinion,a.annex_id
|
||||||
from arbitrate_record a
|
from arbitrate_record a
|
||||||
<where>
|
<where>
|
||||||
<if test="caseAppliId != null ">
|
<if test="caseAppliId != null ">
|
||||||
|
|||||||
+56
@@ -3,7 +3,63 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper">
|
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper">
|
||||||
|
<resultMap type="IdentityAuthentication" id="IdentityAuthenticationResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="identityNo" column="identity_no" />
|
||||||
|
<result property="certificationTime" column="certification_time" />
|
||||||
|
<result property="certificationStatus" column="certification_status" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="userName" column="user_name" />
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into identi_authenti(
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="identityNo != null and identityNo != ''">identity_no,</if>
|
||||||
|
<if test="certificationTime != null and certificationTime != ''">certification_time,</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
|
||||||
|
)values(
|
||||||
|
<if test="userId != null ">#{userId},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="identityNo != null and identityNo != ''">#{identityNo},</if>
|
||||||
|
<if test="certificationTime != null and certificationTime != ''">#{certificationTime},</if>
|
||||||
|
<if test="certificationStatus != null and certificationStatus != ''">#{certificationStatus},</if>
|
||||||
|
<if test="userName != null and userName != ''">#{userName},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
sysdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
|
||||||
|
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certificationStatus ,i.user_id ,i.user_name
|
||||||
|
from identi_authenti i
|
||||||
|
<where>
|
||||||
|
<if test="userName != null and userName != '' ">
|
||||||
|
AND i.user_name = #{userName}
|
||||||
|
</if>
|
||||||
|
<if test="userId != null ">
|
||||||
|
AND i.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCountIdentityAuthentication" resultType="Integer">
|
||||||
|
select count(1) from identi_authenti i
|
||||||
|
<where>
|
||||||
|
<if test="userName != null and userName != '' ">
|
||||||
|
AND i.user_name = #{userName}
|
||||||
|
</if>
|
||||||
|
<if test="userId != null ">
|
||||||
|
AND i.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user