From 1e9201a8bb945ba706956e8070ae602ff16e6afc Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Wed, 21 Feb 2024 15:51:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8A=A4=E7=90=86=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=92=8C=E6=89=93=E5=8D=A1=E8=AE=B0=E5=BD=95=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxClockLogController.java | 99 +++++ .../controller/WxNursingLogController.java | 100 +++++ .../system/service/IWxClockLogService.java | 63 ++++ .../service/impl/WxClockLogServiceImpl.java | 91 +++++ .../service/impl/WxNursingLogServiceImpl.java | 91 +++++ flossom-ui/src/api/system/clockLog.js | 44 +++ flossom-ui/src/api/system/nursingLog.js | 44 +++ .../src/views/system/clockLog/index.vue | 286 ++++++++++++++ .../src/views/system/nursingLog/index.vue | 349 ++++++++++++++++++ 9 files changed, 1167 insertions(+) create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxClockLogController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxNursingLogController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxClockLogService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxClockLogServiceImpl.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxNursingLogServiceImpl.java create mode 100644 flossom-ui/src/api/system/clockLog.js create mode 100644 flossom-ui/src/api/system/nursingLog.js create mode 100644 flossom-ui/src/views/system/clockLog/index.vue create mode 100644 flossom-ui/src/views/system/nursingLog/index.vue diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxClockLogController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxClockLogController.java new file mode 100644 index 0000000..508ca83 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxClockLogController.java @@ -0,0 +1,99 @@ +package com.flossom.system.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.flossom.common.core.domain.entity.WxClockLog; +import com.flossom.common.core.utils.poi.ExcelUtil; +import com.flossom.common.core.web.controller.BaseController; +import com.flossom.common.core.web.domain.AjaxResult; +import com.flossom.common.core.web.page.TableDataInfo; +import com.flossom.common.log.annotation.Log; +import com.flossom.common.log.enums.BusinessType; +import com.flossom.common.security.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.flossom.system.service.IWxClockLogService; + +/** + * 用户打卡Controller + * + * @author flossom + * @date 2024-02-21 + */ +@RestController +@RequestMapping("/clockLog") +public class WxClockLogController extends BaseController { + + @Autowired + private IWxClockLogService wxClockLogService; + + /** + * 查询用户打卡列表 + */ + @RequiresPermissions("system:clockLog:list") + @GetMapping("/list") + public TableDataInfo list(WxClockLog wxClockLog) { + startPage(); + List list = wxClockLogService.selectWxClockLogList(wxClockLog); + return getDataTable(list); + } + + /** + * 导出用户打卡列表 + */ + @RequiresPermissions("system:clockLog:export") + @Log(title = "用户打卡", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WxClockLog wxClockLog) { + List list = wxClockLogService.selectWxClockLogList(wxClockLog); + ExcelUtil util = new ExcelUtil(WxClockLog.class); + util.exportExcel(response, list, "用户打卡数据"); + } + + /** + * 获取用户打卡详细信息 + */ + @RequiresPermissions("system:clockLog:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(wxClockLogService.selectWxClockLogById(id)); + } + + /** + * 新增用户打卡 + */ + @RequiresPermissions("system:clockLog:add") + @Log(title = "用户打卡", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WxClockLog wxClockLog) { + return toAjax(wxClockLogService.insertWxClockLog(wxClockLog)); + } + + /** + * 修改用户打卡 + */ + @RequiresPermissions("system:clockLog:edit") + @Log(title = "用户打卡", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WxClockLog wxClockLog) { + return toAjax(wxClockLogService.updateWxClockLog(wxClockLog)); + } + + /** + * 删除用户打卡 + */ + @RequiresPermissions("system:clockLog:remove") + @Log(title = "用户打卡", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(wxClockLogService.deleteWxClockLogByIds(ids)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxNursingLogController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxNursingLogController.java new file mode 100644 index 0000000..ad3f07a --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxNursingLogController.java @@ -0,0 +1,100 @@ +package com.flossom.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.flossom.common.core.domain.entity.WxNursingLog; +import com.flossom.common.core.utils.poi.ExcelUtil; +import com.flossom.common.core.web.controller.BaseController; +import com.flossom.common.core.web.domain.AjaxResult; +import com.flossom.common.core.web.page.TableDataInfo; +import com.flossom.common.log.annotation.Log; +import com.flossom.common.log.enums.BusinessType; +import com.flossom.common.security.annotation.RequiresPermissions; +import com.flossom.system.service.IWxNursingLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 用户护理日志Controller + * + * @author flossom + * @date 2024-02-21 + */ +@RestController +@RequestMapping("/nursingLog") +public class WxNursingLogController extends BaseController { + + @Autowired + private IWxNursingLogService wxNursingLogService; + + /** + * 查询用户护理日志列表 + */ + @RequiresPermissions("system:nursingLog:list") + @GetMapping("/list") + public TableDataInfo list(WxNursingLog wxNursingLog) { + startPage(); + List list = wxNursingLogService.selectWxNursingLogList(wxNursingLog); + return getDataTable(list); + } + + /** + * 导出用户护理日志列表 + */ + @RequiresPermissions("system:nursingLog:export") + @Log(title = "用户护理日志", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WxNursingLog wxNursingLog) { + List list = wxNursingLogService.selectWxNursingLogList(wxNursingLog); + ExcelUtil util = new ExcelUtil(WxNursingLog.class); + util.exportExcel(response, list, "用户护理日志数据"); + } + + /** + * 获取用户护理日志详细信息 + */ + @RequiresPermissions("system:nursingLog:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(wxNursingLogService.selectWxNursingLogById(id)); + } + + /** + * 新增用户护理日志 + */ + @RequiresPermissions("system:nursingLog:add") + @Log(title = "用户护理日志", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WxNursingLog wxNursingLog) { + return toAjax(wxNursingLogService.insertWxNursingLog(wxNursingLog)); + } + + /** + * 修改用户护理日志 + */ + @RequiresPermissions("system:nursingLog:edit") + @Log(title = "用户护理日志", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WxNursingLog wxNursingLog) { + return toAjax(wxNursingLogService.updateWxNursingLog(wxNursingLog)); + } + + /** + * 删除用户护理日志 + */ + @RequiresPermissions("system:nursingLog:remove") + @Log(title = "用户护理日志", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(wxNursingLogService.deleteWxNursingLogByIds(ids)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxClockLogService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxClockLogService.java new file mode 100644 index 0000000..e733b31 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxClockLogService.java @@ -0,0 +1,63 @@ +package com.flossom.system.service; + +import com.flossom.common.core.domain.entity.WxClockLog; + +import java.util.List; + + +/** + * 用户打卡Service接口 + * + * @author flossom + * @date 2024-02-21 + */ +public interface IWxClockLogService { + + /** + * 查询用户打卡 + * + * @param id 用户打卡主键 + * @return 用户打卡 + */ + public WxClockLog selectWxClockLogById(Long id); + + /** + * 查询用户打卡列表 + * + * @param wxClockLog 用户打卡 + * @return 用户打卡集合 + */ + public List selectWxClockLogList(WxClockLog wxClockLog); + + /** + * 新增用户打卡 + * + * @param wxClockLog 用户打卡 + * @return 结果 + */ + public int insertWxClockLog(WxClockLog wxClockLog); + + /** + * 修改用户打卡 + * + * @param wxClockLog 用户打卡 + * @return 结果 + */ + public int updateWxClockLog(WxClockLog wxClockLog); + + /** + * 批量删除用户打卡 + * + * @param ids 需要删除的用户打卡主键集合 + * @return 结果 + */ + public int deleteWxClockLogByIds(Long[] ids); + + /** + * 删除用户打卡信息 + * + * @param id 用户打卡主键 + * @return 结果 + */ + public int deleteWxClockLogById(Long id); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxClockLogServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxClockLogServiceImpl.java new file mode 100644 index 0000000..f62c3c5 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxClockLogServiceImpl.java @@ -0,0 +1,91 @@ +package com.flossom.system.service.impl; + +import java.util.List; + +import com.flossom.common.core.domain.entity.WxClockLog; +import com.flossom.common.core.mapper.WxClockLogMapper; +import com.flossom.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.flossom.system.service.IWxClockLogService; + +/** + * 用户打卡Service业务层处理 + * + * @author flossom + * @date 2024-02-21 + */ +@Service +public class WxClockLogServiceImpl implements IWxClockLogService { + + @Autowired + private WxClockLogMapper wxClockLogMapper; + + /** + * 查询用户打卡 + * + * @param id 用户打卡主键 + * @return 用户打卡 + */ + @Override + public WxClockLog selectWxClockLogById(Long id) { + return wxClockLogMapper.selectWxClockLogById(id); + } + + /** + * 查询用户打卡列表 + * + * @param wxClockLog 用户打卡 + * @return 用户打卡 + */ + @Override + public List selectWxClockLogList(WxClockLog wxClockLog) { + return wxClockLogMapper.selectWxClockLogList(wxClockLog); + } + + /** + * 新增用户打卡 + * + * @param wxClockLog 用户打卡 + * @return 结果 + */ + @Override + public int insertWxClockLog(WxClockLog wxClockLog) { + wxClockLog.setCreateTime(DateUtils.getNowDate()); + return wxClockLogMapper.insertWxClockLog(wxClockLog); + } + + /** + * 修改用户打卡 + * + * @param wxClockLog 用户打卡 + * @return 结果 + */ + @Override + public int updateWxClockLog(WxClockLog wxClockLog) { + wxClockLog.setUpdateTime(DateUtils.getNowDate()); + return wxClockLogMapper.updateWxClockLog(wxClockLog); + } + + /** + * 批量删除用户打卡 + * + * @param ids 需要删除的用户打卡主键 + * @return 结果 + */ + @Override + public int deleteWxClockLogByIds(Long[] ids) { + return wxClockLogMapper.deleteWxClockLogByIds(ids); + } + + /** + * 删除用户打卡信息 + * + * @param id 用户打卡主键 + * @return 结果 + */ + @Override + public int deleteWxClockLogById(Long id) { + return wxClockLogMapper.deleteWxClockLogById(id); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxNursingLogServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxNursingLogServiceImpl.java new file mode 100644 index 0000000..b82b951 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxNursingLogServiceImpl.java @@ -0,0 +1,91 @@ +package com.flossom.system.service.impl; + +import com.flossom.common.core.domain.entity.WxNursingLog; +import com.flossom.common.core.mapper.WxNursingLogMapper; +import com.flossom.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.flossom.system.service.IWxNursingLogService; + +import java.util.List; + +/** + * 用户护理日志Service业务层处理 + * + * @author flossom + * @date 2024-02-21 + */ +@Service +public class WxNursingLogServiceImpl implements IWxNursingLogService { + + @Autowired + private WxNursingLogMapper wxNursingLogMapper; + + /** + * 查询用户护理日志 + * + * @param id 用户护理日志主键 + * @return 用户护理日志 + */ + @Override + public WxNursingLog selectWxNursingLogById(Long id) { + return wxNursingLogMapper.selectWxNursingLogById(id); + } + + /** + * 查询用户护理日志列表 + * + * @param wxNursingLog 用户护理日志 + * @return 用户护理日志 + */ + @Override + public List selectWxNursingLogList(WxNursingLog wxNursingLog) { + return wxNursingLogMapper.selectWxNursingLogList(wxNursingLog); + } + + /** + * 新增用户护理日志 + * + * @param wxNursingLog 用户护理日志 + * @return 结果 + */ + @Override + public int insertWxNursingLog(WxNursingLog wxNursingLog) { + wxNursingLog.setCreateTime(DateUtils.getNowDate()); + return wxNursingLogMapper.insertWxNursingLog(wxNursingLog); + } + + /** + * 修改用户护理日志 + * + * @param wxNursingLog 用户护理日志 + * @return 结果 + */ + @Override + public int updateWxNursingLog(WxNursingLog wxNursingLog) { + wxNursingLog.setUpdateTime(DateUtils.getNowDate()); + return wxNursingLogMapper.updateWxNursingLog(wxNursingLog); + } + + /** + * 批量删除用户护理日志 + * + * @param ids 需要删除的用户护理日志主键 + * @return 结果 + */ + @Override + public int deleteWxNursingLogByIds(Long[] ids) { + return wxNursingLogMapper.deleteWxNursingLogByIds(ids); + } + + /** + * 删除用户护理日志信息 + * + * @param id 用户护理日志主键 + * @return 结果 + */ + @Override + public int deleteWxNursingLogById(Long id) { + return wxNursingLogMapper.deleteWxNursingLogById(id); + } +} diff --git a/flossom-ui/src/api/system/clockLog.js b/flossom-ui/src/api/system/clockLog.js new file mode 100644 index 0000000..d2d2d48 --- /dev/null +++ b/flossom-ui/src/api/system/clockLog.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询用户打卡列表 +export function listClockLog(query) { + return request({ + url: '/system/clockLog/list', + method: 'get', + params: query + }) +} + +// 查询用户打卡详细 +export function getClockLog(id) { + return request({ + url: '/system/clockLog/' + id, + method: 'get' + }) +} + +// 新增用户打卡 +export function addClockLog(data) { + return request({ + url: '/system/clockLog', + method: 'post', + data: data + }) +} + +// 修改用户打卡 +export function updateClockLog(data) { + return request({ + url: '/system/clockLog', + method: 'put', + data: data + }) +} + +// 删除用户打卡 +export function delClockLog(id) { + return request({ + url: '/system/clockLog/' + id, + method: 'delete' + }) +} diff --git a/flossom-ui/src/api/system/nursingLog.js b/flossom-ui/src/api/system/nursingLog.js new file mode 100644 index 0000000..8102213 --- /dev/null +++ b/flossom-ui/src/api/system/nursingLog.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询用户护理日志列表 +export function listNursingLog(query) { + return request({ + url: '/system/nursingLog/list', + method: 'get', + params: query + }) +} + +// 查询用户护理日志详细 +export function getNursingLog(id) { + return request({ + url: '/system/nursingLog/' + id, + method: 'get' + }) +} + +// 新增用户护理日志 +export function addNursingLog(data) { + return request({ + url: '/system/nursingLog', + method: 'post', + data: data + }) +} + +// 修改用户护理日志 +export function updateNursingLog(data) { + return request({ + url: '/system/nursingLog', + method: 'put', + data: data + }) +} + +// 删除用户护理日志 +export function delNursingLog(id) { + return request({ + url: '/system/nursingLog/' + id, + method: 'delete' + }) +} diff --git a/flossom-ui/src/views/system/clockLog/index.vue b/flossom-ui/src/views/system/clockLog/index.vue new file mode 100644 index 0000000..0b4b512 --- /dev/null +++ b/flossom-ui/src/views/system/clockLog/index.vue @@ -0,0 +1,286 @@ + + + diff --git a/flossom-ui/src/views/system/nursingLog/index.vue b/flossom-ui/src/views/system/nursingLog/index.vue new file mode 100644 index 0000000..eccb874 --- /dev/null +++ b/flossom-ui/src/views/system/nursingLog/index.vue @@ -0,0 +1,349 @@ + + + From 5f0992835b822ea109d8872461d806519f2dce9f Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Wed, 21 Feb 2024 15:51:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8A=A4=E7=90=86=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=92=8C=E6=89=93=E5=8D=A1=E8=AE=B0=E5=BD=95=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/service/IWxNursingLogService.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxNursingLogService.java diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxNursingLogService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxNursingLogService.java new file mode 100644 index 0000000..6169498 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxNursingLogService.java @@ -0,0 +1,63 @@ +package com.flossom.system.service; + + +import com.flossom.common.core.domain.entity.WxNursingLog; + +import java.util.List; + +/** + * 用户护理日志Service接口 + * + * @author flossom + * @date 2024-02-21 + */ +public interface IWxNursingLogService { + + /** + * 查询用户护理日志 + * + * @param id 用户护理日志主键 + * @return 用户护理日志 + */ + public WxNursingLog selectWxNursingLogById(Long id); + + /** + * 查询用户护理日志列表 + * + * @param wxNursingLog 用户护理日志 + * @return 用户护理日志集合 + */ + public List selectWxNursingLogList(WxNursingLog wxNursingLog); + + /** + * 新增用户护理日志 + * + * @param wxNursingLog 用户护理日志 + * @return 结果 + */ + public int insertWxNursingLog(WxNursingLog wxNursingLog); + + /** + * 修改用户护理日志 + * + * @param wxNursingLog 用户护理日志 + * @return 结果 + */ + public int updateWxNursingLog(WxNursingLog wxNursingLog); + + /** + * 批量删除用户护理日志 + * + * @param ids 需要删除的用户护理日志主键集合 + * @return 结果 + */ + public int deleteWxNursingLogByIds(Long[] ids); + + /** + * 删除用户护理日志信息 + * + * @param id 用户护理日志主键 + * @return 结果 + */ + public int deleteWxNursingLogById(Long id); +}