Commit 48c8cf7e authored by jiaorz's avatar jiaorz

添加积分补充接口

parent 6d60d149
...@@ -2,6 +2,8 @@ package com.xxfc.platform.vehicle.pojo; ...@@ -2,6 +2,8 @@ package com.xxfc.platform.vehicle.pojo;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
*车辆相关预警消息 *车辆相关预警消息
* *
...@@ -31,4 +33,6 @@ public class QueryVehicleWarningMsgVo { ...@@ -31,4 +33,6 @@ public class QueryVehicleWarningMsgVo {
private Integer limit; private Integer limit;
private Integer colorType; private Integer colorType;
private List<Integer> companyIds;
} }
...@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON; ...@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException; 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.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
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.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
...@@ -44,7 +47,7 @@ import java.util.concurrent.TimeUnit; ...@@ -44,7 +47,7 @@ import java.util.concurrent.TimeUnit;
@Slf4j @Slf4j
@Service @Service
public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, VehicleWarningMsg> { public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, VehicleWarningMsg> implements UserRestInterface {
private static final Integer CHECK_BATCH_SIZE_VEHICLE = 100;//每批次检查多少辆车 private static final Integer CHECK_BATCH_SIZE_VEHICLE = 100;//每批次检查多少辆车
...@@ -67,7 +70,15 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic ...@@ -67,7 +70,15 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
@Autowired @Autowired
private RedisTemplate customRedisTemplate; private RedisTemplate customRedisTemplate;
@Autowired
UserFeign userFeign;
@Autowired
VehicleBiz vehicleBiz;
@Override
public UserFeign getUserFeign() {
return userFeign;
}
/** /**
* 增加自定义预警消息 * 增加自定义预警消息
* @param addVehicleWarningMsgVo * @param addVehicleWarningMsgVo
...@@ -94,6 +105,15 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic ...@@ -94,6 +105,15 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
try { try {
QueryVehicleWarningMsgVo queryVehicleWarningMsgVo = JSON.parseObject(queryVehicleWarningMsgVoJson, QueryVehicleWarningMsgVo.class); QueryVehicleWarningMsgVo queryVehicleWarningMsgVo = JSON.parseObject(queryVehicleWarningMsgVoJson, QueryVehicleWarningMsgVo.class);
PageHelper.startPage(queryVehicleWarningMsgVo.getPage(),queryVehicleWarningMsgVo.getLimit()); PageHelper.startPage(queryVehicleWarningMsgVo.getPage(),queryVehicleWarningMsgVo.getLimit());
UserDTO userDTO = getAdminUserInfo();
if (userDTO != null) {
if (userDTO.getDataAll() == 2) {
List<Integer> companyList = vehicleBiz.dataCompany(userDTO.getDataZone(), userDTO.getDataCompany());
if(companyList != null && companyList.size() > 0) {
queryVehicleWarningMsgVo.setCompanyIds(companyList);
}
}
}
List<VehicleWarningMsg> vehicleWarningMsgs = mapper.getByPage(queryVehicleWarningMsgVo); List<VehicleWarningMsg> vehicleWarningMsgs = mapper.getByPage(queryVehicleWarningMsgVo);
PageInfo<VehicleWarningMsg> vehicleWarningMsgPageInfo = new PageInfo<>(vehicleWarningMsgs); PageInfo<VehicleWarningMsg> vehicleWarningMsgPageInfo = new PageInfo<>(vehicleWarningMsgs);
return RestResponse.data(PageDataVO.pageInfo(vehicleWarningMsgPageInfo)); return RestResponse.data(PageDataVO.pageInfo(vehicleWarningMsgPageInfo));
...@@ -230,4 +250,5 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic ...@@ -230,4 +250,5 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
return list; return list;
} }
} }
...@@ -27,6 +27,12 @@ ...@@ -27,6 +27,12 @@
<if test="colorType != null"> <if test="colorType != null">
and vwn.color_type = #{colorType} and vwn.color_type = #{colorType}
</if> </if>
<if test="companyIds != null and companyIds.size > 0">
and v.park_branch_company_id in
<foreach collection="companyIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select> </select>
<select id="getMsgByVehicle" parameterType="java.util.Map" resultType="com.xxfc.platform.vehicle.entity.VehicleWarningMsg" > <select id="getMsgByVehicle" parameterType="java.util.Map" resultType="com.xxfc.platform.vehicle.entity.VehicleWarningMsg" >
......
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