PositionAction.java
2.12 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
package com.cjs.site.action.user.pick;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.cjs.site.biz.user.pick.PositionBiz;
import com.cjs.site.dao.user.pick.PickPackDao;
import com.cjs.site.dao.user.pick.PickPackageDao;
import com.cjs.site.dao.user.pick.WarehouseDao;
import com.cjs.site.util.t2.T2Result;
import com.cjs.site.util.web.ActionUtil;
/**
* 持仓列表
*
* @author tongyufu
*
*/
@Controller
@RequestMapping("/user")
public class PositionAction {
Logger log = LogManager.getLogger();
@Autowired
private PositionBiz positionBiz;
@Autowired
private PickPackDao pickPackDao;
@Autowired
private PickPackageDao pickPackageDao;
@Autowired
private WarehouseDao warehouseDao;
/**持仓列表*/
@RequestMapping("position")
public String position(Model model) {
T2Result result = positionBiz.positionSelf(ActionUtil.getUser());
model.addAttribute("positions", result.getData());
return "user/pick/position.jsp";
}
/**持仓列表(封装)*/
@RequestMapping("position/pack")
public String packPosition(Model model) {
model.addAttribute("positions", positionBiz.packPosition(ActionUtil.getUser()));
model.addAttribute("pickPacks", pickPackDao.queryAll());
model.addAttribute("pickPackages", pickPackageDao.queryAll());
return "user/pick/packPosition.jsp";
}
/**持仓列表(网点自提)*/
@RequestMapping("position/warehouse")
public String warehousePosition(@RequestParam String warehouseCode, Model model) {
model.addAttribute("warehouse", warehouseDao.queryByCode(warehouseCode));
model.addAttribute("positions",
positionBiz.warehousePosition(ActionUtil.getUser(), warehouseCode));
return "user/pick/warehousePosition.jsp";
}
}