Commit e9a5bca9 by Water Wang

optimize

parent 93164d29
......@@ -7,6 +7,8 @@ import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO;
import com.yd.api.practitioner.vo.media.MediaGetRespVO;
import com.yd.api.practitioner.vo.opportunity.*;
import com.yd.api.practitioner.vo.organization.OrganizationQueryRequestVO;
import com.yd.api.practitioner.vo.organization.OrganizationQueryResponseVO;
import com.yd.api.practitioner.vo.payscale.PayScalePdfRequestVO;
import com.yd.api.practitioner.vo.payscale.PayScalePdfResponseVO;
import com.yd.api.practitioner.vo.payscale.PayScaleQueryRequestVO;
......@@ -472,4 +474,18 @@ public class PractitionerController {
result.addResult(responseVO);
return result;
}
/**
*
* @param requestVO
* @return
*/
@RequestMapping("/organizationQuery")
public Object organizationQuery(@RequestBody OrganizationQueryRequestVO requestVO){
JsonResult result = new JsonResult();
OrganizationQueryResponseVO responseVO = practitionerBasicInfoService.organizationQuery(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
}
package com.yd.api.practitioner.service;
import com.yd.api.practitioner.vo.organization.OrganizationQueryRequestVO;
import com.yd.api.practitioner.vo.organization.OrganizationQueryResponseVO;
import com.yd.api.practitioner.vo.payscale.PayScalePdfRequestVO;
import com.yd.api.practitioner.vo.payscale.PayScalePdfResponseVO;
import com.yd.api.practitioner.vo.payscale.PayScaleQueryRequestVO;
......@@ -39,4 +41,11 @@ public interface PractitionerBasicInfoService {
* @return 响应信息
*/
PayScalePdfResponseVO payScalePdf(PayScalePdfRequestVO requestVO);
/**
* 查询组织架构信息
* @param requestVO 请求报文
* @return 响应信息
*/
OrganizationQueryResponseVO organizationQuery(OrganizationQueryRequestVO requestVO);
}
package com.yd.api.practitioner.service.impl;
import com.google.common.base.Strings;
import com.yd.api.practitioner.vo.organization.*;
import com.yd.api.practitioner.vo.payscale.PayScalePdfRequestVO;
import com.yd.api.practitioner.service.PractitionerBasicInfoService;
import com.yd.api.practitioner.vo.payscale.PayScaleInfo;
......@@ -195,6 +196,94 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
return responseVO;
}
@Override
public OrganizationQueryResponseVO organizationQuery(OrganizationQueryRequestVO requestVO) {
OrganizationQueryResponseVO responseVO = new OrganizationQueryResponseVO();
String practitionerSubordinateSystemIdEG = requestVO.getPractitionerSubordinateSystemIdEG();
String deptIdEG = requestVO.getDeptIdEG();
String insurerBranchIdEG = requestVO.getInsurerBranchIdEG();
List<PractitionerSubordinateSystemInfo> subordinateSystemInfoList;
List<InsurerBranchDeptInfo> insurerBranchDeptInfoList;
List<InsurerBranchInfo> insurerBranchInfoList;
//查询体系
if(!Strings.isNullOrEmpty(practitionerSubordinateSystemIdEG)){
subordinateSystemInfoList = mdDropOptionsDALService.findSubordinateSystemInfoByIdEG(Arrays.asList(practitionerSubordinateSystemIdEG));
if(!subordinateSystemInfoList.isEmpty()){
deptIdEG = subordinateSystemInfoList.get(0).getDeptIdEG();
}
}else{
subordinateSystemInfoList = mdDropOptionsDALService.findSubordinateSystemInfoEG();
}
//查询营业部
if(!Strings.isNullOrEmpty(deptIdEG)){
insurerBranchDeptInfoList = mdDropOptionsDALService.findBranchDeptInfoByIdEG(Arrays.asList(deptIdEG));
if(!insurerBranchDeptInfoList.isEmpty()){
insurerBranchIdEG = insurerBranchDeptInfoList.get(0).getInsurerBranchIdEG();
}
}else{
insurerBranchDeptInfoList = mdDropOptionsDALService.findBranchDeptInfoEG();
}
//查询分公司
if(!Strings.isNullOrEmpty(insurerBranchIdEG)){
insurerBranchInfoList = mdDropOptionsDALService.findInsurerBranchInfoByIdEG(Arrays.asList(insurerBranchIdEG));
}else{
insurerBranchInfoList = mdDropOptionsDALService.findInsurerBranchInfoEG();
}
if(!subordinateSystemInfoList.isEmpty() && !insurerBranchDeptInfoList.isEmpty() && !insurerBranchInfoList.isEmpty()){
getResponseMessage(responseVO,subordinateSystemInfoList,insurerBranchDeptInfoList,insurerBranchInfoList);
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
}else{
responseVO.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("820001")));
}
return responseVO;
}
private void getResponseMessage(OrganizationQueryResponseVO responseVO, List<PractitionerSubordinateSystemInfo> subordinateSystemInfoList, List<InsurerBranchDeptInfo> insurerBranchDeptInfoList, List<InsurerBranchInfo> insurerBranchInfoList) {
Map<String,List<PractitionerSubordinateSystemInfo>> systemMap = new HashMap<>();
List<PractitionerSubordinateSystemInfo> systemInfoList;
Map<String,List<InsurerBranchDeptInfo>> deptMap = new HashMap<>();
List<InsurerBranchDeptInfo> deptInfoList;
if(!subordinateSystemInfoList.isEmpty()){
String deptId;
for(PractitionerSubordinateSystemInfo systemInfo : subordinateSystemInfoList){
deptId = systemInfo.getDeptIdEG();
if(systemMap.containsKey(deptId)){
systemInfoList = systemMap.get(deptId);
systemInfoList.add(systemInfo);
}else{
systemInfoList = new ArrayList<>();
systemInfoList.add(systemInfo);
systemMap.put(deptId,systemInfoList);
}
}
}
if(!insurerBranchDeptInfoList.isEmpty()){
String branchId,deptId;
for(InsurerBranchDeptInfo branchDeptInfo : insurerBranchDeptInfoList){
branchId = branchDeptInfo.getInsurerBranchIdEG();
deptId = branchDeptInfo.getIdEG();
branchDeptInfo.setPractitionerSubordinateSystemInfoList(systemMap.get(deptId));
if(deptMap.containsKey(branchId)){
deptInfoList = deptMap.get(branchId);
deptInfoList.add(branchDeptInfo);
}else{
deptInfoList = new ArrayList<>();
deptInfoList.add(branchDeptInfo);
deptMap.put(branchId,deptInfoList);
}
}
}
if(!insurerBranchInfoList.isEmpty()){
String branchId;
for(InsurerBranchInfo branchInfo : insurerBranchInfoList){
branchId = branchInfo.getInsurerBranchIdEG();
branchInfo.setInsurerBranchDeptList(deptMap.get(branchId));
}
responseVO.setInsurerBranchInfoList(insurerBranchInfoList);
}
}
private String checkPractitionerId(PayScaleBasicInfo payScaleBasicInfo, Long practitionerId,String time){
if(payScaleBasicInfo != null){
String practitionerIdEG = payScaleBasicInfo.getSalMstId();
......
package com.yd.api.practitioner.vo.organization;
import java.util.List;
public class InsurerBranchDeptInfo {
private String insurerBranchIdEG;
private String idEG;
private Long id;
private String deptCode;
private String name;
private String nameEn;
private String contactName;
private String contactNo;
private String remark;
private Integer isActive;
private Long createdBy;
private String createByName;
private Long updatedBy;
private String updatedByName;
private String createdAt;
private String updatedAt;
private String address;
private List<PractitionerSubordinateSystemInfo> practitionerSubordinateSystemInfoList;
public String getInsurerBranchIdEG() {
return insurerBranchIdEG;
}
public void setInsurerBranchIdEG(String insurerBranchIdEG) {
this.insurerBranchIdEG = insurerBranchIdEG;
}
public String getIdEG() {
return idEG;
}
public void setIdEG(String idEG) {
this.idEG = idEG;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDeptCode() {
return deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNameEn() {
return nameEn;
}
public void setNameEn(String nameEn) {
this.nameEn = nameEn;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getContactNo() {
return contactNo;
}
public void setContactNo(String contactNo) {
this.contactNo = contactNo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public List<PractitionerSubordinateSystemInfo> getPractitionerSubordinateSystemInfoList() {
return practitionerSubordinateSystemInfoList;
}
public void setPractitionerSubordinateSystemInfoList(List<PractitionerSubordinateSystemInfo> practitionerSubordinateSystemInfoList) {
this.practitionerSubordinateSystemInfoList = practitionerSubordinateSystemInfoList;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public String getCreateByName() {
return createByName;
}
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedByName() {
return updatedByName;
}
public void setUpdatedByName(String updatedByName) {
this.updatedByName = updatedByName;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
package com.yd.api.practitioner.vo.organization;
import java.util.List;
public class InsurerBranchInfo {
private String insurerBranchIdEG;
private Long insurerBranchId;
private String branchName;
private String branchCode;
private Integer isActive;
private String effectiveStartDate;
private String effectiveEndDate;
private String contactName;
private String contactNo;
private String remark;
private Long createdBy;
private String createByName;
private Long updatedBy;
private String updatedByName;
private String createdAt;
private String updatedAt;
private String address;
private List<InsurerBranchDeptInfo> insurerBranchDeptList;
public String getInsurerBranchIdEG() {
return insurerBranchIdEG;
}
public void setInsurerBranchIdEG(String insurerBranchIdEG) {
this.insurerBranchIdEG = insurerBranchIdEG;
}
public Long getInsurerBranchId() {
return insurerBranchId;
}
public void setInsurerBranchId(Long insurerBranchId) {
this.insurerBranchId = insurerBranchId;
}
public String getBranchName() {
return branchName;
}
public void setBranchName(String branchName) {
this.branchName = branchName;
}
public String getBranchCode() {
return branchCode;
}
public void setBranchCode(String branchCode) {
this.branchCode = branchCode;
}
public List<InsurerBranchDeptInfo> getInsurerBranchDeptList() {
return insurerBranchDeptList;
}
public void setInsurerBranchDeptList(List<InsurerBranchDeptInfo> insurerBranchDeptList) {
this.insurerBranchDeptList = insurerBranchDeptList;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public String getEffectiveStartDate() {
return effectiveStartDate;
}
public void setEffectiveStartDate(String effectiveStartDate) {
this.effectiveStartDate = effectiveStartDate;
}
public String getEffectiveEndDate() {
return effectiveEndDate;
}
public void setEffectiveEndDate(String effectiveEndDate) {
this.effectiveEndDate = effectiveEndDate;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getContactNo() {
return contactNo;
}
public void setContactNo(String contactNo) {
this.contactNo = contactNo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public String getCreateByName() {
return createByName;
}
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedByName() {
return updatedByName;
}
public void setUpdatedByName(String updatedByName) {
this.updatedByName = updatedByName;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
package com.yd.api.practitioner.vo.organization;
import java.util.List;
public class InsurerInfo {
private Long insurerId;
private String insurerName;
private String insurerCode;
private String address;
private List<InsurerBranchInfo> insurerBranchInfoList;
public Long getInsurerId() {
return insurerId;
}
public void setInsurerId(Long insurerId) {
this.insurerId = insurerId;
}
public String getInsurerName() {
return insurerName;
}
public void setInsurerName(String insurerName) {
this.insurerName = insurerName;
}
public String getInsurerCode() {
return insurerCode;
}
public void setInsurerCode(String insurerCode) {
this.insurerCode = insurerCode;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public List<InsurerBranchInfo> getInsurerBranchInfoList() {
return insurerBranchInfoList;
}
public void setInsurerBranchInfoList(List<InsurerBranchInfo> insurerBranchInfoList) {
this.insurerBranchInfoList = insurerBranchInfoList;
}
}
package com.yd.api.practitioner.vo.organization;
public class OrganizationQueryRequestVO {
private Long insurerId;
private Long insurerBranchId;
private Long deptId;
private Long practitionerSubordinateSystemId;
private String insurerIdEG;
private String insurerBranchIdEG;
private String deptIdEG;
private String practitionerSubordinateSystemIdEG;
private Integer isDetailQuery;
public Long getInsurerId() {
return insurerId;
}
public void setInsurerId(Long insurerId) {
this.insurerId = insurerId;
}
public Long getInsurerBranchId() {
return insurerBranchId;
}
public void setInsurerBranchId(Long insurerBranchId) {
this.insurerBranchId = insurerBranchId;
}
public Long getDeptId() {
return deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public Long getPractitionerSubordinateSystemId() {
return practitionerSubordinateSystemId;
}
public void setPractitionerSubordinateSystemId(Long practitionerSubordinateSystemId) {
this.practitionerSubordinateSystemId = practitionerSubordinateSystemId;
}
public String getInsurerIdEG() {
return insurerIdEG;
}
public void setInsurerIdEG(String insurerIdEG) {
this.insurerIdEG = insurerIdEG;
}
public String getInsurerBranchIdEG() {
return insurerBranchIdEG;
}
public void setInsurerBranchIdEG(String insurerBranchIdEG) {
this.insurerBranchIdEG = insurerBranchIdEG;
}
public String getDeptIdEG() {
return deptIdEG;
}
public void setDeptIdEG(String deptIdEG) {
this.deptIdEG = deptIdEG;
}
public String getPractitionerSubordinateSystemIdEG() {
return practitionerSubordinateSystemIdEG;
}
public void setPractitionerSubordinateSystemIdEG(String practitionerSubordinateSystemIdEG) {
this.practitionerSubordinateSystemIdEG = practitionerSubordinateSystemIdEG;
}
public Integer getIsDetailQuery() {
return isDetailQuery;
}
public void setIsDetailQuery(Integer isDetailQuery) {
this.isDetailQuery = isDetailQuery;
}
}
package com.yd.api.practitioner.vo.organization;
import com.yd.api.result.CommonResult;
import java.util.List;
public class OrganizationQueryResponseVO {
private List<InsurerBranchInfo> insurerBranchInfoList;
private CommonResult commonResult;
public List<InsurerBranchInfo> getInsurerBranchInfoList() {
return insurerBranchInfoList;
}
public void setInsurerBranchInfoList(List<InsurerBranchInfo> insurerBranchInfoList) {
this.insurerBranchInfoList = insurerBranchInfoList;
}
public CommonResult getCommonResult() {
return commonResult;
}
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
}
package com.yd.api.practitioner.vo.organization;
public class PractitionerSubordinateSystemInfo {
private String idEG;
private String deptIdEG;
private Long id;
private String subordinateSystemCode;
private String name;
private String nameEn;
private Long ownerPractitionerId;
private String contactName;
private String contactNo;
private String remark;
private Integer isActive;
private Long createdBy;
private String createByName;
private Long updatedBy;
private String updatedByName;
private String createdAt;
private String updatedAt;
public String getIdEG() {
return idEG;
}
public void setIdEG(String idEG) {
this.idEG = idEG;
}
public String getDeptIdEG() {
return deptIdEG;
}
public void setDeptIdEG(String deptIdEG) {
this.deptIdEG = deptIdEG;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSubordinateSystemCode() {
return subordinateSystemCode;
}
public void setSubordinateSystemCode(String subordinateSystemCode) {
this.subordinateSystemCode = subordinateSystemCode;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNameEn() {
return nameEn;
}
public void setNameEn(String nameEn) {
this.nameEn = nameEn;
}
public Long getOwnerPractitionerId() {
return ownerPractitionerId;
}
public void setOwnerPractitionerId(Long ownerPractitionerId) {
this.ownerPractitionerId = ownerPractitionerId;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getContactNo() {
return contactNo;
}
public void setContactNo(String contactNo) {
this.contactNo = contactNo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
public String getCreateByName() {
return createByName;
}
public void setCreateByName(String createByName) {
this.createByName = createByName;
}
public String getUpdatedByName() {
return updatedByName;
}
public void setUpdatedByName(String updatedByName) {
this.updatedByName = updatedByName;
}
}
package com.yd.dal.mapper.meta;
import com.yd.api.practitioner.vo.organization.InsurerBranchDeptInfo;
import com.yd.api.practitioner.vo.organization.InsurerBranchInfo;
import com.yd.api.practitioner.vo.organization.PractitionerSubordinateSystemInfo;
import com.yd.dal.entity.meta.MdDropOptions;
import com.yd.dal.entity.meta.OptionsEGolden;
import org.apache.ibatis.annotations.Param;
......@@ -33,4 +36,16 @@ public interface MdDropOptionsMapper {
List<OptionsEGolden> findByMasterIdsE(@Param("materIds")List<Integer> materIds);
List<OptionsEGolden> findAllTitleEG();
List<PractitionerSubordinateSystemInfo> findSubordinateSystemInfoByIdEG(@Param("subordinateSystemIds")List<String> subordinateSystemIds);
List<PractitionerSubordinateSystemInfo> findSubordinateSystemInfoEG();
List<InsurerBranchDeptInfo> findBranchDeptInfoByIdEG(@Param("branchDeptIds")List<String> branchDeptIds);
List<InsurerBranchDeptInfo> findBranchDeptInfoEG();
List<InsurerBranchInfo> findInsurerBranchInfoByIdEG(@Param("insurerBranchIds")List<String> insurerBranchIds);
List<InsurerBranchInfo> findInsurerBranchInfoEG();
}
\ No newline at end of file
package com.yd.dal.service.meta;
import com.yd.api.practitioner.vo.organization.InsurerBranchDeptInfo;
import com.yd.api.practitioner.vo.organization.InsurerBranchInfo;
import com.yd.api.practitioner.vo.organization.PractitionerSubordinateSystemInfo;
import com.yd.dal.entity.meta.MdDropOptions;
import com.yd.dal.entity.meta.OptionsEGolden;
......@@ -23,4 +26,16 @@ public interface MdDropOptionsDALService {
List<OptionsEGolden> findByMasterIdsE(List<Integer> materIds);
List<OptionsEGolden> findAllTitleEG();
List<PractitionerSubordinateSystemInfo> findSubordinateSystemInfoByIdEG(List<String> subordinateSystemIds);
List<PractitionerSubordinateSystemInfo> findSubordinateSystemInfoEG();
List<InsurerBranchDeptInfo> findBranchDeptInfoByIdEG(List<String> branchDeptIds);
List<InsurerBranchDeptInfo> findBranchDeptInfoEG();
List<InsurerBranchInfo> findInsurerBranchInfoByIdEG(List<String> insurerBranchIds);
List<InsurerBranchInfo> findInsurerBranchInfoEG();
}
package com.yd.dal.service.meta.impl;
import com.yd.api.practitioner.vo.organization.InsurerBranchDeptInfo;
import com.yd.api.practitioner.vo.organization.InsurerBranchInfo;
import com.yd.api.practitioner.vo.organization.PractitionerSubordinateSystemInfo;
import com.yd.dal.entity.meta.MdDropOptions;
import com.yd.dal.entity.meta.OptionsEGolden;
import com.yd.dal.mapper.meta.MdDropOptionsMapper;
......@@ -67,4 +70,40 @@ public class MdDropOptionsDALServiceImpl implements MdDropOptionsDALService {
public List<OptionsEGolden> findAllTitleEG() {
return mdDropOptionsMapper.findAllTitleEG();
}
@Override
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<PractitionerSubordinateSystemInfo> findSubordinateSystemInfoByIdEG(List<String> subordinateSystemIds) {
return mdDropOptionsMapper.findSubordinateSystemInfoByIdEG(subordinateSystemIds);
}
@Override
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<PractitionerSubordinateSystemInfo> findSubordinateSystemInfoEG() {
return mdDropOptionsMapper.findSubordinateSystemInfoEG();
}
@Override
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<InsurerBranchDeptInfo> findBranchDeptInfoByIdEG(List<String> branchDeptIds) {
return mdDropOptionsMapper.findBranchDeptInfoByIdEG(branchDeptIds);
}
@Override
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<InsurerBranchDeptInfo> findBranchDeptInfoEG() {
return mdDropOptionsMapper.findBranchDeptInfoEG();
}
@Override
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<InsurerBranchInfo> findInsurerBranchInfoByIdEG(List<String> insurerBranchIds) {
return mdDropOptionsMapper.findInsurerBranchInfoByIdEG(insurerBranchIds);
}
@Override
@TargetDataSource(dataSourceKey = DataSourceKey.DB_EGOLDEN)
public List<InsurerBranchInfo> findInsurerBranchInfoEG() {
return mdDropOptionsMapper.findInsurerBranchInfoEG();
}
}
......@@ -261,4 +261,78 @@
t.DRP_TITLE_LEVEL as titleLevel
from drp003 t
</select>
<select id="findSubordinateSystemInfoByIdEG"
resultType="com.yd.api.practitioner.vo.organization.PractitionerSubordinateSystemInfo">
select t.SPC_DIV_ID as idEG,
t.FK_BUS_ID as deptIdEG,
t.SPC_DIV_CODE as subordinateSystemCode,
t.SPC_DIV_NAME as name,
t.SPC_DIV_REMARK as remark
from spc004 t where t.SPC_DIV_CANCEL = 0 and t.SPC_DIV_ID in
<foreach collection="subordinateSystemIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findSubordinateSystemInfoEG"
resultType="com.yd.api.practitioner.vo.organization.PractitionerSubordinateSystemInfo">
select t.SPC_DIV_ID as idEG,
t.FK_BUS_ID as deptIdEG,
t.SPC_DIV_CODE as subordinateSystemCode,
t.SPC_DIV_NAME as name,
t.SPC_DIV_REMARK as remark
from spc004 t where t.SPC_DIV_CANCEL = 0;
</select>
<select id="findBranchDeptInfoByIdEG"
resultType="com.yd.api.practitioner.vo.organization.InsurerBranchDeptInfo">
select t.FK_AREA_ID as insurerBranchIdEG,
t.SPC_BUS_ID as idEG,
t.SPC_BUS_CODE as deptCode,
t.SPC_BUS_NAME as name,
t.SPC_BUS_TEL_NUM as contactNo,
t.SPC_BUS_REMARK as remark,
t.SPC_BUS_ADDRESS as address
from spc002 t where t.SPC_BUS_CANCEL = 0 and t.SPC_BUS_ID in
<foreach collection="branchDeptIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findBranchDeptInfoEG" resultType="com.yd.api.practitioner.vo.organization.InsurerBranchDeptInfo">
select t.FK_AREA_ID as insurerBranchIdEG,
t.SPC_BUS_ID as idEG,
t.SPC_BUS_CODE as deptCode,
t.SPC_BUS_NAME as name,
t.SPC_BUS_TEL_NUM as contactNo,
t.SPC_BUS_REMARK as remark,
t.SPC_BUS_ADDRESS as address
from spc002 t where t.SPC_BUS_CANCEL = 0;
</select>
<select id="findInsurerBranchInfoByIdEG"
resultType="com.yd.api.practitioner.vo.organization.InsurerBranchInfo">
select
t.SPC_AREA_ID as insurerBranchIdEG,
t.SPC_AREA_NAME as branchName,
t.SPC_AREA_CODE as branchCode,
t.SPC_START_DATE as effectiveStartDate,
t.SPC_END_DATE as effectiveEndDate,
t.SPC_ADDRESS as address,
t.SPC_TEL_NUM as contactNo
from spc001 t where t.SPC_CANCEL = 0 and t.SPC_AREA_ID in
<foreach collection="insurerBranchIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findInsurerBranchInfoEG" resultType="com.yd.api.practitioner.vo.organization.InsurerBranchInfo">
select
t.SPC_AREA_ID as insurerBranchIdEG,
t.SPC_AREA_NAME as branchName,
t.SPC_AREA_CODE as branchCode,
t.SPC_START_DATE as effectiveStartDate,
t.SPC_END_DATE as effectiveEndDate,
t.SPC_ADDRESS as address,
t.SPC_TEL_NUM as contactNo
from spc001 t where t.SPC_CANCEL = 0;
</select>
</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