Commit 5e207d48 by 杨林龙

联调提测

1 parent b95114af
...@@ -24,11 +24,11 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> { ...@@ -24,11 +24,11 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
/** /**
* 获取拆除报警基本信息 * 获取拆除报警基本信息
* *
* @param searchCondition * @param keyWord
* @return * @return
*/ */
List<TearDownModelExport> searchTearDownAlarmList(@Param("searchCondition") String searchCondition); List<TearDownModelExport> searchTearDownAlarmList(@Param("keyWord") String keyWord);
/** /**
* 分页查询试驾车辆列表 * 分页查询试驾车辆列表
......
...@@ -25,5 +25,5 @@ public class TearDownQueryBo extends Page { ...@@ -25,5 +25,5 @@ public class TearDownQueryBo extends Page {
/** /**
* 特约店编码|店名称|设备号|车型 组合查询条件 * 特约店编码|店名称|设备号|车型 组合查询条件
*/ */
private String searchCondition; private String keyWord;
} }
...@@ -39,12 +39,7 @@ public class TrialDriveReportSearch extends Page { ...@@ -39,12 +39,7 @@ public class TrialDriveReportSearch extends Page {
private String month; private String month;
/** /**
* 特约店代码 * 特约店代码 |特约店名称
*/ */
private String shopCode; private String keyWord;
/**
* 特约店名称
*/
private String shopName;
} }
...@@ -44,7 +44,7 @@ public class TearDownAlarmSevice { ...@@ -44,7 +44,7 @@ public class TearDownAlarmSevice {
*/ */
public PageInfo searchTearDownAlarmList(TearDownQueryBo tearDownQueryBo) { public PageInfo searchTearDownAlarmList(TearDownQueryBo tearDownQueryBo) {
// 在数据库查询车辆和特约店车辆信息 // 在数据库查询车辆和特约店车辆信息
List<TearDownModelExport> tearDownModelExportList = vehicleMapper.searchTearDownAlarmList(tearDownQueryBo.getSearchCondition()); List<TearDownModelExport> tearDownModelExportList = vehicleMapper.searchTearDownAlarmList(tearDownQueryBo.getKeyWord());
String alarmsnStr = StringUtils.join(tearDownModelExportList.stream().map(TearDownModelExport::getSn).toArray(), ","); String alarmsnStr = StringUtils.join(tearDownModelExportList.stream().map(TearDownModelExport::getSn).toArray(), ",");
AlarmBo alarmBo = new AlarmBo(); AlarmBo alarmBo = new AlarmBo();
alarmBo.setSnList(alarmsnStr); alarmBo.setSnList(alarmsnStr);
...@@ -96,7 +96,7 @@ public class TearDownAlarmSevice { ...@@ -96,7 +96,7 @@ public class TearDownAlarmSevice {
*/ */
public List<TearDownModelExport> export(TearDownQueryBo tearDownQueryBo) { public List<TearDownModelExport> export(TearDownQueryBo tearDownQueryBo) {
// 在数据库查询车辆和特约店车辆信息 // 在数据库查询车辆和特约店车辆信息
List<TearDownModelExport> tearDownModelExportList = vehicleMapper.searchTearDownAlarmList(tearDownQueryBo.getSearchCondition()); List<TearDownModelExport> tearDownModelExportList = vehicleMapper.searchTearDownAlarmList(tearDownQueryBo.getKeyWord());
String alarmsnStr = StringUtils.join(tearDownModelExportList.stream().map(TearDownModelExport::getSn).toArray(), ","); String alarmsnStr = StringUtils.join(tearDownModelExportList.stream().map(TearDownModelExport::getSn).toArray(), ",");
AlarmBo alarmBo = new AlarmBo(); AlarmBo alarmBo = new AlarmBo();
alarmBo.setSnList(alarmsnStr); alarmBo.setSnList(alarmsnStr);
......
...@@ -45,11 +45,6 @@ public class TrialDriveReportService { ...@@ -45,11 +45,6 @@ public class TrialDriveReportService {
} }
public List<TrialDriveReportExport> listEffectiveTestDriveReportPage(TrialDriveReportSearch search, List<TrialDriveReportExport> testDrivePageList) { public List<TrialDriveReportExport> listEffectiveTestDriveReportPage(TrialDriveReportSearch search, List<TrialDriveReportExport> testDrivePageList) {
String month = search.getMonth();
if (StringUtils.isNotEmpty(month) && StringUtils.isNotBlank(month) && Integer.parseInt(month) < 10) {
month = ("0").concat(month);
search.setMonth(month);
}
HashMap<String, TrialDriveReportExport> excelHashMap = new HashMap<>(); HashMap<String, TrialDriveReportExport> excelHashMap = new HashMap<>();
// 初始化map中的每个对象 // 初始化map中的每个对象
...@@ -199,13 +194,6 @@ public class TrialDriveReportService { ...@@ -199,13 +194,6 @@ public class TrialDriveReportService {
} }
public List<TrialDriveReportExport> exportEffectiveTestDriveReport(TrialDriveReportSearch search, List<TrialDriveReportExport> testDrivePageList) { public List<TrialDriveReportExport> exportEffectiveTestDriveReport(TrialDriveReportSearch search, List<TrialDriveReportExport> testDrivePageList) {
//获取查询的月参数
String month = search.getMonth();
if (StringUtils.isNotEmpty(month) && StringUtils.isNotBlank(month) && Integer.parseInt(month) < 10) {
month = ("0").concat(month);
search.setMonth(month);
}
HashMap<String, TrialDriveReportExport> excelHashMap = new HashMap<>(); HashMap<String, TrialDriveReportExport> excelHashMap = new HashMap<>();
// 初始化map中的每个对象 // 初始化map中的每个对象
for (TrialDriveReportExport drivePageExcel : testDrivePageList) { for (TrialDriveReportExport drivePageExcel : testDrivePageList) {
...@@ -369,6 +357,7 @@ public class TrialDriveReportService { ...@@ -369,6 +357,7 @@ public class TrialDriveReportService {
* @param excelHashMap 所有数据集合map * @param excelHashMap 所有数据集合map
*/ */
private void makeDriveData(List<TrialDriveReportExport> testDriveDataOneList, HashMap<String, TrialDriveReportExport> excelHashMap) { private void makeDriveData(List<TrialDriveReportExport> testDriveDataOneList, HashMap<String, TrialDriveReportExport> excelHashMap) {
log.info("===== EffectiveTestDriveReport ====start====");
// 试驾表格需要展示的车辆类型 // 试驾表格需要展示的车辆类型
HashMap<String, Integer> sumHashMap = new HashMap<>(); HashMap<String, Integer> sumHashMap = new HashMap<>();
for (TrialDriveReportExport driveDataOne : testDriveDataOneList) { for (TrialDriveReportExport driveDataOne : testDriveDataOneList) {
......
...@@ -38,11 +38,9 @@ ...@@ -38,11 +38,9 @@
left join t_vehicle tv on tv.vin = tefs.vin left join t_vehicle tv on tv.vin = tefs.vin
where tefs.fence_id = tef.id where tefs.fence_id = tef.id
and tef.biz_fence_type = 12 and tef.biz_fence_type = 12
<if test="shopCode!=null and shopCode!=''"> <if test="keyWord!=null and keyWord!=''">
and tu.account like '%${shopCode}%' and tu.account like '%${keyWord}%'
</if> and tu.username like '%${keyWord}%'
<if test="shopName!=null and shopName!=''">
and tu.username like '%${shopName}%'
</if> </if>
<if test="userIdList != null"> <if test="userIdList != null">
and tu.id IN and tu.id IN
...@@ -88,11 +86,9 @@ ...@@ -88,11 +86,9 @@
</otherwise> </otherwise>
</choose> </choose>
<if test="shopCode !=null and shopCode != ''"> <if test="keyWord !=null and keyWord != ''">
and tu.account like '%${shopCode}%' and tu.account like '%${keyWord}%'
</if> and tu.username like '%${keyWord}%'
<if test="shopName !=null and shopName != ''">
and tu.username like '%${shopName}%'
</if> </if>
<if test="sn !=null and sn != ''"> <if test="sn !=null and sn != ''">
and tefdd.sn = #{sn,jdbcType=VARCHAR} and tefdd.sn = #{sn,jdbcType=VARCHAR}
......
...@@ -139,12 +139,12 @@ ...@@ -139,12 +139,12 @@
left join t_electric_fence_sns tefs on tefs.sn = tvd.sn left join t_electric_fence_sns tefs on tefs.sn = tvd.sn
left join t_trial_drive_shop ttds on ttds.fence_id = tefs.fence_id left join t_trial_drive_shop ttds on ttds.fence_id = tefs.fence_id
where tv.del_flag = 0 and tvd.bind_status = 1 where tv.del_flag = 0 and tvd.bind_status = 1
<if test="searchCondition != null and searchCondition !=''"> <if test="keyWord != null and keyWord !=''">
and ( and (
ttds.shop_code like '%${searchCondition}%' ttds.shop_code like '%${keyWord}%'
or ttds.shop_name like '%${searchCondition}%' or ttds.shop_name like '%${keyWord}%'
or tvd.sn like '%${searchCondition}%' or tvd.sn like '%${keyWord}%'
or tv.model_name like '%${searchCondition}%' or tv.model_name like '%${keyWord}%'
) )
</if> </if>
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!