TvScController.java
2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package com.huaheng.api.tv.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.huaheng.api.tv.service.TvSCService;
import com.huaheng.common.constant.QuantityConstant;
import com.huaheng.common.utils.DateUtils;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.config.location.domain.Location;
import com.huaheng.pc.config.location.service.LocationService;
import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction;
import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService;
import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 四川看板
*/
@RestController
@RequestMapping("/API/WMS/v2")
public class TvScController extends BaseController {
@Resource
private TaskHeaderService taskHeaderService;
@Resource
private LocationService locationService;
@Resource
private InventoryDetailService inventoryDetailService;
@Resource
private InventoryTransactionService inventoryTransactionService;
@Resource
private TvSCService tvSCService;
/**
* 顶部信息统计
*
* @param warehouseCode 仓库编码
* @return
*/
@GetMapping("tvTopNum")
@ApiOperation("获取电视信息")
@ResponseBody
@CrossOrigin
public AjaxResult tvTopNum(String warehouseCode) {
if (StringUtils.isEmpty(warehouseCode)) {
return AjaxResult.error("请填写仓库");
}
return tvSCService.getTopData(warehouseCode);
}
/**
* 7天任务情况
*
* @param warehouseCode
* @return
*/
@GetMapping("taskByWeek")
@ApiOperation("获取电视信息")
@ResponseBody
@CrossOrigin
public AjaxResult taskByWeek(String warehouseCode) {
if (StringUtils.isEmpty(warehouseCode)) {
return AjaxResult.error("请填写仓库");
}
return tvSCService.taskOfWeek(warehouseCode);
}
}