|
@@ -0,0 +1,65 @@
|
|
|
+package com.qs.mp.web.controller.api.admin;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.qs.mp.admin.domain.param.ChannelGoodsOrderQueryParam;
|
|
|
+import com.qs.mp.channel.domain.ChannelGoodsOrder;
|
|
|
+import com.qs.mp.channel.domain.vo.ChannelGoodsOrderSettleVO;
|
|
|
+import com.qs.mp.channel.domain.vo.ChannelGoodsSettleVO;
|
|
|
+import com.qs.mp.channel.service.IChannelGoodsOrderService;
|
|
|
+import com.qs.mp.channel.service.IChannelGoodsService;
|
|
|
+import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
+import com.qs.mp.common.core.page.TableDataInfo;
|
|
|
+import com.qs.mp.web.controller.common.BaseApiController;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 结算门店采购商品
|
|
|
+ * @author zhangkaikai
|
|
|
+ * @create 2023-06-07 2:18 PM
|
|
|
+ **/
|
|
|
+@Api(tags = "门店库存管理")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/api/v1/mp/admin/channel/goods/*")
|
|
|
+public class ChannelGoodsSettleMgrController extends BaseApiController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IChannelGoodsOrderService channelGoodsOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IChannelGoodsService channelGoodsService;
|
|
|
+
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "门店库存结算列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('business:goods:list')")
|
|
|
+ public TableDataInfo list(@RequestBody ChannelGoodsOrderQueryParam queryParam) {
|
|
|
+ startPage();
|
|
|
+ QueryWrapper<ChannelGoodsOrder> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq(null != queryParam && StringUtils.isNotBlank(queryParam.getOrderId()), "t1.order_id", queryParam.getOrderId());
|
|
|
+ queryWrapper.eq(null != queryParam && null != queryParam.getStatus(), "t1.`channel_id`", queryParam.getChannelId());
|
|
|
+ queryWrapper.eq(null != queryParam && StringUtils.isNotBlank(queryParam.getTel()), "t1.`tel`", queryParam.getTel());
|
|
|
+ queryWrapper.eq(null != queryParam && null != queryParam.getSettleStatus(), "t2.status", queryParam.getSettleStatus());
|
|
|
+ queryWrapper.ge(null != queryParam && null != queryParam.getMinStock(), "t2.remain_qty", queryParam.getMinStock());
|
|
|
+ queryWrapper.le(null != queryParam && null != queryParam.getMaxStock(), "t2.remain_qty", queryParam.getMaxStock());
|
|
|
+ queryWrapper.ge(null != queryParam && null != queryParam.getStartTime(), "t1.created_time", queryParam.getStartTime());
|
|
|
+ queryWrapper.le(null != queryParam && null != queryParam.getEndTime(), "t1.created_time", queryParam.getEndTime());
|
|
|
+ queryWrapper.like(null != queryParam && StringUtils.isNotBlank(queryParam.getTitle()), "t2.title", queryParam.getTitle());
|
|
|
+ queryWrapper.orderByDesc("t1.created_time", "t1.order_id");
|
|
|
+
|
|
|
+ List<ChannelGoodsSettleVO> channelGoodsOrderSettleVOS = channelGoodsOrderService.selectChannelGoodsSettleList(queryWrapper);
|
|
|
+
|
|
|
+ return getDataTable(new ArrayList<>());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|