|
|
|
@ -96,6 +96,15 @@ public class DeviceMAOrderServiceImpl implements DeviceMAOrderService {
|
|
|
|
|
if (null == deviceMAOrderEntity.getId() || StrUtil.isBlank(deviceMAOrderEntity.getOrderId())) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
|
|
|
|
}
|
|
|
|
|
if (deviceMAOrderEntity.getStatus() == 1) {
|
|
|
|
|
//完成养护记录更新,查询此条养护记录详情中是否存在未养护完成设备
|
|
|
|
|
List<DeviceMAOrderDetailEntity> detailList = deviceMaOrderDetailDao.selectByOrderId(deviceMAOrderEntity.getOrderId());
|
|
|
|
|
for (DeviceMAOrderDetailEntity deviceMAOrderDetailEntity : detailList) {
|
|
|
|
|
if (deviceMAOrderDetailEntity.getMaintenanceStatus() == 0) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "存在未养护设备,请完成该设备养护!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
deviceMAOrderDao.updateByPrimaryKey(deviceMAOrderEntity);
|
|
|
|
|
return ResultVOUtils.success("更新成功");
|
|
|
|
|
}
|
|
|
|
|