|
|
@ -650,7 +650,7 @@ public class AMHandServiceImpl implements AMHandService { |
|
|
|
String device_code = MapUtil.getStr(reqParam, "device_code"); |
|
|
|
String material_type = MapUtil.getStr(reqParam, "material_type"); |
|
|
|
String type = MapUtil.getStr(reqParam, "type"); |
|
|
|
String status = MapUtil.getStr(reqParam, "status"); |
|
|
|
String status = "0"; |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
if (StrUtil.isEmpty(type)) { |
|
|
|
jo.put("code", "0"); |
|
|
@ -662,15 +662,14 @@ public class AMHandServiceImpl implements AMHandService { |
|
|
|
jo.put("desc", "失败,设备号不能为空!"); |
|
|
|
return jo; |
|
|
|
} |
|
|
|
if (StrUtil.isNotEmpty(material_type) && StrUtil.equals(status, "0")) { |
|
|
|
jo.put("code", "0"); |
|
|
|
jo.put("desc", "失败,点位带有物料信息与无货状态不符合!"); |
|
|
|
return jo; |
|
|
|
} else if (StrUtil.isEmpty(material_type) && !StrUtil.equals(status, "0")) { |
|
|
|
if (StrUtil.isEmpty(material_type)) { |
|
|
|
jo.put("code", "0"); |
|
|
|
jo.put("desc", "失败,点位无物料信息与有货状态不符合!"); |
|
|
|
jo.put("desc", "失败,当前物料不能为空!"); |
|
|
|
return jo; |
|
|
|
} |
|
|
|
if (StrUtil.equals(material_type, "1")) { |
|
|
|
status = "1"; |
|
|
|
} |
|
|
|
JSONObject map = new JSONObject(); |
|
|
|
if (StrUtil.equals(type, "0")) { |
|
|
|
map.put("material_type", ""); |
|
|
|