Commit 742af5f2 authored by zhangyingbin's avatar zhangyingbin

优化业务注解

parent df51efba
...@@ -18,6 +18,7 @@ public class ReginParams implements Serializable { ...@@ -18,6 +18,7 @@ public class ReginParams implements Serializable {
private DepartmentBo department; private DepartmentBo department;
private AgencyUserModel userModel; private AgencyUserModel userModel;
private PersonIdentity personIdentity; private PersonIdentity personIdentity;
private BusinessInfo businessInfo;
@Data @Data
public static class PersonIdentity implements Serializable { public static class PersonIdentity implements Serializable {
...@@ -29,6 +30,26 @@ public class ReginParams implements Serializable { ...@@ -29,6 +30,26 @@ public class ReginParams implements Serializable {
private String bizOrgCode; private String bizOrgCode;
} }
@Data
public static class BusinessInfo implements Serializable {
private Long amosBizCode;
private String companyName;
private Long companySequenceNbr;
private String companyType;
private Long amosUserCode;
private String userName;
private Long userSequenceNbr;
private String userType;
}
public BusinessInfo getBusinessInfo() {
return businessInfo;
}
public void setBusinessInfo(BusinessInfo businessInfo) {
this.businessInfo = businessInfo;
}
public PersonIdentity getPersonIdentity() { public PersonIdentity getPersonIdentity() {
return personIdentity; return personIdentity;
} }
......
...@@ -45,6 +45,7 @@ public class BusinessIdentifyAspect { ...@@ -45,6 +45,7 @@ public class BusinessIdentifyAspect {
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if (permission.isNeedIdentity() && reginParam != null) { if (permission.isNeedIdentity() && reginParam != null) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
ReginParams.BusinessInfo businessInfo = new ReginParams.BusinessInfo();
//company //company
Long amosBizCode = reginParams.getCompany().getSequenceNbr(); Long amosBizCode = reginParams.getCompany().getSequenceNbr();
OrgUsr companyOrgUsr = orgUsrService.getById(amosBizCode); OrgUsr companyOrgUsr = orgUsrService.getById(amosBizCode);
...@@ -54,10 +55,11 @@ public class BusinessIdentifyAspect { ...@@ -54,10 +55,11 @@ public class BusinessIdentifyAspect {
if (ValidationUtil.isEmpty(companyType)) { if (ValidationUtil.isEmpty(companyType)) {
companyType = companyOrgUsr.getBizOrgType(); companyType = companyOrgUsr.getBizOrgType();
} }
BusinessInfo.amosBizCode = amosBizCode; businessInfo.setCompanyName(companyName);
BusinessInfo.companySequenceNbr = companySequenceNbr; businessInfo.setAmosBizCode(amosBizCode);
BusinessInfo.companyName = companyName; businessInfo.setCompanyType(companyType);
BusinessInfo.companyType = companyType; businessInfo.setCompanySequenceNbr(companySequenceNbr);
//User //User
Long amosUserCode = reginParams.getUserModel().getSequenceNbr(); Long amosUserCode = reginParams.getUserModel().getSequenceNbr();
OrgUsr userOrgUsr = orgUsrService.getById(amosUserCode); OrgUsr userOrgUsr = orgUsrService.getById(amosUserCode);
...@@ -67,10 +69,11 @@ public class BusinessIdentifyAspect { ...@@ -67,10 +69,11 @@ public class BusinessIdentifyAspect {
if (ValidationUtil.isEmpty(userType)) { if (ValidationUtil.isEmpty(userType)) {
userType = userOrgUsr.getBizOrgType(); userType = userOrgUsr.getBizOrgType();
} }
BusinessInfo.amosUserCode = amosUserCode; businessInfo.setUserSequenceNbr(userSequenceNbr);
BusinessInfo.userName = userName; businessInfo.setUserName(userName);
BusinessInfo.userSequenceNbr = userSequenceNbr; businessInfo.setUserType(userType);
BusinessInfo.userType = userType; businessInfo.setAmosUserCode(amosUserCode);
reginParams.setBusinessInfo(businessInfo);
} }
} }
......
...@@ -13,47 +13,47 @@ public class BusinessInfo { ...@@ -13,47 +13,47 @@ public class BusinessInfo {
* 公司 * 公司
* 平台存储的sequenceNbr * 平台存储的sequenceNbr
*/ */
public static Long amosBizCode; private Long amosBizCode;
/** /**
* 公司 * 公司
* 业务存储的名称 * 业务存储的名称
*/ */
public static String companyName; private String companyName;
/** /**
* 公司 * 公司
* 业务存储的sequenceNbr * 业务存储的sequenceNbr
*/ */
public static Long companySequenceNbr; private Long companySequenceNbr;
/** /**
* 公司 * 公司
* 业务存储的类型 * 业务存储的类型
*/ */
public static String companyType; private String companyType;
/** /**
* 人员 * 人员
* 平台存储的sequenceNbr * 平台存储的sequenceNbr
*/ */
public static Long amosUserCode; private Long amosUserCode;
/** /**
* 人员 * 人员
* 业务存储的名称 * 业务存储的名称
*/ */
public static String userName; private String userName;
/** /**
* 人员 * 人员
* 业务存储的sequenceNbr * 业务存储的sequenceNbr
*/ */
public static Long userSequenceNbr; private Long userSequenceNbr;
/** /**
* 人员 * 人员
* 业务存储的类型 * 业务存储的类型
*/ */
public static String userType; private String userType;
} }
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