diff --git a/web-api/src/main/java/com/jeesite/modules/biz/dao/MyMeetingInfoDao.java b/web-api/src/main/java/com/jeesite/modules/biz/dao/MyMeetingInfoDao.java new file mode 100644 index 0000000..9c0d281 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/dao/MyMeetingInfoDao.java @@ -0,0 +1,15 @@ +package com.jeesite.modules.biz.dao; + +import com.jeesite.common.dao.CrudDao; +import com.jeesite.common.mybatis.annotation.MyBatisDao; +import com.jeesite.modules.biz.entity.MyMeetingInfo; + +/** + * 会议 DAO 接口 + * @author gaoxq + * @version 2026-03-29 + */ +@MyBatisDao(dataSourceName="work") +public interface MyMeetingInfoDao extends CrudDao { + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/dao/MyScheduleDao.java b/web-api/src/main/java/com/jeesite/modules/biz/dao/MyScheduleDao.java new file mode 100644 index 0000000..371fd70 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/dao/MyScheduleDao.java @@ -0,0 +1,15 @@ +package com.jeesite.modules.biz.dao; + +import com.jeesite.common.dao.CrudDao; +import com.jeesite.common.mybatis.annotation.MyBatisDao; +import com.jeesite.modules.biz.entity.MySchedule; + +/** + * 日程 DAO 接口 + * @author gaoxq + * @version 2026-03-29 + */ +@MyBatisDao(dataSourceName="work") +public interface MyScheduleDao extends CrudDao { + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/entity/MyMeetingInfo.java b/web-api/src/main/java/com/jeesite/modules/biz/entity/MyMeetingInfo.java new file mode 100644 index 0000000..ed6bcb8 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/entity/MyMeetingInfo.java @@ -0,0 +1,110 @@ +package com.jeesite.modules.biz.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.jeesite.common.mybatis.annotation.JoinTable; +import com.jeesite.common.mybatis.annotation.JoinTable.Type; +import com.fasterxml.jackson.annotation.JsonFormat; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; + +import com.jeesite.common.entity.DataEntity; +import com.jeesite.common.mybatis.annotation.Column; +import com.jeesite.common.mybatis.annotation.Table; +import com.jeesite.common.mybatis.mapper.query.QueryType; +import com.jeesite.common.utils.excel.annotation.ExcelField; +import com.jeesite.common.utils.excel.annotation.ExcelField.Align; +import com.jeesite.common.utils.excel.annotation.ExcelFields; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 会议 Entity + * + * @author gaoxq + * @version 2026-03-29 + */ +@EqualsAndHashCode(callSuper = true) +@Table(name = "my_meeting_info", alias = "a", label = "会议信息", columns = { + @Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true), + @Column(name = "id", attrName = "id", label = "会议主键", isPK = true), + @Column(name = "title", attrName = "title", label = "会议标题", queryType = QueryType.LIKE), + @Column(name = "meeting_code", attrName = "meetingCode", label = "会议编号", isQuery = false), + @Column(name = "meeting_content", attrName = "meetingContent", label = "会议内容", isQuery = false), + @Column(name = "meeting_user", attrName = "meetingUser", label = "参会人员", isQuery = false), + @Column(name = "other_user", attrName = "otherUser", label = "其他人员", isQuery = false), + @Column(name = "meeting_type", attrName = "meetingType", label = "会议类型"), + @Column(name = "start_time", attrName = "startTime", label = "开始时间", isQuery = false, isUpdateForce = true), + @Column(name = "end_time", attrName = "endTime", label = "结束时间", isQuery = false, isUpdateForce = true), + @Column(name = "meeting_location", attrName = "meetingLocation", label = "会议地点"), + @Column(name = "ustatus", attrName = "ustatus", label = "会议状态"), + @Column(name = "remark", attrName = "remark", label = "备注说明", queryType = QueryType.LIKE), + @Column(name = "create_user", attrName = "createUser", label = "创建账户", isUpdate = false), + @Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true), +}, orderBy = "a.create_time DESC" +) +@Data +public class MyMeetingInfo extends DataEntity implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + private Date createTime; // 记录时间 + private String title; // 会议标题 + private String meetingCode; // 会议编号 + private String meetingContent; // 会议内容 + private String meetingUser; // 参会人员 + private String otherUser; // 其他人员 + private String meetingType; // 会议类型 + private Date startTime; // 开始时间 + private Date endTime; // 结束时间 + private String meetingLocation; // 会议地点 + private String ustatus; // 会议状态 + private String remark; // 备注说明 + private String createUser; // 创建账户 + private Date updateTime; // 更新时间 + + @ExcelFields({ + @ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"), + @ExcelField(title = "会议主键", attrName = "id", align = Align.CENTER, sort = 20), + @ExcelField(title = "会议标题", attrName = "title", align = Align.CENTER, sort = 30), + @ExcelField(title = "会议编号", attrName = "meetingCode", align = Align.CENTER, sort = 40), + @ExcelField(title = "会议内容", attrName = "meetingContent", align = Align.CENTER, sort = 50), + @ExcelField(title = "参会人员", attrName = "meetingUser", align = Align.CENTER, sort = 60), + @ExcelField(title = "其他人员", attrName = "otherUser", align = Align.CENTER, sort = 70), + @ExcelField(title = "会议类型", attrName = "meetingType", dictType = "meeting_type", align = Align.CENTER, sort = 80), + @ExcelField(title = "开始时间", attrName = "startTime", align = Align.CENTER, sort = 90, dataFormat = "yyyy-MM-dd hh:mm"), + @ExcelField(title = "结束时间", attrName = "endTime", align = Align.CENTER, sort = 100, dataFormat = "yyyy-MM-dd hh:mm"), + @ExcelField(title = "会议地点", attrName = "meetingLocation", align = Align.CENTER, sort = 110), + @ExcelField(title = "会议状态", attrName = "ustatus", dictType = "meeting_status", align = Align.CENTER, sort = 120), + @ExcelField(title = "备注说明", attrName = "remark", align = Align.CENTER, sort = 130), + @ExcelField(title = "创建账户", attrName = "createUser", align = Align.CENTER, sort = 140), + @ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 150, dataFormat = "yyyy-MM-dd hh:mm"), + }) + public MyMeetingInfo() { + this(null); + } + + public MyMeetingInfo(String id) { + super(id); + } + + public Date getCreateTime_gte() { + return sqlMap.getWhere().getValue("create_time", QueryType.GTE); + } + + public void setCreateTime_gte(Date createTime) { + sqlMap.getWhere().and("create_time", QueryType.GTE, createTime); + } + + public Date getCreateTime_lte() { + return sqlMap.getWhere().getValue("create_time", QueryType.LTE); + } + + public void setCreateTime_lte(Date createTime) { + sqlMap.getWhere().and("create_time", QueryType.LTE, createTime); + } + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/entity/MyProjectInfo.java b/web-api/src/main/java/com/jeesite/modules/biz/entity/MyProjectInfo.java index f58e23e..b856662 100644 --- a/web-api/src/main/java/com/jeesite/modules/biz/entity/MyProjectInfo.java +++ b/web-api/src/main/java/com/jeesite/modules/biz/entity/MyProjectInfo.java @@ -43,7 +43,7 @@ import java.io.Serial; @Column(name = "end_date", attrName = "endDate", label = "预计结束日期", isQuery = false, isUpdateForce = true), @Column(name = "actual_end_date", attrName = "actualEndDate", label = "实际结束日期", isQuery = false, isUpdateForce = true), @Column(name = "budget", attrName = "budget", label = "项目预算", comment = "项目预算(元)", isQuery = false), - @Column(name = "project_type", attrName = "projectType", label = "项目类型", isQuery = false), + @Column(name = "project_type", attrName = "projectType", label = "项目类型"), @Column(name = "project_status", attrName = "projectStatus", label = "项目状态"), @Column(name = "update_time", attrName = "updateTime", label = "更新时间", isQuery = false, isUpdateForce = true), }, joinTable = { diff --git a/web-api/src/main/java/com/jeesite/modules/biz/entity/MySchedule.java b/web-api/src/main/java/com/jeesite/modules/biz/entity/MySchedule.java new file mode 100644 index 0000000..14ffde2 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/entity/MySchedule.java @@ -0,0 +1,108 @@ +package com.jeesite.modules.biz.entity; + +import java.io.Serializable; +import java.util.Date; + +import com.jeesite.common.mybatis.annotation.JoinTable; +import com.jeesite.common.mybatis.annotation.JoinTable.Type; +import com.fasterxml.jackson.annotation.JsonFormat; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; + +import com.jeesite.common.entity.DataEntity; +import com.jeesite.common.mybatis.annotation.Column; +import com.jeesite.common.mybatis.annotation.Table; +import com.jeesite.common.mybatis.mapper.query.QueryType; +import com.jeesite.common.utils.excel.annotation.ExcelField; +import com.jeesite.common.utils.excel.annotation.ExcelField.Align; +import com.jeesite.common.utils.excel.annotation.ExcelFields; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 日程 Entity + * + * @author gaoxq + * @version 2026-03-29 + */ +@EqualsAndHashCode(callSuper = true) +@Table(name = "my_schedule", alias = "a", label = "日程信息", columns = { + @Column(name = "create_time", attrName = "createTime", label = "记录时间", isUpdate = false, isUpdateForce = true), + @Column(name = "schedule_id", attrName = "scheduleId", label = "日程主键", isPK = true), + @Column(name = "title", attrName = "title", label = "日程标题", queryType = QueryType.LIKE), + @Column(name = "content", attrName = "content", label = "日程内容", isQuery = false), + @Column(name = "schedule_type", attrName = "scheduleType", label = "日程类型"), + @Column(name = "start_time", attrName = "startTime", label = "开始时间", isQuery = false, isUpdateForce = true), + @Column(name = "end_time", attrName = "endTime", label = "结束时间", isQuery = false, isUpdateForce = true), + @Column(name = "priority", attrName = "priority", label = "优先等级"), + @Column(name = "ustatus", attrName = "ustatus", label = "日程状态"), + @Column(name = "is_all_day", attrName = "isAllDay", label = "是否全天"), + @Column(name = "remind_time", attrName = "remindTime", label = "提醒分钟", isQuery = false, isUpdateForce = true), + @Column(name = "location", attrName = "location", label = "日程地点", isQuery = false), + @Column(name = "create_user", attrName = "createUser", label = "创建账户", isUpdate = false, isUpdateForce = true), + @Column(name = "update_time", attrName = "updateTime", label = "更新时间", isUpdate = false, isQuery = false, isUpdateForce = true), +}, orderBy = "a.create_time DESC" +) +@Data +public class MySchedule extends DataEntity implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + private Date createTime; // 记录时间 + private String scheduleId; // 日程主键 + private String title; // 日程标题 + private String content; // 日程内容 + private String scheduleType; // 日程类型 + private Date startTime; // 开始时间 + private Date endTime; // 结束时间 + private String priority; // 优先等级 + private String ustatus; // 日程状态 + private String isAllDay; // 是否全天 + private Integer remindTime; // 提醒分钟 + private String location; // 日程地点 + private String createUser; // 创建账户 + private Date updateTime; // 更新时间 + + @ExcelFields({ + @ExcelField(title = "记录时间", attrName = "createTime", align = Align.CENTER, sort = 10, dataFormat = "yyyy-MM-dd hh:mm"), + @ExcelField(title = "日程主键", attrName = "scheduleId", align = Align.CENTER, sort = 20), + @ExcelField(title = "日程标题", attrName = "title", align = Align.CENTER, sort = 30), + @ExcelField(title = "日程内容", attrName = "content", align = Align.CENTER, sort = 40), + @ExcelField(title = "日程类型", attrName = "scheduleType", dictType = "schedule_type", align = Align.CENTER, sort = 50), + @ExcelField(title = "开始时间", attrName = "startTime", align = Align.CENTER, sort = 60, dataFormat = "yyyy-MM-dd hh:mm"), + @ExcelField(title = "结束时间", attrName = "endTime", align = Align.CENTER, sort = 70, dataFormat = "yyyy-MM-dd hh:mm"), + @ExcelField(title = "优先等级", attrName = "priority", dictType = "biz_priority", align = Align.CENTER, sort = 80), + @ExcelField(title = "日程状态", attrName = "ustatus", dictType = "work_status", align = Align.CENTER, sort = 90), + @ExcelField(title = "是否全天", attrName = "isAllDay", dictType = "all_days", align = Align.CENTER, sort = 100), + @ExcelField(title = "提醒分钟", attrName = "remindTime", align = Align.CENTER, sort = 110), + @ExcelField(title = "日程地点", attrName = "location", align = Align.CENTER, sort = 120), + @ExcelField(title = "创建账户", attrName = "createUser", align = Align.CENTER, sort = 130), + @ExcelField(title = "更新时间", attrName = "updateTime", align = Align.CENTER, sort = 140, dataFormat = "yyyy-MM-dd hh:mm"), + }) + public MySchedule() { + this(null); + } + + public MySchedule(String id) { + super(id); + } + + public Date getCreateTime_gte() { + return sqlMap.getWhere().getValue("create_time", QueryType.GTE); + } + + public void setCreateTime_gte(Date createTime) { + sqlMap.getWhere().and("create_time", QueryType.GTE, createTime); + } + + public Date getCreateTime_lte() { + return sqlMap.getWhere().getValue("create_time", QueryType.LTE); + } + + public void setCreateTime_lte(Date createTime) { + sqlMap.getWhere().and("create_time", QueryType.LTE, createTime); + } + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/service/MyMeetingInfoService.java b/web-api/src/main/java/com/jeesite/modules/biz/service/MyMeetingInfoService.java new file mode 100644 index 0000000..cf73448 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/service/MyMeetingInfoService.java @@ -0,0 +1,137 @@ +package com.jeesite.modules.biz.service; + +import java.util.List; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.jeesite.common.entity.Page; +import com.jeesite.common.service.CrudService; +import com.jeesite.modules.biz.entity.MyMeetingInfo; +import com.jeesite.modules.biz.dao.MyMeetingInfoDao; +import com.jeesite.common.service.ServiceException; +import com.jeesite.modules.file.utils.FileUploadUtils; +import com.jeesite.common.config.Global; +import com.jeesite.common.validator.ValidatorUtils; +import com.jeesite.common.utils.excel.ExcelImport; +import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; + +/** + * 会议 Service + * @author gaoxq + * @version 2026-03-29 + */ +@Service +public class MyMeetingInfoService extends CrudService { + + /** + * 获取单条数据 + * @param myMeetingInfo 主键 + */ + @Override + public MyMeetingInfo get(MyMeetingInfo myMeetingInfo) { + return super.get(myMeetingInfo); + } + + /** + * 查询分页数据 + * @param myMeetingInfo 查询条件 + * @param myMeetingInfo page 分页对象 + */ + @Override + public Page findPage(MyMeetingInfo myMeetingInfo) { + return super.findPage(myMeetingInfo); + } + + /** + * 查询列表数据 + * @param myMeetingInfo 查询条件 + */ + @Override + public List findList(MyMeetingInfo myMeetingInfo) { + return super.findList(myMeetingInfo); + } + + /** + * 保存数据(插入或更新) + * @param myMeetingInfo 数据对象 + */ + @Override + @Transactional + public void save(MyMeetingInfo myMeetingInfo) { + super.save(myMeetingInfo); + // 保存上传附件 + FileUploadUtils.saveFileUpload(myMeetingInfo, myMeetingInfo.getId(), "myMeetingInfo_file"); + } + + /** + * 导入数据 + * @param file 导入的数据文件 + */ + @Transactional + public String importData(MultipartFile file) { + if (file == null){ + throw new ServiceException(text("请选择导入的数据文件!")); + } + int successNum = 0; int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + try(ExcelImport ei = new ExcelImport(file, 2, 0)){ + List list = ei.getDataList(MyMeetingInfo.class); + for (MyMeetingInfo myMeetingInfo : list) { + try{ + ValidatorUtils.validateWithException(myMeetingInfo); + this.save(myMeetingInfo); + successNum++; + successMsg.append("
" + successNum + "、编号 " + myMeetingInfo.getId() + " 导入成功"); + } catch (Exception e) { + failureNum++; + String msg = "
" + failureNum + "、编号 " + myMeetingInfo.getId() + " 导入失败:"; + if (e instanceof ConstraintViolationException){ + ConstraintViolationException cve = (ConstraintViolationException)e; + for (ConstraintViolation violation : cve.getConstraintViolations()) { + msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")"; + } + }else{ + msg += e.getMessage(); + } + failureMsg.append(msg); + logger.error(msg, e); + } + } + } catch (Exception e) { + logger.error(e.getMessage(), e); + failureMsg.append(e.getMessage()); + return failureMsg.toString(); + } + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + }else{ + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + } + return successMsg.toString(); + } + + /** + * 更新状态 + * @param myMeetingInfo 数据对象 + */ + @Override + @Transactional + public void updateStatus(MyMeetingInfo myMeetingInfo) { + super.updateStatus(myMeetingInfo); + } + + /** + * 删除数据 + * @param myMeetingInfo 数据对象 + */ + @Override + @Transactional + public void delete(MyMeetingInfo myMeetingInfo) { + super.delete(myMeetingInfo); + } + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/service/MyScheduleService.java b/web-api/src/main/java/com/jeesite/modules/biz/service/MyScheduleService.java new file mode 100644 index 0000000..260c069 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/service/MyScheduleService.java @@ -0,0 +1,134 @@ +package com.jeesite.modules.biz.service; + +import java.util.List; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.jeesite.common.entity.Page; +import com.jeesite.common.service.CrudService; +import com.jeesite.modules.biz.entity.MySchedule; +import com.jeesite.modules.biz.dao.MyScheduleDao; +import com.jeesite.common.service.ServiceException; +import com.jeesite.common.config.Global; +import com.jeesite.common.validator.ValidatorUtils; +import com.jeesite.common.utils.excel.ExcelImport; +import org.springframework.web.multipart.MultipartFile; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; + +/** + * 日程 Service + * @author gaoxq + * @version 2026-03-29 + */ +@Service +public class MyScheduleService extends CrudService { + + /** + * 获取单条数据 + * @param mySchedule 主键 + */ + @Override + public MySchedule get(MySchedule mySchedule) { + return super.get(mySchedule); + } + + /** + * 查询分页数据 + * @param mySchedule 查询条件 + * @param mySchedule page 分页对象 + */ + @Override + public Page findPage(MySchedule mySchedule) { + return super.findPage(mySchedule); + } + + /** + * 查询列表数据 + * @param mySchedule 查询条件 + */ + @Override + public List findList(MySchedule mySchedule) { + return super.findList(mySchedule); + } + + /** + * 保存数据(插入或更新) + * @param mySchedule 数据对象 + */ + @Override + @Transactional + public void save(MySchedule mySchedule) { + super.save(mySchedule); + } + + /** + * 导入数据 + * @param file 导入的数据文件 + */ + @Transactional + public String importData(MultipartFile file) { + if (file == null){ + throw new ServiceException(text("请选择导入的数据文件!")); + } + int successNum = 0; int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + try(ExcelImport ei = new ExcelImport(file, 2, 0)){ + List list = ei.getDataList(MySchedule.class); + for (MySchedule mySchedule : list) { + try{ + ValidatorUtils.validateWithException(mySchedule); + this.save(mySchedule); + successNum++; + successMsg.append("
" + successNum + "、编号 " + mySchedule.getId() + " 导入成功"); + } catch (Exception e) { + failureNum++; + String msg = "
" + failureNum + "、编号 " + mySchedule.getId() + " 导入失败:"; + if (e instanceof ConstraintViolationException){ + ConstraintViolationException cve = (ConstraintViolationException)e; + for (ConstraintViolation violation : cve.getConstraintViolations()) { + msg += Global.getText(violation.getMessage()) + " ("+violation.getPropertyPath()+")"; + } + }else{ + msg += e.getMessage(); + } + failureMsg.append(msg); + logger.error(msg, e); + } + } + } catch (Exception e) { + logger.error(e.getMessage(), e); + failureMsg.append(e.getMessage()); + return failureMsg.toString(); + } + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + }else{ + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + } + return successMsg.toString(); + } + + /** + * 更新状态 + * @param mySchedule 数据对象 + */ + @Override + @Transactional + public void updateStatus(MySchedule mySchedule) { + super.updateStatus(mySchedule); + } + + /** + * 删除数据 + * @param mySchedule 数据对象 + */ + @Override + @Transactional + public void delete(MySchedule mySchedule) { + super.delete(mySchedule); + } + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/web/MyMeetingInfoController.java b/web-api/src/main/java/com/jeesite/modules/biz/web/MyMeetingInfoController.java new file mode 100644 index 0000000..028dcc1 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/web/MyMeetingInfoController.java @@ -0,0 +1,146 @@ +package com.jeesite.modules.biz.web; + +import java.util.List; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.jeesite.common.config.Global; +import com.jeesite.common.collect.ListUtils; +import com.jeesite.common.entity.Page; +import com.jeesite.common.lang.DateUtils; +import com.jeesite.common.utils.excel.ExcelExport; +import com.jeesite.common.utils.excel.annotation.ExcelField.Type; +import org.springframework.web.multipart.MultipartFile; +import com.jeesite.common.web.BaseController; +import com.jeesite.modules.biz.entity.MyMeetingInfo; +import com.jeesite.modules.biz.service.MyMeetingInfoService; + +/** + * 会议 Controller + * @author gaoxq + * @version 2026-03-29 + */ +@Controller +@RequestMapping(value = "${adminPath}/biz/myMeetingInfo") +public class MyMeetingInfoController extends BaseController { + + private final MyMeetingInfoService myMeetingInfoService; + + public MyMeetingInfoController(MyMeetingInfoService myMeetingInfoService) { + this.myMeetingInfoService = myMeetingInfoService; + } + + /** + * 获取数据 + */ + @ModelAttribute + public MyMeetingInfo get(String id, boolean isNewRecord) { + return myMeetingInfoService.get(id, isNewRecord); + } + + /** + * 查询列表 + */ + @RequiresPermissions("biz:myMeetingInfo:view") + @RequestMapping(value = {"list", ""}) + public String list(MyMeetingInfo myMeetingInfo, Model model) { + model.addAttribute("myMeetingInfo", myMeetingInfo); + return "modules/biz/myMeetingInfoList"; + } + + /** + * 查询列表数据 + */ + @RequiresPermissions("biz:myMeetingInfo:view") + @RequestMapping(value = "listData") + @ResponseBody + public Page listData(MyMeetingInfo myMeetingInfo, HttpServletRequest request, HttpServletResponse response) { + myMeetingInfo.setPage(new Page<>(request, response)); + Page page = myMeetingInfoService.findPage(myMeetingInfo); + return page; + } + + /** + * 查看编辑表单 + */ + @RequiresPermissions("biz:myMeetingInfo:view") + @RequestMapping(value = "form") + public String form(MyMeetingInfo myMeetingInfo, Model model) { + model.addAttribute("myMeetingInfo", myMeetingInfo); + return "modules/biz/myMeetingInfoForm"; + } + + /** + * 保存数据 + */ + @RequiresPermissions("biz:myMeetingInfo:edit") + @PostMapping(value = "save") + @ResponseBody + public String save(@Validated MyMeetingInfo myMeetingInfo) { + myMeetingInfoService.save(myMeetingInfo); + return renderResult(Global.TRUE, text("保存会议成功!")); + } + + /** + * 导出数据 + */ + @RequiresPermissions("biz:myMeetingInfo:view") + @RequestMapping(value = "exportData") + public void exportData(MyMeetingInfo myMeetingInfo, HttpServletResponse response) { + List list = myMeetingInfoService.findList(myMeetingInfo); + String fileName = "会议" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; + try(ExcelExport ee = new ExcelExport("会议", MyMeetingInfo.class)){ + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 下载模板 + */ + @RequiresPermissions("biz:myMeetingInfo:view") + @RequestMapping(value = "importTemplate") + public void importTemplate(HttpServletResponse response) { + MyMeetingInfo myMeetingInfo = new MyMeetingInfo(); + List list = ListUtils.newArrayList(myMeetingInfo); + String fileName = "会议模板.xlsx"; + try(ExcelExport ee = new ExcelExport("会议", MyMeetingInfo.class, Type.IMPORT)){ + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 导入数据 + */ + @ResponseBody + @RequiresPermissions("biz:myMeetingInfo:edit") + @PostMapping(value = "importData") + public String importData(MultipartFile file) { + try { + String message = myMeetingInfoService.importData(file); + return renderResult(Global.TRUE, "posfull:"+message); + } catch (Exception ex) { + return renderResult(Global.FALSE, "posfull:"+ex.getMessage()); + } + } + + /** + * 删除数据 + */ + @RequiresPermissions("biz:myMeetingInfo:edit") + @RequestMapping(value = "delete") + @ResponseBody + public String delete(MyMeetingInfo myMeetingInfo) { + myMeetingInfoService.delete(myMeetingInfo); + return renderResult(Global.TRUE, text("删除会议成功!")); + } + +} \ No newline at end of file diff --git a/web-api/src/main/java/com/jeesite/modules/biz/web/MyScheduleController.java b/web-api/src/main/java/com/jeesite/modules/biz/web/MyScheduleController.java new file mode 100644 index 0000000..35c3350 --- /dev/null +++ b/web-api/src/main/java/com/jeesite/modules/biz/web/MyScheduleController.java @@ -0,0 +1,154 @@ +package com.jeesite.modules.biz.web; + +import java.util.List; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.jeesite.common.config.Global; +import com.jeesite.common.collect.ListUtils; +import com.jeesite.common.entity.Page; +import com.jeesite.common.lang.DateUtils; +import com.jeesite.common.utils.excel.ExcelExport; +import com.jeesite.common.utils.excel.annotation.ExcelField.Type; +import org.springframework.web.multipart.MultipartFile; +import com.jeesite.common.web.BaseController; +import com.jeesite.modules.biz.entity.MySchedule; +import com.jeesite.modules.biz.service.MyScheduleService; + +/** + * 日程 Controller + * + * @author gaoxq + * @version 2026-03-29 + */ +@Controller +@RequestMapping(value = "${adminPath}/biz/mySchedule") +public class MyScheduleController extends BaseController { + + private final MyScheduleService myScheduleService; + + public MyScheduleController(MyScheduleService myScheduleService) { + this.myScheduleService = myScheduleService; + } + + /** + * 获取数据 + */ + @ModelAttribute + public MySchedule get(String scheduleId, boolean isNewRecord) { + return myScheduleService.get(scheduleId, isNewRecord); + } + + /** + * 查询列表 + */ + @RequiresPermissions("biz:mySchedule:view") + @RequestMapping(value = {"list", ""}) + public String list(MySchedule mySchedule, Model model) { + model.addAttribute("mySchedule", mySchedule); + return "modules/biz/myScheduleList"; + } + + /** + * 查询列表数据 + */ + @RequiresPermissions("biz:mySchedule:view") + @RequestMapping(value = "listData") + @ResponseBody + public Page listData(MySchedule mySchedule, HttpServletRequest request, HttpServletResponse response) { + mySchedule.setPage(new Page<>(request, response)); + Page page = myScheduleService.findPage(mySchedule); + return page; + } + + /** + * 查看编辑表单 + */ + @RequiresPermissions("biz:mySchedule:view") + @RequestMapping(value = "form") + public String form(MySchedule mySchedule, Model model) { + model.addAttribute("mySchedule", mySchedule); + return "modules/biz/myScheduleForm"; + } + + /** + * 保存数据 + */ + @RequiresPermissions("biz:mySchedule:edit") + @PostMapping(value = "save") + @ResponseBody + public String save(@Validated MySchedule mySchedule) { + myScheduleService.save(mySchedule); + return renderResult(Global.TRUE, text("保存日程成功!")); + } + + /** + * 导出数据 + */ + @RequiresPermissions("biz:mySchedule:view") + @RequestMapping(value = "exportData") + public void exportData(MySchedule mySchedule, HttpServletResponse response) { + List list = myScheduleService.findList(mySchedule); + String fileName = "日程" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; + try (ExcelExport ee = new ExcelExport("日程", MySchedule.class)) { + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 下载模板 + */ + @RequiresPermissions("biz:mySchedule:view") + @RequestMapping(value = "importTemplate") + public void importTemplate(HttpServletResponse response) { + MySchedule mySchedule = new MySchedule(); + List list = ListUtils.newArrayList(mySchedule); + String fileName = "日程模板.xlsx"; + try (ExcelExport ee = new ExcelExport("日程", MySchedule.class, Type.IMPORT)) { + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 导入数据 + */ + @ResponseBody + @RequiresPermissions("biz:mySchedule:edit") + @PostMapping(value = "importData") + public String importData(MultipartFile file) { + try { + String message = myScheduleService.importData(file); + return renderResult(Global.TRUE, "posfull:" + message); + } catch (Exception ex) { + return renderResult(Global.FALSE, "posfull:" + ex.getMessage()); + } + } + + /** + * 删除数据 + */ + @RequiresPermissions("biz:mySchedule:edit") + @RequestMapping(value = "delete") + @ResponseBody + public String delete(MySchedule mySchedule) { + myScheduleService.delete(mySchedule); + return renderResult(Global.TRUE, text("删除日程成功!")); + } + + @RequestMapping(value = "listAll") + @ResponseBody + public List listAll(MySchedule mySchedule) { + return myScheduleService.findList(mySchedule); + } + +} \ No newline at end of file diff --git a/web-api/src/main/resources/mappings/modules/biz/MyMeetingInfoDao.xml b/web-api/src/main/resources/mappings/modules/biz/MyMeetingInfoDao.xml new file mode 100644 index 0000000..55e14a3 --- /dev/null +++ b/web-api/src/main/resources/mappings/modules/biz/MyMeetingInfoDao.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/web-api/src/main/resources/mappings/modules/biz/MyScheduleDao.xml b/web-api/src/main/resources/mappings/modules/biz/MyScheduleDao.xml new file mode 100644 index 0000000..1189694 --- /dev/null +++ b/web-api/src/main/resources/mappings/modules/biz/MyScheduleDao.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/web-vue/packages/biz/api/biz/myMeetingInfo.ts b/web-vue/packages/biz/api/biz/myMeetingInfo.ts new file mode 100644 index 0000000..862e080 --- /dev/null +++ b/web-vue/packages/biz/api/biz/myMeetingInfo.ts @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013-Now https://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author gaoxq + */ +import { defHttp } from '@jeesite/core/utils/http/axios'; +import { useGlobSetting } from '@jeesite/core/hooks/setting'; +import { BasicModel, Page } from '@jeesite/core/api/model/baseModel'; +import { UploadApiResult } from '@jeesite/core/api/sys/upload'; +import { UploadFileParams } from '@jeesite/types/axios'; +import { AxiosProgressEvent } from 'axios'; + +const { ctxPath, adminPath } = useGlobSetting(); + +export interface MyMeetingInfo extends BasicModel { + createTime?: string; // 记录时间 + title: string; // 会议标题 + meetingCode: string; // 会议编号 + meetingContent: string; // 会议内容 + meetingUser: string; // 参会人员 + otherUser?: string; // 其他人员 + meetingType: string; // 会议类型 + startTime?: string; // 开始时间 + endTime?: string; // 结束时间 + meetingLocation: string; // 会议地点 + ustatus: string; // 会议状态 + remark?: string; // 备注说明 + createUser?: string; // 创建账户 + updateTime?: string; // 更新时间 +} + +export const myMeetingInfoList = (params?: MyMeetingInfo | any) => + defHttp.get({ url: adminPath + '/biz/myMeetingInfo/list', params }); + +export const myMeetingInfoListData = (params?: MyMeetingInfo | any) => + defHttp.post>({ url: adminPath + '/biz/myMeetingInfo/listData', params }); + +export const myMeetingInfoForm = (params?: MyMeetingInfo | any) => + defHttp.get({ url: adminPath + '/biz/myMeetingInfo/form', params }); + +export const myMeetingInfoSave = (params?: any, data?: MyMeetingInfo | any) => + defHttp.postJson({ url: adminPath + '/biz/myMeetingInfo/save', params, data }); + +export const myMeetingInfoImportData = ( + params: UploadFileParams, + onUploadProgress: (progressEvent: AxiosProgressEvent) => void, +) => + defHttp.uploadFile( + { + url: ctxPath + adminPath + '/biz/myMeetingInfo/importData', + onUploadProgress, + }, + params, + ); + +export const myMeetingInfoDelete = (params?: MyMeetingInfo | any) => + defHttp.get({ url: adminPath + '/biz/myMeetingInfo/delete', params }); diff --git a/web-vue/packages/biz/api/biz/mySchedule.ts b/web-vue/packages/biz/api/biz/mySchedule.ts new file mode 100644 index 0000000..07def2d --- /dev/null +++ b/web-vue/packages/biz/api/biz/mySchedule.ts @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2013-Now https://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * @author gaoxq + */ +import { defHttp } from '@jeesite/core/utils/http/axios'; +import { useGlobSetting } from '@jeesite/core/hooks/setting'; +import { BasicModel, Page } from '@jeesite/core/api/model/baseModel'; +import { UploadApiResult } from '@jeesite/core/api/sys/upload'; +import { UploadFileParams } from '@jeesite/types/axios'; +import { AxiosProgressEvent } from 'axios'; + +const { ctxPath, adminPath } = useGlobSetting(); + +export interface MySchedule extends BasicModel { + createTime?: string; // 记录时间 + scheduleId?: string; // 日程主键 + title: string; // 日程标题 + content: string; // 日程内容 + scheduleType: string; // 日程类型 + startTime?: string; // 开始时间 + endTime?: string; // 结束时间 + priority: string; // 优先等级 + ustatus: string; // 日程状态 + isAllDay: string; // 是否全天 + remindTime?: number; // 提醒分钟 + location?: string; // 日程地点 + createUser?: number; // 创建账户 + updateTime?: string; // 更新时间 +} + +export const myScheduleList = (params?: MySchedule | any) => + defHttp.get({ url: adminPath + '/biz/mySchedule/list', params }); + +export const myScheduleListAll = (params?: MySchedule | any) => + defHttp.get({ url: adminPath + '/biz/mySchedule/listAll', params }); + +export const myScheduleListData = (params?: MySchedule | any) => + defHttp.post>({ url: adminPath + '/biz/mySchedule/listData', params }); + +export const myScheduleForm = (params?: MySchedule | any) => + defHttp.get({ url: adminPath + '/biz/mySchedule/form', params }); + +export const myScheduleSave = (params?: any, data?: MySchedule | any) => + defHttp.postJson({ url: adminPath + '/biz/mySchedule/save', params, data }); + +export const myScheduleImportData = ( + params: UploadFileParams, + onUploadProgress: (progressEvent: AxiosProgressEvent) => void, +) => + defHttp.uploadFile( + { + url: ctxPath + adminPath + '/biz/mySchedule/importData', + onUploadProgress, + }, + params, + ); + +export const myScheduleDelete = (params?: MySchedule | any) => + defHttp.get({ url: adminPath + '/biz/mySchedule/delete', params }); diff --git a/web-vue/packages/biz/views/biz/myMeetingInfo/form.vue b/web-vue/packages/biz/views/biz/myMeetingInfo/form.vue new file mode 100644 index 0000000..39c0ead --- /dev/null +++ b/web-vue/packages/biz/views/biz/myMeetingInfo/form.vue @@ -0,0 +1,228 @@ + + + diff --git a/web-vue/packages/biz/views/biz/myMeetingInfo/list.vue b/web-vue/packages/biz/views/biz/myMeetingInfo/list.vue new file mode 100644 index 0000000..a924e11 --- /dev/null +++ b/web-vue/packages/biz/views/biz/myMeetingInfo/list.vue @@ -0,0 +1,293 @@ + + + diff --git a/web-vue/packages/biz/views/biz/myNotes/form.vue b/web-vue/packages/biz/views/biz/myNotes/form.vue index a578016..b68392d 100644 --- a/web-vue/packages/biz/views/biz/myNotes/form.vue +++ b/web-vue/packages/biz/views/biz/myNotes/form.vue @@ -135,9 +135,6 @@ label: t('便签内容'), field: 'content', component: 'InputTextArea', - componentProps: { - maxlength: 9000, - }, slot: 'remarks', required: true, colProps: { md: 24, lg: 24 }, diff --git a/web-vue/packages/biz/views/biz/myNoticeTodo/form.vue b/web-vue/packages/biz/views/biz/myNoticeTodo/form.vue index 5997a2a..9db6477 100644 --- a/web-vue/packages/biz/views/biz/myNoticeTodo/form.vue +++ b/web-vue/packages/biz/views/biz/myNoticeTodo/form.vue @@ -39,6 +39,10 @@ import { WangEditor } from '@jeesite/core/components/WangEditor'; import { MyNoticeTodo, myNoticeTodoSave, myNoticeTodoForm } from '@jeesite/biz/api/biz/myNoticeTodo'; import { formatToDateTime } from '@jeesite/core/utils/dateUtil'; + import { useUserStore } from '@jeesite/core/store/modules/user'; + + const userStore = useUserStore(); + const userinfo = computed(() => userStore.getUserInfo); const emit = defineEmits(['success', 'register']); @@ -153,6 +157,10 @@ id: record.value.id || data.id, }; + if(record.value.isNewRecord){ + data.createUser = userinfo.value.loginCode; + } + data[record.value.isNewRecord ? 'createTime' : 'updateTime'] = formatToDateTime(new Date()); // console.log('submit', params, data, record); diff --git a/web-vue/packages/biz/views/biz/mySchedule/form.vue b/web-vue/packages/biz/views/biz/mySchedule/form.vue new file mode 100644 index 0000000..ebb4d14 --- /dev/null +++ b/web-vue/packages/biz/views/biz/mySchedule/form.vue @@ -0,0 +1,195 @@ + + + diff --git a/web-vue/packages/biz/views/biz/mySchedule/list.vue b/web-vue/packages/biz/views/biz/mySchedule/list.vue new file mode 100644 index 0000000..e3bff7f --- /dev/null +++ b/web-vue/packages/biz/views/biz/mySchedule/list.vue @@ -0,0 +1,303 @@ + + + diff --git a/web-vue/packages/core/layouts/views/desktop/workbench/components/ScheduleInfo.vue b/web-vue/packages/core/layouts/views/desktop/workbench/components/ScheduleInfo.vue new file mode 100644 index 0000000..6858a81 --- /dev/null +++ b/web-vue/packages/core/layouts/views/desktop/workbench/components/ScheduleInfo.vue @@ -0,0 +1,815 @@ + + + + + diff --git a/web-vue/packages/core/layouts/views/desktop/workbench/index.vue b/web-vue/packages/core/layouts/views/desktop/workbench/index.vue index 0e1e7b1..fb12ef6 100644 --- a/web-vue/packages/core/layouts/views/desktop/workbench/index.vue +++ b/web-vue/packages/core/layouts/views/desktop/workbench/index.vue @@ -10,7 +10,7 @@
- 上右 +
@@ -26,6 +26,7 @@ import { PageWrapper } from '@jeesite/core/components/Page'; import WorkbenchHeader from './components/WorkbenchHeader.vue'; import NoteInfo from './components/NoteInfo.vue'; + import ScheduleInfo from './components/ScheduleInfo.vue'; const loading = ref(true); setTimeout(() => {