Commit 2c250661 by jianan

【ydlife】-【客户管理】-藏蕊的被保人的问题

parent b2a121a0
......@@ -21,10 +21,7 @@ import com.yd.api.practitioner.vo.policy.PolicyListQueryRequestVO;
import com.yd.api.practitioner.vo.policy.PolicyListQueryResponseVO;
import com.yd.api.practitioner.vo.policy.policyinfoquery.PolicyInfoQueryRequestVO;
import com.yd.api.practitioner.vo.policy.policyinfoquery.PolicyInfoQueryResponseVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryCustomerHolderListResponesVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryCustomerInsuredListResponesVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryPolicyListByHolderCustomerIdRequestVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryPolicyListByHolderCustomerIdResponesVO;
import com.yd.api.practitioner.vo.practitionerCustomer.*;
import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO;
import com.yd.api.practitioner.vo.recruit.*;
......@@ -658,10 +655,10 @@ public class PractitionerController {
return result;
}
@RequestMapping("/queryCustomerInsuredList/{customerId}")
public Object queryCustomerInsuredList(@PathVariable Long customerId) {
@RequestMapping("/queryCustomerInsuredList")
public Object queryCustomerInsuredList(@RequestBody QueryCustomerInsuredListRequestVO requestVO) {
JsonResult result = new JsonResult();
QueryCustomerInsuredListResponesVO responseVO = practitionerService.queryCustomerInsuredList(customerId);
QueryCustomerInsuredListResponesVO responseVO = practitionerService.queryCustomerInsuredList(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
......
package com.yd.api.practitioner.service;
import com.yd.api.practitioner.vo.login.CanSeeSalaryListResponseVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryCustomerHolderListResponesVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryCustomerInsuredListResponesVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryPolicyListByHolderCustomerIdRequestVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryPolicyListByHolderCustomerIdResponesVO;
import com.yd.api.practitioner.vo.practitionerCustomer.*;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsActionsUpdateResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
......@@ -239,7 +236,7 @@ public interface PractitionerService {
QueryCustomerHolderListResponesVO queryCustomerHolderList(Long practitionerId);
QueryCustomerInsuredListResponesVO queryCustomerInsuredList(Long customerId);
QueryCustomerInsuredListResponesVO queryCustomerInsuredList(QueryCustomerInsuredListRequestVO requestVO);
QueryPolicyListByHolderCustomerIdResponesVO queryPolicyListByHolderCustomerId(QueryPolicyListByHolderCustomerIdRequestVO requestVO);
}
......@@ -2116,11 +2116,11 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
@Override
public QueryCustomerInsuredListResponesVO queryCustomerInsuredList(Long customerId) {
public QueryCustomerInsuredListResponesVO queryCustomerInsuredList(QueryCustomerInsuredListRequestVO requestVO) {
QueryCustomerInsuredListResponesVO resp = new QueryCustomerInsuredListResponesVO();
resp.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("820001")));
if (customerId != null) {
List<CustomerHolder> list = aclPolicyholderMapper.queryInsuredListByHolderCustomerId(customerId);
if (requestVO != null) {
List<CustomerHolder> list = aclPolicyholderMapper.queryInsuredListByHolderCustomerId(requestVO);
// 如果姓名,出生日期为空就去查ag_acl_policyholder表的记录
this.completeCustomerHolder(list, 3);
......
package com.yd.api.practitioner.vo.practitionerCustomer;
import lombok.Data;
@Data
public class QueryCustomerInsuredListRequestVO {
private Long practitionerCustomerId;
private Long holderCustomerId;
}
package com.yd.dal.mapper.customer;
import com.yd.api.practitioner.vo.practitionerCustomer.CustomerHolder;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryCustomerInsuredListRequestVO;
import com.yd.api.practitioner.vo.practitionerCustomer.QueryPolicyListByHolderCustomerIdRequestVO;
import com.yd.dal.entity.customer.AclPolicyholder;
import com.yd.dal.entity.order.CustomerPolicyInfo;
......@@ -25,7 +26,7 @@ public interface AclPolicyholderMapper {
List<AclPolicyholder> findByOrderId(Long orderId);
List<CustomerHolder> queryInsuredListByHolderCustomerId(Long customerId);
List<CustomerHolder> queryInsuredListByHolderCustomerId(QueryCustomerInsuredListRequestVO requestVO);
List<CustomerHolder> queryThisPractitiionerAllPolicyHolderList(List<Long> orderIdList);
......
......@@ -968,10 +968,12 @@
(select h.name, h.id_type_id, h.id_no, max(h.id) id
from ag_acl_policyholder h
left join ag_po_order o on o.id = h.order_id
left join ag_acl_customer_fortune f on o.id = f.order_id and f.drop_option_code = 'S01'
where h.type = 3
and o.status = 3
and f.customer_id = #{practitionerCustomerId,jdbcType=BIGINT}
and h.order_id in
(select t1.order_id from ag_acl_policyholder t1 where t1.customer_id = #{customerId,jdbcType=BIGINT} and t1.type = 2)
(select t1.order_id from ag_acl_policyholder t1 where t1.customer_id = #{holderCustomerId,jdbcType=BIGINT} and t1.type = 2)
GROUP BY h.name, h.id_type_id, h.id_no
) t
left join ag_acl_policyholder c on t.id = c.id
......
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