Bootstrap

Java项目:ERP管理系统(java+SpringBoot+EasyUI+maven+mysql)

源码获取:博客首页 "资源" 里下载!

项目介绍

系统主要功能包括:
首页
零售管理:零售出库、零售退货;
采购管理:采购订单、采购入库、采购退货;
销售管理:销售订单、销售出库、销售退货;
仓库管理:其它入库、其它出库、调拨出库、组装单、拆卸单;
财务管理:收入单、支出单、收款单、付款单、转账单、收预付款;
报表查询:库存状况、结算账户、进货统计、销售统计、入库明细、出库明细、入库汇总、出库汇总、客户对账、供应商对账、库存预警;
商品管理:商品类别、商品信息、计量单位、序列号;
基本资料:供应商信息、客户信息、会员信息、仓库信息、收支项目、结算账户、经手人管理;

系统管理:角色管理、机构管理、用户管理、日志管理、系统配置;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7或8.0版本;

6.是否Maven项目:是;

技术栈

* 核心框架:SpringBoot 2.0.0
* 持久层框架:Mybatis 1.3.2
* 日志管理:Log4j 2.10.0
* JS框架:Jquery 1.8.0
* UI框架: EasyUI 1.3.5
* 模板框架: AdminLTE 2.4.0

* 项目管理框架: Maven 3.2.3

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.properties配置文件中的数据库配置改为自己的配置;
4. 运行com.jsh.erp包中的ErpApplication类,启动项目。(使用SpringBoot的启动方式)
5. 浏览器地址访问登录页面http://localhost:8080/login.html
默认管理员账号:admin,管理员账号一些特殊模块不具有修改权限,建议使用普通账号:jsh,密码都为123456

 

 

 

 

 

 

物料管理控制层:

@Api(tags="物料")
@RestController
@RequestMapping("/bas/basMaterial")
@Slf4j
public class BasMaterialController extends JeecgController<BasMaterial, IBasMaterialService> {
	@Autowired
	private IBasMaterialService basMaterialService;
	
	/**
	 * 分页列表查询
	 *
	 * @param basMaterial
	 * @param pageNo
	 * @param pageSize
	 * @param req
	 * @return
	 */
	@AutoLog(value = "物料-分页列表查询")
	@ApiOperation(value="物料-分页列表查询", notes="物料-分页列表查询")
	@GetMapping(value = "/list")
	public Result<?> queryPageList(BasMaterial basMaterial,
								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
								   HttpServletRequest req) {
		QueryWrapper<BasMaterial> queryWrapper = QueryGenerator.initQueryWrapper(basMaterial, req.getParameterMap());
		Page<BasMaterial> page = new Page<BasMaterial>(pageNo, pageSize);
		IPage<BasMaterial> pageList = basMaterialService.page(page, queryWrapper);
		return Result.ok(pageList);
	}
	
	/**
	 *   添加
	 *
	 * @param basMaterial
	 * @return
	 */
	@AutoLog(value = "物料-添加")
	@ApiOperation(value="物料-添加", notes="物料-添加")
	@PostMapping(value = "/add")
	public Result<?> add(@RequestBody BasMaterial basMaterial) {
		basMaterialService.save(basMaterial);
		return Result.ok("添加成功!");
	}
	
	/**
	 *  编辑
	 *
	 * @param basMaterial
	 * @return
	 */
	@AutoLog(value = "物料-编辑")
	@ApiOperation(value="物料-编辑", notes="物料-编辑")
	@PutMapping(value = "/edit")
	public Result<?> edit(@RequestBody BasMaterial basMaterial) {
		basMaterialService.updateById(basMaterial);
		return Result.ok("编辑成功!");
	}
	
