diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysRemindController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysRemindController.java new file mode 100644 index 00000000..a5ab174d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysRemindController.java @@ -0,0 +1,243 @@ +package com.ruoyi.system.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.ruoyi.common.constant.BusinessKeysConstants; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.process.todoitem.domain.BizTodoItem; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.SysRemind; +import com.ruoyi.system.service.ISysRemindService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +import javax.servlet.http.HttpServletRequest; + +/** + * 系统提醒Controller + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +@Controller +@RequestMapping("/system/remind") +public class SysRemindController extends BaseController +{ + private String prefix = "system/remind"; + + @Autowired + private ISysRemindService sysRemindService; + + @GetMapping() + public String remind() + { + return prefix + "/remind"; + } + + /** + * 查询系统提醒列表 + */ + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysRemind sysRemind) + { + startPage(); + List list = sysRemindService.selectSysRemindList(sysRemind); + return getDataTable(list); + } + + /** + * 系统提醒不分页 + * */ + @RequestMapping("/getRemindListNoPaging") + @ResponseBody + public List getRemindListNoPaging(HttpServletRequest request) { + Map paraMap = new HashMap(); + paraMap.put("receiverUser", ShiroUtils.getLoginName()); + // 待办参数 + paraMap.put("isHandle","0"); + List list = sysRemindService.selectUnHandleSysRemindList(paraMap); + + list.forEach(item->{ + if (BusinessKeysConstants.ERP_DEVELOPMENT_MODIFY.equals(item.getModule())){ + item.setModule("开发修改单"); + } + if (BusinessKeysConstants.WAREHOUSE_INQUIRY.equals(item.getModule())){ + item.setModule("仓库库存查询"); + } + }); + return list; + } + + + /** + * 导出系统提醒列表 + */ + @Log(title = "系统提醒", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysRemind sysRemind) + { + List list = sysRemindService.selectSysRemindList(sysRemind); + ExcelUtil util = new ExcelUtil(SysRemind.class); + return util.exportExcel(list, "系统提醒数据"); + } + + /** + * 新增系统提醒 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.insertSysRemind(sysRemind)); + } + + + /** + * 处理系统提醒 + */ + @GetMapping("/handle/{remindId}") + @ResponseBody // 确保返回的是JSON格式的数据 + public Map handle(@PathVariable("remindId") Long remindId) { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + String moduleUrl = sysRemind.getModuleUrl(); + + Map result = new HashMap<>(); + result.put("url", moduleUrl); + + return result; + } + + /** + * 修改系统提醒手动确认处理 + */ + @GetMapping("/manualHandle/{remindId}") + public String manualHandle(@PathVariable("remindId") Long remindId, ModelMap mmap) + { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + + mmap.put("sysRemind", sysRemind); + return prefix + "/manualHandle"; + } + + /** + * 修改保存系统提醒手动确认处理 + */ + @Log(title = "系统提醒", businessType = BusinessType.UPDATE) + @PostMapping("/manualHandle") + @ResponseBody + public AjaxResult manualHandleSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.updateManualHandleSysRemind(sysRemind)); + } + + + + /** + * 修改系统提醒 + */ + @GetMapping("/edit/{remindId}") + public String edit(@PathVariable("remindId") Long remindId, ModelMap mmap) + { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + + mmap.put("sysRemind", sysRemind); + return prefix + "/edit"; + } + + /** + * 修改保存系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.updateSysRemind(sysRemind)); + } + + + + /** + * 修改系统提醒详情 + */ + @GetMapping("/detail/{remindId}") + public String detail(@PathVariable("remindId") Long remindId, ModelMap mmap) + { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + mmap.put("sysRemind", sysRemind); + return prefix + "/detail"; + } + + /** + * 修改保存系统提醒详情 + */ + @Log(title = "系统提醒", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.detailSysRemind(sysRemind)); + } + + + + /** + * 删除系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysRemindService.deleteSysRemindByIds(ids)); + } + + /** + * 作废系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(sysRemindService.cancelSysRemindById(id)); + } + + /** + * 恢复系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(sysRemindService.restoreSysRemindById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysRemind.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysRemind.java new file mode 100644 index 00000000..33a0e54b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysRemind.java @@ -0,0 +1,265 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 系统提醒对象 sys_remind + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +public class SysRemind extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 提醒表Id */ + private Long remindId; + + /** 提醒人ID */ + private Long remindUserId; + + /** 提醒人 */ + @Excel(name = "提醒人") + private String remindUser; + + /** 提醒人部门ID */ + private Long remindDeptId; + + /** 接受人ID */ + private Long receiverUserId; + + /** 接受人 */ + @Excel(name = "接受人") + private String receiverUser; + + /** 接受人部门ID */ + private Long receiverDeptId; + + + /** 处理人ID */ + private Long handleUserId; + + /** 处理人 */ + @Excel(name = "处理人") + private String handleUser; + + /** 处理人部门ID */ + private Long handleDeptId; + + + + + /** 提醒时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "提醒时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date remindTime; + + /** 处理时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date handleTime; + + /** 提醒内容 */ + @Excel(name = "提醒内容") + private String remindContent; + + /** 模块名称 存储的数据来自BusinessKeysConstants常量类 */ + private String module; + + /** 模块url */ + @Excel(name = "模块url") + private String moduleUrl; + + /** 是否查看 default 0 (0 否 1 是) */ + @Excel(name = "是否查看",dictType = "yes_or_no") + private String isView; + + /** 是否处理 default 0 (0 否 1 是) */ + @Excel(name = "是否处理",dictType = "yes_or_no") + private String isHandle; + + public void setRemindId(Long remindId) + { + this.remindId = remindId; + } + + public Long getRemindId() + { + return remindId; + } + public void setRemindUserId(Long remindUserId) + { + this.remindUserId = remindUserId; + } + + public Long getRemindUserId() + { + return remindUserId; + } + public void setRemindUser(String remindUser) + { + this.remindUser = remindUser; + } + + public String getRemindUser() + { + return remindUser; + } + public void setRemindDeptId(Long remindDeptId) + { + this.remindDeptId = remindDeptId; + } + + public Long getRemindDeptId() + { + return remindDeptId; + } + public void setReceiverUserId(Long receiverUserId) + { + this.receiverUserId = receiverUserId; + } + + public Long getReceiverUserId() + { + return receiverUserId; + } + public void setReceiverUser(String receiverUser) + { + this.receiverUser = receiverUser; + } + + public String getReceiverUser() + { + return receiverUser; + } + public void setReceiverDeptId(Long receiverDeptId) + { + this.receiverDeptId = receiverDeptId; + } + + public Long getReceiverDeptId() + { + return receiverDeptId; + } + + public Long getHandleUserId() { + return handleUserId; + } + + public void setHandleUserId(Long handleUserId) { + this.handleUserId = handleUserId; + } + + public String getHandleUser() { + return handleUser; + } + + public void setHandleUser(String handleUser) { + this.handleUser = handleUser; + } + + public Long getHandleDeptId() { + return handleDeptId; + } + + public void setHandleDeptId(Long handleDeptId) { + this.handleDeptId = handleDeptId; + } + + public void setRemindTime(Date remindTime) + { + this.remindTime = remindTime; + } + + public Date getRemindTime() + { + return remindTime; + } + public void setHandleTime(Date handleTime) + { + this.handleTime = handleTime; + } + + public Date getHandleTime() + { + return handleTime; + } + public void setRemindContent(String remindContent) + { + this.remindContent = remindContent; + } + + public String getRemindContent() + { + return remindContent; + } + public void setModule(String module) + { + this.module = module; + } + + public String getModule() + { + return module; + } + public void setModuleUrl(String moduleUrl) + { + this.moduleUrl = moduleUrl; + } + + public String getModuleUrl() + { + return moduleUrl; + } + public void setIsView(String isView) + { + this.isView = isView; + } + + public String getIsView() + { + return isView; + } + public void setIsHandle(String isHandle) + { + this.isHandle = isHandle; + } + + public String getIsHandle() + { + return isHandle; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("remindId", getRemindId()) + .append("remindUserId", getRemindUserId()) + .append("remindUser", getRemindUser()) + .append("remindDeptId", getRemindDeptId()) + .append("receiverUserId", getReceiverUserId()) + .append("receiverUser", getReceiverUser()) + .append("receiverDeptId", getReceiverDeptId()) + .append("handleUserId", getHandleUserId()) + .append("handleUser", getHandleUser()) + .append("handleDeptId", getHandleDeptId()) + .append("remindTime", getRemindTime()) + .append("handleTime", getHandleTime()) + .append("remindContent", getRemindContent()) + .append("module", getModule()) + .append("moduleUrl", getModuleUrl()) + .append("isView", getIsView()) + .append("isHandle", getIsHandle()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysRemindMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysRemindMapper.java new file mode 100644 index 00000000..2cbe0fdb --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysRemindMapper.java @@ -0,0 +1,81 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.system.domain.SysRemind; + +/** + * 系统提醒Mapper接口 + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +public interface SysRemindMapper +{ + /** + * 查询系统提醒 + * + * @param remindId 系统提醒ID + * @return 系统提醒 + */ + public SysRemind selectSysRemindById(Long remindId); + + /** + * 查询系统提醒列表 + * + * @param sysRemind 系统提醒 + * @return 系统提醒集合 + */ + public List selectSysRemindList(SysRemind sysRemind); + + /** + * 新增系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int insertSysRemind(SysRemind sysRemind); + + /** + * 修改系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int updateSysRemind(SysRemind sysRemind); + + /** + * 删除系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int deleteSysRemindById(Long remindId); + + /** + * 批量删除系统提醒 + * + * @param remindIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSysRemindByIds(String[] remindIds); + + /** + * 作废系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int cancelSysRemindById(Long remindId); + + /** + * 恢复系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int restoreSysRemindById(Long remindId); + + List selectUnHandleSysRemindList(Map paraMap); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysRemindService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysRemindService.java new file mode 100644 index 00000000..f226c6bf --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysRemindService.java @@ -0,0 +1,92 @@ +package com.ruoyi.system.service; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.system.domain.SysRemind; + +/** + * 系统提醒Service接口 + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +public interface ISysRemindService +{ + /** + * 查询系统提醒 + * + * @param remindId 系统提醒ID + * @return 系统提醒 + */ + public SysRemind selectSysRemindById(Long remindId); + + /** + * 查询系统提醒列表 + * + * @param sysRemind 系统提醒 + * @return 系统提醒集合 + */ + public List selectSysRemindList(SysRemind sysRemind); + + /** + * 新增系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int insertSysRemind(SysRemind sysRemind); + + /** + * 修改系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int updateSysRemind(SysRemind sysRemind); + + /** + * 批量删除系统提醒 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysRemindByIds(String ids); + + /** + * 删除系统提醒信息 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int deleteSysRemindById(Long remindId); + + /** + * 作废系统提醒 + * @param remindId 系统提醒ID + * @return + */ + int cancelSysRemindById(Long remindId); + + /** + * 恢复系统提醒 + * @param remindId 系统提醒ID + * @return + */ + int restoreSysRemindById(Long remindId); + + /** + * 查询待处理的提醒项列表 + * */ + List selectUnHandleSysRemindList(Map paraMap); + + /** + * 通用保存系统提醒详情 + * */ + int detailSysRemind(SysRemind sysRemind); + + /** + * 手动处理系统提醒 + * */ + int updateManualHandleSysRemind(SysRemind sysRemind); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysRemindServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysRemindServiceImpl.java new file mode 100644 index 00000000..0e0871bc --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysRemindServiceImpl.java @@ -0,0 +1,165 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.SysRemindMapper; +import com.ruoyi.system.domain.SysRemind; +import com.ruoyi.system.service.ISysRemindService; +import com.ruoyi.common.core.text.Convert; + +/** + * 系统提醒Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +@Service +public class SysRemindServiceImpl implements ISysRemindService +{ + @Autowired + private SysRemindMapper sysRemindMapper; + + /** + * 查询系统提醒 + * + * @param remindId 系统提醒ID + * @return 系统提醒 + */ + @Override + public SysRemind selectSysRemindById(Long remindId) + { + return sysRemindMapper.selectSysRemindById(remindId); + } + + /** + * 查询系统提醒列表 + * + * @param sysRemind 系统提醒 + * @return 系统提醒 + */ + @Override + public List selectSysRemindList(SysRemind sysRemind) + { + return sysRemindMapper.selectSysRemindList(sysRemind); + } + + /** + * 查询未处理系统提醒列表 + * + * @param paraMap 系统提醒 + * @return 系统提醒 + */ + @Override + public List selectUnHandleSysRemindList(Map paraMap) { + List list = sysRemindMapper.selectUnHandleSysRemindList(paraMap); + return list; + } + + /** + * 新增系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + @Override + public int insertSysRemind(SysRemind sysRemind) + { + String loginName = ShiroUtils.getLoginName(); + sysRemind.setCreateBy(loginName); + sysRemind.setCreateTime(DateUtils.getNowDate()); + return sysRemindMapper.insertSysRemind(sysRemind); + } + + /** + * 修改系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + @Override + public int updateSysRemind(SysRemind sysRemind) + { + String loginName = ShiroUtils.getLoginName(); + sysRemind.setUpdateBy(loginName); + sysRemind.setUpdateTime(DateUtils.getNowDate()); + return sysRemindMapper.updateSysRemind(sysRemind); + } + + + /** + * 手动处理系统提醒 + * */ + @Override + public int updateManualHandleSysRemind(SysRemind sysRemind) { + + String loginName = ShiroUtils.getLoginName(); + sysRemind.setHandleTime(DateUtils.getNowDate()); + sysRemind.setIsHandle("1"); + sysRemind.setIsView("1"); + sysRemind.setHandleUser(loginName); + sysRemind.setUpdateBy(loginName); + sysRemind.setUpdateTime(DateUtils.getNowDate()); + return sysRemindMapper.updateSysRemind(sysRemind); + } + + /** + * 通用保存系统详情 + * */ + @Override + public int detailSysRemind(SysRemind sysRemind) { + return 1; + } + + /** + * 删除系统提醒对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysRemindByIds(String ids) + { + return sysRemindMapper.deleteSysRemindByIds(Convert.toStrArray(ids)); + } + + /** + * 删除系统提醒信息 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + @Override + public int deleteSysRemindById(Long remindId) + { + return sysRemindMapper.deleteSysRemindById(remindId); + } + + /** + * 作废系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + @Override + public int cancelSysRemindById(Long remindId) + { + return sysRemindMapper.cancelSysRemindById(remindId); + } + + /** + * 恢复系统提醒信息 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + @Override + public int restoreSysRemindById(Long remindId) + { + return sysRemindMapper.restoreSysRemindById(remindId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysRemindMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysRemindMapper.xml new file mode 100644 index 00000000..939e5d2d --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/system/SysRemindMapper.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select remind_id, remind_user_id, remind_user, remind_dept_id, receiver_user_id, receiver_user, receiver_dept_id, handle_user_id, handle_user, handle_dept_id,remind_time, handle_time, remind_content, module, module_url, is_view, is_handle, create_by, create_time, update_by, update_time, remark from sys_remind + + + + + + + + + + insert into sys_remind + + remind_user_id, + remind_user, + remind_dept_id, + receiver_user_id, + receiver_user, + receiver_dept_id, + handle_user_id, + handle_user, + handle_dept_id, + remind_time, + handle_time, + remind_content, + module, + module_url, + is_view, + is_handle, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{remindUserId}, + #{remindUser}, + #{remindDeptId}, + #{receiverUserId}, + #{receiverUser}, + #{receiverDeptId}, + #{handleUserId}, + #{handleUser}, + #{handleDeptId}, + #{remindTime}, + #{handleTime}, + #{remindContent}, + #{module}, + #{moduleUrl}, + #{isView}, + #{isHandle}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_remind + + remind_user_id = #{remindUserId}, + remind_user = #{remindUser}, + remind_dept_id = #{remindDeptId}, + receiver_user_id = #{receiverUserId}, + receiver_user = #{receiverUser}, + receiver_dept_id = #{receiverDeptId}, + handle_user_id = #{handleUserId}, + handle_user = #{handleUser}, + handle_dept_id = #{handleDeptId}, + remind_time = #{remindTime}, + handle_time = #{handleTime}, + remind_content = #{remindContent}, + module = #{module}, + module_url = #{moduleUrl}, + is_view = #{isView}, + is_handle = #{isHandle}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where remind_id = #{remindId} + + + + delete from sys_remind where remind_id = #{remindId} + + + + delete from sys_remind where remind_id in + + #{remindId} + + + + + update sys_remind set del_flag = '1' where remind_id = #{remindId} + + + + update sys_remind set del_flag = '0' where remind_id = #{remindId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 4285a320..4c43278a 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -167,17 +167,14 @@
消息提醒
你有提醒 - -
  • 新的提醒

  • -
- + @@ -200,7 +197,7 @@
  • 个人中心
  • -
  • 我的提醒
  • +
  • 我的提醒
  • 我的待办
  • 我的已办
  • @@ -423,40 +420,45 @@ //获取我的提醒 function getRemind() { $.ajax({ - url: ctx + 'remind/getRemindListNoPaging',//地址 + url: ctx + 'system/remind/getRemindListNoPaging', // 地址 success: function (data, status) { - //alert(data); if (status == 'success') { $("#remindList").empty(); + if (data.length > 0) { - if (data.length > 10) {$("#remindBadge").text('10+');} - else {$("#remindSize").text(data.length + "项新");} - $("#remindBadge2").append("" + data.length + "") - } else if (data.length == 0) { + let remindCount = data.length > 10 ? '10+' : data.length; + $("#remindBadge").text(remindCount); + $("#remindSize").text(remindCount + "项新"); + $("#remindBadge2").html("" + data.length + ""); + } else { $("#remindBadge").text(''); $("#remindBadge2 span").remove(); + $("#remindSize").text("0项新"); } - if (data.length > 10) { - $("#remindSize").text('10+' + "项新"); - } else {$("#remindSize").text(data.length + "项新");} - for (var i = 0; i < data.length; i++) { + + for (var i = 0; i < Math.min(data.length, 10); i++) { // 只显示最多10条提醒 var obj = data[i]; - var offset = transDate(obj.remindDate) + var remindTime = transDate(obj.remindTime); + var module = obj.module || '未知模块'; // 防止module为空时显示默认值 var url = ctx + "remind/view/" + obj.id; - $("#remindList").append( - "
  • " + - " " + - "" + offset + " " + - " " + - " " + - obj.formName + - "" + - "" + - "
  • "); + + // 使用模板字符串构建HTML,增强可读性 + var listItem = ` +
  • + + ${remindTime} + + + 你有一项来自 "${module}" 的提醒 + + +
  • `; + + $("#remindList").append(listItem); } } } - }) + }); } // 计算耗时 diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/add.html b/ruoyi-admin/src/main/resources/templates/system/remind/add.html new file mode 100644 index 00000000..5265b7c4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/add.html @@ -0,0 +1,171 @@ + + + + + + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/detail.html b/ruoyi-admin/src/main/resources/templates/system/remind/detail.html new file mode 100644 index 00000000..5c67ccdf --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/detail.html @@ -0,0 +1,84 @@ + + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/edit.html b/ruoyi-admin/src/main/resources/templates/system/remind/edit.html new file mode 100644 index 00000000..ef6a8690 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/edit.html @@ -0,0 +1,77 @@ + + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/manualHandle.html b/ruoyi-admin/src/main/resources/templates/system/remind/manualHandle.html new file mode 100644 index 00000000..7bf0ec31 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/manualHandle.html @@ -0,0 +1,47 @@ + + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/remind.html b/ruoyi-admin/src/main/resources/templates/system/remind/remind.html new file mode 100644 index 00000000..a6b98ab1 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/remind.html @@ -0,0 +1,158 @@ + + + + + + +
    +
    +
    +
    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • +  搜索 +  重置 +
    • +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java index 4e22758f..f36db051 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java @@ -26,4 +26,10 @@ public class BusinessKeysConstants { /** 基础资料汇率管理*/ public static final String SYS_EXCHANGE_RATE = "5"; + /** 工程开发修改单信息 */ + public static final String ERP_DEVELOPMENT_MODIFY = "6"; + + /** 仓库库存查询信息*/ + public static final String WAREHOUSE_INQUIRY = "7"; + }