bug 食堂修改 补贴钱包 问题解决
This commit is contained in:
parent
c8c6afd53b
commit
b22aafd1a0
|
|
@ -11,7 +11,7 @@ import java.util.Date;
|
|||
|
||||
/**
|
||||
* 人员卡片资料对象 acc_card
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-20
|
||||
*/
|
||||
|
|
@ -61,7 +61,7 @@ public class AccountCard extends BaseEntity {
|
|||
/** 卡状态 1-正常 4-挂失 */
|
||||
@Excel(name = "卡状态 1-正常 4-挂失")
|
||||
@ApiModelProperty(value = "卡状态 1-正常 4-挂失 5-发卡 6-退卡 7-已过期")
|
||||
private Integer cardStatus;
|
||||
private Integer cardStatus = 1;
|
||||
|
||||
/** 押金 单位分 */
|
||||
@Excel(name = "押金 单位分")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 订单评价菜品对象 cook_evalua_detail
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -55,6 +55,9 @@ public class CookEvaluaDetail extends BaseEntity {
|
|||
@ApiModelProperty("评价者昵称")
|
||||
private String evaluaNickName;
|
||||
|
||||
@ApiModelProperty("照片地址")
|
||||
private String photoUrl;
|
||||
|
||||
@ApiModelProperty("评价图片")
|
||||
private List<String> pictureList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import org.apache.ibatis.annotations.Param;
|
|||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
@ -43,4 +44,6 @@ public interface CookRecipeH5Mapper {
|
|||
List<Long> selectWeekRecipeIdHistory(@Param("recipeIdList") List<Long> recipeId, @Param("effIdSet") Set<Long> effIdSet, @Param("applyDate") LocalDate applyDate);
|
||||
|
||||
List<AppletWeekRecipeVO> selectWeekRecipe(@Param("applyDate") LocalDate applyDate, @Param("recipeId") Long recipeId, @Param("recipeIdList") List<Long> recipeIdList);
|
||||
|
||||
List<CookStallSaleModel> selectMonthSalesStallInfo(@Param("stallIdList") List<Long> stallIdList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.cook.service.impl;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
||||
import com.bonus.canteen.core.cook.domain.CookEvaluaPicture;
|
||||
import com.bonus.canteen.core.cook.mapper.CookEvaluaPictureMapper;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
|
|
@ -15,7 +16,7 @@ import com.bonus.canteen.core.cook.service.ICookEvaluaDetailService;
|
|||
|
||||
/**
|
||||
* 订单评价菜品Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -28,7 +29,7 @@ public class CookEvaluaDetailServiceImpl implements ICookEvaluaDetailService {
|
|||
|
||||
/**
|
||||
* 查询订单评价菜品
|
||||
*
|
||||
*
|
||||
* @param evaluaDetailId 订单评价菜品主键
|
||||
* @return 订单评价菜品
|
||||
*/
|
||||
|
|
@ -39,7 +40,7 @@ public class CookEvaluaDetailServiceImpl implements ICookEvaluaDetailService {
|
|||
|
||||
/**
|
||||
* 查询订单评价菜品列表
|
||||
*
|
||||
*
|
||||
* @param cookEvaluaDetail 订单评价菜品
|
||||
* @return 订单评价菜品
|
||||
*/
|
||||
|
|
@ -52,13 +53,14 @@ public class CookEvaluaDetailServiceImpl implements ICookEvaluaDetailService {
|
|||
List<CookEvaluaPicture> menuEvaluaPictures = cookEvaluaPictureMapper.selectCookEvaluaPictureList(menuEvaluaPicture);
|
||||
List<String> pictures = menuEvaluaPictures.stream().map(CookEvaluaPicture::getImgUrl).collect(Collectors.toList());
|
||||
detail.setPictureList(pictures);
|
||||
detail.setPhotoUrl(FileUrlUtil.getFileUrl(detail.getPhotoUrl()));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单评价菜品
|
||||
*
|
||||
*
|
||||
* @param cookEvaluaDetail 订单评价菜品
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -74,7 +76,7 @@ public class CookEvaluaDetailServiceImpl implements ICookEvaluaDetailService {
|
|||
|
||||
/**
|
||||
* 修改订单评价菜品
|
||||
*
|
||||
*
|
||||
* @param cookEvaluaDetail 订单评价菜品
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -90,7 +92,7 @@ public class CookEvaluaDetailServiceImpl implements ICookEvaluaDetailService {
|
|||
|
||||
/**
|
||||
* 批量删除订单评价菜品
|
||||
*
|
||||
*
|
||||
* @param evaluaDetailIds 需要删除的订单评价菜品主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -101,7 +103,7 @@ public class CookEvaluaDetailServiceImpl implements ICookEvaluaDetailService {
|
|||
|
||||
/**
|
||||
* 删除订单评价菜品信息
|
||||
*
|
||||
*
|
||||
* @param evaluaDetailId 订单评价菜品主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.canteen.core.cook.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.bonus.canteen.core.basic.domain.*;
|
||||
|
|
@ -14,13 +15,15 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.YearMonth;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 菜品计划信息Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-05-25
|
||||
*/
|
||||
|
|
@ -44,7 +47,9 @@ public class CookRecipeH5ServiceImpl implements ICookRecipeH5Service {
|
|||
return canteen.getStallList().stream().map(AppletReserveStallVO::getStallId);
|
||||
}).collect(Collectors.toList());
|
||||
if (ObjectUtil.isNotEmpty(stallIdList)) {
|
||||
List<CookStallSaleModel> stallMonthSalesList = this.cookRecipeH5Mapper.selectMonthSalesStall(stallIdList);
|
||||
// List<CookStallSaleModel> stallMonthSalesList = this.cookRecipeH5Mapper.selectMonthSalesStall(stallIdList);
|
||||
//重构之前逻辑代码有问题 重新根据档口去查询关联数据信息
|
||||
List<CookStallSaleModel> stallMonthSalesList = this.cookRecipeH5Mapper.selectMonthSalesStallInfo(stallIdList);
|
||||
Map<Long, Integer> stallSaleMap = (Map)stallMonthSalesList.stream().collect(Collectors.toMap(CookStallSaleModel::getStallId, CookStallSaleModel::getMonthlySales));
|
||||
resultList.forEach((canteen) -> {
|
||||
List<AppletReserveStallVO> stallList = canteen.getStallList();
|
||||
|
|
@ -54,6 +59,7 @@ public class CookRecipeH5ServiceImpl implements ICookRecipeH5Service {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,21 +2,15 @@ package com.bonus.canteen.core.health.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.health.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.mybatis.logging.Logger;
|
||||
import org.mybatis.logging.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.canteen.core.health.domain.HealthPopularArticle;
|
||||
import com.bonus.canteen.core.health.service.IHealthPopularArticleService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -34,6 +28,9 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
@RestController
|
||||
@RequestMapping("/health_popular_article")
|
||||
public class HealthPopularArticleController extends BaseController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(HealthPopularArticleController.class);
|
||||
|
||||
@Autowired
|
||||
private IHealthPopularArticleService healthPopularArticleService;
|
||||
|
||||
|
|
@ -83,7 +80,7 @@ public class HealthPopularArticleController extends BaseController {
|
|||
//@RequiresPermissions("health:article:add")
|
||||
@SysLog(title = "营养科普", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增营养科普")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HealthPopularArticle healthPopularArticle) {
|
||||
public AjaxResult add(HealthPopularArticle healthPopularArticle) {
|
||||
try {
|
||||
return toAjax(healthPopularArticleService.insertHealthPopularArticle(healthPopularArticle));
|
||||
} catch (Exception e) {
|
||||
|
|
@ -99,9 +96,9 @@ public class HealthPopularArticleController extends BaseController {
|
|||
//@RequiresPermissions("health:article:edit")
|
||||
@SysLog(title = "营养科普", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改营养科普")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody HealthPopularArticle healthPopularArticle) {
|
||||
public AjaxResult edit(HealthPopularArticle article) {
|
||||
try {
|
||||
return toAjax(healthPopularArticleService.updateHealthPopularArticle(healthPopularArticle));
|
||||
return toAjax(healthPopularArticleService.updateHealthPopularArticle(article));
|
||||
} catch (Exception e) {
|
||||
return error(e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class HealthPopularArticleServiceImpl implements IHealthPopularArticleSer
|
|||
@Override
|
||||
public int insertHealthPopularArticle(HealthPopularArticle healthPopularArticle) {
|
||||
healthPopularArticle.setCreateTime(DateUtils.getNowDate());
|
||||
healthPopularArticle.setPushTime(DateUtils.getNowDate());
|
||||
try {
|
||||
healthPopularArticleMapper.insertHealthPopularArticle(healthPopularArticle);
|
||||
HealthPersonInfo chronicVo=new HealthPersonInfo();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* 订单对象 order_info
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
|
|
@ -189,7 +189,14 @@ public class OrderInfo extends BaseEntity
|
|||
|
||||
private String areaName;
|
||||
|
||||
private String yrorderDetails;
|
||||
|
||||
private String yrcanteenName;
|
||||
|
||||
private String yrstallName;
|
||||
|
||||
private String remark;
|
||||
private String orderDetails;
|
||||
|
||||
List<OrderDetail> orderDetailList;
|
||||
|
||||
|
|
@ -387,4 +394,5 @@ public class OrderInfo extends BaseEntity
|
|||
orderDetail.setUpdateTime(DateUtils.getNowDate());
|
||||
return orderDetail;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 订单对象 order_info
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
|
|
@ -134,6 +134,10 @@ public class OrderQueryParam implements Serializable
|
|||
|
||||
private String encryptedCustSearchValue;
|
||||
|
||||
private String yrstallName;
|
||||
private String yrcanteenName;
|
||||
private String yrorderDetails;
|
||||
|
||||
public OrderQueryParam() {
|
||||
this.endDateTime = LocalDateTime.now().plusDays(7);
|
||||
this.startDateTime = LocalDateTime.now().minusDays(7);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.order.service.impl;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
|
||||
import com.bonus.canteen.core.account.constants.AccWalletTypeEnum;
|
||||
import com.bonus.canteen.core.account.domain.WalletUpdateDTO;
|
||||
|
|
@ -53,12 +54,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 订单Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
|
|
@ -84,7 +86,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 订单
|
||||
*/
|
||||
|
|
@ -132,13 +134,14 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
*
|
||||
* @return 订单
|
||||
*/
|
||||
@Override
|
||||
public List<OrderInfo> selectOrderInfoList(OrderQueryParam orderQueryParam)
|
||||
{
|
||||
List<OrderInfo> orderInfoList = orderInfoMapper.selectOrderInfoList(orderQueryParam);
|
||||
/* List<OrderInfo> orderInfoList = orderInfoMapper.selectOrderInfoList(orderQueryParam);
|
||||
|
||||
if(CollUtil.isNotEmpty(orderInfoList)) {
|
||||
orderInfoList.forEach(order -> {
|
||||
OrderDetail orderDetail = new OrderDetail();
|
||||
|
|
@ -150,7 +153,40 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
order.setDeliveryTypeName(DeliveryTypeEnum.getDescByKey(order.getDeliveryType()));
|
||||
});
|
||||
}
|
||||
return orderInfoList;*/
|
||||
List<OrderInfo> orderInfoList = orderInfoMapper.selectOrderInfoList(orderQueryParam);
|
||||
|
||||
if (CollUtil.isNotEmpty(orderInfoList)) {
|
||||
orderInfoList.forEach(order -> {
|
||||
// 判断 yrorder_details 是否有值
|
||||
if (StringUtils.isNotBlank(order.getYrorderDetails())) {
|
||||
OrderDetail virtualDetail = new OrderDetail();
|
||||
virtualDetail.setGoodsName(order.getYrorderDetails()); // 把字符串放进 goodsName
|
||||
virtualDetail.setQuantity(1); // 给个默认值,避免前端渲染出错
|
||||
order.setOrderDetailList(Collections.singletonList(virtualDetail));
|
||||
order.setMealtimeName(order.getYrstallName());
|
||||
order.setCanteenName(order.getYrcanteenName());
|
||||
order.setStallName(order.getYrstallName());
|
||||
} else {
|
||||
// 没有值就走原来的查询
|
||||
OrderDetail orderDetail = new OrderDetail();
|
||||
orderDetail.setOrderId(order.getOrderId());
|
||||
List<OrderDetail> orderDetailList = orderDetailService.selectOrderDetailList(orderDetail);
|
||||
order.setOrderDetailList(orderDetailList);
|
||||
order.setPhoneNumber(order.getPhoneNumber());
|
||||
}
|
||||
|
||||
// 手机号保持一致(目前是明文)
|
||||
// 如果后续要解密就放开上面注释
|
||||
order.setPhoneNumber(order.getPhoneNumber());
|
||||
|
||||
// 设置配送方式描述
|
||||
order.setDeliveryTypeName(DeliveryTypeEnum.getDescByKey(order.getDeliveryType()));
|
||||
});
|
||||
}
|
||||
|
||||
return orderInfoList;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -381,7 +417,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -394,7 +430,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
*
|
||||
* @param orderIds 需要删除的订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -406,7 +442,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
|||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ public class ZhhqAccountInfoController extends BaseController {
|
|||
@ApiOperation("获取员工账户信息")
|
||||
@PostMapping({"/getBalance"})
|
||||
public AjaxResult getBalance(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid AccountInfoDTO dto) {
|
||||
/* if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
|
||||
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
|
||||
throw new ServiceException("访问缺少认证信息");
|
||||
}*/
|
||||
}
|
||||
try {
|
||||
AccountInfoQueryParam param = new AccountInfoQueryParam();
|
||||
param.setUserCode(dto.getEmpCode());
|
||||
|
|
|
|||
|
|
@ -37,9 +37,23 @@ public class ZhhqOrderController extends BaseController {
|
|||
@ApiOperation("消费扣款")
|
||||
@PostMapping({"/payment"})
|
||||
public AjaxResult payment(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid OrderAddDTO dto) {
|
||||
/* if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
|
||||
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
|
||||
throw new ServiceException("访问缺少认证信息");
|
||||
}*/
|
||||
}
|
||||
try {
|
||||
orderInfoService.insertZhhqOrderInfo(dto);
|
||||
return AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
@ApiOperation("外卖消费扣款")
|
||||
@PostMapping({"/wmpayment"})
|
||||
public AjaxResult wmpayment(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid OrderAddDTO dto) {
|
||||
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
|
||||
throw new ServiceException("访问缺少认证信息");
|
||||
}
|
||||
try {
|
||||
orderInfoService.insertZhhqOrderInfo(dto);
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import static com.bonus.canteen.core.common.utils.DateUtil.getCurrentDateStr;
|
|||
|
||||
/**
|
||||
* 体检信息Controller
|
||||
*
|
||||
*
|
||||
* @author tqzhang
|
||||
* @date 2025-09-02
|
||||
*/
|
||||
|
|
@ -62,4 +62,30 @@ public class ZhhqPhysicalExaminationController extends BaseController {
|
|||
return AjaxResult.error(null);
|
||||
}
|
||||
}
|
||||
@ApiOperation("根据手机号获取体检数据")
|
||||
@PostMapping({"/recordByPhoneSingle"})
|
||||
public AjaxResult recordByPhoneSingle(@RequestHeader Map<String, String> requestHeader, @RequestBody @Valid PhysicalExaminationDTO dto) {
|
||||
if (!(GlobalConstants.JYY + getCurrentDateStr()).equals(Sm4Utils.decrypt(HeaderFetchUtil.getSign(requestHeader)))) {
|
||||
throw new ServiceException("访问缺少认证信息");
|
||||
}
|
||||
try {
|
||||
//通过员工号 查询对应的电话号码
|
||||
String phone = this.mapper.ByempCode(dto);
|
||||
if (phone == null) {
|
||||
return AjaxResult.error("员工账号未做关联");
|
||||
}
|
||||
dto.setSelectPhone(phone);
|
||||
// dto.setSelectPhone(SM4EncryptUtils.sm4Encrypt(dto.getPhone()));
|
||||
PhysicalExaminationVO physingle = this.mapper.selectRecordByPhoneSingle(dto);
|
||||
//判断是否为空
|
||||
if (physingle == null) {
|
||||
return AjaxResult.error("暂无相关体检数据");
|
||||
}
|
||||
return AjaxResult.success("体检数据查询成功", physingle);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error(null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,10 +68,24 @@ public class OrderAddDTO implements Serializable {
|
|||
orderInfo.setDiscountsAmount(BigDecimal.ZERO);
|
||||
orderInfo.setRealAmount(param.getAmount());
|
||||
orderInfo.setAccountPayAmount(param.getAmount());
|
||||
//以下优尔提供,暂用
|
||||
orderInfo.setCanteenName(param.getCanteenName());
|
||||
orderInfo.setStallName(param.getStallName());
|
||||
orderInfo.setOrderDetails(param.getOrderDetails());
|
||||
|
||||
orderInfo.setCanteenId(-1L);
|
||||
orderInfo.setStallId(-1L);
|
||||
orderInfo.setMealtimeType(-1L);
|
||||
orderInfoList.add(orderInfo);
|
||||
return orderInfoList;
|
||||
}
|
||||
//根据优尔提供的进行添加字段
|
||||
// @NotNull(message = "食堂名称不能为空")
|
||||
private String canteenName;
|
||||
|
||||
// @NotNull(message = "订单详情不能为空")
|
||||
@ApiModelProperty(value = "订单详情")
|
||||
private String orderDetails;
|
||||
@ApiModelProperty(value = "餐次")
|
||||
private String stallName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import javax.validation.constraints.NotNull;
|
|||
@Data
|
||||
public class PhysicalExaminationDTO {
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@NotNull(message = "手机号不能为空")
|
||||
//@NotNull(message = "手机号不能为空")
|
||||
private String phone;
|
||||
private String selectPhone;
|
||||
private String empCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,8 @@ public interface ZhhqPhysicalExaminationMapper {
|
|||
* @return 体检记录集合
|
||||
*/
|
||||
List<PhysicalExaminationVO> selectRecordByPhone(PhysicalExaminationDTO dto);
|
||||
|
||||
PhysicalExaminationVO selectRecordByPhoneSingle(PhysicalExaminationDTO dto);
|
||||
|
||||
String ByempCode(PhysicalExaminationDTO dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectAccWalletInfoByUserId" parameterType="Long" resultMap="AccWalletInfoResult">
|
||||
<include refid="selectAccWalletInfoVo"/>
|
||||
where user_id = #{userId} and wallet_type = 1
|
||||
where user_id = #{userId} AND wallet_type IN (1, 2)
|
||||
</select>
|
||||
|
||||
<select id="selectAccWalletInfoByUserIdAndWalletType" resultMap="AccWalletInfoResult">
|
||||
|
|
|
|||
|
|
@ -16,12 +16,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="photoUrl" column="photo_url" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCookEvaluaDetailVo">
|
||||
select ced.evalua_detail_id, ced.evalua_id, ced.meal_type, ced.meal_id, ced.star_level,
|
||||
ced.description, ced.create_by, ced.create_time, ced.update_by, ced.update_time,
|
||||
su.nick_name, cd.dishes_name
|
||||
su.nick_name, cd.dishes_name,su.photo_url
|
||||
from cook_evalua_detail ced
|
||||
left join cook_dishes cd on cd.dishes_id = ced.meal_id
|
||||
left join cook_evalua_order ceo on ceo.evalua_id = ced.evalua_id
|
||||
|
|
@ -40,12 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by ced.create_time, ced.meal_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCookEvaluaDetailByEvaluaDetailId" parameterType="Long" resultMap="CookEvaluaDetailResult">
|
||||
<include refid="selectCookEvaluaDetailVo"/>
|
||||
where ced.evalua_detail_id = #{evaluaDetailId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertCookEvaluaDetail" parameterType="com.bonus.canteen.core.cook.domain.CookEvaluaDetail" useGeneratedKeys="true" keyProperty="evaluaDetailId">
|
||||
insert into cook_evalua_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -93,9 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteCookEvaluaDetailByEvaluaDetailIds" parameterType="String">
|
||||
delete from cook_evalua_detail where evalua_detail_id in
|
||||
delete from cook_evalua_detail where evalua_detail_id in
|
||||
<foreach item="evaluaDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{evaluaDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -289,5 +289,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by
|
||||
md.dishes_id asc
|
||||
</select>
|
||||
<select id="selectMonthSalesStallInfo" resultType="com.bonus.canteen.core.basic.domain.CookStallSaleModel">
|
||||
SELECT
|
||||
stall_id as stallId,
|
||||
COUNT(*) AS monthlySales
|
||||
FROM
|
||||
order_info
|
||||
WHERE 1=1
|
||||
and stall_id in
|
||||
<foreach collection="stallIdList" item="stallId" open="(" separator="," close=")">
|
||||
#{stallId}
|
||||
</foreach>
|
||||
AND order_state = 2
|
||||
AND order_refund_state = 1
|
||||
AND order_type = 2
|
||||
AND order_time >= DATE_FORMAT( CURDATE(), '%Y-%m-01 00:00:00' )
|
||||
AND order_time <= LAST_DAY(
|
||||
CURDATE()) + INTERVAL 1 DAY - INTERVAL 1 SECOND
|
||||
GROUP BY
|
||||
stall_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="articleTitle != null and articleTitle != ''">#{articleTitle},</if>
|
||||
<if test="coverPhoto != null">#{coverPhoto},</if>
|
||||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealthPopularArticle" parameterType="com.bonus.canteen.core.health.domain.HealthPopularArticle">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.order.mapper.OrderInfoMapper">
|
||||
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.order.domain.OrderInfo" id="OrderInfoResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="deviceOrderId" column="device_order_id" />
|
||||
|
|
@ -59,7 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
oi.deduction_type, oi.pay_time, oi.pay_type, oi.pay_channel, oi.pay_state, oi.pay_param,
|
||||
oi.delivery_amount, oi.packing_amount, oi.delivery_type, oi.comment_state,
|
||||
di.device_name, su.nick_name, oi.create_by, oi.create_time, oi.update_by, oi.update_time,
|
||||
su.phonenumber as phoneNumber, sd.dept_full_name, ba.area_name, oi.remark, oi.zhhq_order_id
|
||||
su.phonenumber as phoneNumber, sd.dept_full_name, ba.area_name, oi.remark, oi.zhhq_order_id,
|
||||
oi.yrorder_details as yrorderDetails,oi.yrcanteen_name AS yrcanteenName,oi.yrstall_name as yrstallName
|
||||
from order_info oi
|
||||
left join basic_canteen bc on bc.canteen_id = oi.canteen_id
|
||||
left join basic_stall bs on bs.stall_id = oi.stall_id
|
||||
|
|
@ -170,7 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by oi.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOrderInfoByOrderId" parameterType="Long" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
where oi.order_id = #{orderId}
|
||||
|
|
@ -309,6 +310,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
remark,
|
||||
create_by,
|
||||
update_by
|
||||
<trim prefix="," suffixOverrides=",">
|
||||
<if test="list[0].orderDetails != null">yrorder_details,</if>
|
||||
<if test="list[0].canteenName != null">yrcanteen_name,</if>
|
||||
<if test="list[0].stallName != null">yrstall_name,</if>
|
||||
</trim>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="orderInfo" separator=",">
|
||||
|
|
@ -350,6 +356,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{orderInfo.remark},
|
||||
#{orderInfo.createBy},
|
||||
#{orderInfo.updateBy}
|
||||
<trim prefix="," suffixOverrides=",">
|
||||
<if test="orderInfo.orderDetails != null">#{orderInfo.orderDetails},</if>
|
||||
<if test="orderInfo.canteenName != null">#{orderInfo.canteenName},</if>
|
||||
<if test="orderInfo.stallName != null">#{orderInfo.stallName},</if>
|
||||
</trim>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -416,7 +427,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteOrderInfoByOrderIds" parameterType="String">
|
||||
delete from order_info where order_id in
|
||||
delete from order_info where order_id in
|
||||
<foreach item="orderId" collection="orderIds" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
|
|
@ -490,4 +501,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and oi.order_time <![CDATA[ >= ]]> DATE_SUB(#{orderDate}, INTERVAL 7 DAY)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -25,5 +25,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where phone = #{selectPhone}
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectRecordByPhoneSingle"
|
||||
resultType="com.bonus.canteen.core.zhhq.domain.PhysicalExaminationVO">
|
||||
select
|
||||
staff_id as userId,
|
||||
device_id as machineId,
|
||||
sex,
|
||||
age,
|
||||
height,
|
||||
weight,
|
||||
bmi,
|
||||
boneMass,
|
||||
waterContent,
|
||||
extwater,
|
||||
protein,
|
||||
metabolism,
|
||||
fatLevel,
|
||||
bodyAge,
|
||||
bodyFat
|
||||
from kitchen_staff_physical_examination
|
||||
where phone = #{selectPhone}
|
||||
order by create_time desc
|
||||
limit 1;
|
||||
|
||||
</select>
|
||||
<select id="ByempCode" resultType="java.lang.String">
|
||||
select phonenumber from sys_user where user_code=#{empCode} limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue