|
|
@ -433,31 +433,49 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu |
|
|
|
if (applyDetail.getAuditStatus() == null) { |
|
|
|
if (applyDetail.getAuditStatus() == null) { |
|
|
|
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); |
|
|
|
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
switch (applyDetail.getAuditStatus()) { |
|
|
|
|
|
|
|
case 1: // 已受理
|
|
|
|
//status:0->已完成;1->已受理;2->审核中;3->已拒绝;4->已驳回;5->已撤销;
|
|
|
|
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); |
|
|
|
// 状态为已受理、审核中、拒绝、驳回、已撤销情况
|
|
|
|
break; |
|
|
|
if (applyDetail.getAuditStatus() != null && (applyDetail.getAuditStatus() == 1 |
|
|
|
case 2: // 审核中
|
|
|
|
|| applyDetail.getAuditStatus() == 2 || applyDetail.getAuditStatus() == 3 |
|
|
|
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); |
|
|
|
|| applyDetail.getAuditStatus() == 4 || applyDetail.getAuditStatus() == 5)) { |
|
|
|
break; |
|
|
|
|
|
|
|
case 3: // 已拒绝
|
|
|
|
|
|
|
|
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); |
|
|
|
|
|
|
|
applyDetailResponse.setRemark(applyDetail.getRemark()); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 4: // 已驳回
|
|
|
|
|
|
|
|
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); |
|
|
|
|
|
|
|
applyDetailResponse.setRemark(applyDetail.getRemark()); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 5: // 已撤销
|
|
|
|
|
|
|
|
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); |
|
|
|
applyDetailResponse.setStatus(applyDetail.getAuditStatus()); |
|
|
|
break; |
|
|
|
|
|
|
|
case 6: // 草稿,正常不会出现这个状态,避免报错设置为已受理
|
|
|
|
|
|
|
|
applyDetailResponse.setStatus(1); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 业务状态为已否决的情况,如果同时存在会覆盖以上情况
|
|
|
|
|
|
|
|
if (applyDetail.getBusinessStatus() != null && applyDetail.getBusinessStatus() == 3) { |
|
|
|
|
|
|
|
applyDetailResponse.setStatus(3);//状态设置为已拒绝
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 状态为已完成的情况,如果同时存在已完成会覆盖以上情况
|
|
|
|
|
|
|
|
if (applyDetail.getBusinessStatus() != null && applyDetail.getBusinessStatus() == 2) { |
|
|
|
|
|
|
|
applyDetailResponse.setStatus(0);//状态设置为已完成
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// switch (applyDetail.getAuditStatus()) {
|
|
|
|
|
|
|
|
// case 1: // 已受理
|
|
|
|
|
|
|
|
// applyDetailResponse.setStatus(applyDetail.getAuditStatus());
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 2: // 审核中
|
|
|
|
|
|
|
|
// applyDetailResponse.setStatus(applyDetail.getAuditStatus());
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 3: // 已拒绝
|
|
|
|
|
|
|
|
// applyDetailResponse.setStatus(applyDetail.getAuditStatus());
|
|
|
|
|
|
|
|
// applyDetailResponse.setRemark(applyDetail.getRemark());
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 4: // 已驳回
|
|
|
|
|
|
|
|
// applyDetailResponse.setStatus(applyDetail.getAuditStatus());
|
|
|
|
|
|
|
|
// applyDetailResponse.setRemark(applyDetail.getRemark());
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 5: // 已撤销
|
|
|
|
|
|
|
|
// applyDetailResponse.setStatus(applyDetail.getAuditStatus());
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// case 6: // 草稿,正常不会出现这个状态,避免报错设置为已受理
|
|
|
|
|
|
|
|
// applyDetailResponse.setStatus(1);
|
|
|
|
|
|
|
|
// break;
|
|
|
|
|
|
|
|
// default:
|
|
|
|
|
|
|
|
// ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
//根据业务id查询该业务中最后一个驳回的人的审核意见
|
|
|
|
//根据业务id查询该业务中最后一个驳回的人的审核意见
|
|
|
|
String auditOpinion = this.getBaseMapper().getAuditOpinion(applyDetail.getBusinessId()); |
|
|
|
String auditOpinion = this.getBaseMapper().getAuditOpinion(applyDetail.getBusinessId()); |
|
|
|
if(auditOpinion != null && auditOpinion != "") |
|
|
|
if(auditOpinion != null && auditOpinion != "") |
|
|
|