Commit 49a71d54 by xiaoyj

解决空指针异常

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21984 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 6e98baf1
...@@ -57,6 +57,10 @@ public class DeviceCtroller { ...@@ -57,6 +57,10 @@ public class DeviceCtroller {
} }
//判断设备数量是否超出订货单数量 //判断设备数量是否超出订货单数量
SysIndent sysIndent=indentService.getByIndentNo(indentNo); SysIndent sysIndent=indentService.getByIndentNo(indentNo);
if(sysIndent==null){
return new ResultObject(ResultCodeEnum.INDENT_NOT_EXIST.getCode(), ResultCodeEnum.INDENT_NOT_EXIST.getMsg());
}
if(deviceNos.size()>sysIndent.getDeviceAmount()){ if(deviceNos.size()>sysIndent.getDeviceAmount()){
return new ResultObject(ResultCodeEnum.DEVICE_MOUNT_ERROR.getCode(),ResultCodeEnum.DEVICE_MOUNT_ERROR.getMsg()); return new ResultObject(ResultCodeEnum.DEVICE_MOUNT_ERROR.getCode(),ResultCodeEnum.DEVICE_MOUNT_ERROR.getMsg());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!