MobileBatchReceiptController.java
3.88 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//package com.huaheng.mobile.receipt;
//
//import com.alibaba.fastjson.JSONException;
//import com.huaheng.common.core.web.controller.BaseController;
//import com.huaheng.common.core.web.domain.AjaxResult;
//import com.huaheng.config.api.RemoteLocationService;
//import com.huaheng.config.api.RemoteMaterialService;
//import com.huaheng.config.api.domain.Material;
//import com.huaheng.receipt.api.RemoteReceiptHeaderService;
//import com.huaheng.receipt.api.domain.ReceiptHeader;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.math.BigDecimal;
//import java.text.SimpleDateFormat;
//import java.util.*;
//
///**
// *
// * @author Enzo Cotter
// * @date 2019/12/15
// */
//@CrossOrigin
//@RestController
//@RequestMapping("/mobile/receipt/batch")
//@Api(tags = {"移动端收货"}, value = "移动端收货MobileBatchReceiptController")
//public class MobileBatchReceiptController extends BaseController {
//
// @Resource
// private RemoteMaterialService materialService;
// @Resource
// private RemoteReceiptHeaderService receiptHeaderService;
// @Resource
// private RemoteLocationService locationService;
//
//
// @PostMapping("/getLatestMaterial")
// @ApiOperation("移动端获取物料信息")
// public AjaxResult getLatestMaterial(@RequestBody @ApiParam(value = "物料号") Map<String, String> param) throws Exception {
// List<Material> materials = materialService.findLatest();
// if (materials == null) {
// return AjaxResult.error("没有找到物料");
// }
//
// return AjaxResult.success(materials);
// }
//
// @PostMapping("/getLatestReceipt")
// @ApiOperation("移动端获取入库单")
// public AjaxResult getLatestReceipt(@RequestBody @ApiParam(value = "物料号") Map<String, String> param) throws Exception {
//
// List<ReceiptHeader> receiptHeaders = receiptHeaderService.getLatestReceipt(param.get("warehouseCode"), param.get("companyCode"));
// if (receiptHeaders == null) {
// return AjaxResult.error("没有找到入库单");
// }
// return AjaxResult.success(receiptHeaders);
// }
//
//
//
//// @PostMapping("/checkLocation")
//// @ApiOperation("移动端验证库位")
//// public AjaxResult checkLocation(@RequestBody @ApiParam(value = "物料号") Map<String, String> param) throws Exception {
//// if (param.get("code") == null || param.get("code").trim().length() < 1) {
//// throw new JSONException("容器号(code)不能为空");
//// }
//// boolean result = locationService.checkLocation(param.get("code"));
//// if (!result) {
//// return AjaxResult.error("没有该库位");
//// }
//// return AjaxResult.success(result);
//// }
////
//// @PostMapping("/getFreeLocation")
//// @ApiOperation("移动端获得空闲库位")
//// public AjaxResult getFreeLocation(@RequestBody @ApiParam(value = "物料号") Map<String, String> param) throws Exception {
//// if (param.get("materialCode") == null || param.get("materialCode").trim().length() < 1) {
//// throw new JSONException("materialCode不能为空");
//// }
////
//// if (param.get("batch") == null || param.get("batch").trim().length() < 1) {
//// throw new JSONException("batch不能为空");
//// }
//// String materialCode = param.get("materialCode");
//// String batch = param.get("batch");
//// boolean result = locationService.getFreeLocation(materialCode, batch);
//// if (!result) {
//// return AjaxResult.error("没有空闲的分区库位");
//// }
//// return AjaxResult.success(result);
//// }
//
//
//}