This commit is contained in:
parent
0fa9bb8baa
commit
06a083c91a
|
|
@ -32,6 +32,7 @@ import com.bonus.common.core.web.controller.BaseController;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* 菜品计划信息Controller
|
||||
|
|
@ -179,4 +180,14 @@ public class MenuRecipeController extends BaseController {
|
|||
return this.menuRecipeService.intervalConfig(HeaderFetchUtil.getMachineSn(headers));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping({"/import/check"})
|
||||
@ApiOperation("导入之前检查数据是否可以导入")
|
||||
public AjaxResult importDishesCheck(@RequestParam("file") MultipartFile excel) {
|
||||
return AjaxResult.success(this.menuRecipeService.importDishesCheck(excel));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.bonus.canteen.core.menu.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DishesImportCheckResult {
|
||||
// private List<MenuDishesImportDTO> successList;
|
||||
// private List<MenuDishesImportDTO> errorList;
|
||||
//
|
||||
// public List<MenuDishesImportDTO> getSuccessList() {
|
||||
// return this.successList;
|
||||
// }
|
||||
//
|
||||
// public List<MenuDishesImportDTO> getErrorList() {
|
||||
// return this.errorList;
|
||||
// }
|
||||
//
|
||||
// public void setSuccessList(final List<MenuDishesImportDTO> successList) {
|
||||
// this.successList = successList;
|
||||
// }
|
||||
//
|
||||
// public void setErrorList(final List<MenuDishesImportDTO> errorList) {
|
||||
// this.errorList = errorList;
|
||||
// }
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@ import com.bonus.canteen.core.menu.dto.MenuRecipeAddDTO;
|
|||
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
|
||||
import com.bonus.canteen.core.menu.dto.MenuTypeDishesDTO;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
|
@ -105,4 +106,6 @@ public interface IMenuRecipeService extends IService<MenuRecipe> {
|
|||
DviceTimeIntervalVO intervalConfig(String machineSn);
|
||||
|
||||
List<AllocRecipeStallVO> selectMenuRecipeListV2(AllocRecipeStallDTO dto);
|
||||
|
||||
DishesImportCheckResult importDishesCheck(MultipartFile excel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ import org.springframework.core.task.AsyncTaskExecutor;
|
|||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.menu.mapper.MenuRecipeMapper;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
|
@ -186,6 +187,11 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
return records;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DishesImportCheckResult importDishesCheck(MultipartFile excel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindAppRecipe(MenuRecipeBindDTO content) {
|
||||
MenuRecipe menuRecipe = this.menuRecipeMapper.selectMenuRecipe(content.getRecipeId());
|
||||
|
|
|
|||
|
|
@ -714,13 +714,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from device_recipe
|
||||
where device_id = (select device_id from device_info where device_sn = #{machineSn} limit 1) limit 1
|
||||
</select>
|
||||
<select id="selectMenuRecipeDetailList" resultType="com.bonus.canteen.core.menu.vo.MenuAndroidRecipeDetailVO">
|
||||
select
|
||||
detail_id as detailId,
|
||||
mealtime_type as mealTimeType,
|
||||
apply_date as applyData
|
||||
from menu_recipe_detail where recipe_id = #{recipeId} and apply_date >= Date(NOW())
|
||||
</select>
|
||||
<!-- <select id="selectMenuRecipeDetailList" resultType="com.bonus.canteen.core.menu.vo.MenuAndroidRecipeDetailVO">-->
|
||||
<!-- select-->
|
||||
<!-- detail_id as detailId,-->
|
||||
<!-- mealtime_type as mealTimeType,-->
|
||||
<!-- apply_date as applyData-->
|
||||
<!-- from menu_recipe_detail where recipe_id = #{recipeId} and apply_date >= Date(NOW())-->
|
||||
<!-- </select>-->
|
||||
<select id="selectRecipeDishList" resultType="com.bonus.canteen.core.menu.vo.IssueRecipeDetailCompressVO">
|
||||
select
|
||||
detail_id as detailId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue