基于javaweb+mysql的springboot商品进销存系统(java+vue+springboot+maven+mybatis+mysql)

基于javaweb+mysql的springboot商品进销存系统(java+vue+springboot+maven+mybatis+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥10

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行

前端:WebStorm/VSCode/HBuilderX等均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb+mysql的SpringBoot商品进销存系统(java+vue+springboot+maven+mybatis+mysql)

一、项目运行 环境配置:

Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。

项目技术:

Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。

String selections = request.getParameter("selections");

List<FinPayment> finPaymentList = new ArrayList<FinPayment>();

if(oConvertUtils.isEmpty(selections)) {

finPaymentList = queryList;

}else {

List<String> selectionList = Arrays.asList(selections.split(","));

finPaymentList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());

// Step.3 组装pageList

List<FinPaymentPage> pageList = new ArrayList<FinPaymentPage>();

for (FinPayment main : finPaymentList) {

FinPaymentPage vo = new FinPaymentPage();

BeanUtils.copyProperties(main, vo);

List<FinPaymentEntry> finPaymentEntryList = finPaymentEntryService.selectByMainId(main.getId());

vo.setFinPaymentEntryList(finPaymentEntryList);

//

//		} catch (Exception e) {

//			log.info("文件下载失败" + e.getMessage());

//			// e.printStackTrace();

//		} finally {

//			if (inputStream != null) {

//				try {

//					inputStream.close();

//				} catch (IOException e) {

//					e.printStackTrace();

//				}

//			}

//			if (outputStream != null) {


@ApiOperation(value="付款单-编辑", notes="付款单-编辑")

@PutMapping(value = "/edit")

public Result<?> edit(@RequestBody FinPaymentPage finPaymentPage) {

FinPayment finPayment = new FinPayment();

BeanUtils.copyProperties(finPaymentPage, finPayment);

FinPayment finPaymentEntity = finPaymentService.getById(finPayment.getId());

if(finPaymentEntity==null) {

return Result.error("未找到对应数据");

finPaymentService.updateMain(finPayment, finPaymentPage.getFinPaymentEntryList());

return Result.ok("编辑成功!");

/**

*   通过id删除
//			}

//		}

//

//	}

/**

* @功能:pdf预览Iframe

* @param modelAndView

* @return

*/

@RequestMapping("/pdf/pdfPreviewIframe")

public ModelAndView pdfPreviewIframe(ModelAndView modelAndView) {

modelAndView.setViewName("pdfPreviewIframe");

return modelAndView;

//result.setMessage("使用阿里云文件上传时,必须添加目录!");

//result.setSuccess(false);

//return result;

}else{

bizPath = "";

if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)){

//针对jeditor编辑器如何使 lcaol模式,采用 base64格式存储

String jeditor = request.getParameter("jeditor");

if(oConvertUtils.isNotEmpty(jeditor)){

result.setMessage(CommonConstant.UPLOAD_TYPE_LOCAL);

result.setSuccess(true);


Page<FinPayment> page = new Page<FinPayment>(pageNo, pageSize);

IPage<FinPayment> pageList = finPaymentService.page(page, queryWrapper);

return Result.ok(pageList);

/**

*   添加

* @param finPaymentPage

* @return

*/

@AutoLog(value = "付款单-添加")

@ApiOperation(value="付款单-添加", notes="付款单-添加")


return Result.ok("批量删除成功!");

/**

* 通过id查询

* @param id

* @return

*/

@AutoLog(value = "付款单-通过id查询")

@ApiOperation(value="付款单-通过id查询", notes="付款单-通过id查询")

@GetMapping(value = "/queryById")

public Result<?> queryById(@RequestParam(name="id",required=true) String id) {

FinPayment finPayment = finPaymentService.getById(id);


*/

@Api(tags="付款单")

@RestController

@RequestMapping("/finance/finPayment")

@Slf4j

public class FinPaymentController {

@Autowired

private IFinPaymentService finPaymentService;

@Autowired

private IFinPaymentEntryService finPaymentEntryService;

/**

* 分页列表查询

* @param finPayment


/**

* 通过id查询

* @param id

* @return

*/

@AutoLog(value = "付款明细集合-通过id查询")

@ApiOperation(value="付款明细集合-通过id查询", notes="付款明细-通过id查询")

@GetMapping(value = "/queryFinPaymentEntryByMainId")

public Result<?> queryFinPaymentEntryListByMainId(@RequestParam(name="id",required=true) String id) {

List<FinPaymentEntry> finPaymentEntryList = finPaymentEntryService.selectByMainId(id);

return Result.ok(finPaymentEntryList);

/**

/**

* 导出excel

* @param request

* @param finPayment

*/

@RequestMapping(value =  {"/exportXls", "/exportXls/{paymentType}"})

public ModelAndView exportXls(HttpServletRequest request, FinPayment finPayment) {

// Step.1 组装查询条件查询数据

QueryWrapper<FinPayment> queryWrapper = QueryGenerator.initQueryWrapper(finPayment, request.getParameterMap());

LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();

//Step.2 获取导出数据


queryWrapper.apply("amt - deducted_amt - checked_amt > 0");

Page<FinPayment> page = new Page<FinPayment>(pageNo, pageSize);

IPage<FinPayment> pageList = finPaymentService.page(page, queryWrapper);

return Result.ok(pageList);

/**

*   添加

* @param finPaymentPage

* @return

*/

@AutoLog(value = "付款单-添加")

@ApiOperation(value="付款单-添加", notes="付款单-添加")

@PostMapping(value = "/add")


* @param ids

* @return

*/

@AutoLog(value = "付款单-批量删除")

@ApiOperation(value="付款单-批量删除", notes="付款单-批量删除")

@DeleteMapping(value = "/deleteBatch")

public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {

this.finPaymentService.delBatchMain(Arrays.asList(ids.split(",")));

return Result.ok("批量删除成功!");

/**


//				file.mkdirs();// 创建文件根目录

//			}

//			MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;

//			MultipartFile mf = multipartRequest.getFile("file");// 获取上传文件对象

//			String orgName = mf.getOriginalFilename();// 获取文件名

//			fileName = orgName.substring(0, orgName.lastIndexOf(".")) + "_" + System.currentTimeMillis() + orgName.substring(orgName.indexOf("."));

//			String savePath = file.getPath() + File.separator + fileName;

//			File savefile = new File(savePath);

//			FileCopyUtils.copy(mf.getBytes(), savefile);

//			String dbpath = bizPath + File.separator + nowday + File.separator + fileName;

//			if (dbpath.contains("\\")) {


fileName = orgName+ "_" + System.currentTimeMillis();

String savePath = file.getPath() + File.separator + fileName;

File savefile = new File(savePath);

FileCopyUtils.copy(mf.getBytes(), savefile);

String dbpath = null;

if(oConvertUtils.isNotEmpty(bizPath)){

dbpath = bizPath + File.separator + fileName;

}else{

dbpath = fileName;

if (dbpath.contains("\\")) {

dbpath = dbpath.replace("\\", "/");

return dbpath;

} catch (IOException e) {
* @param finPaymentPage

* @return

*/

@AutoLog(value = "付款单-编辑")

@ApiOperation(value="付款单-编辑", notes="付款单-编辑")

@PutMapping(value = "/edit")

public Result<?> edit(@RequestBody FinPaymentPage finPaymentPage) {

FinPayment finPayment = new FinPayment();

BeanUtils.copyProperties(finPaymentPage, finPayment);

FinPayment finPaymentEntity = finPaymentService.getById(finPayment.getId());

if(finPaymentEntity==null) {

return Result.error("未找到对应数据");


@ApiOperation(value="付款单-通过id查询", notes="付款单-通过id查询")

@GetMapping(value = "/queryById")

public Result<?> queryById(@RequestParam(name="id",required=true) String id) {

FinPayment finPayment = finPaymentService.getById(id);

if(finPayment==null) {

return Result.error("未找到对应数据");

return Result.ok(finPayment);

/**

* 通过id查询

* @param id

*/

@Api(tags="付款单")

@RestController

@RequestMapping("/finance/finPayment")

@Slf4j

public class FinPaymentController {

@Autowired

private IFinPaymentService finPaymentService;

@Autowired

private IFinPaymentEntryService finPaymentEntryService;

/**

* 分页列表查询

* @param finPayment

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值