qzyReal пре 2 година
родитељ
комит
525e2a6f61

+ 1 - 0
sp-admin/sa-view/tb-business-car/tb-business-car-list.html

@@ -130,6 +130,7 @@
 					</el-table-column>
 					<sa-td name="审核状态" prop="confirmJudge" type="enum" :jv="{0: '未审核', 1:'审核通过',2:'审核驳回',3:'无需审核'}"></sa-td>
 					<sa-td name="支付状态" prop="payType"></sa-td>
+					<sa-td name="支付时间" prop="payTime" width="140"></sa-td>
 					<sa-td name="出场确认说明" prop="outRemark" width="180"></sa-td>
 					<sa-td name="备注" prop="remark" width="180"></sa-td>
 					<el-table-column label="操作" width="280px" fixed="right">

+ 2 - 2
sp-admin/sa-view/tb-fee-statistics/month-statistcs-list.html

@@ -28,7 +28,7 @@
                     <el-option label="核酸检测" value="1"></el-option>
                     <el-option label="消杀作业" value="2"></el-option>
                     <el-option label="装卸作业" value="3"></el-option>
-                    <el-option label="停车" value="4"></el-option>
+                    <el-option label="停车业务" value="4"></el-option>
                     <el-option label="过磅费" value="5"></el-option>
                     <el-option label="入场管理费" value="6"></el-option>
                     <el-option label="充电打冷作业" value="7"></el-option>
@@ -60,7 +60,7 @@
         <!-- ------------- 数据列表 ------------- -->
         <el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol">
             <sa-td name="收费项目" prop="feeType" type="enum"
-                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
+                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
             <sa-td name="月份" prop="month"></sa-td>
             <sa-td name="数量" prop="num"></sa-td>
             <!--					<sa-td name="含税收入(元)" prop="statisticsMoney"></sa-td>-->

+ 2 - 2
sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html

@@ -63,7 +63,7 @@
 							<el-option label="核酸检测" value="1"></el-option>
 							<el-option label="消杀作业" value="2"></el-option>
 							<el-option label="装卸作业" value="3"></el-option>
-							<el-option label="停车" value="4"></el-option>
+							<el-option label="停车业务" value="4"></el-option>
 							<el-option label="过磅费" value="5"></el-option>
 							<el-option label="入场管理费" value="6"></el-option>
 							<el-option label="充电打冷作业" value="7"></el-option>
@@ -126,7 +126,7 @@
 					<!--					<sa-td name="作业类型" prop="feeType" type="enum"-->
 					<!--						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>-->
 					<sa-td name="收费项目" prop="feeType" type="enum"
-						:jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
+						:jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
 					<sa-td name="业务类型" prop="itemTypeName"></sa-td>
 					<sa-td name="车型" prop="itemName"></sa-td>
 					<sa-td name="车牌号" prop="carNo" width="90px"></sa-td>

+ 2 - 2
sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html

@@ -35,7 +35,7 @@
                     <el-option label="核酸检测" value="1"></el-option>
                     <el-option label="消杀作业" value="2"></el-option>
                     <el-option label="装卸作业" value="3"></el-option>
-                    <el-option label="停车" value="4"></el-option>
+                    <el-option label="停车业务" value="4"></el-option>
                     <el-option label="过磅费" value="5"></el-option>
                     <el-option label="入场管理费" value="6"></el-option>
                     <el-option label="充电打冷作业" value="7"></el-option>
@@ -66,7 +66,7 @@
         <el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol">
             <!--					<sa-td type="selection"></sa-td>-->
             <sa-td name="收费项目" prop="feeType" type="enum"
-                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
+                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
             <!--					<sa-td name="业务类型" prop="itemTypeName" ></sa-td>-->
             <sa-td name="日期" type="date" prop="dayTime"></sa-td>
             <sa-td name="数量" prop="num"></sa-td>

+ 2 - 2
sp-admin/sa-view/tb-fee-statistics/year-statistcs-list.html

