|
|
@ -74,13 +74,13 @@ public class CarsSoldProfitService extends MybatisBaseService<CarsSoldProfitMapp |
|
|
|
if (StringUtils.isNotBlank(query.getMenuSid())) { |
|
|
|
//=======================
|
|
|
|
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|
|
|
privilegeQuery.setOrgPath(query.getOrgSidPath()); |
|
|
|
privilegeQuery.setOrgPath(query.getOrgPath()); |
|
|
|
privilegeQuery.setMenuSid(query.getMenuSid()); |
|
|
|
privilegeQuery.setUserSid(query.getUserSid()); |
|
|
|
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|
|
|
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|
|
|
String orgSidPath = query.getOrgSidPath(); |
|
|
|
String orgSidPath = query.getOrgPath(); |
|
|
|
orgSidPath = orgSidPath + "/"; |
|
|
|
int i1 = orgSidPath.indexOf("/"); |
|
|
|
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|
|
@ -89,16 +89,16 @@ public class CarsSoldProfitService extends MybatisBaseService<CarsSoldProfitMapp |
|
|
|
String orgLevelKey = defaultIdReltBean.getData(); |
|
|
|
if ("1".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i1); |
|
|
|
qw.like("bd.orgSidPath", orgSidPath); |
|
|
|
qw.like("cp.orgSidPath", orgSidPath); |
|
|
|
} else if ("2".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i2); |
|
|
|
qw.like("bd.orgSidPath", orgSidPath); |
|
|
|
qw.like("cp.orgSidPath", orgSidPath); |
|
|
|
} else if ("3".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i3); |
|
|
|
qw.like("bd.orgSidPath", orgSidPath); |
|
|
|
qw.like("cp.orgSidPath", orgSidPath); |
|
|
|
} else if ("4".equals(orgLevelKey)) { |
|
|
|
orgSidPath = orgSidPath.substring(0, i4); |
|
|
|
qw.like("bd.orgSidPath", orgSidPath); |
|
|
|
qw.like("cp.orgSidPath", orgSidPath); |
|
|
|
} else { |
|
|
|
PagerVo<CarsSoldProfitVo> p = new PagerVo<>(); |
|
|
|
return p; |
|
|
@ -113,21 +113,21 @@ public class CarsSoldProfitService extends MybatisBaseService<CarsSoldProfitMapp |
|
|
|
String[] s = date.split("至"); |
|
|
|
String startDate = s[0]; |
|
|
|
if (StringUtils.isNotBlank(startDate)) { |
|
|
|
qw.ge("saleDate", startDate); |
|
|
|
qw.ge("cp.saleDate", startDate); |
|
|
|
} |
|
|
|
String endDate = s[1]; |
|
|
|
if (StringUtils.isNotBlank(endDate)) { |
|
|
|
qw.le("saleDate", endDate); |
|
|
|
qw.le("cp.saleDate", endDate); |
|
|
|
} |
|
|
|
} |
|
|
|
String names = query.getNames(); |
|
|
|
// 多字段模糊查询
|
|
|
|
if (StringUtils.isNotBlank(names)) { |
|
|
|
qw.and(wrapper -> wrapper.like("useOrgName", names) |
|
|
|
.or().like("vinNo", names) |
|
|
|
.or().like("model", names) |
|
|
|
.or().like("schedulingId", names) |
|
|
|
.or().like("staffName", names)); |
|
|
|
qw.and(wrapper -> wrapper.like("cp.useOrgName", names) |
|
|
|
.or().like("cp.vinNo", names) |
|
|
|
.or().like("cp.vehModel", names) |
|
|
|
.or().like("cp.schedulingId", names) |
|
|
|
.or().like("cp.staffName", names)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|