Ver Fonte

录入整车业务selectOne BUG

qzyReal há 2 anos atrás
pai
commit
cf8bb2320b

+ 3 - 2
sp-server/src/main/java/com/pj/project/tb_business_car/TbBusinessCarService.java

@@ -125,8 +125,9 @@ public class TbBusinessCarService extends ServiceImpl<TbBusinessCarMapper, TbBus
         ew.eq("car_no", carNo.toUpperCase())
                 .isNotNull("real_in_time")
                 .isNull("business_id")
-                .isNull("real_out_time");
-        return getOne(ew);
+                .isNull("real_out_time").orderByDesc("id");
+        List<TbBusinessCar>list=list(ew);
+        return list.isEmpty()?null:list.get(0);
     }