| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.optometrist.authority.model.SecUser; |
| | |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | tOptometristVO.setStoreName(byId1.getName()); |
| | | tOptometristVO.setName(byId.getName()); |
| | | tOptometristVO.setPhone(byId.getPhone()); |
| | | Date start = new Date(); |
| | | Date end = new Date(); |
| | | // 获取今日凌晨00:00:00和今日23:59:59 |
| | | start.setHours(0); |
| | | start.setMinutes(0); |
| | | start.setSeconds(0); |
| | | end.setHours(23); |
| | | end.setMinutes(59); |
| | | end.setSeconds(59); |
| | | int size = optometryService.lambdaQuery().eq(TOptometry::getOptometristId, userId) |
| | | .between(TOptometry::getCreateTime, start, end) |
| | | .eq(TOptometry::getStatus, 3).list().size(); |
| | | tOptometristVO.setOptometryCount(size); |
| | | // 查询今日的排号列表 |
| | |
| | | .eq(TLineUp::getOptometristId, userId).list(); |
| | | if (!list.isEmpty())return ApiResult.failed("当前还有未结束的验光单"); |
| | | TLineUp lineUp = tLineUpService.getById(id); |
| | | // 获取今天凌晨00:00:00和今日23:59:59 |
| | | Date start = new Date(); |
| | | start.setHours(0); |
| | | start.setMinutes(0); |
| | | start.setSeconds(0); |
| | | Date end = new Date(); |
| | | end.setHours(23); |
| | | end.setMinutes(59); |
| | | end.setSeconds(59); |
| | | List<TLineUp> lineUps = tLineUpService.lambdaQuery().eq(TLineUp::getStoreId, lineUp.getStoreId()) |
| | | .between(TLineUp::getCreateTime, start, end).list(); |
| | | for (TLineUp up : lineUps) { |
| | | if (Integer.parseInt(up.getCode())<Integer.parseInt(lineUp.getCode())){ |
| | | up.setStatus(4); |
| | | } |
| | | } |
| | | tLineUpService.updateBatchById(lineUps); |
| | | lineUp.setStatus(2); |
| | | tLineUpService.updateById(lineUp); |
| | | return ApiResult.success(); |
| | |
| | | TOptometry one = optometryService.lambdaQuery().eq(TOptometry::getLineUpId, lineUp.getId()).one(); |
| | | if (one!=null){ |
| | | one.setStatus(5); |
| | | optometryService.updateById(one); |
| | | } |
| | | optometryService.updateById(one); |
| | | return ApiResult.success(); |
| | | } |
| | | @ApiOperation(value = "填写验光信息完成") |