Pu Zhibing
6 天以前 4c99ee7028c3fe58a2cd4b8273b22c75c45574fc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.stylefeng.guns.modular.system.service.impl;
 
import com.stylefeng.guns.modular.system.model.TReportLoss;
import com.stylefeng.guns.modular.system.dao.TReportLossMapper;
import com.stylefeng.guns.modular.system.service.ITReportLossService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 报失 服务实现类
 * </p>
 *
 * @author stylefeng
 * @since 2022-09-29
 */
@Service
public class TReportLossServiceImpl extends ServiceImpl<TReportLossMapper, TReportLoss> implements ITReportLossService {
 
    @Override
    public List<Map<String, Object>> getReportLossList(String beginTime, String endTime, String phone, Integer status) {
        List<Map<String, Object>> reportLossList = this.baseMapper.getReportLossList(beginTime, endTime, phone, status);
        for (Map<String, Object> stringObjectMap : reportLossList) {
            // (1=专车,2=出租车,3=跨城出行,4=同城小件物流,5=跨城小件物流,6=包车
            Integer orderType = (Integer) stringObjectMap.get("orderType");
            Integer orderId = (Integer) stringObjectMap.get("orderId");
            String carNumber="";
            if(orderType==1){
                // 专车
                carNumber = this.baseMapper.getCarNumber1(orderId);
            }else if(orderType==2){
                carNumber = this.baseMapper.getCarNumber2(orderId);
            }else if(orderType==3){
                carNumber = this.baseMapper.getCarNumber3(orderId);
            }else if(orderType==4){
                carNumber = this.baseMapper.getCarNumber4(orderId);
            }else if(orderType==5){
                carNumber = this.baseMapper.getCarNumber5(orderId);
            }else if(orderType==6){
                carNumber = this.baseMapper.getCarNumber6(orderId);
            }
            stringObjectMap.put("carNumber",carNumber);
        }
        return reportLossList;
    }
}