fix:修改acs上报设备错误接口返回
This commit is contained in:
@@ -1054,16 +1054,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Override
|
||||
public JSONObject errorDeviceRecord(JSONObject param) {
|
||||
String error = param.getString("error");
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", org.springframework.http.HttpStatus.OK.value());
|
||||
result.put("message", "故障上报完成!");
|
||||
if(StringUtils.isNotEmpty(error) && "0".equals(error)){
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
DasDeviceErrorRecord dasDeviceErrorRecord = new DasDeviceErrorRecord();
|
||||
dasDeviceErrorRecord.setDevice_code(param.getString("device_code"));
|
||||
dasDeviceErrorRecord.setError(param.getString("error"));
|
||||
dasDeviceErrorRecordService.create(dasDeviceErrorRecord);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("status", org.springframework.http.HttpStatus.OK.value());
|
||||
result.put("message", "故障上报完成!");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user