2 Commits

Author SHA1 Message Date
wkc
739a73c6ee dev配置 2026-08-10 11:55:04 +08:00
wkc
39c7b716cd 新增流程列表筛选及机构号展示 2026-08-10 11:53:45 +08:00
8 changed files with 83 additions and 5 deletions

View File

@@ -25,9 +25,9 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:mysql://116.62.17.81:3307/loan-pricing?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://116.62.17.81:53306/loan_pricing?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: znsj
password: Kfcx@1234 password: Znsj@123456
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@@ -164,6 +165,16 @@ public class LoanPricingWorkflow implements Serializable
@TableField(exist = false) @TableField(exist = false)
private Long dataScopeDeptId; private Long dataScopeDeptId;
/** 创建时间查询起始值 */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(exist = false)
private Date beginCreateTime;
/** 创建时间查询结束值 */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(exist = false)
private Date endCreateTime;
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)

View File

@@ -9,6 +9,8 @@ public class LoanPricingWorkflowListVO
{ {
private String serialNum; private String serialNum;
private Long deptId;
private String custIsn; private String custIsn;
private String custName; private String custName;

View File

@@ -7,6 +7,7 @@
<select id="selectWorkflowPageWithRates" resultType="com.ruoyi.loanpricing.domain.vo.LoanPricingWorkflowListVO"> <select id="selectWorkflowPageWithRates" resultType="com.ruoyi.loanpricing.domain.vo.LoanPricingWorkflowListVO">
SELECT SELECT
lpw.serial_num AS serialNum, lpw.serial_num AS serialNum,
lpw.dept_id AS deptId,
lpw.cust_isn AS custIsn, lpw.cust_isn AS custIsn,
lpw.cust_name AS custName, lpw.cust_name AS custName,
lpw.cust_type AS custType, lpw.cust_type AS custType,
@@ -49,6 +50,18 @@
<if test="query != null and query.deptId != null"> <if test="query != null and query.deptId != null">
AND lpw.dept_id = #{query.deptId} AND lpw.dept_id = #{query.deptId}
</if> </if>
<if test="query != null and query.custType != null and query.custType != ''">
AND lpw.cust_type = #{query.custType}
</if>
<if test="query != null and query.guarType != null and query.guarType != ''">
AND lpw.guar_type = #{query.guarType}
</if>
<if test="query != null and query.beginCreateTime != null">
AND lpw.create_time &gt;= #{query.beginCreateTime}
</if>
<if test="query != null and query.endCreateTime != null">
AND lpw.create_time &lt;= #{query.endCreateTime}
</if>
</where> </where>
ORDER BY lpw.update_time DESC ORDER BY lpw.update_time DESC
</select> </select>

View File

@@ -10,10 +10,12 @@ class LoanPricingWorkflowListVOTest
void shouldExposeCalculateRateAndExecuteRateFields() void shouldExposeCalculateRateAndExecuteRateFields()
{ {
LoanPricingWorkflowListVO vo = new LoanPricingWorkflowListVO(); LoanPricingWorkflowListVO vo = new LoanPricingWorkflowListVO();
vo.setDeptId(100L);
vo.setCustIsn("CUST001"); vo.setCustIsn("CUST001");
vo.setCalculateRate("6.15"); vo.setCalculateRate("6.15");
vo.setExecuteRate("5.80"); vo.setExecuteRate("5.80");
assertEquals(100L, vo.getDeptId());
assertEquals("CUST001", vo.getCustIsn()); assertEquals("CUST001", vo.getCustIsn());
assertEquals("6.15", vo.getCalculateRate()); assertEquals("6.15", vo.getCalculateRate());
assertEquals("5.80", vo.getExecuteRate()); assertEquals("5.80", vo.getExecuteRate());

View File

@@ -19,6 +19,7 @@ class LoanPricingWorkflowMapperXmlTest
assertTrue(xml.contains("WHEN lpw.cust_type = '个人' THEN mr.final_calculate_rate")); assertTrue(xml.contains("WHEN lpw.cust_type = '个人' THEN mr.final_calculate_rate"));
assertTrue(xml.contains("WHEN lpw.cust_type = '企业' THEN mc.final_calculate_rate")); assertTrue(xml.contains("WHEN lpw.cust_type = '企业' THEN mc.final_calculate_rate"));
assertTrue(xml.contains("lpw.dept_id AS deptId"));
assertTrue(xml.contains("lpw.create_by = #{query.dataScopeCreateBy}")); assertTrue(xml.contains("lpw.create_by = #{query.dataScopeCreateBy}"));
assertTrue(xml.contains("lpw.dept_id IN")); assertTrue(xml.contains("lpw.dept_id IN"));
assertTrue(xml.contains("find_in_set(#{query.dataScopeDeptId}, ancestors)")); assertTrue(xml.contains("find_in_set(#{query.dataScopeDeptId}, ancestors)"));
@@ -27,6 +28,10 @@ class LoanPricingWorkflowMapperXmlTest
assertTrue(xml.contains("lpw.cust_isn LIKE CONCAT('%', #{query.custIsn}, '%')")); assertTrue(xml.contains("lpw.cust_isn LIKE CONCAT('%', #{query.custIsn}, '%')"));
assertTrue(xml.contains("lpw.id_num LIKE CONCAT('%', #{query.custIsn}, '%')")); assertTrue(xml.contains("lpw.id_num LIKE CONCAT('%', #{query.custIsn}, '%')"));
assertTrue(xml.contains("lpw.cust_name LIKE CONCAT('%', #{query.custIsn}, '%')")); assertTrue(xml.contains("lpw.cust_name LIKE CONCAT('%', #{query.custIsn}, '%')"));
assertTrue(xml.contains("lpw.cust_type = #{query.custType}"));
assertTrue(xml.contains("lpw.guar_type = #{query.guarType}"));
assertTrue(xml.contains("lpw.create_time &gt;= #{query.beginCreateTime}"));
assertTrue(xml.contains("lpw.create_time &lt;= #{query.endCreateTime}"));
} }
@Test @Test

View File

@@ -9,6 +9,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="客户类型" prop="custType">
<el-select v-model="queryParams.custType" placeholder="请选择客户类型" clearable style="width: 160px">
<el-option label="个人" value="个人" />
<el-option label="企业" value="企业" />
</el-select>
</el-form-item>
<el-form-item label="担保方式" prop="guarType">
<el-select v-model="queryParams.guarType" placeholder="请选择担保方式" clearable style="width: 160px">
<el-option label="信用" value="信用" />
<el-option label="保证" value="保证" />
<el-option label="抵押" value="抵押" />
<el-option label="质押" value="质押" />
</el-select>
</el-form-item>
<el-form-item label="创建者" prop="createBy"> <el-form-item label="创建者" prop="createBy">
<el-input <el-input
v-model="queryParams.createBy" v-model="queryParams.createBy"
@@ -27,6 +41,17 @@
style="width: 220px" style="width: 220px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 240px"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -69,6 +94,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" min-width="220" class-name="workflow-important-column" /> <el-table-column label="创建者" align="center" prop="createBy" min-width="220" class-name="workflow-important-column" />
<el-table-column label="机构号" align="center" prop="deptId" min-width="110" />
<el-table-column label="操作" align="center" fixed="right" min-width="150" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" min-width="150" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@@ -157,6 +183,8 @@ export default {
workflowList: [], workflowList: [],
// 机构树选项 // 机构树选项
deptOptions: [], deptOptions: [],
// 创建时间范围
dateRange: [],
// 是否显示客户类型选择弹出层 // 是否显示客户类型选择弹出层
showTypeSelector: false, showTypeSelector: false,
// 是否显示客户号查询选择弹出层 // 是否显示客户号查询选择弹出层
@@ -176,6 +204,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
custIsn: undefined, custIsn: undefined,
custType: undefined,
guarType: undefined,
createBy: undefined, createBy: undefined,
deptId: undefined deptId: undefined
} }
@@ -220,7 +250,13 @@ export default {
/** 查询利率定价流程列表 */ /** 查询利率定价流程列表 */
getList() { getList() {
this.loading = true this.loading = true
listWorkflow(this.queryParams).then(response => { const hasDateRange = Array.isArray(this.dateRange) && this.dateRange.length === 2
const query = {
...this.queryParams,
beginCreateTime: hasDateRange ? `${this.dateRange[0]} 00:00:00` : undefined,
endCreateTime: hasDateRange ? `${this.dateRange[1]} 23:59:59` : undefined
}
listWorkflow(query).then(response => {
this.workflowList = response.rows this.workflowList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
@@ -233,6 +269,7 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = []
this.resetForm("queryForm") this.resetForm("queryForm")
this.handleQuery() this.handleQuery()
}, },

View File

@@ -55,6 +55,14 @@ assert(source.includes('icon="el-icon-edit"') && source.includes('>编辑</el-bu
assert(source.includes('v-if="canEdit(scope.row)"'), '流程列表编辑按钮应只对可编辑行显示') assert(source.includes('v-if="canEdit(scope.row)"'), '流程列表编辑按钮应只对可编辑行显示')
assert(source.includes('row.createBy === this.currentCreateBy'), '流程列表应按创建者判断编辑按钮权限') assert(source.includes('row.createBy === this.currentCreateBy'), '流程列表应按创建者判断编辑按钮权限')
assert(source.includes('getWorkflowEdit(row.serialNum)'), '编辑操作应先查询编辑数据') assert(source.includes('getWorkflowEdit(row.serialNum)'), '编辑操作应先查询编辑数据')
assert(source.includes('v-model="queryParams.custType"'), '流程列表应包含客户类型筛选')
assert(source.includes('v-model="queryParams.guarType"'), '流程列表应包含担保方式筛选')
assert(source.includes('v-model="dateRange"'), '流程列表应包含创建时间范围筛选')
assert(source.includes('value-format="yyyy-MM-dd"'), '流程列表创建时间筛选应使用日期值')
assert(source.includes('beginCreateTime: hasDateRange ? `${this.dateRange[0]} 00:00:00` : undefined'), '流程列表应传递当天零点的顶层创建时间起始参数')
assert(source.includes('endCreateTime: hasDateRange ? `${this.dateRange[1]} 23:59:59` : undefined'), '流程列表应传递当天末秒的顶层创建时间结束参数')
assert(source.includes('label="机构号"') && source.includes('prop="deptId"'), '流程列表应展示机构号')
assert(source.indexOf('label="机构号"') > source.indexOf('label="创建者"'), '机构号列应位于创建者列之后')
let refreshCount = 0 let refreshCount = 0
component.activated.call({ component.activated.call({