Parcourir la source

1、车辆上报新增车、司机与企业关联关系;

zk il y a 2 ans
Parent
commit
10eac23b1d

+ 11 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckReportService.java

@@ -28,6 +28,7 @@ import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.checkerframework.checker.units.qual.K;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -349,6 +350,11 @@ public class KwfTruckReportService {
                 } else {
                     continue;
                 }
+
+                //校验企业是否添加该车辆
+                KwfTruck truckEnt = new KwfTruck();
+                truckEnt.setId(truck.getId());
+                truckService.truckEntEdit(truckEnt);
             }
 
             /**档案信息**/
@@ -379,6 +385,11 @@ public class KwfTruckReportService {
                 } else {
                     continue;
                 }
+
+                //校验企业是否添加该司机
+                KwfDriver driverEnt = new KwfDriver();
+                driverEnt.setId(driver.getId());
+                driverService.driverEntEdit(driverEnt);
             }
 
             count += truckReportDao.insert(truckReport);