	/**
	 *   通过id删除
	 *
	 * @param id
	 * @return
	 */
	@AutoLog(value = "物料-通过id删除")
	@ApiOperation(value="物料-通过id删除", notes="物料-通过id删除")
	@DeleteMapping(value = "/delete")
	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
		basMaterialService.removeById(id);
		return Result.ok("删除成功!");
	}
	
	/**
	 *  批量删除
	 *
	 * @param ids
	 * @return
	 */
	@AutoLog(value = "物料-批量删除")
	@ApiOperation(value="物料-批量删除", notes="物料-批量删除")
	@DeleteMapping(value = "/deleteBatch")
	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
		this.basMaterialService.removeByIds(Arrays.asList(ids.split(",")));
		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) {
		BasMaterial basMaterial = basMaterialService.getById(id);
		if(basMaterial==null) {
			return Result.error("未找到对应数据");
		}
		return Result.ok(basMaterial);
	}

    /**
    * 导出excel
    *
    * @param request
    * @param basMaterial
    */
    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, BasMaterial basMaterial) {
        return super.exportXls(request, basMaterial, BasMaterial.class, "物料");
    }

    /**
      * 通过excel导入数据
    *
    * @param request
    * @param response
    * @return
    */
    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        return super.importExcel(request, response, BasMaterial.class);
    }

}

客户管理控制层:

@Api(tags="客户")
@RestController
@RequestMapping("/bas/basCustomer")
@Slf4j
public class BasCustomerController extends JeecgController<BasCustomer, IBasCustomerService> {
	@Autowired
	private IBasCustomerService basCustomerService;
	
	/**
	 * 分页列表查询
	 *
	 * @param basCustomer
	 * @param pageNo
	 * @param pageSize
	 * @param req
	 * @return
	 */
	@AutoLog(value = "客户-分页列表查询")
	@ApiOperation(value="客户-分页列表查询", notes="客户-分页列表查询")
	@GetMapping(value = "/list")
	public Result<?> queryPageList(BasCustomer basCustomer,
								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
								   HttpServletRequest req) {
		QueryWrapper<BasCustomer> queryWrapper = QueryGenerator.initQueryWrapper(basCustomer, req.getParameterMap());
		Page<BasCustomer> page = new Page<BasCustomer>(pageNo, pageSize);
		IPage<BasCustomer> pageList = basCustomerService.page(page, queryWrapper);
		return Result.ok(pageList);
	}
	
	/**
	 *   添加
	 *
	 * @param basCustomer
	 * @return
	 */
	@AutoLog(value = "客户-添加")
	@ApiOperation(value="客户-添加", notes="客户-添加")
	@PostMapping(value = "/add")
	public Result<?> add(@RequestBody BasCustomer basCustomer) {
		basCustomerService.save(basCustomer);
		return Result.ok("添加成功!");
	}
	
	/**
	 *  编辑
	 *
	 * @param basCustomer
	 * @return
	 */
	@AutoLog(value = "客户-编辑")
	@ApiOperation(value="客户-编辑", notes="客户-编辑")
	@PutMapping(value = "/edit")
	public Result<?> edit(@RequestBody BasCustomer basCustomer) {
		basCustomerService.updateById(basCustomer);
		return Result.ok("编辑成功!");
	}
	
	/**
	 *   通过id删除
	 *
	 * @param id
	 * @return
	 */
	@AutoLog(value = "客户-通过id删除")
	@ApiOperation(value="客户-通过id删除", notes="客户-通过id删除")
	@DeleteMapping(value = "/delete")
	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
		basCustomerService.removeById(id);
		return Result.ok("删除成功!");
	}
	
	/**
	 *  批量删除
	 *
	 * @param ids
	 * @return
	 */
	@AutoLog(value = "客户-批量删除")
	@ApiOperation(value="客户-批量删除", notes="客户-批量删除")
	@DeleteMapping(value = "/deleteBatch")
	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
		this.basCustomerService.removeByIds(Arrays.asList(ids.split(",")));
		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) {
		BasCustomer basCustomer = basCustomerService.getById(id);
		if(basCustomer==null) {
			return Result.error("未找到对应数据");
		}
		return Result.ok(basCustomer);
	}

    /**
    * 导出excel
    *
    * @param request
    * @param basCustomer
    */
    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, BasCustomer basCustomer) {
        return super.exportXls(request, basCustomer, BasCustomer.class, "客户");
    }

    /**
      * 通过excel导入数据
    *
    * @param request
    * @param response
    * @return
    */
    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
        return super.importExcel(request, response, BasCustomer.class);
    }

}

