Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | @ApiModelProperty(value = "球镜") |
| | | @TableField("ballMirror") |
| | | private Integer ballMirror; |
| | | private Double ballMirror; |
| | | |
| | | @ApiModelProperty(value = "柱镜") |
| | | @TableField("columnMirror") |
| | | private Integer columnMirror; |
| | | private Double columnMirror; |
| | | |
| | | @ApiModelProperty(value = "轴位") |
| | | @TableField("axis") |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLensSeries; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.jilongda.manage.query.TLensSeriesQuery; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.service.TLensSeriesService; |
| | | import com.jilongda.manage.vo.TLensSeriesVO; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "镜片系列管理") |
| | | @RestController |
| | | @RequestMapping("/t-lens-series") |
| | | public class TLensSeriesController { |
| | | |
| | | @Autowired |
| | | private TLensSeriesService lensSeriesService; |
| | | @ApiOperation(value = "镜片系列列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TLensSeriesVO>> pageList(@RequestBody TLensSeriesQuery query) { |
| | | PageInfo<TLensSeriesVO> optometristVOPageInfo = lensSeriesService.pageList(query); |
| | | return ApiResult.success(optometristVOPageInfo); |
| | | } |
| | | @ApiOperation(value = "镜片系列添加") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@RequestBody TLensSeries dto) { |
| | | lensSeriesService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | @ApiOperation(value = "镜片系列编辑") |
| | | @PostMapping(value = "/update") |
| | | public ApiResult<String> update(@RequestBody TLensSeries dto) { |
| | | if (!StringUtils.hasLength(dto.getSphere())){ |
| | | dto.setSphere(""); |
| | | } |
| | | if (!StringUtils.hasLength(dto.getAsphericSurface())){ |
| | | dto.setAsphericSurface(""); |
| | | } |
| | | if (!StringUtils.hasLength(dto.getDoubleNon())){ |
| | | dto.setDoubleNon(""); |
| | | } |
| | | lensSeriesService.updateById(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | @ApiOperation(value = "镜片系列启用/禁用") |
| | | @GetMapping(value = "/updateState") |
| | | public ApiResult<String> update(Integer id) { |
| | | TLensSeries byId = lensSeriesService.getById(id); |
| | | if (byId.getStatus()==1){ |
| | | byId.setStatus(2); |
| | | }else{ |
| | | byId.setStatus(1); |
| | | } |
| | | lensSeriesService.updateById(byId); |
| | | return ApiResult.success(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TAppUser; |
| | | import com.jilongda.manage.model.TLineUp; |
| | | import com.jilongda.manage.model.TOptometryDetail; |
| | | import com.jilongda.manage.query.TLineUpQuery; |
| | | import com.jilongda.manage.query.TOptometryQuery; |
| | | import com.jilongda.manage.service.TAppUserService; |
| | | import com.jilongda.manage.service.TLineUpService; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-line-up") |
| | | public class TLineUpController { |
| | | |
| | | @Autowired |
| | | private TLineUpService lineUpService; |
| | | @Autowired |
| | | private TAppUserService appUserService; |
| | | @ApiOperation(value = "获取排号分页列表",tags = "排号管理") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TLineUp>> pageList(@RequestBody TLineUpQuery query) { |
| | | PageInfo<TLineUp> res = lineUpService.pageList(query); |
| | | return ApiResult.success(res); |
| | | } |
| | | @ApiOperation(value = "查询当前排队人数",tags = "排号a管理") |
| | | @PostMapping(value = "/getCount") |
| | | public ApiResult getCount() { |
| | | return ApiResult.success(lineUpService.lambdaQuery().eq(TLineUp::getStatus,1).list().size()); |
| | | } |
| | | @ApiOperation(value = "取消排队",tags = "排号管理") |
| | | @GetMapping(value = "/cancel") |
| | | public ApiResult cancel(Integer id) { |
| | | TLineUp byId = lineUpService.getById(id); |
| | | byId.setStatus(5); |
| | | lineUpService.updateById(byId); |
| | | return ApiResult.success(); |
| | | } |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "验光师列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TOptometristVO>> pageList(@RequestBody TOptometristQuery query) { |
| | | PageInfo<TOptometristVO> optometristVOPageInfo = optometristService.pageList(query); |
| | | PageInfo<TOptometristVO> optometristVOPageInfo = optometristService.pageList1(query); |
| | | return ApiResult.success(optometristVOPageInfo); |
| | | } |
| | | |
| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TAppUser; |
| | | import com.jilongda.manage.model.TOptometryDetail; |
| | | import com.jilongda.manage.model.TSupplier; |
| | | import com.jilongda.manage.query.TOptometryQuery; |
| | | import com.jilongda.manage.query.TSupplierQuery; |
| | | import com.jilongda.manage.service.TAppUserService; |
| | | import com.jilongda.manage.service.TOptometristService; |
| | | import com.jilongda.manage.service.TOptometryDetailService; |
| | | import com.jilongda.manage.service.TSupplierService; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import com.jilongda.manage.vo.TSupplierVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-optometry") |
| | | public class TOptometryController { |
| | | @Autowired |
| | | private TSupplierService supplierService; |
| | | @Autowired |
| | | private TOptometristService optometristService; |
| | | @Autowired |
| | | private TOptometryDetailService optometryDetailService; |
| | | @Autowired |
| | | private TAppUserService appUserService; |
| | | |
| | | /** |
| | | * 获取供应商列表 |
| | | */ |
| | | @ApiOperation(value = "获取验光单分页列表",tags = "验光单") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TOptometryVO>> pageList(@RequestBody TOptometryQuery query) { |
| | | String startTime = null; |
| | | String endTime = null; |
| | | if (StringUtils.hasLength(query.getCreateTime())){ |
| | | String[] split = query.getCreateTime().split(" - "); |
| | | startTime = split[0]+" 00:00:00"; |
| | | endTime = split[1]+" 23:59:59"; |
| | | } |
| | | query.setStartTime(startTime); |
| | | query.setEndTime(endTime); |
| | | PageInfo<TOptometryVO> tOptometryVOPageInfo = optometristService.pageList(query); |
| | | List<TOptometryVO> records = tOptometryVOPageInfo.getRecords(); |
| | | for (TOptometryVO record : records) { |
| | | if (record.getUserId()!=null){ |
| | | TAppUser byId = appUserService.getById(record.getUserId()); |
| | | if (byId!=null){ |
| | | record.setName(byId.getName()); |
| | | } |
| | | } |
| | | TOptometryDetail l = optometryDetailService.lambdaQuery() |
| | | .eq(TOptometryDetail::getOptometryId, record.getId()) |
| | | .eq(TOptometryDetail::getType,1) |
| | | .eq(TOptometryDetail::getStatus,1) |
| | | .one(); |
| | | TOptometryDetail r = optometryDetailService.lambdaQuery() |
| | | .eq(TOptometryDetail::getOptometryId, record.getId()) |
| | | .eq(TOptometryDetail::getType,1) |
| | | .eq(TOptometryDetail::getStatus,2) |
| | | .one(); |
| | | double templ = 0.0; |
| | | double tempr = 0.0; |
| | | if (l!=null){ |
| | | record.setLValue(l.getBallMirror().toString()+(l.getColumnMirror()!=null?"-"+l.getColumnMirror():"")); |
| | | templ = Double.parseDouble(l.getPupilDistance()); |
| | | } |
| | | if (r!=null){ |
| | | record.setRValue(r.getBallMirror().toString()+(r.getColumnMirror()!=null?"-"+r.getColumnMirror():"")); |
| | | tempr = Double.parseDouble(r.getPupilDistance()); |
| | | |
| | | } |
| | | record.setPupilDistance((templ+tempr)+""); |
| | | } |
| | | return ApiResult.success(tOptometryVOPageInfo); |
| | | } |
| | | @ApiOperation(value = "查询验光单详情",tags = "验光单") |
| | | @GetMapping(value = "/getDetailById") |
| | | public ApiResult<List<TOptometryDetail>> getDetailById(@RequestParam Integer id) { |
| | | List<TOptometryDetail> list = optometryDetailService.lambdaQuery() |
| | | .eq(TOptometryDetail::getOptometryId, id) |
| | | .list(); |
| | | return ApiResult.success(list); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.Region; |
| | | import com.jilongda.manage.model.TStore; |
| | | import com.jilongda.manage.query.TStoreQuery; |
| | | import com.jilongda.manage.service.ITRegionService; |
| | | import com.jilongda.manage.service.TStoreService; |
| | | import com.jilongda.manage.utils.LoginInfoUtil; |
| | | import com.jilongda.manage.vo.TStoreVO; |
| | |
| | | private TStoreService storeService; |
| | | @Autowired |
| | | private LoginInfoUtil loginInfoUtil; |
| | | @Autowired |
| | | private ITRegionService regionService; |
| | | |
| | | /** |
| | | * 获取门店列表 |
| | |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TStoreVO>> pageList(@RequestBody TStoreQuery query) { |
| | | Integer userType = loginInfoUtil.getLoginUser().getUserType(); |
| | | if(Objects.equals(userType,2)){ |
| | | if(!Objects.equals(userType,1)){ |
| | | query.setStatus(1); |
| | | } |
| | | return ApiResult.success(storeService.pageList(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "省市区三级联动 获取省传0 市区传上级id") |
| | | @GetMapping(value = "/list") |
| | | public ApiResult<List<Region>> add(Integer parentId) { |
| | | return ApiResult.success(regionService.lambdaQuery().eq(Region::getParentId,parentId).list()); |
| | | } |
| | | /** |
| | | * 添加门店 |
| | | */ |
New file |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.model.Region; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2019-12-30 |
| | | */ |
| | | public interface RegionMapper extends BaseMapper<Region> { |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLensSeries; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TLensSeriesQuery; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.vo.TLensSeriesVO; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-12-09 |
| | | */ |
| | | public interface TLensSeriesMapper extends BaseMapper<TLensSeries> { |
| | | |
| | | List<TLensSeriesVO> pageList(@Param("query")TLensSeriesQuery query, @Param("pageInfo")PageInfo<TLensSeriesVO> pageInfo); |
| | | } |
| | |
| | | package com.jilongda.manage.mapper; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLineUp; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TLineUpQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLineUpMapper extends BaseMapper<TLineUp> { |
| | | |
| | | List<TLineUp> pageList(@Param("query")TLineUpQuery query, @Param("pageInfo") PageInfo<TLineUp> pageInfo); |
| | | |
| | | } |
| | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TOptometryQuery; |
| | | import com.jilongda.manage.query.TSupplierQuery; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import com.jilongda.manage.vo.TSupplierVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TOptometristVO> pageList(@Param("query") TOptometristQuery query, @Param("pageInfo")PageInfo<TOptometristVO> pageInfo); |
| | | List<TOptometristVO> pageList1(@Param("query") TOptometristQuery query, @Param("pageInfo")PageInfo<TOptometristVO> pageInfo); |
| | | List<TOptometryVO> pageList(@Param("query") TOptometryQuery query, @Param("pageInfo")PageInfo<TOptometryVO> pageInfo); |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 行政区域数据 |
| | | * |
| | | * @author pzb |
| | | * @Date 2022/2/9 10:00 |
| | | */ |
| | | @Data |
| | | @TableName("t_region") |
| | | @ApiModel(value = "省市区实体") |
| | | public class Region { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 城市名称 |
| | | */ |
| | | @TableField("name") |
| | | @ApiModelProperty("省/市 名称") |
| | | private String name; |
| | | /** |
| | | * 城市code |
| | | */ |
| | | @TableField("code") |
| | | @ApiModelProperty("省/市 编码") |
| | | private String code; |
| | | /** |
| | | * 父级id |
| | | */ |
| | | @TableField("parent_id") |
| | | private Integer parentId; |
| | | |
| | | /** |
| | | * 子集 |
| | | */ |
| | | @TableField(exist = false) |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | @ApiModelProperty("子集") |
| | | private List<Region> children = new ArrayList<>(); |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "库存类型 1库存 2非库存") |
| | | @TableField("type") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "状态 1启用2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "球面") |
| | | @ApiModelProperty(value = "球面 refractiveIndex=折射率 cost=成本 sales售价 例:[{\"refractiveIndex\":\"5\",\"cost\":\"20\",\"sales\":\"2\"}]") |
| | | @TableField("sphere") |
| | | private String sphere; |
| | | |
| | | @ApiModelProperty(value = "非球面") |
| | | @ApiModelProperty(value = "非球面 refractiveIndex=折射率 cost=成本 sales售价 例:[{\"refractiveIndex\":\"5\",\"cost\":\"20\",\"sales\":\"2\"}]") |
| | | @TableField("asphericSurface") |
| | | private String asphericSurface; |
| | | |
| | | @ApiModelProperty(value = "双非") |
| | | @ApiModelProperty(value = "双非 refractiveIndex=折射率 cost=成本 sales售价 例:[{\"refractiveIndex\":\"5\",\"cost\":\"20\",\"sales\":\"2\"}]") |
| | | @TableField("doubleNon") |
| | | private String doubleNon; |
| | | |
| | |
| | | @ApiModelProperty(value = "编号") |
| | | @TableField("code") |
| | | private String code; |
| | | @ApiModelProperty(value = "微信名称") |
| | | @TableField(exist = false) |
| | | private String name; |
| | | @ApiModelProperty(value = "手机号") |
| | | @TableField(exist = false) |
| | | private String phone; |
| | | @ApiModelProperty(value = "验光师") |
| | | @TableField(exist = false) |
| | | private String optometrist; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("userId") |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | private Integer gender; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | @TableField("name") |
| | | private String name; |
| | | @TableField("realName") |
| | | private String realName; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | @TableField("phone") |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "注册时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @TableField("registerTime") |
| | | private LocalDateTime registerTime; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "球镜") |
| | | @TableField("ballMirror") |
| | | private Integer ballMirror; |
| | | private Double ballMirror; |
| | | |
| | | @ApiModelProperty(value = "柱镜") |
| | | @TableField("columnMirror") |
| | | private Integer columnMirror; |
| | | private Double columnMirror; |
| | | |
| | | @ApiModelProperty(value = "轴位") |
| | | @TableField("axis") |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验光师查询条件") |
| | | public class TLensSeriesQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "品牌id") |
| | | private Integer brandId; |
| | | |
| | | @ApiModelProperty(value = "库存类型 1库存 2非库存") |
| | | private Integer type; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "排号管理查询参数") |
| | | public class TLineUpQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "微信昵称") |
| | | private String name; |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | @ApiModelProperty(value = "状态1排队中2验光中3已完成4已过号5已取消") |
| | | private Integer status; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.query; |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验光单查询参数") |
| | | public class TOptometryQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "微信昵称") |
| | | private String name; |
| | | @ApiModelProperty(value = "姓名") |
| | | private String realName; |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | @ApiModelProperty(value = "出单日期 2020-11-11 - 2022-11-11") |
| | | private String createTime; |
| | | @ApiModelProperty(value = "店铺id") |
| | | private Integer storeId; |
| | | @ApiModelProperty(value = "验光师id") |
| | | private Integer optometristId; |
| | | @ApiModelProperty(value = "开始时间 前端忽略") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间 前端忽略") |
| | | private String endTime; |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.model.Region; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 服务类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-02 |
| | | */ |
| | | public interface ITRegionService extends IService<Region> { |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLensSeries; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TLensSeriesQuery; |
| | | import com.jilongda.manage.vo.TLensSeriesVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLensSeriesService extends IService<TLensSeries> { |
| | | |
| | | PageInfo<TLensSeriesVO> pageList(TLensSeriesQuery query); |
| | | |
| | | } |
| | |
| | | package com.jilongda.manage.service; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLineUp; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TLineUpQuery; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLineUpService extends IService<TLineUp> { |
| | | |
| | | PageInfo<TLineUp> pageList(TLineUpQuery query); |
| | | |
| | | } |
| | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.manage.query.TOptometryQuery; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | |
| | |
| | | */ |
| | | public interface TOptometristService extends IService<TOptometrist> { |
| | | |
| | | Boolean upAndDown(Integer id, Integer status); |
| | | PageInfo<TOptometryVO> pageList(TOptometryQuery query); |
| | | |
| | | /** |
| | | * 验光师列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TOptometristVO> pageList(TOptometristQuery query); |
| | | PageInfo<TOptometristVO> pageList1(TOptometristQuery query); |
| | | |
| | | Boolean upAndDown(Integer id, Integer status); |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLensSeries; |
| | | import com.jilongda.manage.mapper.TLensSeriesMapper; |
| | | import com.jilongda.manage.query.TLensSeriesQuery; |
| | | import com.jilongda.manage.service.TLensSeriesService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TLensSeriesVO; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TLensSeriesServiceImpl extends ServiceImpl<TLensSeriesMapper, TLensSeries> implements TLensSeriesService { |
| | | |
| | | @Override |
| | | public PageInfo<TLensSeriesVO> pageList(TLensSeriesQuery query) { |
| | | PageInfo<TLensSeriesVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TLensSeriesVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.TLineUp; |
| | | import com.jilongda.manage.mapper.TLineUpMapper; |
| | | import com.jilongda.manage.query.TLineUpQuery; |
| | | import com.jilongda.manage.service.TLineUpService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TLineUpServiceImpl extends ServiceImpl<TLineUpMapper, TLineUp> implements TLineUpService { |
| | | |
| | | @Override |
| | | public PageInfo<TLineUp> pageList(TLineUpQuery query) { |
| | | PageInfo<TLineUp> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TLineUp> list=this.baseMapper.pageList(query, pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.mapper.TOptometryMapper; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.model.SecFeeItems; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import com.jilongda.manage.mapper.TOptometristMapper; |
| | | import com.jilongda.manage.query.TOptometryQuery; |
| | | import com.jilongda.manage.query.TOptometristQuery; |
| | | import com.jilongda.manage.service.TOptometristService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import com.jilongda.manage.vo.TSupplierVO; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.jilongda.manage.vo.TOptometristVO; |
| | | import com.jilongda.manage.vo.TStoreVO; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TOptometristVO> pageList(TOptometristQuery query) { |
| | | public PageInfo<TOptometryVO> pageList(TOptometryQuery query) { |
| | | PageInfo<TOptometryVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TOptometryVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TOptometristVO> pageList1(TOptometristQuery query) { |
| | | PageInfo<TOptometristVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TOptometristVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | List<TOptometristVO> list = this.baseMapper.pageList1(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.manage.mapper.RegionMapper; |
| | | import com.jilongda.manage.model.Region; |
| | | import com.jilongda.manage.service.ITRegionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 省市区三级联动 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-02 |
| | | */ |
| | | @Service |
| | | public class TRegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements ITRegionService { |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.utils; |
| | | |
| | | |
| | | import com.jilongda.manage.model.TLineUp; |
| | | import com.jilongda.manage.service.TLineUpService; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 定时任务工具类 |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Resource |
| | | private TLineUpService lineUpService; |
| | | |
| | | // 每天晚上9点执行的定时任务 |
| | | @Scheduled(cron = "0 0 23 * * ?") |
| | | public void taskNineDay() { |
| | | try { |
| | | System.err.println("执行每天晚上定时任务 排号修改状态"); |
| | | List<TLineUp> list = lineUpService.lambdaQuery().eq(TLineUp::getStatus, 1).list(); |
| | | for (TLineUp tLineUp : list) { |
| | | tLineUp.setStatus(5); |
| | | } |
| | | lineUpService.updateBatchById(list); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TLensSeries; |
| | | import com.jilongda.manage.model.TOptometrist; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "镜片系列VO") |
| | | public class TLensSeriesVO extends TLensSeries { |
| | | |
| | | @ApiModelProperty(value = "品牌名称") |
| | | private String brandName; |
| | | @ApiModelProperty(value = "球/非") |
| | | private String typeName; |
| | | @ApiModelProperty(value = "折射率") |
| | | private String refractiveIndex; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TOptometry; |
| | | import com.jilongda.manage.model.TSupplier; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验光单VO") |
| | | public class TOptometryVO extends TOptometry { |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String storeName; |
| | | @ApiModelProperty(value = "微信名称") |
| | | private String name; |
| | | @ApiModelProperty(value = "R值") |
| | | private String rValue; |
| | | @ApiModelProperty(value = "L值") |
| | | private String lValue; |
| | | @ApiModelProperty(value = "瞳距") |
| | | private String pupilDistance; |
| | | @ApiModelProperty(value = "验光师名称") |
| | | private String optometristName; |
| | | |
| | | } |
| | |
| | | <result column="createBy" property="createBy" /> |
| | | <result column="updateBy" property="updateBy" /> |
| | | <result column="isDelete" property="isDelete" /> |
| | | <result column="status" property="status" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, brandId, supplierId, type, sphere, asphericSurface, doubleNon, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TLensSeriesVO"> |
| | | select t1.*,t2.name as brandName |
| | | from t_lens_series t1 |
| | | left join t_brand t2 on t1.brandId = t2.id |
| | | where 1=1 |
| | | <if test="query.brandId != null and query.brandId != ''"> |
| | | and t1.brandId = #{query.brandId} |
| | | </if> |
| | | <if test="query.type != null and query.type != ''"> |
| | | and t1.type = #{query.type} |
| | | </if> |
| | | and t2.type = 2 |
| | | and t2.status = 1 |
| | | and t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | and t2.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | order by t1.id asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, code, userId, optometristId, storeId, status, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.model.TLineUp"> |
| | | select t.*,u.name,u.phone,u.age,u.gender,u.realName,s.name storeName,o.name optometrist |
| | | from t_line_up t |
| | | left join t_user u on t.userId = u.id |
| | | left join t_optometrist o on t.optometristId = o.id |
| | | left join t_store s on t.storeId = s.id |
| | | <where> |
| | | <if test="query.status != null"> |
| | | and t.status = #{query.status} |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | AND u.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.name != null and query.name != ''"> |
| | | AND u.name like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and s.id = #{query.storeId} |
| | | </if> |
| | | </where> |
| | | order by t.createTime desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, `name`, phone, status, storeId, img, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOptometristVO"> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOptometryVO"> |
| | | select t1.id, t1.code, t1.userId, t1.age, t1.gender, |
| | | t1.realName, t1.phone, t1.optometristId, |
| | | t1.storeId, t1.status, t1.registerTime, |
| | | t1.createTime, t1.updateTime, t1.createBy, |
| | | t1.updateBy, t1.isDelete,t2.`name`, |
| | | t3.name as storeName,t4.name as optometristName |
| | | from t_optometry t1 |
| | | left join t_app_user t2 on t1.userId = t2.id |
| | | left join t_store t3 on t1.storeId = t3.id |
| | | left join t_optometrist t4 on t1.optometristId = t4.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and t2.`name` like concat('%',#{query.name},'%') |
| | | </if> |
| | | <if test="query.realName != null and query.realName != ''"> |
| | | and t1.`name` like concat('%',#{query.realName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and t1.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.storeId != null and query.storeId != ''"> |
| | | and t1.storeId = #{query.storeId} |
| | | </if> |
| | | <if test="query.optometristId != null and query.optometristId != ''"> |
| | | and t1.optometristId = #{query.optometristId} |
| | | </if> |
| | | <if test="req.startTime != null and req.startTime!=''"> |
| | | and (t1.createTime between #{req.startTime} and #{req.endTime}) |
| | | </if> |
| | | AND t3.type=1 |
| | | AND isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | </select> |
| | | <select id="pageList1" resultType="com.jilongda.manage.vo.TOptometristVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_optometrist |
| | | <where> |
| | |
| | | <result column="userId" property="userId" /> |
| | | <result column="age" property="age" /> |
| | | <result column="gender" property="gender" /> |
| | | <result column="name" property="name" /> |
| | | <result column="realName" property="realName" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="optometristId" property="optometristId" /> |
| | | <result column="storeId" property="storeId" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, userId, age, gender, name, phone, optometristId, storeId, status, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, code, userId, age, gender, realName, phone, optometristId, storeId, status, registerTime, createTime, updateTime, createBy, updateBy, isDelete |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | @ApiModelProperty(value = "球镜") |
| | | @TableField("ballMirror") |
| | | private Integer ballMirror; |
| | | private Double ballMirror; |
| | | |
| | | @ApiModelProperty(value = "柱镜") |
| | | @TableField("columnMirror") |
| | | private Integer columnMirror; |
| | | private Double columnMirror; |
| | | |
| | | @ApiModelProperty(value = "轴位") |
| | | @TableField("axis") |