20260615-就业登记模块开发记录.md 6.4 KB

就业登记模块开发记录

日期:2026-06-12

需求来源

《湛江市人力资源和社会保障局智慧人社运营运维(2025-2027年)项目需求规格说明书-就业一湛通服务平台》第3.8节。

功能说明

省一体化平台对所有就业登记进行判定(应登记、已登记、未登记),就业一湛通服务平台接收省回流标记,可以通过平台给未登记人员发送消息提醒。

查询字段

姓名,户口所在地,登记状态

列表字段

姓名,性别,学历,户口所在地,就业登记状态,数据更新时间

支持功能

查看详情,发送消息,服务跟进

数据库设计

主表:employment_registration

字段 类型 说明
id VARCHAR(32) 主键
personal_id VARCHAR(32) 关联个人信息ID
province_record_id VARCHAR(64) 省平台记录ID
registration_status VARCHAR(32) 就业登记状态(应登记/已登记/未登记)
last_notice_time TIMESTAMP 最后通知时间

子表:employment_registration_service_follow

字段 类型 说明
id VARCHAR(32) 主键
registration_id VARCHAR(32) 关联就业登记ID
service_content VARCHAR(1000) 服务内容
service_time TIMESTAMP 服务时间
service_provider VARCHAR(100) 服务人员

视图:v_employment_registration_list

关联 employment_registration 和 personal_info 表,用于列表页查询。

文件清单

后端(13个文件)

jeecg-boot/jeecg-boot-module/jeecg-module-zjrs/src/main/java/org/jeecg/modules/zjrs/employmentregistration/
├── controller/
│   ├── EmploymentRegistrationController.java
│   └── EmploymentRegistrationServiceFollowController.java
├── entity/
│   ├── EmploymentRegistration.java
│   ├── EmploymentRegistrationDetailVo.java
│   ├── EmploymentRegistrationPageVo.java
│   └── EmploymentRegistrationServiceFollow.java
├── mapper/
│   ├── EmploymentRegistrationMapper.java
│   ├── EmploymentRegistrationServiceFollowMapper.java
│   └── xml/
│       └── EmploymentRegistrationMapper.xml
└── service/
    ├── IEmploymentRegistrationService.java
    ├── IEmploymentRegistrationServiceFollowService.java
    └── impl/
        ├── EmploymentRegistrationServiceImpl.java
        └── EmploymentRegistrationServiceFollowServiceImpl.java

前端(6个文件)

jeecgboot-vue3/src/views/employmentregistration/
├── EmploymentRegistrationList.vue
├── EmploymentRegistration.api.ts
├── EmploymentRegistration.data.ts
└── components/
    ├── EmploymentRegistrationModal.vue
    ├── EmploymentRegistrationDetail.vue
    └── EmploymentRegistrationServiceFollowList.vue

SQL(4个文件)

.docs/sql/
├── 就业登记-建表.sql
├── 就业登记-视图.sql
└── 就业登记-菜单权限.sql(达梦版)

jeecg-boot/.../flyway/sql/mysql/
└── V20260612_1__menu_insert_EmploymentRegistration.sql(MySQL版)

菜单层级

就业登记 (一级, sort_no: 2.30)
  └── 就业登记管理 (二级)
       ├── 添加 (employment_registration:add)
       ├── 编辑 (employment_registration:edit)
       ├── 删除 (employment_registration:delete)
       ├── 批量删除 (employment_registration:deleteBatch)
       ├── 导出 (employment_registration:exportXls)
       └── 导入 (employment_registration:importExcel)

API 端点

方法 路径 说明
GET /employmentRegistration/list 分页列表
GET /employmentRegistration/queryDetailById 查询详情
POST /employmentRegistration/add 新增
PUT/POST /employmentRegistration/edit 编辑
DELETE /employmentRegistration/delete 删除
DELETE /employmentRegistration/deleteBatch 批量删除
GET /employmentRegistration/exportXls 导出
POST /employmentRegistration/importExcel 导入
GET /employmentRegistrationServiceFollow/list 服务跟进列表
POST /employmentRegistrationServiceFollow/add 新增服务跟进
POST /employmentRegistrationServiceFollow/edit 编辑服务跟进
DELETE /employmentRegistrationServiceFollow/delete 删除服务跟进

设计决策

  1. 就业登记状态(应登记/已登记/未登记)使用硬编码,不放入字典表
  2. 数据来源为省平台回流,前端不提供新增按钮
  3. 户口所在地搜索使用 XZQH 树形下拉(湛江区县)
  4. 详情页仅展示9个字段(省平台记录ID、姓名、性别、证件号码、学历、户口所在地、电话号码、就业登记状态、最后通知时间)
  5. 发送消息使用 Tinymce 编辑器 + /notification/send API

部署顺序

  1. 执行建表SQL + 视图SQL
  2. 编译后端:mvn clean package -pl jeecg-boot-module/jeecg-module-zjrs -am
  3. Flyway 自动执行菜单 SQL(或手动执行达梦版)
  4. 构建前端:pnpm build

2026-06-12 问题修复

1. 服务跟进编辑时间显示 Invalid Date

原因: 后端 @JsonFormat(pattern = "yyyy-MM-dd HH:mm") 不带秒,前端 date-picker valueFormat="YYYY-MM-DD HH:mm:ss" 格式不匹配 修复: valueFormat 改为 "YYYY-MM-DD HH:mm"(去掉 :ss

2. 发送消息内容不显示

原因: 使用了 <j-editor> 组件(非全局注册),应使用全局注册的 <Tinymce> 组件 修复: 替换为 <Tinymce v-model="sendMessageForm.content" :height="300" toolbar="..." plugins="..." />,参照 CareerGuidanceServiceList.vue

3. 列表状态列去除颜色样式

说明: 就业登记状态列原来使用彩色 <a-tag>(已登记=绿/应登记=橙/未登记=红),改为纯文本显示,与其他列保持一致 修复: EmploymentRegistrationList.vueregistrationStatus 列从 <a-tag color> 改为 {{ text || '-' }}

4. 消息中心消息类型显示优化

原因: 发送消息时 moduleType='employment_registration',消息中心的 notification_module 字典中无对应中文名称,直接显示英文编码 修复: 新增 .docs/sql/就业登记-补充字典数据.sql,向 DICTIONARY_ITEM 表插入 notification_module 字典项:Code=employment_registration, Name=就业登记。消息中心通过 moduleTypeMap 自动映射为中文显示