| | |
| | | package com.jilongda.manage.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.gson.JsonArray; |
| | | import com.jilongda.common.basic.ApiResult; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | } |
| | | @ApiOperation(value = "根据系列id + 球/非球查询折射率列表 球/非球入参数1为球 2非球 3双飞") |
| | | @GetMapping(value = "/refractiveIndexList") |
| | | public ApiResult<List<String>> refractiveIndexList(Integer id, Integer lensType) { |
| | | public ApiResult<JSONArray> refractiveIndexList(Integer id, Integer lensType) { |
| | | TLensSeries byId = lensSeriesService.getById(id); |
| | | JSONArray jsonArray = null; |
| | | if (lensType==1){ |
| | | String sphere = byId.getSphere(); |
| | | // 将字符串化为jsonArray |
| | | if (StringUtils.hasLength(sphere)) { |
| | | JSONObject.parseArray(sphere); |
| | | jsonArray = JSONObject.parseArray(sphere); |
| | | } else { |
| | | return ApiResult.success(new ArrayList<String>()); |
| | | return ApiResult.success(new JSONArray()); |
| | | } |
| | | } |
| | | if (lensType==2){ |
| | | String asphericSurface = byId.getAsphericSurface(); |
| | | if (StringUtils.hasLength(asphericSurface)) { |
| | | JSONObject.parseArray(asphericSurface); |
| | | jsonArray = JSONObject.parseArray(asphericSurface); |
| | | } else { |
| | | return ApiResult.success(new ArrayList<String>()); |
| | | return ApiResult.success(new JSONArray()); |
| | | } |
| | | } |
| | | if (lensType==3){ |
| | | String doubleNon = byId.getDoubleNon(); |
| | | if (StringUtils.hasLength(doubleNon)) { |
| | | JSONObject.parseArray(doubleNon); |
| | | jsonArray = JSONObject.parseArray(doubleNon); |
| | | } else { |
| | | return ApiResult.success(new ArrayList<String>()); |
| | | return ApiResult.success(new JSONArray()); |
| | | } |
| | | } |
| | | return ApiResult.success(new ArrayList<String>()); |
| | | |
| | | return ApiResult.success(jsonArray); |
| | | } |
| | | } |
| | | |
| | |
| | | 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()); |
| | | @GetMapping(value = "/getCount") |
| | | public ApiResult getCount(@RequestParam Integer storeId) { |
| | | return ApiResult.success(lineUpService.lambdaQuery().eq(TLineUp::getStoreId,storeId).eq(TLineUp::getStatus,1).list().size()); |
| | | } |
| | | @ApiOperation(value = "取消排队",tags = "排号管理") |
| | | @GetMapping(value = "/cancel") |
| | |
| | | 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.model.*; |
| | | 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.service.*; |
| | | import com.jilongda.manage.vo.TOptometryDetailVO; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import com.jilongda.manage.vo.TSupplierVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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 java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private TOptometryDetailService optometryDetailService; |
| | | @Autowired |
| | | private TAppUserService appUserService; |
| | | @Autowired |
| | | private TOptometryService optometryService; |
| | | @Autowired |
| | | private TStoreService storeService; |
| | | |
| | | /** |
| | | * 获取供应商列表 |
| | |
| | | } |
| | | @ApiOperation(value = "查询验光单详情",tags = "验光单") |
| | | @GetMapping(value = "/getDetailById") |
| | | public ApiResult<List<TOptometryDetail>> getDetailById(@RequestParam Integer id) { |
| | | public ApiResult<TOptometryDetailVO> getDetailById(@RequestParam Integer id) { |
| | | |
| | | TOptometryDetailVO tOptometryDetailVO = new TOptometryDetailVO(); |
| | | |
| | | TOptometry optometry = optometryService.getById(id); |
| | | tOptometryDetailVO.setOptometryTime(optometry.getCreateTime()); |
| | | tOptometryDetailVO.setOptometry(optometry); |
| | | // 查询用户信息 |
| | | // TAppUser appUser = appUserService.getById(optometry.getUserId()); |
| | | // tOptometryDetailVO.setAppUser(appUser); |
| | | |
| | | // 查询验光师信息 |
| | | TOptometrist optometrist = optometristService.getById(optometry.getOptometristId()); |
| | | if(Objects.nonNull(optometrist)){ |
| | | tOptometryDetailVO.setOptometristName(optometrist.getName()); |
| | | // 查询门店信息 |
| | | TStore store = storeService.getById(optometrist.getStoreId()); |
| | | if(Objects.nonNull(store)){ |
| | | tOptometryDetailVO.setStoreName(store.getName()); |
| | | } |
| | | } |
| | | |
| | | // 验光单详情 |
| | | List<TOptometryDetail> list = optometryDetailService.lambdaQuery() |
| | | .eq(TOptometryDetail::getOptometryId, id) |
| | | .list(); |
| | | return ApiResult.success(list); |
| | | tOptometryDetailVO.setOptometryDetails(list); |
| | | return ApiResult.success(tOptometryDetailVO); |
| | | } |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | 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 java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @PostMapping(value = "/getCurrentByParamFrame") |
| | | public ApiResult<Integer> getCurrentByParamFrame(@RequestBody GetCurrentByParam getCurrentByParam) { |
| | | // 根据型号名称 查询型号列表ids |
| | | List<Integer> collect = modelService.lambdaQuery().eq(TModel::getName, getCurrentByParam.getModel()) |
| | | .eq(TModel::getMaterialId,getCurrentByParam.getMaterialId()) |
| | | .eq(TModel::getColor,getCurrentByParam.getColor()) |
| | | .eq(TModel::getBrandId,getCurrentByParam.getBrandId()) |
| | | List<Integer> collect = modelService.lambdaQuery() |
| | | .eq(StringUtils.hasLength(getCurrentByParam.getModel()),TModel::getName, getCurrentByParam.getModel()) |
| | | .eq(Objects.nonNull(getCurrentByParam.getMaterialId()),TModel::getMaterialId,getCurrentByParam.getMaterialId()) |
| | | .eq(StringUtils.hasLength(getCurrentByParam.getColor()),TModel::getColor,getCurrentByParam.getColor()) |
| | | .eq(Objects.nonNull(getCurrentByParam.getBrandId()),TModel::getBrandId,getCurrentByParam.getBrandId()) |
| | | .list().stream().map(TModel::getId).collect(Collectors.toList()); |
| | | TFrameGoods one = frameGoodsService.lambdaQuery().in(TFrameGoods::getModelId, collect) |
| | | .eq(TFrameGoods::getColor, getCurrentByParam.getColor()).one(); |
| | | .eq(TFrameGoods::getColor, getCurrentByParam.getColor()) |
| | | .eq(TFrameGoods::getStoreId, getCurrentByParam.getStoreId()).one(); |
| | | if (one!=null){ |
| | | return ApiResult.success(one.getTotal()); |
| | | |
| | |
| | | .eq(dto.getRefractiveIndex()!=null,TLensGoods::getRefractiveIndex, dto.getRefractiveIndex()) |
| | | .eq(dto.getBallMirror()!=null,TLensGoods::getBallMirror, dto.getBallMirror()) |
| | | .eq(dto.getColumnMirror()!=null,TLensGoods::getColumnMirror, dto.getColumnMirror()) |
| | | .eq(dto.getStoreId()!=null,TLensGoods::getStoreId, dto.getStoreId()) |
| | | .one(); |
| | | if (one!=null){ |
| | | return ApiResult.success(one.getTotal()); |
| | |
| | | private Integer brandId; |
| | | @ApiModelProperty(value = "材质id") |
| | | private Integer materialId; |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | |
| | | } |
| | |
| | | private String ballMirror; |
| | | @ApiModelProperty(value = "柱镜") |
| | | private String columnMirror; |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer storeId; |
| | | |
| | | } |
| | |
| | | @TableField("axis") |
| | | private String axis; |
| | | |
| | | @ApiModelProperty(value = "add") |
| | | @TableField("add") |
| | | private String add; |
| | | @ApiModelProperty(value = "addS") |
| | | @TableField("addS") |
| | | private String addS; |
| | | |
| | | @ApiModelProperty(value = "瞳高") |
| | | @TableField("pupilHeight") |
| | |
| | | @TableField("payTypeName") |
| | | private String payTypeName; |
| | | @ApiModelProperty(value = "手续费扣除") |
| | | @TableField("commission") |
| | | private BigDecimal commission; |
| | | @ApiModelProperty(value = "笨蛋毛利") |
| | | @TableField("profitMoney") |
| | | private BigDecimal profitMoney; |
| | | @ApiModelProperty(value = "毛利率") |
| | | @TableField("profitRating") |
| | | private BigDecimal profitRating; |
| | | |
| | | @ApiModelProperty(value = "验光来源") |
| | | @TableField("profitRating") |
| | | private Integer optometrySource; |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_order_goods") |
| | | @ApiModel(value="TOrderGoods对象", description="销售订单商品详情表") |
| | | public class TOrderGoods extends BaseModel { |
| | | public class TOrderGoods implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value = "镜片右 球镜+柱镜 逗号拼接 字段为空 客户自带") |
| | | @NotBlank(message = "") |
| | | @TableField("rLens") |
| | | private String rLens; |
| | | |
New file |
| | |
| | | package com.jilongda.manage.vo; |
| | | |
| | | import com.jilongda.manage.model.TAppUser; |
| | | import com.jilongda.manage.model.TOptometry; |
| | | import com.jilongda.manage.model.TOptometryDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "验光单详情VO") |
| | | public class TOptometryDetailVO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "验光信息") |
| | | private TOptometry optometry; |
| | | |
| | | @ApiModelProperty(value = "门店名称") |
| | | private String storeName; |
| | | |
| | | @ApiModelProperty(value = "验光师名称") |
| | | private String optometristName; |
| | | |
| | | @ApiModelProperty(value = "验光时间") |
| | | private LocalDateTime optometryTime; |
| | | |
| | | @ApiModelProperty(value = "验光单详情信息") |
| | | private List<TOptometryDetail> optometryDetails; |
| | | |
| | | } |
| | |
| | | # 数据源 |
| | | datasource: |
| | | username: root #测试环境 |
| | | password: root |
| | | url: jdbc:mysql://192.168.110.64:3306/eyes?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai |
| | | password: 123456 |
| | | url: jdbc:mysql://127.0.0.1:3306/eyes?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai |
| | | type: com.zaxxer.hikari.HikariDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | hikari: |
| | |
| | | <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_app_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.storeId != null"> |
| | | and s.id = #{query.storeId} |
| | | </if> |
| | | and t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | and t.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | </where> |
| | | order by t.createTime desc |
| | |
| | | and t2.id like concat('%',#{query.userId},'%') |
| | | </if> |
| | | <if test="query.realName != null and query.realName != ''"> |
| | | and t1.`name` like concat('%',#{query.realName},'%') |
| | | and t1.realName like concat('%',#{query.realName},'%') |
| | | </if> |
| | | <if test="query.phone != null and query.phone != ''"> |
| | | and t1.phone like concat('%',#{query.phone},'%') |
| | |
| | | <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 test="query.startTime != null and query.startTime!=''"> |
| | | and (t1.createTime between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | AND isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | AND t1.isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | ORDER BY t1.createTime DESC |
| | | </select> |
| | | <select id="pageList1" resultType="com.jilongda.manage.vo.TOptometristVO"> |
| | | select <include refid="Base_Column_List"></include> |
| | |
| | | isMachining, machiningCode, isAccounting, accountingName, accountingTime,phone, realName, age, gender,payTypeName |
| | | </sql> |
| | | <select id="getOrderDetailById" resultType="com.jilongda.manage.vo.TOrderVO"> |
| | | select o.id, o.code, o.userId, o.optometryId, o.storeId, o.modelId, o.color, o.series, o.rLens, o.lLens, o.`type`, o.refractiveIndex, o.createTime, o.updateTime, o.createBy, |
| | | select o.id, o.code, o.userId, o.optometryId, o.storeId, o.color, o.series, o.rLens, o.lLens, o.`type`, o.refractiveIndex, o.createTime, o.updateTime, o.createBy, |
| | | o.updateBy, o.isDelete, o.sysId, o.couponId, o.itemsId, o.remark, o.isMail, o.mailName, o.mailPhone, o.mailAddress, o.orderMoney, o.couponMoney, o.payMoney, |
| | | o.isMachining, o.machiningCode, o.isAccounting, o.accountingName, o.accountingTime,o.phone, o.realName, o.age, o.gender,o.payTypeName, |
| | | su.nick_name AS staffName,s.name AS storeName,tc.name AS couponName |
| | |
| | | left join t_store s on s.id = o.storeId |
| | | left join t_coupon_receive tcr on tcr.id = o.couponId |
| | | left join t_coupon tc on tc.id = tcr.couponId |
| | | where o.id = #{orderId} and o.isDelete = 0 |
| | | </select> |
| | | <select id="pageList" resultType="com.jilongda.manage.model.TOrder"> |
| | | select * from t_order |