客户查询最后一人的驳回审批意见

master
shijie 4 years ago
parent 6e19994b05
commit 7aaf0a799a
  1. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/dao/CustomerAppletDao.java
  2. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  3. 16
      dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml
  4. 5
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/ApplyDetailPO.java

@ -40,4 +40,6 @@ public interface CustomerAppletDao extends BaseMapper<CustomerEntity> {
Integer businessUnderwayCount(Integer companyId);
ApplyDetailPO getApplyDetail(Integer id);
String getAuditOpinion(Integer businessId);
}

@ -457,6 +457,11 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
default:
ExceptionCast.cast(CrmsCode.CUSTOMER_APPLET_STATUS_IS_NULL);
}
//根据业务id查询该业务中最后一个驳回的人的审核意见
String auditOpinion = this.getBaseMapper().getAuditOpinion(applyDetail.getBusinessId());
if(auditOpinion != null && auditOpinion != "")
applyDetailResponse.setRemark(auditOpinion);
return applyDetailResponse;
}

@ -83,11 +83,25 @@
<!-- 获取申请记录详情 -->
<select id="getApplyDetail" parameterType="integer" resultType="com.daqing.framework.domain.crms.ext.ApplyDetailPO">
SELECT l.status AS audit_status,l.apply_content AS remark,b.business_status AS business_status
SELECT l.status AS audit_status,l.apply_content AS remark,b.business_status AS business_status,l.business_id As businessId
FROM dg_apply_amount_list AS l
LEFT JOIN dg_business_process_status AS b
ON l.business_id = b.business_id
WHERE l.id = #{id}
</select>
<!-- 获取申请记录详情 -->
<select id="getAuditOpinion" parameterType="integer" resultType="java.lang.String">
SELECT
audit_opinion
FROM
dg_audit_process
WHERE
( reason != NULL OR reason != '' )
AND business_id = #{businessId}
ORDER BY
create_time DESC
LIMIT 1
</select>
</mapper>

@ -30,4 +30,9 @@ public class ApplyDetailPO implements Serializable {
*/
private String remark;
/**
* 业务id
*/
private Integer businessId;
}

Loading…
Cancel
Save