@@ -28,7 +28,7 @@
                     <el-option label="核酸检测" value="1"></el-option>
                     <el-option label="消杀作业" value="2"></el-option>
                     <el-option label="装卸作业" value="3"></el-option>
-                    <el-option label="停车" value="4"></el-option>
+                    <el-option label="停车业务" value="4"></el-option>
                     <el-option label="过磅费" value="5"></el-option>
                     <el-option label="入场管理费" value="6"></el-option>
                     <el-option label="充电打冷作业" value="7"></el-option>
@@ -50,7 +50,7 @@
         <!-- ------------- 数据列表 ------------- -->
         <el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol">
             <sa-td name="收费项目" prop="feeType" type="enum"
-                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
+                   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车业务', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
             <sa-td name="年份" prop="year"></sa-td>
             <sa-td name="数量" prop="num"></sa-td>
             <!--					<sa-td name="含税收入(元)" prop="statisticsMoney"></sa-td>-->

+ 3 - 6
sp-admin/sa-view/tb-mild-car/tb-mild-car-add.html

@@ -40,8 +40,8 @@
 					<el-form v-if="m">
 						<el-row>
 							<el-col :span="12">
-								<sa-item type="text" name="所属公司" v-model="m.company" br></sa-item>
 								<sa-item type="text" name="车牌号" v-model="m.carNo" br need></sa-item>
+								<sa-item type="text" name="所属公司" v-model="m.company" br></sa-item>
 								<sa-item type="text" name="联系人" v-model="m.contact" br></sa-item>
 								<sa-item type="text" name="联系电话" v-model="m.contactPhone" br></sa-item>
 							</el-col>
@@ -51,15 +51,13 @@
 									<label class="c-label">
 										<span style="color: red;">*</span>
 										车长度(米):</label>
-									<el-input-number class="item-num" v-model="m.carLength" :min="4.3"
-										:max="9.6">
+									<el-input-number class="item-num" v-model="m.carLength" :min="4.3" :max="9.6">
 									</el-input-number>
 								</div>
 								<div class="c-item">
 									<label class="c-label">
 										载重(kg):</label>
-									<el-input-number class="item-num" v-model="m.carWeight" :min="1"
-										:max="999999">
+									<el-input-number class="item-num" v-model="m.carWeight" :min="1" :max="999999">
 									</el-input-number>
 								</div>
 								<sa-item type="img-list" name="行驶证" v-model="m.carCertificate" br></sa-item>
