Commit 1c0779c9 by jianan

调用N22查询保单接口和查询佣金明细接口

parent c17f6262
package com.yd.api.practitioner; package com.yd.api.practitioner;
import com.alibaba.fastjson.JSONObject;
import com.yd.api.practitioner.service.PractitionerBasicInfoService; import com.yd.api.practitioner.service.PractitionerBasicInfoService;
import com.yd.api.practitioner.service.PractitionerService; import com.yd.api.practitioner.service.PractitionerService;
import com.yd.api.practitioner.service.ScheduleTrackService; import com.yd.api.practitioner.service.ScheduleTrackService;
...@@ -30,6 +31,11 @@ import com.yd.api.practitioner.vo.subordinate.QueryTeamMemberDetailResponseVO; ...@@ -30,6 +31,11 @@ import com.yd.api.practitioner.vo.subordinate.QueryTeamMemberDetailResponseVO;
import com.yd.api.practitioner.vo.subordinate.SubordinateSystemMemberQueryRequestVO; import com.yd.api.practitioner.vo.subordinate.SubordinateSystemMemberQueryRequestVO;
import com.yd.api.practitioner.vo.subordinate.SubordinateSystemMemberQueryResponseVO; import com.yd.api.practitioner.vo.subordinate.SubordinateSystemMemberQueryResponseVO;
import com.yd.api.result.JsonResult; import com.yd.api.result.JsonResult;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryRequestBody;
import com.yd.rmi.n22.policy.service.N22PolicyService;
import com.yd.rmi.n22.staff.pojo.GetStaffNewRequestBody;
import com.yd.rmi.n22.staff.pojo.GetStaffNewResponseVO;
import com.yd.rmi.n22.staff.service.N22StaffService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -48,6 +54,8 @@ public class PractitionerController { ...@@ -48,6 +54,8 @@ public class PractitionerController {
private PractitionerBasicInfoService practitionerBasicInfoService; private PractitionerBasicInfoService practitionerBasicInfoService;
@Autowired @Autowired
private ScheduleTrackService scheduleTrackService; private ScheduleTrackService scheduleTrackService;
@Autowired
private N22PolicyService n22PolicyService;
/** /**
* 经纪人登录 * 经纪人登录
* @param requestVO 请求数据 * @param requestVO 请求数据
...@@ -613,4 +621,16 @@ public class PractitionerController { ...@@ -613,4 +621,16 @@ public class PractitionerController {
result.setData(responseVO); result.setData(responseVO);
return result; return result;
} }
/**
* test
* @param obj
* @return
*/
@RequestMapping("/test")
public Object test(@RequestBody PolicyListQueryRequestBody obj){
com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryResponseVO policyListQueryResponseVO = n22PolicyService.policyList(obj);
return policyListQueryResponseVO;
}
} }
...@@ -34,6 +34,7 @@ import com.yd.dal.entity.product.Product; ...@@ -34,6 +34,7 @@ import com.yd.dal.entity.product.Product;
import com.yd.dal.entity.product.ProductE; import com.yd.dal.entity.product.ProductE;
import com.yd.dal.entity.product.ProductPlan; import com.yd.dal.entity.product.ProductPlan;
import com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper; import com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper;
import com.yd.dal.mapper.customer.AclPractitionerMapper;
import com.yd.dal.service.customer.AclFileUploadDALService; import com.yd.dal.service.customer.AclFileUploadDALService;
import com.yd.dal.service.customer.AclPractitionerDALService; import com.yd.dal.service.customer.AclPractitionerDALService;
import com.yd.dal.service.meta.MdDropOptionsDALService; import com.yd.dal.service.meta.MdDropOptionsDALService;
...@@ -45,6 +46,17 @@ import com.yd.rmi.ali.oss.vo.OssOperateTypeEnum; ...@@ -45,6 +46,17 @@ import com.yd.rmi.ali.oss.vo.OssOperateTypeEnum;
import com.yd.rmi.ali.oss.vo.OssRequestVO; import com.yd.rmi.ali.oss.vo.OssRequestVO;
import com.yd.rmi.ali.oss.vo.OssResponseVO; import com.yd.rmi.ali.oss.vo.OssResponseVO;
import com.yd.rmi.cache.SystemConfigService; import com.yd.rmi.cache.SystemConfigService;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyInfoN22;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryRequestBody;
import com.yd.rmi.n22.policy.service.N22PolicyService;
import com.yd.rmi.n22.salary.pojo.SalaryDetails;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchRequestBody;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchResponseVO;
import com.yd.rmi.n22.salary.service.N22SalaryService;
import com.yd.rmi.n22.staff.pojo.GetStaffNewRequestBody;
import com.yd.rmi.n22.staff.pojo.GetStaffNewResponseVO;
import com.yd.rmi.n22.staff.pojo.Staff;
import com.yd.rmi.n22.staff.service.N22StaffService;
import com.yd.util.CommonUtil; import com.yd.util.CommonUtil;
import com.yd.util.config.ZHBErrorConfig; import com.yd.util.config.ZHBErrorConfig;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -52,6 +64,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -52,6 +64,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.*; import java.io.*;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
@Service("practitionerBasicInfoService") @Service("practitionerBasicInfoService")
...@@ -77,6 +90,14 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -77,6 +90,14 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private PractitionerService practitionerService; private PractitionerService practitionerService;
@Autowired @Autowired
private AgAclLifePractitionerSalaryMapper practitionerSalaryMapper; private AgAclLifePractitionerSalaryMapper practitionerSalaryMapper;
@Autowired
private N22PolicyService n22PolicyService;
@Autowired
private N22StaffService n22StaffService;
@Autowired
private N22SalaryService n22SalaryService;
@Autowired
private AclPractitionerMapper practitionerMapper;
@Override @Override
public PolicyListQueryResponseVO policyListQuery(PolicyListQueryRequestVO requestVO) { public PolicyListQueryResponseVO policyListQuery(PolicyListQueryRequestVO requestVO) {
...@@ -90,7 +111,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -90,7 +111,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
//1、线上 //1、线上
getPolicyListForYD(policyInfoList,practitionerId,time); getPolicyListForYD(policyInfoList,practitionerId,time);
//2、线下 //2、线下
getPolicyListForEGolden(policyInfoList,mobileNo,time); // getPolicyListForEGolden(policyInfoList,mobileNo,time);
// getPolicyListFromN22(policyInfoList, mobileNo, time);
responseVO.setPolicyInfoList(policyInfoList); responseVO.setPolicyInfoList(policyInfoList);
Collections.sort(policyInfoList); Collections.sort(policyInfoList);
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
...@@ -104,6 +127,34 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -104,6 +127,34 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return responseVO; return responseVO;
} }
private void getPolicyListFromN22(List<PolicyInfo> policyInfoList, String mobileNo, Integer time) throws Exception {
// TODO N22Service
// 1.根据手机号查询经纪人在N22系统的Agent_id
GetStaffNewRequestBody getStaffNewRequestBody = new GetStaffNewRequestBody();
GetStaffNewResponseVO resp = n22StaffService.getStaffNew(getStaffNewRequestBody);
if ("查询成功".equals(resp.getResponseHead().getMessage())){
throw new Exception("查询N22的Agent_id错误");
}
List<Staff> staffList = resp.getResponseBody().getStaff();
if (staffList.size() == 0) {
throw new Exception("查询N22的经纪人错误");
}
Staff staff = staffList.get(0);
String agent_id = staff.getAgent_id();
// 2.根据Agent_id查询N22中的保单列表
PolicyListQueryRequestBody policyListQueryRequestBody = new PolicyListQueryRequestBody();
policyListQueryRequestBody.setStaffInfo(agent_id);
com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryResponseVO policyListQueryResponseVO = n22PolicyService.policyList(policyListQueryRequestBody);
if (!"查询成功".equals(policyListQueryResponseVO.getResponseHead().getMessage())){
throw new Exception("查询N22经纪人保单列表错误");
}
List<PolicyInfoN22> policyList = policyListQueryResponseVO.getResponseBody().getPolicyList();
}
@Override @Override
public PolicyInfoQueryResponseVO policyInfoQuery(PolicyInfoQueryRequestVO requestVO) { public PolicyInfoQueryResponseVO policyInfoQuery(PolicyInfoQueryRequestVO requestVO) {
PolicyInfoQueryResponseVO responseVO = new PolicyInfoQueryResponseVO(); PolicyInfoQueryResponseVO responseVO = new PolicyInfoQueryResponseVO();
...@@ -135,53 +186,83 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -135,53 +186,83 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
public PayScaleQueryResponseVO payScaleListQuery(PayScaleQueryRequestVO requestVO) { public PayScaleQueryResponseVO payScaleListQuery(PayScaleQueryRequestVO requestVO) {
PayScaleQueryResponseVO responseVO = new PayScaleQueryResponseVO(); PayScaleQueryResponseVO responseVO = new PayScaleQueryResponseVO();
String practitionerIdEG = requestVO.getPractitionerIdEG(); String practitionerIdEG = requestVO.getPractitionerIdEG();
Long practitionerId = requestVO.getPractitionerId();
if(!Strings.isNullOrEmpty(practitionerIdEG) && practitionerId != null){ // 1.根据Agent_id当前经纪人的佣金明细
List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG); SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody = new SalaryDetailsSearchRequestBody();
if(!payScaleInfoListAll.isEmpty()){ salaryDetailsSearchRequestBody.setLoginName(practitionerIdEG);
Map<String,String> dtlTypeMap = new HashMap<>(); salaryDetailsSearchRequestBody.setSearchType("1");
Map<String,String> titleMap = new HashMap<>(); SalaryDetailsSearchResponseVO salaryDetailsSearchResponseVO = n22SalaryService.salaryDetailsSearch(salaryDetailsSearchRequestBody);
List<OptionsEGolden> optionsEGoldenList = mdDropOptionsDALService.findByMasterIdsE(Collections.singletonList(101));
optionsEGoldenList.forEach(i->dtlTypeMap.put(i.getOptAttr(),i.getOptName()));
List<OptionsEGolden> titleList = mdDropOptionsDALService.findAllTitleEG();
titleList.forEach(i->titleMap.put(i.getTitleCode(),i.getTitleName()));
Map<Long,PayScaleInfo> payScaleInfoMap = new HashMap<>();
PayScaleInfo payScaleInfo;
Long time;
for(PayScaleInfo item : payScaleInfoListAll){
time = item.getMonDtlPeriod();
if(payScaleInfoMap.containsKey(time)){
payScaleInfo = payScaleInfoMap.get(time);
calculateRAmount(payScaleInfo,item);
}else{
calculateRAmount(item,item);
item.setMonDtlItem("实发薪水");
payScaleInfoMap.put(time,item);
item.setDrpTitleCode(titleMap.get(item.getDrpTitleCode()));
item.setMonDtlType(dtlTypeMap.get(item.getMonDtlType()));
if (!"查询成功".equals(salaryDetailsSearchResponseVO.getResponseHead().getMessage())){
responseVO.setCommonResult(new CommonResult(false, "查询N22佣金明细列表错误"));
return responseVO;
} }
} List<SalaryDetails> salaryDetailsList = salaryDetailsSearchResponseVO.getResponseBody().getSalaryDetailsLIST();
//修改金钱格式
for(PayScaleInfo item : payScaleInfoListAll){
item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
}
List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values());
// 加入临时薪资表的数据 // list分组
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerId(practitionerId); Map<String, List<SalaryDetails>> group = this.groupByCheckDate(salaryDetailsList);
translateObj(list, resultList);
// 排序 // 组装返回参数
resultList.sort(Comparator.comparingLong(PayScaleInfo :: getMonDtlPeriod).reversed()); List<PayScaleInfo> resultList = new ArrayList<>();
responseVO.setPayScaleInfos(resultList); for (String key : group.keySet()) {
}
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000"))); System.out.println("Key = " + key);
}else{
String[] params = {"practitionerIdEG, practitionerId"}; List<SalaryDetails> list = group.get(key);
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610002", params))); // 计算每组应发佣金总和
Double monDtlAmount = this.getSummary(list);
PayScaleInfo payScaleInfo = new PayScaleInfo();
payScaleInfo.setMonDtlAmount(monDtlAmount);
payScaleInfo.setMonDtlItem("实发薪水");
payScaleInfo.setDrpTitleCode(list.get(0).getGrade());
payScaleInfo.setMonDtlPeriod(Integer.valueOf(key));
resultList.add(payScaleInfo);
} }
resultList.sort(Comparator.comparingInt(PayScaleInfo :: getMonDtlPeriod).reversed());
responseVO.setPayScaleInfos(resultList);
// if(!Strings.isNullOrEmpty(practitionerIdEG)){
// List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG);
// if(!payScaleInfoListAll.isEmpty()){
// Map<String,String> dtlTypeMap = new HashMap<>();
// Map<String,String> titleMap = new HashMap<>();
// List<OptionsEGolden> optionsEGoldenList = mdDropOptionsDALService.findByMasterIdsE(Collections.singletonList(101));
// optionsEGoldenList.forEach(i->dtlTypeMap.put(i.getOptAttr(),i.getOptName()));
// List<OptionsEGolden> titleList = mdDropOptionsDALService.findAllTitleEG();
// titleList.forEach(i->titleMap.put(i.getTitleCode(),i.getTitleName()));
// Map<Integer,PayScaleInfo> payScaleInfoMap = new HashMap<>();
// PayScaleInfo payScaleInfo;
// Integer time;
// for(PayScaleInfo item : payScaleInfoListAll){
// time = item.getMonDtlPeriod();
// if(payScaleInfoMap.containsKey(time)){
// payScaleInfo = payScaleInfoMap.get(time);
// calculateRAmount(payScaleInfo,item);
// }else{
// calculateRAmount(item,item);
// item.setMonDtlItem("实发薪水");
// payScaleInfoMap.put(time,item);
// item.setDrpTitleCode(titleMap.get(item.getDrpTitleCode()));
// item.setMonDtlType(dtlTypeMap.get(item.getMonDtlType()));
//
// }
// }
// //修改金钱格式
// for(PayScaleInfo item : payScaleInfoListAll){
// item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
// }
// List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values());
// resultList.sort(Comparator.comparingInt(PayScaleInfo :: getMonDtlPeriod).reversed());
// responseVO.setPayScaleInfos(resultList);
// }
// responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
// }else{
// String[] params = {"practitionerIdEG"};
// responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610002", params)));
// }
return responseVO; return responseVO;
} }
...@@ -199,6 +280,47 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -199,6 +280,47 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
} }
} }
private Double getSummary(List<SalaryDetails> list) {
Double sum = 0D;
for (SalaryDetails item : list) {
sum = BigDecimal.valueOf(item.getCommission())
.add(BigDecimal.valueOf(sum))
.doubleValue();
}
return sum;
}
/**
* 通过for循环逻辑,编程上会麻烦点,但是效率上高很多
*/
private Map<String, List<SalaryDetails>> groupByCheckDate(List<SalaryDetails> salaryDetailsList) {
Map<String, List<SalaryDetails>> result = new HashMap<String, List<SalaryDetails>>();
int year = 0;
String month = "";
String key = "";
for (SalaryDetails SalaryDetails : salaryDetailsList) {
year = SalaryDetails.getYear();
month = SalaryDetails.getMonth();
key = year + month;
List<SalaryDetails> childList = result.get(key);
if (childList == null) {
childList = new ArrayList<SalaryDetails>();
result.put(key, childList);
}
childList.add(SalaryDetails);
}
result.forEach((cc, list) -> {
System.out.println("CheckDate is:" + cc);
list.forEach((SalaryDetails) -> {
System.out.println("SalaryDetails is:" + SalaryDetails);
});
});
return result;
}
@Override @Override
public PayScalePdfResponseVO payScalePdf(PayScalePdfRequestVO requestVO) { public PayScalePdfResponseVO payScalePdf(PayScalePdfRequestVO requestVO) {
PayScalePdfResponseVO responseVO = new PayScalePdfResponseVO(); PayScalePdfResponseVO responseVO = new PayScalePdfResponseVO();
......
...@@ -52,6 +52,10 @@ import com.yd.dal.service.meta.MdDropOptionsDALService; ...@@ -52,6 +52,10 @@ import com.yd.dal.service.meta.MdDropOptionsDALService;
import com.yd.rmi.ali.mail.service.MailService; import com.yd.rmi.ali.mail.service.MailService;
import com.yd.rmi.ali.oss.service.OssService; import com.yd.rmi.ali.oss.service.OssService;
import com.yd.rmi.cache.SystemConfigService; import com.yd.rmi.cache.SystemConfigService;
import com.yd.rmi.n22.staff.pojo.GetStaffNewRequestBody;
import com.yd.rmi.n22.staff.pojo.GetStaffNewResponseVO;
import com.yd.rmi.n22.staff.pojo.Staff;
import com.yd.rmi.n22.staff.service.N22StaffService;
import com.yd.rmi.tencent.wechat.service.WechatService; import com.yd.rmi.tencent.wechat.service.WechatService;
import com.yd.rmi.tencent.wechat.vo.WeChatInfoByENV; import com.yd.rmi.tencent.wechat.vo.WeChatInfoByENV;
import com.yd.rmi.tencent.wechatinterf.pojo.ticket.TicketRequest; import com.yd.rmi.tencent.wechatinterf.pojo.ticket.TicketRequest;
...@@ -160,6 +164,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -160,6 +164,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private MktLeadsExpertAssignDALService mktLeadsExpertAssignDALService; private MktLeadsExpertAssignDALService mktLeadsExpertAssignDALService;
@Autowired @Autowired
private MailService mailService; private MailService mailService;
@Autowired
private N22StaffService n22StaffService;
@Override @Override
public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) { public PractitionerLoginResponseVO practitionerLogin(PractitionerLoginRequestVO requestVO) {
...@@ -183,7 +189,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -183,7 +189,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
isSpecial = mobileSpecials.contains(mobileNo); isSpecial = mobileSpecials.contains(mobileNo);
} }
// if(28L == practitionerType || isSpecial){//只有寿险的经纪人和注册为经纪人的员工才能登录 // if(28L == practitionerType || isSpecial){//只有寿险的经纪人和注册为经纪人的员工才能登录
PractitionerBasicInfo practitionerBasicInfo = aclPractitionerDALService.findByMobileNoE(mobileNo);
Long practitionerId = practitionerInfo.getPractitionerId(); Long practitionerId = practitionerInfo.getPractitionerId();
Long customerId = practitionerInfo.getCustomerId(); Long customerId = practitionerInfo.getCustomerId();
AclCustomer customer = aclCustomerDALService.findById(customerId); AclCustomer customer = aclCustomerDALService.findById(customerId);
...@@ -203,9 +208,24 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -203,9 +208,24 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
basicInfo.setSubordinateLeader(subordinateInfo.getSubordinateLeader()); basicInfo.setSubordinateLeader(subordinateInfo.getSubordinateLeader());
} }
} }
if(practitionerBasicInfo != null){
responseVO.setPractitionerIdEG(practitionerBasicInfo.getPractitionerId()); // 1.根据手机号查询经纪人在N22系统的Agent_id
GetStaffNewRequestBody getStaffNewRequestBody = new GetStaffNewRequestBody();
getStaffNewRequestBody.setMobile(mobileNo);
GetStaffNewResponseVO resp = n22StaffService.getStaffNew(getStaffNewRequestBody);
if(resp != null){
if ("查询成功".equals(resp.getResponseHead().getMessage())){
List<Staff> staffList = resp.getResponseBody().getStaff();
if (staffList.size() > 0) {
Staff staff = staffList.get(0);
String agent_id = staff.getAgent_id();
responseVO.setPractitionerIdEG(agent_id);
}
} }
}
//获取用户的登录次数 //获取用户的登录次数
List<AclCustomerLog> customerLogList = aclCustomerLogDALService.findLogInfoByCustomerId(customerId); List<AclCustomerLog> customerLogList = aclCustomerLogDALService.findLogInfoByCustomerId(customerId);
int logTimes = (customerLogList.isEmpty()) ? 0 : customerLogList.size(); int logTimes = (customerLogList.isEmpty()) ? 0 : customerLogList.size();
......
...@@ -21,7 +21,7 @@ public class N22Utils { ...@@ -21,7 +21,7 @@ public class N22Utils {
* @param requestJson 请求报文 * @param requestJson 请求报文
* @return 响应报文 * @return 响应报文
*/ */
private static String postTransaction(String url,String requestJson){ public static String postTransaction(String url,String requestJson){
String responseJson = null; String responseJson = null;
if(!Strings.isNullOrEmpty(url) && !Strings.isNullOrEmpty(requestJson)){ if(!Strings.isNullOrEmpty(url) && !Strings.isNullOrEmpty(requestJson)){
HttpClient httpClient = new HttpClient(); HttpClient httpClient = new HttpClient();
......
package com.yd.rmi.n22.policy.pojo.policylist; package com.yd.rmi.n22.policy.pojo.policylist;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data; import lombok.Data;
/** /**
...@@ -9,68 +10,68 @@ import lombok.Data; ...@@ -9,68 +10,68 @@ import lombok.Data;
@Data @Data
public class PolicyListQueryRequestBody { public class PolicyListQueryRequestBody {
@JsonProperty("epid") private String epid;//epid :saas为当前库的代码如_e00008 非saas忽略
private String epId;//epid :saas为当前库的代码如_e00008 非saas忽略
@JsonProperty("policyno") private String policyno;//保单号
private String policyNo;//保单号
@JsonProperty("policystatus") private String policystatus;//保单状态
private String policyStatus;//保单状态
@JsonProperty("staffInfo")
private String staffInfo;//可填员工内部唯一编号staffId private String staffInfo;//可填员工内部唯一编号staffId
@JsonProperty("loginname")
private String loginName;//登录工号 private String loginname;//登录工号
@JsonProperty("staff_name")
private String staffName;//员工姓名 private String staff_name;//员工姓名
@JsonProperty("staffInfo2")
private String staffInfo2;//MyPolicyType=1时,选填 private String staffInfo2;//MyPolicyType=1时,选填
@JsonProperty("insurance_guid")
private String insuranceGuid;//投保人唯一ID private String insurance_guid;//投保人唯一ID
@JsonProperty("insured_guid")
private String insuredGuid;//被保人唯一ID private String insured_guid;//被保人唯一ID
@JsonProperty("insurancename")
private String insuranceName;//投保人姓名 private String insurancename;//投保人姓名
@JsonProperty("insuredname")
private String insuredName;//被保人姓名 private String insuredname;//被保人姓名
@JsonProperty("starttime")
private String starttTime;//保险起期 private String starttime;//保险起期
@JsonProperty("endtime")
private String endTime;//保险止期 private String endtime;//保险止期
@JsonProperty("MyPolicyType")
private String myPolicyType;//我管的1、我的2 @JSONField(name="MyPolicyType")
@JsonProperty("RolegroupId") private String MyPolicyType;//我管的1、我的2
private String roleGroupId;//部门ID
@JsonProperty("IsInsuredArray") private String RolegroupId;//部门ID
private String IsInsuredArray;//是否需要被保人列表,1需要,0不需要 private String IsInsuredArray;//是否需要被保人列表,1需要,0不需要
@JsonProperty("product_name")
private String productName;//保单险种名称 private String product_name;//保单险种名称
@JsonProperty("order_player")
private String orderPlayer;//打单员 private String order_player;//打单员
@JsonProperty("MyTrustPolicy")
private String myTrustPolicy;//我托管的保单,填1查询,其他不查 private String MyTrustPolicy;//我托管的保单,填1查询,其他不查
@JsonProperty("chanelCode")
private String channelCode;//渠道编码 private String chanelCode;//渠道编码
@JsonProperty("buyer_id")
private String buyerId;//订单编号 private String buyer_id;//订单编号
@JsonProperty("relationType")
private String relationType;//保单关联人类型,保单投保人或被保人同: 1投保人,2投保人,3投保人或被保人 private String relationType;//保单关联人类型,保单投保人或被保人同: 1投保人,2投保人,3投保人或被保人
@JsonProperty("insuranceID")
private String insuranceID;//投保人证件号码 private String insuranceID;//投保人证件号码
@JsonProperty("insurdId")
private String insuredId;//被保人证件号码 private String insurdId;//被保人证件号码
@JsonProperty("beneficiary_GUID")
private String beneficiaryGUID;//受益人唯一ID private String beneficiary_GUID;//受益人唯一ID
@JsonProperty("beneficiaryName")
private String beneficiaryName;//受益人姓名 private String beneficiaryName;//受益人姓名
@JsonProperty("beneficiaryId")
private String beneficiaryId;//受益人证件号码 private String beneficiaryId;//受益人证件号码
@JsonProperty("source_code")
private String sourceCode;//保单来源,保单同步时会传进来 private String source_code;//保单来源,保单同步时会传进来
@JsonProperty("appl_num")
private String applyNum;//投保单号 private String appl_num;//投保单号
@JsonProperty("butler")
private String butler;//管家 private String butler;//管家
@JsonProperty("IsInsureArray")
private String isInsureArray;// private String IsInsureArray;//
} }
package com.yd.rmi.n22.policy.service;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryRequestBody;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryResponseVO;
public interface N22PolicyService {
PolicyListQueryResponseVO policyList(PolicyListQueryRequestBody requestBody);
}
package com.yd.rmi.n22.policy.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.yd.rmi.n22.common.utils.N22Utils;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryRequestBody;
import com.yd.rmi.n22.policy.pojo.policylist.PolicyListQueryResponseVO;
import com.yd.rmi.n22.policy.service.N22PolicyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.UUID;
@Service
public class N22PolicyServiceImpl implements N22PolicyService {
private final static Logger logger = LoggerFactory.getLogger(N22PolicyServiceImpl.class);
@Override
public PolicyListQueryResponseVO policyList(PolicyListQueryRequestBody requestBody) {
JSONObject obj = new JSONObject(); //传参
PolicyListQueryResponseVO rObj; //返回结果
JSONObject requestHead = new JSONObject();
requestHead.put("seqNo", UUID.randomUUID().toString());
obj.put("requestHead", requestHead);
obj.put("requestBody", requestBody);
logger.info("N22查询保单列表请求报文:"+obj.toString());
String url = "https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/PolicyList";
String result = N22Utils.postTransaction(url, obj.toString());
logger.info("N22查询保单列表响应报文:"+result);
rObj = JSONObject.parseObject(result, PolicyListQueryResponseVO.class);
return rObj;
}
}
package com.yd.rmi.n22.salary.pojo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
@Data
public class SalaryDetails {
private String SalaryName;
private String Appl_No;
private String CustomerName;
private String SalaryType;
private String PayPeriod;
private String Pol_Name_Chn;
private double commission;
private double tax_commission;
private int Tax;
private double AfterTaxCommissionTax;
private String GrantDate;
private String Paid_Status;
private int Year;
private String Month;
private String RoleGroupDescription;
private String LoginName;
private String StaffName;
@JSONField(name="Class")
private String grade;
private String AddFyc;
private int CheckStatus;
private String CheckDate;
}
package com.yd.rmi.n22.salary.pojo;
import lombok.Data;
@Data
public class SalaryDetailsSearchRequestBody {
private String Epid ; //saas为当前库的代码如_e00008 非saas忽略
private String LoginName; //员工工号(登录工号)
private String StartDate; //业绩开始时间,格式为:2019-02-01
private String EndDate; //业绩结束时间,格式为:2019-03-31
private String Paid_Status; //发放状态:0未生效,1未发放,2发放中,3.1已发放(paid不为空),3.2发放中(paid为空),4审核中
private String SearchType; //1.我的,2.我管的
private String CheckStatus; //对账状态:1对账,2未对账。
private String TokenID; //签名ID(待开发)
private String StaffID; //Staffed和loginname任一必填
}
package com.yd.rmi.n22.salary.pojo;
import lombok.Data;
import java.util.List;
@Data
public class SalaryDetailsSearchResponseBody {
private List<SalaryDetails> SalaryDetailsLIST;
}
package com.yd.rmi.n22.salary.pojo;
import com.yd.rmi.n22.common.pojo.ResponseHead;
public class SalaryDetailsSearchResponseVO {
private ResponseHead responseHead;
private SalaryDetailsSearchResponseBody responseBody;
public ResponseHead getResponseHead() {
return responseHead;
}
public void setResponseHead(ResponseHead responseHead) {
this.responseHead = responseHead;
}
public SalaryDetailsSearchResponseBody getResponseBody() {
return responseBody;
}
public void setResponseBody(SalaryDetailsSearchResponseBody responseBody) {
this.responseBody = responseBody;
}
}
package com.yd.rmi.n22.salary.service;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchRequestBody;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchResponseVO;
public interface N22SalaryService {
SalaryDetailsSearchResponseVO salaryDetailsSearch(SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody);
}
package com.yd.rmi.n22.salary.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.yd.rmi.n22.common.utils.N22Utils;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchRequestBody;
import com.yd.rmi.n22.salary.pojo.SalaryDetailsSearchResponseVO;
import com.yd.rmi.n22.salary.service.N22SalaryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.UUID;
@Service
public class N22SalaryServiceImpl implements N22SalaryService {
private final static Logger logger = LoggerFactory.getLogger(N22SalaryServiceImpl.class);
@Override
public SalaryDetailsSearchResponseVO salaryDetailsSearch(SalaryDetailsSearchRequestBody salaryDetailsSearchRequestBody) {
JSONObject obj = new JSONObject(); //传参
JSONObject rObj; //返回结果
JSONObject requestHead = new JSONObject();
requestHead.put("seqNo", UUID.randomUUID().toString());
obj.put("requestHead", requestHead);
obj.put("requestBody", salaryDetailsSearchRequestBody);
logger.info("N22佣金明细查询请求报文:"+obj.toString());
String url = "https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/SalaryDetailsSearch";
String result = N22Utils.postTransaction(url, obj.toString());
logger.info("N22佣金明细查询响应报文:"+result);
SalaryDetailsSearchResponseVO response = JSONObject.parseObject(result, SalaryDetailsSearchResponseVO.class);
return response;
}
}
package com.yd.rmi.n22.staff.pojo;
import lombok.Data;
@Data
public class GetStaffNewRequestBody {
private String epid; //默认空
private String staffname; ///销售姓名
private String loginname; //销售在本系统中的工号
private String mobile; //销售电话 与loginname任一必传
private String IdentifiedID; //身份证号码
private String mgnt_org_code; //所属机构
private String role; //人员角色
private String director_level; //总监等级
private String OrgAgentRole; //机构负责人角色
private String Rolegroup_id; //员工所在的组ID
private String Channel_id; //根据渠道id可找到渠道所关联的渠道机构下的的人员信息
private String Employeddate_start; //入职时间(起)
private String Employeddate_end; //入职时间(止)
private String createddate_start; //创建时间(起)
private String createddate_end; //创建时间(止)
private String modifieddate_start; //修改时间(起)
private String modifieddate_end; //修改时间(止)
}
package com.yd.rmi.n22.staff.pojo;
import lombok.Data;
import java.util.List;
@Data
public class GetStaffNewResponseBody {
private List<Staff> staff;
}
package com.yd.rmi.n22.staff.pojo;
import com.yd.rmi.n22.common.pojo.ResponseHead;
public class GetStaffNewResponseVO {
private ResponseHead responseHead;
private GetStaffNewResponseBody responseBody;
public ResponseHead getResponseHead() {
return responseHead;
}
public void setResponseHead(ResponseHead responseHead) {
this.responseHead = responseHead;
}
public GetStaffNewResponseBody getResponseBody() {
return responseBody;
}
public void setResponseBody(GetStaffNewResponseBody responseBody) {
this.responseBody = responseBody;
}
}
package com.yd.rmi.n22.staff.pojo;
import com.yd.rmi.n22.organization.pojo.Role;
import java.util.List;
public class Staff {
private String staffname;
private String Staff_id;
private String Agent_id;
private String defaultrolegroup;
private String defaultrolegroupdesc;
private String CERTI_CODE;
private String CERTI_TYPE;
private String CERTI_LIFE;
private String Workstatus;
private String password;
private String E_mail;
private String fax;
private String gender;
private String mobile;
private String qq;
private String Tel_1;
private String Tel_2;
private String birthday;
private int age;
private String province_id;
private String province;
private String city_id;
private String city;
private String area_id;
private String area;
private String address;
private String zipcode;
private String weixinid;
private String createddate;
private String modifieddate;
private String createdby;
private String modifiedby;
private String ACCOUNT_TYPE;
private String JOIN_TIME;
private String LEAVE_TIME;
private String NATIONALITY;
private String NATION;
private String POLITICAL_STATUS;
private String HOUSEHOLD_REGISTER;
private String HOUSEHOLD_TYPE;
private String ID_DETAIL_ADDRESS;
private String JOB;
private String QUALIF_NO;
private String QUALIF_LEVEL;
private String JOB_LEVEL;
private String PROFESSION;
private String PHOTO;
private String TEAM_CODE;
private String CHANNEL_CODE;
private String SURNAME;
private String USER_CODE;
private String NAME;
private String EDU_DEGREE;
private String WORKING_YEARS;
private String DUTY_DATE;
private String VIRTUAL_FLAG;
private String IC_FLAG;
private String OPEN_DATE;
private String CLOSE_DATE;
private String MGNT_ORG_CODE;
private String AGENTCODE;
private String ENGLISH_NAME;
private String MARITAL_STATUS;
private String citycode;
private String LIVING_WAY;
private String HIGHEST_EDUCATION;
private String GRADUATE_INSTITUTIONS;
private String GRADUATION_TIME;
private String ENGLISH_LEVEL;
private String FIRST_JOB_TIME;
private String WITHDRAW_PARTY_TIME;
private String RANK;
private String JOB_MARKET;
private String JOB_MARKET_DETAIL_ADDRESS;
private String CENTER_COST;
private String SALARY;
private String HIGHER_UP_EMPNO;
private String HIGHER_UP_NAME;
private String PROBATION_PERIOD;
private String CONTRACT_EXPIRATION_DATE;
private String LEAVE_OFFICE_PROPERTY;
private String LEAVE_OFFICE_REASON;
private String CONTRACT_TYPE;
private String PROBATION_DEADLINE_DATE;
private String EMERGENCY_CONTACTS_NAME;
private String EMERGENCY_CONTACTS_TELEPHONE;
private int PROFESSION_LEVEL;
private int issupervisor;
private String PREPPARTYMEMBER_PROMOTION_TIME;
private String PARTY_TIME;
private String PAY_CATEGORY;
private String title;
private String PROGRAMMING_CODE;
private String BEFORE_WORK_UNIT;
private String WORK_YEAR;
private String loginname;
private String contract_startdate;
private String contract_enddate;
private String insurance_type;
private String own_ivcode;
private String mate_name;
private String honor;
private String motto;
private String principle;
private String vision;
private String mate_phone;
private String recent_work;
private String oldwork_startdate;
private String oldwork_enddate;
private String practice_number;
private String practice_starttime;
private String practice_endtime;
private String social_security;
private String Health;
private String bankno;
private String bank_code;
private String bankname;
private String banknote;
private String TARGET;
private String train_startdate;
private String exam_enddate;
private String exam_result;
private String RecommenderCode;
private String RecommenderName;
private String Recommender2Code;
private String Recommender2Name;
private String StringField1;
private String StringField2;
private String StringField3;
private String StringField4;
private String StringField5;
private String StringField6;
private String StringField7;
private String StringField8;
private String StringField9;
private String StringField10;
private List<Role> role;
private List<String> companyAccount;
private String director;
private String OrgAgent;
public void setStaffname(String staffname){
this.staffname = staffname;
}
public String getStaffname(){
return this.staffname;
}
public void setStaff_id(String Staff_id){
this.Staff_id = Staff_id;
}
public String getStaff_id(){
return this.Staff_id;
}
public void setAgent_id(String Agent_id){
this.Agent_id = Agent_id;
}
public String getAgent_id(){
return this.Agent_id;
}
public void setDefaultrolegroup(String defaultrolegroup){
this.defaultrolegroup = defaultrolegroup;
}
public String getDefaultrolegroup(){
return this.defaultrolegroup;
}
public void setDefaultrolegroupdesc(String defaultrolegroupdesc){
this.defaultrolegroupdesc = defaultrolegroupdesc;
}
public String getDefaultrolegroupdesc(){
return this.defaultrolegroupdesc;
}
public void setCERTI_CODE(String CERTI_CODE){
this.CERTI_CODE = CERTI_CODE;
}
public String getCERTI_CODE(){
return this.CERTI_CODE;
}
public void setCERTI_TYPE(String CERTI_TYPE){
this.CERTI_TYPE = CERTI_TYPE;
}
public String getCERTI_TYPE(){
return this.CERTI_TYPE;
}
public void setCERTI_LIFE(String CERTI_LIFE){
this.CERTI_LIFE = CERTI_LIFE;
}
public String getCERTI_LIFE(){
return this.CERTI_LIFE;
}
public void setWorkstatus(String Workstatus){
this.Workstatus = Workstatus;
}
public String getWorkstatus(){
return this.Workstatus;
}
public void setPassword(String password){
this.password = password;
}
public String getPassword(){
return this.password;
}
public void setE_mail(String E_mail){
this.E_mail = E_mail;
}
public String getE_mail(){
return this.E_mail;
}
public void setFax(String fax){
this.fax = fax;
}
public String getFax(){
return this.fax;
}
public void setGender(String gender){
this.gender = gender;
}
public String getGender(){
return this.gender;
}
public void setMobile(String mobile){
this.mobile = mobile;
}
public String getMobile(){
return this.mobile;
}
public void setQq(String qq){
this.qq = qq;
}
public String getQq(){
return this.qq;
}
public void setTel_1(String Tel_1){
this.Tel_1 = Tel_1;
}
public String getTel_1(){
return this.Tel_1;
}
public void setTel_2(String Tel_2){
this.Tel_2 = Tel_2;
}
public String getTel_2(){
return this.Tel_2;
}
public void setBirthday(String birthday){
this.birthday = birthday;
}
public String getBirthday(){
return this.birthday;
}
public void setAge(int age){
this.age = age;
}
public int getAge(){
return this.age;
}
public void setProvince_id(String province_id){
this.province_id = province_id;
}
public String getProvince_id(){
return this.province_id;
}
public void setProvince(String province){
this.province = province;
}
public String getProvince(){
return this.province;
}
public void setCity_id(String city_id){
this.city_id = city_id;
}
public String getCity_id(){
return this.city_id;
}
public void setCity(String city){
this.city = city;
}
public String getCity(){
return this.city;
}
public void setArea_id(String area_id){
this.area_id = area_id;
}
public String getArea_id(){
return this.area_id;
}
public void setArea(String area){
this.area = area;
}
public String getArea(){
return this.area;
}
public void setAddress(String address){
this.address = address;
}
public String getAddress(){
return this.address;
}
public void setZipcode(String zipcode){
this.zipcode = zipcode;
}
public String getZipcode(){
return this.zipcode;
}
public void setWeixinid(String weixinid){
this.weixinid = weixinid;
}
public String getWeixinid(){
return this.weixinid;
}
public void setCreateddate(String createddate){
this.createddate = createddate;
}
public String getCreateddate(){
return this.createddate;
}
public void setModifieddate(String modifieddate){
this.modifieddate = modifieddate;
}
public String getModifieddate(){
return this.modifieddate;
}
public void setCreatedby(String createdby){
this.createdby = createdby;
}
public String getCreatedby(){
return this.createdby;
}
public void setModifiedby(String modifiedby){
this.modifiedby = modifiedby;
}
public String getModifiedby(){
return this.modifiedby;
}
public void setACCOUNT_TYPE(String ACCOUNT_TYPE){
this.ACCOUNT_TYPE = ACCOUNT_TYPE;
}
public String getACCOUNT_TYPE(){
return this.ACCOUNT_TYPE;
}
public void setJOIN_TIME(String JOIN_TIME){
this.JOIN_TIME = JOIN_TIME;
}
public String getJOIN_TIME(){
return this.JOIN_TIME;
}
public void setLEAVE_TIME(String LEAVE_TIME){
this.LEAVE_TIME = LEAVE_TIME;
}
public String getLEAVE_TIME(){
return this.LEAVE_TIME;
}
public void setNATIONALITY(String NATIONALITY){
this.NATIONALITY = NATIONALITY;
}
public String getNATIONALITY(){
return this.NATIONALITY;
}
public void setNATION(String NATION){
this.NATION = NATION;
}
public String getNATION(){
return this.NATION;
}
public void setPOLITICAL_STATUS(String POLITICAL_STATUS){
this.POLITICAL_STATUS = POLITICAL_STATUS;
}
public String getPOLITICAL_STATUS(){
return this.POLITICAL_STATUS;
}
public void setHOUSEHOLD_REGISTER(String HOUSEHOLD_REGISTER){
this.HOUSEHOLD_REGISTER = HOUSEHOLD_REGISTER;
}
public String getHOUSEHOLD_REGISTER(){
return this.HOUSEHOLD_REGISTER;
}
public void setHOUSEHOLD_TYPE(String HOUSEHOLD_TYPE){
this.HOUSEHOLD_TYPE = HOUSEHOLD_TYPE;
}
public String getHOUSEHOLD_TYPE(){
return this.HOUSEHOLD_TYPE;
}
public void setID_DETAIL_ADDRESS(String ID_DETAIL_ADDRESS){
this.ID_DETAIL_ADDRESS = ID_DETAIL_ADDRESS;
}
public String getID_DETAIL_ADDRESS(){
return this.ID_DETAIL_ADDRESS;
}
public void setJOB(String JOB){
this.JOB = JOB;
}
public String getJOB(){
return this.JOB;
}
public void setQUALIF_NO(String QUALIF_NO){
this.QUALIF_NO = QUALIF_NO;
}
public String getQUALIF_NO(){
return this.QUALIF_NO;
}
public void setQUALIF_LEVEL(String QUALIF_LEVEL){
this.QUALIF_LEVEL = QUALIF_LEVEL;
}
public String getQUALIF_LEVEL(){
return this.QUALIF_LEVEL;
}
public void setJOB_LEVEL(String JOB_LEVEL){
this.JOB_LEVEL = JOB_LEVEL;
}
public String getJOB_LEVEL(){
return this.JOB_LEVEL;
}
public void setPROFESSION(String PROFESSION){
this.PROFESSION = PROFESSION;
}
public String getPROFESSION(){
return this.PROFESSION;
}
public void setPHOTO(String PHOTO){
this.PHOTO = PHOTO;
}
public String getPHOTO(){
return this.PHOTO;
}
public void setTEAM_CODE(String TEAM_CODE){
this.TEAM_CODE = TEAM_CODE;
}
public String getTEAM_CODE(){
return this.TEAM_CODE;
}
public void setCHANNEL_CODE(String CHANNEL_CODE){
this.CHANNEL_CODE = CHANNEL_CODE;
}
public String getCHANNEL_CODE(){
return this.CHANNEL_CODE;
}
public void setSURNAME(String SURNAME){
this.SURNAME = SURNAME;
}
public String getSURNAME(){
return this.SURNAME;
}
public void setUSER_CODE(String USER_CODE){
this.USER_CODE = USER_CODE;
}
public String getUSER_CODE(){
return this.USER_CODE;
}
public void setNAME(String NAME){
this.NAME = NAME;
}
public String getNAME(){
return this.NAME;
}
public void setEDU_DEGREE(String EDU_DEGREE){
this.EDU_DEGREE = EDU_DEGREE;
}
public String getEDU_DEGREE(){
return this.EDU_DEGREE;
}
public void setWORKING_YEARS(String WORKING_YEARS){
this.WORKING_YEARS = WORKING_YEARS;
}
public String getWORKING_YEARS(){
return this.WORKING_YEARS;
}
public void setDUTY_DATE(String DUTY_DATE){
this.DUTY_DATE = DUTY_DATE;
}
public String getDUTY_DATE(){
return this.DUTY_DATE;
}
public void setVIRTUAL_FLAG(String VIRTUAL_FLAG){
this.VIRTUAL_FLAG = VIRTUAL_FLAG;
}
public String getVIRTUAL_FLAG(){
return this.VIRTUAL_FLAG;
}
public void setIC_FLAG(String IC_FLAG){
this.IC_FLAG = IC_FLAG;
}
public String getIC_FLAG(){
return this.IC_FLAG;
}
public void setOPEN_DATE(String OPEN_DATE){
this.OPEN_DATE = OPEN_DATE;
}
public String getOPEN_DATE(){
return this.OPEN_DATE;
}
public void setCLOSE_DATE(String CLOSE_DATE){
this.CLOSE_DATE = CLOSE_DATE;
}
public String getCLOSE_DATE(){
return this.CLOSE_DATE;
}
public void setMGNT_ORG_CODE(String MGNT_ORG_CODE){
this.MGNT_ORG_CODE = MGNT_ORG_CODE;
}
public String getMGNT_ORG_CODE(){
return this.MGNT_ORG_CODE;
}
public void setAGENTCODE(String AGENTCODE){
this.AGENTCODE = AGENTCODE;
}
public String getAGENTCODE(){
return this.AGENTCODE;
}
public void setENGLISH_NAME(String ENGLISH_NAME){
this.ENGLISH_NAME = ENGLISH_NAME;
}
public String getENGLISH_NAME(){
return this.ENGLISH_NAME;
}
public void setMARITAL_STATUS(String MARITAL_STATUS){
this.MARITAL_STATUS = MARITAL_STATUS;
}
public String getMARITAL_STATUS(){
return this.MARITAL_STATUS;
}
public void setCitycode(String citycode){
this.citycode = citycode;
}
public String getCitycode(){
return this.citycode;
}
public void setLIVING_WAY(String LIVING_WAY){
this.LIVING_WAY = LIVING_WAY;
}
public String getLIVING_WAY(){
return this.LIVING_WAY;
}
public void setHIGHEST_EDUCATION(String HIGHEST_EDUCATION){
this.HIGHEST_EDUCATION = HIGHEST_EDUCATION;
}
public String getHIGHEST_EDUCATION(){
return this.HIGHEST_EDUCATION;
}
public void setGRADUATE_INSTITUTIONS(String GRADUATE_INSTITUTIONS){
this.GRADUATE_INSTITUTIONS = GRADUATE_INSTITUTIONS;
}
public String getGRADUATE_INSTITUTIONS(){
return this.GRADUATE_INSTITUTIONS;
}
public void setGRADUATION_TIME(String GRADUATION_TIME){
this.GRADUATION_TIME = GRADUATION_TIME;
}
public String getGRADUATION_TIME(){
return this.GRADUATION_TIME;
}
public void setENGLISH_LEVEL(String ENGLISH_LEVEL){
this.ENGLISH_LEVEL = ENGLISH_LEVEL;
}
public String getENGLISH_LEVEL(){
return this.ENGLISH_LEVEL;
}
public void setFIRST_JOB_TIME(String FIRST_JOB_TIME){
this.FIRST_JOB_TIME = FIRST_JOB_TIME;
}
public String getFIRST_JOB_TIME(){
return this.FIRST_JOB_TIME;
}
public void setWITHDRAW_PARTY_TIME(String WITHDRAW_PARTY_TIME){
this.WITHDRAW_PARTY_TIME = WITHDRAW_PARTY_TIME;
}
public String getWITHDRAW_PARTY_TIME(){
return this.WITHDRAW_PARTY_TIME;
}
public void setRANK(String RANK){
this.RANK = RANK;
}
public String getRANK(){
return this.RANK;
}
public void setJOB_MARKET(String JOB_MARKET){
this.JOB_MARKET = JOB_MARKET;
}
public String getJOB_MARKET(){
return this.JOB_MARKET;
}
public void setJOB_MARKET_DETAIL_ADDRESS(String JOB_MARKET_DETAIL_ADDRESS){
this.JOB_MARKET_DETAIL_ADDRESS = JOB_MARKET_DETAIL_ADDRESS;
}
public String getJOB_MARKET_DETAIL_ADDRESS(){
return this.JOB_MARKET_DETAIL_ADDRESS;
}
public void setCENTER_COST(String CENTER_COST){
this.CENTER_COST = CENTER_COST;
}
public String getCENTER_COST(){
return this.CENTER_COST;
}
public void setSALARY(String SALARY){
this.SALARY = SALARY;
}
public String getSALARY(){
return this.SALARY;
}
public void setHIGHER_UP_EMPNO(String HIGHER_UP_EMPNO){
this.HIGHER_UP_EMPNO = HIGHER_UP_EMPNO;
}
public String getHIGHER_UP_EMPNO(){
return this.HIGHER_UP_EMPNO;
}
public void setHIGHER_UP_NAME(String HIGHER_UP_NAME){
this.HIGHER_UP_NAME = HIGHER_UP_NAME;
}
public String getHIGHER_UP_NAME(){
return this.HIGHER_UP_NAME;
}
public void setPROBATION_PERIOD(String PROBATION_PERIOD){
this.PROBATION_PERIOD = PROBATION_PERIOD;
}
public String getPROBATION_PERIOD(){
return this.PROBATION_PERIOD;
}
public void setCONTRACT_EXPIRATION_DATE(String CONTRACT_EXPIRATION_DATE){
this.CONTRACT_EXPIRATION_DATE = CONTRACT_EXPIRATION_DATE;
}
public String getCONTRACT_EXPIRATION_DATE(){
return this.CONTRACT_EXPIRATION_DATE;
}
public void setLEAVE_OFFICE_PROPERTY(String LEAVE_OFFICE_PROPERTY){
this.LEAVE_OFFICE_PROPERTY = LEAVE_OFFICE_PROPERTY;
}
public String getLEAVE_OFFICE_PROPERTY(){
return this.LEAVE_OFFICE_PROPERTY;
}
public void setLEAVE_OFFICE_REASON(String LEAVE_OFFICE_REASON){
this.LEAVE_OFFICE_REASON = LEAVE_OFFICE_REASON;
}
public String getLEAVE_OFFICE_REASON(){
return this.LEAVE_OFFICE_REASON;
}
public void setCONTRACT_TYPE(String CONTRACT_TYPE){
this.CONTRACT_TYPE = CONTRACT_TYPE;
}
public String getCONTRACT_TYPE(){
return this.CONTRACT_TYPE;
}
public void setPROBATION_DEADLINE_DATE(String PROBATION_DEADLINE_DATE){
this.PROBATION_DEADLINE_DATE = PROBATION_DEADLINE_DATE;
}
public String getPROBATION_DEADLINE_DATE(){
return this.PROBATION_DEADLINE_DATE;
}
public void setEMERGENCY_CONTACTS_NAME(String EMERGENCY_CONTACTS_NAME){
this.EMERGENCY_CONTACTS_NAME = EMERGENCY_CONTACTS_NAME;
}
public String getEMERGENCY_CONTACTS_NAME(){
return this.EMERGENCY_CONTACTS_NAME;
}
public void setEMERGENCY_CONTACTS_TELEPHONE(String EMERGENCY_CONTACTS_TELEPHONE){
this.EMERGENCY_CONTACTS_TELEPHONE = EMERGENCY_CONTACTS_TELEPHONE;
}
public String getEMERGENCY_CONTACTS_TELEPHONE(){
return this.EMERGENCY_CONTACTS_TELEPHONE;
}
public void setPROFESSION_LEVEL(int PROFESSION_LEVEL){
this.PROFESSION_LEVEL = PROFESSION_LEVEL;
}
public int getPROFESSION_LEVEL(){
return this.PROFESSION_LEVEL;
}
public void setIssupervisor(int issupervisor){
this.issupervisor = issupervisor;
}
public int getIssupervisor(){
return this.issupervisor;
}
public void setPREPPARTYMEMBER_PROMOTION_TIME(String PREPPARTYMEMBER_PROMOTION_TIME){
this.PREPPARTYMEMBER_PROMOTION_TIME = PREPPARTYMEMBER_PROMOTION_TIME;
}
public String getPREPPARTYMEMBER_PROMOTION_TIME(){
return this.PREPPARTYMEMBER_PROMOTION_TIME;
}
public void setPARTY_TIME(String PARTY_TIME){
this.PARTY_TIME = PARTY_TIME;
}
public String getPARTY_TIME(){
return this.PARTY_TIME;
}
public void setPAY_CATEGORY(String PAY_CATEGORY){
this.PAY_CATEGORY = PAY_CATEGORY;
}
public String getPAY_CATEGORY(){
return this.PAY_CATEGORY;
}
public void setTitle(String title){
this.title = title;
}
public String getTitle(){
return this.title;
}
public void setPROGRAMMING_CODE(String PROGRAMMING_CODE){
this.PROGRAMMING_CODE = PROGRAMMING_CODE;
}
public String getPROGRAMMING_CODE(){
return this.PROGRAMMING_CODE;
}
public void setBEFORE_WORK_UNIT(String BEFORE_WORK_UNIT){
this.BEFORE_WORK_UNIT = BEFORE_WORK_UNIT;
}
public String getBEFORE_WORK_UNIT(){
return this.BEFORE_WORK_UNIT;
}
public void setWORK_YEAR(String WORK_YEAR){
this.WORK_YEAR = WORK_YEAR;
}
public String getWORK_YEAR(){
return this.WORK_YEAR;
}
public void setLoginname(String loginname){
this.loginname = loginname;
}
public String getLoginname(){
return this.loginname;
}
public void setContract_startdate(String contract_startdate){
this.contract_startdate = contract_startdate;
}
public String getContract_startdate(){
return this.contract_startdate;
}
public void setContract_enddate(String contract_enddate){
this.contract_enddate = contract_enddate;
}
public String getContract_enddate(){
return this.contract_enddate;
}
public void setInsurance_type(String insurance_type){
this.insurance_type = insurance_type;
}
public String getInsurance_type(){
return this.insurance_type;
}
public void setOwn_ivcode(String own_ivcode){
this.own_ivcode = own_ivcode;
}
public String getOwn_ivcode(){
return this.own_ivcode;
}
public void setMate_name(String mate_name){
this.mate_name = mate_name;
}
public String getMate_name(){
return this.mate_name;
}
public void setHonor(String honor){
this.honor = honor;
}
public String getHonor(){
return this.honor;
}
public void setMotto(String motto){
this.motto = motto;
}
public String getMotto(){
return this.motto;
}
public void setPrinciple(String principle){
this.principle = principle;
}
public String getPrinciple(){
return this.principle;
}
public void setVision(String vision){
this.vision = vision;
}
public String getVision(){
return this.vision;
}
public void setMate_phone(String mate_phone){
this.mate_phone = mate_phone;
}
public String getMate_phone(){
return this.mate_phone;
}
public void setRecent_work(String recent_work){
this.recent_work = recent_work;
}
public String getRecent_work(){
return this.recent_work;
}
public void setOldwork_startdate(String oldwork_startdate){
this.oldwork_startdate = oldwork_startdate;
}
public String getOldwork_startdate(){
return this.oldwork_startdate;
}
public void setOldwork_enddate(String oldwork_enddate){
this.oldwork_enddate = oldwork_enddate;
}
public String getOldwork_enddate(){
return this.oldwork_enddate;
}
public void setPractice_number(String practice_number){
this.practice_number = practice_number;
}
public String getPractice_number(){
return this.practice_number;
}
public void setPractice_starttime(String practice_starttime){
this.practice_starttime = practice_starttime;
}
public String getPractice_starttime(){
return this.practice_starttime;
}
public void setPractice_endtime(String practice_endtime){
this.practice_endtime = practice_endtime;
}
public String getPractice_endtime(){
return this.practice_endtime;
}
public void setSocial_security(String social_security){
this.social_security = social_security;
}
public String getSocial_security(){
return this.social_security;
}
public void setHealth(String Health){
this.Health = Health;
}
public String getHealth(){
return this.Health;
}
public void setBankno(String bankno){
this.bankno = bankno;
}
public String getBankno(){
return this.bankno;
}
public void setBank_code(String bank_code){
this.bank_code = bank_code;
}
public String getBank_code(){
return this.bank_code;
}
public void setBankname(String bankname){
this.bankname = bankname;
}
public String getBankname(){
return this.bankname;
}
public void setBanknote(String banknote){
this.banknote = banknote;
}
public String getBanknote(){
return this.banknote;
}
public void setTARGET(String TARGET){
this.TARGET = TARGET;
}
public String getTARGET(){
return this.TARGET;
}
public void setTrain_startdate(String train_startdate){
this.train_startdate = train_startdate;
}
public String getTrain_startdate(){
return this.train_startdate;
}
public void setExam_enddate(String exam_enddate){
this.exam_enddate = exam_enddate;
}
public String getExam_enddate(){
return this.exam_enddate;
}
public void setExam_result(String exam_result){
this.exam_result = exam_result;
}
public String getExam_result(){
return this.exam_result;
}
public void setRecommenderCode(String RecommenderCode){
this.RecommenderCode = RecommenderCode;
}
public String getRecommenderCode(){
return this.RecommenderCode;
}
public void setRecommenderName(String RecommenderName){
this.RecommenderName = RecommenderName;
}
public String getRecommenderName(){
return this.RecommenderName;
}
public void setRecommender2Code(String Recommender2Code){
this.Recommender2Code = Recommender2Code;
}
public String getRecommender2Code(){
return this.Recommender2Code;
}
public void setRecommender2Name(String Recommender2Name){
this.Recommender2Name = Recommender2Name;
}
public String getRecommender2Name(){
return this.Recommender2Name;
}
public void setStringField1(String StringField1){
this.StringField1 = StringField1;
}
public String getStringField1(){
return this.StringField1;
}
public void setStringField2(String StringField2){
this.StringField2 = StringField2;
}
public String getStringField2(){
return this.StringField2;
}
public void setStringField3(String StringField3){
this.StringField3 = StringField3;
}
public String getStringField3(){
return this.StringField3;
}
public void setStringField4(String StringField4){
this.StringField4 = StringField4;
}
public String getStringField4(){
return this.StringField4;
}
public void setStringField5(String StringField5){
this.StringField5 = StringField5;
}
public String getStringField5(){
return this.StringField5;
}
public void setStringField6(String StringField6){
this.StringField6 = StringField6;
}
public String getStringField6(){
return this.StringField6;
}
public void setStringField7(String StringField7){
this.StringField7 = StringField7;
}
public String getStringField7(){
return this.StringField7;
}
public void setStringField8(String StringField8){
this.StringField8 = StringField8;
}
public String getStringField8(){
return this.StringField8;
}
public void setStringField9(String StringField9){
this.StringField9 = StringField9;
}
public String getStringField9(){
return this.StringField9;
}
public void setStringField10(String StringField10){
this.StringField10 = StringField10;
}
public String getStringField10(){
return this.StringField10;
}
public void setRole(List<Role> role){
this.role = role;
}
public List<Role> getRole(){
return this.role;
}
public void setCompanyAccount(List<String> companyAccount){
this.companyAccount = companyAccount;
}
public List<String> getCompanyAccount(){
return this.companyAccount;
}
public void setDirector(String director){
this.director = director;
}
public String getDirector(){
return this.director;
}
public void setOrgAgent(String OrgAgent){
this.OrgAgent = OrgAgent;
}
public String getOrgAgent(){
return this.OrgAgent;
}
}
package com.yd.rmi.n22.staff.service;
import com.yd.rmi.n22.staff.pojo.GetStaffNewRequestBody;
import com.yd.rmi.n22.staff.pojo.GetStaffNewResponseVO;
public interface N22StaffService {
GetStaffNewResponseVO getStaffNew(GetStaffNewRequestBody getStaffNewRequestBody);
}
package com.yd.rmi.n22.staff.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.yd.rmi.n22.common.utils.N22Utils;
import com.yd.rmi.n22.policy.service.impl.N22PolicyServiceImpl;
import com.yd.rmi.n22.staff.pojo.GetStaffNewRequestBody;
import com.yd.rmi.n22.staff.pojo.GetStaffNewResponseVO;
import com.yd.rmi.n22.staff.pojo.Staff;
import com.yd.rmi.n22.staff.service.N22StaffService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.UUID;
@Service
public class N22StaffServiceImpl implements N22StaffService {
private final static Logger logger = LoggerFactory.getLogger(N22PolicyServiceImpl.class);
@Override
public GetStaffNewResponseVO getStaffNew(GetStaffNewRequestBody getStaffNewRequestBody) {
JSONObject obj = new JSONObject(); //传参
JSONObject rObj; //返回结果
JSONObject requestHead = new JSONObject();
requestHead.put("seqNo", UUID.randomUUID().toString());
obj.put("requestHead", requestHead);
obj.put("requestBody", getStaffNewRequestBody);
logger.info("N22查询保单列表请求报文:"+obj.toString());
String url = "https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/getStaffNew";
String result = N22Utils.postTransaction(url, obj.toString());
logger.info("N22查询保单列表响应报文:"+result);
GetStaffNewResponseVO response = JSONObject.parseObject(result, GetStaffNewResponseVO.class);
return response;
}
}
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