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:
+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}
|
||||
|
||||
Reference in New Issue
Block a user