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 { ...@@ -184,21 +184,22 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
Long practitionerId = agmsHiringDalService.findPractitionerIdByLoginId(loginId); Long practitionerId = agmsHiringDalService.findPractitionerIdByLoginId(loginId);
AclUser user = aclUserDalService.selectByPrimaryKey(loginId); AclUser user = aclUserDalService.selectByPrimaryKey(loginId);
String mobileNo = user.getMobileNo(); String mobileNo = user.getMobileNo();
this.doApprove(practitionerId, mobileNo, requestVO, responseVO); this.doApprove(practitionerId, mobileNo, user.getId(), requestVO, responseVO);
return responseVO; return responseVO;
} else { } else {
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
AclPractitioner practitioner = aclPractitionerMapper.selectByPrimaryKey(practitionerId); AclPractitioner practitioner = aclPractitionerMapper.selectByPrimaryKey(practitionerId);
String mobileNo = practitioner.getMobileNo(); String mobileNo = practitioner.getMobileNo();
this.doApprove(practitionerId, mobileNo, requestVO, responseVO); this.doApprove(practitionerId, mobileNo, Long.valueOf("-1"), requestVO, responseVO);
return 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(); Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
//查询审批流程 //查询审批流程
List<MdPractitionerHiringApproveSteps> hiringApproveStepsList = systemConfigService.findHiringApproveStepsAll(); List<MdPractitionerHiringApproveSteps> hiringApproveStepsList = systemConfigService.findHiringApproveStepsAll();
...@@ -246,7 +247,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -246,7 +247,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
String basicInfoStatus = null; String basicInfoStatus = null;
if (approvingStatus == 1) { if (approvingStatus == 1) {
//最后一步 并同意 更新经纪人系类表 //最后一步 并同意 更新经纪人系类表
updatePractitionerInfo(hiringBasicInfoId, practitionerId); updatePractitionerInfo(hiringBasicInfoId, operater);
//最后一步通过发邮件通知人事填写相关经纪人信息 //最后一步通过发邮件通知人事填写相关经纪人信息
this.sendMailToHR(basicInfo2); this.sendMailToHR(basicInfo2);
basicInfoStatus = "0"; basicInfoStatus = "0";
...@@ -549,13 +550,12 @@ public class AgmsHiringServiceImpl implements AgmsHiringService { ...@@ -549,13 +550,12 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
//收件地址 //收件地址
String address = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress"); String address = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress");
//抄送地址 //抄送地址
String ccAddress = systemConfigService.getSingleConfigValue("PractitionerHiringNotifyAddress"); List<String> ccList = systemConfigService.getListConfigValue("PractitionerHiringNotifyCCAddress");
String[] ccAddresses = {ccAddress}; List<String> arrList = new ArrayList(ccList);
String[] ccAddresses = arrList.toArray(new String[arrList.size()]);
AclPractitionerHiringMembership memberShip = membershipMapper.selectByHiringBasicInfoId(basicInfo.getId()); AclPractitionerHiringMembership memberShip = membershipMapper.selectByHiringBasicInfoId(basicInfo.getId());
StringBuilder messageText = new StringBuilder(); StringBuilder messageText = new StringBuilder();
messageText.append("银盾人事你好,"); messageText.append("银盾人事你好,");
if (Long.valueOf("30").equals(memberShip.getMdDropOptionId())) { if (Long.valueOf("30").equals(memberShip.getMdDropOptionId())) {
......
...@@ -3,6 +3,7 @@ package com.yd.api.practitioner; ...@@ -3,6 +3,7 @@ package com.yd.api.practitioner;
import com.yd.api.practitioner.service.PractitionerBasicInfoService; import com.yd.api.practitioner.service.PractitionerBasicInfoService;
import com.yd.api.practitioner.service.PractitionerService; import com.yd.api.practitioner.service.PractitionerService;
import com.yd.api.practitioner.service.ScheduleTrackService; import com.yd.api.practitioner.service.ScheduleTrackService;
import com.yd.api.practitioner.vo.login.CanSeeSalaryListResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO; import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO; import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO; import com.yd.api.practitioner.vo.media.MediaGetReqVO;
...@@ -33,6 +34,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -33,6 +34,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.awt.*;
@Controller @Controller
@RestController @RestController
...@@ -52,6 +55,12 @@ public class PractitionerController { ...@@ -52,6 +55,12 @@ public class PractitionerController {
*/ */
@RequestMapping("/login") @RequestMapping("/login")
public Object practitionerLogin(@RequestBody PractitionerLoginRequestVO requestVO){ 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(); JsonResult result = new JsonResult();
PractitionerLoginResponseVO responseVO = practitionerService.practitionerLogin(requestVO); PractitionerLoginResponseVO responseVO = practitionerService.practitionerLogin(requestVO);
result.addResult(responseVO); result.addResult(responseVO);
...@@ -592,4 +601,16 @@ public class PractitionerController { ...@@ -592,4 +601,16 @@ public class PractitionerController {
return result; 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; 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.PotentialGoalsActionsUpdateResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO; import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO; import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
...@@ -224,5 +225,11 @@ public interface PractitionerService { ...@@ -224,5 +225,11 @@ public interface PractitionerService {
* @param practitionerId * @param practitionerId
* @return * @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; ...@@ -28,10 +28,12 @@ import com.yd.dal.entity.meta.OptionsEGolden;
import com.yd.dal.entity.order.CustomerPolicyInfo; import com.yd.dal.entity.order.CustomerPolicyInfo;
import com.yd.dal.entity.order.PolicyDetailInfoE; import com.yd.dal.entity.order.PolicyDetailInfoE;
import com.yd.dal.entity.order.PolicyFactorInfoE; 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.practitioner.payscale.PayScaleBasicInfo;
import com.yd.dal.entity.product.Product; import com.yd.dal.entity.product.Product;
import com.yd.dal.entity.product.ProductE; import com.yd.dal.entity.product.ProductE;
import com.yd.dal.entity.product.ProductPlan; import com.yd.dal.entity.product.ProductPlan;
import com.yd.dal.mapper.practitioner.AgAclLifePractitionerSalaryMapper;
import com.yd.dal.service.customer.AclFileUploadDALService; import com.yd.dal.service.customer.AclFileUploadDALService;
import com.yd.dal.service.customer.AclPractitionerDALService; import com.yd.dal.service.customer.AclPractitionerDALService;
import com.yd.dal.service.meta.MdDropOptionsDALService; import com.yd.dal.service.meta.MdDropOptionsDALService;
...@@ -73,6 +75,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -73,6 +75,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private AclFileUploadDALService aclFileUploadDALService; private AclFileUploadDALService aclFileUploadDALService;
@Autowired @Autowired
private PractitionerService practitionerService; private PractitionerService practitionerService;
@Autowired
private AgAclLifePractitionerSalaryMapper practitionerSalaryMapper;
@Override @Override
public PolicyListQueryResponseVO policyListQuery(PolicyListQueryRequestVO requestVO) { public PolicyListQueryResponseVO policyListQuery(PolicyListQueryRequestVO requestVO) {
...@@ -131,7 +135,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -131,7 +135,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
public PayScaleQueryResponseVO payScaleListQuery(PayScaleQueryRequestVO requestVO) { public PayScaleQueryResponseVO payScaleListQuery(PayScaleQueryRequestVO requestVO) {
PayScaleQueryResponseVO responseVO = new PayScaleQueryResponseVO(); PayScaleQueryResponseVO responseVO = new PayScaleQueryResponseVO();
String practitionerIdEG = requestVO.getPractitionerIdEG(); String practitionerIdEG = requestVO.getPractitionerIdEG();
if(!Strings.isNullOrEmpty(practitionerIdEG)){ Long practitionerId = requestVO.getPractitionerId();
if(!Strings.isNullOrEmpty(practitionerIdEG) && practitionerId != null){
List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG); List<PayScaleInfo> payScaleInfoListAll = aclPractitionerDALService.findPayScaleByPractitionerEG(practitionerIdEG);
if(!payScaleInfoListAll.isEmpty()){ if(!payScaleInfoListAll.isEmpty()){
Map<String,String> dtlTypeMap = new HashMap<>(); Map<String,String> dtlTypeMap = new HashMap<>();
...@@ -140,9 +146,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -140,9 +146,9 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
optionsEGoldenList.forEach(i->dtlTypeMap.put(i.getOptAttr(),i.getOptName())); optionsEGoldenList.forEach(i->dtlTypeMap.put(i.getOptAttr(),i.getOptName()));
List<OptionsEGolden> titleList = mdDropOptionsDALService.findAllTitleEG(); List<OptionsEGolden> titleList = mdDropOptionsDALService.findAllTitleEG();
titleList.forEach(i->titleMap.put(i.getTitleCode(),i.getTitleName())); titleList.forEach(i->titleMap.put(i.getTitleCode(),i.getTitleName()));
Map<Integer,PayScaleInfo> payScaleInfoMap = new HashMap<>(); Map<Long,PayScaleInfo> payScaleInfoMap = new HashMap<>();
PayScaleInfo payScaleInfo; PayScaleInfo payScaleInfo;
Integer time; Long time;
for(PayScaleInfo item : payScaleInfoListAll){ for(PayScaleInfo item : payScaleInfoListAll){
time = item.getMonDtlPeriod(); time = item.getMonDtlPeriod();
if(payScaleInfoMap.containsKey(time)){ if(payScaleInfoMap.containsKey(time)){
...@@ -162,17 +168,37 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -162,17 +168,37 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2)); item.setMonDtlRAmount(CommonUtil.doubleFormat(item.getMonDtlRAmount(),2));
} }
List<PayScaleInfo> resultList = new ArrayList<>(payScaleInfoMap.values()); 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.setPayScaleInfos(resultList);
} }
responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true,ZHBErrorConfig.getErrorInfo("800000")));
}else{ }else{
String[] params = {"practitionerIdEG"}; String[] params = {"practitionerIdEG, practitionerId"};
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610002", params))); responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("610002", params)));
} }
return responseVO; 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 @Override
public PayScalePdfResponseVO payScalePdf(PayScalePdfRequestVO requestVO) { public PayScalePdfResponseVO payScalePdf(PayScalePdfRequestVO requestVO) {
PayScalePdfResponseVO responseVO = new PayScalePdfResponseVO(); PayScalePdfResponseVO responseVO = new PayScalePdfResponseVO();
...@@ -253,7 +279,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -253,7 +279,7 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
try { try {
// 获取团队成员或被辅导人的practitionerId // 获取团队成员或被辅导人的practitionerId
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId); List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId,1);
List<TeamMemberDetail> dataList = aclPractitionerDALService.queryTeamMemberDetailList(practitionerIdList); List<TeamMemberDetail> dataList = aclPractitionerDALService.queryTeamMemberDetailList(practitionerIdList);
...@@ -443,8 +469,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -443,8 +469,8 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
private void calculateRAmount(PayScaleInfo payScaleInfoMain, PayScaleInfo payScaleInfoElse) { private void calculateRAmount(PayScaleInfo payScaleInfoMain, PayScaleInfo payScaleInfoElse) {
if(payScaleInfoMain != null && payScaleInfoElse != null){ if(payScaleInfoMain != null && payScaleInfoElse != null){
Integer shIdMain = payScaleInfoMain.getMonShId(); Long shIdMain = payScaleInfoMain.getMonShId();
Integer shIdElse = payScaleInfoElse.getMonShId(); Long shIdElse = payScaleInfoElse.getMonShId();
Double all = payScaleInfoMain.getMonDtlRAmount(); Double all = payScaleInfoMain.getMonDtlRAmount();
double allA = (shIdMain.equals(shIdElse))? 0D : payScaleInfoMain.getMonDtlAmount(); double allA = (shIdMain.equals(shIdElse))? 0D : payScaleInfoMain.getMonDtlAmount();
Double temp = payScaleInfoElse.getMonDtlAmount(); Double temp = payScaleInfoElse.getMonDtlAmount();
......
...@@ -6,6 +6,7 @@ import com.yd.dal.mapper.customer.*; ...@@ -6,6 +6,7 @@ import com.yd.dal.mapper.customer.*;
import com.yd.dal.mapper.practitioner.PractitionerHiringMapper; import com.yd.dal.mapper.practitioner.PractitionerHiringMapper;
import com.libs.pdf.*; import com.libs.pdf.*;
import com.yd.rmi.ali.oss.service.OssService; import com.yd.rmi.ali.oss.service.OssService;
import com.yd.rmi.cache.SystemConfigService;
import com.yd.util.CommonUtil; import com.yd.util.CommonUtil;
import com.yd.util.HttpUtil; import com.yd.util.HttpUtil;
import com.yd.util.PDFConfiguration; import com.yd.util.PDFConfiguration;
...@@ -34,6 +35,8 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring ...@@ -34,6 +35,8 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
private AclPractitionerHiringApproveRecordsMapper recordsMapper; private AclPractitionerHiringApproveRecordsMapper recordsMapper;
@Autowired @Autowired
private AclPractitionerHiringPersonalStatementsMapper statementsMapper; private AclPractitionerHiringPersonalStatementsMapper statementsMapper;
@Autowired
private SystemConfigService systemConfigService;
/** /**
...@@ -339,7 +342,10 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring ...@@ -339,7 +342,10 @@ public class PractitionerHiringContractServiceImpl implements PractitionerHiring
} }
} }
data.put("secondSubsystemManager", ""); 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 ...@@ -328,6 +328,18 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
List<AclPractitionerHiringPersonalStatements> personalStatementList = requestVO.getPersonalStatementList(); List<AclPractitionerHiringPersonalStatements> personalStatementList = requestVO.getPersonalStatementList();
Long basicInfoId = requestVO.getHiringBasicInfoId(); 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(); Date curDate = new Date();
personalStatementList.forEach(item -> { personalStatementList.forEach(item -> {
...@@ -571,6 +583,13 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService ...@@ -571,6 +583,13 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
@Override @Override
public CommonResultResponseVO saveBankAccount(SaveBankAccountRequestVO requestVO) { public CommonResultResponseVO saveBankAccount(SaveBankAccountRequestVO requestVO) {
CommonResultResponseVO resp = new CommonResultResponseVO(); 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 { try {
AclPractitionerHiringBasicInfo basicInfo = new AclPractitionerHiringBasicInfo(); AclPractitionerHiringBasicInfo basicInfo = new AclPractitionerHiringBasicInfo();
BeanUtils.copyProperties(requestVO, basicInfo); BeanUtils.copyProperties(requestVO, basicInfo);
...@@ -711,23 +730,28 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService ...@@ -711,23 +730,28 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
Long hiringBasicInfoId = requestVO.getHiringBasicInfoId(); Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
if (hiringBasicInfoId == null) { if (hiringBasicInfoId == null) {
resp.setCommonResult(new CommonResult(true, "此经纪人无电子合同")); resp.setCommonResult(new CommonResult(false, "此经纪人无电子合同"));
return resp; return resp;
} }
AclPractitioner practitioner = aclPractitionerMapper.selectByPrimaryKey(practitionerId); 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)) { if (StringUtils.isBlank(practitionerRegNo)) {
resp.setCommonResult(new CommonResult(true, "内部编号不能为空,请注意保存")); resp.setCommonResult(new CommonResult(false, "执业编号不能为空,请保存后再生成合同"));
return resp;
}
if (StringUtils.isBlank(practitionerCode)) {
resp.setCommonResult(new CommonResult(false, "内部编号不能为空,请保存后再生成合同"));
return resp; return resp;
} }
// if (contractNo != null) { // 合同编号已存在就不生成新的
// resp.setCommonResult(new CommonResult(true, "合同已存在")); String contractNo = practitioner.getContractNo();
// return resp; if (StringUtils.isEmpty(contractNo)) {
// } contractNo = hiringContractService.getNextContractNo();
String contractNo = hiringContractService.getNextContractNo(); }
String contractOssPath = hiringContractService.generatePractitionerContract(practitionerCode, contractNo, hiringBasicInfoId); String contractOssPath = hiringContractService.generatePractitionerContract(practitionerCode, contractNo, hiringBasicInfoId);
//4、经纪人表生成经纪人记录ag_acl_practitioner,ag_acl_practitioner.contract_oss_path //4、经纪人表生成经纪人记录ag_acl_practitioner,ag_acl_practitioner.contract_oss_path
......
...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper; ...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
import com.yd.api.customer.service.CustomerService; import com.yd.api.customer.service.CustomerService;
import com.yd.api.customer.vo.register.RegisterRequestVO; import com.yd.api.customer.vo.register.RegisterRequestVO;
import com.yd.api.customer.vo.register.RegisterResponseVO; 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.PotentialGoalsActionsUpdateResponseVO;
import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO; import com.yd.api.practitioner.vo.recruit.PotentialGoalsQueryResponseVO;
import com.yd.api.practitioner.vo.login.PractitionerLoginBasicInfo; import com.yd.api.practitioner.vo.login.PractitionerLoginBasicInfo;
...@@ -216,6 +217,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -216,6 +217,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
responseVO.setPractitionerTypeId(practitionerType); responseVO.setPractitionerTypeId(practitionerType);
responseVO.setPractitionerBasicInfo(basicInfo); responseVO.setPractitionerBasicInfo(basicInfo);
responseVO.setLoginTimes(logTimes); responseVO.setLoginTimes(logTimes);
responseVO.setCanSeeSalaryList(practitionerInfo.getCanSeeSalaryList());
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
// } // }
}else{ }else{
...@@ -1806,7 +1808,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1806,7 +1808,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
TeamActionsAverageQueryResponseVO responseVO = new TeamActionsAverageQueryResponseVO(); TeamActionsAverageQueryResponseVO responseVO = new TeamActionsAverageQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
//该团队长下团队所有经纪人信息 //该团队长下团队所有经纪人信息
List<Long> practitionerIds = this.getPractitionerIdList(practitionerId); List<Long> practitionerIds = this.getPractitionerIdList(practitionerId,1);
//团队经纪人个数 //团队经纪人个数
BigDecimal practitionerNum = BigDecimal.valueOf(practitionerIds.size()); BigDecimal practitionerNum = BigDecimal.valueOf(practitionerIds.size());
...@@ -1865,14 +1867,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1865,14 +1867,14 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
} }
@Override @Override
public List<Long> getPractitionerIdList(Long practitionerId) { public List<Long> getPractitionerIdList(Long practitionerId,Integer isActive) {
List<Long> practitionerIdList = new ArrayList<>(); List<Long> practitionerIdList = new ArrayList<>();
practitionerIdList.add(practitionerId); practitionerIdList.add(practitionerId);
// 判断当前经纪人是否为团队长 // 判断当前经纪人是否为团队长
int count = aclPractitionerDALService.isTeamLeader(practitionerId); int count = aclPractitionerDALService.isTeamLeader(practitionerId);
if (count > 0) { if (count > 0) {
List<Long> practitionerIdList1 = aclPractitionerDALService.queryTeamAllPractitionerId(practitionerId); List<Long> practitionerIdList1 = aclPractitionerDALService.queryTeamAllPractitionerId(practitionerId,isActive);
practitionerIdList.addAll(practitionerIdList1); practitionerIdList.addAll(practitionerIdList1);
} else { } else {
List<Long> practitionerIdList2 = aclPractitionerDALService.queryMentoredByPractitionerId(practitionerId); List<Long> practitionerIdList2 = aclPractitionerDALService.queryMentoredByPractitionerId(practitionerId);
...@@ -1884,6 +1886,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1884,6 +1886,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
} }
@Override @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) { public PotentialGoalsActionsQueryResponseVO potentialGoalsActionsQuery(PotentialGoalsActionsQueryRequestVO requestVO) {
PotentialGoalsActionsQueryResponseVO responseVO = new PotentialGoalsActionsQueryResponseVO(); PotentialGoalsActionsQueryResponseVO responseVO = new PotentialGoalsActionsQueryResponseVO();
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
...@@ -1979,7 +1990,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -1979,7 +1990,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
List<SalesPerformanceForecastInfo> infos = new ArrayList<>(); List<SalesPerformanceForecastInfo> infos = new ArrayList<>();
//通过团队长经纪人id,查询此团队所有经纪人id //通过团队长经纪人id,查询此团队所有经纪人id
Long practitionerId = requestVO.getPractitionerId(); Long practitionerId = requestVO.getPractitionerId();
List<AclPractitioner> practitioners = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId)); List<AclPractitioner> practitioners = aclPractitionerDALService.findByIds(this.getPractitionerIdList(practitionerId,1));
if (practitioners.isEmpty()){ if (practitioners.isEmpty()){
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO; return responseVO;
...@@ -2398,6 +2409,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2398,6 +2409,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
getMemberInfoForOnLine(memberInfoMap,practitionerId,time); getMemberInfoForOnLine(memberInfoMap,practitionerId,time);
//eGolden //eGolden
getMemberInfoForEGolden(memberInfoMap,practitionerId,time); 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进行排序 //查询出来的结果按照fyp进行排序
List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values()); List<SubordinateSystemMemberInfo> memberInfoList = new ArrayList<>(memberInfoMap.values());
memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp)); memberInfoList.sort(Comparator.comparingDouble(SubordinateSystemMemberInfo::getFyp));
...@@ -2440,7 +2460,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2440,7 +2460,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
* @param time * @param time
*/ */
private void getMemberInfoForEGolden(Map<String, SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer 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<>(); List<String> mobileNoList = new ArrayList<>();
for(AclPractitioner item : practitionerList){ for(AclPractitioner item : practitionerList){
mobileNoList.add(item.getMobileNo()); mobileNoList.add(item.getMobileNo());
...@@ -2547,7 +2567,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -2547,7 +2567,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
*/ */
private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) { private void getMemberInfoForOnLine(Map<String,SubordinateSystemMemberInfo> memberInfoMap, Long practitionerId, Integer time) {
//1、查询该团队长所在体系的所有成员 //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){ if(!practitionerList.isEmpty() && practitionerList.get(0) != null){
Map<Long,Long> customerMap = new HashMap<>(); Map<Long,Long> customerMap = new HashMap<>();
Map<Long,String> practitionerIdMobileNoMap = new HashMap<>(); Map<Long,String> practitionerIdMobileNoMap = new HashMap<>();
......
...@@ -297,7 +297,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService { ...@@ -297,7 +297,7 @@ public class ScheduleTrackServiceImpl implements ScheduleTrackService {
Date weekOne = cal2.getTime(); Date weekOne = cal2.getTime();
// 获取团队成员或被辅导人的practitionerId // 获取团队成员或被辅导人的practitionerId
List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId); List<Long> practitionerIdList = practitionerService.getPractitionerIdList(practitionerId,null);
// 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC // 根据团队长经纪人id查询团队每个成员本日,本周,本月得分以及---线上本月FYC
List<PersonalPEPScore> saleAndRecuit = scheduleTrackMapper.querySaleRecuitScoreFYC(practitionerIdList); 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 { ...@@ -10,6 +10,7 @@ public class PractitionerLoginResponseVO {
private String practitionerIdEG; private String practitionerIdEG;
private Integer loginTimes; private Integer loginTimes;
private String getOpenIdUrl; private String getOpenIdUrl;
private Long canSeeSalaryList;
private PractitionerLoginBasicInfo practitionerBasicInfo; private PractitionerLoginBasicInfo practitionerBasicInfo;
private CommonResult commonResult; private CommonResult commonResult;
...@@ -76,4 +77,12 @@ public class PractitionerLoginResponseVO { ...@@ -76,4 +77,12 @@ public class PractitionerLoginResponseVO {
public void setPractitionerTypeId(Long practitionerTypeId) { public void setPractitionerTypeId(Long practitionerTypeId) {
this.practitionerTypeId = 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; package com.yd.api.practitioner.vo.payscale;
public class PayScaleInfo { public class PayScaleInfo {
private Integer monShId; private Long monShId;
private String salMstId; private String salMstId;
private String drpTitleCode; private String drpTitleCode;
private String monDtlType; private String monDtlType;
private String monDtlItem; private String monDtlItem;
private Integer monDtlPeriod; private Long monDtlPeriod;
private Double monDtlAmount; private Double monDtlAmount;
private Double monDtlRAmount; private Double monDtlRAmount;
private String createDate; private String createDate;
private String createUser; private String createUser;
private String pdfOssPath;
public Integer getMonShId() { public Long getMonShId() {
return monShId; return monShId;
} }
public void setMonShId(Integer monShId) { public void setMonShId(Long monShId) {
this.monShId = monShId; this.monShId = monShId;
} }
...@@ -84,11 +85,19 @@ public class PayScaleInfo { ...@@ -84,11 +85,19 @@ public class PayScaleInfo {
this.createUser = createUser; this.createUser = createUser;
} }
public Integer getMonDtlPeriod() { public Long getMonDtlPeriod() {
return monDtlPeriod; return monDtlPeriod;
} }
public void setMonDtlPeriod(Integer monDtlPeriod) { public void setMonDtlPeriod(Long monDtlPeriod) {
this.monDtlPeriod = 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; ...@@ -3,6 +3,8 @@ package com.yd.api.practitioner.vo.payscale;
public class PayScaleQueryRequestVO { public class PayScaleQueryRequestVO {
private String practitionerIdEG; private String practitionerIdEG;
private Long practitionerId;
public String getPractitionerIdEG() { public String getPractitionerIdEG() {
return practitionerIdEG; return practitionerIdEG;
} }
...@@ -10,4 +12,12 @@ public class PayScaleQueryRequestVO { ...@@ -10,4 +12,12 @@ public class PayScaleQueryRequestVO {
public void setPractitionerIdEG(String practitionerIdEG) { public void setPractitionerIdEG(String practitionerIdEG) {
this.practitionerIdEG = practitionerIdEG; this.practitionerIdEG = practitionerIdEG;
} }
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
} }
package com.yd.api.practitioner.vo.payscale; package com.yd.api.practitioner.vo.payscale;
import com.yd.api.result.CommonResult; import com.yd.api.result.CommonResult;
import com.yd.dal.entity.practitioner.payscale.AgAclLifePractitionerSalary;
import java.util.List; import java.util.List;
public class PayScaleQueryResponseVO { public class PayScaleQueryResponseVO {
private List<PayScaleInfo> payScaleInfos; private List<PayScaleInfo> payScaleInfos;
private CommonResult commonResult; private CommonResult commonResult;
private List<AgAclLifePractitionerSalary> list;
public List<PayScaleInfo> getPayScaleInfos() { public List<PayScaleInfo> getPayScaleInfos() {
return payScaleInfos; return payScaleInfos;
...@@ -23,4 +25,12 @@ public class PayScaleQueryResponseVO { ...@@ -23,4 +25,12 @@ public class PayScaleQueryResponseVO {
public void setCommonResult(CommonResult commonResult) { public void setCommonResult(CommonResult commonResult) {
this.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; package com.yd.dal.entity.customer;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
* ag_acl_practitioner * 从业人员执业证信息表
* @author
*/ */
@Data @Data
public class AclPractitioner implements Serializable { public class AclPractitioner {
private static final long serialVersionUID = 1L;
/** /**
* serial id * serial id
*/ */
...@@ -106,6 +105,11 @@ public class AclPractitioner implements Serializable { ...@@ -106,6 +105,11 @@ public class AclPractitioner implements Serializable {
private String employeeNo; private String employeeNo;
/** /**
* 员工合同编号
*/
private String contractNo;
/**
* 0=No, 1=Yes * 0=No, 1=Yes
*/ */
private Integer isActive; private Integer isActive;
...@@ -188,6 +192,11 @@ public class AclPractitioner implements Serializable { ...@@ -188,6 +192,11 @@ public class AclPractitioner implements Serializable {
private String educationLevel; private String educationLevel;
/** /**
* 毕业学校
*/
private String graduatedUniversity;
/**
* FK ag_acl_practitioner.id 辅导人 * FK ag_acl_practitioner.id 辅导人
*/ */
private Long mentorId; private Long mentorId;
...@@ -203,19 +212,22 @@ public class AclPractitioner implements Serializable { ...@@ -203,19 +212,22 @@ public class AclPractitioner implements Serializable {
private Integer gender; 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 { ...@@ -13,6 +13,7 @@ public class PractitionerInfo {
private String weChatId; private String weChatId;
private String qqId; private String qqId;
private String practitionerRegNo; private String practitionerRegNo;
private Long canSeeSalaryList;
public Long getCustomerId() { public Long getCustomerId() {
return customerId; return customerId;
...@@ -109,4 +110,12 @@ public class PractitionerInfo { ...@@ -109,4 +110,12 @@ public class PractitionerInfo {
public void setGender(Integer gender) { public void setGender(Integer gender) {
this.gender = 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; package com.yd.dal.mapper.customer;
import com.yd.api.practitioner.vo.payscale.PayScaleInfo; import com.yd.api.practitioner.vo.payscale.PayScaleInfo;import com.yd.api.practitioner.vo.subordinate.TeamMemberDetail;import com.yd.dal.entity.customer.AclPractitioner;
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 java.util.List; 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 { public interface AclPractitionerMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
...@@ -26,43 +17,49 @@ public interface AclPractitionerMapper { ...@@ -26,43 +17,49 @@ public interface AclPractitionerMapper {
int updateByPrimaryKey(AclPractitioner record); 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); PractitionerBasicInfo getPractitionerInfoByMobileNoForOffline(String mobileNo);
List<PractitionerRankInfo> getPractitionerRankInfoForOffline(@Param("time") Integer time); List<PractitionerRankInfo> getPractitionerRankInfoForOffline(@Param("time") Integer time);
PractitionerBasicInfo getPractitionerInfoByMobileNoForOnline(String mobileNo); 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> findByIds(@Param("practitionerIdList") List<Long> practitionerIdList);
List<AclPractitioner> findForSubordinateIdByPractitionerId(Long practitionerId); 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 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); AclPractitioner findPractitionerByLeadsAssignedId(Long leadsAssignedId);
...@@ -70,7 +67,7 @@ public interface AclPractitionerMapper { ...@@ -70,7 +67,7 @@ public interface AclPractitionerMapper {
int isTeamLeader(Long practitionerId); 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); List<Long> queryMentoredByPractitionerId(Long practitionerId);
...@@ -80,4 +77,5 @@ public interface AclPractitionerMapper { ...@@ -80,4 +77,5 @@ public interface AclPractitionerMapper {
List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList); 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 { ...@@ -179,7 +179,7 @@ public interface AclPractitionerDALService {
int isTeamLeader(Long practitionerId); int isTeamLeader(Long practitionerId);
List<Long> queryTeamAllPractitionerId(Long practitionerId); List<Long> queryTeamAllPractitionerId(Long practitionerId,Integer isActive);
List<Long> queryMentoredByPractitionerId(Long practitionerId); List<Long> queryMentoredByPractitionerId(Long practitionerId);
...@@ -188,4 +188,6 @@ public interface AclPractitionerDALService { ...@@ -188,4 +188,6 @@ public interface AclPractitionerDALService {
PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId); PractitionerInfo findPractitionerInfoByPractitionerId(Long practitionerId);
List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList); List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList);
List<String> findLeaveOfficeByPractitionerId(Long practitionerId);
} }
...@@ -19,6 +19,7 @@ import org.apache.log4j.Logger; ...@@ -19,6 +19,7 @@ import org.apache.log4j.Logger;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Service("aclPractitionerDALService") @Service("aclPractitionerDALService")
public class AclPractitionerDALServiceImpl implements AclPractitionerDALService { public class AclPractitionerDALServiceImpl implements AclPractitionerDALService {
...@@ -173,8 +174,8 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService ...@@ -173,8 +174,8 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
} }
@Override @Override
public List<Long> queryTeamAllPractitionerId(Long practitionerId) { public List<Long> queryTeamAllPractitionerId(Long practitionerId,Integer isActive) {
return aclPractitionerMapper.queryTeamAllPractitionerId(practitionerId); return aclPractitionerMapper.queryTeamAllPractitionerId(practitionerId, isActive);
} }
@Override @Override
...@@ -196,4 +197,13 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService ...@@ -196,4 +197,13 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList) { public List<TeamMemberDetail> queryTeamMemberDetailList(List<Long> practitionerIdList) {
return aclPractitionerMapper.queryTeamMemberDetailList(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;
}
} }
<?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