Commit 3aa9f0c1 by 刘宇峰

去掉车型限制

1 parent ad0f27c2
...@@ -5,25 +5,12 @@ import lombok.Data; ...@@ -5,25 +5,12 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
import java.util.Set;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
public class TrialDriveReportSearch extends Page { public class TrialDriveReportSearch extends Page {
/** /**
* 组织下用户的Id
*/
private Set<Long> userIdList;
/**
* 限制展示的车辆
*/
private List<String> splitList;
/**
* sn 号 * sn 号
*/ */
private String sn; private String sn;
...@@ -42,4 +29,5 @@ public class TrialDriveReportSearch extends Page { ...@@ -42,4 +29,5 @@ public class TrialDriveReportSearch extends Page {
* 特约店代码 |特约店名称 * 特约店代码 |特约店名称
*/ */
private String keywords; private String keywords;
} }
...@@ -5,14 +5,12 @@ import cn.com.glsx.admin.modules.model.export.TrialDriveReportExport; ...@@ -5,14 +5,12 @@ import cn.com.glsx.admin.modules.model.export.TrialDriveReportExport;
import cn.com.glsx.admin.modules.model.param.TrialDriveReportSearch; import cn.com.glsx.admin.modules.model.param.TrialDriveReportSearch;
import cn.com.glsx.admin.modules.utils.DateUtil; import cn.com.glsx.admin.modules.utils.DateUtil;
import com.glsx.plat.common.utils.StringUtils; import com.glsx.plat.common.utils.StringUtils;
import com.glsx.plat.context.utils.PropertiesUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -29,11 +27,6 @@ public class TrialDriveReportService { ...@@ -29,11 +27,6 @@ public class TrialDriveReportService {
private TrialDriveReportMapper trialDriveReportMapper; private TrialDriveReportMapper trialDriveReportMapper;
public List<TrialDriveReportExport> search(TrialDriveReportSearch search) { public List<TrialDriveReportExport> search(TrialDriveReportSearch search) {
String needToShowVehicleTypeList = PropertiesUtils.getProperty("glsx.effectivetestdrive.needtoshow");
String[] splitArr = needToShowVehicleTypeList.split(",");
List<String> splitList = Arrays.asList(splitArr);
search.setSplitList(splitList);
return trialDriveReportMapper.getTestDrivePageList(search); return trialDriveReportMapper.getTestDrivePageList(search);
} }
...@@ -51,12 +44,7 @@ public class TrialDriveReportService { ...@@ -51,12 +44,7 @@ public class TrialDriveReportService {
excelHashMap.put(drivePageExcel.getShopCode() + drivePageExcel.getSn(), drivePageExcel); excelHashMap.put(drivePageExcel.getShopCode() + drivePageExcel.getSn(), drivePageExcel);
} }
// 需要展示的车型
String needToShowVehicleTypeList = PropertiesUtils.getProperty("glsx.effectivetestdrive.needtoshow");
String[] splitArr = needToShowVehicleTypeList.split(",");
List<String> splitList = Arrays.asList(splitArr);
for (TrialDriveReportExport drivePageExcel : testDrivePageList) { for (TrialDriveReportExport drivePageExcel : testDrivePageList) {
search.setSplitList(splitList);
search.setSn(drivePageExcel.getSn()); search.setSn(drivePageExcel.getSn());
List<TrialDriveReportExport> testDriveDataOneList = trialDriveReportMapper.getEffectiveTestDriveData(search); List<TrialDriveReportExport> testDriveDataOneList = trialDriveReportMapper.getEffectiveTestDriveData(search);
log.info("testDriveDataOneList 的长度是" + testDriveDataOneList.size()); log.info("testDriveDataOneList 的长度是" + testDriveDataOneList.size());
...@@ -206,12 +194,7 @@ public class TrialDriveReportService { ...@@ -206,12 +194,7 @@ public class TrialDriveReportService {
excelHashMap.put(drivePageExcel.getShopCode() + drivePageExcel.getSn(), drivePageExcel); excelHashMap.put(drivePageExcel.getShopCode() + drivePageExcel.getSn(), drivePageExcel);
} }
// 需要展示的车型
String needToShowVehicleTypeList = PropertiesUtils.getProperty("glsx.effectivetestdrive.needtoshow");
String[] splitArr = needToShowVehicleTypeList.split(",");
List<String> splitList = Arrays.asList(splitArr);
for (TrialDriveReportExport drivePageExcel : testDrivePageList) { for (TrialDriveReportExport drivePageExcel : testDrivePageList) {
search.setSplitList(splitList);
search.setSn(drivePageExcel.getSn()); search.setSn(drivePageExcel.getSn());
List<TrialDriveReportExport> testDriveDataOneList = trialDriveReportMapper.getEffectiveTestDriveData(search); List<TrialDriveReportExport> testDriveDataOneList = trialDriveReportMapper.getEffectiveTestDriveData(search);
//将每一个查询的对象进行填充 //将每一个查询的对象进行填充
......
...@@ -44,12 +44,6 @@ ...@@ -44,12 +44,6 @@
or tu.username like '%${keywords}%' or tu.username like '%${keywords}%'
) )
</if> </if>
<if test="splitList != null">
and tv.model_name IN
<foreach collection="splitList" item="vehicleTypeName" index="index" open="(" close=")" separator=",">
#{vehicleTypeName}
</foreach>
</if>
order by tu.account order by tu.account
</select> </select>
...@@ -91,12 +85,6 @@ ...@@ -91,12 +85,6 @@
<if test="sn !=null and sn != ''"> <if test="sn !=null and sn != ''">
and tefdd.sn = #{sn,jdbcType=VARCHAR} and tefdd.sn = #{sn,jdbcType=VARCHAR}
</if> </if>
<if test="splitList != null">
and tv.model_name IN
<foreach collection="splitList" item="vehicleTypeName" index="index" open="(" close=")" separator=",">
#{vehicleTypeName}
</foreach>
</if>
</where> </where>
GROUP BY tefdd.sn,tefdd.fence_id,statDate order by tu.account) tall GROUP BY tall.shopCode, tall.sn, GROUP BY tefdd.sn,tefdd.fence_id,statDate order by tu.account) tall GROUP BY tall.shopCode, tall.sn,
tall.statDate ORDER BY tall.shopCode tall.statDate ORDER BY tall.shopCode
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!