Merge remote-tracking branch 'origin/master' into master
正在显示
2 个修改的文件
包含
24 行增加
和
8 行删除
... | @@ -73,7 +73,7 @@ public class TestMetricInfoController { | ... | @@ -73,7 +73,7 @@ public class TestMetricInfoController { |
73 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); | 73 | JdbcTemplate masterDB = (JdbcTemplate)SpringContextUtils.getBean("master"); |
74 | String metricInfoSql = "select ei.equipment_name , t.metric_express1 'gzExpress' , t.metric_express2 'yxExpress' ,t.metric_express3 'tzExpress' from sys_monitor_metric_info t "; | 74 | String metricInfoSql = "select ei.equipment_name , t.metric_express1 'gzExpress' , t.metric_express2 'yxExpress' ,t.metric_express3 'tzExpress' from sys_monitor_metric_info t "; |
75 | metricInfoSql += " left join equipment_info ei on ei.id = t.equipment_code "; | 75 | metricInfoSql += " left join equipment_info ei on ei.id = t.equipment_code "; |
76 | metricInfoSql += " where t.metric_type = 1 and t.depart_id = '"+departId+"' and t.equipment_code > 0 " ; | 76 | metricInfoSql += " where t.metric_type = 1 and t.depart_id = '"+departId+"' and t.equipment_code > 0 and ei.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c'" ; |
77 | List<MetricInfoVO> metricInfoVOList = masterDB.query(metricInfoSql,new BeanPropertyRowMapper<MetricInfoVO>(MetricInfoVO.class)); | 77 | List<MetricInfoVO> metricInfoVOList = masterDB.query(metricInfoSql,new BeanPropertyRowMapper<MetricInfoVO>(MetricInfoVO.class)); |
78 | 78 | ||
79 | //StringBuffer fields= new StringBuffer(); | 79 | //StringBuffer fields= new StringBuffer(); | ... | ... |
... | @@ -8,13 +8,7 @@ import java.util.Map; | ... | @@ -8,13 +8,7 @@ import java.util.Map; |
8 | 8 | ||
9 | import org.apache.commons.lang.StringUtils; | 9 | import org.apache.commons.lang.StringUtils; |
10 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.web.bind.annotation.GetMapping; | 11 | import org.springframework.web.bind.annotation.*; |
12 | import org.springframework.web.bind.annotation.PostMapping; | ||
13 | import org.springframework.web.bind.annotation.PutMapping; | ||
14 | import org.springframework.web.bind.annotation.RequestBody; | ||
15 | import org.springframework.web.bind.annotation.RequestMapping; | ||
16 | import org.springframework.web.bind.annotation.RequestParam; | ||
17 | import org.springframework.web.bind.annotation.RestController; | ||
18 | 12 | ||
19 | import com.baomidou.mybatisplus.core.metadata.IPage; | 13 | import com.baomidou.mybatisplus.core.metadata.IPage; |
20 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 14 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
... | @@ -125,4 +119,26 @@ public class EquipmentMaintainTaskController { | ... | @@ -125,4 +119,26 @@ public class EquipmentMaintainTaskController { |
125 | return result; | 119 | return result; |
126 | } | 120 | } |
127 | 121 | ||
122 | /** | ||
123 | * <pre> | ||
124 | * 通过id删除 | ||
125 | * </pre> | ||
126 | * @param id | ||
127 | * @return | ||
128 | * @author 开发者姓名, 开发时间 | ||
129 | * @Description: TODO(这里描述这个方法的需求变更情况) | ||
130 | */ | ||
131 | @AutoLog(value = "维保任务-通过id删除") | ||
132 | @ApiOperation(value="维保任务-通过id删除", notes="维保任务-通过id删除") | ||
133 | @DeleteMapping(value = "/delete") | ||
134 | public Result<?> delete(@RequestParam(name="id",required=true) String id) { | ||
135 | try { | ||
136 | iEquipmentMaintainTaskService.removeById(id); | ||
137 | } catch (Exception e) { | ||
138 | log.error("删除失败",e.getMessage()); | ||
139 | return Result.error("删除失败!"); | ||
140 | } | ||
141 | return Result.ok("删除成功!"); | ||
142 | } | ||
143 | |||
128 | } | 144 | } | ... | ... |
-
请 注册 或 登录 后发表评论