Commit abeaf5e9 authored by jiaorz's avatar jiaorz

Merge branch 'master-bg-update' into base-modify

parents 5f352ba2 5cfada0d
...@@ -46,6 +46,10 @@ public class BackgroundBaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> ...@@ -46,6 +46,10 @@ public class BackgroundBaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder>
List<BranchCompany> branchCompanies = vehicleFeign.companyAll(userDTO.getDataAll(), userDTO.getDataCompany(), userDTO.getDataZone()); List<BranchCompany> branchCompanies = vehicleFeign.companyAll(userDTO.getDataAll(), userDTO.getDataCompany(), userDTO.getDataZone());
List<Integer> companyIds = branchCompanies.stream().map(BranchCompany::getId).collect(Collectors.toList()); List<Integer> companyIds = branchCompanies.stream().map(BranchCompany::getId).collect(Collectors.toList());
//大区搜索 //大区搜索
//有当前大区权限才能搜索到数据
if (dto.getZoneId() != null && (userDTO.getDataAll() == 1 || userDTO.getZoneId().equals(dto.getZoneId()) || userDTO.getDataZone().contains(dto.getZoneId()+""))) {
companyIds.clear();
}
//所属公司筛选 //所属公司筛选
if (dto.getStartCompanyId() != null) { if (dto.getStartCompanyId() != null) {
if (companyIds.size() > 0) { if (companyIds.size() > 0) {
...@@ -59,10 +63,6 @@ public class BackgroundBaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> ...@@ -59,10 +63,6 @@ public class BackgroundBaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder>
companyIds.add(dto.getStartCompanyId()); companyIds.add(dto.getStartCompanyId());
} }
} }
//有当前大区权限才能搜索到数据
if (dto.getZoneId() != null && (userDTO.getDataAll() == 1 || userDTO.getZoneId().equals(dto.getZoneId()) || userDTO.getDataZone().contains(dto.getZoneId()+""))) {
companyIds.clear();
}
dto.setCompanyIds(companyIds); dto.setCompanyIds(companyIds);
if (dto.getStartTime() != null) { if (dto.getStartTime() != null) {
if (dto.getEndTime() == null) { if (dto.getEndTime() == null) {
......
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
and v1.number_plate like CONCAT ("%", #{plateNumber}, "%") and v1.number_plate like CONCAT ("%", #{plateNumber}, "%")
</if> </if>
<if test="vehicleCode != null"> <if test="vehicleCode != null">
and o1.code = #{vehicleCode} and v1.code = #{vehicleCode}
</if> </if>
<if test="startTime != null"> <if test="startTime != null">
and o1.start_time between #{startTime} and #{endTime} and o1.start_time between #{startTime} and #{endTime}
...@@ -308,18 +308,7 @@ ...@@ -308,18 +308,7 @@
) )
</if> </if>
<if test="zoneId != null"> <if test="zoneId != null">
and (bc1.zone_id = #{zoneId} or bc1.zone_id = #{zoneId}) and (bc1.zone_id = #{zoneId} or bc2.zone_id = #{zoneId})
</if>
<if test="zoneIds != null and zoneIds.size > 0">
and (o1.start_zone_id in
<foreach collection="zoneIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
<!-- or t.start_zone_id in-->
<!-- <foreach collection="zoneIds" item="id" open="(" separator="," close=")">-->
<!-- #{id}-->
<!-- </foreach>-->
)
</if> </if>
</where> </where>
order by b1.crt_time desc order by b1.crt_time desc
......
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