| | |
| | | import com.wgcloud.entity.FailureLogging; |
| | | import com.wgcloud.service.FailureLoggingService; |
| | | import com.wgcloud.service.LogInfoService; |
| | | import com.wgcloud.service.WorkLoggingService; |
| | | import com.wgcloud.util.HostUtil; |
| | | import com.wgcloud.util.PageUtil; |
| | | import com.wgcloud.util.staticvar.StaticKeys; |
| | |
| | | private FailureLoggingService failureLoggingService; |
| | | @Resource |
| | | private LogInfoService logInfoService; |
| | | |
| | | @Resource |
| | | private WorkLoggingService workLoggingService; |
| | | /** |
| | | * 根据条件查询设备列表 |
| | | * |
| | |
| | | logger.error("查询设备更换列表错误", e); |
| | | logInfoService.save("查询资产信息错误", e.toString(), StaticKeys.LOG_XTCZ); |
| | | } |
| | | return "failurelogging/list"; |
| | | return "failog/list"; |
| | | } |
| | | |
| | | @RequestMapping(value = "save") |
| | |
| | | if (StringUtils.isEmpty(failureLogging.getId())) { |
| | | failureLoggingService.save(failureLogging); |
| | | failureLoggingService.saveLog(request, StaticKeys.LOG_ADD, failureLogging); |
| | | workLoggingService.save(failureLogging); |
| | | } else { |
| | | failureLoggingService.updateById(failureLogging); |
| | | failureLoggingService.saveLog(request, StaticKeys.LOG_UPDATE, failureLogging); |
| | | workLoggingService.update(failureLogging); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("保存设备更换数据错误", e); |
| | |
| | | if (StringUtils.isEmpty(id)) { |
| | | model.addAttribute("failureLogging", failureLogging); |
| | | |
| | | return "failureLogging/add"; |
| | | return "failog/add"; |
| | | } |
| | | failureLogging = failureLoggingService.selectById(id); |
| | | model.addAttribute("failureLogging", failureLogging); |
| | |
| | | logger.error(errorMsg, e); |
| | | logInfoService.save(errorMsg, e.toString(), StaticKeys.LOG_XTCZ); |
| | | } |
| | | return "failurelogging/add"; |
| | | return "failog/add"; |
| | | } |
| | | |
| | | /** |
| | |
| | | logger.error(errorMsg, e); |
| | | logInfoService.save(errorMsg, e.toString(), StaticKeys.LOG_XTCZ); |
| | | } |
| | | return "failurelogging/view"; |
| | | return "failog/view"; |
| | | } |
| | | |
| | | |