| | |
| | | package com.matrix.system.padApi.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | |
| | | 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.common.tools.DataAuthUtil; |
| | | 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.SysBedInfo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysBedInfoDao; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.SysBedInfoService; |
| | | import com.matrix.system.hive.service.SysOrderService; |
| | |
| | | @Resource |
| | | private SysWorktimeService sysWorkTimeService; |
| | | |
| | | @Resource |
| | | private SysUsersService usersService; |
| | | |
| | | @Autowired |
| | | private SysBedInfoDao sysBedInfoDao; |
| | | |
| | | @Value("${login_public_key}") |
| | | private String publicKey; |
| | | |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private SysUsersService usersService; |
| | | |
| | | @ApiOperation(value = "首页", notes = "首页") |
| | | @GetMapping(value = "/frist") |
| | | public AjaxResult frist() { |
| | |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | if(ObjectUtil.isNotEmpty(user.getShopId())){ |
| | | orderListDto.setShopId(user.getShopId()); |
| | | } |
| | | // if (!DataAuthUtil.hasAllShopAuth()) { |
| | | // orderListDto.setShopId(user.getShopId()); |
| | | // } |
| | | QueryUtil.setQueryLimitCom(orderListDto); |
| | | List<PadOrderDetailVo> padApiOrderListInPage = sysOrderService.findPadApiOrderListInPage(orderListDto, pageVo); |
| | | |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(""); |
| | | result.putInMap("orderList",padApiOrderListInPage); |
| | | |
| | | Date date = new Date(); |
| | | List<SysUsers> mls = usersService.findByRoleName(true, Dictionary.STAFF_POST_MLS); |
| | | if(CollUtil.isNotEmpty(mls)){ |
| | | SysBeauticianState sysBeauticianState = new SysBeauticianState(); |
| | | Date date = new Date(); |
| | | sysBeauticianState.setBeginTime(DateUtil.getStartDate(date)); |
| | | sysBeauticianState.setEndTime(DateUtil.getStartDate(date)); |
| | | String panBanCodes = DateUtil.dateToString(sysBeauticianState.getBeginTime(),DateUtil.DATE_FORMAT_NO_SPLITE_DD); |
| | |
| | | if(CollUtil.isNotEmpty(totalBed)){ |
| | | SysProjServices sysProjServices = new SysProjServices(); |
| | | sysProjServices.setShopId(getMe().getShopId()); |
| | | List<SysBedInfo> freeBed = bedInfoService.findFreeBed(sysProjServices); |
| | | |
| | | sysProjServices.setStartTime(DateUtil.getStartDate(date)); |
| | | sysProjServices.setEndTime(DateUtil.getStartDate(date)); |
| | | List<SysBedInfo> freeBed = sysBedInfoDao.findFreeBed(sysProjServices); |
| | | // List<SysBedInfo> freeBed = bedInfoService.findFreeBed(sysProjServices); |
| | | if(CollUtil.isNotEmpty(freeBed)){ |
| | | result.putInMap("usedBed", totalBed.size() - freeBed.size()); |
| | | result.putInMap("freeBed", freeBed); |