|
|
@@ -8,6 +8,8 @@ import java.util.Map;
|
|
8
|
8
|
import javax.annotation.Resource;
|
|
9
|
9
|
|
|
10
|
10
|
import org.apache.commons.lang.ObjectUtils;
|
|
|
11
|
+import org.slf4j.Logger;
|
|
|
12
|
+import org.slf4j.LoggerFactory;
|
|
11
|
13
|
import org.springframework.stereotype.Service;
|
|
12
|
14
|
|
|
13
|
15
|
import com.alibaba.fastjson.JSONArray;
|
|
|
@@ -19,6 +21,8 @@ import com.chinaitop.utils.ParameterUtil;
|
|
19
|
21
|
@Service
|
|
20
|
22
|
public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
|
|
21
|
23
|
|
|
|
24
|
+ final static Logger logger = LoggerFactory.getLogger(BasicWarehouse.class);
|
|
|
25
|
+
|
|
22
|
26
|
@Resource
|
|
23
|
27
|
private BasicWarehouseMapper warehouseMapper;
|
|
24
|
28
|
|
|
|
@@ -27,6 +31,8 @@ public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
|
|
27
|
31
|
public String uploadCfStatus(String json) {
|
|
28
|
32
|
Map<String, Object> result = new HashMap<String, Object>();
|
|
29
|
33
|
|
|
|
34
|
+ String date = ParameterUtil.getSysDateTime();
|
|
|
35
|
+ logger.info("时间:"+date+",出入库状态回写接口,出入库系统调用,接收参数是:"+json);
|
|
30
|
36
|
try {
|
|
31
|
37
|
if (null != json) {
|
|
32
|
38
|
/* 将获取到的json串转换成json数组 */
|
|
|
@@ -42,8 +48,14 @@ public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
|
|
42
|
48
|
continue;
|
|
43
|
49
|
}
|
|
44
|
50
|
|
|
|
51
|
+ //仓房ID(云南没有油罐的业务,不用判断是否是油罐)
|
|
|
52
|
+ String houseId = ObjectUtils.toString(json_object.get("chId"), "");
|
|
45
|
53
|
//货位ID(云南没有油罐的业务,不用判断是否是油罐)
|
|
46
|
54
|
String wareId = ObjectUtils.toString(json_object.get("hwId"), "");
|
|
|
55
|
+ //如果是油罐,那么调过
|
|
|
56
|
+ if (houseId.equals(wareId)) {
|
|
|
57
|
+ continue;
|
|
|
58
|
+ }
|
|
47
|
59
|
//单位ID
|
|
48
|
60
|
String orgId = ObjectUtils.toString(json_object.get("org_Id"), "");
|
|
49
|
61
|
//货位状态值1空仓,2入库中,3封仓,4出库中,9其它
|
|
|
@@ -86,10 +98,12 @@ public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
|
|
86
|
98
|
}
|
|
87
|
99
|
result.put("success", "true");
|
|
88
|
100
|
result.put("msg", "上传成功");
|
|
|
101
|
+ logger.info("时间:"+date+",出入库状态回写接口,出入库系统调用,调用成功!");
|
|
89
|
102
|
} catch (NumberFormatException e) {
|
|
90
|
103
|
e.printStackTrace();
|
|
91
|
104
|
result.put("success", "false");
|
|
92
|
105
|
result.put("msg", "上传失败");
|
|
|
106
|
+ logger.info("时间:"+date+",出入库状态回写接口,出入库系统调用,调用失败!");
|
|
93
|
107
|
}
|
|
94
|
108
|
finally {
|
|
95
|
109
|
JSONArray jsonArray = new JSONArray();
|