use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeService method getUnreplyReminders.
/**
* 获取店铺未回复的催单
*
* @param getUnreplyRemindersModel
* @return
* @throws IOException
*/
public ApiRest getUnreplyReminders(GetUnreplyRemindersModel getUnreplyRemindersModel) throws IOException {
BigInteger tenantId = getUnreplyRemindersModel.getTenantId();
BigInteger branchId = getUnreplyRemindersModel.getBranchId();
Branch branch = findBranch(tenantId, branchId);
Map<String, Object> params = new HashMap<String, Object>();
params.put("shopId", branch.getShopId());
ApiRest callElemeSystemApiRest = ElemeUtils.callElemeSystem(tenantId.toString(), branchId.toString(), branch.getElemeAccountType(), "eleme.order.getUnreplyReminders", params);
Validate.isTrue(callElemeSystemApiRest.isSuccessful(), callElemeSystemApiRest.getError());
return new ApiRest(callElemeSystemApiRest.getData(), "获取店铺未回复的催单成功!");
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeService method agreeRefundLite.
/**
* 同意退单/同意取消单
*
* @param agreeRefundLiteModel
* @return
* @throws IOException
*/
public ApiRest agreeRefundLite(AgreeRefundLiteModel agreeRefundLiteModel) throws IOException {
BigInteger tenantId = agreeRefundLiteModel.getTenantId();
BigInteger branchId = agreeRefundLiteModel.getBranchId();
BigInteger elemeOrderId = agreeRefundLiteModel.getElemeOrderId();
Branch branch = findBranch(tenantId, branchId);
ElemeOrder elemeOrder = findElemeOrder(tenantId, branchId, elemeOrderId);
Map<String, Object> params = new HashMap<String, Object>();
params.put("orderId", elemeOrder.getOrderId());
ApiRest callElemeSystemApiRest = ElemeUtils.callElemeSystem(tenantId.toString(), branchId.toString(), branch.getElemeAccountType(), "eleme.order.agreeRefundLite", params);
Validate.isTrue(callElemeSystemApiRest.isSuccessful(), callElemeSystemApiRest.getError());
return new ApiRest(callElemeSystemApiRest.getData(), "同意退单/同意取消单成功!");
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeService method getOrderRateByOrderId.
/**
* 获取指定订单的评论
*
* @param getOrderRateByOrderIdModel
* @return
* @throws IOException
*/
public ApiRest getOrderRateByOrderId(GetOrderRateByOrderIdModel getOrderRateByOrderIdModel) throws IOException {
BigInteger tenantId = getOrderRateByOrderIdModel.getTenantId();
BigInteger branchId = getOrderRateByOrderIdModel.getBranchId();
Branch branch = findBranch(tenantId, branchId);
ElemeOrder elemeOrder = findElemeOrder(tenantId, branchId, getOrderRateByOrderIdModel.getDietOrderId());
Map<String, Object> params = new HashMap<String, Object>();
params.put("orderId", elemeOrder.getOrderId());
ApiRest callElemeSystemApiRest = ElemeUtils.callElemeSystem(tenantId.toString(), branchId.toString(), branch.getElemeAccountType(), "eleme.ugc.getOrderRateByOrderId", params);
Validate.isTrue(callElemeSystemApiRest.isSuccessful(), callElemeSystemApiRest.getError());
return new ApiRest(callElemeSystemApiRest.getData(), "获取指定订单的评论成功!");
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeService method getPreparedTimesByOrderIds.
/**
* 查询已出餐列表
*
* @param getPreparedTimesByOrderIdsModel
* @return
* @throws IOException
*/
public ApiRest getPreparedTimesByOrderIds(GetPreparedTimesByOrderIdsModel getPreparedTimesByOrderIdsModel) throws IOException {
BigInteger tenantId = getPreparedTimesByOrderIdsModel.getTenantId();
BigInteger branchId = getPreparedTimesByOrderIdsModel.getBranchId();
Branch branch = findBranch(tenantId, branchId);
List<ElemeOrder> elemeOrders = findAllElemeOrders(tenantId, branchId, getPreparedTimesByOrderIdsModel.getElemeOrderIds());
List<String> orderIds = obtainOrderIds(elemeOrders);
Map<String, Object> params = new HashMap<String, Object>();
params.put("orderIds", orderIds);
ApiRest callElemeSystemApiRest = ElemeUtils.callElemeSystem(tenantId.toString(), branchId.toString(), branch.getElemeAccountType(), "eleme.order.getPreparedTimesByOrderIds", params);
Validate.isTrue(callElemeSystemApiRest.isSuccessful(), callElemeSystemApiRest.getError());
return new ApiRest(callElemeSystemApiRest.getData(), "查询已出餐列表成功!");
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeService method getAllOrders.
/**
* 查询全部订单
*
* @param getAllOrdersModel
* @return
* @throws IOException
*/
public ApiRest getAllOrders(GetAllOrdersModel getAllOrdersModel) throws IOException {
BigInteger tenantId = getAllOrdersModel.getTenantId();
BigInteger branchId = getAllOrdersModel.getBranchId();
Branch branch = findBranch(tenantId, branchId);
Map<String, Object> params = new HashMap<String, Object>();
params.put("shopId", branch.getShopId());
params.put("pageNo", getAllOrdersModel.getPageNo());
params.put("pageSize", getAllOrdersModel.getPageSize());
params.put("date", getAllOrdersModel.getDate());
ApiRest callElemeSystemApiRest = ElemeUtils.callElemeSystem(tenantId.toString(), branchId.toString(), branch.getElemeAccountType(), "eleme.order.getAllOrders", params);
Validate.isTrue(callElemeSystemApiRest.isSuccessful(), callElemeSystemApiRest.getError());
return new ApiRest(callElemeSystemApiRest.getData(), "查询全部订单成功!");
}
Aggregations