Ver Fonte

Merge branch 'dev_20251030' of https://git.sckaiwu.cn/kaiwu-rep/sckw-service-platform into dev_20251030

chenxiaofei há 2 meses atrás
pai
commit
159af6e81d

+ 10 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/controller/KwfTruckController.java

@@ -21,6 +21,7 @@ import com.sckw.fleet.model.dto.KwfTruckDto;
 import com.sckw.fleet.model.dto.KwfTruckLicenseDto;
 import com.sckw.fleet.model.request.CapacityStatusReq;
 import com.sckw.fleet.model.request.TruckInfoReq;
+import com.sckw.fleet.model.request.TruckNoReq;
 import com.sckw.fleet.model.vo.*;
 import com.sckw.fleet.service.KwfTruckService;
 import com.sckw.system.api.RemoteSystemService;
@@ -334,4 +335,13 @@ public class KwfTruckController {
     public BaseResult<PageDataResult<AppTruckInfoVo>> pageAppTruckInfo(@RequestBody TruckInfoReq req) {
         return BaseResult.success(truckService.pageAppTruckInfo(req));
     }
+
+    /**
+     *  通过企业id获取车牌信息
+     **/
+    @PostMapping("/queryTruckNo")
+    @Operation(summary = "通过企业id获取车牌信息", description = "通过企业id获取车牌信息")
+    public BaseResult<List<String>> queryTruckNo(@RequestBody TruckNoReq req) {
+        return BaseResult.success(truckService.queryTruckNo(req));
+    }
 }

+ 21 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/request/TruckNoReq.java

@@ -0,0 +1,21 @@
+package com.sckw.fleet.model.request;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author PC
+ */
+@Data
+public class TruckNoReq  implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 2817549090778895490L;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+}

+ 6 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckDetailVo.java

@@ -1,5 +1,6 @@
 package com.sckw.fleet.model.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -132,6 +133,11 @@ public class KwfTruckDetailVo implements Serializable {
      */
     private String vin;
 
+    /**
+     * 轴数
+     */
+    private String carAxis;
+
     /**
      * 车辆行驶证信息
      */

+ 7 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/repository/KwfTruckRepository.java

@@ -31,6 +31,13 @@ public class KwfTruckRepository extends ServiceImpl<KwfTruckMapper, KwfTruck> {
                 .last("limit 1"));
     }
 
+    public List<KwfTruck> getTurkNoList(Long entId) {
+        return list(Wrappers.<KwfTruck>lambdaQuery()
+                .eq(BaseModel::getDelFlag, 0)
+                .eq(Objects.nonNull(entId), KwfTruck::getEntId, entId)
+                .orderByDesc(BaseModel::getCreateTime));
+    }
+
 
 
     public List<KwfTruck> findAll() {

+ 19 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java

@@ -34,6 +34,7 @@ import com.sckw.fleet.model.*;
 import com.sckw.fleet.model.dto.*;
 import com.sckw.fleet.model.request.CapacityStatusReq;
 import com.sckw.fleet.model.request.TruckInfoReq;
+import com.sckw.fleet.model.request.TruckNoReq;
 import com.sckw.fleet.model.vo.*;
 import com.sckw.fleet.repository.*;
 import com.sckw.system.api.RemoteSystemService;
@@ -1693,4 +1694,22 @@ public class KwfTruckService {
         truckInfoVo.setBusinessStatus(String.valueOf(t.getBusinessStatus()));
         return truckInfoVo;
     }
+
+
+    /**
+     * 通过企业id获取车牌信息
+     * @param req
+     * @return
+     */
+    public List<String> queryTruckNo(TruckNoReq req) {
+        if (req.getEntId() == null) {
+            throw new RuntimeException("企业id不能为空");
+        }
+
+        List<KwfTruck> turkNoList = kwfTruckRepository.getTurkNoList(req.getEntId());
+        if (CollectionUtils.isEmpty(turkNoList)) {
+            return Collections.emptyList();
+        }
+        return turkNoList.stream().map(KwfTruck::getTruckNo).collect(Collectors.toList());
+    }
 }

+ 1 - 1
sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckMapper.xml

@@ -178,7 +178,7 @@
         tr.spec, tr.actual_weight actualWeight, tr.gross_weight grossWeight, tr.tare_weight tareWeight,
         tr.color, tr.eev, tr.trailer_no trailerNo, tr.total_complete totalComplete, tr.total_take totalTake,
         tr.total_weight totalWeight, tr.business_status businessStatus, tr.remark, tr.status, tr.auth_status authStatus,
-        tr.create_by createBy, tr.create_time createTime, tr.update_by updateBy, tr.update_time updateTime,
+        tr.create_by createBy, tr.create_time createTime, tr.update_by updateBy, tr.update_time updateTime,tr.car_axis,tr.vin,tr.brand,
         trl.owner, trl.vin, trl.reg_time regTime, trl.grant_time grantTime, trl.grant_unit grantUnit,
         trl.driving_no drivingNo, tranl.road_tran_no roadTranNo, tranl.firm_name tranFirmName,
         tranl.business_license_no businessLicenseNo, fl.`name` fleetName