Commit e041efcc authored by libin's avatar libin

Merge remote-tracking branch 'origin/dev' into dev

parents 3701f70d 4ea4cb29
......@@ -199,6 +199,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
companyIds.add(dto.getStartCompanyId());
}
}
dto.setCompanyIds(companyIds);
Query query = new Query(dto);
PageDataVO<OrderPageVO> pageDataVO = PageDataVO.pageInfo(query, () -> baseOrderBiz.getRentVehicle(query.getSuper()));
for (OrderPageVO orderPageVO : pageDataVO.getData()) {
......
......@@ -2,6 +2,8 @@ package com.xxfc.platform.vehicle.pojo;
import lombok.Data;
import java.util.List;
/**
*车辆相关预警消息
*
......@@ -31,4 +33,6 @@ public class QueryVehicleWarningMsgVo {
private Integer limit;
private Integer colorType;
private List<Integer> companyIds;
}
......@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.github.pagehelper.PageHelper;
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.vo.PageDataVO;
import com.google.common.collect.Maps;
......@@ -44,7 +47,7 @@ import java.util.concurrent.TimeUnit;
@Slf4j
@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;//每批次检查多少辆车
......@@ -67,7 +70,15 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
@Autowired
private RedisTemplate customRedisTemplate;
@Autowired
UserFeign userFeign;
@Autowired
VehicleBiz vehicleBiz;
@Override
public UserFeign getUserFeign() {
return userFeign;
}
/**
* 增加自定义预警消息
* @param addVehicleWarningMsgVo
......@@ -94,6 +105,17 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
try {
QueryVehicleWarningMsgVo queryVehicleWarningMsgVo = JSON.parseObject(queryVehicleWarningMsgVoJson, QueryVehicleWarningMsgVo.class);
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);
}
}
} else {
return RestResponse.codeAndMessage(1032,"token失效");
}
List<VehicleWarningMsg> vehicleWarningMsgs = mapper.getByPage(queryVehicleWarningMsgVo);
PageInfo<VehicleWarningMsg> vehicleWarningMsgPageInfo = new PageInfo<>(vehicleWarningMsgs);
return RestResponse.data(PageDataVO.pageInfo(vehicleWarningMsgPageInfo));
......@@ -230,4 +252,5 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
return list;
}
}
......@@ -22,10 +22,16 @@
and v.number_plate = #{numberPlate}
</if>
<if test="type != null">
and v.type = #{type}
and vwn.type = #{type}
</if>
<if test="colorType != null">
and color_type = #{colorType}
and vwn.color_type = #{colorType}
</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>
......
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