前言

本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录。云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7Tk?p=1


工资实体类的日期字段加上日期转换注解

Controller

package com.xxxx.server.controller;import com.xxxx.server.pojo.RespBean.RespBean;
import com.xxxx.server.pojo.Salary;
import com.xxxx.server.service.ISalaryService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;import java.io.PipedReader;
import java.io.PrintWriter;
import java.time.LocalDateTime;
import java.util.List;/*** <p>*  前端控制器* </p>** @author zhoubin* @since 2022-04-09*/
@RestController
@RequestMapping("/salary/sob")
public class SalaryController {@Autowiredprivate ISalaryService salaryService;@ApiOperation(value = "获取所有资产账套")@GetMapping("/")public List<Salary> getAllSalaries() {return salaryService.list();}@ApiOperation(value = "添加资产账套")@PostMapping("/")public RespBean addSalary(@RequestBody Salary salary) {salary.setCreateDate(LocalDateTime.now());if (salaryService.save(salary)) {return RespBean.success("添加成功!");}return RespBean.error("添加失败!");}@ApiOperation(value = "删除资产账套")@DeleteMapping("/{id}")public RespBean deleteSalary(@PathVariable Integer id) {if (salaryService.removeById(id)) {return RespBean.success("删除成功!");}return RespBean.error("删除失败!");}@ApiOperation(value = "更新资产账套")@PutMapping("/")public RespBean updateSalary(@RequestBody Salary salary) {if (salaryService.updateById(salary)) {return RespBean.success("更新成功!");}return RespBean.error("更新失败!");}}

获取所有员工账套

新建Controller

package com.xxxx.server.controller.SalarySobCfgController;import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.xxxx.server.pojo.Employee;
import com.xxxx.server.pojo.RespBean.RespBean;
import com.xxxx.server.pojo.RespPageBean.RespPageBean;
import com.xxxx.server.pojo.Salary;
import com.xxxx.server.service.IEmployeeService;
import com.xxxx.server.service.ISalaryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.bytebuddy.implementation.bind.annotation.Pipe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;import java.util.List;/*** 人员账套管理* @author LinLinD* @Create 2022-04-25-17:15*/
@RestController
@RequestMapping("/salary/sobcfg")
public class SalarySobCfgController {@Autowiredprivate ISalaryService salaryService;@Autowiredprivate IEmployeeService employeeService;@ApiOperation(value = "获取所有资产账套")@GetMapping("/salaries")public List<Salary> getAllSalaries() {return salaryService.list();}@ApiOperation(value = "获取所有人员账套")@GetMapping("/")public RespPageBean getEmployWithSalary(@RequestParam (defaultValue = "1") Integer currentPage,@RequestParam (defaultValue = "10") Integer size) {return employeeService.getEmployeeWithSalary(currentPage,size);}@ApiOperation(value = "更新人员账套")@PutMapping("/")public RespBean updateEmployeeSalary(Integer eid,Integer sid) {if (employeeService.update(new UpdateWrapper<Employee>().set("salaryId",sid).eq("id",eid))) {return RespBean.success("更新成功!");}return RespBean.error("更新失败!");}
}

去员工的服务里面定义获取所有员工账套的方法

服务实现

Mapper接口

Mapper.xml文件,根据人员表信息的工资id和部门id来连接工资和部门表。


云e办学习笔记(三十一)工资账套功能实现相关推荐

  1. 038-云E办_工资账套功能

    038-云E办_工资账套功能 一.工资套账管理 1.修改实体类 2.controller层,由于单表,而mybatis-plus写完controller层即可. 二.员工账套管理 修改员工类 1.员工 ...

  2. 云e办学习笔记(三十三)FastDFS学习和安装

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  3. 云e办学习笔记(三)SpringSecurity学习(一)

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  4. 云e办学习笔记(十五)Redis学习以及相关部署

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  5. 云e办学习笔记(四)SpringSecurity学习(二)

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  6. 云e办学习笔记(十六)Redis集成菜单

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  7. 云e办学习笔记(二十五)导入导出Excel表数据功能实现

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  8. 云e办学习笔记(七)登录返回token(未完全)

    前言 本系列博客基于B站的云e办管理系统,前端和后端我都自己敲了一遍,这里做一个学习记录.云e办的原始视频链接如下:https://www.bilibili.com/video/BV1Ai4y1P7T ...

  9. Mr.J-- jQuery学习笔记(三十一)--事件操作方法(onoff)

    on(type, callback) 定义和用法 on() 方法在被选元素及子元素上添加一个或多个事件处理程序. 自 jQuery 版本 1.7 起,on() 方法是 bind().live() 和 ...

最新文章

  1. VS 团队资源管理 强制解锁锁定文件
  2. 【天池赛事】零基础入门语义分割-地表建筑物识别 Task4:评价函数与损失函数
  3. 错误sudo: pip: command not found解决方案
  4. python的datetime举例_Python datetime模块的使用示例
  5. [react] 说出几点你认为的React实践
  6. Java笔记-连接本地代理服务
  7. Java 反射取类中类_Java反射机制(二):通过反射取得类的结构
  8. CloudCC:2017年下半年企业移动CRM市场风向窥测
  9. 小妙招:如何防止你的 jar 包被反编译?
  10. 苹果Mac摄影照片降噪工具:ON1 NoNoise AI
  11. layui文档,镜像站
  12. qq手机助手连接服务器失败是什么原因,按键精灵手机助手教程,按键精灵手机助手连不上手机解决方法...
  13. 【023】翼辉信息于南京召开国产嵌入式信息产业前沿技术交流会暨SylixOS新版发布会
  14. 2021年Java开发爆款推荐!黑马java培训视频网盘下载
  15. 电脑telnet失败的解决方法
  16. HTTP的请求方法OPTIONS
  17. 七大江河水系--淮河
  18. matlab绘制二元二次曲线图,Excel:关于二次曲线直角坐标方程图像的描绘
  19. IntelliJ IDE
  20. 三星note10 android q,三星Note10 一款严重被低估的安卓上代次机皇

热门文章

  1. golang 单引号与双引号以及反引号
  2. mysql 重做日志 镜像_MySQLinnoDB重做日志文件
  3. word输入技巧:上下标这个梗,你将如何化解?
  4. 敏捷宣言 敏捷原则_如何以敏捷原则推动客户体验
  5. [ 数据结构 ] 迪杰斯特拉算法(最短路径问题)
  6. 【Realflow】Objects - Volume节点翻译
  7. IT资讯---------显示图片
  8. 【Lua 教程系列第 2 篇】什么是 Lua 语言?
  9. aps高级排产打造双赢新模式
  10. ord java_Ord