| | |
| | | package com.moral.monitor.controller;
|
| | |
|
| | | import com.moral.monitor.entity.MonitorPoint;
|
| | | import com.moral.monitor.entity.Monitorpoint;
|
| | | import com.moral.monitor.entity.QueryHelper;
|
| | | import com.moral.monitor.service.MonitorPointService;
|
| | | import com.moral.monitor.service.MonitorpointService;
|
| | | import org.apache.commons.logging.Log;
|
| | | import org.apache.commons.logging.LogFactory;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestParam;
|
| | | import org.springframework.web.bind.annotation.ResponseBody;
|
| | | import javax.annotation.Resource;
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
| | |
|
| | | private static final Log log = LogFactory.getLog(MonitorPointController.class);
|
| | |
|
| | | @Resource
|
| | | MonitorPointService monitorPointService;
|
| | | @Autowired
|
| | | MonitorpointService monitorPointService;
|
| | |
|
| | | @RequestMapping("/findAllMonitorpoint")
|
| | | @ResponseBody
|
| | |
| | | }
|
| | |
|
| | | LinkedHashMap<String, Object> s = new LinkedHashMap<String, Object>();
|
| | | List<MonitorPoint> equs = monitorPointService.allMonitorPoint(queryHelper);
|
| | | List<Monitorpoint> equs = monitorPointService.allMonitorpoint(queryHelper);
|
| | | s.put("rows",equs);
|
| | |
|
| | | int total = monitorPointService.monitorCount(queryHelper);
|
| | |
| | |
|
| | | @RequestMapping("/addMonitorpoint")
|
| | | @ResponseBody
|
| | | public String addMonitorpoint(@RequestBody MonitorPoint monitorPoint){
|
| | | public String addMonitorpoint(@RequestBody Monitorpoint monitorPoint){
|
| | |
|
| | | try {
|
| | | String name = monitorPoint.getName();
|
| | |
| | |
|
| | | @RequestMapping("/editMonitorPoint")
|
| | | @ResponseBody
|
| | | public String editMonitorPoint(@RequestBody MonitorPoint monitorPoint){
|
| | | public String editMonitorPoint(@RequestBody Monitorpoint monitorPoint){
|
| | | try {
|
| | | monitorPointService.updateMonitorpoint(monitorPoint);
|
| | | }catch (Exception e){
|