Bläddra i källkod

修复查询物料生命周期的bug

hill.liu 4 månader sedan
förälder
incheckning
55d352c323

+ 3 - 0
src/main/java/com/sy/coinage/workshop/service/impl/BaseInfoServiceImpl.java

@@ -648,6 +648,9 @@ public class BaseInfoServiceImpl extends ServiceImpl<BaseInfoDao, BaseInfo> impl
                     .or().le("rfid_base_info_sub.crown_from", crown)
                     .ge("rfid_base_info_sub.crown_to", crown);
         });
+        // add by hliu date=20240506 因为按照条件,可能初期会产生测试的数据,该数据
+        //不会使用,但会影响查询,因此 按照ID降序排列,获取后面的数据,作为正确查询的rfid数据的值。
+        queryWrapper.orderByDesc("id");
         Page<BaseInfo> page = new Page<>(1, 1);
         IPage<BaseInfo> resp = this.baseMapper.queryOne(page, queryWrapper);
         if (resp.getRecords() != null && resp.getRecords().size() > 0) {