Commit d0f51595 by jianan

审批问题2

parent 3d0b654f
......@@ -9,6 +9,7 @@ import com.yd.dal.entity.customer.*;
import com.yd.dal.entity.meta.MdPractitionerHiringApproveSteps;
import com.yd.dal.entity.user.AclUser;
import com.yd.dal.mapper.customer.AclPractitionerHiringBasicInfoMapper;
import com.yd.dal.mapper.customer.AclPractitionerHiringMembershipMapper;
import com.yd.dal.mapper.customer.AclPractitionerMapper;
import com.yd.dal.service.agms.AgmsHiringDALService;
import com.yd.dal.service.customer.*;
......@@ -53,6 +54,8 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
private PractitionerHiringDALService practitionerHiringDalService;
@Autowired
private AclPractitionerMapper aclPractitionerMapper;
@Autowired
private AclPractitionerHiringMembershipMapper membershipMapper;
@Autowired
public void setAgmsHiringDalService(AgmsHiringDALService agmsHiringDalService){
......@@ -318,7 +321,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
}
//不是他
boolean flag = this.isHasNextStep(loginPractitionerId, mobileNo, nextStep);
boolean flag = this.isHasNextStep(loginPractitionerId, mobileNo, basicInfoId, nextStep);
if (!flag) {
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return;
......@@ -328,7 +331,7 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
}
private boolean isHasNextStep(Long loginPractitionerId, String mobileNo, MdPractitionerHiringApproveSteps nextStep) {
private boolean isHasNextStep(Long loginPractitionerId, String mobileNo, Long basicInfoId, MdPractitionerHiringApproveSteps nextStep) {
// 先判断是否是AGMS中审批的人员
String appointedApprovePractitioners = nextStep.getAppointedApprovePractitioners();
List<String> hiringApproveMobileNos = new ArrayList<>(Arrays.asList(appointedApprovePractitioners.split(",")));
......@@ -336,9 +339,18 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
return true;
}
// 不是AGMS审批人;只有既是辅导人又是团队长才有下一步
int approvalIdentity = practitionerHiringDalService.queryApprovalIdentity(loginPractitionerId);
if (approvalIdentity == 0) {
return true;
if (!CommonUtil.isNullOrZero(loginPractitionerId)) {
String approveRole = nextStep.getApproveRole();
if (StringUtils.isNotEmpty(approveRole)) {
AclPractitionerHiringMembership membership = membershipMapper.selectByHiringBasicInfoId(basicInfoId);
if (membership != null) {
if (loginPractitionerId.equals(membership.getMentorPractitionerId())
|| loginPractitionerId.equals(membership.getSubsystemOwnerId())
) {
return true;
}
}
}
}
return false;
}
......
......@@ -360,6 +360,9 @@
<if test="personalSignOssPath != null">
personal_sign_oss_path = #{personalSignOssPath,jdbcType=VARCHAR},
</if>
<if test="approveStatus != null">
approve_status = #{approveStatus,jdbcType=VARCHAR},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
......
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