Commit 5e207d48 by 杨林龙

联调提测

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