——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明








基于javaweb的SpringBoot公司财务管理系统(java+springboot+vue+mysql+maven)
管理员
admin 123456
员工
员工工号1 123456
员工工号2 123456
员工工号3 123456
员工工号4 123456
员工工号5 123456
员工工号6 123456
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
@RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ GongzidiaozhengEntity gongzidiaozheng = gongzidiaozhengService.selectById(id); return R.ok().put("data", gongzidiaozheng); }
@IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ GongzidiaozhengEntity gongzidiaozheng = gongzidiaozhengService.selectById(id); return R.ok().put("data", gongzidiaozheng); }
@RequestMapping("/save") public R save(@RequestBody GongzidiaozhengEntity gongzidiaozheng, HttpServletRequest request){ gongzidiaozheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); gongzidiaozhengService.insert(gongzidiaozheng); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody GongzidiaozhengEntity gongzidiaozheng, HttpServletRequest request){ gongzidiaozheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); gongzidiaozhengService.insert(gongzidiaozheng); return R.ok(); }
@RequestMapping("/update") public R update(@RequestBody GongzidiaozhengEntity gongzidiaozheng, HttpServletRequest request){ gongzidiaozhengService.updateById(gongzidiaozheng); return R.ok();
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
@RestController @RequestMapping("file") @SuppressWarnings({"unchecked","rawtypes"}) public class FileController{ @Autowired private ConfigService configService;
@RequestMapping("/upload") public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception { if (file.isEmpty()) { throw new EIException("上传文件不能为空"); } String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1); File path = new File(ResourceUtils.getURL("classpath:static").getPath()); if(!path.exists()) { path = new File(""); } File upload = new File(path.getAbsolutePath(),"/upload/"); if(!upload.exists()) { upload.mkdirs(); } String fileName = new Date().getTime()+"."+fileExt; File dest = new File(upload.getAbsolutePath()+"/"+fileName); file.transferTo(dest);
if(StringUtils.isNotBlank(type) && type.equals("1")) { ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile")); if(configEntity==null) { configEntity = new ConfigEntity(); configEntity.setName("faceFile"); configEntity.setValue(fileName); } else { configEntity.setValue(fileName); } configService.insertOrUpdate(configEntity); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Wrapper<GudingzichanEntity> wrapper = new EntityWrapper<GudingzichanEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
int count = gudingzichanService.selectCount(wrapper); return R.ok().put("count", count); }
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
@RestController @RequestMapping("/jingyingxinxi") public class JingyingxinxiController { @Autowired private JingyingxinxiService jingyingxinxiService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,JingyingxinxiEntity jingyingxinxi, @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date dengjishijianstart, @RequestParam(required = false) @DateTimeFormat(pattern="yyyy-MM-dd") Date dengjishijianend, HttpServletRequest request){ EntityWrapper<JingyingxinxiEntity> ew = new EntityWrapper<JingyingxinxiEntity>(); if(dengjishijianstart!=null) ew.ge("dengjishijian", dengjishijianstart); if(dengjishijianend!=null) ew.le("dengjishijian", dengjishijianend); PageUtils page = jingyingxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jingyingxinxi), params), params));
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
@RequestMapping("/query") public R query(YuangongEntity yuangong){ EntityWrapper< YuangongEntity> ew = new EntityWrapper< YuangongEntity>(); ew.allEq(MPUtil.allEQMapPre( yuangong, "yuangong")); YuangongView yuangongView = yuangongService.selectView(ew); return R.ok("查询员工成功").put("data", yuangongView); }
@RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ YuangongEntity yuangong = yuangongService.selectById(id); return R.ok().put("data", yuangong); }
@IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ YuangongEntity yuangong = yuangongService.selectById(id); return R.ok().put("data", yuangong); }
@RequestMapping("/save") public R save(@RequestBody YuangongEntity yuangong, HttpServletRequest request){ yuangong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); YuangongEntity user = yuangongService.selectOne(new EntityWrapper<YuangongEntity>().eq("yuangonggonghao", yuangong.getYuangonggonghao())); if(user!=null) { return R.error("用户已存在"); } yuangong.setId(new Date().getTime()); yuangongService.insert(yuangong); return R.ok(); }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=361523230309201dk
https://javayms.pages.dev?id=361523230309201dk