Commit 720eaf5c by Simon Cheng

Merge branch 'master' of 139.224.139.2:AGSH/yd-backend into dev_20210225_salarypdf

parents df3c9bd6 bfe5b60a
......@@ -184,21 +184,22 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
Long practitionerId = agmsHiringDalService.findPractitionerIdByLoginId(loginId);
AclUser user = aclUserDalService.selectByPrimaryKey(loginId);
String mobileNo = user.getMobileNo();
this.doApprove(practitionerId, mobileNo, requestVO, responseVO);
this.doApprove(practitionerId, mobileNo, user.getId(), requestVO, responseVO);
return responseVO;
} else {
Long practitionerId = requestVO.getPractitionerId();
AclPractitioner practitioner = aclPractitionerMapper.selectByPrimaryKey(practitionerId);
String mobileNo = practitioner.getMobileNo();
this.doApprove(practitionerId, mobileNo, requestVO, responseVO);
this.doApprove(practitionerId, mobileNo, Long.valueOf("-1"), requestVO, responseVO);
return responseVO;
}
}
private void doApprove(Long practitionerId, String mobileNo, PractitionerHiringApproveRequestVO requestVO, PractitionerHiringApproveResponseVO responseVO) {
private void doApprove(Long practitionerId, String mobileNo, Long operater,
PractitionerHiringApproveRequestVO requestVO, PractitionerHiringApproveResponseVO responseVO) {
Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
//查询审批流程
List<MdPractitionerHiringApproveSteps> hiringApproveStepsList = systemConfigService.findHiringApproveStepsAll();
......@@ -246,7 +247,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
String basicInfoStatus = null;
if (approvingStatus == 1) {
//最后一步 并同意 更新经纪人系类表
updatePractitionerInfo(hiringBasicInfoId, practitionerId);
updatePractitionerInfo(hiringBasicInfoId, operater);
//最后一步通过发邮件通知人事填写相关经纪人信息
this.sendMailToHR(basicInfo2);
basicInfoStatus = "0";
......@@ -549,13 +550,12 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
//收件地址
String address = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress");
//抄送地址
String ccAddress = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress");
String[] ccAddresses = {ccAddress};
List<String> ccList = systemConfigService.getListConfigValue("PractitionerHiringNotifyCCAddress");
List<String> arrList = new ArrayList(ccList);
String[] ccAddresses = arrList.toArray(new String[arrList.size()]);
AclPractitionerHiringMembership memberShip = membershipMapper.selectByHiringBasicInfoId(basicInfo.getId());
StringBuilder messageText = new StringBuilder();
messageText.append("银盾人事你好,");
if (Long.valueOf("30").equals(memberShip.getMdDropOptionId())) {
......
......@@ -3,6 +3,7 @@ package com.yd.api.practitioner;
import com.yd.api.practitioner.service.PractitionerBasicInfoService;
import com.yd.api.practitioner.service.PractitionerService;
import com.yd.api.practitioner.service.ScheduleTrackService;
import com.yd.api.practitioner.vo.login.CanSeeSalaryListResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO;
......@@ -33,6 +34,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.awt.*;
@Controller
@RestController
......@@ -52,6 +55,12 @@ public class PractitionerController {
*/
@RequestMapping("/login")
public Object practitionerLogin(@RequestBody PractitionerLoginRequestVO requestVO){
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontFamilies = ge.getAvailableFontFamilyNames();
System.out.println("字体列表:");
for (String s : fontFamilies) {
System.out.println(s);
}
JsonResult result = new JsonResult();
PractitionerLoginResponseVO responseVO = practitionerService.practitionerLogin(requestVO);
result.addResult(responseVO);
......@@ -592,4 +601,16 @@ public class PractitionerController {
return result;
}
/**
* 查询经纪人是否可以看薪资表
* @return
*/
@RequestMapping("/canSeeSalaryList/{practitionerId}")
public Object canSeeSalaryList(@PathVariable Long practitionerId){
JsonResult result = new JsonResult();
CanSeeSalaryListResponseVO responseVO = practitionerService.canSeeSalaryList(practitionerId);
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.recruit.PotentialGoalsActionsUpdateResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
......@@ -224,5 +225,11 @@ public interface PractitionerService {
* @param practitionerId
* @return
*/
List<Long> getPractitionerIdList(Long practitionerId);
List<Long> getPractitionerIdList(Long practitionerId,Integer isActive);
/**
* 查询经纪人是否可以看薪资表
* @return
*/
CanSeeSalaryListResponseVO canSeeSalaryList(Long practitionerId);
}
......@@ -28,10 +28,12 @@ import com.yd.dal.entity.meta.OptionsEGolden;
import com.yd.dal.entity.order.CustomerPolicyInfo;
import com.yd.dal.entity.order.PolicyDetailInfoE;
import com.yd.dal.entity.order.PolicyFactorInfoE;
import com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary;
import com.yd.dal.entity.practitioner.payscale.PayScaleBasicInfo;
import com.yd.dal.entity.product.Product;
import com.yd.dal.entity.product.ProductE;
import com.yd.dal.entity.product.ProductPlan;
import com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper;
import com.yd.dal.service.customer.AclFileUploadDALService;
import com.yd.dal.service.customer.AclPractitionerDALService;
import com.yd.dal.service.meta.MdDropOptionsDALService;
......@@ -73,6 +75,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private AclFileUploadDALService aclFileUploadDALService;
@Autowired
private PractitionerService practitionerService;
@Autowired
private AgAclLifePractitionerSalaryMapper practitionerSalaryMapper;
@Override
public PolicyListQueryResponseVO policyListQuery(PolicyListQueryRequestVO requestVO) {
......@@ -131,7 +135,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
public PayScaleQueryResponseVO payScaleListQuery(PayScaleQueryRequestVO requestVO) {
PayScaleQueryResponseVO responseVO = new PayScaleQueryResponseVO();
String practitionerIdEG = requestVO.getPractitionerIdEG();
if(!Strings.isNullOrEmpty(practitionerIdEG)){
Long practitionerId = requestVO.getPractitionerId();
if(!Strings.isNullOrEmpty(practitionerIdEG) && practitionerId != null){
List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG);
if(!payScaleInfoListAll.isEmpty()){
Map<String,String> dtlTypeMap = new HashMap<>();
......@@ -140,9 +146,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
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<>();
Map<Long,PayScaleInfo> payScaleInfoMap = new HashMap<>();
PayScaleInfo payScaleInfo;
Integer time;
Long time;
for(PayScaleInfo item : payScaleInfoListAll){
time = item.getMonDtlPeriod();
if(payScaleInfoMap.containsKey(time)){
......@@ -162,17 +168,37 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
}
List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values());
resultList.sort(Comparator.comparingInt(PayScaleInfo :: getMonDtlPeriod).reversed());
// 加入临时薪资表的数据
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerId(practitionerId);
translateObj(list, resultList);
// 排序
resultList.sort(Comparator.comparingLong(PayScaleInfo :: getMonDtlPeriod).reversed());
responseVO.setPayScaleInfos(resultList);
}
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
}else{
String[] params = {"practitionerIdEG"};
String[] params = {"practitionerIdEG, practitionerId"};
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610002", params)));
}
return responseVO;
}
private void translateObj(List<AgAclLifePractitionerSalary> list, List<PayScaleInfo> resultList) {
PayScaleInfo payScaleInfo;
for (AgAclLifePractitionerSalary salary : list) {
payScaleInfo = new PayScaleInfo();
payScaleInfo.setMonShId(salary.getId());
payScaleInfo.setPdfOssPath(salary.getPdfOssPath());
payScaleInfo.setMonDtlPeriod(Long.valueOf(salary.getYearMonth()));
payScaleInfo.setMonDtlAmount(salary.getPayableAmount().doubleValue());
payScaleInfo.setMonDtlRAmount(salary.getNetAmount().doubleValue());
resultList.add(payScaleInfo);
}
}
@Override
public PayScalePdfResponseVO payScalePdf(PayScalePdfRequestVO requestVO) {
PayScalePdfResponseVO responseVO = new PayScalePdfResponseVO();
......@@ -253,7 +279,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
Long practitionerId = requestVO.getPractitionerId();
try {
// 获取团队成员或被辅导人的practitionerId
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId);
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId,1);
List<TeamMemberDetail> dataList = aclPractitionerDALService.queryTeamMemberDetailList(practitionerIdList);
......@@ -443,8 +469,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private void calculateRAmount(PayScaleInfo payScaleInfoMain, PayScaleInfo payScaleInfoElse) {
if(payScaleInfoMain != null && payScaleInfoElse != null){
Integer shIdMain = payScaleInfoMain.getMonShId();
Integer shIdElse = payScaleInfoElse.getMonShId();
Long shIdMain = payScaleInfoMain.getMonShId();
Long shIdElse = payScaleInfoElse.getMonShId();
Double all = payScaleInfoMain.getMonDtlRAmount();
double allA = (shIdMain.equals(shIdElse))? 0D : payScaleInfoMain.getMonDtlAmount();
Double temp = payScaleInfoElse.getMonDtlAmount();
......
......@@ -6,6 +6,7 @@ import com.yd.dal.mapper.customer.*;
import com.yd.dal.mapper.practitioner.PractitionerHiringMapper;
import com.libs.pdf.*;
import com.yd.rmi.ali.oss.service.OssService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.util.CommonUtil;
import com.yd.util.HttpUtil;
import com.yd.util.PDFConfiguration;
......@@ -34,6 +35,8 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
private AclPractitionerHiringApproveRecordsMapper recordsMapper;
@Autowired
private AclPractitionerHiringPersonalStatementsMapper statementsMapper;
@Autowired
private SystemConfigService systemConfigService;
/**
......@@ -339,7 +342,10 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
}
}
data.put("secondSubsystemManager", "");
data.put("secondCenterHr", "EVEN");
// 获取人事专员姓名
String secondCenterHr = systemConfigService.getSingleConfigValue("Practitioner_Hiring_SecondCenterHr");
data.put("secondCenterHr", secondCenterHr);
}
......
......@@ -328,6 +328,18 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
List<AclPractitionerHiringPersonalStatements> personalStatementList = requestVO.getPersonalStatementList();
Long basicInfoId = requestVO.getHiringBasicInfoId();
// 判断声明至少要勾选一个
Boolean flag = false;
for (AclPractitionerHiringPersonalStatements item :personalStatementList) {
if (Long.valueOf("1").equals(item.getStatus())) {
flag = true;
}
}
if (!flag) {
resp.setCommonResult(new CommonResult(false, "声明至少要选一项"));
return resp;
}
Date curDate = new Date();
personalStatementList.forEach(item -> {
......@@ -571,6 +583,13 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
@Override
public CommonResultResponseVO saveBankAccount(SaveBankAccountRequestVO requestVO) {
CommonResultResponseVO resp = new CommonResultResponseVO();
String bankAccountOpening = requestVO.getBankAccountOpening();
String bankAccountId = requestVO.getBankAccountId();
if (StringUtils.isEmpty(bankAccountOpening) || StringUtils.isEmpty(bankAccountId)) {
resp.setCommonResult(new CommonResult(false, "开户行或银行卡号不能为空"));
return resp;
}
try {
AclPractitionerHiringBasicInfo basicInfo = new AclPractitionerHiringBasicInfo();
BeanUtils.copyProperties(requestVO, basicInfo);
......@@ -711,23 +730,28 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
Long practitionerId = requestVO.getPractitionerId();
if (hiringBasicInfoId == null) {
resp.setCommonResult(new CommonResult(true, "此经纪人无电子合同"));
resp.setCommonResult(new CommonResult(false, "此经纪人无电子合同"));
return resp;
}
AclPractitioner practitioner = aclPractitionerMapper.selectByPrimaryKey(practitionerId);
String practitionerCode = practitioner == null ? null : practitioner.getPractitionerCode();
String practitionerCode = practitioner == null ? null : practitioner.getPractitionerCode().trim();
String practitionerRegNo = practitioner == null ? null : practitioner.getPractitionerRegNo();
if (StringUtils.isEmpty(practitionerCode)) {
resp.setCommonResult(new CommonResult(true, "内部编号不能为空,请注意保存"));
if (StringUtils.isBlank(practitionerRegNo)) {
resp.setCommonResult(new CommonResult(false, "执业编号不能为空,请保存后再生成合同"));
return resp;
}
if (StringUtils.isBlank(practitionerCode)) {
resp.setCommonResult(new CommonResult(false, "内部编号不能为空,请保存后再生成合同"));
return resp;
}
// if (contractNo != null) {
// resp.setCommonResult(new CommonResult(true, "合同已存在"));
// return resp;
// }
String contractNo = hiringContractService.getNextContractNo();
// 合同编号已存在就不生成新的
String contractNo = practitioner.getContractNo();
if (StringUtils.isEmpty(contractNo)) {
contractNo = hiringContractService.getNextContractNo();
}
String contractOssPath = hiringContractService.generatePractitionerContract(practitionerCode, contractNo, hiringBasicInfoId);
//4、经纪人表生成经纪人记录ag_acl_practitioner,ag_acl_practitioner.contract_oss_path
......
......@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
import com.yd.api.customer.service.CustomerService;
import com.yd.api.customer.vo.register.RegisterRequestVO;
import com.yd.api.customer.vo.register.RegisterResponseVO;
import com.yd.api.practitioner.vo.login.CanSeeSalaryListResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsActionsUpdateResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginBasicInfo;
......@@ -216,6 +217,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
responseVO.setPractitionerTypeId(practitionerType);
responseVO.setPractitionerBasicInfo(basicInfo);
responseVO.setLoginTimes(logTimes);
responseVO.setCanSeeSalaryList(practitionerInfo.getCanSeeSalaryList());
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
// }
}else{
......@@ -1806,7 +1808,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
TeamActionsAverageQueryResponseVO responseVO = new TeamActionsAverageQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId();
//该团队长下团队所有经纪人信息
List<Long> practitionerIds = this.getPractitionerIdList(practitionerId);
List<Long> practitionerIds = this.getPractitionerIdList(practitionerId,1);
//团队经纪人个数
BigDecimal practitionerNum = BigDecimal.valueOf(practitionerIds.size());
......@@ -1865,14 +1867,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
@Override
public List<Long> getPractitionerIdList(Long practitionerId) {
public List<Long> getPractitionerIdList(Long practitionerId,Integer isActive) {
List<Long> practitionerIdList = new ArrayList<>();
practitionerIdList.add(practitionerId);
// 判断当前经纪人是否为团队长
int count = aclPractitionerDALService.isTeamLeader(practitionerId);
if (count > 0) {
List<Long> practitionerIdList1 = aclPractitionerDALService.queryTeamAllPractitionerId(practitionerId);
List<Long> practitionerIdList1 = aclPractitionerDALService.queryTeamAllPractitionerId(practitionerId,isActive);
practitionerIdList.addAll(practitionerIdList1);
} else {
List<Long> practitionerIdList2 = aclPractitionerDALService.queryMentoredByPractitionerId(practitionerId);
......@@ -1884,6 +1886,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
}
@Override
public CanSeeSalaryListResponseVO canSeeSalaryList(Long practitionerId) {
CanSeeSalaryListResponseVO responseVO = new CanSeeSalaryListResponseVO();
AclPractitioner aclPractitioner = aclPractitionerDALService.findById(practitionerId);
responseVO.setCanSeeSalaryList(aclPractitioner.getCanSeeSalaryList());
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
}
@Override
public PotentialGoalsActionsQueryResponseVO potentialGoalsActionsQuery(PotentialGoalsActionsQueryRequestVO requestVO) {
PotentialGoalsActionsQueryResponseVO responseVO = new PotentialGoalsActionsQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId();
......@@ -1979,7 +1990,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<SalesPerformanceForecastInfo> infos = new ArrayList<>();
//通过团队长经纪人id,查询此团队所有经纪人id
Long practitionerId = requestVO.getPractitionerId();
List<AclPractitioner> practitioners = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId));
List<AclPractitioner> practitioners = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,1));
if (practitioners.isEmpty()){
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
......@@ -2398,6 +2409,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
getMemberInfoForOnLine(memberInfoMap,practitionerId,time);
//eGolden
getMemberInfoForEGolden(memberInfoMap,practitionerId,time);
//20210303增加逻辑,已离职经纪人没有数据不显示
//查询这个团队已离职经纪人电话
List<String> leaveOfficeList = aclPractitionerDALService.findLeaveOfficeByPractitionerId(practitionerId);
for (String m : leaveOfficeList) {
SubordinateSystemMemberInfo subordinateSystemMemberInfo = memberInfoMap.get(m);
if (CommonUtil.isNullOrZero(subordinateSystemMemberInfo.getCount())){
memberInfoMap.remove(m);
}
}
//查询出来的结果按照fyp进行排序
List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values());
memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp));
......@@ -2440,7 +2460,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
* @param time
*/
private void getMemberInfoForEGolden(Map<String, SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) {
List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId));
List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,null));
List<String> mobileNoList = new ArrayList<>();
for(AclPractitioner item : practitionerList){
mobileNoList.add(item.getMobileNo());
......@@ -2547,7 +2567,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
*/
private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) {
//1、查询该团队长所在体系的所有成员
List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId));
List<AclPractitioner> practitionerList = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,null));
if(!practitionerList.isEmpty() && practitionerList.get(0) != null){
Map<Long,Long> customerMap = new HashMap<>();
Map<Long,String> practitionerIdMobileNoMap = new HashMap<>();
......
......@@ -297,7 +297,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Date weekOne = cal2.getTime();
// 获取团队成员或被辅导人的practitionerId
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId);
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId,null);
// 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC
List<PersonalPEPScore> saleAndRecuit = scheduleTrackMapper.querySaleRecuitScoreFYC(practitionerIdList);
......
package com.yd.api.practitioner.vo.login;
import com.yd.api.result.CommonResult;
/**
* @author xxy
*/
public class CanSeeSalaryListResponseVO {
private Long canSeeSalaryList;
private CommonResult commonResult;
/**
* 获取
*
* @return the canSeeSalaryList
*/
public Long getCanSeeSalaryList() {
return this.canSeeSalaryList;
}
/**
* 设置
*
* @param canSeeSalaryList the to set
*/
public void setCanSeeSalaryList(Long canSeeSalaryList) {
this.canSeeSalaryList = canSeeSalaryList;
}
/**
* 获取
*
* @return the commonResult
*/
public CommonResult getCommonResult() {
return this.commonResult;
}
/**
* 设置
*
* @param commonResult the to set
*/
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
@Override
public String toString() {
return "CanSeeSalaryListResponseVO{" +
"canSeeSalaryList=" + canSeeSalaryList +
", commonResult=" + commonResult +
'}';
}
}
......@@ -10,6 +10,7 @@ public class PractitionerLoginResponseVO {
private String practitionerIdEG;
private Integer loginTimes;
private String getOpenIdUrl;
private Long canSeeSalaryList;
private PractitionerLoginBasicInfo practitionerBasicInfo;
private CommonResult commonResult;
......@@ -76,4 +77,12 @@ public class PractitionerLoginResponseVO {
public void setPractitionerTypeId(Long practitionerTypeId) {
this.practitionerTypeId = practitionerTypeId;
}
public Long getCanSeeSalaryList() {
return this.canSeeSalaryList;
}
public void setCanSeeSalaryList(Long canSeeSalaryList) {
this.canSeeSalaryList = canSeeSalaryList;
}
}
package com.yd.api.practitioner.vo.payscale;
public class PayScaleInfo {
private Integer monShId;
private Long monShId;
private String salMstId;
private String drpTitleCode;
private String monDtlType;
private String monDtlItem;
private Integer monDtlPeriod;
private Long monDtlPeriod;
private Double monDtlAmount;
private Double monDtlRAmount;
private String createDate;
private String createUser;
private String pdfOssPath;
public Integer getMonShId() {
public Long getMonShId() {
return monShId;
}
public void setMonShId(Integer monShId) {
public void setMonShId(Long monShId) {
this.monShId = monShId;
}
......@@ -84,11 +85,19 @@ public class PayScaleInfo {
this.createUser = createUser;
}
public Integer getMonDtlPeriod() {
public Long getMonDtlPeriod() {
return monDtlPeriod;
}
public void setMonDtlPeriod(Integer monDtlPeriod) {
public void setMonDtlPeriod(Long monDtlPeriod) {
this.monDtlPeriod = monDtlPeriod;
}
public String getPdfOssPath() {
return pdfOssPath;
}
public void setPdfOssPath(String pdfOssPath) {
this.pdfOssPath = pdfOssPath;
}
}
......@@ -3,6 +3,8 @@ package com.yd.api.practitioner.vo.payscale;
public class PayScaleQueryRequestVO {
private String practitionerIdEG;
private Long practitionerId;
public String getPractitionerIdEG() {
return practitionerIdEG;
}
......@@ -10,4 +12,12 @@ public class PayScaleQueryRequestVO {
public void setPractitionerIdEG(String practitionerIdEG) {
this.practitionerIdEG = practitionerIdEG;
}
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
}
package com.yd.api.practitioner.vo.payscale;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary;
import java.util.List;
public class PayScaleQueryResponseVO {
private List<PayScaleInfo> payScaleInfos;
private CommonResult commonResult;
private List<AgAclLifePractitionerSalary> list;
public List<PayScaleInfo> getPayScaleInfos() {
return payScaleInfos;
......@@ -23,4 +25,12 @@ public class PayScaleQueryResponseVO {
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
public List<AgAclLifePractitionerSalary> getList() {
return list;
}
public void setList(List<AgAclLifePractitionerSalary> list) {
this.list = list;
}
}
package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ag_acl_practitioner
* @author
* 从业人员执业证信息表
*/
@Data
public class AclPractitioner implements Serializable {
public class AclPractitioner {
private static final long serialVersionUID = 1L;
/**
* serial id
*/
......@@ -106,6 +105,11 @@ public class AclPractitioner implements Serializable {
private String employeeNo;
/**
* 员工合同编号
*/
private String contractNo;
/**
* 0=No, 1=Yes
*/
private Integer isActive;
......@@ -188,6 +192,11 @@ public class AclPractitioner implements Serializable {
private String educationLevel;
/**
* 毕业学校
*/
private String graduatedUniversity;
/**
* FK ag_acl_practitioner.id 辅导人
*/
private Long mentorId;
......@@ -203,19 +212,22 @@ public class AclPractitioner implements Serializable {
private Integer gender;
/**
* 经纪人合同号
* 经纪人通过最后一步审批后生成的电子合同
*/
private String contractNo;
private String contractOssPath;
/**
* 经纪人PDF合同地址
* FK ag_acl_practitioner_hiring_basic_info.id
*/
private String contractOssPath;
private Long hiringBasicInfoId;
/**
* 经纪人报聘信息表id
* 能够登录dyd
*/
private Long hiringBasicInfoId;
private Long canLoginDyd;
private static final long serialVersionUID = 1L;
/**
* 能够查看薪资表
*/
private Long canSeeSalaryList;
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ public class PractitionerInfo {
private String weChatId;
private String qqId;
private String practitionerRegNo;
private Long canSeeSalaryList;
public Long getCustomerId() {
return customerId;
......@@ -109,4 +110,12 @@ public class PractitionerInfo {
public void setGender(Integer gender) {
this.gender = gender;
}
public Long getCanSeeSalaryList() {
return canSeeSalaryList;
}
public void setCanSeeSalaryList(Long canSeeSalaryList) {
this.canSeeSalaryList = canSeeSalaryList;
}
}
package com.yd.dal.entity.practitioner.payscale;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* ag_acl_life_practitioner_salary
* @author
*/
public class AgAclLifePractitionerSalary implements Serializable {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_practitioner.id 从业人员ID
*/
private Long practitionerId;
/**
* 从业人员编号
*/
private String practitionerCode;
/**
* 薪资年月
*/
private String yearMonth;
/**
* 应发佣金
*/
private BigDecimal payableAmount;
/**
* 扣除税金
*/
private BigDecimal taxoutAmount;
/**
* 实发佣金
*/
private BigDecimal netAmount;
/**
* 薪资单pdf文件
*/
private String pdfOssPath;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public String getPractitionerCode() {
return practitionerCode;
}
public void setPractitionerCode(String practitionerCode) {
this.practitionerCode = practitionerCode;
}
public String getYearMonth() {
return yearMonth;
}
public void setYearMonth(String yearMonth) {
this.yearMonth = yearMonth;
}
public BigDecimal getPayableAmount() {
return payableAmount;
}
public void setPayableAmount(BigDecimal payableAmount) {
this.payableAmount = payableAmount;
}
public BigDecimal getTaxoutAmount() {
return taxoutAmount;
}
public void setTaxoutAmount(BigDecimal taxoutAmount) {
this.taxoutAmount = taxoutAmount;
}
public BigDecimal getNetAmount() {
return netAmount;
}
public void setNetAmount(BigDecimal netAmount) {
this.netAmount = netAmount;
}
public String getPdfOssPath() {
return pdfOssPath;
}
public void setPdfOssPath(String pdfOssPath) {
this.pdfOssPath = pdfOssPath;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AgAclLifePractitionerSalary other = (AgAclLifePractitionerSalary) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPractitionerId() == null ? other.getPractitionerId() == null : this.getPractitionerId().equals(other.getPractitionerId()))
&& (this.getPractitionerCode() == null ? other.getPractitionerCode() == null : this.getPractitionerCode().equals(other.getPractitionerCode()))
&& (this.getYearMonth() == null ? other.getYearMonth() == null : this.getYearMonth().equals(other.getYearMonth()))
&& (this.getPayableAmount() == null ? other.getPayableAmount() == null : this.getPayableAmount().equals(other.getPayableAmount()))
&& (this.getTaxoutAmount() == null ? other.getTaxoutAmount() == null : this.getTaxoutAmount().equals(other.getTaxoutAmount()))
&& (this.getNetAmount() == null ? other.getNetAmount() == null : this.getNetAmount().equals(other.getNetAmount()))
&& (this.getPdfOssPath() == null ? other.getPdfOssPath() == null : this.getPdfOssPath().equals(other.getPdfOssPath()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPractitionerId() == null) ? 0 : getPractitionerId().hashCode());
result = prime * result + ((getPractitionerCode() == null) ? 0 : getPractitionerCode().hashCode());
result = prime * result + ((getYearMonth() == null) ? 0 : getYearMonth().hashCode());
result = prime * result + ((getPayableAmount() == null) ? 0 : getPayableAmount().hashCode());
result = prime * result + ((getTaxoutAmount() == null) ? 0 : getTaxoutAmount().hashCode());
result = prime * result + ((getNetAmount() == null) ? 0 : getNetAmount().hashCode());
result = prime * result + ((getPdfOssPath() == null) ? 0 : getPdfOssPath().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", practitionerId=").append(practitionerId);
sb.append(", practitionerCode=").append(practitionerCode);
sb.append(", yearMonth=").append(yearMonth);
sb.append(", payableAmount=").append(payableAmount);
sb.append(", taxoutAmount=").append(taxoutAmount);
sb.append(", netAmount=").append(netAmount);
sb.append(", pdfOssPath=").append(pdfOssPath);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.api.practitioner.vo.payscale.PayScaleInfo;
import com.yd.api.practitioner.vo.subordinate.TeamMemberDetail;
import com.yd.dal.entity.practitioner.opportunity.PlayerSalesActivityInfo;
import com.yd.dal.entity.customer.AclPractitioner;
import com.yd.dal.entity.customer.practitioner.PractitionerBasicInfo;
import com.yd.dal.entity.customer.practitioner.PractitionerInfo;
import com.yd.dal.entity.customer.practitioner.PractitionerRankInfo;
import com.yd.dal.entity.practitioner.opportunity.OwnOpportunityInfo;
import com.yd.dal.entity.practitioner.payscale.PayScaleBasicInfo;
import org.apache.ibatis.annotations.Param;
import com.yd.api.practitioner.vo.payscale.PayScaleInfo;import com.yd.api.practitioner.vo.subordinate.TeamMemberDetail;import com.yd.dal.entity.customer.AclPractitioner;
import java.util.List;
import com.yd.dal.entity.customer.practitioner.PractitionerBasicInfo;import com.yd.dal.entity.customer.practitioner.PractitionerInfo;import com.yd.dal.entity.customer.practitioner.PractitionerRankInfo;import com.yd.dal.entity.practitioner.opportunity.OwnOpportunityInfo;import com.yd.dal.entity.practitioner.opportunity.PlayerSalesActivityInfo;import com.yd.dal.entity.practitioner.payscale.PayScaleBasicInfo;import org.apache.ibatis.annotations.Param;
public interface AclPractitionerMapper {
int deleteByPrimaryKey(Long id);
......@@ -26,43 +17,49 @@ public interface AclPractitionerMapper {
int updateByPrimaryKey(AclPractitioner record);
int updateBatch(List<AclPractitioner> list);
int updateBatchSelective(List<AclPractitioner> list);
int batchInsert(@Param("list") List<AclPractitioner> list);
PractitionerBasicInfo getPractitionerInfoByMobileNoForOffline(String mobileNo);
List<PractitionerRankInfo> getPractitionerRankInfoForOffline(@Param("time") Integer time);
PractitionerBasicInfo getPractitionerInfoByMobileNoForOnline(String mobileNo);
List<PractitionerRankInfo> getPractitionerRankInfoForOnline(@Param("time")Integer time,@Param("practitionerTypeId")Long practitionerTypeId);
List<PractitionerRankInfo> getPractitionerRankInfoForOnline(@Param("time") Integer time, @Param("practitionerTypeId") Long practitionerTypeId);
List<PractitionerRankInfo> getPractitionerRankInfoForSpecials(@Param("mobileSpecials") List<String> mobileSpecials, @Param("time")Integer time);
List<PractitionerRankInfo> getPractitionerRankInfoForSpecials(@Param("mobileSpecials") List<String> mobileSpecials, @Param("time") Integer time);
PractitionerInfo findPractitionerInfoByLogin(@Param("mobileNo")String mobileNo);
PractitionerInfo findPractitionerInfoByLogin(@Param("mobileNo") String mobileNo);
AclPractitioner findByCustomerIdIsActive(@Param("customerId") Long customerId, @Param("isActive")int isActive);
AclPractitioner findByCustomerIdIsActive(@Param("customerId") Long customerId, @Param("isActive") int isActive);
List<OwnOpportunityInfo> ownOpportunityQuery(@Param("practitionerId")Long practitionerId);
List<OwnOpportunityInfo> ownOpportunityQuery(@Param("practitionerId") Long practitionerId);
List<AclPractitioner> findByIds(@Param("practitionerIdList") List<Long> practitionerIdList);
List<AclPractitioner> findForSubordinateIdByPractitionerId(Long practitionerId);
List<PlayerSalesActivityInfo> playerSalesActivityQuery(@Param("practitionerId") Long practitionerId,@Param("optionsId") Long optionsId);
List<PlayerSalesActivityInfo> playerSalesActivityQuery(@Param("practitionerId") Long practitionerId, @Param("optionsId") Long optionsId);
List<AclPractitioner> findBySubordinateSystemId(@Param("subordinateSystemId")Long subordinateSystemId);
List<AclPractitioner> findBySubordinateSystemId(@Param("subordinateSystemId") Long subordinateSystemId);
String findMobileNoByPractitionerId(@Param("practitionerId")Long practitionerId);
String findMobileNoByPractitionerId(@Param("practitionerId") Long practitionerId);
PractitionerBasicInfo findByMobileNoE(@Param("mobileNo")String mobileNo);
PractitionerBasicInfo findByMobileNoE(@Param("mobileNo") String mobileNo);
PractitionerRankInfo getPractitionerRankInfoByPractitionerIdEG(@Param("practitionerIdEG") String practitionerIdEG, @Param("time") Integer time);
PractitionerRankInfo getPractitionerRankInfoByPractitionerIdYD(@Param("practitionerId")Long practitionerId, @Param("time")Integer time);
PractitionerRankInfo getPractitionerRankInfoByPractitionerIdYD(@Param("practitionerId") Long practitionerId, @Param("time") Integer time);
List<PayScaleInfo> findPayScaleByPractitionerEG(@Param("practitionerIdEG")String practitionerIdEG);
List<PayScaleInfo> findPayScaleByPractitionerEG(@Param("practitionerIdEG") String practitionerIdEG);
PayScaleBasicInfo findFilePathByMonShId(@Param("monShId")Integer monShId);
PayScaleBasicInfo findFilePathByMonShId(@Param("monShId") Integer monShId);
PractitionerBasicInfo findByIdEG(@Param("practitionerIdEG")String practitionerIdEG);
PractitionerBasicInfo findByIdEG(@Param("practitionerIdEG") String practitionerIdEG);
AclPractitioner findPractitionerByLeadsAssignedId(Long leadsAssignedId);
......@@ -70,7 +67,7 @@ public interface AclPractitionerMapper {
int isTeamLeader(Long practitionerId);
List<Long> queryTeamAllPractitionerId(Long practitionerId);
List<Long> queryTeamAllPractitionerId(@Param("practitionerId")Long practitionerId,@Param("isActive")Integer isActive);
List<Long> queryMentoredByPractitionerId(Long practitionerId);
......@@ -80,4 +77,5 @@ public interface AclPractitionerMapper {
List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList);
List<String> findLeaveOfficeByPractitionerId(Long practitionerId);
}
\ No newline at end of file
package com.yd.dal.mapper.practitioner;
import com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary;
import java.util.List;
public interface AgAclLifePractitionerSalaryMapper {
int deleteByPrimaryKey(Long id);
int insert(AgAclLifePractitionerSalary record);
int insertSelective(AgAclLifePractitionerSalary record);
AgAclLifePractitionerSalary selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AgAclLifePractitionerSalary record);
int updateByPrimaryKey(AgAclLifePractitionerSalary record);
List<AgAclLifePractitionerSalary> queryListByPractitionerId(Long practitionerId);
}
\ No newline at end of file
......@@ -179,7 +179,7 @@ public interface AclPractitionerDALService {
int isTeamLeader(Long practitionerId);
List<Long> queryTeamAllPractitionerId(Long practitionerId);
List<Long> queryTeamAllPractitionerId(Long practitionerId,Integer isActive);
List<Long> queryMentoredByPractitionerId(Long practitionerId);
......@@ -188,4 +188,6 @@ public interface AclPractitionerDALService {
PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId);
List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList);
List<String> findLeaveOfficeByPractitionerId(Long practitionerId);
}
......@@ -19,6 +19,7 @@ import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Service("aclPractitionerDALService")
public class AclPractitionerDALServiceImpl implements AclPractitionerDALService {
......@@ -173,8 +174,8 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
}
@Override
public List<Long> queryTeamAllPractitionerId(Long practitionerId) {
return aclPractitionerMapper.queryTeamAllPractitionerId(practitionerId);
public List<Long> queryTeamAllPractitionerId(Long practitionerId,Integer isActive) {
return aclPractitionerMapper.queryTeamAllPractitionerId(practitionerId, isActive);
}
@Override
......@@ -196,4 +197,13 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList) {
return aclPractitionerMapper.queryTeamMemberDetailList(practitionerIdList);
}
@Override
public List<String> findLeaveOfficeByPractitionerId(Long practitionerId) {
DESTypeHandler jpaCryptoConverter = new DESTypeHandler();
List<String> mobileNos = aclPractitionerMapper.findLeaveOfficeByPractitionerId(practitionerId);
List<String> mobileNoList = new ArrayList<>(mobileNos.size());
mobileNos.forEach(m -> mobileNoList.add(jpaCryptoConverter.decode(m)));
return mobileNoList;
}
}
......@@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.dal.mapper.customer.AclPractitionerMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.customer.AclPractitioner">
<!--@mbg.generated-->
<!--@Table ag_acl_practitioner-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="insurer_id" jdbcType="BIGINT" property="insurerId" />
<result column="insurer_branch_id" jdbcType="BIGINT" property="insurerBranchId" />
......@@ -18,9 +20,10 @@
<result column="practitioner_reg_company" jdbcType="VARCHAR" property="practitionerRegCompany" />
<result column="effective_start_date" jdbcType="DATE" property="effectiveStartDate" />
<result column="effective_end_date" jdbcType="DATE" property="effectiveEndDate" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="remark" jdbcType="LONGVARCHAR" property="remark" />
<result column="customer_id" jdbcType="BIGINT" property="customerId" />
<result column="employee_no" jdbcType="VARCHAR" property="employeeNo" />
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
......@@ -31,71 +34,82 @@
<result column="city_id" jdbcType="BIGINT" property="cityId" />
<result column="city_name" jdbcType="VARCHAR" property="cityName" />
<result column="cert_list" jdbcType="VARCHAR" property="certList" />
<result column="bio_intro" jdbcType="VARCHAR" property="bioIntro" />
<result column="bio_intro" jdbcType="LONGVARCHAR" property="bioIntro" />
<result column="wechat_id" jdbcType="VARCHAR" property="wechatId" />
<result column="qq_id" jdbcType="VARCHAR" property="qqId" />
<result column="is_profile_show" jdbcType="INTEGER" property="isProfileShow" />
<result column="is_name_show" jdbcType="INTEGER" property="isNameShow" />
<result column="is_mobile_show" jdbcType="INTEGER" property="isMobileShow" />
<result column="education_level" jdbcType="VARCHAR" property="educationLevel" />
<result column="graduated_university" jdbcType="VARCHAR" property="graduatedUniversity" />
<result column="mentor_id" jdbcType="BIGINT" property="mentorId" />
<result column="introducer_id" jdbcType="BIGINT" property="introducerId" />
<result column="gender" jdbcType="INTEGER" property="gender" />
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
<result column="contract_oss_path" jdbcType="VARCHAR" property="contractOssPath" />
<result column="hiring_basic_info_id" jdbcType="BIGINT" property="hiringBasicInfoId" />
<result column="can_login_dyd" jdbcType="BIGINT" property="canLoginDyd" />
<result column="can_see_salary_list" jdbcType="BIGINT" property="canSeeSalaryList" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, insurer_id, insurer_branch_id, dept_id, subordinate_system_id, practitioner_code,
`name`, mobile_no, id_type_id, id_type, id_no, practitioner_birthdate, practitioner_reg_no,
practitioner_reg_company, effective_start_date, effective_end_date, remark, customer_id,
employee_no, is_active, created_at, created_by, updated_at, updated_by, province_id,
province_name, city_id, city_name, cert_list, bio_intro, wechat_id, qq_id, is_profile_show,
is_name_show, is_mobile_show, education_level, mentor_id, introducer_id, gender,
contract_no, contract_oss_path, hiring_basic_info_id
employee_no, contract_no, is_active, created_at, created_by, updated_at, updated_by,
province_id, province_name, city_id, city_name, cert_list, bio_intro, wechat_id,
qq_id, is_profile_show, is_name_show, is_mobile_show, education_level, graduated_university,
mentor_id, introducer_id, gender, contract_oss_path, hiring_basic_info_id, can_login_dyd,
can_see_salary_list
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from ag_acl_practitioner
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_acl_practitioner
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitioner" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_acl_practitioner (insurer_id, insurer_branch_id, dept_id,
subordinate_system_id, practitioner_code, `name`,
mobile_no, id_type_id, id_type,
id_no, practitioner_birthdate, practitioner_reg_no,
practitioner_reg_company, effective_start_date,
effective_end_date, remark, customer_id,
employee_no, is_active, created_at,
created_by, updated_at, updated_by,
province_id, province_name, city_id,
city_name, cert_list, bio_intro,
wechat_id, qq_id, is_profile_show,
is_name_show, is_mobile_show, education_level,
mentor_id, introducer_id, gender, hiring_basic_info_id
employee_no, contract_no, is_active,
created_at, created_by, updated_at,
updated_by, province_id, province_name,
city_id, city_name, cert_list,
bio_intro, wechat_id, qq_id,
is_profile_show, is_name_show, is_mobile_show,
education_level, graduated_university, mentor_id,
introducer_id, gender, contract_oss_path,
hiring_basic_info_id, can_login_dyd, can_see_salary_list
)
values (#{insurerId,jdbcType=BIGINT}, #{insurerBranchId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT},
#{subordinateSystemId,jdbcType=BIGINT}, #{practitionerCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}, #{idTypeId,jdbcType=BIGINT}, #{idType,jdbcType=VARCHAR},
#{idNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}, #{practitionerBirthdate,jdbcType=DATE}, #{practitionerRegNo,jdbcType=VARCHAR},
#{practitionerRegCompany,jdbcType=VARCHAR}, #{effectiveStartDate,jdbcType=DATE},
#{effectiveEndDate,jdbcType=DATE}, #{remark,jdbcType=VARCHAR}, #{customerId,jdbcType=BIGINT},
#{employeeNo,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT},
#{provinceId,jdbcType=BIGINT}, #{provinceName,jdbcType=VARCHAR}, #{cityId,jdbcType=BIGINT},
#{cityName,jdbcType=VARCHAR}, #{certList,jdbcType=VARCHAR}, #{bioIntro,jdbcType=VARCHAR},
#{wechatId,jdbcType=VARCHAR}, #{qqId,jdbcType=VARCHAR}, #{isProfileShow,jdbcType=INTEGER},
#{isNameShow,jdbcType=INTEGER}, #{isMobileShow,jdbcType=INTEGER}, #{educationLevel,jdbcType=VARCHAR},
#{mentorId,jdbcType=BIGINT}, #{introducerId,jdbcType=BIGINT}, #{gender,jdbcType=INTEGER},
#{hiringBasicInfoId,jdbcType=BIGINT}
#{subordinateSystemId,jdbcType=BIGINT}, #{practitionerCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}, #{idTypeId,jdbcType=BIGINT}, #{idType,jdbcType=VARCHAR},
#{idNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}, #{practitionerBirthdate,jdbcType=DATE}, #{practitionerRegNo,jdbcType=VARCHAR},
#{practitionerRegCompany,jdbcType=VARCHAR}, #{effectiveStartDate,jdbcType=DATE},
#{effectiveEndDate,jdbcType=DATE}, #{remark,jdbcType=LONGVARCHAR}, #{customerId,jdbcType=BIGINT},
#{employeeNo,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{isActive,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT}, #{provinceId,jdbcType=BIGINT}, #{provinceName,jdbcType=VARCHAR},
#{cityId,jdbcType=BIGINT}, #{cityName,jdbcType=VARCHAR}, #{certList,jdbcType=VARCHAR},
#{bioIntro,jdbcType=LONGVARCHAR}, #{wechatId,jdbcType=VARCHAR}, #{qqId,jdbcType=VARCHAR},
#{isProfileShow,jdbcType=INTEGER}, #{isNameShow,jdbcType=INTEGER}, #{isMobileShow,jdbcType=INTEGER},
#{educationLevel,jdbcType=VARCHAR}, #{graduatedUniversity,jdbcType=VARCHAR}, #{mentorId,jdbcType=BIGINT},
#{introducerId,jdbcType=BIGINT}, #{gender,jdbcType=INTEGER}, #{contractOssPath,jdbcType=VARCHAR},
#{hiringBasicInfoId,jdbcType=BIGINT}, #{canLoginDyd,jdbcType=BIGINT}, #{canSeeSalaryList,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitioner" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_acl_practitioner
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="insurerId != null">
......@@ -152,6 +166,9 @@
<if test="employeeNo != null">
employee_no,
</if>
<if test="contractNo != null">
contract_no,
</if>
<if test="isActive != null">
is_active,
</if>
......@@ -203,6 +220,9 @@
<if test="educationLevel != null">
education_level,
</if>
<if test="graduatedUniversity != null">
graduated_university,
</if>
<if test="mentorId != null">
mentor_id,
</if>
......@@ -212,6 +232,18 @@
<if test="gender != null">
gender,
</if>
<if test="contractOssPath != null">
contract_oss_path,
</if>
<if test="hiringBasicInfoId != null">
hiring_basic_info_id,
</if>
<if test="canLoginDyd != null">
can_login_dyd,
</if>
<if test="canSeeSalaryList != null">
can_see_salary_list,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="insurerId != null">
......@@ -260,7 +292,7 @@
#{effectiveEndDate,jdbcType=DATE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
#{remark,jdbcType=LONGVARCHAR},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
......@@ -268,6 +300,9 @@
<if test="employeeNo != null">
#{employeeNo,jdbcType=VARCHAR},
</if>
<if test="contractNo != null">
#{contractNo,jdbcType=VARCHAR},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
......@@ -299,7 +334,7 @@
#{certList,jdbcType=VARCHAR},
</if>
<if test="bioIntro != null">
#{bioIntro,jdbcType=VARCHAR},
#{bioIntro,jdbcType=LONGVARCHAR},
</if>
<if test="wechatId != null">
#{wechatId,jdbcType=VARCHAR},
......@@ -319,6 +354,9 @@
<if test="educationLevel != null">
#{educationLevel,jdbcType=VARCHAR},
</if>
<if test="graduatedUniversity != null">
#{graduatedUniversity,jdbcType=VARCHAR},
</if>
<if test="mentorId != null">
#{mentorId,jdbcType=BIGINT},
</if>
......@@ -328,9 +366,22 @@
<if test="gender != null">
#{gender,jdbcType=INTEGER},
</if>
<if test="contractOssPath != null">
#{contractOssPath,jdbcType=VARCHAR},
</if>
<if test="hiringBasicInfoId != null">
#{hiringBasicInfoId,jdbcType=BIGINT},
</if>
<if test="canLoginDyd != null">
#{canLoginDyd,jdbcType=BIGINT},
</if>
<if test="canSeeSalaryList != null">
#{canSeeSalaryList,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.customer.AclPractitioner">
<!--@mbg.generated-->
update ag_acl_practitioner
<set>
<if test="insurerId != null">
......@@ -379,7 +430,7 @@
effective_end_date = #{effectiveEndDate,jdbcType=DATE},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=LONGVARCHAR},
</if>
<if test="customerId != null">
customer_id = #{customerId,jdbcType=BIGINT},
......@@ -387,6 +438,9 @@
<if test="employeeNo != null">
employee_no = #{employeeNo,jdbcType=VARCHAR},
</if>
<if test="contractNo != null">
contract_no = #{contractNo,jdbcType=VARCHAR},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
......@@ -418,7 +472,7 @@
cert_list = #{certList,jdbcType=VARCHAR},
</if>
<if test="bioIntro != null">
bio_intro = #{bioIntro,jdbcType=VARCHAR},
bio_intro = #{bioIntro,jdbcType=LONGVARCHAR},
</if>
<if test="wechatId != null">
wechat_id = #{wechatId,jdbcType=VARCHAR},
......@@ -438,6 +492,9 @@
<if test="educationLevel != null">
education_level = #{educationLevel,jdbcType=VARCHAR},
</if>
<if test="graduatedUniversity != null">
graduated_university = #{graduatedUniversity,jdbcType=VARCHAR},
</if>
<if test="mentorId != null">
mentor_id = #{mentorId,jdbcType=BIGINT},
</if>
......@@ -447,19 +504,23 @@
<if test="gender != null">
gender = #{gender,jdbcType=INTEGER},
</if>
<if test="contractNo != null">
contract_no = #{contractNo,jdbcType=INTEGER},
</if>
<if test="contractOssPath != null">
contract_oss_path = #{contractOssPath,jdbcType=INTEGER},
contract_oss_path = #{contractOssPath,jdbcType=VARCHAR},
</if>
<if test="hiringBasicInfoId != null">
hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=INTEGER},
hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT},
</if>
<if test="canLoginDyd != null">
can_login_dyd = #{canLoginDyd,jdbcType=BIGINT},
</if>
<if test="canSeeSalaryList != null">
can_see_salary_list = #{canSeeSalaryList,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPractitioner">
<!--@mbg.generated-->
update ag_acl_practitioner
set insurer_id = #{insurerId,jdbcType=BIGINT},
insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT},
......@@ -476,9 +537,10 @@
practitioner_reg_company = #{practitionerRegCompany,jdbcType=VARCHAR},
effective_start_date = #{effectiveStartDate,jdbcType=DATE},
effective_end_date = #{effectiveEndDate,jdbcType=DATE},
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=LONGVARCHAR},
customer_id = #{customerId,jdbcType=BIGINT},
employee_no = #{employeeNo,jdbcType=VARCHAR},
contract_no = #{contractNo,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
......@@ -489,28 +551,614 @@
city_id = #{cityId,jdbcType=BIGINT},
city_name = #{cityName,jdbcType=VARCHAR},
cert_list = #{certList,jdbcType=VARCHAR},
bio_intro = #{bioIntro,jdbcType=VARCHAR},
bio_intro = #{bioIntro,jdbcType=LONGVARCHAR},
wechat_id = #{wechatId,jdbcType=VARCHAR},
qq_id = #{qqId,jdbcType=VARCHAR},
is_profile_show = #{isProfileShow,jdbcType=INTEGER},
is_name_show = #{isNameShow,jdbcType=INTEGER},
is_mobile_show = #{isMobileShow,jdbcType=INTEGER},
education_level = #{educationLevel,jdbcType=VARCHAR},
graduated_university = #{graduatedUniversity,jdbcType=VARCHAR},
mentor_id = #{mentorId,jdbcType=BIGINT},
introducer_id = #{introducerId,jdbcType=BIGINT},
gender = #{gender,jdbcType=INTEGER}
gender = #{gender,jdbcType=INTEGER},
contract_oss_path = #{contractOssPath,jdbcType=VARCHAR},
hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT},
can_login_dyd = #{canLoginDyd,jdbcType=BIGINT},
can_see_salary_list = #{canSeeSalaryList,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update ag_acl_practitioner
<trim prefix="set" suffixOverrides=",">
<trim prefix="insurer_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="insurer_branch_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerBranchId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="dept_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.deptId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="subordinate_system_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.subordinateSystemId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="practitioner_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="`name` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.name,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="mobile_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.mobileNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="id_type_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.idTypeId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="id_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.idType,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="id_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.idNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="practitioner_birthdate = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerBirthdate,jdbcType=DATE}
</foreach>
</trim>
<trim prefix="practitioner_reg_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerRegNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="practitioner_reg_company = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerRegCompany,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="effective_start_date = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveStartDate,jdbcType=DATE}
</foreach>
</trim>
<trim prefix="effective_end_date = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveEndDate,jdbcType=DATE}
</foreach>
</trim>
<trim prefix="remark = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=LONGVARCHAR}
</foreach>
</trim>
<trim prefix="customer_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.customerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="employee_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.employeeNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="contract_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.contractNo,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="is_active = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="created_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim prefix="created_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="updated_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim prefix="updated_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="province_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.provinceId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="province_name = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.provinceName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="city_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.cityId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="city_name = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.cityName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="cert_list = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.certList,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="bio_intro = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.bioIntro,jdbcType=LONGVARCHAR}
</foreach>
</trim>
<trim prefix="wechat_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.wechatId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="qq_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.qqId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="is_profile_show = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.isProfileShow,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="is_name_show = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.isNameShow,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="is_mobile_show = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.isMobileShow,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="education_level = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.educationLevel,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="graduated_university = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.graduatedUniversity,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="mentor_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.mentorId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="introducer_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.introducerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="gender = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.gender,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="contract_oss_path = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.contractOssPath,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="hiring_basic_info_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.hiringBasicInfoId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="can_login_dyd = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.canLoginDyd,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="can_see_salary_list = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.canSeeSalaryList,jdbcType=BIGINT}
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update ag_acl_practitioner
<trim prefix="set" suffixOverrides=",">
<trim prefix="insurer_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.insurerId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="insurer_branch_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.insurerBranchId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.insurerBranchId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="dept_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.deptId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.deptId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="subordinate_system_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.subordinateSystemId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.subordinateSystemId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="practitioner_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.practitionerCode != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="`name` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.name != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.name,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="mobile_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.mobileNo != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.mobileNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="id_type_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.idTypeId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.idTypeId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="id_type = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.idType != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.idType,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="id_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.idNo != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.idNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="practitioner_birthdate = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.practitionerBirthdate != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerBirthdate,jdbcType=DATE}
</if>
</foreach>
</trim>
<trim prefix="practitioner_reg_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.practitionerRegNo != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerRegNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="practitioner_reg_company = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.practitionerRegCompany != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.practitionerRegCompany,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="effective_start_date = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.effectiveStartDate != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveStartDate,jdbcType=DATE}
</if>
</foreach>
</trim>
<trim prefix="effective_end_date = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.effectiveEndDate != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.effectiveEndDate,jdbcType=DATE}
</if>
</foreach>
</trim>
<trim prefix="remark = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.remark != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.remark,jdbcType=LONGVARCHAR}
</if>
</foreach>
</trim>
<trim prefix="customer_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.customerId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.customerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="employee_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.employeeNo != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.employeeNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="contract_no = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.contractNo != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.contractNo,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="is_active = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.isActive != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.isActive,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="created_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createdAt != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.createdAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim prefix="created_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createdBy != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.createdBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="updated_at = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.updatedAt != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedAt,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim prefix="updated_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.updatedBy != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.updatedBy,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="province_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.provinceId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.provinceId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="province_name = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.provinceName != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.provinceName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="city_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.cityId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.cityId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="city_name = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.cityName != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.cityName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="cert_list = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.certList != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.certList,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="bio_intro = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.bioIntro != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.bioIntro,jdbcType=LONGVARCHAR}
</if>
</foreach>
</trim>
<trim prefix="wechat_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.wechatId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.wechatId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="qq_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.qqId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.qqId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="is_profile_show = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.isProfileShow != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.isProfileShow,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="is_name_show = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.isNameShow != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.isNameShow,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="is_mobile_show = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.isMobileShow != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.isMobileShow,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="education_level = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.educationLevel != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.educationLevel,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="graduated_university = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.graduatedUniversity != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.graduatedUniversity,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="mentor_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.mentorId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.mentorId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="introducer_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.introducerId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.introducerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="gender = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.gender != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.gender,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="contract_oss_path = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.contractOssPath != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.contractOssPath,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="hiring_basic_info_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.hiringBasicInfoId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.hiringBasicInfoId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="can_login_dyd = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.canLoginDyd != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.canLoginDyd,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="can_see_salary_list = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.canSeeSalaryList != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.canSeeSalaryList,jdbcType=BIGINT}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_acl_practitioner
(insurer_id, insurer_branch_id, dept_id, subordinate_system_id, practitioner_code,
`name`, mobile_no, id_type_id, id_type, id_no, practitioner_birthdate, practitioner_reg_no,
practitioner_reg_company, effective_start_date, effective_end_date, remark, customer_id,
employee_no, contract_no, is_active, created_at, created_by, updated_at, updated_by,
province_id, province_name, city_id, city_name, cert_list, bio_intro, wechat_id,
qq_id, is_profile_show, is_name_show, is_mobile_show, education_level, graduated_university,
mentor_id, introducer_id, gender, contract_oss_path, hiring_basic_info_id, can_login_dyd,
can_see_salary_list)
values
<foreach collection="list" item="item" separator=",">
(#{item.insurerId,jdbcType=BIGINT}, #{item.insurerBranchId,jdbcType=BIGINT}, #{item.deptId,jdbcType=BIGINT},
#{item.subordinateSystemId,jdbcType=BIGINT}, #{item.practitionerCode,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR}, #{item.mobileNo,jdbcType=VARCHAR}, #{item.idTypeId,jdbcType=BIGINT},
#{item.idType,jdbcType=VARCHAR}, #{item.idNo,jdbcType=VARCHAR}, #{item.practitionerBirthdate,jdbcType=DATE},
#{item.practitionerRegNo,jdbcType=VARCHAR}, #{item.practitionerRegCompany,jdbcType=VARCHAR},
#{item.effectiveStartDate,jdbcType=DATE}, #{item.effectiveEndDate,jdbcType=DATE},
#{item.remark,jdbcType=LONGVARCHAR}, #{item.customerId,jdbcType=BIGINT}, #{item.employeeNo,jdbcType=VARCHAR},
#{item.contractNo,jdbcType=VARCHAR}, #{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP},
#{item.createdBy,jdbcType=BIGINT}, #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT},
#{item.provinceId,jdbcType=BIGINT}, #{item.provinceName,jdbcType=VARCHAR}, #{item.cityId,jdbcType=BIGINT},
#{item.cityName,jdbcType=VARCHAR}, #{item.certList,jdbcType=VARCHAR}, #{item.bioIntro,jdbcType=LONGVARCHAR},
#{item.wechatId,jdbcType=VARCHAR}, #{item.qqId,jdbcType=VARCHAR}, #{item.isProfileShow,jdbcType=INTEGER},
#{item.isNameShow,jdbcType=INTEGER}, #{item.isMobileShow,jdbcType=INTEGER}, #{item.educationLevel,jdbcType=VARCHAR},
#{item.graduatedUniversity,jdbcType=VARCHAR}, #{item.mentorId,jdbcType=BIGINT},
#{item.introducerId,jdbcType=BIGINT}, #{item.gender,jdbcType=INTEGER}, #{item.contractOssPath,jdbcType=VARCHAR},
#{item.hiringBasicInfoId,jdbcType=BIGINT}, #{item.canLoginDyd,jdbcType=BIGINT},
#{item.canSeeSalaryList,jdbcType=BIGINT})
</foreach>
</insert>
<resultMap id="base_result_map_practitioner_info" type="com.yd.dal.entity.customer.practitioner.PractitionerBasicInfo">
<result column="customerId" property="customerId"/>
<result column="practitionerIdForOnline" property="practitionerIdForOnline"/>
<result column="practitionerId" property="practitionerId"/>
<result column="name" property="name"/>
<result column="customerId" property="customerId" />
<result column="practitionerIdForOnline" property="practitionerIdForOnline" />
<result column="practitionerId" property="practitionerId" />
<result column="name" property="name" />
<result column="titleCode" property="titleCode" />
<!-- <result column="mobile_no" property="titleCode" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>-->
<result column="titleName" property="titleName"/>
<result column="gender" property="gender"/>
<!-- &lt;result column="mobile_no" property="titleCode" typeHandler="com.yd.util.deshandler.DESTypeHandler"/&gt;-->
<result column="titleName" property="titleName" />
<result column="gender" property="gender" />
</resultMap>
......@@ -522,7 +1170,7 @@
md.DRP_TITLE_LEVEL as titleCode,
md.DRP_TITLE_NAME as titleName
FROM sal001 p left join DRP003 md on md.DRP_TITLE_CODE = p.FK_DRP_TITLE_CODE
where p.SAL_MST_MOBILE = #{mobileNo}
where p.SAL_MST_MOBILE = #{mobileNo} limit 1
</select>
<select id="getPractitionerInfoByMobileNoForOnline" resultMap="base_result_map_practitioner_info">
......@@ -538,51 +1186,51 @@
left join ag_acl_insurer_branch b on p.insurer_branch_id = b.id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
inner join ag_md_drop_options o on s.practitioner_level = o.id
where c.login = #{mobileNo};
where c.login = #{mobileNo}
</select>
<resultMap id="practitioner_rank_map" type="com.yd.dal.entity.customer.practitioner.PractitionerRankInfo">
<result column="customerId" property="customerId"/>
<result column="practitionerIdForOnLine" property="practitionerIdForOnLine"/>
<result column="practitionerId" property="practitionerId"/>
<result column="name" property="name"/>
<result column="customerId" property="customerId" />
<result column="practitionerIdForOnLine" property="practitionerIdForOnLine" />
<result column="practitionerId" property="practitionerId" />
<result column="name" property="name" />
<result column="titleCode" property="titleCode" />
<result column="titleName" property="titleName"/>
<result column="count" property="count"/>
<result column="fyp" property="fyp"/>
<result column="fyc" property="fyc"/>
<result column="titleName" property="titleName" />
<result column="count" property="count" />
<result column="fyp" property="fyp" />
<result column="fyc" property="fyc" />
</resultMap>
<!-- <select id="getPractitionerRankInfoForOffline" resultMap="practitioner_rank_map" resultType="java.lang.Integer">-->
<!-- &lt;select id="getPractitionerRankInfoForOffline" resultMap="practitioner_rank_map" resultType="java.lang.Integer"&gt;-->
<!-- SELECT-->
<!-- p.SAL_MST_ID as practitionerId ,-->
<!-- p.SAL_MST_NAME as name ,&#45;&#45; 姓名-->
<!-- md.DRP_TITLE_LEVEL as titleCode,&#45;&#45; 职称code-->
<!-- md.DRP_TITLE_NAME as titleName,&#45;&#45; 职称名称-->
<!-- spc.SPC_DIV_NAME as spcDivName,&#45;&#45; 体系id-->
<!-- ifnull(count(m.MON025_002),0) as count,&#45;&#45; 保单id-->
<!-- ifnull(sum(m.MON025_401),0) as fyp,&#45;&#45; 保费-->
<!-- ifnull(sum(policy.INS001_FYCTOTAL),0) as fyc &#45;&#45; 应发佣金-->
<!-- FROM MON025 m INNER JOIN sal001 p on m.MON025_007 = p.SAL_MST_ID &#45;&#45; 业务员id-->
<!-- p.SAL_MST_NAME as name ,&amp;#45;&amp;#45; 姓名-->
<!-- md.DRP_TITLE_LEVEL as titleCode,&amp;#45;&amp;#45; 职称code-->
<!-- md.DRP_TITLE_NAME as titleName,&amp;#45;&amp;#45; 职称名称-->
<!-- spc.SPC_DIV_NAME as spcDivName,&amp;#45;&amp;#45; 体系id-->
<!-- ifnull(count(m.MON025_002),0) as count,&amp;#45;&amp;#45; 保单id-->
<!-- ifnull(sum(m.MON025_401),0) as fyp,&amp;#45;&amp;#45; 保费-->
<!-- ifnull(sum(policy.INS001_FYCTOTAL),0) as fyc &amp;#45;&amp;#45; 应发佣金-->
<!-- FROM MON025 m INNER JOIN sal001 p on m.MON025_007 = p.SAL_MST_ID &amp;#45;&amp;#45; 业务员id-->
<!-- left join DRP003 md on p.FK_DRP_TITLE_CODE = md.DRP_TITLE_CODE-->
<!-- inner JOIN ins001 policy on m.MON025_002 = policy.INS_MST_ID &#45;&#45; 保单id-->
<!-- inner join spc004 spc on m.MON025_006 = spc.SPC_DIV_ID &#45;&#45; 体系-->
<!-- inner JOIN ins001 policy on m.MON025_002 = policy.INS_MST_ID &amp;#45;&amp;#45; 保单id-->
<!-- inner join spc004 spc on m.MON025_006 = spc.SPC_DIV_ID &amp;#45;&amp;#45; 体系-->
<!-- WHERE m.MON025_109 IN (1,2,3,4,7) AND m.MON025_303 = 1 AND m.mon025_108 = 'S01'-->
<!-- <choose>-->
<!-- <when test="time == 1">-->
<!-- &lt;choose&gt;-->
<!-- &lt;when test="time == 1"&gt;-->
<!-- and DATE_FORMAT(policy.INS_MST_ACCEPT_DATE, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )-->
<!-- </when>-->
<!-- <when test="time == 3">-->
<!-- &lt;/when&gt;-->
<!-- &lt;when test="time == 3"&gt;-->
<!-- and QUARTER(policy.INS_MST_ACCEPT_DATE) = QUARTER(NOW()) AND year(policy.INS_MST_ACCEPT_DATE)=year(now())-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- &lt;/when&gt;-->
<!-- &lt;otherwise&gt;-->
<!-- and YEAR(policy.INS_MST_ACCEPT_DATE) = YEAR(now())-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- &lt;/otherwise&gt;-->
<!-- &lt;/choose&gt;-->
<!-- group by p.SAL_MST_ID;-->
<!-- </select>-->
<!-- &lt;/select&gt;-->
<select id="getPractitionerRankInfoForOffline" resultMap="practitioner_rank_map" resultType="java.lang.Integer">
SELECT
......@@ -613,7 +1261,7 @@
YEAR(policy.INS_MST_ACCEPT_DATE) = YEAR(now())
</otherwise>
</choose>
group by p.SAL_MST_ID;
group by p.SAL_MST_ID
</select>
<select id="getPractitionerRankInfoForOnline" resultMap="practitioner_rank_map">
......@@ -625,7 +1273,7 @@
ifnull(count(f.id),0) as count,-- 保单id
ifnull(sum(f.order_price),0) as fyp,-- 保费
ifnull(sum(f.fyc_amount),0) as fyc -- 应发佣金
FROM (select t.* from ag_acl_customer_fortune t where t.drop_option_code = "S01" group by t.order_id ) f INNER JOIN ag_po_order o ON f.order_id = o.id and o.order_price > 0
FROM (select t.* from ag_acl_customer_fortune t where t.drop_option_code = "S01" group by t.order_id ) f INNER JOIN ag_po_order o ON f.order_id = o.id and o.order_price &gt; 0
inner JOIN ag_acl_practitioner p ON f.customer_id = p.customer_id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
left join ag_acl_practitioner_subordinate_system ss on p.subordinate_system_id = ss.id
......@@ -644,7 +1292,7 @@
and YEAR(f.order_date) = YEAR(now())
</otherwise>
</choose>
group by p.id;
group by p.id
</select>
......@@ -657,13 +1305,13 @@
ifnull(count(f.id),0) as count,-- 保单id
ifnull(sum(f.order_price),0) as fyp,-- 保费
ifnull(sum(f.fyc_amount),0) as fyc -- 应发佣金
FROM ag_acl_customer_fortune f INNER JOIN ag_po_order o ON f.order_id = o.id and o.order_price > 0
FROM ag_acl_customer_fortune f INNER JOIN ag_po_order o ON f.order_id = o.id and o.order_price &gt; 0
inner JOIN ag_acl_practitioner p ON f.customer_id = p.customer_id
left join ag_acl_customer c on p.customer_id = c.id
left join ag_acl_practitioner_subordinate_system ss on p.subordinate_system_id = ss.id
WHERE o.status = 3 and f.drop_option_code = "S01"
and c.login in
<foreach collection="mobileSpecials" index="index" item="item" open="(" separator="," close=")">
<foreach close=")" collection="mobileSpecials" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
<choose>
......@@ -677,24 +1325,25 @@
and YEAR(f.order_date) = YEAR(now())
</otherwise>
</choose>
group by p.id;
group by p.id
</select>
<resultMap id="practitioner_info_map" type="com.yd.dal.entity.customer.practitioner.PractitionerInfo">
<result column="customerId" property="customerId"/>
<result column="practitionerId" property="practitionerId"/>
<result column="name" property="name"/>
<result column="gender" property="gender"/>
<result column="customerId" property="customerId" />
<result column="practitionerId" property="practitionerId" />
<result column="name" property="name" />
<result column="gender" property="gender" />
<result column="practitionerType" property="practitionerType" />
<result column="levelCode" property="levelCode" />
<result column="levelName" property="levelName"/>
<result column="insurerBranchName" property="insurerBranchName"/>
<result column="subordinateId" property="subordinateId"/>
<result column="weChatId" property="weChatId"/>
<result column="qqId" property="qqId"/>
<result column="practitionerRegNo" property="practitionerRegNo"/>
<result column="levelName" property="levelName" />
<result column="insurerBranchName" property="insurerBranchName" />
<result column="subordinateId" property="subordinateId" />
<result column="weChatId" property="weChatId" />
<result column="qqId" property="qqId" />
<result column="practitionerRegNo" property="practitionerRegNo" />
<result column="canSeeSalaryList" property="canSeeSalaryList" />
</resultMap>
<select id="findPractitionerInfoByLogin" resultMap="practitioner_info_map">
......@@ -710,13 +1359,15 @@
p.subordinate_system_id as subordinateId,
p.wechat_id as weChatId,
p.qq_id as qqId,
p.practitioner_reg_no as practitionerRegNo
p.practitioner_reg_no as practitionerRegNo,
p.can_see_salary_list as canSeeSalaryList
from ag_acl_customer c inner join ag_acl_practitioner p on c.id = p.customer_id
left join ag_acl_insurer_branch b on p.insurer_branch_id = b.id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
left join ag_md_drop_options o on s.practitioner_level = o.id
where c.login = #{mobileNo}
and p.is_active = 1
and (p.can_login_dyd != 0 OR p.can_login_dyd is null)
</select>
<select id="findByCustomerIdIsActive" resultType="com.yd.dal.entity.customer.AclPractitioner">
......@@ -727,16 +1378,16 @@
and is_active = #{isActive,jdbcType=INTEGER}
</select>
<resultMap id="opportunityQuery" type="com.yd.dal.entity.practitioner.opportunity.OwnOpportunityInfo">
<result column="opportunityId" property="opportunityId"/>
<result column="name" property="name"/>
<result column="mobileNo" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="opportunityFrom" property="opportunityFrom"/>
<result column="opportunityDate" property="opportunityDate"/>
<result column="leadsAssignedId" property="leadsAssignedId"/>
<result column="mdDropOptionName" property="mdDropOptionName"/>
<result column="scoreDay" property="scoreDay"/>
<result column="scoreTotal" property="scoreTotal"/>
<result column="expertType" property="expertType"/>
<result column="opportunityId" property="opportunityId" />
<result column="name" property="name" />
<result column="mobileNo" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler" />
<result column="opportunityFrom" property="opportunityFrom" />
<result column="opportunityDate" property="opportunityDate" />
<result column="leadsAssignedId" property="leadsAssignedId" />
<result column="mdDropOptionName" property="mdDropOptionName" />
<result column="scoreDay" property="scoreDay" />
<result column="scoreTotal" property="scoreTotal" />
<result column="expertType" property="expertType" />
</resultMap>
<select id="ownOpportunityQuery" resultMap="opportunityQuery">
SELECT
......@@ -766,7 +1417,7 @@
<include refid="Base_Column_List" />
from ag_acl_practitioner
where id in
<foreach collection="practitionerIdList" index="index" item="item" open="(" separator="," close=")">
<foreach close=")" collection="practitionerIdList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</select>
......@@ -780,12 +1431,12 @@
and s.is_active = 1
</select>
<resultMap id="playerSalesActivityQuery" type="com.yd.dal.entity.practitioner.opportunity.PlayerSalesActivityInfo">
<result column="practitionerId" property="practitionerId"/>
<result column="name" property="name"/>
<result column="scoreDay" property="scoreDay"/>
<result column="scoreWeek" property="scoreWeek"/>
<result column="scoreMonth" property="scoreMonth"/>
<result column="addOpportunityNum" property="addOpportunityNum"/>
<result column="practitionerId" property="practitionerId" />
<result column="name" property="name" />
<result column="scoreDay" property="scoreDay" />
<result column="scoreWeek" property="scoreWeek" />
<result column="scoreMonth" property="scoreMonth" />
<result column="addOpportunityNum" property="addOpportunityNum" />
</resultMap>
<select id="playerSalesActivityQuery" resultMap="playerSalesActivityQuery">
select
......@@ -820,7 +1471,7 @@
<select id="findMobileNoByPractitionerId" resultType="java.lang.String">
select c.mobile_no
from ag_acl_practitioner p left join ag_acl_customer c on p.customer_id = c.id and c.is_active = 1
where p.id = #{practitionerId,jdbcType=BIGINT} limit 1;
where p.id = #{practitionerId,jdbcType=BIGINT} limit 1
</select>
<select id="findByMobileNoE" resultType="com.yd.dal.entity.customer.practitioner.PractitionerBasicInfo">
SELECT
......@@ -832,8 +1483,7 @@
FROM sal001 p
where p.SAL_MST_MOBILE like concat(concat('%',#{mobileNo,jdbcType=VARCHAR}),'%') limit 1
</select>
<select id="getPractitionerRankInfoByPractitionerIdEG"
resultType="com.yd.dal.entity.customer.practitioner.PractitionerRankInfo">
<select id="getPractitionerRankInfoByPractitionerIdEG" resultType="com.yd.dal.entity.customer.practitioner.PractitionerRankInfo">
SELECT
p.SAL_MST_ID as practitionerId ,
p.SAL_MST_NAME as name ,-- 姓名
......@@ -863,8 +1513,7 @@
</otherwise>
</choose>
</select>
<select id="getPractitionerRankInfoByPractitionerIdYD"
resultType="com.yd.dal.entity.customer.practitioner.PractitionerRankInfo">
<select id="getPractitionerRankInfoByPractitionerIdYD" resultType="com.yd.dal.entity.customer.practitioner.PractitionerRankInfo">
SELECT
p.customer_id as customerId,
p.id as practitionerIdForOnLine ,
......@@ -873,7 +1522,7 @@
ifnull(count(f.id),0) as count,-- 保单id
ifnull(sum(f.order_price),0) as fyp,-- 保费
ifnull(sum(f.fyc_amount),0) as fyc -- 应发佣金
FROM (select t.* from ag_acl_customer_fortune t group by t.order_id ) f INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price > 0
FROM (select t.* from ag_acl_customer_fortune t group by t.order_id ) f INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price &gt; 0
inner JOIN ag_acl_practitioner p ON f.customer_id = p.customer_id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
left join ag_acl_practitioner_subordinate_system ss on p.subordinate_system_id = ss.id
......@@ -904,7 +1553,7 @@
t.CREATE_USER as createUser
from mon011 t INNER JOIN mon025 m ON m.MON025_007 = t.FK_SAL_MST_ID
INNER JOIN mon006 cl on t.MON_DTL_PERIOD = cl.MON_CLS_PERIOD and cl.MON_CLS_TYPE = 1
WHERE m.MON025_109 = 7 AND t.FK_SAL_MST_ID = #{practitionerIdEG,jdbcType=VARCHAR};
WHERE m.MON025_109 = 7 AND t.FK_SAL_MST_ID = #{practitionerIdEG,jdbcType=VARCHAR}
</select>
<select id="findFilePathByMonShId" resultType="com.yd.dal.entity.practitioner.payscale.PayScaleBasicInfo">
......@@ -956,8 +1605,13 @@
<select id="queryTeamAllPractitionerId" resultType="Long">
SELECT id from ag_acl_practitioner
where subordinate_system_id =
where is_active = 1
and subordinate_system_id =
(select subordinate_system_id from ag_acl_practitioner where id = #{practitionerId,jdbcType=BIGINT})
<if test="isActive != null">
and is_active = #{isActive,jdbcType=INTEGER}
</if>
</select>
<select id="findPractitionerInfoByPractitionerId" resultMap="practitioner_info_map">
......@@ -989,25 +1643,25 @@
</select>
<resultMap id="teamMemberDetail" type="com.yd.api.practitioner.vo.subordinate.TeamMemberDetail">
<result column="id" property="practitionerId"/>
<result column="name" property="name"/>
<result column="mobile_no" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="practitionerLevel" property="practitionerLevel"/>
<result column="practitionerTitle" property="practitionerTitle"/>
<result column="branch_name" property="branch"/>
<result column="system" property="system"/>
<result column="mentor" property="mentor"/>
<result column="introducer" property="introducer"/>
<result column="gender" property="gender"/>
<result column="age" property="age"/>
<result column="practitioner_birthdate" property="birthDate"/>
<result column="educationLevel" property="educationLevel"/>
<result column="province" property="province"/>
<result column="city" property="city"/>
<result column="id_type" property="idType"/>
<result column="id_no" property="idNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="effective_start_date" property="effectiveStartDate"/>
<result column="practitioner_reg_no" property="practitionerRegNo"/>
<result column="id" property="practitionerId" />
<result column="name" property="name" />
<result column="mobile_no" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler" />
<result column="practitionerLevel" property="practitionerLevel" />
<result column="practitionerTitle" property="practitionerTitle" />
<result column="branch_name" property="branch" />
<result column="system" property="system" />
<result column="mentor" property="mentor" />
<result column="introducer" property="introducer" />
<result column="gender" property="gender" />
<result column="age" property="age" />
<result column="practitioner_birthdate" property="birthDate" />
<result column="educationLevel" property="educationLevel" />
<result column="province" property="province" />
<result column="city" property="city" />
<result column="id_type" property="idType" />
<result column="id_no" property="idNo" typeHandler="com.yd.util.deshandler.DESTypeHandler" />
<result column="effective_start_date" property="effectiveStartDate" />
<result column="practitioner_reg_no" property="practitionerRegNo" />
</resultMap>
<select id="queryTeamMemberDetailList" resultMap="teamMemberDetail">
select
......@@ -1036,7 +1690,7 @@
subordinate_system_id,insurer_branch_id,mentor_id,introducer_id,practitioner_reg_no,education_level
from ag_acl_practitioner
where id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
) p
......@@ -1051,4 +1705,7 @@
left join (select * from ag_md_code where code_type = 'EducationLevel') c on p.education_level = c.code_code
</select>
<select id="findLeaveOfficeByPractitionerId" resultType="string">
select mobile_no from ag_acl_practitioner where is_active = 0 and subordinate_system_id = #{practitionerId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" />
<result column="practitioner_code" jdbcType="VARCHAR" property="practitionerCode" />
<result column="year_month" jdbcType="VARCHAR" property="yearMonth" />
<result column="payable_amount" jdbcType="DECIMAL" property="payableAmount" />
<result column="taxout_amount" jdbcType="DECIMAL" property="taxoutAmount" />
<result column="net_amount" jdbcType="DECIMAL" property="netAmount" />
<result column="pdf_oss_path" jdbcType="VARCHAR" property="pdfOssPath" />
</resultMap>
<sql id="Base_Column_List">
id, practitioner_id, practitioner_code, `year_month`, payable_amount, taxout_amount,
net_amount, pdf_oss_path
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_life_practitioner_salary
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_life_practitioner_salary
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary" useGeneratedKeys="true">
insert into ag_acl_life_practitioner_salary (practitioner_id, practitioner_code,
`year_month`, payable_amount, taxout_amount,
net_amount, pdf_oss_path)
values (#{practitionerId,jdbcType=BIGINT}, #{practitionerCode,jdbcType=VARCHAR},
#{yearMonth,jdbcType=VARCHAR}, #{payableAmount,jdbcType=DECIMAL}, #{taxoutAmount,jdbcType=DECIMAL},
#{netAmount,jdbcType=DECIMAL}, #{pdfOssPath,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary" useGeneratedKeys="true">
insert into ag_acl_life_practitioner_salary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
practitioner_id,
</if>
<if test="practitionerCode != null">
practitioner_code,
</if>
<if test="yearMonth != null">
`year_month`,
</if>
<if test="payableAmount != null">
payable_amount,
</if>
<if test="taxoutAmount != null">
taxout_amount,
</if>
<if test="netAmount != null">
net_amount,
</if>
<if test="pdfOssPath != null">
pdf_oss_path,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
#{practitionerId,jdbcType=BIGINT},
</if>
<if test="practitionerCode != null">
#{practitionerCode,jdbcType=VARCHAR},
</if>
<if test="yearMonth != null">
#{yearMonth,jdbcType=VARCHAR},
</if>
<if test="payableAmount != null">
#{payableAmount,jdbcType=DECIMAL},
</if>
<if test="taxoutAmount != null">
#{taxoutAmount,jdbcType=DECIMAL},
</if>
<if test="netAmount != null">
#{netAmount,jdbcType=DECIMAL},
</if>
<if test="pdfOssPath != null">
#{pdfOssPath,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary">
update ag_acl_life_practitioner_salary
<set>
<if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if>
<if test="practitionerCode != null">
practitioner_code = #{practitionerCode,jdbcType=VARCHAR},
</if>
<if test="yearMonth != null">
`year_month` = #{yearMonth,jdbcType=VARCHAR},
</if>
<if test="payableAmount != null">
payable_amount = #{payableAmount,jdbcType=DECIMAL},
</if>
<if test="taxoutAmount != null">
taxout_amount = #{taxoutAmount,jdbcType=DECIMAL},
</if>
<if test="netAmount != null">
net_amount = #{netAmount,jdbcType=DECIMAL},
</if>
<if test="pdfOssPath != null">
pdf_oss_path = #{pdfOssPath,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary">
update ag_acl_life_practitioner_salary
set practitioner_id = #{practitionerId,jdbcType=BIGINT},
practitioner_code = #{practitionerCode,jdbcType=VARCHAR},
`year_month` = #{yearMonth,jdbcType=VARCHAR},
payable_amount = #{payableAmount,jdbcType=DECIMAL},
taxout_amount = #{taxoutAmount,jdbcType=DECIMAL},
net_amount = #{netAmount,jdbcType=DECIMAL},
pdf_oss_path = #{pdfOssPath,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="queryListByPractitionerId" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
</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