TrustApplySupplementAction.java
2.05 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.cms.action.ration;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.cjs.cms.biz.ration.TrustApplySupplementBiz;
import com.cjs.cms.dao.ration.OtcTrustEECodeDao;
import com.cjs.cms.dao.ration.TrustApplySupplementDao;
import com.cjs.cms.model.ration.OtcTrusteeCodeInfo;
import com.cjs.cms.util.lang.JsonUtil;
import com.cjs.cms.util.lang.PageUtils;
import com.cjs.cms.util.web.ActionUtil;
/**
* 补货托管
*
* @author tongyufu
*
*/
@RestController
@RequestMapping("/ration/supplement")
public class TrustApplySupplementAction {
@Autowired
private OtcTrustEECodeDao otcTrustEECodeDao;
@Autowired
private TrustApplySupplementDao trustApplySupplementDao;
@Autowired
private TrustApplySupplementBiz trustApplySupplementBiz;
/**搜索补货托管配置*/
@RequestMapping("search")
public String search(@RequestParam Map<String, Object> params) {
PageUtils.processOralcePage(params);
return JsonUtil.toPageJson(otcTrustEECodeDao.search(params),
otcTrustEECodeDao.searchTotal(params));
}
/**搜索补货托管记录*/
@RequestMapping("searchRecord")
public String searchRecord(@RequestParam Map<String, Object> params) {
PageUtils.processOralcePage(params);
return JsonUtil.toPageJson(trustApplySupplementDao.search(params),
trustApplySupplementDao.searchTotal(params));
}
/**修改入库总量*/
@RequestMapping("updateTotalAmount")
public String updateTotalAmount(OtcTrusteeCodeInfo otcTrusteeCodeInfo) {
return trustApplySupplementBiz.updateTotalAmount(otcTrusteeCodeInfo,
ActionUtil.getUser().getUsername());
}
@RequestMapping("queryByOtcCode")
public OtcTrusteeCodeInfo queryByOtcCode(String otcCode) {
return otcTrustEECodeDao.queryByOtcCode(otcCode);
}
}