10 files added
12 files modified
| | |
| | | */ |
| | | private Integer validFlag; |
| | | |
| | | /** |
| | | * Pad端查询条件 |
| | | */ |
| | | private String padQueryKey; |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.system.app.vo.OrderDetailVo; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.padApi.dto.PadOrderListDto; |
| | | import com.matrix.system.padApi.vo.PadOrderDetailVo; |
| | | import com.matrix.system.shopXcx.api.dto.ErpOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | List<OrderDetailVo> selectApiOrderListInPage(@Param("record") OrderListDto orderListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | List<PadOrderDetailVo> selectPadApiOrderListInPage(PadOrderListDto orderListDto, PaginationVO pageVo); |
| | | |
| | | int selectApiOrderListTotal(@Param("record") OrderListDto orderListDto); |
| | | |
| | | OrderDetailVo selectApiOrderDetailById(@Param("orderId") Long orderId); |
| | | |
| | | PadOrderDetailVo selectPadApiOrderDetailById(@Param("orderId") Long orderId); |
| | | |
| | | List<RankingVo> selectShopAchieveRanking(@Param("record") SysOrder sysOrder); |
| | | |
| | |
| | | ErpOrderDetailVo findUserOrderById(Long orderId); |
| | | |
| | | BigDecimal selectArrearsByVipId(Long vipId); |
| | | |
| | | int selectPadApiOrderListTotal(@Param("record") PadOrderListDto orderListDto); |
| | | } |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.padApi.vo.PadOrderDetailItemVo; |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | public int deleteByOrderId(Long id); |
| | | |
| | | List<OrderDetailItemVo> selectApiOrderDetailItemsByOrderId(@Param("orderId") Long orderId); |
| | | List<PadOrderDetailItemVo> selectPadApiOrderDetailItemsByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | List<ErpOrderDetailItemVo> selectErpOrderItemByOrderId(String orderId); |
| | | |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.VipInfoListDto; |
| | | import com.matrix.system.app.vo.VipInfoListVo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.pojo.VipInfoVo; |
| | | import com.matrix.system.padApi.dto.PadVipListDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | List<Map<String, Object>> selectVipArrearsStatistics(@Param("record") SysVipInfo sysVipInfo, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | Integer selectVipArrearsStatisticsTotal(@Param("record") SysVipInfo sysVipInfo); |
| | | |
| | | AjaxResult selectVipInfoListInPage(@Param("record")PadVipListDto padVipListDto); |
| | | } |
| | |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | | import com.matrix.system.padApi.dto.PadOrderListDto; |
| | | import com.matrix.system.padApi.vo.PadOrderDetailVo; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | |
| | | List<OrderDetailVo> findApiOrderListInPage(OrderListDto orderListDto, PaginationVO pageVo); |
| | | |
| | | List<PadOrderDetailVo> findPadApiOrderListInPage(PadOrderListDto orderListDto, PaginationVO pageVo); |
| | | |
| | | int findApiOrderListTotal(OrderListDto orderListDto); |
| | | |
| | | OrderDetailVo findApiOrderDetailByOrderId(Long orderId); |
| | |
| | | |
| | | BigDecimal findVipArrearsByVipId(Long vipId); |
| | | |
| | | int findPadApiOrderListTotal(PadOrderListDto orderListDto); |
| | | } |
| | |
| | | List<Map<String, Object>> findVipArrearsStatistics(SysVipInfo sysVipInfo, PaginationVO pageVo); |
| | | |
| | | Integer findVipArrearsStatisticsTotal(SysVipInfo sysVipInfo); |
| | | |
| | | } |
| | |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.padApi.dto.PadOrderListDto; |
| | | import com.matrix.system.padApi.vo.PadOrderDetailVo; |
| | | import com.matrix.system.score.service.ScoreVipDetailService; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<PadOrderDetailVo> findPadApiOrderListInPage(PadOrderListDto orderListDto, PaginationVO pageVo) { |
| | | return sysOrderDao.selectPadApiOrderListInPage(orderListDto, pageVo); |
| | | } |
| | | |
| | | @Override |
| | | public int findApiOrderListTotal(OrderListDto orderListDto) { |
| | | return sysOrderDao.selectApiOrderListTotal(orderListDto); |
| | | } |
| | | |
| | | @Override |
| | | public int findPadApiOrderListTotal(PadOrderListDto orderListDto) { |
| | | return sysOrderDao.selectPadApiOrderListTotal(orderListDto); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetailVo findApiOrderDetailByOrderId(Long orderId) { |
| | | OrderDetailVo orderDetail = sysOrderDao.selectApiOrderDetailById(orderId); |
| | | |
| | |
| | | public Integer findVipArrearsStatisticsTotal(SysVipInfo sysVipInfo) { |
| | | return sysVipInfoDao.selectVipArrearsStatisticsTotal(sysVipInfo); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.RSAUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.app.vo.UserInfoVo; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import com.matrix.system.padApi.dto.WebPadLoginDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "PadApiCommonAction", tags = "pad端公共请求类(含登陆)") |
| | | @RestController |
| | | @RequestMapping(value = "/api/common/pad") |
| | | public class PadApiCommonAction { |
| | | |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | | |
| | | @Autowired |
| | | private DefaultAuthorityManager authorityManager; |
| | | |
| | | @Autowired |
| | | SysShopInfoDao sysShopInfoDao; |
| | | |
| | | @Autowired |
| | | SysCompanyDao sysCompanyDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoService sysShopInfoService; |
| | | |
| | | @Value("${login_public_key}") |
| | | private String publicKey; |
| | | |
| | | @ApiOperation(value = "登陆接口", notes = "pad端登陆接口") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = UserInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/login") |
| | | public AjaxResult dologin(@RequestBody @Validated WebPadLoginDto loginDto) throws Exception { |
| | | |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuAccount(loginDto.getUsername()); |
| | | user.setSuPassword(loginDto.getPassword()); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | |
| | | UserInfoVo userInfoVo = new UserInfoVo(); |
| | | if(user.getShopId()!=null){ |
| | | SysShopInfo shopInfo = sysShopInfoService.findById(user.getShopId()); |
| | | user.setShopName(shopInfo.getShopName()); |
| | | userInfoVo.setShopName(shopInfo.getShopShortName()); |
| | | } |
| | | user.setSuPassword(null); |
| | | |
| | | String token = UUIDUtil.getRandomID(); |
| | | LocalCache.save(token, user); |
| | | |
| | | userInfoVo.setId(user.getSuId()); |
| | | userInfoVo.setName(user.getSuName()); |
| | | userInfoVo.setRoleName(user.getRoleName()); |
| | | userInfoVo.setPhoto(user.getSuPhoto()); |
| | | |
| | | String sb = token + "_1" + "_/api/vip/findVipInfoById/972"; |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功"); |
| | | authorityManager.initUserPower(result); |
| | | result.putInMap("user", userInfoVo); |
| | | result.putInMap("token", token); |
| | | result.putInMap("rasToken", RSAUtils.encryptByPublicKey(sb, publicKey)); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "用户退出系统", notes = "用户退出系统") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AjaxResult.class) |
| | | }) |
| | | @GetMapping(value = "/loginOut") |
| | | public AjaxResult loginOut() { |
| | | authorityManager.getLoginOut(); |
| | | return AjaxResult.buildSuccessInstance("退出系统成功"); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.action; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.vo.OrderDetailVo; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.enums.BooleanEnum; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import com.matrix.system.padApi.dto.PadOrderListDto; |
| | | import com.matrix.system.padApi.vo.PadOrderDetailVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "PadOrderAction", tags = "pad端订单请求") |
| | | @RestController |
| | | @RequestMapping(value = "/api/pad/order") |
| | | public class PadOrderAction extends BaseController { |
| | | |
| | | @Resource |
| | | private SysOrderService sysOrderService; |
| | | |
| | | @Resource |
| | | private SysOrderService orderService; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @ApiOperation(value = "获取订单列表", notes = "获取订单列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = PadOrderDetailVo.class) |
| | | }) |
| | | @PostMapping(value = "/findOrderList") |
| | | public AjaxResult findOrderList(@RequestBody @Validated PadOrderListDto orderListDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | int offset = (orderListDto.getPageNum() - 1) * orderListDto.getPageSize(); |
| | | int limit = orderListDto.getPageSize(); |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | orderListDto.setShopId(user.getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(orderListDto); |
| | | return AjaxResult.buildSuccessInstance(sysOrderService.findPadApiOrderListInPage(orderListDto, pageVo), |
| | | sysOrderService.findPadApiOrderListTotal(orderListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取订单详情", notes = "获取订单详情") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = OrderDetailVo.class) |
| | | }) |
| | | @GetMapping(value = "/findOrderDetail/{orderId}") |
| | | public AjaxResult findOrderDetail(@PathVariable("orderId") Long orderId) { |
| | | OrderDetailVo orderDetail = sysOrderService.findApiOrderDetailByOrderId(orderId); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | | ajaxResult.putInMap("orderDetail", orderDetail); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "取消订单", notes = "取消订单") |
| | | @GetMapping(value = "/cancelOrder/{id}") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult cancelOrder(Long id) { |
| | | |
| | | SysOrder order = orderService.findById(id); |
| | | if (ObjectUtil.isEmpty(order)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "订单不存在!"); |
| | | } |
| | | |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, order.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && BooleanEnum.TRUE.getValue() == shopManageAbleCancelDfkOrder.getIntParamValue()) { |
| | | |
| | | if (!Dictionary.ORDER_STATU_DFK.equals(order.getStatu())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待付款订单"); |
| | | } |
| | | } |
| | | orderService.cancelOrder(id); |
| | | return AjaxResult.buildSuccessInstance("取消成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "收款", notes = "收款") |
| | | @PostMapping(value = "/sk") |
| | | public AjaxResult sk(@RequestBody SysOrder order) throws GlobleException { |
| | | orderService.payOrder(order); |
| | | return AjaxResult.buildSuccessInstance("收款成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "补交", notes = "补交") |
| | | @PostMapping(value = "/bj") |
| | | public AjaxResult bj(@RequestBody SysOrder order){ |
| | | orderService.updateAfterMoney(order); |
| | | return AjaxResult.buildSuccessInstance("补交成功"); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.enums.BooleanEnum; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "PadServiceAction", tags = "pad端服务单请求") |
| | | @RestController |
| | | @RequestMapping(value = "/api/pad/service") |
| | | public class PadServiceAction extends BaseController { |
| | | |
| | | @Resource |
| | | private SysProjServicesService projServicesSerivce; |
| | | @Resource |
| | | private SysProjUseService projUseService; |
| | | @Resource |
| | | private SysBedInfoService bedInfoService; |
| | | @Autowired |
| | | SysProjGoodsDao sysProjGoodsDao; |
| | | @Resource |
| | | private SysProjServicesService sysProjServicesService; |
| | | @Resource |
| | | private SysVipInfoService sysVipInfoService; |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | @Autowired |
| | | AchieveNewService achieveNewService; |
| | | @Autowired |
| | | private SysBedStateDao sysBedStateDao; |
| | | @Autowired |
| | | ShoppingGoodsAssembleDao goodsAssembleDao; |
| | | @Autowired |
| | | SysShopInfoDao shopInfoDao; |
| | | @Resource |
| | | private SysUsersService usersService; |
| | | @Autowired |
| | | private SysProjServicesDao sysProjServicesDao; |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 显示所有服务单列表 |
| | | */ |
| | | @ApiOperation(value = "显示所有服务单列表", notes = "显示所有服务单列表") |
| | | @PostMapping(value = "/showList") |
| | | public AjaxResult showList(@RequestBody SysProjServices projService, PaginationVO pageVo) { |
| | | |
| | | //默认排序 |
| | | if (StringUtils.isBlank(pageVo.getSort())) { |
| | | pageVo.setSort("create_time"); |
| | | } |
| | | if (StringUtils.isBlank(pageVo.getOrder())) { |
| | | pageVo.setOrder("desc"); |
| | | } |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | projService.setShopId(getMe().getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(projService); |
| | | List<SysProjServices> dataList = projServicesSerivce.findInPage(projService, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, projServicesSerivce.findTotal(projService)); |
| | | return result; |
| | | } |
| | | /** |
| | | * 进入预约排班详情 |
| | | * |
| | | * @author 姜友瑶 |
| | | */ |
| | | @ApiOperation(value = "进入预约排班详情", notes = "进入预约排班详情") |
| | | @PostMapping(value = "/serviceInfo") |
| | | public AjaxResult findPbxq(@RequestBody SysProjServices projServicesVo) { |
| | | QueryUtil.setQueryLimitCom(projServicesVo); |
| | | // 获取服务单信息 |
| | | SysProjServices projServices = null; |
| | | if(projServicesVo.getId()!=null){ |
| | | projServices= sysProjServicesService.findById(projServicesVo.getId()); |
| | | }else if(StringUtils.isNotBlank(projServicesVo.getServiceNo())) { |
| | | List<SysProjServices> byModel = sysProjServicesService.findByModel(projServicesVo); |
| | | if (byModel.size() == 1) { |
| | | projServices= sysProjServicesService.findById( byModel.get(0).getId()); |
| | | } |
| | | } |
| | | if(projServices==null){ |
| | | throw new GlobleException("未查询到单据信息"); |
| | | } |
| | | // 获取服务单所有信息 |
| | | // 设置会员信息 |
| | | projServices.setVipInfo(sysVipInfoService.findById(projServices.getVipId())); |
| | | //补充服务单扩展信息=============== |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId()); |
| | | if (CollUtil.isNotEmpty(beauticianStateList)) { |
| | | for (SysBeauticianState sysBeauticianState : beauticianStateList) { |
| | | if (sysBeauticianState.getProjUse().getTaocanId() != null) { |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId()); |
| | | if(sysProjUse != null) { |
| | | sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName() + "--" + sysBeauticianState.getProjInfo().getName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | projServices.setServiceItems(beauticianStateList); |
| | | |
| | | SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId()); |
| | | projServices.setBedState(sysBedState); |
| | | //补充服务单扩展信息===============END |
| | | |
| | | // 根据岗位名称查询员工 |
| | | List<SysUsers> pls = usersService.findByRoleName(true, Dictionary.STAFF_POST_PLS); |
| | | pls.addAll(usersService.findByRoleName(true, Dictionary.STAFF_POST_PLZG)); |
| | | List<SysUsers> mls = usersService.findByRoleName(true, Dictionary.STAFF_POST_MLS); |
| | | WebUtil.getRequest().setAttribute("pls", pls); |
| | | WebUtil.getRequest().setAttribute("mls", mls); |
| | | |
| | | SysBedInfo bedInfo = new SysBedInfo(); |
| | | bedInfo.setShopId(getMe().getShopId()); |
| | | // 显示当前查询的服务订单的项目信息 |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | result.putInMap("obj", projServices); |
| | | result.putInMap("serviceId", projServicesVo.getId()); |
| | | result.putInMap("pageFlae", projServicesVo.getPageFlae()); |
| | | result.putInMap("cw", bedInfoService.findByModel(bedInfo)); |
| | | result.putInMap("pls", pls); |
| | | result.putInMap("mls", mls); |
| | | return result; |
| | | } |
| | | /** |
| | | * 根据id取消预约 |
| | | */ |
| | | @ApiOperation(value = "根据id取消预约", notes = "根据id取消预约") |
| | | @GetMapping(value = "/cancelOrder/{id}") |
| | | public AjaxResult cancelOrder(@PathVariable("id")Long id) { |
| | | |
| | | SysProjServices checkProjServices = sysProjServicesDao.selectById(id); |
| | | QueryUtil.setQueryLimitCom(checkProjServices); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, checkProjServices.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && BooleanEnum.TRUE.getValue() == shopManageAbleCancelDfkOrder.getIntParamValue()) { |
| | | |
| | | if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY) |
| | | && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DQR)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待预约订单"); |
| | | } |
| | | }else{ |
| | | if (checkProjServices.getState().equals(Dictionary.SERVICE_STATU_FWWC) |
| | | || checkProjServices.getState().equals(Dictionary.SERVICE_STATU_FFJS)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "当前状态无法取消订单"); |
| | | } |
| | | } |
| | | |
| | | int i = sysProjServicesService.modifyCancelProjServices(checkProjServices); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.action; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.CustomerDataDictionary; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysVipLabelDao; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.padApi.dto.PadVipListDto; |
| | | import com.matrix.system.score.dao.ScoreVipDetailDao; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "PadVipAction", tags = "pad端Vip客户请求") |
| | | @RestController |
| | | @RequestMapping(value = "/api/pad/vipInfo") |
| | | public class PadVipAction extends BaseController { |
| | | |
| | | @Resource |
| | | private SysVipInfoService vipInfoService; |
| | | @Resource |
| | | private SysOrderService sysOrderService; |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | @Autowired |
| | | private ScoreVipDetailDao scoreVipDetailDao; |
| | | @Resource |
| | | private MoneyCardUseService cardUseService; |
| | | @Autowired |
| | | private MoneyCardUseDao moneyCardUseDao; |
| | | @Autowired |
| | | private SysVipLabelDao sysVipLabelDao; |
| | | @Resource |
| | | private SysOrderService orderService; |
| | | @Autowired |
| | | private AsyncMessageManager asyncMessageManager; |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | | @Autowired |
| | | private CustomerDataDictionaryDao dataDictionaryDao; |
| | | |
| | | /** |
| | | * 显示所有的会员信息 |
| | | */ |
| | | @ApiOperation(value = "显示所有的会员信息列表", notes = "显示所有的会员信息列表") |
| | | @PostMapping(value = "/showVipInfoList") |
| | | public AjaxResult showList(@RequestBody @Validated PadVipListDto padVipListDto) { |
| | | |
| | | SysVipInfo vipInfo = new SysVipInfo(); |
| | | QueryUtil.setQueryLimit(vipInfo); |
| | | String queryKey = padVipListDto.getQueryKey(); |
| | | if(StrUtil.isNotEmpty(queryKey)){ |
| | | vipInfo.setPadQueryKey(queryKey); |
| | | } |
| | | int offset = (padVipListDto.getPageNum() - 1) * padVipListDto.getPageSize(); |
| | | int limit = padVipListDto.getPageSize(); |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | |
| | | return showList(vipInfoService, vipInfo, pageVo); |
| | | } |
| | | |
| | | /** |
| | | * 添加或修改会员信息 |
| | | */ |
| | | @ApiOperation(value = "添加或修改会员信息", notes = "添加或修改会员信息") |
| | | @PostMapping(value = "/addOrModify") |
| | | public AjaxResult addOrModify(@RequestBody SysVipInfo vipInfo) { |
| | | if (vipInfo.getId() != null) { |
| | | return modify(vipInfoService, vipInfo, "会员信息"); |
| | | } else { |
| | | vipInfo.setVipState(Dictionary.VIP_STATE_HY); |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(vipInfo.getShopId()==null){ |
| | | vipInfo.setShopId(users.getShopId()); |
| | | } |
| | | if(vipInfo.getCompanyId()==null){ |
| | | vipInfo.setCompanyId(users.getCompanyId()); |
| | | } |
| | | return add(vipInfoService, vipInfo, "会员信息"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查看会员信息 |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @ApiOperation(value = "查看会员信息", notes = "查看会员信息") |
| | | @GetMapping(value = "/showVipInfo/{phone}") |
| | | public AjaxResult findByModel(@PathVariable("phone")String phone) { |
| | | List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(phone); |
| | | if (vips.size() > 0) { |
| | | vips.get(0).setPointAll(scoreVipDetailDao.selectUserTotalScore(vips.get(0).getId())); |
| | | vips.get(0).setSysOrder(sysOrderService.findSysOrderTjByVipId(vips.get(0).getId())); |
| | | vips.get(0).setLevelCard(cardUseService.findByVipId(vips.get(0).getId())); |
| | | vips.get(0).setLabels(sysVipLabelDao.selectByVipId(vips.get(0).getId())); |
| | | vips.get(0).setAge(DateUtil.getAgeForBirthDay(vips.get(0).getBirthday1())); |
| | | vips.get(0).setBalance(moneyCardUseDao.selectVipCardTotalMoney(vips.get(0).getId())); |
| | | vips.get(0).setArrears(sysOrderService.findVipArrearsByVipId(vips.get(0).getId())); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0); |
| | | return result; |
| | | } else { |
| | | return AjaxResult.buildFailInstance("未查到询客户信息"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 充值 查询门店所有员工 |
| | | */ |
| | | @ApiOperation(value = "充值 查询门店所有员工", notes = "充值 查询门店所有员工") |
| | | @GetMapping(value = "/shopAll") |
| | | public AjaxResult shopAll() { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findByRoleName(true, null)); |
| | | } |
| | | /** |
| | | * 充值 查询业绩类型 |
| | | */ |
| | | @ApiOperation(value = "充值 查询业绩类型", notes = "充值 查询业绩类型") |
| | | @GetMapping(value = "getListByParentCode/{parentCode}") |
| | | public AjaxResult getListByParentCode(@PathVariable String parentCode) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | List<CustomerDataDictionary> list = dataDictionaryDao.selectByParentCode(parentCode, user.getCompanyId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, list, list.size()); |
| | | } |
| | | |
| | | /** |
| | | * 充值 查询当前登录人 |
| | | */ |
| | | @ApiOperation(value = "充值 查询当前登录人", notes = "充值 查询当前登录人") |
| | | @GetMapping(value = "getLoginUser") |
| | | public AjaxResult getLoginUser() { |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | result.putInMap("user", user); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 充值 |
| | | */ |
| | | @ApiOperation(value = "充值", notes = "充值") |
| | | @PostMapping(value = "/cz") |
| | | public AjaxResult cz(@RequestBody CzXkVo czVo) { |
| | | SysOrder order= orderService.moneyCardCz(czVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "充值成功"); |
| | | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(order.getCompanyId(),UniformMsgParam.GZH_CZCG); |
| | | uniformMsgParam.put("orderId",order.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | result.putInMap("orderId",order.getId()); |
| | | return result; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.dto; |
| | | |
| | | import com.matrix.system.app.dto.BasePageDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @ApiModel(value = "PadOrderListDto", description = "订单列表接收参数类") |
| | | public class PadOrderListDto extends BasePageDto { |
| | | |
| | | @ApiModelProperty(value = "订单状态 0-全部 1-待付款 2-已付款 3-欠款 全部默认传空字符串", example = "1") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "查询字段") |
| | | private String queryKey; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date orderTime; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | public Date getOrderTime() { |
| | | return orderTime; |
| | | } |
| | | |
| | | public void setOrderTime(Date orderTime) { |
| | | this.orderTime = orderTime; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getQueryKey() { |
| | | return queryKey; |
| | | } |
| | | |
| | | public void setQueryKey(String queryKey) { |
| | | this.queryKey = queryKey; |
| | | } |
| | | |
| | | public Integer getOrderStatus() { |
| | | return orderStatus; |
| | | } |
| | | |
| | | public void setOrderStatus(Integer orderStatus) { |
| | | this.orderStatus = orderStatus; |
| | | switch (orderStatus) { |
| | | case 0 : |
| | | this.status = ""; |
| | | break; |
| | | case 1: |
| | | this.status = "待付款"; |
| | | break; |
| | | case 2: |
| | | this.status = "已付款"; |
| | | break; |
| | | case 3: |
| | | this.status = "欠款"; |
| | | break; |
| | | default: |
| | | this.status = ""; |
| | | break; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.dto; |
| | | |
| | | import com.matrix.system.app.dto.BasePageDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @ApiModel(value = "PadVipListDto", description = "订单列表接收参数类") |
| | | @Data |
| | | public class PadVipListDto extends BasePageDto { |
| | | |
| | | @ApiModelProperty(value = "查询字段") |
| | | private String queryKey; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | @Data |
| | | public class WebPadLoginDto { |
| | | |
| | | @ApiModelProperty(value = "用户名", example = "1234") |
| | | @NotBlank(message = "用户名或密码错误") |
| | | private String username; |
| | | |
| | | @ApiModelProperty(value = "密码", example = "123456") |
| | | @NotBlank(message = "用户名或密码错误") |
| | | private String password; |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.vo; |
| | | |
| | | import com.matrix.system.app.vo.OrderDetailAchieveItemVo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @ApiModel(value = "PadOrderDetailItemVo", description = "订单详情明细表") |
| | | public class PadOrderDetailItemVo { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private String count; |
| | | |
| | | @ApiModelProperty(value = "现金支付") |
| | | private BigDecimal cashPay; |
| | | |
| | | @ApiModelProperty(value = "储值卡支付") |
| | | private BigDecimal cardPay; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrears; |
| | | |
| | | @ApiModelProperty(value = "原价") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "折扣价格") |
| | | private BigDecimal zkPrice; |
| | | |
| | | @ApiModelProperty(value = "支付状态") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "订单业绩") |
| | | private List<OrderDetailAchieveItemVo> achieves; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public List<OrderDetailAchieveItemVo> getAchieves() { |
| | | return achieves; |
| | | } |
| | | |
| | | public void setAchieves(List<OrderDetailAchieveItemVo> achieves) { |
| | | this.achieves = achieves; |
| | | } |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public String getCount() { |
| | | return count; |
| | | } |
| | | |
| | | public void setCount(String count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public BigDecimal getCashPay() { |
| | | return cashPay; |
| | | } |
| | | |
| | | public void setCashPay(BigDecimal cashPay) { |
| | | this.cashPay = cashPay; |
| | | } |
| | | |
| | | public BigDecimal getCardPay() { |
| | | return cardPay; |
| | | } |
| | | |
| | | public void setCardPay(BigDecimal cardPay) { |
| | | this.cardPay = cardPay; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public BigDecimal getZkPrice() { |
| | | return zkPrice; |
| | | } |
| | | |
| | | public void setZkPrice(BigDecimal zkPrice) { |
| | | this.zkPrice = zkPrice; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.app.vo.OrderDetailItemVo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @ApiModel(value = "PadOrderDetailVo", description = "订单详情返回参数类") |
| | | public class PadOrderDetailVo { |
| | | |
| | | @ApiModelProperty(value = "订单ID") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private String vipId; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "客户") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "手机") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private String orderStatus; |
| | | |
| | | @ApiModelProperty(value = "顾问") |
| | | private String staffName; |
| | | |
| | | @ApiModelProperty(value = "订单总价") |
| | | private BigDecimal needPay; |
| | | |
| | | @ApiModelProperty(value = "折后价") |
| | | private BigDecimal realPay; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_SS, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "下单时间") |
| | | private Date orderTime; |
| | | |
| | | @ApiModelProperty(value = "现金支付金额") |
| | | private BigDecimal cashPay; |
| | | |
| | | @ApiModelProperty(value = "储值卡支付金额") |
| | | private BigDecimal cardPay; |
| | | |
| | | @ApiModelProperty(value = "优惠金额") |
| | | private BigDecimal discount; |
| | | |
| | | @ApiModelProperty(value = "订单明细") |
| | | private List<OrderDetailItemVo> items; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrears; |
| | | |
| | | public String getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(String vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Date getOrderTime() { |
| | | return orderTime; |
| | | } |
| | | |
| | | public void setOrderTime(Date orderTime) { |
| | | this.orderTime = orderTime; |
| | | } |
| | | |
| | | public String getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(String orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public String getOrderStatus() { |
| | | return orderStatus; |
| | | } |
| | | |
| | | public void setOrderStatus(String orderStatus) { |
| | | this.orderStatus = orderStatus; |
| | | } |
| | | |
| | | public List<OrderDetailItemVo> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setItems(List<OrderDetailItemVo> items) { |
| | | this.items = items; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public BigDecimal getCashPay() { |
| | | return cashPay; |
| | | } |
| | | |
| | | public void setCashPay(BigDecimal cashPay) { |
| | | this.cashPay = cashPay; |
| | | } |
| | | |
| | | public BigDecimal getCardPay() { |
| | | return cardPay; |
| | | } |
| | | |
| | | public void setCardPay(BigDecimal cardPay) { |
| | | this.cardPay = cardPay; |
| | | } |
| | | |
| | | public BigDecimal getNeedPay() { |
| | | return needPay; |
| | | } |
| | | |
| | | public void setNeedPay(BigDecimal needPay) { |
| | | this.needPay = needPay; |
| | | } |
| | | |
| | | public BigDecimal getRealPay() { |
| | | return realPay; |
| | | } |
| | | |
| | | public void setRealPay(BigDecimal realPay) { |
| | | this.realPay = realPay; |
| | | } |
| | | |
| | | public BigDecimal getDiscount() { |
| | | return discount; |
| | | } |
| | | |
| | | public void setDiscount(BigDecimal discount) { |
| | | this.discount = discount; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.padApi.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @ApiModel(value = "UserInfoVo", description = "用户信息返回类") |
| | | @Data |
| | | public class UserInfoVo { |
| | | |
| | | @ApiModelProperty(value = "用户ID", example = "1") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "用户名称", example = "呵呵") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "职位", example = "店长") |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "头像", example = "--") |
| | | private String photo; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String shopName; |
| | | |
| | | } |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectPadApiOrderListInPage" resultType="com.matrix.system.padApi.vo.PadOrderDetailVo"> |
| | | select |
| | | a.id orderId, |
| | | a.VIP_ID vipId, |
| | | a.ORDER_NO orderNo, |
| | | a.ORDER_TIME orderTime, |
| | | a.STATU orderStatus, |
| | | a.ZK_TOTAL needPay, |
| | | (a.card_Pay + a.cash_Pay) realPay, |
| | | a.arrears arrears, |
| | | b.su_name staffName, |
| | | c.VIP_NAME vipName, |
| | | c.PHONE phone |
| | | from sys_order a |
| | | left join sys_users b on a.STAFF_ID = b.su_id |
| | | left join sys_vip_info c on c.id = a.VIP_ID |
| | | <where> |
| | | <if test="record.queryKey != null and record.queryKey != ''"> |
| | | and (instr(c.vip_name, #{record.queryKey}) or instr(c.phone, #{record.queryKey}) or instr(a.order_no, #{record.queryKey})) |
| | | </if> |
| | | <if test="record.status != null and record.status != ''"> |
| | | and a.statu = #{record.status} |
| | | </if> |
| | | <if test="record.orderTime != null "> |
| | | and a.ORDER_TIME = #{record.orderTime} |
| | | </if> |
| | | <if test="record.shopId != null"> |
| | | and a.shop_id=#{record.shopId} |
| | | </if> |
| | | <if test="record.companyId != null"> |
| | | and a.company_id=#{record.companyId} |
| | | </if> |
| | | </where> |
| | | <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> |
| | | order by a.order_time desc |
| | | <if test="pageVo.offset >=0 and pageVo.limit >0"> |
| | | limit |
| | | #{pageVo.offset},#{pageVo.limit} |
| | | </if> |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectApiOrderListTotal" resultType="java.lang.Integer"> |
| | | select |
| | | count(1) |
| | |
| | | </if> |
| | | <if test="record.status != null and record.status != ''"> |
| | | and a.statu = #{record.status} |
| | | </if> |
| | | <if test="record.shopId != null"> |
| | | and a.shop_id=#{record.shopId} |
| | | </if> |
| | | <if test="record.companyId != null"> |
| | | and a.company_id=#{record.companyId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPadApiOrderListTotal" resultType="java.lang.Integer"> |
| | | select |
| | | count(1) |
| | | from sys_order a |
| | | left join sys_users b on a.STAFF_ID = b.su_id |
| | | left join sys_vip_info c on c.id = a.VIP_ID |
| | | <where> |
| | | <if test="record.queryKey != null and record.queryKey != ''"> |
| | | and (instr(c.vip_name, #{record.queryKey}) or instr(c.phone, #{record.queryKey}) or instr(a.order_no, #{record.queryKey})) |
| | | </if> |
| | | <if test="record.status != null and record.status != ''"> |
| | | and a.statu = #{record.status} |
| | | </if> |
| | | <if test="record.orderTime != null "> |
| | | and a.ORDER_TIME = #{record.orderTime} |
| | | </if> |
| | | <if test="record.shopId != null"> |
| | | and a.shop_id=#{record.shopId} |
| | |
| | | where a.id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="selectPadApiOrderDetailById" resultType="com.matrix.system.padApi.vo.PadOrderDetailVo"> |
| | | select |
| | | a.id orderId, |
| | | b.VIP_NAME vipName, |
| | | b.PHONE phone, |
| | | a.ORDER_NO orderNo, |
| | | c.su_name staffName, |
| | | a.cash_Pay cashPay, |
| | | a.card_Pay cardPay, |
| | | a.ZK_TOTAL needPay, |
| | | a.cash_Pay + a.card_Pay realPay, |
| | | a.arrears arrears, |
| | | a.TOTAL - a.ZK_TOTAL discount, |
| | | a.STATU orderStatus, |
| | | a.order_time orderTime |
| | | from sys_order a |
| | | inner join sys_vip_info b on a.VIP_ID=b.ID |
| | | left join sys_users c on a.STAFF_ID=c.su_id |
| | | where a.id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="selectShopAchieveRanking" resultType="com.matrix.system.app.vo.RankingVo"> |
| | | select |
| | | b.shop_short_name name, |
| | |
| | | where a.ORDER_ID=#{orderId}; |
| | | </select> |
| | | |
| | | <select id="selectPadApiOrderDetailItemsByOrderId" resultType="com.matrix.system.padApi.vo.PadOrderDetailItemVo"> |
| | | select |
| | | a.id id, |
| | | b.name goodsName, |
| | | a.COUNT count, |
| | | a.cash_Pay cashPay, |
| | | a.card_Pay cardPay, |
| | | a.PRICE price, |
| | | a.ZK_PRICE zkPrice, |
| | | a.status status |
| | | from sys_order_item a |
| | | inner join shopping_goods b on a.goods_id=b.id |
| | | where a.ORDER_ID=#{orderId}; |
| | | </select> |
| | | |
| | | <select id="selectErpOrderItemByOrderId" |
| | | resultType="com.matrix.system.shopXcx.api.vo.ErpOrderDetailItemVo"> |
| | | select |
| | |
| | | <if test="record.phone != null and record.phone !='' "> |
| | | and a.PHONE like CONCAT('%',#{record.phone},'%') |
| | | </if> |
| | | <if test="record.padQueryKey != null and record.padQueryKey !='' "> |
| | | and (a.PHONE like CONCAT('%',#{record.padQueryKey},'%') |
| | | or instr(a.VIP_NAME ,#{record.padQueryKey}) ) |
| | | </if> |
| | | <if test="record.sex != null and record.sex !='' "> |
| | | and a.SEX = #{record.sex} |
| | | </if> |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.common.dao.UtilDao; |
| | | import com.matrix.system.common.service.BusParameterSettingService; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.TableMapping; |
| | | import com.matrix.system.enums.BooleanEnum; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrder; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysBedState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysOrderDao; |
| | | import com.matrix.system.hive.dao.SysOrderItemDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.hive.service.ShoppingGoodsService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.score.service.ScoreVipDetailService; |
| | | import com.matrix.system.shopXcx.bean.ShopOrder; |
| | | import com.matrix.system.shopXcx.bean.ShopOrderDetails; |
| | | import com.matrix.system.shopXcx.bean.ShopProduct; |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | SysVipInfoService sysVipInfoService; |
| | | |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao vipDap; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao vipDao; |
| | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | |
| | | @Autowired |
| | | SysBedStateDao sysBedStateDao; |
| | | @Autowired |
| | | private SysProjServicesDao sysProjServicesDao; |
| | | |
| | | @Autowired |
| | | private SysBedStateDao bedStateDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | @Autowired |
| | | TaiYanAliyunSmsService taiYanAliyunSmsService; |
| | | |
| | | @Autowired |
| | | ServicesFlowDao servicesFlowDao; |
| | | |
| | | @Autowired |
| | | SysUsersDao userDao; |
| | | |
| | | @Autowired |
| | | ShoppingGoodsAssembleDao shoppingGoodsAssembleDao; |
| | | |
| | | @Autowired |
| | | BusParameterSettingService busParameterSettingService; |
| | | |
| | | @Autowired |
| | | ScoreVipDetailService scoreVipDetailService; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | ShoppingGoodsAssembleDao goodsAssembleDao; |
| | | |
| | | @Autowired |
| | | private OperationLogService operationLogService; |
| | | @Autowired |
| | | private UtilDao utilDao; |
| | | |
| | | @Autowired |
| | | private ServiceUtil serviceUtil; |
| | | |
| | | @Test |
| | | public void testQuChong(){ |
| | | boolean b = serviceUtil.addCheckRepeatTowColumn(TableMapping.SYS_VIP_INFO, "PHONE", "18229856946", |
| | | "company_id", 17); |
| | | System.out.println("___________" + b); |
| | | } |
| | | |
| | | private HashMap<String, Object> excuteTow(String tableName, String column1, Object value1, String column2, |
| | | Object value2) { |
| | | HashMap<String, Object> query = new HashMap<>(MatrixConstance.COLLECTION_SIZE); |
| | | query.put("tableName", tableName); |
| | | query.put("column1", column1); |
| | | query.put("value1", value1); |
| | | query.put("column2", column2); |
| | | query.put("value2", value2); |
| | | query = (HashMap<String, Object>) utilDao.selectRepeatTowColumn(query); |
| | | return query; |
| | | } |
| | | |
| | | @Test |
| | | public void testServiceError(){ |
| | | SysProjServices projServices = new SysProjServices(); |
| | | projServices.setId(12948L); |
| | | |
| | | SysProjServices checkprojServices = sysProjServicesDao.selectById(projServices.getId()); |
| | | if (!checkprojServices.getState().equals(Dictionary.SERVICE_STATU_FWZ)) { |
| | | throw new GlobleException("该服务单状态为" + checkprojServices.getState() + ",不可以进行当前操作!"); |
| | | } |
| | | SysBeauticianState checkBeauticianState = new SysBeauticianState(); |
| | | checkBeauticianState.setServicesId(projServices.getId()); |
| | | checkBeauticianState.setState(Dictionary.BEATUI_STATE_FWJS); |
| | | int rerunlt = beauticianStateDao.chengItemState(checkBeauticianState); |
| | | |
| | | // 验证是否是最后一个美疗师结束服务 |
| | | boolean isOver = true; |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(checkprojServices.getId()); |
| | | for (SysBeauticianState beauticianState : beauticianStateList) { |
| | | if (!beauticianState.getState().equals(Dictionary.BEATUI_STATE_FWJS)) { |
| | | isOver = false; |
| | | break; |
| | | } |
| | | } |
| | | if (isOver) { |
| | | // 释放床位资源 |
| | | SysBedState checkBedState = sysBedStateDao.selectBySerIdAndBedId(checkprojServices.getBedId(), checkprojServices.getId()); |
| | | if (checkBedState != null) { |
| | | checkBedState.setBedState(Dictionary.BED_STATE_SYJS); |
| | | bedStateDao.update(checkBedState); |
| | | } |
| | | checkprojServices.setEndTime(new Date()); |
| | | // 计算时差 |
| | | long minspace = DateUtil.getDifTimeMin(checkprojServices.getStartTime(), checkprojServices.getEndTime()) |
| | | - checkprojServices.getTotalTime(); |
| | | // 判断是服务超时还是服务提前结束,如果minspace大于0则是超时服务,小于0则是提前结束服务 |
| | | checkprojServices.setIsOverTime(minspace + ""); |
| | | checkprojServices.setState(Dictionary.SERVICE_STATU_FWWC); |
| | | sysProjServicesDao.update(checkprojServices); |
| | | } |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(checkprojServices.getCompanyId(), checkprojServices.getShopId(),1028L, |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.SERVICE_ORDER_END, |
| | | checkprojServices.getId(), |
| | | checkprojServices.getServiceNo(), |
| | | checkprojServices.getVipId()); |
| | | } |
| | | |
| | | public boolean isSettingOpen(String settingKey,Long companyId) { |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(settingKey, companyId); |
| | | return ( |