|
@ -90,7 +90,7 @@ public class PadController { |
|
|
public ResponseEntity<JSONObject> point(@RequestBody JSONObject param) { |
|
|
public ResponseEntity<JSONObject> point(@RequestBody JSONObject param) { |
|
|
// 参数校验
|
|
|
// 参数校验
|
|
|
String regionId = param.getString("region"); |
|
|
String regionId = param.getString("region"); |
|
|
if (StrUtil.isEmpty(regionId)) { |
|
|
if (StrUtil.isBlank(regionId)) { |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("desc", "区域不能为空"); |
|
|
resultJSON.put("desc", "区域不能为空"); |
|
@ -111,15 +111,15 @@ public class PadController { |
|
|
@ApiOperation("查询物料") |
|
|
@ApiOperation("查询物料") |
|
|
public ResponseEntity<JSONObject> material(@RequestBody JSONObject param) { |
|
|
public ResponseEntity<JSONObject> material(@RequestBody JSONObject param) { |
|
|
// 参数校验
|
|
|
// 参数校验
|
|
|
String point_id = param.getString("device_id"); |
|
|
String pointId = param.getString("device_id"); |
|
|
if (StrUtil.isEmpty(point_id)) { |
|
|
if (StrUtil.isBlank(pointId)) { |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("desc", "点位不能为空"); |
|
|
resultJSON.put("desc", "点位不能为空"); |
|
|
return new ResponseEntity<>(resultJSON, HttpStatus.OK); |
|
|
return new ResponseEntity<>(resultJSON, HttpStatus.OK); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return new ResponseEntity<>(padService.material(point_id), HttpStatus.OK); |
|
|
return new ResponseEntity<>(padService.material(pointId), HttpStatus.OK); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -136,7 +136,7 @@ public class PadController { |
|
|
public ResponseEntity<JSONObject> bindPoint(@RequestBody JSONObject param) { |
|
|
public ResponseEntity<JSONObject> bindPoint(@RequestBody JSONObject param) { |
|
|
// 参数校验
|
|
|
// 参数校验
|
|
|
String type = param.getString("type"); |
|
|
String type = param.getString("type"); |
|
|
if (StrUtil.isEmpty(type)) { |
|
|
if (StrUtil.isBlank(type)) { |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("desc", "操作类型不能为空"); |
|
|
resultJSON.put("desc", "操作类型不能为空"); |
|
@ -144,14 +144,14 @@ public class PadController { |
|
|
} |
|
|
} |
|
|
String pointCode = param.getString("device_code"); |
|
|
String pointCode = param.getString("device_code"); |
|
|
String materialType = param.getString("material_type"); |
|
|
String materialType = param.getString("material_type"); |
|
|
if (StrUtil.equals(type, "1")) { |
|
|
if ("1".equals(type)) { |
|
|
if (StrUtil.isEmpty(pointCode)) { |
|
|
if (StrUtil.isBlank(pointCode)) { |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("desc", "设备不能为空"); |
|
|
resultJSON.put("desc", "设备不能为空"); |
|
|
return new ResponseEntity<>(resultJSON, HttpStatus.OK); |
|
|
return new ResponseEntity<>(resultJSON, HttpStatus.OK); |
|
|
} |
|
|
} |
|
|
if (StrUtil.isEmpty(materialType)) { |
|
|
if (StrUtil.isBlank(materialType)) { |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
JSONObject resultJSON = new JSONObject(); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("code", "0"); |
|
|
resultJSON.put("desc", "物料不能为空"); |
|
|
resultJSON.put("desc", "物料不能为空"); |
|
|