15143018065 11 місяців тому
батько
коміт
a1661bb550

+ 5 - 0
ruoyi-modules/mz-lnst/src/main/java/com/ruoyi/lnst/controller/ZwywJclrYcxxController.java

@@ -42,6 +42,11 @@ public class ZwywJclrYcxxController extends BaseController
         return getDataTable(list);
     }
 
+    @GetMapping("/applist")
+    public AjaxResult applist(ZwywJclrYcxx zwywJclrYcxx)
+    {
+        return AjaxResult.success(zwywJclrYcxxService.selectAppList(zwywJclrYcxx));
+    }
 
     @RequiresPermissions("business:ycxx:list")
     @GetMapping("/listAndLrInfo")

+ 5 - 1
ruoyi-modules/mz-lnst/src/main/java/com/ruoyi/lnst/service/IZwywJclrYcxxService.java

@@ -1,8 +1,9 @@
 package com.ruoyi.lnst.service;
 
-import java.util.List;
 import com.ruoyi.lnst.domain.ZwywJclrYcxx;
 
+import java.util.List;
+
 /**
  * 养老食堂_用餐信息Service接口
  *
@@ -26,6 +27,9 @@ public interface IZwywJclrYcxxService
      * @return 养老食堂_用餐信息集合
      */
     public List<ZwywJclrYcxx> selectZwywJclrYcxxList(ZwywJclrYcxx zwywJclrYcxx);
+
+    public List<ZwywJclrYcxx> selectAppList(ZwywJclrYcxx zwywJclrYcxx);
+
     public List<ZwywJclrYcxx> listAndLrInfo(ZwywJclrYcxx zwywJclrYcxx);
 
     /**

+ 15 - 0
ruoyi-modules/mz-lnst/src/main/java/com/ruoyi/lnst/service/impl/ZwywJclrYcxxServiceImpl.java

@@ -73,6 +73,21 @@ public class ZwywJclrYcxxServiceImpl implements IZwywJclrYcxxService {
         return zwywJclrBtbzs;
     }
 
+    @Override
+    public List<ZwywJclrYcxx> selectAppList(ZwywJclrYcxx zwywJclrYcxx) {
+        if (StringUtils.isEmpty(zwywJclrYcxx.getYcsj())) {
+            throw new ServiceException("就餐时间不能为空");
+        }
+        if (StringUtils.isEmpty(zwywJclrYcxx.getSbid())) {
+            throw new ServiceException("设备编码不能为空");
+        }
+        LambdaQueryWrapper<ZwywJclrYcxx> lqw = new LambdaQueryWrapper<ZwywJclrYcxx>().eq(ZwywJclrYcxx::getSbid, zwywJclrYcxx.getSbid())
+                .like(ZwywJclrYcxx::getYcsj, zwywJclrYcxx.getYcsj());
+        List<ZwywJclrYcxx> res = zwywJclrYcxxMapper.selectList(lqw);
+        res.forEach(z -> z.setSsqhMc(sysDeptJlMapper.getXzqhNames(z.getSsqh().length() == 6 ? z.getSsqh() + "000000" : z.getSsqh())));
+        return res;
+    }
+
 
     @Override
     public List<ZwywJclrYcxx> listAndLrInfo(ZwywJclrYcxx zwywJclrYcxx) {