仓库管理控制层:

@RestController
@RequestMapping("/bas/basWarehouse")
@Slf4j
public class BasWarehouseController extends JeecgController<BasWarehouse, IBasWarehouseService>{
	@Autowired
	private IBasWarehouseService basWarehouseService;
	
	/**
	 * 分页列表查询
	 *
	 * @param basWarehouse
	 * @param pageNo
	 * @param pageSize
	 * @param req
	 * @return
	 */
	@GetMapping(value = "/rootList")
	public Result<?> queryPageList(BasWarehouse basWarehouse,
								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
								   HttpServletRequest req) {
		String parentId = basWarehouse.getPid();
		if (oConvertUtils.isEmpty(parentId)) {
			parentId = "0";
		}
		basWarehouse.setPid(null);
		QueryWrapper<BasWarehouse> queryWrapper = QueryGenerator.initQueryWrapper(basWarehouse, req.getParameterMap());
		// 使用 eq 防止模糊查询
		queryWrapper.eq("pid", parentId);
		Page<BasWarehouse> page = new Page<BasWarehouse>(pageNo, pageSize);
		IPage<BasWarehouse> pageList = basWarehouseService.page(page, queryWrapper);
		return Result.ok(pageList);
	}

	 /**
      * 获取子数据
      * @param testTree
      * @param req
      * @return
      */
	@GetMapping(value = "/childList")
	public Result<?> queryPageList(BasWarehouse basWarehouse,HttpServletRequest req) {
		QueryWrapper<BasWarehouse> queryWrapper = QueryGenerator.initQueryWrapper(basWarehouse, req.getParameterMap());
		List<BasWarehouse> list = basWarehouseService.list(queryWrapper);
		return Result.ok(list);
	}
	
	
	/**
	 *   添加
	 *
	 * @param basWarehouse
	 * @return
	 */
	@PostMapping(value = "/add")
	public Result<?> add(@RequestBody BasWarehouse basWarehouse) {
		basWarehouseService.addBasWarehouse(basWarehouse);
		return Result.ok("添加成功!");
	}
	
	/**
	 *  编辑
	 *
	 * @param basWarehouse
	 * @return
	 */
	@PutMapping(value = "/edit")
	public Result<?> edit(@RequestBody BasWarehouse basWarehouse) {
		basWarehouseService.updateBasWarehouse(basWarehouse);
		return Result.ok("编辑成功!");
	}
	
	/**
	 *   通过id删除
	 *
	 * @param id
	 * @return
	 */
	@DeleteMapping(value = "/delete")
	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
		basWarehouseService.deleteBasWarehouse(id);
		return Result.ok("删除成功!");
	}
	
	/**
	 *  批量删除
	 *
	 * @param ids
	 * @return
	 */
	@DeleteMapping(value = "/deleteBatch")
	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
		this.basWarehouseService.removeByIds(Arrays.asList(ids.split(",")));
		return Result.ok("批量删除成功!");
	}
	
	/**
	 * 通过id查询
	 *
	 * @param id
	 * @return
	 */
	@GetMapping(value = "/queryById")
	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
		BasWarehouse basWarehouse = basWarehouseService.getById(id);
		if(basWarehouse==null) {
			return Result.error("未找到对应数据");
		}
		return Result.ok(basWarehouse);
	}

    /**
    * 导出excel
    *
    * @param request
    * @param basWarehouse
    */
    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, BasWarehouse basWarehouse) {
		return super.exportXls(request, basWarehouse, BasWarehouse.class, "仓库");
    }

    /**
      * 通过excel导入数据
    *
    * @param request
    * @param response
    * @return
    */
    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
		return super.importExcel(request, response, BasWarehouse.class);
    }

}

源码获取:博客首页 "资源" 里下载! 

;