11 files modified
9 files added
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.system.entity.DictBiz; |
| | | import org.springblade.modules.system.service.IDictBizService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import org.springblade.modules.stock.vo.StockVO; |
| | | import org.springblade.modules.stock.service.IStockService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农资库存表 控制器 |
| | |
| | | public class StockController extends BladeController { |
| | | |
| | | private final IStockService stockService; |
| | | |
| | | private final IDictBizService dictService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入stock") |
| | | public R<IPage<StockVO>> page(StockVO stock, Query query) { |
| | | IPage<StockVO> pages = stockService.selectStockPage(Condition.getPage(query), stock); |
| | | IPage<StockVO> pages = stockService.seletList(Condition.getPage(query), stock); |
| | | for (int i=0;i<pages.getRecords().size();i++){ |
| | | String specs = pages.getRecords().get(i).getSpecs(); |
| | | String dic1 = pages.getRecords().get(i).getDic1(); |
| | | String dic2 = pages.getRecords().get(i).getDic2(); |
| | | String s = specs+dic1 +"/"+ dic2; |
| | | pages.getRecords().get(i).setSpn(s); |
| | | |
| | | } |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入stock") |
| | | public R save(@Valid @RequestBody Stock stock) { |
| | | stock.setState("0"); |
| | | stock.setSp1("stockSpecs1"); |
| | | stock.setSp2("stockSpecs2"); |
| | | return R.status(stockService.save(stock)); |
| | | } |
| | | |
| | |
| | | return R.status(stockService.saveOrUpdate(stock)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 农资库存表 |
| | | */ |
| | |
| | | return R.status(stockService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * 农资库存表实体类 |
| | |
| | | /** |
| | | * 农资ID |
| | | */ |
| | | private String stockId; |
| | | private String stockId; |
| | | /** |
| | | * 规格 |
| | | */ |
| | | private Double specs; |
| | | private String specs; |
| | | /** |
| | | * 规格值(0:克 1:斤 2:公斤 3:吨 4:毫升 5:升 ) |
| | | */ |
| | |
| | | /** |
| | | * 入库时间 |
| | | */ |
| | | private LocalDateTime time; |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date time; |
| | | /** |
| | | * 图片 |
| | | */ |
| | |
| | | * 状态 (0:有库存 1:没有库存) |
| | | */ |
| | | private String state; |
| | | private String sp1; |
| | | private String sp2; |
| | | |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<StockVO> selectStockPage(IPage page, StockVO stock); |
| | | List<StockVO> seletList(IPage page, StockVO stock); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | IPage<StockVO> selectStockPage(IPage<StockVO> page, StockVO stock); |
| | | IPage<StockVO> seletList(IPage<StockVO> page, StockVO stock); |
| | | |
| | | } |
| | |
| | | return page.setRecords(baseMapper.selectStockPage(page, stock)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<StockVO> seletList(IPage<StockVO> page, StockVO stock) { |
| | | return page.setRecords(baseMapper.seletList(page,stock)); |
| | | } |
| | | |
| | | } |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockVO extends Stock { |
| | | private static final long serialVersionUID = 1L; |
| | | String stype; |
| | | String factoryName; |
| | | String dic1; |
| | | String dic2; |
| | | String spn; |
| | | |
| | | } |
| | |
| | | return R.status(stockfactoryService.saveOrUpdate(stockfactory)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除 农资厂家表 |
| | | */ |
| | |
| | | return R.status(stockfactoryService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/selectStockFa") |
| | | public R selectStockFa() { |
| | | return R.data(stockfactoryService.selectStockFa()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<StockfactoryVO> selectStockfactoryPage(IPage page, StockfactoryVO stockfactory); |
| | | |
| | | List selectStockFa(); |
| | | } |
| | |
| | | select * from sys_stockfactory where is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="selectStockFa" resultType="java.util.HashMap"> |
| | | select id as dictKey,agricultural_name as dictValue from sys_stockfactory where is_deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农资厂家表 服务类 |
| | | * |
| | |
| | | * @return |
| | | */ |
| | | IPage<StockfactoryVO> selectStockfactoryPage(IPage<StockfactoryVO> page, StockfactoryVO stockfactory); |
| | | |
| | | List selectStockFa(); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 农资厂家表 服务实现类 |
| | | * |
| | |
| | | return page.setRecords(baseMapper.selectStockfactoryPage(page, stockfactory)); |
| | | } |
| | | |
| | | @Override |
| | | public List selectStockFa() { |
| | | return baseMapper.selectStockFa(); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.stockrecord.entity.Stockrecord; |
| | | import org.springblade.modules.stockrecord.vo.StockrecordVO; |
| | | import org.springblade.modules.stockrecord.service.IStockrecordService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | /** |
| | | * 出入库记录 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/stockrecord/stockrecord") |
| | | @Api(value = "出入库记录", tags = "出入库记录接口") |
| | | public class StockrecordController extends BladeController { |
| | | |
| | | private final IStockrecordService stockrecordService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入stockrecord") |
| | | public R<Stockrecord> detail(Stockrecord stockrecord) { |
| | | Stockrecord detail = stockrecordService.getOne(Condition.getQueryWrapper(stockrecord)); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 分页 出入库记录 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入stockrecord") |
| | | public R<IPage<Stockrecord>> list(Stockrecord stockrecord, Query query) { |
| | | IPage<Stockrecord> pages = stockrecordService.page(Condition.getPage(query), Condition.getQueryWrapper(stockrecord)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 出入库记录 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入stockrecord") |
| | | public R<IPage<StockrecordVO>> page(StockrecordVO stockrecord, Query query) { |
| | | IPage<StockrecordVO> pages = stockrecordService.selectStockrecordPage(Condition.getPage(query), stockrecord); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 新增 出入库记录 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入stockrecord") |
| | | public R save(@Valid @RequestBody Stockrecord stockrecord) { |
| | | return R.status(stockrecordService.save(stockrecord)); |
| | | } |
| | | |
| | | /** |
| | | * 修改 出入库记录 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入stockrecord") |
| | | public R update(@Valid @RequestBody Stockrecord stockrecord) { |
| | | return R.status(stockrecordService.updateById(stockrecord)); |
| | | } |
| | | |
| | | /** |
| | | * 新增或修改 出入库记录 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入stockrecord") |
| | | public R submit(@Valid @RequestBody Stockrecord stockrecord) { |
| | | return R.status(stockrecordService.saveOrUpdate(stockrecord)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 出入库记录 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(stockrecordService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.dto; |
| | | |
| | | import org.springblade.modules.stockrecord.entity.Stockrecord; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 出入库记录数据传输对象实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockrecordDTO extends Stockrecord { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 出入库记录实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | @Data |
| | | @TableName("sys_stockrecord") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class Stockrecord extends BaseEntity { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 农资id |
| | | */ |
| | | private String stockId1; |
| | | /** |
| | | * 数量 |
| | | */ |
| | | private String amount1; |
| | | /** |
| | | * 时间 |
| | | */ |
| | | private LocalDateTime time1; |
| | | /** |
| | | * 类型 (0:出库 1:入库) |
| | | */ |
| | | private String type1; |
| | | /** |
| | | * 操作人 |
| | | */ |
| | | private String operator1; |
| | | /** |
| | | * 规格 |
| | | */ |
| | | private String spn1; |
| | | /** |
| | | * 农资类型 |
| | | */ |
| | | private String stockType1; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | private String picture1; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remarks1; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.mapper; |
| | | |
| | | import org.springblade.modules.stockrecord.entity.Stockrecord; |
| | | import org.springblade.modules.stockrecord.vo.StockrecordVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 出入库记录 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | public interface StockrecordMapper extends BaseMapper<Stockrecord> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param stockrecord |
| | | * @return |
| | | */ |
| | | List<StockrecordVO> selectStockrecordPage(IPage page, StockrecordVO stockrecord); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.springblade.modules.stockrecord.mapper.StockrecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="stockrecordResultMap" type="org.springblade.modules.stockrecord.entity.Stockrecord"> |
| | | <result column="id" property="id"/> |
| | | <result column="stock_id1" property="stockId1"/> |
| | | <result column="amount1" property="amount1"/> |
| | | <result column="time1" property="time1"/> |
| | | <result column="type1" property="type1"/> |
| | | <result column="operator1" property="operator1"/> |
| | | <result column="spn1" property="spn1"/> |
| | | <result column="stock_type1" property="stockType1"/> |
| | | <result column="picture1" property="picture1"/> |
| | | <result column="remarks1" property="remarks1"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectStockrecordPage" resultMap="stockrecordResultMap"> |
| | | select * from sys_stockrecord where is_deleted = 0 |
| | | </select> |
| | | <select id="seletList" resultType="org.springblade.modules.stock.vo.StockVO"> |
| | | SELECT st.*, |
| | | stf.type as stype, |
| | | stf.factory_name as factoryName, |
| | | d.dict_value as dic1, |
| | | c.dict_value as dic2 |
| | | FROM `sys_stock` st |
| | | LEFT JOIN sys_stockfactory stf ON st.stock_id = stf.id |
| | | LEFT JOIN (SELECT dict_key,dict_value FROM blade_dict_biz WHERE `code`='stockSpecs1' AND is_deleted=0) d ON |
| | | d.dict_key=st.specs_value1 |
| | | LEFT JOIN (SELECT dict_key,dict_value FROM blade_dict_biz WHERE `code`='stockSpecs2' AND is_deleted=0) c ON |
| | | c.dict_key=st.specs_value2 |
| | | WHERE st.is_deleted = 0 |
| | | <if test="stock.stype!=null and stock.stype != ''"> |
| | | and stf.type = #{stock.stype} |
| | | </if> |
| | | <if test="stock.specsValue1!=null and stock.specsValue1 != ''"> |
| | | and st.specs_value1 = #{stock.specsValue1} |
| | | </if> |
| | | <if test="stock.specsValue2!=null and stock.specsValue2 != ''"> |
| | | and st.specs_value2 = #{stock.specsValue2} |
| | | </if> |
| | | <if test="stock.type!=null and stock.type!= ''"> |
| | | and st.type = #{stock.type} |
| | | </if> |
| | | <if test="stock.state!=null and stock.state!= ''"> |
| | | and st.state = #{stock.state} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.service; |
| | | |
| | | import org.springblade.modules.stockrecord.entity.Stockrecord; |
| | | import org.springblade.modules.stockrecord.vo.StockrecordVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 出入库记录 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | public interface IStockrecordService extends BaseService<Stockrecord> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param stockrecord |
| | | * @return |
| | | */ |
| | | IPage<StockrecordVO> selectStockrecordPage(IPage<StockrecordVO> page, StockrecordVO stockrecord); |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.service.impl; |
| | | |
| | | import org.springblade.modules.stockrecord.entity.Stockrecord; |
| | | import org.springblade.modules.stockrecord.vo.StockrecordVO; |
| | | import org.springblade.modules.stockrecord.mapper.StockrecordMapper; |
| | | import org.springblade.modules.stockrecord.service.IStockrecordService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * 出入库记录 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | @Service |
| | | public class StockrecordServiceImpl extends BaseServiceImpl<StockrecordMapper, Stockrecord> implements IStockrecordService { |
| | | |
| | | @Override |
| | | public IPage<StockrecordVO> selectStockrecordPage(IPage<StockrecordVO> page, StockrecordVO stockrecord) { |
| | | return page.setRecords(baseMapper.selectStockrecordPage(page, stockrecord)); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.stockrecord.vo; |
| | | |
| | | import org.springblade.modules.stockrecord.entity.Stockrecord; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * 出入库记录视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-05-12 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class StockrecordVO extends Stockrecord { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524673862158118913', 1123598815738675201, 'stockrecord', '农资记录表', 'menu', '/stockrecord/stockrecord', NULL, 1, 1, 0, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524673862158118914', '1524673862158118913', 'stockrecord_add', '新增', 'add', '/stockrecord/stockrecord/add', 'plus', 1, 2, 1, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524673862158118915', '1524673862158118913', 'stockrecord_edit', '修改', 'edit', '/stockrecord/stockrecord/edit', 'form', 2, 2, 2, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524673862158118916', '1524673862158118913', 'stockrecord_delete', '删除', 'delete', '/api/stockrecord/stockrecord/remove', 'delete', 3, 2, 3, 1, NULL, 0); |
| | | INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`) |
| | | VALUES ('1524673862158118917', '1524673862158118913', 'stockrecord_view', '查看', 'view', '/stockrecord/stockrecord/view', 'file-text', 4, 2, 2, 1, NULL, 0); |