Commit 876f46b8 by yao.xiao

ydLife经纪人审批

parent dfed4d47
......@@ -93,7 +93,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
//是否可进行审批操作 0.不可审批(未到) 1.可审批 2.已审批 3.无权审批(默认) 4.已驳回
Long hiringApproveStatus = 3L;
//审批到哪一步了
Long hiringApproveStepsId = null;
Long hiringApproveStepsSeq = null;
//查看审批流程最后一次,是否通过
PractitionerHiringApproveRecords recordsFinally = new PractitionerHiringApproveRecords();
if (!practitionerHiringApproveRecordsList.isEmpty()) {
......@@ -102,7 +102,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
if (CommonUtil.isNullOrZero(approvingStatusId)) {
//已驳回
hiringApproveStatus = 4L;
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
}
......@@ -110,7 +110,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
Long loginPractitionerId = agmsHiringDalService.findPractitionerIdByLoginId(loginId);
//AGMS登入者手机号不是经纪人手机号,无权审批
if (!CommonUtil.isNullOrZero(loginPractitionerId)) {
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
//遍历已审批结果,查看此agms登入者是否已审批
for (PractitionerHiringApproveRecords practitionerHiringApproveRecords : practitionerHiringApproveRecordsList) {
......@@ -118,7 +118,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
if (approvingPractitionerId.equals(loginPractitionerId)) {
//已审批
hiringApproveStatus = 2L;
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
}
//查询审批流程
......@@ -130,15 +130,15 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
List<String> hiringApproveMobileNo = systemConfigService.findHiringApproveMobileNo(hiringApproveSteps, practitionerLevelId);
//agms登入者无审批权力
if (!hiringApproveMobileNo.contains(loginMobileNo)) {
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
//此经纪人最后一次审批步骤id
hiringApproveStepsId = recordsFinally.getApproveStepId();
hiringApproveStepsSeq = recordsFinally.getApproveStepId();
//查询此经纪人最后一次审批步骤详细信息
int seq = 0;
for (int i = 0; i < hiringApproveSteps.size(); i++) {
Long id = hiringApproveSteps.get(i).getId();
if (id.equals(hiringApproveStepsId)) {
if (id.equals(hiringApproveStepsSeq)) {
seq = i;
break;
}
......@@ -158,20 +158,20 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
}
if (loginHiringApproveStep == null){
hiringApproveStatus = 2L;
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
//查看下一审批步骤
mdPractitionerHiringApproveSteps = hiringApproveSteps.get(seq+1);
Long mdPractitionerHiringApproveStepsId = mdPractitionerHiringApproveSteps.getId();
Long mdPractitionerHiringApproveStepsSeq = Long.valueOf(mdPractitionerHiringApproveSteps.getStepSeq());
Long loginHiringApproveStepId = loginHiringApproveStep.getId();
if (mdPractitionerHiringApproveStepsId.equals(loginHiringApproveStepId)){
if (mdPractitionerHiringApproveStepsSeq.equals(loginHiringApproveStepId)){
//可审批
hiringApproveStatus = 1L;
hiringApproveStepsId = mdPractitionerHiringApproveStepsId;
hiringApproveStepsSeq = mdPractitionerHiringApproveStepsSeq;
}else {
//0.不可审批(未到)
hiringApproveStatus = 0L;
}
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new PractitionerHiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
}
......@@ -13,7 +13,7 @@ public class PractitionerHiringApproveSteps {
/**
* 审批步骤经行到哪一步了
*/
private Long hiringApproveStepsId;
private Long hiringApproveStepsSeq;
......@@ -38,24 +38,24 @@ public class PractitionerHiringApproveSteps {
/**
* 获取 审批步骤经行到哪一步了
*
* @return hiringApproveStepsId 审批步骤经行到哪一步了
* @return hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public Long getHiringApproveStepsId() {
return this.hiringApproveStepsId;
public Long getHiringApproveStepsSeq() {
return this.hiringApproveStepsSeq;
}
/**
* 设置 审批步骤经行到哪一步了
*
* @param hiringApproveStepsId 审批步骤经行到哪一步了
* @param hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public void setHiringApproveStepsId(Long hiringApproveStepsId) {
this.hiringApproveStepsId = hiringApproveStepsId;
public void setHiringApproveStepsSeq(Long hiringApproveStepsSeq) {
this.hiringApproveStepsSeq = hiringApproveStepsSeq;
}
public PractitionerHiringApproveSteps(Long hiringApproveStatus,Long hiringApproveStepsId){
public PractitionerHiringApproveSteps(Long hiringApproveStatus,Long hiringApproveStepsSeq){
this.hiringApproveStatus = hiringApproveStatus;
this.hiringApproveStepsId = hiringApproveStepsId;
this.hiringApproveStepsSeq = hiringApproveStepsSeq;
}
public PractitionerHiringApproveSteps(){
......@@ -64,7 +64,7 @@ public class PractitionerHiringApproveSteps {
public String toString() {
return "PractitionerHiringApproveSteps{" +
"hiringApproveStatus=" + hiringApproveStatus +
", hiringApproveStepsId=" + hiringApproveStepsId +
", hiringApproveStepsSeq=" + hiringApproveStepsSeq +
'}';
}
}
......@@ -163,4 +163,18 @@ public class PractitionerHiringController {
result.setData(responseVO);
return result;
}
/**
* ydLife经纪人审批
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/hiringApprove")
public Object hiringApprove(@RequestBody HiringApproveRequestVO requestVO){
JsonResult result = new JsonResult();
HiringApproveResponseVO responseVO = practitionerHiringService.hiringApprove(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
}
\ No newline at end of file
......@@ -35,4 +35,11 @@ public interface PractitionerHiringService {
* @return 响应数据
*/
HiringDetailQueryResponseVO detailQuery(HiringDetailQueryRequestVO requestVO);
/**
* ydLife经纪人审批
* @param requestVO 请求数据
* @return 响应数据
*/
HiringApproveResponseVO hiringApprove(HiringApproveRequestVO requestVO);
}
......@@ -4,13 +4,18 @@ import com.yd.api.practitioner.service.PractitionerHiringService;
import com.yd.api.practitioner.vo.hiring.*;
import com.yd.api.result.CommonResult;
import com.yd.dal.entity.customer.*;
import com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps;
import com.yd.dal.entity.practitioner.hiring.*;
import com.yd.dal.mapper.customer.*;
import com.yd.dal.service.customer.AclPractitionerHiringApproveRecordsDALService;
import com.yd.dal.service.practitioner.PractitionerHiringDALService;
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.config.ZHBErrorConfig;
import org.apache.commons.beanutils.BeanPropertyValueEqualsPredicate;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -21,6 +26,7 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -43,12 +49,24 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
private AclPractitionerHiringContractTermsConfirmsMapper contractTermsConfirmsMapper;
private PractitionerHiringDALService practitionerHiringDalService;
private SystemConfigService systemConfigService;
private AclPractitionerHiringApproveRecordsDALService aclPractitionerHiringApproveRecordsDalService;
@Autowired
public void setPractitionerHiringDalService(PractitionerHiringDALService practitionerHiringDalService) {
this.practitionerHiringDalService = practitionerHiringDalService;
}
@Autowired
public void setSystemConfigService(SystemConfigService systemConfigService) {
this.systemConfigService = systemConfigService;
}
@Autowired
public void setAclPractitionerHiringApproveRecordsDalService(AclPractitionerHiringApproveRecordsDALService aclPractitionerHiringApproveRecordsDalService) {
this.aclPractitionerHiringApproveRecordsDalService = aclPractitionerHiringApproveRecordsDalService;
}
@Override
public SaveMembershipResponseVO saveMembership(SaveMembershipRequestVO requestVO) {
SaveMembershipResponseVO resp = new SaveMembershipResponseVO();
......@@ -361,11 +379,13 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
return responseVO;
}
private HiringApproveSteps getHiringApproveStatus(Long practitionerId, Long approvalIdentity, List<HiringApproveRecords> hiringApproveRecordsList) {
private HiringApproveSteps getHiringApproveStatus(Long practitionerId,
Long approvalIdentity,
List<HiringApproveRecords> hiringApproveRecordsList) {
//是否可进行审批操作 0.不可审批(未到) 1.可审批 2.已审批 4.已驳回
Long hiringApproveStatus = 0L;
//审批到哪一步了
Long hiringApproveStepsId = null;
Long hiringApproveStepsSeq = null;
//查看审批流程最后一次,是否通过
HiringApproveRecords recordsFinally = new HiringApproveRecords();
if (!hiringApproveRecordsList.isEmpty()) {
......@@ -374,7 +394,7 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
if (CommonUtil.isNullOrZero(approvingStatusId)) {
//已驳回
hiringApproveStatus = 4L;
return new HiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new HiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
}
//查看此经纪人是否已经审批
......@@ -383,7 +403,7 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
if (approvingPractitionerId.equals(practitionerId)) {
//已审批
hiringApproveStatus = 2L;
return new HiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
return new HiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
}
//余下的仅有0.不可审批(未到) 1.可审批两种状态
......@@ -391,17 +411,74 @@ public class PractitionerHiringServiceImpl implements PractitionerHiringService
//当approvalIdentity为0,1时,审批状态为可审批 当为2时判断辅导人是否审批
if (approvalIdentity == 0 || approvalIdentity == 1){
hiringApproveStatus = 1L;
hiringApproveStepsId = 1L;
hiringApproveStepsSeq = 1L;
}else {
//判断辅导人是否审批,仅需判断hiringApproveRecordsList.isEmpty(),因为辅导人是第一步,团队长为第二步
if (hiringApproveRecordsList.isEmpty()) {
hiringApproveStatus = 0L;
}else {
hiringApproveStatus = 1L;
hiringApproveStepsId = 2L;
hiringApproveStepsSeq = 2L;
}
}
return new HiringApproveSteps(hiringApproveStatus, hiringApproveStepsSeq);
}
@Override
public HiringApproveResponseVO hiringApprove(HiringApproveRequestVO requestVO) {
HiringApproveResponseVO responseVO = new HiringApproveResponseVO();
//审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
Long approvalIdentity = requestVO.getApprovalIdentity();
List<MdPractitionerHiringApproveSteps> hiringApproveStepsList = systemConfigService.findHiringApproveStepsAll();
List<AclPractitionerHiringApproveRecords> hiringApproveRecordsList = new ArrayList<>();
//当approvalIdentity=0时需要保存两条记录
if (approvalIdentity == 0L || approvalIdentity == 1L){
boolean hasStepSeq = addStepToList(requestVO,1,hiringApproveStepsList,hiringApproveRecordsList);
if (hasStepSeq) {
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830025")));
return responseVO;
}
}
if (approvalIdentity == 0L || approvalIdentity == 2L){
boolean hasStepSeq = addStepToList(requestVO,2,hiringApproveStepsList,hiringApproveRecordsList);
if (hasStepSeq) {
responseVO.setCommonResult(new CommonResult(false, ZHBErrorConfig.getErrorInfo("830025")));
return responseVO;
}
}
return new HiringApproveSteps(hiringApproveStatus, hiringApproveStepsId);
aclPractitionerHiringApproveRecordsDalService.save(hiringApproveRecordsList);
responseVO.setPractitionerId(requestVO.getPractitionerId());
responseVO.setHiringBasicInfoId(requestVO.getHiringBasicInfoId());
responseVO.setApprovalIdentity(requestVO.getApprovalIdentity());
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO;
}
@SuppressWarnings("unchecked")
private boolean addStepToList(HiringApproveRequestVO requestVO,
int stepSeq,
List<MdPractitionerHiringApproveSteps> hiringApproveStepsList,
List<AclPractitionerHiringApproveRecords> hiringApproveRecordsList) {
BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("stepSeq",stepSeq);
List<MdPractitionerHiringApproveSteps> steps = (List<MdPractitionerHiringApproveSteps>) CollectionUtils.select(hiringApproveStepsList,predicate);
if (steps.size() != 1){
return false;
}
AclPractitionerHiringApproveRecords records = new AclPractitionerHiringApproveRecords();
MdPractitionerHiringApproveSteps step = steps.get(0);
records.setHiringBasicInfoId(requestVO.getHiringBasicInfoId());
records.setApproveStepId(step.getId().toString());
records.setApproveStepName(step.getStepName());
records.setApprovingPractitionerId(requestVO.getPractitionerId());
records.setApprovingStatus(requestVO.getApprovingStatus());
records.setRejectNote(requestVO.getRejectNote());
records.setIsActive(1);
records.setCreatedAt(new Date());
records.setCreatedBy(requestVO.getPractitionerId());
records.setUpdatedAt(new Date());
records.setUpdatedBy(requestVO.getPractitionerId());
hiringApproveRecordsList.add(records);
return true;
}
private String uploadImageToOss(String imgUrl, Long hiringBasicInfoId, Integer targetUseFor) throws Exception {
......
package com.yd.api.practitioner.vo.hiring;
/**
* @author xxy
*/
public class HiringApproveRequestVO {
/**
* 经纪人id
*/
private Long practitionerId;
/**
* 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
private Long approvalIdentity;
/**
* 审批步骤经行到哪一步了
*/
private Long hiringApproveStepsSeq;
/**
* 审批经纪人基本资料id
*/
private Long hiringBasicInfoId;
/**
* 1:通过,0:驳回
*/
private Long approvingStatus;
/**
* 备注,驳回原因
*/
private String rejectNote;
/**
* 获取 经纪人id
*
* @return practitionerId 经纪人id
*/
public Long getPractitionerId() {
return this.practitionerId;
}
/**
* 设置 经纪人id
*
* @param practitionerId 经纪人id
*/
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
/**
* 获取 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @return approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public Long getApprovalIdentity() {
return this.approvalIdentity;
}
/**
* 设置 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @param approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public void setApprovalIdentity(Long approvalIdentity) {
this.approvalIdentity = approvalIdentity;
}
/**
* 获取 审批步骤经行到哪一步了
*
* @return hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public Long getHiringApproveStepsSeq() {
return this.hiringApproveStepsSeq;
}
/**
* 设置 审批步骤经行到哪一步了
*
* @param hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public void setHiringApproveStepsSeq(Long hiringApproveStepsSeq) {
this.hiringApproveStepsSeq = hiringApproveStepsSeq;
}
/**
* 获取 审批经纪人基本资料id
*
* @return hiringBasicInfoId 审批经纪人基本资料id
*/
public Long getHiringBasicInfoId() {
return this.hiringBasicInfoId;
}
/**
* 设置 审批经纪人基本资料id
*
* @param hiringBasicInfoId 审批经纪人基本资料id
*/
public void setHiringBasicInfoId(Long hiringBasicInfoId) {
this.hiringBasicInfoId = hiringBasicInfoId;
}
/**
* 获取 1:通过,0:驳回
*
* @return approvingStatus 1:通过,0:驳回
*/
public Long getApprovingStatus() {
return this.approvingStatus;
}
/**
* 设置 1:通过,0:驳回
*
* @param approvingStatus 1:通过,0:驳回
*/
public void setApprovingStatus(Long approvingStatus) {
this.approvingStatus = approvingStatus;
}
/**
* 获取 备注,驳回原因
*
* @return rejectNote 备注,驳回原因
*/
public String getRejectNote() {
return this.rejectNote;
}
/**
* 设置 备注,驳回原因
*
* @param rejectNote 备注,驳回原因
*/
public void setRejectNote(String rejectNote) {
this.rejectNote = rejectNote;
}
@Override
public String toString() {
return "HiringApproveRequestVO{" +
"practitionerId=" + practitionerId +
", approvalIdentity=" + approvalIdentity +
", hiringApproveStepsSeq=" + hiringApproveStepsSeq +
", hiringBasicInfoId=" + hiringBasicInfoId +
", approvingStatus=" + approvingStatus +
", rejectNote='" + rejectNote + '\'' +
'}';
}
}
package com.yd.api.practitioner.vo.hiring;
import com.yd.api.result.CommonResult;
/**
* @author xxy
*/
public class HiringApproveResponseVO {
/**
* 经纪人id
*/
private Long practitionerId;
/**
* 经纪人基本信息id
*/
private Long hiringBasicInfoId;
/**
* 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
private Long approvalIdentity;
private CommonResult commonResult;
/**
* 获取 经纪人id
*
* @return practitionerId 经纪人id
*/
public Long getPractitionerId() {
return this.practitionerId;
}
/**
* 设置 经纪人id
*
* @param practitionerId 经纪人id
*/
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
/**
* 获取 经纪人基本信息id
*
* @return hiringBasicInfoId 经纪人基本信息id
*/
public Long getHiringBasicInfoId() {
return this.hiringBasicInfoId;
}
/**
* 设置 经纪人基本信息id
*
* @param hiringBasicInfoId 经纪人基本信息id
*/
public void setHiringBasicInfoId(Long hiringBasicInfoId) {
this.hiringBasicInfoId = hiringBasicInfoId;
}
/**
* 获取 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @return approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public Long getApprovalIdentity() {
return this.approvalIdentity;
}
/**
* 设置 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*
* @param approvalIdentity 审批身份 0.既是辅导人又是团队长 1.辅导人 2.团队长
*/
public void setApprovalIdentity(Long approvalIdentity) {
this.approvalIdentity = approvalIdentity;
}
/**
* 获取
*
* @return commonResult
*/
public CommonResult getCommonResult() {
return this.commonResult;
}
/**
* 设置
*
* @param commonResult
*/
public void setCommonResult(CommonResult commonResult) {
this.commonResult = commonResult;
}
@Override
public String toString() {
return "HiringApproveResponseVO{" +
"practitionerId=" + practitionerId +
", hiringBasicInfoId=" + hiringBasicInfoId +
", approvalIdentity=" + approvalIdentity +
", commonResult=" + commonResult +
'}';
}
}
package com.yd.dal.entity.meta;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
......@@ -8,7 +7,7 @@ import lombok.Data;
* 報聘经纪人報聘审批步骤设置
*/
@Data
public class MdPractitionerHiringApproveSteps implements Serializable {
public class MdPractitionerHiringApproveSteps {
/**
* serial id
*/
......@@ -37,7 +36,7 @@ public class MdPractitionerHiringApproveSteps implements Serializable {
/**
* 总经理审批职级S2以上,FK ag_acl_practitioner_hiring_membership.md_drop_option_id
*/
private Long ceoAprroveGrade;
private String ceoAprroveGrade;
/**
* 0=No, 1=Yes
......
......@@ -13,7 +13,7 @@ public class HiringApproveSteps {
/**
* 审批步骤经行到哪一步了
*/
private Long hiringApproveStepsId;
private Long hiringApproveStepsSeq;
......@@ -38,24 +38,24 @@ public class HiringApproveSteps {
/**
* 获取 审批步骤经行到哪一步了
*
* @return hiringApproveStepsId 审批步骤经行到哪一步了
* @return hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public Long getHiringApproveStepsId() {
return this.hiringApproveStepsId;
public Long getHiringApproveStepsSeq() {
return this.hiringApproveStepsSeq;
}
/**
* 设置 审批步骤经行到哪一步了
*
* @param hiringApproveStepsId 审批步骤经行到哪一步了
* @param hiringApproveStepsSeq 审批步骤经行到哪一步了
*/
public void setHiringApproveStepsId(Long hiringApproveStepsId) {
this.hiringApproveStepsId = hiringApproveStepsId;
public void setHiringApproveStepsSeq(Long hiringApproveStepsSeq) {
this.hiringApproveStepsSeq = hiringApproveStepsSeq;
}
public HiringApproveSteps(Long hiringApproveStatus,Long hiringApproveStepsId){
public HiringApproveSteps(Long hiringApproveStatus,Long hiringApproveStepsSeq){
this.hiringApproveStatus = hiringApproveStatus;
this.hiringApproveStepsId = hiringApproveStepsId;
this.hiringApproveStepsSeq = hiringApproveStepsSeq;
}
public HiringApproveSteps(){
......@@ -64,7 +64,7 @@ public class HiringApproveSteps {
public String toString() {
return "PractitionerHiringApproveSteps{" +
"hiringApproveStatus=" + hiringApproveStatus +
", hiringApproveStepsId=" + hiringApproveStepsId +
", hiringApproveStepsSeq=" + hiringApproveStepsSeq +
'}';
}
}
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclPractitionerHiringApproveRecords;
import java.util.List;
/**
* @author xxy
*/
public interface AclPractitionerHiringApproveRecordsDALService {
void save(List<AclPractitionerHiringApproveRecords> hiringApproveRecordsList);
}
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclPractitionerHiringApproveRecords;
import com.yd.dal.mapper.customer.AclPractitionerHiringApproveRecordsMapper;
import com.yd.dal.service.customer.AclPractitionerHiringApproveRecordsDALService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("aclPractitionerHiringApproveRecordsDALService")
public class AclPractitionerHiringApproveRecordsDALServiceImpl implements AclPractitionerHiringApproveRecordsDALService {
@Resource
private AclPractitionerHiringApproveRecordsMapper mapper;
@Override
public void save(List<AclPractitionerHiringApproveRecords> hiringApproveRecordsList) {
mapper.batchInsert(hiringApproveRecordsList);
}
}
......@@ -284,4 +284,18 @@ public class SystemConfigService implements CommandLineRunner{
}
return hiringApproveMobileNos;
}
@SuppressWarnings("unchecked")
public List<MdPractitionerHiringApproveSteps> findHiringApproveStepsAll() {
List<MdPractitionerHiringApproveSteps> hiringApproveSteps = new ArrayList<>();
Element element = systemConfigCache.get("HiringApproveStepsAll");
if(element != null && element.getObjectValue() != null){
hiringApproveSteps = (List<MdPractitionerHiringApproveSteps>)element.getObjectValue();
}else{
hiringApproveSteps = mdPractitionerHiringApproveStepsDalService.findAll();
element = new Element("HiringApproveStepsAll",hiringApproveSteps);
systemConfigCache.put(element);
}
return hiringApproveSteps;
}
}
......@@ -38,4 +38,5 @@
830022=请选择关账记录
830023=已关账并发放的记录,不能修改
830024=上传失败,请重新上传!
830025=经纪人审批步骤出现问题,请联系it!
900003=保险公司响应报文为空!
\ 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