代码更新
This commit is contained in:
@@ -90,15 +90,6 @@ public class DeviceScrapServiceImpl implements DeviceScrapService {
|
|||||||
JSONObject json = fileTab.query("devicerecord_id ='" + devicerecord_id + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject json = fileTab.query("devicerecord_id ='" + devicerecord_id + "' and is_delete = '0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(json)) throw new BootstrapMethodError("档案已被删除");
|
if (ObjectUtil.isEmpty(json)) throw new BootstrapMethodError("档案已被删除");
|
||||||
|
|
||||||
String status = json.getString("status");
|
|
||||||
if (StrUtil.equals(status, "11")) {
|
|
||||||
// 需完成保养单或者维修单
|
|
||||||
JSONObject jsonMain = mainTab.query("devicerecord_id = '" + devicerecord_id + "' and is_delete = '0' and invstatus = '99'").uniqueResult(0);
|
|
||||||
JSONObject jsonRe = reTab.query("devicerecord_id = '" + devicerecord_id + "' and is_delete = '0' and invstatus = '99'").uniqueResult(0);
|
|
||||||
if (ObjectUtil.isEmpty(jsonMain) || ObjectUtil.isEmpty(jsonRe)) {
|
|
||||||
throw new BadRequestException("保养单或维修单未完成");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
json.put("status", "90");
|
json.put("status", "90");
|
||||||
json.put("update_optid", currentUserId);
|
json.put("update_optid", currentUserId);
|
||||||
json.put("update_optname", nickName);
|
json.put("update_optname", nickName);
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return this.crud.notify('设备状态不为正常或者闲置', CRUD.NOTIFICATION_TYPE.INFO)
|
return this.crud.notify('设备状态不正确,需启动设备或完成维修单及保养单', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
downloadWord() {
|
downloadWord() {
|
||||||
|
|||||||
Reference in New Issue
Block a user