|
|
@ -71,12 +71,12 @@ public class ScmVehiclePatrolinspectionService extends MybatisBaseService<ScmVeh |
|
|
|
public PagerVo<ScmVehiclePatrolinspectionVo> listPageVo(PagerQuery<ScmVehiclePatrolinspectionQuery> pq) { |
|
|
|
ScmVehiclePatrolinspectionQuery query = pq.getParams(); |
|
|
|
QueryWrapper<ScmVehiclePatrolinspection> qw = new QueryWrapper<>(); |
|
|
|
qw.eq("createOrgSid",query.getCreateOrgSid()); |
|
|
|
if (StringUtils.isNotBlank(query.getMainSid())){ |
|
|
|
qw.like("mainSid",query.getMainSid()); |
|
|
|
qw.eq("createOrgSid", query.getCreateOrgSid()); |
|
|
|
if (StringUtils.isNotBlank(query.getMainSid())) { |
|
|
|
qw.like("mainSid", query.getMainSid()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getLocationSid())){ |
|
|
|
qw.like("locationSid",query.getLocationSid()); |
|
|
|
if (StringUtils.isNotBlank(query.getLocationSid())) { |
|
|
|
qw.like("locationSid", query.getLocationSid()); |
|
|
|
} |
|
|
|
String patrolInspectionStartDate = query.getPatrolInspectionStartDate(); |
|
|
|
String patrolInspectionEndDate = query.getPatrolInspectionEndDate(); |
|
|
@ -131,9 +131,16 @@ public class ScmVehiclePatrolinspectionService extends MybatisBaseService<ScmVeh |
|
|
|
IPage<AppScmVehiclePatrolinspectionPageQuery> page = PagerUtil.queryToPage(pagerQuery); |
|
|
|
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(pagerQuery.getParams().getUserSid()).getData(); |
|
|
|
pagerQuery.getParams().setUseOrgSid(useOrgSid); |
|
|
|
AppScmVehiclePatrolinspectionPageQuery paramsQuery = pagerQuery.getParams(); |
|
|
|
String date = paramsQuery.getDate(); |
|
|
|
if (StringUtils.isNotBlank(date)) { |
|
|
|
String[] s = date.split("至"); |
|
|
|
paramsQuery.setPatrolinspectionStartDate(s[0]); |
|
|
|
paramsQuery.setPatrolinspectionEndDate(s[1]); |
|
|
|
} |
|
|
|
QueryWrapper<AppScmVehiclePatrolinspectionPageVo> qw = appCarQueryWrapper(pagerQuery.getParams()); |
|
|
|
AppScmVehiclePatrolinspectionPageQuery params = pagerQuery.getParams(); |
|
|
|
IPage<AppScmVehiclePatrolinspectionPageVo> iPage = baseMapper.getCarInventoryList(page, qw, params.getNames()); |
|
|
|
IPage<AppScmVehiclePatrolinspectionPageVo> iPage = baseMapper.getCarInventoryList(page, qw, params.getName()); |
|
|
|
return iPage; |
|
|
|
} |
|
|
|
|
|
|
@ -148,6 +155,14 @@ public class ScmVehiclePatrolinspectionService extends MybatisBaseService<ScmVeh |
|
|
|
if (StringUtils.isNotBlank(query.getUseOrgSid())) { |
|
|
|
qw.eq("svp.createOrgSid", query.getUseOrgSid()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getWarehouseSid())) { |
|
|
|
qw.eq("svp.locationSid", query.getWarehouseSid()); |
|
|
|
} |
|
|
|
String patrolinspectionStartDate = query.getPatrolinspectionStartDate(); |
|
|
|
String patrolinspectionEndDate = query.getPatrolinspectionEndDate(); |
|
|
|
qw.apply(StringUtils.isNotEmpty(patrolinspectionStartDate), "date_format (patrolInspectionDate,'%Y-%m-%d') >= date_format('" + patrolinspectionStartDate + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(patrolinspectionEndDate), "date_format (patrolInspectionDate,'%Y-%m-%d') <= date_format('" + patrolinspectionEndDate + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
return qw; |
|
|
|
} |
|
|
|
|
|
|
|