Browse Source

fix: 自助服务
1.客户端工具查询餐卡时不再过滤卡状态

luoyb 1 year ago
parent
commit
ff568b5daf

+ 9 - 0
ruoyi-modules/ruoyi-backstage/src/main/java/org/dromara/backstage/business/card/CardBusiness.java

@@ -223,6 +223,15 @@ public class CardBusiness {
         return cardVos.stream().filter(p -> ObjectUtil.equal(p.getStatus(), CardStatusEnum.NORMAL.code().toString())).findFirst().orElse(null);
     }
 
+    public PtCardVo getCardByFactoryId(Long factoryId){
+        PtCardBo bo = new PtCardBo();
+        bo.setFactoryId(factoryId);
+        List<PtCardVo> cardVos = ptCardService.queryList(bo);
+        if (CollectionUtil.isEmpty(cardVos)) {
+            return null;
+        }
+        return cardVos.get(0);
+    }
     private R<ResultInfo> checkParam(PtCardBo cardBo, PtUserAccountVo userAccountVo, PtWorkstationVo workstationVo) {
         Long factoryId = cardBo.getFactoryId();
         Long userId = cardBo.getUserId();

+ 1 - 1
ruoyi-modules/ruoyi-backstage/src/main/java/org/dromara/backstage/business/self/SelfBusiness.java

@@ -210,7 +210,7 @@ public class SelfBusiness {
      */
     public ReturnResult getUserCardInfo(Long userFixId, String roomFixId, String roomData) {
         YcSelfCardVo selfCardVo = new YcSelfCardVo();
-        PtCardVo cardVo = cardBusiness.getUseCardByFactoryId(userFixId);
+        PtCardVo cardVo = cardBusiness.getCardByFactoryId(userFixId);
         if(ObjectUtil.isNotEmpty(cardVo)){
             selfCardVo.setCardStatusId(Integer.parseInt(cardVo.getStatus()));
             selfCardVo.setUserCardTypeId(Math.toIntExact(cardVo.getCardType()));