Browse Source
新增通用提醒表sys_remind 新增通用提醒domian 新增通用提醒Mapper 新增通用提醒Mapper.xml 新增通用提醒Service 新增通用提醒ServiceImpl 新增通用提醒Controller 新增通用提醒add.html 新增通用提醒edit.html 新增通用提醒detail.html 新增通用提醒manualHandle.html 业务模块常量类:新增工程开发修改单信息和仓库库存查询信息分别对应6和7 系统提醒Controller层新增:系统提醒不分页接口,处理系统提醒接口,修改系统提醒手动确认处理接口,修改保存系统提醒手动确认处理接口 前端通用index.html文件;修改我的提醒功能,按照一定的格式展示提醒的数据,查看全部新增跳转到提醒列表页面;dev
13 changed files with 1572 additions and 29 deletions
@ -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<SysRemind> list = sysRemindService.selectSysRemindList(sysRemind); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 系统提醒不分页 |
|||
* */ |
|||
@RequestMapping("/getRemindListNoPaging") |
|||
@ResponseBody |
|||
public List<SysRemind> getRemindListNoPaging(HttpServletRequest request) { |
|||
Map<String, Object> paraMap = new HashMap<String, Object>(); |
|||
paraMap.put("receiverUser", ShiroUtils.getLoginName()); |
|||
// 待办参数
|
|||
paraMap.put("isHandle","0"); |
|||
List<SysRemind> 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<SysRemind> list = sysRemindService.selectSysRemindList(sysRemind); |
|||
ExcelUtil<SysRemind> util = new ExcelUtil<SysRemind>(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<String, Object> handle(@PathVariable("remindId") Long remindId) { |
|||
SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); |
|||
String moduleUrl = sysRemind.getModuleUrl(); |
|||
|
|||
Map<String, Object> 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)); |
|||
} |
|||
|
|||
|
|||
} |
@ -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(); |
|||
} |
|||
} |
@ -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<SysRemind> 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<SysRemind> selectUnHandleSysRemindList(Map<String, Object> paraMap); |
|||
} |
@ -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<SysRemind> 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<SysRemind> selectUnHandleSysRemindList(Map<String, Object> paraMap); |
|||
|
|||
/** |
|||
* 通用保存系统提醒详情 |
|||
* */ |
|||
int detailSysRemind(SysRemind sysRemind); |
|||
|
|||
/** |
|||
* 手动处理系统提醒 |
|||
* */ |
|||
int updateManualHandleSysRemind(SysRemind sysRemind); |
|||
} |
@ -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<SysRemind> selectSysRemindList(SysRemind sysRemind) |
|||
{ |
|||
return sysRemindMapper.selectSysRemindList(sysRemind); |
|||
} |
|||
|
|||
/** |
|||
* 查询未处理系统提醒列表 |
|||
* |
|||
* @param paraMap 系统提醒 |
|||
* @return 系统提醒 |
|||
*/ |
|||
@Override |
|||
public List<SysRemind> selectUnHandleSysRemindList(Map<String, Object> paraMap) { |
|||
List<SysRemind> 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); |
|||
} |
|||
} |
@ -0,0 +1,152 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.system.mapper.SysRemindMapper"> |
|||
|
|||
<resultMap type="SysRemind" id="SysRemindResult"> |
|||
<result property="remindId" column="remind_id" /> |
|||
<result property="remindUserId" column="remind_user_id" /> |
|||
<result property="remindUser" column="remind_user" /> |
|||
<result property="remindDeptId" column="remind_dept_id" /> |
|||
<result property="receiverUserId" column="receiver_user_id" /> |
|||
<result property="receiverUser" column="receiver_user" /> |
|||
<result property="receiverDeptId" column="receiver_dept_id" /> |
|||
<result property="handleUserId" column="handle_user_id" /> |
|||
<result property="handleUser" column="handle_user" /> |
|||
<result property="handleDeptId" column="handle_dept_id" /> |
|||
<result property="remindTime" column="remind_time" /> |
|||
<result property="handleTime" column="handle_time" /> |
|||
<result property="remindContent" column="remind_content" /> |
|||
<result property="module" column="module" /> |
|||
<result property="moduleUrl" column="module_url" /> |
|||
<result property="isView" column="is_view" /> |
|||
<result property="isHandle" column="is_handle" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="update_time" /> |
|||
<result property="remark" column="remark" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectSysRemindVo"> |
|||
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 |
|||
</sql> |
|||
|
|||
<select id="selectSysRemindList" parameterType="SysRemind" resultMap="SysRemindResult"> |
|||
<include refid="selectSysRemindVo"/> |
|||
<where> |
|||
<if test="isView != null and isView != ''"> and is_view = #{isView}</if> |
|||
<if test="isHandle != null and isHandle != ''"> and is_handle = #{isHandle}</if> |
|||
<if test="createTime != null "> and create_time = #{createTime}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSysRemindById" parameterType="Long" resultMap="SysRemindResult"> |
|||
<include refid="selectSysRemindVo"/> |
|||
where remind_id = #{remindId} |
|||
</select> |
|||
|
|||
<select id="selectUnHandleSysRemindList" parameterType="map" resultMap="SysRemindResult"> |
|||
<include refid="selectSysRemindVo"/> |
|||
where receiver_user = #{receiverUser} and is_handle = #{isHandle} |
|||
</select> |
|||
|
|||
<insert id="insertSysRemind" parameterType="SysRemind" useGeneratedKeys="true" keyProperty="remindId"> |
|||
insert into sys_remind |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="remindUserId != null">remind_user_id,</if> |
|||
<if test="remindUser != null">remind_user,</if> |
|||
<if test="remindDeptId != null">remind_dept_id,</if> |
|||
<if test="receiverUserId != null">receiver_user_id,</if> |
|||
<if test="receiverUser != null">receiver_user,</if> |
|||
<if test="receiverDeptId != null">receiver_dept_id,</if> |
|||
<if test="handleUserId != null">handle_user_id,</if> |
|||
<if test="handleUser != null">handle_user,</if> |
|||
<if test="handleDeptId != null">handle_dept_id,</if> |
|||
<if test="remindTime != null">remind_time,</if> |
|||
<if test="handleTime != null">handle_time,</if> |
|||
<if test="remindContent != null">remind_content,</if> |
|||
<if test="module != null">module,</if> |
|||
<if test="moduleUrl != null">module_url,</if> |
|||
<if test="isView != null">is_view,</if> |
|||
<if test="isHandle != null">is_handle,</if> |
|||
<if test="createBy != null">create_by,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
<if test="updateBy != null">update_by,</if> |
|||
<if test="updateTime != null">update_time,</if> |
|||
<if test="remark != null">remark,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="remindUserId != null">#{remindUserId},</if> |
|||
<if test="remindUser != null">#{remindUser},</if> |
|||
<if test="remindDeptId != null">#{remindDeptId},</if> |
|||
<if test="receiverUserId != null">#{receiverUserId},</if> |
|||
<if test="receiverUser != null">#{receiverUser},</if> |
|||
<if test="receiverDeptId != null">#{receiverDeptId},</if> |
|||
<if test="handleUserId != null">#{handleUserId},</if> |
|||
<if test="handleUser != null">#{handleUser},</if> |
|||
<if test="handleDeptId != null">#{handleDeptId},</if> |
|||
<if test="remindTime != null">#{remindTime},</if> |
|||
<if test="handleTime != null">#{handleTime},</if> |
|||
<if test="remindContent != null">#{remindContent},</if> |
|||
<if test="module != null">#{module},</if> |
|||
<if test="moduleUrl != null">#{moduleUrl},</if> |
|||
<if test="isView != null">#{isView},</if> |
|||
<if test="isHandle != null">#{isHandle},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="remark != null">#{remark},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSysRemind" parameterType="SysRemind"> |
|||
update sys_remind |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="remindUserId != null">remind_user_id = #{remindUserId},</if> |
|||
<if test="remindUser != null">remind_user = #{remindUser},</if> |
|||
<if test="remindDeptId != null">remind_dept_id = #{remindDeptId},</if> |
|||
<if test="receiverUserId != null">receiver_user_id = #{receiverUserId},</if> |
|||
<if test="receiverUser != null">receiver_user = #{receiverUser},</if> |
|||
<if test="receiverDeptId != null">receiver_dept_id = #{receiverDeptId},</if> |
|||
<if test="handleUserId != null">handle_user_id = #{handleUserId},</if> |
|||
<if test="handleUser != null">handle_user = #{handleUser},</if> |
|||
<if test="handleDeptId != null">handle_dept_id = #{handleDeptId},</if> |
|||
<if test="remindTime != null">remind_time = #{remindTime},</if> |
|||
<if test="handleTime != null">handle_time = #{handleTime},</if> |
|||
<if test="remindContent != null">remind_content = #{remindContent},</if> |
|||
<if test="module != null">module = #{module},</if> |
|||
<if test="moduleUrl != null">module_url = #{moduleUrl},</if> |
|||
<if test="isView != null">is_view = #{isView},</if> |
|||
<if test="isHandle != null">is_handle = #{isHandle},</if> |
|||
<if test="createBy != null">create_by = #{createBy},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
<if test="updateBy != null">update_by = #{updateBy},</if> |
|||
<if test="updateTime != null">update_time = #{updateTime},</if> |
|||
<if test="remark != null">remark = #{remark},</if> |
|||
</trim> |
|||
where remind_id = #{remindId} |
|||
</update> |
|||
|
|||
<delete id="deleteSysRemindById" parameterType="Long"> |
|||
delete from sys_remind where remind_id = #{remindId} |
|||
</delete> |
|||
|
|||
<delete id="deleteSysRemindByIds" parameterType="String"> |
|||
delete from sys_remind where remind_id in |
|||
<foreach item="remindId" collection="array" open="(" separator="," close=")"> |
|||
#{remindId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelSysRemindById" parameterType="Long"> |
|||
update sys_remind set del_flag = '1' where remind_id = #{remindId} |
|||
</update> |
|||
|
|||
<update id="restoreSysRemindById" parameterType="Long"> |
|||
update sys_remind set del_flag = '0' where remind_id = #{remindId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,171 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增系统提醒')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
<th:block th:include="include :: summernote-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-remind-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒人ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remindUserId" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remindUser" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒人部门ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remindDeptId" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接受人ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="receiverUserId" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接受人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="receiverUser" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接受人部门ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="receiverDeptId" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="remindTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">处理时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="handleTime" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒内容:</label> |
|||
<div class="col-sm-8"> |
|||
<input type="hidden" class="form-control" name="remindContent"> |
|||
<div class="summernote" id="remindContent"></div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">模块名称 (必须以 uri 一致):</label> |
|||
<div class="col-sm-8"> |
|||
<input name="module" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">模块url:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="moduleUrl" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">是否查看 default 0 (0 否 1 是):</label> |
|||
<div class="col-sm-8"> |
|||
<select name="isView" class="form-control m-b" th:with="type=${@dict.getType('yes_or_no')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">是否处理 default 0 (0 否 1 是):</label> |
|||
<div class="col-sm-8"> |
|||
<select name="isHandle" class="form-control m-b" th:with="type=${@dict.getType('yes_or_no')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<th:block th:include="include :: summernote-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/remind" |
|||
$("#form-remind-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-remind-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='remindTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='handleTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$(function() { |
|||
$('.summernote').summernote({ |
|||
lang: 'zh-CN', |
|||
callbacks: { |
|||
onChange: function(contents, $edittable) { |
|||
$("input[name='" + this.id + "']").val(contents); |
|||
}, |
|||
onImageUpload: function(files) { |
|||
var obj = this; |
|||
var data = new FormData(); |
|||
data.append("file", files[0]); |
|||
$.ajax({ |
|||
type: "post", |
|||
url: ctx + "common/upload", |
|||
data: data, |
|||
cache: false, |
|||
contentType: false, |
|||
processData: false, |
|||
dataType: 'json', |
|||
success: function(result) { |
|||
if (result.code == web_status.SUCCESS) { |
|||
$('#' + obj.id).summernote('insertImage', result.url); |
|||
} else { |
|||
$.modal.alertError(result.msg); |
|||
} |
|||
}, |
|||
error: function(error) { |
|||
$.modal.alertWarning("图片上传失败。"); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,84 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改系统提醒')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-remind-detail" th:object="${sysRemind}"> |
|||
<input name="remindId" th:field="*{remindId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remindUser" th:field="*{remindUser}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接受人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="receiverUser" th:field="*{receiverUser}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="remindTime" th:value="${#dates.format(sysRemind.remindTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">处理时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="handleTime" th:value="${#dates.format(sysRemind.handleTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒内容:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remindContent" th:text="*{remindContent}" class="form-control" readonly></textarea> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" th:text="*{remark}" class="form-control" readonly></textarea> |
|||
</div> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/remind"; |
|||
$("#form-remind-detail").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/detail", $('#form-remind-detail').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='remindTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='handleTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,77 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改系统提醒')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-remind-edit" th:object="${sysRemind}"> |
|||
<input name="remindId" th:field="*{remindId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remindUser" th:field="*{remindUser}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">接受人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="receiverUser" th:field="*{receiverUser}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="remindTime" th:value="${#dates.format(sysRemind.remindTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">处理时间:</label> |
|||
<div class="col-sm-8"> |
|||
<div class="input-group date"> |
|||
<input name="handleTime" th:value="${#dates.format(sysRemind.handleTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> |
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">提醒内容:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" th:text="*{remindContent}" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/remind"; |
|||
$("#form-remind-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-remind-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='remindTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='handleTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,47 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('手动处理')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-remind-manualHandle" th:object="${sysRemind}"> |
|||
<input name="remindId" th:field="*{remindId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<textarea name="remark" th:text="*{remark}" class="form-control"></textarea> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/remind"; |
|||
$("#form-remind-manualHandle").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/manualHandle", $('#form-remind-manualHandle').serialize()); |
|||
} |
|||
} |
|||
|
|||
$("input[name='remindTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
$("input[name='handleTime']").datetimepicker({ |
|||
format: "yyyy-mm-dd", |
|||
minView: "month", |
|||
autoclose: true |
|||
}); |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,158 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('系统提醒列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>是否查看:</label> |
|||
<select name="isView" th:with="type=${@dict.getType('yes_or_no')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>是否处理:</label> |
|||
<select name="isHandle" th:with="type=${@dict.getType('yes_or_no')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.table.exportExcel()" shiro:hasPermission="system:remind:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var isViewDatas = [[${@dict.getType('yes_or_no')}]]; |
|||
var isHandleDatas = [[${@dict.getType('yes_or_no')}]]; |
|||
var prefix = ctx + "system/remind"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "系统提醒", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '提醒表Id', |
|||
field: 'remindId', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '提醒人', |
|||
field: 'remindUser', |
|||
}, |
|||
{ |
|||
title: '接受人', |
|||
field: 'receiverUser', |
|||
}, |
|||
{ |
|||
title: '提醒时间', |
|||
field: 'remindTime', |
|||
}, |
|||
{ |
|||
title: '处理时间', |
|||
field: 'handleTime', |
|||
}, |
|||
{ |
|||
title: '提醒内容', |
|||
field: 'remindContent', |
|||
}, |
|||
{ |
|||
title: '是否查看', |
|||
field: 'isView', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(isViewDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '是否处理', |
|||
field: 'isHandle', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(isHandleDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
title: '录入时间', |
|||
field: 'createTime', |
|||
}, |
|||
{ |
|||
title: '更新人', |
|||
field: 'updateBy', |
|||
}, |
|||
{ |
|||
title: '上次更新时间', |
|||
field: 'updateTime', |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a href="javascript:void(0)" onclick="handle(\'' + row.remindId + '\')"><i class="fa fa-edit"></i>去处理</a> '); |
|||
actions.push('<a href="javascript:void(0)" onclick="manualHandle(\'' + row.remindId + '\')"><i class="fa fa-edit"></i>手动确认处理</a> '); |
|||
actions.push('<a href="javascript:void(0)" onclick="detail(\'' + row.remindId + '\')"><i class="fa fa-edit"></i>详情</a> '); |
|||
var actionLinks = actions.join(''); |
|||
return $.table.dropdownToggle(actionLinks); |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
|
|||
//详情 |
|||
function detail(remindId) { |
|||
$.modal.open("详情", prefix + "/detail/" + remindId); |
|||
} |
|||
|
|||
//去处理 |
|||
function handle(remindId) { |
|||
$.ajax({ |
|||
url: prefix + "/handle/" + remindId, |
|||
type: 'GET', |
|||
success: function(response) { |
|||
if (response.url) { |
|||
// 跳转到指定页面 |
|||
window.location.href = ctx + response.url; |
|||
} else { |
|||
console.error('无效的URL'); |
|||
} |
|||
}, |
|||
error: function() { |
|||
console.error('请求失败'); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
//手动确认处理 |
|||
function manualHandle(remindId) { |
|||
$.modal.open("手动处理", prefix + "/manualHandle/" + remindId); |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue