Compare commits

...

3 Commits

Author SHA1 Message Date
fa06f916e8 0327-青田重要信息一览 2026-03-27 17:29:35 +08:00
e053f80c55 0327-青田重要信息一览 2026-03-27 17:29:18 +08:00
b131290459 0323海宁预警修改 2026-03-23 16:50:18 +08:00
11 changed files with 322 additions and 112 deletions

141
CLAUDE.md Normal file
View File

@@ -0,0 +1,141 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 项目概述
这是一个基于若依框架RuoYi v3.8.8)的全栈银行客户关系管理系统,扩展了自定义业务逻辑,用于客户关系管理、基于网格的片区管理和移动端办公支持。
**技术栈:**
- **后端**Spring Boot 2.5.14、Java 1.8、Maven 多模块项目
- **前端**Vue 2.6 + Vant UI移动端 H5 应用)
- **数据库**MySQL + MyBatis Plus ORM
- **缓存**Redis + JWT 认证
- **API 文档**Swagger 3.0
## 构建与运行命令
### 后端Maven
```bash
# 构建整个项目(跳过测试)
mvn clean package -Dmaven.test.skip=true
# 或使用便捷脚本:
bin/package.bat # 构建
bin/run.bat # 运行(启动 RuoYiApplication
bin/clean.bat # 清理构建产物
```
构建后的可执行 JAR 位于 `ruoyi-admin/target/ruoyi-admin.jar`
### 前端Vue H5
```bash
cd szzh-h5
npm install # 安装依赖
npm run serve # 开发服务器dev 模式)
npm run build # 生产环境构建
npm run build:dev # 开发环境构建
```
## 架构
### Maven 模块结构
```
ruoyi/ # 父 POM
├── ruoyi-admin/ # 主应用入口RuoYiApplication
├── ruoyi-framework/ # 框架核心(安全、配置、拦截器)
├── ruoyi-system/ # 系统管理(用户、角色、部门、菜单)
├── ruoyi-common/ # 通用工具类和基类
├── ruoyi-quartz/ # 定时任务支持
├── ruoyi-generator/ # 代码生成工具
└── ibs/ # 自定义业务逻辑模块
```
### IBS 业务模块(`ibs/src/main/java/com/ruoyi/ibs`
核心业务域包含以下子模块:
| 模块 | 功能说明 |
|------|---------|
| `app` | 企业微信QYWeiXin集成、认证 |
| `audio` | 音频录制和处理 |
| `cmpm` | 客户经理关系管理(移交、认领、调整) |
| `custmap` | 客户地图可视化和收藏位置 |
| `customerselect` | 客户筛选和基于 CSV 标签的选择 |
| `dashboard` | 仪表盘数据、营销活动、通知 |
| `datavisual` | 拜访轨迹和区域数据可视化 |
| `draw` | 地图绘制图层及审核工作流 |
| `grid` | 地理网格管理、虚拟网格、地址解析 |
| `list` | 客户列表(零售、商户)、家庭成员、营销活动 |
| `qxhy` | 第三方集成(清香和一) |
| `rules` | 业务关系规则引擎 |
| `tabs` | 客户详情标签页和列表信息 |
| `task` | 拜访任务、预约、工作记录、反馈 |
### 前端结构(`szzh-h5/src`
```
views/
├── cart/ # 购物车功能
├── category/ # 分类管理
├── customer/ # 客户视图
├── dashboard/ # 仪表盘视图
├── grid/ # 网格管理视图
├── login/ # 认证登录
├── map/ # 地图功能
├── visitingTask/ # 拜访任务管理
└── workBench/ # 工作台视图
```
## 关键配置
### 环境配置文件
- `application.yml` - 基础配置
- `application-dev.yml` - 开发环境
- `application-pre.yml` - 预生产环境
- `application-uat.yml` - UAT 环境
- `application-pro.yml` - 生产环境
### 重要路径
- MyBatis Mapper 文件:`ibs/src/main/resources/mapper/**/*.xml`
- 类型处理器:`com.ruoyi.ibs.handler`
- 上传路径Windows`D:/ruoyi/files/`
- 上传路径Linux`/home/webapp/ruoyi/files/`
## 代码规范
### 后端包结构(每个模块)
```
com.ruoyi.ibs.{module}/
├── controller/ # REST 接口
├── domain/
│ ├── entity/ # 数据库实体(@TableName
│ ├── dto/ # 请求 DTO
│ └── vo/ # 响应 VO
├── mapper/ # MyBatis Mapper
└── service/
├── I{Xxx}Service # 接口
└── impl/
└── {Xxx}ServiceImpl # 实现
```
### 命名规范
- Controller 以 `Controller` 结尾
- Service 接口以 `I` 开头(如 `IGridService`
- Service 实现以 `ServiceImpl` 结尾
- DTO 以 `DTO` 结尾(数据传输对象)
- VO 以 `VO` 结尾(视图对象)
- 实体类使用 `@TableName` 注解映射表名
## 认证与安全
- 基于 JWT 的认证,可配置令牌过期时间(默认 3000 分钟)
- Token 请求头:`Authorization`
- Spring Security 实现基于角色的访问控制
-`/system/*``/monitor/*``/tool/*` 路径启用 XSS 过滤
## 开发注意事项
- 热部署默认禁用(`spring.devtools.restart.enabled: false`
- `com.ruoyi` 包的日志级别为 `debug`
- 使用 Druid 连接池
- PageHelper 配置为 MySQL 分页方言
- 主应用入口:`ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java`

View File

@@ -49,6 +49,17 @@ public class CustInfoRetailVo
//催收任务详情--青田 //催收任务详情--青田
private List<Map<String, Object>> taskDetail; private List<Map<String, Object>> taskDetail;
//重要信息一览贷款信息列表--青田
private List<ImportantInfoLoan932> importantInfoLoan932List;
public List<ImportantInfoLoan932> getImportantInfoLoan932List() {
return importantInfoLoan932List;
}
public void setImportantInfoLoan932List(List<ImportantInfoLoan932> importantInfoLoan932List) {
this.importantInfoLoan932List = importantInfoLoan932List;
}
public List<Map<String, Object>> getTaskDetail() { public List<Map<String, Object>> getTaskDetail() {
return taskDetail; return taskDetail;
} }

View File

@@ -0,0 +1,32 @@
package com.ruoyi.ibs.list.domain;
import lombok.Data;
/**
* 青田 932 重要信息一览-个人贷款信息
*/
@Data
public class ImportantInfoLoan932 {
private String custId;
private String custIsn;
private String contractNo;
private String conStartDt;
private String conEndDt;
private String loanBal;
private String loanRate;
private String assureWay;
private String loanPurpose;
private String orgCode;
private String dataDate;
}

View File

@@ -0,0 +1,11 @@
package com.ruoyi.ibs.list.mapper;
import com.ruoyi.ibs.list.domain.ImportantInfoLoan932;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ImportantInfoLoan932Mapper {
List<ImportantInfoLoan932> selectByCustId(@Param("custId") String custId);
}

View File

@@ -64,6 +64,8 @@ public class CustInfoRetailServiceImpl implements ICustInfoRetailService {
private AnchorMapper anchorMapper; private AnchorMapper anchorMapper;
@Autowired @Autowired
private DashboardService dashboardService; private DashboardService dashboardService;
@Autowired
private ImportantInfoLoan932Mapper importantInfoLoan932Mapper;
/** /**
* 查询对私客户信息 * 查询对私客户信息
@@ -147,9 +149,12 @@ public class CustInfoRetailServiceImpl implements ICustInfoRetailService {
if (SecurityUtils.getHeadId().equals("932")){ if (SecurityUtils.getHeadId().equals("932")){
CommonRespVO taskDetail = dashboardService.getTaskDetail(custId); CommonRespVO taskDetail = dashboardService.getTaskDetail(custId);
custInfoRetailVo.setTaskDetail(taskDetail.getData()); custInfoRetailVo.setTaskDetail(taskDetail.getData());
List<ImportantInfoLoan932> loanInfoList = importantInfoLoan932Mapper.selectByCustId(custId);
custInfoRetailVo.setImportantInfoLoan932List(loanInfoList);
} }
return custInfoRetailVo; return custInfoRetailVo;
} }
public List<CmpmUserList> getCmpmUserList(String custId){ public List<CmpmUserList> getCmpmUserList(String custId){
String roleName = userRole(); String roleName = userRole();
List<CmpmUserList> list = new ArrayList<>(); List<CmpmUserList> list = new ArrayList<>();

View File

@@ -53,8 +53,6 @@ public class WorkRecordServiceImpl implements WorkRecordService {
@Resource @Resource
private RedisCache redisCache; private RedisCache redisCache;
private final static String alterTypeRedisKey = "work:alter_types_count_";
/** /**
* 查询我的工作清单 * 查询我的工作清单
* *
@@ -201,22 +199,11 @@ public class WorkRecordServiceImpl implements WorkRecordService {
/** /**
* 获取预警类型及各类型预警数量 * 获取预警类型及各类型预警数量
* 每天首次查询存储到redis里后面都从redis读取 * 每次直接查询数据库,不使用缓存
*/ */
@Override @Override
public List<WarnInfoVO> getAlterTypes() { public List<WarnInfoVO> getAlterTypes() {
String headId = SecurityUtils.getHeadId(); String headId = SecurityUtils.getHeadId();
String username = SecurityUtils.getUsername();
String redisKey = alterTypeRedisKey + username;
// 先从 redis 获取缓存
if (redisCache.hasKey(redisKey)) {
List<WarnInfoVO> cachedList = redisCache.getCacheObject(redisKey);
if (cachedList != null && !cachedList.isEmpty()) {
log.debug("从 redis 获取预警类型缓存, username: {}", username);
return cachedList;
}
}
// 先查询预警类型列表 // 先查询预警类型列表
List<String> alterTypes = workRecordMapper.selectAlterTypesByHeadId(headId); List<String> alterTypes = workRecordMapper.selectAlterTypesByHeadId(headId);
@@ -231,10 +218,6 @@ public class WorkRecordServiceImpl implements WorkRecordService {
return warnInfoVO; return warnInfoVO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 存入 redis过期时间到当天结束
redisCache.setCacheObjectToEndDay(redisKey, resultList);
log.debug("预警类型数据已存入 redis, username: {}, 数量: {}", username, resultList.size());
return resultList; return resultList;
} }

View File

@@ -161,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from work_record from work_record
<where> <where>
is_alter = 1 is_alter = 1
and read_time is null
and user_name= #{username} and user_name= #{username}
<if test="status != null and status != ''"> <if test="status != null and status != ''">
and status = #{status} and status = #{status}

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.ibs.list.mapper.ImportantInfoLoan932Mapper">
<resultMap id="ImportantInfoLoan932Result" type="com.ruoyi.ibs.list.domain.ImportantInfoLoan932">
<result property="custId" column="cust_id"/>
<result property="custIsn" column="cust_isn"/>
<result property="contractNo" column="contract_no"/>
<result property="conStartDt" column="con_start_dt"/>
<result property="conEndDt" column="con_end_dt"/>
<result property="loanBal" column="loan_bal"/>
<result property="loanRate" column="loan_rate"/>
<result property="assureWay" column="assure_way"/>
<result property="loanPurpose" column="loan_purpose"/>
<result property="orgCode" column="org_code"/>
<result property="dataDate" column="data_date"/>
</resultMap>
<select id="selectByCustId" resultMap="ImportantInfoLoan932Result">
select cust_id,
cust_isn,
contract_no,
con_start_dt,
con_end_dt,
loan_bal,
loan_rate,
assure_way,
loan_purpose,
org_code,
data_date
from important_info_list_for_loan_932
where cust_id = #{custId}
order by data_date desc, contract_no desc
</select>
</mapper>

View File

@@ -80,7 +80,7 @@ spring:
# 地址 # 地址
host: 116.62.17.81 host: 116.62.17.81
# 端口默认为6379 # 端口默认为6379
port: 6380 port: 6379
# 数据库索引 # 数据库索引
database: 0 database: 0
# 密码 # 密码

View File

@@ -22,36 +22,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="home_main" v-if="showcard">
<div class="wrappernew">
<div class="wrapper_view">
<div class="view_item">
<div class="view_item_left">年龄</div>
<div class="view_item_right">{{ baseInfo.custAge }}</div>
</div>
<div class="view_item">
<div class="view_item_left">婚姻状况</div>
<div class="view_item_right">{{ baseInfo.isMarried }}</div>
</div>
<div class="view_item">
<div class="view_item_left">年收入</div>
<div class="view_item_right">{{ baseInfo.custSalary }}</div>
</div>
<div class="view_item">
<div class="view_item_left">资产情况</div>
<div class="view_item_right">{{ baseInfo.asset }}</div>
</div>
<div class="view_item">
<div class="view_item_left">信用状况</div>
<div class="view_item_right">{{ baseInfo.credit }}</div>
</div>
<div class="view_item">
<div class="view_item_left">行业名称</div>
<div class="view_item_right">{{ initIndustryBusiStr(baseInfo.belongBusi) }}</div>
</div>
</div>
</div>
</div>
<div class="home_main"> <div class="home_main">
<!-- <div class="home_main_item" v-for="(item, index) in dhList" @click="handleClickItem(item)"> <!-- <div class="home_main_item" v-for="(item, index) in dhList" @click="handleClickItem(item)">
<div class="main_left"> <div class="main_left">
@@ -61,6 +31,9 @@
<van-icon name="arrow" class="next_icon"></van-icon> <van-icon name="arrow" class="next_icon"></van-icon>
</div> --> </div> -->
<van-collapse v-model="activeNames" accordion> <van-collapse v-model="activeNames" accordion>
<van-collapse-item key="重要信息一览" title="重要信息一览" name="重要信息一览" v-if="showImportantInfo">
<speticaltag :dataSource="importantInfoList" type="special" />
</van-collapse-item>
<van-collapse-item v-for="(item, index) in dhList" :key="index" :title="item.title" <van-collapse-item v-for="(item, index) in dhList" :key="index" :title="item.title"
:name="item.title"> :name="item.title">
<indexcharts v-if="activeNames == '个人基本信息' && item.title == '个人基本信息'"></indexcharts> <indexcharts v-if="activeNames == '个人基本信息' && item.title == '个人基本信息'"></indexcharts>
@@ -81,16 +54,8 @@
<van-collapse-item key="特色客户标签" title="特色客户标签" name="特色客户标签" v-if="showTag"> <van-collapse-item key="特色客户标签" title="特色客户标签" name="特色客户标签" v-if="showTag">
<speticaltag :custIdc="baseInfo.custIdc" /> <speticaltag :custIdc="baseInfo.custIdc" />
</van-collapse-item> </van-collapse-item>
<van-collapse-item <van-collapse-item key="催收信息" title="催收信息" name="催收信息" v-if="showTaskDetail">
key="催收信息" <speticaltag :dataSource="taskDetail" type="special" />
title="催收信息"
name="催收信息"
v-if="['932'].includes(orgNum)"
>
<speticaltag
:dataSource="taskDetail"
type="special"
/>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
</div> </div>
@@ -143,7 +108,8 @@ export default {
value: '', value: '',
showPicker: false, showPicker: false,
columns: [1, 2, 23, 4, 5], columns: [1, 2, 23, 4, 5],
baseInfo:{}, baseInfo: {},
importantInfoList: [],
taskDetail: [], taskDetail: [],
industryOptions: [] industryOptions: []
} }
@@ -182,11 +148,14 @@ export default {
}, },
orgNum() { orgNum() {
const { deptId = '' } = this.userInfo const { deptId = '' } = this.userInfo
const str = String(deptId).substring(0,3) const str = String(deptId).substring(0, 3)
return str return str
}, },
showcard() { showImportantInfo() {
return this.userInfo.userName.startsWith('932') return this.orgNum === '932'
},
showTaskDetail() {
return this.orgNum === '932'
} }
}, },
methods: { methods: {
@@ -197,29 +166,9 @@ export default {
let custId = sessionStorage.getItem('custId') let custId = sessionStorage.getItem('custId')
getPersonInfo(custId).then(res => { getPersonInfo(custId).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.baseInfo = res.data.custInfoRetail this.baseInfo = res.data.custInfoRetail || {}
if (res.data.taskDetail.length > 0) { this.importantInfoList = this.buildImportantInfoList(this.baseInfo, res.data.importantInfoLoan932List || [])
const taskDetail = res.data.taskDetail[0] || {} this.taskDetail = this.formatTaskDetail(res.data.taskDetail || [])
for (let i in taskDetail) {
if (i !== 'info') {
this.taskDetail.push({
value: i,
label: taskDetail[i],
isImage: i === '照片存放地址'
})
} else {
for (let j in taskDetail.info) {
this.taskDetail.push({
value: j,
label: taskDetail.info[j],
isImage: j === '照片存放地址'
})
}
}
}
} else {
this.taskDetail = []
}
} }
}) })
}, },
@@ -237,6 +186,7 @@ export default {
} }
} }
} }
return data || ''
}, },
initIndustryTree() { initIndustryTree() {
getIndustryTree().then((res) => { getIndustryTree().then((res) => {
@@ -275,6 +225,58 @@ export default {
this.init(); this.init();
}); });
}, },
buildImportantInfoList(baseInfo, loanInfoList) {
const result = [
{ value: '年龄', label: baseInfo.custAge || '' },
{ value: '婚姻状况', label: baseInfo.isMarried || '' },
{ value: '年收入', label: baseInfo.custSalary || '' },
{ value: '资产情况', label: baseInfo.asset || '' },
{ value: '信用状况', label: baseInfo.credit || '' },
{ value: '行业名称', label: this.initIndustryBusiStr(baseInfo.belongBusi) }
]
loanInfoList.forEach((loanInfo, index) => {
result.push({ value: `贷款信息${index + 1}`, label: '', isSection: true })
result.push(
{ value: '客户号', label: loanInfo.custId || '' },
{ value: '客户内码', label: loanInfo.custIsn || '' },
{ value: '合同号', label: loanInfo.contractNo || '' },
{ value: '合同起始日', label: loanInfo.conStartDt || '' },
{ value: '合同终止日', label: loanInfo.conEndDt || '' },
{ value: '贷款余额', label: loanInfo.loanBal || '' },
{ value: '贷款利率', label: loanInfo.loanRate || '' },
{ value: '担保方式', label: loanInfo.assureWay || '' },
{ value: '贷款用途', label: loanInfo.loanPurpose || '' },
{ value: '归属支行', label: loanInfo.orgCode || '' },
{ value: '数据日期', label: loanInfo.dataDate || '' }
)
})
return result
},
formatTaskDetail(taskSource) {
if (!taskSource.length) {
return []
}
const taskDetail = taskSource[0] || {}
const result = []
for (let i in taskDetail) {
if (i !== 'info') {
result.push({
value: i,
label: taskDetail[i],
isImage: i === '照片存放地址'
})
} else if (taskDetail.info) {
for (let j in taskDetail.info) {
result.push({
value: j,
label: taskDetail.info[j],
isImage: j === '照片存放地址'
})
}
}
}
return result
},
handleClickItem(item) { handleClickItem(item) {
if (item.title == "个人基本信息") { if (item.title == "个人基本信息") {
sessionStorage.setItem('detailType', item.title); sessionStorage.setItem('detailType', item.title);
@@ -316,31 +318,6 @@ export default {
padding-bottom: 60px; padding-bottom: 60px;
} }
.wrappernew {
// padding-top: 46px;
font-size: 14px;
background-color: #fff;
.view_item {
display: flex;
justify-content: space-between;
line-height: 40px;
font-size: 14px;
border-bottom: 1px solid rgba(245, 245, 245, 1);
padding: 0 20px;
}
.view_item_left {
width: 40%;
color: rgb(22, 13, 13);
}
.view_item_right {
width: 60%;
color: rgb(22, 13, 13);
}
}
.wrapper_top { .wrapper_top {
background-color: #fff; background-color: #fff;
padding: 15px 20px; padding: 15px 20px;

View File

@@ -2,10 +2,13 @@
<div class="detail_main"> <div class="detail_main">
<div class="wrapper"> <div class="wrapper">
<div class="wrapper_view"> <div class="wrapper_view">
<div class="view_item" v-for="item in baseInfo" :key="item.value"> <div v-for="(item, index) in baseInfo" :key="`${item.value}-${index}`">
<div class="section_item" v-if="item.isSection">{{ item.value }}</div>
<div class="view_item" v-else>
<div class="view_item_left">{{ item.value }}</div> <div class="view_item_left">{{ item.value }}</div>
<van-image class="view_item_image" v-if="item.isImage" :src="item.label"></van-image> <van-image class="view_item_image" v-if="item.isImage" :src="item.label"></van-image>
<div class="view_item_right" v-else>{{ item.label }}</div> <div class="view_item_right" v-else>{{ item.label }}</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -81,6 +84,14 @@ export default {
padding: 0 20px; padding: 0 20px;
} }
.section_item {
padding: 12px 20px 8px;
font-size: 13px;
font-weight: 600;
color: #333;
background-color: #f7f8fa;
}
.view_item_left { .view_item_left {
// width: 40%; // width: 40%;
color: #7c7c7c; color: #7c7c7c;