@@ -110,7 +108,6 @@
 					ok: function() {
 						// 表单校验 
 						let m = this.m;
-						sa.checkNull(m.company, '请输入 [所属公司]');
 						sa.checkNull(m.carNo, '请输入 [车牌号]');
 						sa.checkNull(m.carLength, '请输入 [车长度]');
 						// 开始增加或修改

+ 1 - 1
sp-server/src/main/java/com/pj/api/jh/service/JhService.java

@@ -87,7 +87,7 @@ public class JhService {
             throw new Exception("其他人正在付款....");
         }
         TbOrder successOrder=tbOrderService.findSuccessOrder(attchStr);
-        if (successOrder!=null){
+        if (successOrder!=null&&StrUtil.contains(attchStr,"b")){
             throw new Exception("业务订单已支付....");
         }
         String out_trade_no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(6);

+ 7 - 9
sp-server/src/main/java/com/pj/api/open/service/OpenService.java

@@ -187,16 +187,14 @@ public class OpenService {
                 return ResultJson.error("业务未审核");
             }
         }
-        //判断是否蓝色车牌===免停车费
-        if (StrUtil.isNotEmpty(tbBusinessCar.getColor())) {
+        //判断是否4.2米以下蓝色车牌===免停车费
+        if (StrUtil.isNotEmpty(tbBusinessCar.getColor())&&tbBusinessCar.getCarSize()!=null) {
             String freeColor = partConfig.getFreeColor();
-            if (tbBusinessCar.getColor().contains(freeColor)) {
-                TbMildCar tbMildCar = tbMildCarService.findByCarNo(tbBusinessCar.getCarNo());
-                if (tbMildCar == null) {
-                    log.error("请求返回【蓝牌未备案车辆,放行】:{},{}", carNo, ResultJson.success());
-                    freeOut(tbBusinessCar, now, channel, image);
-                    return ResultJson.success();
-                }
+            //4.2米以下蓝色车辆
+            if (tbBusinessCar.getColor().contains(freeColor)&&tbBusinessCar.getCarSize()<=partConfig.getFreeCarLength()) {
+                log.error("请求返回【蓝牌未备案车辆,放行】:{},{}", carNo, ResultJson.success());
+                freeOut(tbBusinessCar, now, channel, image);
+                return ResultJson.success();
             }
         }
         //是否行政车辆=====

+ 4 - 1
sp-server/src/main/java/com/pj/api/wx/service/WxService.java

@@ -50,6 +50,7 @@ import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.nio.charset.Charset;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 @Transactional
@@ -245,8 +246,10 @@ public class WxService {
             Date finalPayTime = payTime;
             if (StrUtil.isNotEmpty(businessId)) {
                 List<String> businessIds = StrUtil.splitTrim(businessId, ",");
-                List<TbBusinessItem> items = tbBusinessItemService.findByBusinessIdList(businessIds);
                 List<TbBusiness> businessList = tbBusinessService.listByIds(businessIds);
+                businessList=businessList.stream().filter(tbBusiness -> tbBusiness.getPayStatus()!=TbBusiness.PayStatus.HAS_PAY_CONFIRM.getCode()).collect(Collectors.toList());
+                businessIds=businessList.stream().map(TbBusiness::getId).collect(Collectors.toList());
+                List<TbBusinessItem> items = tbBusinessItemService.findByBusinessIdList(businessIds);
                 for (TbBusiness tbBusiness : businessList) {
                     tbBusiness.setPayTime(payTime).setPayType(3).setConfirmInput(1).setConfirmInputTime(payTime)
                             .setPayMoney(tbBusiness.getItemPrice())

+ 1 - 1
sp-server/src/main/java/com/pj/current/satoken/SaTokenConfigure.java

@@ -69,7 +69,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
     public SaServletFilter getSaServletFilter() {
         return new SaServletFilter()
                 // 拦截与排除 path
-                .addInclude("/**").addExclude("/favicon.ico").addExclude("/wx/**")
+                .addInclude("/**").addExclude("/favicon.ico")
 
                 // 全局认证函数
                 .setAuth(obj -> {

+ 5 - 10
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -490,7 +490,7 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
         BigDecimal basePrice=partConfig.getBasePrice();
         BigDecimal uniPrice = basePrice.add(extraPrice);//超过24小时之后每24个小时收费金额
         //4.2~9.6
-        if (carSize < partConfig.getMildCarLength() && carSize >= partConfig.getFreeCarLength()) {
+        if (carSize <= partConfig.getMildCarLength() && carSize > partConfig.getFreeCarLength()) {
             basePrice=partConfig.getMildCarBasePrice();
             uniPrice = basePrice.add(extraPrice);
         }
@@ -570,18 +570,13 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 }
                 partMoney = this.calculationPartMoney(inTime, now, tbBusinessCar.getCarSize());
             }
-            if (StrUtil.isNotEmpty(tbBusinessCar.getColor())) {
+            if (StrUtil.isNotEmpty(tbBusinessCar.getColor())&&tbBusinessCar.getCarSize()!=null) {
                 String freeColor = partConfig.getFreeColor();
-                //蓝色车辆
-                if (tbBusinessCar.getColor().contains(freeColor)) {
-                    //不在4.2~9.6米之内的免费
-                    TbMildCar tbMildCar = tbMildCarService.findByCarNo(tbBusinessCar.getCarNo());
-                    if (tbMildCar == null) {
-                        partMoney = new BigDecimal("0");
-                    }
+                //4.2米以下蓝色车辆
+                if (tbBusinessCar.getColor().contains(freeColor)&&tbBusinessCar.getCarSize()<=partConfig.getFreeCarLength()) {
+                    partMoney = new BigDecimal("0");
                 }
             }
-
             //越南车牌,是否免费
             if (TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && vietnamCarPay == 0) {
                 partMoney = new BigDecimal("0");

+ 1 - 1
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java

@@ -233,7 +233,7 @@ public class TbFeeDetails implements Serializable {
         NUCLEIC_FEE(1, "核酸检测"),
         DISINFECT_FEE(2, "消杀作业"),
         STEVEDORE_FEE(3, "装卸作业"),
-        PARK_FEE(4, "停车"),
+        PARK_FEE(4, "停车业务"),
         WEIGHT_FEE(5, "过磅费"),
         MANAGE_FEE(6, "入场管理费"),
         CHARGE_FEE(7, "充电打冷作业");

+ 17 - 15
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -212,7 +212,6 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
      * @param now
      */
     public void chargeParkFee(List<PriceBO> cars, String transactionId, String outTradeNo, Date now, String module) {
-        String payDay = DateUtil.format(now, "yyyy-MM-dd");
         for (PriceBO bo1 : cars) {
             //本次支付的停车费金额
             BigDecimal payPrice = bo1.getP();
@@ -222,30 +221,33 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
             TbBusinessCar car = tbBusinessCarService.getById(bo1.getId());
             //24小时内的停车费
             BigDecimal in24Price = partConfig.getBasePrice();
+            TbFeeDetails in24Detail = new TbFeeDetails();
+            TbFeeDetails out24Details = new TbFeeDetails();
+            in24Detail.setItemName("大型货车(含9.6米以上货车)");
+            out24Details.setItemName("大型货车(含9.6米以上货车)");
             //4.2~9.6
-            if (car.getCarSize() < partConfig.getMildCarLength() && car.getCarSize() >= partConfig.getFreeCarLength()) {
+            if (car.getCarSize() <= partConfig.getMildCarLength() && car.getCarSize() > partConfig.getFreeCarLength()) {
                 in24Price = partConfig.getMildCarBasePrice();
+                in24Detail.setItemName("中小型货车(9.6米以下货车)");
+                out24Details.setItemName("中小型货车(9.6米以下货车)");
             }
+            //24小时内的停车费
+            in24Detail.setNum(1).setItemTypeName(TbFeeDetails.PartFeeEnum.IN_24_HOURS.getDesc())
+                    .setUnitPrice(in24Price).setItemPrice(in24Price);
+            setFee(in24Detail, car, transactionId, outTradeNo, now);
+            String type = StrUtil.isEmpty(in24Detail.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
+            saveOrUpdate(in24Detail);
+            taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, in24Detail.getId(), type));
             //24小时外的停车费
             BigDecimal out24Price = payPrice.subtract(in24Price);
-            if (in24Price.compareTo(BigDecimal.valueOf(0)) > 0) {
-                TbFeeDetails in24Detail = new TbFeeDetails();
-
-                in24Detail.setNum(1).setItemTypeName(TbFeeDetails.PartFeeEnum.IN_24_HOURS.getDesc())
-                        .setUnitPrice(in24Price).setItemPrice(in24Price);
-                setFee(in24Detail, car, transactionId, outTradeNo, now);
-                String type = StrUtil.isEmpty(in24Detail.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
-                saveOrUpdate(in24Detail);
-                taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, in24Detail.getId(), type));
-            }
             if (out24Price.compareTo(BigDecimal.valueOf(0)) > 0) {
-                TbFeeDetails out24Details = new TbFeeDetails();
-                BigDecimal unitPrice = in24Price.subtract(partConfig.getExtraPrice());
+
+                BigDecimal unitPrice = in24Price.add(partConfig.getExtraPrice());
                 int num = out24Price.divide(unitPrice, BigDecimal.ROUND_UP, 0).intValue();
                 out24Details.setNum(num).setItemTypeName(TbFeeDetails.PartFeeEnum.OUT_24_HOURS.getDesc())
                         .setUnitPrice(unitPrice).setItemPrice(out24Price);
                 setFee(out24Details, car, transactionId, outTradeNo, now);
-                String type = StrUtil.isEmpty(out24Details.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
+                type = StrUtil.isEmpty(out24Details.getId()) ? TbFeeDetails.SyncTypeEnum.INSERT.getCode() : TbFeeDetails.SyncTypeEnum.UPDATE.getCode();
                 saveOrUpdate(out24Details);
                 taskService.addTask(new FeeDetailSyncTask(RandomUtil.randomNumbers(10), 1000, out24Details.getId(), type));
             }

+ 95 - 59
sp-server/src/main/java/com/pj/project/tb_mild_car/TbMildCarService.java

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.current.config.SystemObject;
 import com.pj.project.tb_business_car.ExportTbBusinessDTO;
 import com.pj.project.tb_business_car.TbBusinessCar;
+import com.pj.project.tb_business_car.TbBusinessCarService;
 import com.pj.project.tb_item.TbItem;
 import com.pj.project.tb_item.TbItemMapper;
 import com.pj.project4sp.uploadfile.UploadConfig;
@@ -30,75 +31,110 @@ import javax.annotation.Resource;
 
 /**
  * Service: tb_mild_car -- 4.2~9.6车辆管理
- * @author qzy 
+ *
+ * @author qzy
  */
 @Service
 @Transactional(rollbackFor = Exception.class)
 public class TbMildCarService extends ServiceImpl<TbMildCarMapper, TbMildCar> implements IService<TbMildCar> {
 
-	/** 底层 Mapper 对象 */
-	@Autowired
-	TbMildCarMapper tbMildCarMapper;
-	@Resource
-	private UploadConfig uploadConfig;
-	/** 增 */
-	int add(TbMildCar t){
-		if (StrUtil.isEmpty(t.getCarNo())){
-			throw new AjaxError("车牌号不能为空");
-		}
-		t.setCarNo(t.getCarNo().toUpperCase());
-		this.save(t);
-		return 1;
-	}
+    /**
+     * 底层 Mapper 对象
+     */
+    @Autowired
+    TbMildCarMapper tbMildCarMapper;
+    @Resource
+    private UploadConfig uploadConfig;
+    @Resource
+    private TbBusinessCarService tbBusinessCarService;
 
-	/** 删 */
-	int delete(Long id){
-		return tbMildCarMapper.delete(id);
-	}
+    /**
+     * 增
+     */
+    int add(TbMildCar t) {
+        if (StrUtil.isEmpty(t.getCarNo())) {
+            throw new AjaxError("车牌号不能为空");
+        }
+        if (t.getCarLength() == null) {
+            throw new AjaxError("车长不正确");
+        }
+        String carNo = t.getCarNo().toUpperCase();
+        t.setCarNo(carNo);
+        this.save(t);
+        List<TbBusinessCar> businessCars = tbBusinessCarService.findByCarNo(carNo);
+        businessCars.parallelStream().forEach(tbBusinessCar -> tbBusinessCar.setCarSize(t.getCarLength()));
+        tbBusinessCarService.updateBatchById(businessCars);
+        return 1;
+    }
 
-	/** 改 */
-	int update(TbMildCar t){
-		if (StrUtil.isEmpty(t.getCarNo())){
-			throw new AjaxError("车牌号不能为空");
-		}
-		this.updateById(t);
-		return 1;
-	}
+    /**
+     * 删
+     */
+    int delete(Long id) {
+        return tbMildCarMapper.delete(id);
+    }
 
-	/** 查 */
-	TbMildCar getById(Long id){
-		return tbMildCarMapper.getById(id);
-	}
+    /**
+     * 改
+     */
+    int update(TbMildCar t) {
+        if (StrUtil.isEmpty(t.getCarNo())) {
+            throw new AjaxError("车牌号不能为空");
+        }
+        if (t.getCarLength() == null) {
+            throw new AjaxError("车长不正确");
+        }
+        String carNo = t.getCarNo().toUpperCase();
+        t.setCarNo(carNo);
+        TbMildCar db=this.getById(t.getId());
+        if (!t.getCarLength().equals(db.getCarLength())){
+            List<TbBusinessCar> businessCars = tbBusinessCarService.findByCarNo(carNo);
+            businessCars.parallelStream().forEach(tbBusinessCar -> tbBusinessCar.setCarSize(t.getCarLength()));
+            tbBusinessCarService.updateBatchById(businessCars);
+        }
+        this.updateById(t);
+        return 1;
+    }
 
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	List<TbMildCar> getList(SoMap so) {
-		return tbMildCarMapper.getList(so);	
-	}
+    /**
+     * 查
+     */
+    TbMildCar getById(Long id) {
+        return tbMildCarMapper.getById(id);
+    }
 
+    /**
+     * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+     */
+    List<TbMildCar> getList(SoMap so) {
+        return tbMildCarMapper.getList(so);
+    }
 
-	public String export(SoMap soMap) {
-		List<TbMildCar> cars = this.getList(soMap);
-		String flieTypeFolder = "/export/";
-		String currDateFolder = DateUtil.today();
-		String fileName = "record-" +RandomUtil.randomNumbers(6) + ".xlsx";
-		String fileFolder = new File(uploadConfig.rootFolder).getAbsolutePath() +
-				uploadConfig.httpPrefix + flieTypeFolder + currDateFolder + "/";
-		if (!FileUtil.exist(fileFolder)) {
-			FileUtil.mkdir(fileFolder);
-		}
-		EasyExcel.write(fileFolder + fileName, TbMildCar.class).sheet("4.2米~9.6米车导出记录")
-				.doWrite(() -> cars);
-		return SystemObject.config.getDomain() + uploadConfig.httpPrefix + flieTypeFolder + currDateFolder + "/" + fileName;
-	}
 
-	/**
-	 * 根据车牌查询
-	 * @param carNo
-	 * @return
-	 */
-	public TbMildCar findByCarNo(String carNo) {
-		QueryWrapper<TbMildCar>ew=new QueryWrapper<>();
-		ew.lambda().eq(TbMildCar::getCarNo,carNo);
-		return getOne(ew);
-	}
+    public String export(SoMap soMap) {
+        List<TbMildCar> cars = this.getList(soMap);
+        String flieTypeFolder = "/export/";
+        String currDateFolder = DateUtil.today();
+        String fileName = "record-" + RandomUtil.randomNumbers(6) + ".xlsx";
+        String fileFolder = new File(uploadConfig.rootFolder).getAbsolutePath() +
+                uploadConfig.httpPrefix + flieTypeFolder + currDateFolder + "/";
+        if (!FileUtil.exist(fileFolder)) {
+            FileUtil.mkdir(fileFolder);
+        }
+        EasyExcel.write(fileFolder + fileName, TbMildCar.class).sheet("4.2米~9.6米车导出记录")
+                .doWrite(() -> cars);
+        return SystemObject.config.getDomain() + uploadConfig.httpPrefix + flieTypeFolder + currDateFolder + "/" + fileName;
+    }
+
+    /**
+     * 根据车牌查询
+     *
+     * @param carNo
+     * @return
+     */
+    public TbMildCar findByCarNo(String carNo) {
+        QueryWrapper<TbMildCar> ew = new QueryWrapper<>();
+        ew.lambda().eq(TbMildCar::getCarNo, carNo);
+        return getOne(ew);
+    }
 }