Java控制台+activiti+springboot+mybatis实现账务报销工作流程
- 一、系统介绍
- 二、功能展示
- 1.代码展示
- 2.员工报销
- 3.账务审批
- 4.总经理审批
- 三、代码展示
- 四、获取源码
一、系统介绍
系统主要功能:
员工:填写报销单
账务审批:报销金额小于1000账务经理审批,报销金额大于1000总经理审批
账务经理审批:同意流程结束
总经理:同意流程结束
二、功能展示
1.代码展示
2.员工报销
3.账务审批
4.总经理审批
三、代码展示
package com.hdax.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hdax.entity.Activity;
import com.hdax.service.ActivityService;
import com.hdax.vo.ActivityIdModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
* 活动表 前端控制器
* </p>
*
* @author ${author}
* @since 2021-03-22
*/
@RestController
@RequestMapping("/activity")
public class ActivityController {
@Autowired
private ActivityService activityService;
@PostMapping("/findActivity")
public List<Activity> findActivity() {
QueryWrapper<Activity> queryWrapper = new QueryWrapper();
return activityService.list(queryWrapper);
}
@GetMapping(path = "list")
public ModelAndView list(){
return new ModelAndView("activity/list");
}
@RequestMapping(path = "/index")
@ResponseBody
public Map<String,Object> index(
Activity name,
@RequestParam("page") int page,
@RequestParam("limit") int limit
){
Map<String,Object> map=activityService.listByPage(page,limit,name);
return map;
}
@GetMapping(path = "/add")
public ModelAndView toAdd(){
return new ModelAndView("activity/add");
}
@PostMapping(path = "/add")
@ResponseBody
public Map<String,Object> toAdd(Activity activity){
Map<String,Object> map=new HashMap<>();
activity.setCreateTime(LocalDateTime.now());
activity.setActivityState(2);
int flag = activityService.add(activity);
map.put("msg",flag);
return map;
}
@GetMapping(path = "/update/{id}")
public ModelAndView update(@PathVariable("id") Integer id){
ModelAndView modelAndView=new ModelAndView("activity/update");
Activity activity=activityService.getById(id);
modelAndView.addObject("activity",activity);
return modelAndView;
}
@PostMapping(path = "/update")
@ResponseBody
public Map<String,Object> update(Activity activity){
Map<String,Object> map=new HashMap<>();
activity.setUpdateTime(LocalDateTime.now());
int flag=activityService.update(activity);
map.put("msg",flag);
return map;
}
@PostMapping(path = "/del")
@ResponseBody
public Map<String,Object>delete(ActivityIdModel activityIdModel){
Map<String,Object>map=new HashMap<>();
activityService.btnDel(activityIdModel.getIds());
map.put("msg","success");
return map;
}
@PostMapping(path = "delete/{id}")
@ResponseBody
public Map<String,Object>delete(@PathVariable("id") Integer id){
Map<String,Object>map=new HashMap<>();
boolean flag=activityService.removeById(id);
map.put("msg",flag);
return map;
}
}
四、获取源码
点击下载
Java控制台+activiti+springboot+mybatis实现账务报销工作流程