Commit 27cb471c authored by jiaorz's avatar jiaorz

发现排序

parent bd107f65
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONException; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONException;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.common.biz.BaseBiz; import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.xxfc.platform.vehicle.common.CustomIllegalParamException; import com.xxfc.platform.vehicle.common.CustomIllegalParamException;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
...@@ -17,13 +18,11 @@ import com.xxfc.platform.vehicle.entity.VehicleWarningMsg; ...@@ -17,13 +18,11 @@ import com.xxfc.platform.vehicle.entity.VehicleWarningMsg;
import com.xxfc.platform.vehicle.entity.VehicleWarningRule; import com.xxfc.platform.vehicle.entity.VehicleWarningRule;
import com.xxfc.platform.vehicle.mapper.VehicleMapper; import com.xxfc.platform.vehicle.mapper.VehicleMapper;
import com.xxfc.platform.vehicle.mapper.VehicleWarningMsgMapper; import com.xxfc.platform.vehicle.mapper.VehicleWarningMsgMapper;
import com.xxfc.platform.vehicle.mapper.VehicleWarningRuleMapper; import com.xxfc.platform.vehicle.pojo.AddVehicleWarningMsgVo;
import com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo;
import com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo; import com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo;
import com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto; import com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto;
import com.xxfc.platform.vehicle.util.JSUtil; import com.xxfc.platform.vehicle.util.JSUtil;
import com.xxfc.platform.vehicle.pojo.AddVehicleWarningMsgVo;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -61,7 +60,7 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic ...@@ -61,7 +60,7 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
@Autowired @Autowired
private VehicleWarningRuleMapper vehicleWarningRuleMapper; private VehicleWarningRuleBiz vehicleWarningRuleBiz;
@Autowired @Autowired
private VehicleMapper vehicleMapper; private VehicleMapper vehicleMapper;
...@@ -135,7 +134,7 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic ...@@ -135,7 +134,7 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
} }
log.info("[预警信息检查]任务开始。"); log.info("[预警信息检查]任务开始。");
//获取所有检查规则 //获取所有检查规则
List<VehicleWarningRule> vehicleWarningRules = vehicleWarningRuleMapper.selectAll(); List<VehicleWarningRule> vehicleWarningRules = vehicleWarningRuleBiz.selectListAll();
if(CollectionUtils.isEmpty(vehicleWarningRules)){ if(CollectionUtils.isEmpty(vehicleWarningRules)){
log.info("[预警信息检查]当前不存在任何预警规则,不执行预警信息检查"); log.info("[预警信息检查]当前不存在任何预警规则,不执行预警信息检查");
return; return;
......
package com.xxfc.platform.vehicle.biz;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.xxfc.platform.vehicle.entity.VehicleWarningRule;
import com.xxfc.platform.vehicle.mapper.VehicleWarningRuleMapper;
import org.springframework.stereotype.Service;
@Service
public class VehicleWarningRuleBiz extends BaseBiz<VehicleWarningRuleMapper, VehicleWarningRule> {
}
...@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.PostConstruct;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -21,19 +22,23 @@ public class VehicleWarningMsgController{ ...@@ -21,19 +22,23 @@ public class VehicleWarningMsgController{
@Autowired @Autowired
VehicleWarningMsgBiz vehicleWarningMsgBiz; VehicleWarningMsgBiz vehicleWarningMsgBiz;
// @Autowired private static VehicleWarningMsgController vehicleWarningMsgController;
// VehicleWarningMsgBiz vehicleWarningMsgBiz; @PostConstruct //通过@PostConstruct实现初始化bean之前进行的操作
public void init() {
vehicleWarningMsgController = this;
vehicleWarningMsgController.vehicleWarningMsgBiz = this.vehicleWarningMsgBiz;
// 初使化时将已静态化的testService实例化
}
@RequestMapping(value ="{id}",method = RequestMethod.GET) @RequestMapping(value ="{id}",method = RequestMethod.GET)
private RestResponse<VehicleWarningMsg> get(@PathVariable Integer id) throws Exception{ private RestResponse<VehicleWarningMsg> get(@PathVariable Integer id) throws Exception{
return RestResponse.codeAndData(RestResponse.SUC_CODE,vehicleWarningMsgBiz.selectById(id)); return RestResponse.codeAndData(RestResponse.SUC_CODE,vehicleWarningMsgController.vehicleWarningMsgBiz.selectById(id));
} }
@RequestMapping(value ="page",method = RequestMethod.GET) @RequestMapping(value ="page",method = RequestMethod.GET)
@IgnoreUserToken @IgnoreUserToken
private RestResponse<PageDataVO<VehicleWarningMsg>> getByPage(@RequestParam String queryVehicleWarningMsgVoJson) throws Exception{ private RestResponse<PageDataVO<VehicleWarningMsg>> getByPage(@RequestParam String queryVehicleWarningMsgVoJson) throws Exception{
return vehicleWarningMsgBiz.getByPage(queryVehicleWarningMsgVoJson); return vehicleWarningMsgController.vehicleWarningMsgBiz.getByPage(queryVehicleWarningMsgVoJson);
} }
@RequestMapping(value ="",method = RequestMethod.POST) @RequestMapping(value ="",method = RequestMethod.POST)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment