pref_mail@163.com
6 months ago
4 changed files with 152 additions and 5 deletions
@ -0,0 +1,81 @@
|
||||
package com.logpm.distribution.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.logpm.basicdata.entity.BasicdataClientUserEntity; |
||||
import com.logpm.basicdata.feign.IBasicdataClientClient; |
||||
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
||||
import com.logpm.distribution.entity.DistributionStockArticleEntity; |
||||
import com.logpm.distribution.excel.DistributionStockArticleExcel; |
||||
import com.logpm.distribution.excel.DistributionStockListExcel; |
||||
import com.logpm.distribution.service.IDistributionStockArticleService; |
||||
import com.logpm.distribution.service.IDistributionStockListService; |
||||
import com.logpm.distribution.vo.DistributionStockArticleVO; |
||||
import com.logpm.distribution.vo.DistributionStockListVO; |
||||
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* 商家库存品控制器 |
||||
* @date 2019/07/01 |
||||
* @author pref |
||||
*/ |
||||
@RestController |
||||
@Slf4j |
||||
@AllArgsConstructor |
||||
@RequestMapping("/mall/stock") |
||||
@Api(value = "商场库存品", tags = "商场库存品") |
||||
public class MallStockController extends BladeController { |
||||
private final IDistributionStockArticleService distributionStockArticleService; |
||||
|
||||
private final IBasicdataClientClient basicdataClientClient; |
||||
|
||||
private final IDistributionStockListService distributionStockListService; |
||||
|
||||
private IBasicdataWarehouseClient warehouseClient; |
||||
/** |
||||
* 库存品管理 商城客户查询列表 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入distributionStockList") |
||||
public R<IPage<DistributionStockListVO>> page(@ApiIgnore @RequestParam Map<String, Object> distributionStockList, Query query) { |
||||
IPage<DistributionStockListVO> pages = distributionStockListService.pageClient(Condition.getPage(query), distributionStockList); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@GetMapping("/export-stock") |
||||
@ApiOperationSupport(order = 9) |
||||
@ApiOperation(value = "导出在库库存品数据") |
||||
public void exportStock(@ApiIgnore @RequestParam Map<String, Object> distributionStockList, BladeUser bladeUser, HttpServletResponse response) { |
||||
|
||||
List<DistributionStockListExcel> list = distributionStockListService.exportStock(distributionStockList); |
||||
ExcelUtil.export(response, "商场库存品管理数据" + DateUtil.time(), "商场库存品管理数据表", list, DistributionStockListExcel.class); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue