Commit 1135a1f0 authored by jiaorz's avatar jiaorz

修改租車訂單地址,修改车辆预定时添加订单号

parent dae3b657
......@@ -181,6 +181,24 @@ public class BackStageOrderController extends CommonBaseController implements Us
dto.setEndTime(new Date().getTime());
}
}
UserDTO userDTO = getAdminUserInfo();
if (userDTO == null) {
return ObjectRestResponse.succ(new PageDataVO<>());
}
List<BranchCompany> branchCompanies = vehicleFeign.companyAll(userDTO.getDataAll(), userDTO.getDataCompany(), userDTO.getDataZone());
List<Integer> companyIds = branchCompanies.stream().map(BranchCompany::getId).collect(Collectors.toList());
if(dto.getStartCompanyId() != null) {
if(companyIds.size() > 0) {
if(companyIds.contains(dto.getStartCompanyId())) {
companyIds.clear();
companyIds.add(dto.getStartCompanyId());
} else {
return ObjectRestResponse.succ();
}
} else {
companyIds.add(dto.getStartCompanyId());
}
}
Query query = new Query(dto);
PageDataVO<OrderPageVO> pageDataVO = PageDataVO.pageInfo(query, () -> baseOrderBiz.getRentVehicle(query.getSuper()));
for (OrderPageVO orderPageVO : pageDataVO.getData()) {
......
......@@ -192,8 +192,12 @@
<if test="startTime != null and (status == 5 || status == 6 || status == -1)">
and r.end_time between #{startTime} and #{endTime}
</if>
<if test="startCompanyId != null">
and r.start_company_id = #{startCompanyId}
<if test="companyIds != null and companyIds.size > 0">
and r.start_company_id in
<foreach collection="companyIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
<if test="status == 4">
order by r.start_time
......
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