Commit ac8e5700 authored by chenzhuo's avatar chenzhuo

电子合同接口

parent e146b07e
......@@ -298,6 +298,85 @@ public class SignHclcController extends BaseController {
}
/**
* 经办人授权/取消授权
*
* @param request
* @param dto 经办人授权/取消授权
* @return Map
*/
@ResponseBody
@RequestMapping("/auth/api/individual/authorize")
public Map<String, Object> setOrganIndividualAuthorize(HttpServletRequest request,
@RequestBody SignUserInfoHclc dto) {
Map<String, Object> map = new HashMap<>();
IRequest iRequest = createRequestContext(request);
if (Objects.isNull(dto.getOpenId())||Objects.isNull(dto.getAuthFlag())) {
map.put("code", "000005");
map.put("message", "关键参数openId不存在,调用失败!");
}else{
try {
organSignHclcService.updateByPrimaryKeySelective(iRequest, dto);
map.put("code", "000000");
map.put("message", "用户授权成功!");
}catch (Exception e){
map.put("code", "000006");
map.put("message", "用户授权失败,请检查!");
}
//map = organSignHclcService.setOrganIndividualAuthorize(iRequest, dto);
}
return map;
}
/**
* 经办人信息查询
*
* @param request
* @param dto 经办人信息查询
* @return Map
*/
@ResponseBody
@RequestMapping("/auth/api/individual/info/query")
public ResponseData getOrganIndividualInfoQuery(HttpServletRequest request,
@RequestBody SignUserInfoHclc dto) {
IRequest requestContext = createRequestContext(request);
List<SignUserInfoHclc> signInfoHclcs = new ArrayList<>();
SignUserInfoHclc signInfoHclc = signHclcService.selectByPrimaryKey(requestContext, dto);
signInfoHclcs=organSignHclcService.getOrganIndividualInfoQuery(requestContext, dto);
return new ResponseData(signInfoHclcs);
}
/**
* 管理权限转让
*
* @param request
* @param dto 管理权限转让
* @return Map
*/
@ResponseBody
@RequestMapping("/auth/api/individual/assignment")
public Map<String, Object> setOrganIndividualAssignment(HttpServletRequest request,
@RequestBody SignUserInfoHclc dto) {
Map<String, Object> map = new HashMap<>();
IRequest iRequest = createRequestContext(request);
if (Objects.isNull(dto.getOpenId())||Objects.isNull(dto.getAuthFlag())) {
map.put("code", "000005");
map.put("message", "关键参数openId不存在,调用失败!");
}else{
try {
map=organSignHclcService.setOrganIndividualAssignment(iRequest, dto);
}catch (Exception e){
map.put("code", "000006");
map.put("message", "用户授权失败,请检查!");
}
//map = organSignHclcService.setOrganIndividualAuthorize(iRequest, dto);
}
return map;
}
/**
* 下载微信图片资源上传业务系统
*
......
......@@ -54,6 +54,10 @@ public class SignUserInfoHclc extends BaseDTO {
private String sealId; // 是否代理店
private String isManagerFlag; // 是否管理员角色
private String managerAuthFlag; // 管理员授权状态
@Transient
private String attachmentId;//身份证附件id
......@@ -377,4 +381,20 @@ public class SignUserInfoHclc extends BaseDTO {
public void setHistoryFlag(String historyFlag) {
this.historyFlag = historyFlag;
}
public String getIsManagerFlag() {
return isManagerFlag;
}
public void setIsManagerFlag(String isManagerFlag) {
this.isManagerFlag = isManagerFlag;
}
public String getManagerAuthFlag() {
return managerAuthFlag;
}
public void setManagerAuthFlag(String managerAuthFlag) {
this.managerAuthFlag = managerAuthFlag;
}
}
......@@ -14,4 +14,8 @@ import java.util.List;
public interface SignInfoHclcMapper extends Mapper<SignUserInfoHclc> {
List<SignUserInfoHclc> queryUserInfo(SignUserInfoHclc dto);
List<SignUserInfoHclc> queryAgentInfo(SignUserInfoHclc dto);
void setOrganIndividualAssignment(SignUserInfoHclc dto);
}
......@@ -5,6 +5,7 @@ import com.hand.hap.core.IRequest;
import com.hand.hap.core.ProxySelf;
import com.hand.hap.system.service.IBaseService;
import java.util.List;
import java.util.Map;
/**
......@@ -20,4 +21,8 @@ public interface IOrganSignInfoHclcService extends IBaseService<SignUserInfoHclc
Map<String, Object> addOrgansAccount(SignUserInfoHclc info);
Map<String, Object> deleteOrgansAccount(IRequest iRequest,SignUserInfoHclc signInfoHclc);
List<SignUserInfoHclc> getOrganIndividualInfoQuery(IRequest iRequest, SignUserInfoHclc signInfoHclc);
Map<String,Object> setOrganIndividualAssignment(IRequest iRequest, SignUserInfoHclc info);
}
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hand.app.esign.utils.AlgorithmHelper;
import com.hand.app.esignHclc.dto.SignUserInfoHclc;
import com.hand.app.esignHclc.dto.SignUserFaceHclc;
import com.hand.app.esignHclc.mapper.SignInfoHclcMapper;
import com.hand.app.esignHclc.service.IOrganSignInfoHclcService;
import com.hand.app.esignHclc.service.ISignInfoHclcFaceService;
import com.hand.app.esignHclc.service.ISignInfoHclcService;
......@@ -43,6 +44,8 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
private ISignInfoHclcFaceService signInfoHclcFaceService;
@Autowired
private ISignInfoHclcService iSignInfoHclcService;
@Autowired
private SignInfoHclcMapper signInfoHclcMapper;
//用户认证接口信息
public static final String indivSysName = "HCLC_FACE_API";
......@@ -435,6 +438,24 @@ public class OrganSignInfoHclcServiceImpl extends BaseServiceImpl<SignUserInfoHc
return mapOrgan;
}
public List<SignUserInfoHclc> getOrganIndividualInfoQuery(IRequest iRequest, SignUserInfoHclc info){
List<SignUserInfoHclc> signInfoHclcs = signInfoHclcMapper.queryAgentInfo(info);
return signInfoHclcs;
}
public Map<String, Object> setOrganIndividualAssignment(IRequest iRequest, SignUserInfoHclc info){
Map<String, Object> mapOrgan = new HashMap<>();
try {
signInfoHclcMapper.setOrganIndividualAssignment(info);
mapOrgan.put("code", "000000");
mapOrgan.put("message", "管理权限转让成功!");
}catch (Exception e){
mapOrgan.put("code", "000005");
mapOrgan.put("message", "管理权限转让失败,请检查!");
}
return mapOrgan;
}
public Map<String, Object> getOrgAuthUrlHttp(IRequest iRequest, SignUserInfoHclc info, String token) {
//初始化人脸核验流程初始化数据
......
......@@ -28,6 +28,8 @@
<result column="ORG_ATTACHMENT_ID" property="orgAttachmentId" jdbcType="VARCHAR"/>
<result column="AUTH_FLAG" property="authFlag" jdbcType="VARCHAR"/>
<result column="SEAL_ID" property="sealId" jdbcType="VARCHAR"/>
<result column="IS_MANAGER_FLAG" property="isManagerFlag" jdbcType="VARCHAR"/>
<result column="MANAGER_AUTH_FLAG" property="managerAuthFlag" jdbcType="VARCHAR"/>
</resultMap>
<select id="queryUserInfo" resultMap="BaseResultMap" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc">
......@@ -52,4 +54,24 @@
</where>
order by account_id
</select>
<select id="queryAgentInfo" resultMap="BaseResultMap" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc">
select open_id,agent_name,agent_id_no,mobile,auth_flag
from SIGN_USER_INFO_HCLC
<where>
<if test="idNo != null">
and id_no = #{idNo,jdbcType=VARCHAR}
</if>
</where>
order by account_id
</select>
<update id="setOrganIndividualAssignment" parameterType="com.hand.app.esignHclc.dto.SignUserInfoHclc">
update SIGN_USER_INFO_HCLC
<set>
<if test="isManagerFlag != null">is_manager_flag=#{isManagerFlag,jdbcType=VARCHAR},</if>
<if test="managerAuthFlag != null">manager_auth_flag=#{managerAuthFlag}</if>
</set>
where id_no=#{idNo}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment