|
@@ -1,9 +1,7 @@
|
|
package com.project.zcustom.controller.service;
|
|
package com.project.zcustom.controller.service;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.project.common.core.controller.BaseController;
|
|
import com.project.common.core.controller.BaseController;
|
|
import com.project.common.core.domain.AjaxResult;
|
|
import com.project.common.core.domain.AjaxResult;
|
|
-import com.project.common.utils.StringUtils;
|
|
|
|
import com.project.zcustom.domain.smart.PlatGreenSmart;
|
|
import com.project.zcustom.domain.smart.PlatGreenSmart;
|
|
import com.project.zcustom.service.smart.*;
|
|
import com.project.zcustom.service.smart.*;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -12,9 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
-import java.util.Objects;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 绿智食堂Controller
|
|
* 绿智食堂Controller
|
|
@@ -29,39 +25,41 @@ public class PlatGreenSmartController extends BaseController {
|
|
|
|
|
|
private final IPlatGreenSmartService platGreenSmartService;
|
|
private final IPlatGreenSmartService platGreenSmartService;
|
|
private final IPlatGreenSmartOtherService iPlatGreenSmartOtherService;
|
|
private final IPlatGreenSmartOtherService iPlatGreenSmartOtherService;
|
|
- private final IPlatGreenSmartEnergyService iPlatGreenSmartEnergyService;
|
|
|
|
private final IPlatGreenSmartRankService iPlatGreenSmartRankService;
|
|
private final IPlatGreenSmartRankService iPlatGreenSmartRankService;
|
|
private final IPlatGreenSmartSafetyService iPlatGreenSmartSafetyService;
|
|
private final IPlatGreenSmartSafetyService iPlatGreenSmartSafetyService;
|
|
private final IPlatGreenFoodsService iPlatGreenFoodsService;
|
|
private final IPlatGreenFoodsService iPlatGreenFoodsService;
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 食堂概览
|
|
|
|
+ * @param appOrg
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@RequestMapping("/getCanteenData")
|
|
@RequestMapping("/getCanteenData")
|
|
public AjaxResult getCanteenData(@RequestParam String appOrg) {
|
|
public AjaxResult getCanteenData(@RequestParam String appOrg) {
|
|
return AjaxResult.success("查询成功", platGreenSmartService.getCanteenData(appOrg));
|
|
return AjaxResult.success("查询成功", platGreenSmartService.getCanteenData(appOrg));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 食堂安全管理
|
|
|
|
+ * @param appOrg
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@RequestMapping("/getSafetyData")
|
|
@RequestMapping("/getSafetyData")
|
|
public AjaxResult getSafetyData(@RequestParam String appOrg) {
|
|
public AjaxResult getSafetyData(@RequestParam String appOrg) {
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartSafetyService.getSafetyData(appOrg));
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartSafetyService.getSafetyData(appOrg));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 下拉 公司食堂名称
|
|
|
|
+ * @param appOrg
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@RequestMapping("/getCanteenNameList")
|
|
@RequestMapping("/getCanteenNameList")
|
|
public AjaxResult getCanteenNameList(@RequestParam String appOrg) {
|
|
public AjaxResult getCanteenNameList(@RequestParam String appOrg) {
|
|
- QueryWrapper<PlatGreenSmart> queryWrapper = new QueryWrapper<>();
|
|
|
|
- List<PlatGreenSmart> smartList = new ArrayList<>();
|
|
|
|
- if(Objects.equals(appOrg,"0000")){
|
|
|
|
- queryWrapper.select("canteen_num").ne("app_org","10001").groupBy("canteen_num").last("limit 3");
|
|
|
|
- smartList = platGreenSmartService.list(queryWrapper);
|
|
|
|
- PlatGreenSmart smartInfo = platGreenSmartService.getOne((new QueryWrapper<PlatGreenSmart>()).eq("app_org","10001").select("canteen_num").last("limit 1"));
|
|
|
|
- if(StringUtils.isNotNull(smartInfo)){
|
|
|
|
- smartList.add(0,smartInfo);
|
|
|
|
- }
|
|
|
|
- }else{
|
|
|
|
- queryWrapper.select("canteen_num").eq("app_org", appOrg).groupBy("canteen_num").last("limit 4");
|
|
|
|
- smartList = platGreenSmartService.list(queryWrapper);
|
|
|
|
- }
|
|
|
|
|
|
+ List<PlatGreenSmart> smartList = platGreenSmartService.getgreenSmartName(appOrg);
|
|
return AjaxResult.success("查询成功", smartList);
|
|
return AjaxResult.success("查询成功", smartList);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -123,6 +121,12 @@ public class PlatGreenSmartController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 食堂健康许可证数量
|
|
|
|
+ * @param appOrg
|
|
|
|
+ * @param canteenName
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@RequestMapping("/getQualificationData")
|
|
@RequestMapping("/getQualificationData")
|
|
public AjaxResult getLicenceData(@RequestParam String appOrg,@RequestParam String canteenName) {
|
|
public AjaxResult getLicenceData(@RequestParam String appOrg,@RequestParam String canteenName) {
|
|
return AjaxResult.success("查询成功", platGreenSmartService.getQualificationData(appOrg, canteenName));
|
|
return AjaxResult.success("查询成功", platGreenSmartService.getQualificationData(appOrg, canteenName));
|
|
@@ -146,13 +150,21 @@ public class PlatGreenSmartController extends BaseController {
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartOtherService.getFoodData(appOrg));
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartOtherService.getFoodData(appOrg));
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取其他数据信息
|
|
|
|
+ * @param appOrg
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@RequestMapping("/getOtherData")
|
|
@RequestMapping("/getOtherData")
|
|
public AjaxResult getOtherData(@RequestParam String appOrg) {
|
|
public AjaxResult getOtherData(@RequestParam String appOrg) {
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartOtherService.getOtherData(appOrg));
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartOtherService.getOtherData(appOrg));
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 电子餐券
|
|
|
|
+ * @param appOrg
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
@RequestMapping("/getElectronicVouchersData")
|
|
@RequestMapping("/getElectronicVouchersData")
|
|
public AjaxResult getElectronicVouchersData(@RequestParam String appOrg) {
|
|
public AjaxResult getElectronicVouchersData(@RequestParam String appOrg) {
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartOtherService.getElectronicVouchersData(appOrg));
|
|
return AjaxResult.success("查询成功", iPlatGreenSmartOtherService.getElectronicVouchersData(appOrg));
|
|
@@ -165,6 +177,10 @@ public class PlatGreenSmartController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 单位菜品种类数量
|
|
|
|
+ * @param appOrg
|
|
|
|
+ */
|
|
@RequestMapping("/getFoodsTypeNum")
|
|
@RequestMapping("/getFoodsTypeNum")
|
|
public AjaxResult getFoodsTypeNum(@RequestParam String appOrg) {
|
|
public AjaxResult getFoodsTypeNum(@RequestParam String appOrg) {
|
|
return AjaxResult.success("查询成功", iPlatGreenFoodsService.getFoodsTypeNum(appOrg));
|
|
return AjaxResult.success("查询成功", iPlatGreenFoodsService.getFoodsTypeNum(appOrg));
|