1. 分期
This commit is contained in:
parent
8980190dd5
commit
6799bbdafc
|
|
@ -28,6 +28,10 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.chushang</groupId>
|
||||
<artifactId>loan-feign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
|
|
|
|||
|
|
@ -23,36 +23,23 @@ public class LoanController {
|
|||
|
||||
@Autowired
|
||||
private ILoanService iLoanService;
|
||||
|
||||
|
||||
/**
|
||||
* 提交表单数据
|
||||
*/
|
||||
@PostMapping("/qcode")
|
||||
public AjaxResult submitFormData(@RequestBody @Validated LoanFormQuery formData) throws Exception{
|
||||
return AjaxResult.success(iLoanService.qcCode(formData));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询表单
|
||||
*/
|
||||
@GetMapping("/find")
|
||||
@RequiresPermissions("loan:loan:find")
|
||||
public AjaxResult queryLoan(LoanEntity query) {
|
||||
return AjaxResult.success(iLoanService.queryLoan(query));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询表单
|
||||
* 查询统计多少人审核通过以及放款金额
|
||||
*/
|
||||
@GetMapping("/data")
|
||||
@RequiresPermissions("loan:loan:data")
|
||||
public AjaxResult data( LoanEntity query) {
|
||||
return AjaxResult.success(iLoanService.queryData(query));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 审批
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -112,11 +112,10 @@ public class LoanServiceImpl extends ServiceImpl<LoanMapper, LoanEntity> impleme
|
|||
}
|
||||
|
||||
@Override
|
||||
@DataScope(deptAlias = "u", userAlias = "u")
|
||||
@DataScope(deptAlias = "l")
|
||||
public PageResult queryData(LoanEntity query) {
|
||||
|
||||
CommonParam commonParam = CommonParam.buildPageRequest();
|
||||
com.baomidou.mybatisplus.extension.plugins.pagination.Page<LoanEntity> page = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(commonParam.getPage(),commonParam.getLimit());
|
||||
Page<LoanEntity> page = new Page<>(commonParam.getPage(),commonParam.getLimit());
|
||||
List<LoanData> loanVOSList = baseMapper.queryDataList(query,page);
|
||||
List<LoanVO> resultList = new ArrayList<>();
|
||||
for (LoanData loanData:loanVOSList){
|
||||
|
|
|
|||
|
|
@ -11,35 +11,30 @@
|
|||
COUNT(if(status = 2, id, null)) as totalOpenFlux,
|
||||
SUM(if(status = 2, loan_amount, null)) as totalLoanAmount,
|
||||
sum(application_amount) as totalTransactionAmount
|
||||
from loan
|
||||
where del_state = false
|
||||
from loan l
|
||||
where l.del_state = false
|
||||
<if test="query.channelName != '' and query.channelName != null">
|
||||
AND channel_name like concat('%',#{query.channelName},'%')
|
||||
AND l.channel_name like concat('%',#{query.channelName},'%')
|
||||
</if>
|
||||
<if test="query.formNumber != '' and query.formNumber != null ">
|
||||
AND form_number = #{query.formNumber}
|
||||
AND l.form_number = #{query.formNumber}
|
||||
</if>
|
||||
<if test="query.authorPhone != '' and query.authorPhone != null">
|
||||
AND author_phone = #{query.authorPhone}
|
||||
AND l.author_phone = #{query.authorPhone}
|
||||
</if>
|
||||
<if test="query.authorName != '' and query.authorName != null ">
|
||||
AND author_name like concat('%',#{query.authorName},'%')
|
||||
</if>
|
||||
<if test="query.deptId != null">
|
||||
AND dept_id = #{query.deptId}
|
||||
AND l.author_name like concat('%',#{query.authorName},'%')
|
||||
</if>
|
||||
<if test="query.status != null">
|
||||
AND status = #{query.status}
|
||||
AND l.status = #{query.status}
|
||||
</if>
|
||||
|
||||
<if test="query.submissionTimes != null and query.submissionTimes.size() > 1 ">
|
||||
AND submission_time between #{query.submissionTimes[0]} and #{query.submissionTimes[1]}
|
||||
AND l.submission_time between #{query.submissionTimes[0]} and #{query.submissionTimes[1]}
|
||||
</if>
|
||||
${query.sqlParam.dataScope}
|
||||
|
||||
group by user_id,channel_name,author_name,author_phone
|
||||
|
||||
|
||||
${query.sqlParam.dataScope}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue