修正风险仪表盘总人数员工匹配口径
This commit is contained in:
@@ -38,4 +38,6 @@ public interface CcdiBankStatementMapper extends BaseMapper<CcdiBankStatement> {
|
||||
CcdiBankStatementDetailVO selectStatementDetailById(@Param("bankStatementId") Long bankStatementId);
|
||||
|
||||
CcdiBankStatementFilterOptionsVO selectFilterOptions(@Param("projectId") Long projectId);
|
||||
|
||||
Integer countMatchedStaffCountByProjectId(@Param("projectId") Long projectId);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.ruoyi.ccdi.project.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.project.domain.CcdiProject;
|
||||
import com.ruoyi.ccdi.project.domain.enums.TriggerType;
|
||||
@@ -954,13 +953,7 @@ public class CcdiFileUploadServiceImpl implements ICcdiFileUploadService {
|
||||
return;
|
||||
}
|
||||
|
||||
QueryWrapper<CcdiBankStatement> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select("DISTINCT TRIM(cret_no)");
|
||||
queryWrapper.eq("project_id", projectId);
|
||||
queryWrapper.isNotNull("cret_no");
|
||||
queryWrapper.apply("TRIM(cret_no) <> ''");
|
||||
|
||||
int targetCount = bankStatementMapper.selectObjs(queryWrapper).size();
|
||||
int targetCount = bankStatementMapper.countMatchedStaffCountByProjectId(projectId);
|
||||
project.setTargetCount(targetCount);
|
||||
projectMapper.updateById(project);
|
||||
}
|
||||
|
||||
@@ -115,6 +115,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select="selectOurAccountOptions"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="countMatchedStaffCountByProjectId" resultType="java.lang.Integer">
|
||||
select count(distinct trim(bs.cret_no))
|
||||
from ccdi_bank_statement bs
|
||||
inner join ccdi_base_staff staff on staff.id_card = bs.cret_no
|
||||
where bs.project_id = #{projectId}
|
||||
and bs.cret_no is not null
|
||||
and trim(bs.cret_no) != ''
|
||||
</select>
|
||||
|
||||
<sql id="parsedTrxDateExpr">
|
||||
CASE
|
||||
WHEN bs.TRX_DATE IS NULL OR TRIM(bs.TRX_DATE) = '' THEN NULL
|
||||
|
||||
Reference in New Issue
Block a user