Commit 8d650da4 by jianan

审批拒绝后将basicInfo状态置为”可修改“

parent 64c76666
......@@ -162,8 +162,10 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
@Override
public PractitionerHiringApproveResponseVO practitionerHiringApprove(PractitionerHiringApproveRequestVO requestVO) {
PractitionerHiringApproveResponseVO responseVO = new PractitionerHiringApproveResponseVO();
Integer hiringApproveStepsSeq = requestVO.getHiringApproveStepsSeq();
Long hiringBasicInfoId = requestVO.getHiringBasicInfoId();
AclPractitionerHiringBasicInfo basicInfo = basicInfoMapper.selectByPrimaryKey(hiringBasicInfoId);
if (basicInfo != null && StringUtils.isNotEmpty(basicInfo.getApproveStatus())) {
List<AclPractitionerHiringApproveRecords> recordsList = aclPractitionerHiringApproveRecordsDalService.queryListByBasicInfoId(hiringBasicInfoId);
......@@ -299,11 +301,9 @@ public class AgmsHiringServiceImpl implements AgmsHiringService {
basicInfoMapper.updateByPrimaryKeySelective(updateObj);
if (CommonUtil.isNullOrZero(requestVO.getApprovingStatus())) {
// 审批拒绝更新basicInfo表审批状态为 "-1"
AclPractitionerHiringBasicInfo updateObj2 = new AclPractitionerHiringBasicInfo();
updateObj2.setId(basicInfoId);
updateObj2.setApproveStatus("-1");
basicInfoMapper.updateByPrimaryKeySelective(updateObj2);
// 审批拒绝 1.更新basicInfo表审批状态为 "null-可修改" 2.删除全部审批记录
basicInfoMapper.changeBasicinfoUpdatable(basicInfoId);
aclPractitionerHiringApproveRecordsDalService.deleteByHiringBasicInfoId(basicInfoId);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return;
......
......@@ -26,4 +26,6 @@ public interface AclPractitionerHiringApproveRecordsMapper {
AclPractitionerHiringApproveRecords queryLastOneByBasicInfoId(Long basicInfoId);
List<AclPractitionerHiringApproveRecords> queryListByBasicInfoId(Long hiringBasicInfoId);
int deleteByHiringBasicInfoId(Long hiringBasicInfoId);
}
\ No newline at end of file
......@@ -25,4 +25,5 @@ public interface AclPractitionerHiringBasicInfoMapper {
void updateByPractitionerPotentialId(AclPractitionerHiringBasicInfo basicInfo);
int changeBasicinfoUpdatable(Long id);
}
\ No newline at end of file
......@@ -12,4 +12,7 @@ public interface AclPractitionerHiringApproveRecordsDALService {
void save(AclPractitionerHiringApproveRecords hiringApproveRecords);
List<AclPractitionerHiringApproveRecords> queryListByBasicInfoId(Long hiringBasicInfoId);
int deleteByHiringBasicInfoId(Long basicInfoId);
}
......@@ -26,4 +26,9 @@ public class AclPractitionerHiringApproveRecordsDALServiceImpl implements AclPra
public List<AclPractitionerHiringApproveRecords> queryListByBasicInfoId(Long hiringBasicInfoId) {
return mapper.queryListByBasicInfoId(hiringBasicInfoId);
}
@Override
public int deleteByHiringBasicInfoId(Long hiringBasicInfoId) {
return mapper.deleteByHiringBasicInfoId(hiringBasicInfoId);
}
}
......@@ -379,4 +379,8 @@
where r.hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT}
order by s.step_seq desc
</select>
<delete id="deleteByHiringBasicInfoId">
delete from ag_acl_practitioner_hiring_approve_records where hiring_basic_info_id = #{hiringBasicInfoId,jdbcType=BIGINT}
</delete>
</mapper>
\ No newline at end of file
......@@ -851,4 +851,8 @@
updated_by = #{updatedBy,jdbcType=BIGINT}
where practitioner_potential_id = #{practitionerPotentialId,jdbcType=BIGINT}
</update>
<update id="changeBasicinfoUpdatable">
update ag_acl_practitioner_hiring_basic_info set approve_status = null where id = #{id,jdbcType=BIGINT}
</update>
</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