fix(meeting-new): 落实 manager/meetings/new 审查报告 13 项修复
P0 数据正确性: - BizMeetingMapper.xml INSERT 扩 20 列 (原只插 meeting_id) - BizMeetingServiceImpl businessId 兜底生成 (DDL NOT NULL, 前端无字段) - MeetingNew.vue onMounted 回填 projectId/projectName (原只 projectNo) P1 核心功能: - 删 会议ID 输入框 (PK 让用户填错) - 加 6 个项目只读快照 (el-descriptions, 跟原型对齐) - 会议名称默认 = 项目名称, 不可修改 (加红字提示 + disabled) - meetingId String → Long (6 文件: BizMeeting/Mapper/ServiceImpl/Controller/IBizMeetingService/Mapper.xml) - supervisionTime String → Date + @JsonFormat P2 体验: - 面包屑改 项目列表 / 新建会议 - page-sub 显示项目名而非 ID 13 - 当前阶段 el-select 4 → 10 选项 - resultMap/selectFields 补 9 个漏字段 (projectId/projectName/orgName/supervision*/invitation*/schedule*/labor*) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,26 @@
|
||||
|
||||
---
|
||||
|
||||
## 修复记录 (2026-08-18 第二次审查时落实)
|
||||
|
||||
| # | 问题 | 修复 | 状态 |
|
||||
|---|---|---|---|
|
||||
| P0#1 | mapper INSERT 只插 meeting_id | `BizMeetingMapper.xml:43-87` 扩 20 列 `<if>` | ✅ |
|
||||
| P0#2 | businessId DDL NOT NULL 前端无字段 | `BizMeetingServiceImpl:24-26` 兜底 `IdGenerator.generateId()` | ✅ |
|
||||
| P0#3 | form 没 projectId (只 projectNo) | `MeetingNew.vue:88-105` onMounted 回填 projectId/projectName | ✅ |
|
||||
| P1#4 | "会议ID" 输入框让用户填 PK | 删 field + 删 rule | ✅ |
|
||||
| P1#5 | 6 个项目只读快照全缺失 | 加 el-descriptions (项目编号/名称/形式/开始时间/创建人/创建时间) | ✅ |
|
||||
| P1#6 | 会议名称默认 = 项目名称 | onMounted 回填 + 字段 disabled + 红字提示 | ✅ |
|
||||
| P1#7 | meetingId String → Long | 6 文件: BizMeeting.java + Mapper.java + ServiceImpl.java + Controller.java + IBizMeetingService.java + Mapper.xml | ✅ |
|
||||
| P1#8 | supervisionTime String → Date | BizMeeting.java 加 `@JsonFormat` + Date | ✅ |
|
||||
| P2#9 | 面包屑不一致 | 改 "项目列表 / 新建会议" | ✅ |
|
||||
| P2#10 | page-sub 显示原始 ID "13" | 改成 "{projectName} ({projectNo})" | ✅ |
|
||||
| P2#11 | 当前阶段 el-select 4 → 10 选项 | 补 待监管/监管通过/待整改/待结算/已结算/已结题 | ✅ |
|
||||
| P2#12 | resultMap 漏字段 | BizMeetingMapper.xml:4-28 补 9 个 result | ✅ |
|
||||
| P2#13 | selectFields SQL 漏字段 | BizMeetingMapper.xml:30 补 9 列 | ✅ |
|
||||
|
||||
---
|
||||
|
||||
## 0. 4 跳定位 (铁律: 不按名字猜)
|
||||
|
||||
| 跳 | 文件:行 | 结果 |
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ public class BizMeetingController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
@GetMapping("/{meetingId}")
|
||||
public AjaxResult getInfo(@PathVariable("meetingId") String meetingId)
|
||||
public AjaxResult getInfo(@PathVariable("meetingId") Long meetingId)
|
||||
{
|
||||
return success(bizMeetingService.getById(meetingId));
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class BizMeetingController extends BaseController
|
||||
}
|
||||
@Log(title = "会议", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(bizMeetingService.deleteByPrimaryKeys(ids));
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
/** 会议对象 BizMeeting */
|
||||
public class BizMeeting extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/** meetingId */
|
||||
private String meetingId;
|
||||
/** meetingId (与 DB bigint 对齐, AUTO_INCREMENT) */
|
||||
private Long meetingId;
|
||||
/** project_no */
|
||||
@Excel(name = "project_no")
|
||||
private String projectNo;
|
||||
@@ -64,16 +64,17 @@ public class BizMeeting extends BaseEntity {
|
||||
private String supervisionOpinion;
|
||||
/** 监察人 */
|
||||
private String supervisionBy;
|
||||
/** 监察时间 */
|
||||
private String supervisionTime;
|
||||
/** 监察时间 (与 DB datetime 对齐) */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date supervisionTime;
|
||||
/** 邀请函URL */
|
||||
private String invitationUrl;
|
||||
/** 日程海报URL */
|
||||
private String scheduleUrl;
|
||||
/** 签署劳务 0未签 1已签 */
|
||||
private String laborSigned;
|
||||
public String getMeetingId() { return meetingId; }
|
||||
public void setMeetingId(String meetingId) { this.meetingId = meetingId; }
|
||||
public Long getMeetingId() { return meetingId; }
|
||||
public void setMeetingId(Long meetingId) { this.meetingId = meetingId; }
|
||||
public String getProjectNo() { return projectNo; }
|
||||
public void setProjectNo(String projectNo) { this.projectNo = projectNo; }
|
||||
public String getBusinessId() { return businessId; }
|
||||
|
||||
@@ -7,10 +7,10 @@ import com.ruoyi.business.domain.BizMeeting;
|
||||
*/
|
||||
public interface BizMeetingMapper
|
||||
{
|
||||
BizMeeting selectByPrimaryKey(String meetingId);
|
||||
BizMeeting selectByPrimaryKey(Long meetingId);
|
||||
List<BizMeeting> selectList(BizMeeting entity);
|
||||
int insert(BizMeeting entity);
|
||||
int updateByPrimaryKey(BizMeeting entity);
|
||||
int deleteByPrimaryKey(String meetingId);
|
||||
int deleteByPrimaryKeys(String[] meetingIds);
|
||||
int deleteByPrimaryKey(Long meetingId);
|
||||
int deleteByPrimaryKeys(Long[] meetingIds);
|
||||
}
|
||||
+3
-3
@@ -8,10 +8,10 @@ import com.ruoyi.business.domain.BizMeeting;
|
||||
*/
|
||||
public interface IBizMeetingService
|
||||
{
|
||||
BizMeeting getById(String meetingId);
|
||||
BizMeeting getById(Long meetingId);
|
||||
List<BizMeeting> selectList(BizMeeting entity);
|
||||
int insert(BizMeeting entity);
|
||||
int updateByPrimaryKey(BizMeeting entity);
|
||||
int deleteByPrimaryKey(String meetingId);
|
||||
int deleteByPrimaryKeys(String[] meetingId);
|
||||
int deleteByPrimaryKey(Long meetingId);
|
||||
int deleteByPrimaryKeys(Long[] meetingId);
|
||||
}
|
||||
|
||||
+12
-4
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.domain.BizMeeting;
|
||||
import com.ruoyi.business.mapper.BizMeetingMapper;
|
||||
import com.ruoyi.business.service.IBizMeetingService;
|
||||
import com.ruoyi.common.utils.id.IdGenerator;
|
||||
|
||||
@Service
|
||||
public class BizMeetingServiceImpl implements IBizMeetingService
|
||||
@@ -14,20 +15,27 @@ public class BizMeetingServiceImpl implements IBizMeetingService
|
||||
private BizMeetingMapper bizMeetingMapper;
|
||||
|
||||
@Override
|
||||
public BizMeeting getById(String meetingId)
|
||||
public BizMeeting getById(Long meetingId)
|
||||
{ return bizMeetingMapper.selectByPrimaryKey(meetingId); }
|
||||
@Override
|
||||
public List<BizMeeting> selectList(BizMeeting entity)
|
||||
{ return bizMeetingMapper.selectList(entity); }
|
||||
@Override
|
||||
public int insert(BizMeeting entity) { com.ruoyi.common.utils.id.SnowflakeId.injectIfEmpty(entity, "meetingId"); return bizMeetingMapper.insert(entity); }
|
||||
public int insert(BizMeeting entity) {
|
||||
// meetingId 走 DB AUTO_INCREMENT (BizProject 同模式: SnowflakeId.injectIfEmpty 对 Long setter 会 NoSuchMethodException 被吞掉, 无副作用);
|
||||
// businessId DDL NOT NULL UNIQUE, 前端无字段, 兜底用雪花 ID 字符串 (跟 meetingId 同源, 保证唯一)
|
||||
if (entity.getBusinessId() == null || entity.getBusinessId().isEmpty()) {
|
||||
entity.setBusinessId(String.valueOf(IdGenerator.generateId()));
|
||||
}
|
||||
return bizMeetingMapper.insert(entity);
|
||||
}
|
||||
@Override
|
||||
public int updateByPrimaryKey(BizMeeting entity)
|
||||
{ return bizMeetingMapper.updateByPrimaryKey(entity); }
|
||||
@Override
|
||||
public int deleteByPrimaryKey(String meetingId)
|
||||
public int deleteByPrimaryKey(Long meetingId)
|
||||
{ return bizMeetingMapper.deleteByPrimaryKey(meetingId); }
|
||||
@Override
|
||||
public int deleteByPrimaryKeys(String[] meetingId)
|
||||
public int deleteByPrimaryKeys(Long[] meetingId)
|
||||
{ return bizMeetingMapper.deleteByPrimaryKeys(meetingId); }
|
||||
}
|
||||
|
||||
@@ -3,25 +3,34 @@
|
||||
<mapper namespace="com.ruoyi.business.mapper.BizMeetingMapper">
|
||||
<resultMap type="BizMeeting" id="BizMeetingResult">
|
||||
<id property="meetingId" column="meeting_id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="projectForm" column="project_form" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectNo" column="project_no" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="meetingName" column="meeting_name" />
|
||||
<result property="periodNo" column="period_no" />
|
||||
<result property="totalPeriods" column="total_periods" />
|
||||
<result property="projectForm" column="project_form" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="totalPeriods" column="total_periods" />
|
||||
<result property="periodNo" column="period_no" />
|
||||
<result property="orgName" column="org_name" />
|
||||
<result property="currentStage" column="current_stage" />
|
||||
<result property="supervisionOpinion" column="supervision_opinion" />
|
||||
<result property="supervisionBy" column="supervision_by" />
|
||||
<result property="supervisionTime" column="supervision_time" />
|
||||
<result property="invitationUrl" column="invitation_url" />
|
||||
<result property="scheduleUrl" column="schedule_url" />
|
||||
<result property="laborSigned" column="labor_signed" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
<sql id="selectFields">
|
||||
select meeting_id, project_no, business_id, project_form, meeting_name, start_time, end_time, total_periods, period_no, current_stage, create_by, create_time, update_by, update_time
|
||||
select meeting_id, business_id, project_id, project_no, project_name, meeting_name, period_no, total_periods, project_form, start_time, end_time, org_name, current_stage, supervision_opinion, supervision_by, supervision_time, invitation_url, schedule_url, labor_signed, create_by, create_time, update_by, update_time
|
||||
from biz_meeting
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BizMeetingResult" parameterType="String">
|
||||
<select id="selectByPrimaryKey" resultMap="BizMeetingResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where meeting_id = #{meetingId}
|
||||
</select>
|
||||
@@ -34,10 +43,46 @@
|
||||
<insert id="insert" parameterType="BizMeeting">
|
||||
insert into biz_meeting
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="meetingId != null and meetingId != ''">meeting_id,</if>
|
||||
<if test="meetingId != null">meeting_id,</if>
|
||||
<if test="businessId != null and businessId != ''">business_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="projectNo != null and projectNo != ''">project_no,</if>
|
||||
<if test="projectName != null and projectName != ''">project_name,</if>
|
||||
<if test="meetingName != null and meetingName != ''">meeting_name,</if>
|
||||
<if test="periodNo != null">period_no,</if>
|
||||
<if test="totalPeriods != null">total_periods,</if>
|
||||
<if test="projectForm != null and projectForm != ''">project_form,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="orgName != null and orgName != ''">org_name,</if>
|
||||
<if test="currentStage != null and currentStage != ''">current_stage,</if>
|
||||
<if test="supervisionOpinion != null and supervisionOpinion != ''">supervision_opinion,</if>
|
||||
<if test="supervisionBy != null and supervisionBy != ''">supervision_by,</if>
|
||||
<if test="supervisionTime != null">supervision_time,</if>
|
||||
<if test="invitationUrl != null and invitationUrl != ''">invitation_url,</if>
|
||||
<if test="scheduleUrl != null and scheduleUrl != ''">schedule_url,</if>
|
||||
<if test="laborSigned != null and laborSigned != ''">labor_signed,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="meetingId != null and meetingId != ''">#{meetingId},</if>
|
||||
<if test="meetingId != null">#{meetingId},</if>
|
||||
<if test="businessId != null and businessId != ''">#{businessId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="projectNo != null and projectNo != ''">#{projectNo},</if>
|
||||
<if test="projectName != null and projectName != ''">#{projectName},</if>
|
||||
<if test="meetingName != null and meetingName != ''">#{meetingName},</if>
|
||||
<if test="periodNo != null">#{periodNo},</if>
|
||||
<if test="totalPeriods != null">#{totalPeriods},</if>
|
||||
<if test="projectForm != null and projectForm != ''">#{projectForm},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="orgName != null and orgName != ''">#{orgName},</if>
|
||||
<if test="currentStage != null and currentStage != ''">#{currentStage},</if>
|
||||
<if test="supervisionOpinion != null and supervisionOpinion != ''">#{supervisionOpinion},</if>
|
||||
<if test="supervisionBy != null and supervisionBy != ''">#{supervisionBy},</if>
|
||||
<if test="supervisionTime != null">#{supervisionTime},</if>
|
||||
<if test="invitationUrl != null and invitationUrl != ''">#{invitationUrl},</if>
|
||||
<if test="scheduleUrl != null and scheduleUrl != ''">#{scheduleUrl},</if>
|
||||
<if test="laborSigned != null and laborSigned != ''">#{laborSigned},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKey" parameterType="BizMeeting">
|
||||
@@ -64,10 +109,10 @@
|
||||
</trim>
|
||||
where meeting_id = #{meetingId}
|
||||
</update>
|
||||
<delete id="deleteByPrimaryKey" parameterType="String">
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_meeting where meeting_id = #{meetingId}
|
||||
</delete>
|
||||
<delete id="deleteByPrimaryKeys" parameterType="String">
|
||||
<delete id="deleteByPrimaryKeys" parameterType="Long">
|
||||
delete from biz_meeting where meeting_id in
|
||||
<foreach collection="meetingIds" item="meetingId" open="(" separator="," close=")">
|
||||
#{meetingId}
|
||||
|
||||
@@ -1,17 +1,33 @@
|
||||
<template>
|
||||
<div class="page-card manager-meeting-new">
|
||||
<div class="breadcrumb">首页 / 会议管理 / 新建会议</div>
|
||||
<p class="page-sub" v-if="preselectProjectId">已选择项目: {{ preselectProjectId }}</p>
|
||||
<div class="breadcrumb">项目列表 / 新建会议</div>
|
||||
<p class="page-sub" v-if="preselectProjectId">已选择项目: {{ projectSnap.projectName || '加载中...' }} ({{ projectSnap.projectNo || preselectProjectId }})</p>
|
||||
|
||||
<!-- 6 个项目只读快照 (跟原型 §#4 一致) -->
|
||||
<el-descriptions
|
||||
v-if="preselectProjectId"
|
||||
class="project-snapshot"
|
||||
:column="3"
|
||||
border
|
||||
size="small"
|
||||
title="项目信息"
|
||||
>
|
||||
<el-descriptions-item label="项目编号">{{ projectSnap.projectNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称">{{ projectSnap.projectName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目形式">{{ projectSnap.projectForm }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目开始时间">{{ projectSnap.startTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建人">{{ projectSnap.createBy }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ projectSnap.createTime }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="meeting-form">
|
||||
<el-form-item label="项目编号" prop="projectNo">
|
||||
<el-input v-model="form.projectNo" :disabled="!!preselectProjectId" placeholder="项目编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会议名称" prop="meetingName">
|
||||
<el-input v-model="form.meetingName" placeholder="会议名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="会议ID" prop="meetingId">
|
||||
<el-input v-model="form.meetingId" placeholder="会议ID" />
|
||||
<!-- 跟原型 §#3 一致: 默认 = 项目名称, 不可修改 -->
|
||||
<el-input v-model="form.meetingName" :disabled="!!preselectProjectId" placeholder="会议名称" />
|
||||
<span v-if="preselectProjectId" class="field-tip">*会议名称默认为项目名称,不可修改</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目形式" prop="projectForm">
|
||||
<el-select v-model="form.projectForm" placeholder="请选择" style="width:100%">
|
||||
@@ -39,6 +55,12 @@
|
||||
<el-option label="执行中" value="执行中" />
|
||||
<el-option label="已执行" value="已执行" />
|
||||
<el-option label="已完结" value="已完结" />
|
||||
<el-option label="待监管" value="待监管" />
|
||||
<el-option label="监管通过" value="监管通过" />
|
||||
<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="备注">
|
||||
@@ -61,12 +83,13 @@ import { ElMessage } from 'element-plus'
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const preselectProjectId = route.query.projectId || ''
|
||||
const preselectProjectNo = route.query.projectNo || ''
|
||||
const formRef = ref()
|
||||
const form = reactive({
|
||||
projectNo: preselectProjectNo || '',
|
||||
// meetingId 删了 (PK 是 AUTO_INCREMENT, 不让用户填)
|
||||
projectId: preselectProjectId ? Number(preselectProjectId) : null, // P0#3: 补 projectId
|
||||
projectNo: '',
|
||||
projectName: '',
|
||||
meetingName: '',
|
||||
meetingId: '',
|
||||
projectForm: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
@@ -75,10 +98,18 @@ const form = reactive({
|
||||
currentStage: '未执行',
|
||||
remark: ''
|
||||
})
|
||||
// 项目只读快照 (P1#5)
|
||||
const projectSnap = reactive({
|
||||
projectNo: '',
|
||||
projectName: '',
|
||||
projectForm: '',
|
||||
startTime: '',
|
||||
createBy: '',
|
||||
createTime: ''
|
||||
})
|
||||
const rules = {
|
||||
projectNo: [{ required: true, message: '请输入项目编号', trigger: 'blur' }],
|
||||
meetingName: [{ required: true, message: '请输入会议名称', trigger: 'blur' }],
|
||||
meetingId: [{ required: true, message: '请输入会议ID', trigger: 'blur' }],
|
||||
startTime: [{ required: true, message: '请选择会议开始时间', trigger: 'change' }],
|
||||
endTime: [{ required: true, message: '请选择会议结束时间', trigger: 'change' }]
|
||||
}
|
||||
@@ -97,12 +128,23 @@ async function onSave() {
|
||||
function onCancel() { router.back() }
|
||||
|
||||
onMounted(async () => {
|
||||
if (preselectProjectId) {
|
||||
try {
|
||||
const r = await bizGet('project', preselectProjectId)
|
||||
form.projectNo = (r.data && r.data.projectNo) || ''
|
||||
} catch (e) {}
|
||||
}
|
||||
if (!preselectProjectId) return
|
||||
try {
|
||||
const r = await bizGet('project', preselectProjectId)
|
||||
const d = (r && r.data) || {}
|
||||
// P0#3: 回填 projectId / projectNo / projectName / meetingName (默认 = 项目名)
|
||||
form.projectId = d.projectId ?? Number(preselectProjectId)
|
||||
form.projectNo = d.projectNo || ''
|
||||
form.projectName = d.projectName || ''
|
||||
form.meetingName = d.projectName || '' // P1#6: 会议名称默认 = 项目名称
|
||||
// P1#5: 项目只读快照
|
||||
projectSnap.projectNo = d.projectNo || ''
|
||||
projectSnap.projectName = d.projectName || ''
|
||||
projectSnap.projectForm = d.projectForm || ''
|
||||
projectSnap.startTime = d.startTime || ''
|
||||
projectSnap.createBy = d.createBy || ''
|
||||
projectSnap.createTime = d.createTime || ''
|
||||
} catch (e) {}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -111,5 +153,7 @@ onMounted(async () => {
|
||||
.manager-meeting-new { padding: 16px; }
|
||||
.breadcrumb { font-size: 13px; color: #8c8c8c; margin-bottom: 12px; }
|
||||
.page-sub { color: #909399; font-size: 13px; margin-bottom: 16px; }
|
||||
.project-snapshot { margin-bottom: 16px; }
|
||||
.field-tip { color: #f56c6c; font-size: 12px; margin-left: 8px; }
|
||||
.meeting-form { max-width: 700px; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user