小程序护理机构代码移植
This commit is contained in:
parent
6467f549e7
commit
775f2d4cfa
@ -0,0 +1,16 @@
|
||||
package com.xinelu.common.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Description 移动端接口校验自定义注解
|
||||
* @Author 纪寒
|
||||
* @Date 2022-12-09 10:21:50
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface MobileRequestAuthorization {
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.xinelu.common.utils;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.xinelu.common.constant.HttpStatus;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 业务层分页工具类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-08-08 11:03:27
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Component
|
||||
public class PageServiceUtil {
|
||||
|
||||
/**
|
||||
* 设置请求分页数据
|
||||
*/
|
||||
public void startPage() {
|
||||
PageUtils.startPage();
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应请求分页数据
|
||||
*/
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public TableDataInfo getDataTable(List<?> list) {
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setRows(list);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
return rspData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xinelu.applet.controller.nearbynursingstation;
|
||||
|
||||
|
||||
import com.xinelu.applet.dto.nursestation.NurseStationAppletDTO;
|
||||
import com.xinelu.applet.service.nearbynursingstation.INearbyNursingStationService;
|
||||
import com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoVO;
|
||||
import com.xinelu.common.annotation.MobileRequestAuthorization;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 附近护理站信息Controller
|
||||
*
|
||||
* @author ljh
|
||||
* @date 2022-09-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/nurseApplet/nearbyNursingStation")
|
||||
public class NearbyNursingStationController extends BaseController {
|
||||
@Resource
|
||||
private INearbyNursingStationService nearbyNursingStationService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询附近的护理站集合
|
||||
*
|
||||
* @param dto 搜获参数
|
||||
* @return com.xinyilu.common.core.page.TableDataInfo
|
||||
**/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/nearbyList")
|
||||
public TableDataInfo list(NurseStationAppletDTO dto) {
|
||||
return nearbyNursingStationService.getNearbyNursingStationInfoList(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询护理项目分类信息列表(护理站首页护理站与项目分类接口)
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/getNurseClassifyList")
|
||||
public AjaxResult getNurseClassifyList(NurseClassifyInfoVO nurseClassifyInfo) {
|
||||
return AjaxResult.success(nearbyNursingStationService.getNurseClassifyList(nurseClassifyInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取附近某个护理站详细信息对象
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @param homeLongitude 经度
|
||||
* @param homeLatitude 维度
|
||||
* @return com.xinyilu.common.core.domain.AjaxResult
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/introductionList")
|
||||
public AjaxResult list(Long nurseStationId, String homeLongitude, String homeLatitude) {
|
||||
return nearbyNursingStationService.selectNursingStationIntroductionList(nurseStationId, homeLongitude, homeLatitude);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.xinelu.applet.dto.nursestation;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 小程序和App附近护理站列表查询参数实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2023-02-16 16:53:44
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class NurseStationAppletDTO implements Serializable {
|
||||
private static final long serialVersionUID = -6072921690708654917L;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String homeLongitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String homeLatitude;
|
||||
|
||||
/**
|
||||
* 护理站类型
|
||||
*/
|
||||
private String nurseStationType;
|
||||
|
||||
/**
|
||||
* 护理站名称
|
||||
*/
|
||||
private String nurseStationName;
|
||||
|
||||
/**
|
||||
* 护理站所属分类id
|
||||
*/
|
||||
private Long nurseClassifyInfoId;
|
||||
|
||||
/**
|
||||
* 护理项目所属分类id
|
||||
*/
|
||||
private Long nurseItemClassifyInfoId;
|
||||
|
||||
/**
|
||||
* 护理站首页搜索框名称
|
||||
*/
|
||||
private String searchName;
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/19 10:08
|
||||
*/
|
||||
@Data
|
||||
public class GoodAttributeDetailsList implements Serializable {
|
||||
private static final long serialVersionUID = 1235925767957012159L;
|
||||
|
||||
/**
|
||||
* 商品属性明细表id
|
||||
**/
|
||||
public Long goodsAttributeId;
|
||||
|
||||
/**
|
||||
* 商品属性明细表id
|
||||
**/
|
||||
public Long attributeDetailsId;
|
||||
|
||||
/**
|
||||
* 商品属性名称
|
||||
*/
|
||||
private String attributeName;
|
||||
|
||||
/**
|
||||
* 商品属性明细名称
|
||||
*/
|
||||
private String attributeDetailsName;
|
||||
|
||||
/**
|
||||
* 商品属性图片地址
|
||||
*/
|
||||
private String attributePitureUrl;
|
||||
|
||||
/**
|
||||
* 商品单价,保留到小数点后两位
|
||||
*/
|
||||
private BigDecimal goodsPrice;
|
||||
|
||||
/**
|
||||
* 商品库存
|
||||
*/
|
||||
private Long goodsStock;
|
||||
/**
|
||||
* 商品排序
|
||||
*/
|
||||
private Integer attributeDetailsSort;
|
||||
|
||||
|
||||
/**
|
||||
* 积分兑换标识,0:否,1:是(积分兑换增加)
|
||||
*/
|
||||
private Integer integralExchangeFlag;
|
||||
|
||||
/**
|
||||
* 积分兑换门槛值
|
||||
*/
|
||||
private Integer integralExchangeSill;
|
||||
|
||||
/**
|
||||
* 积分兑换商品数量
|
||||
*/
|
||||
private Integer integralExchangeCount;
|
||||
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
|
||||
import com.xinelu.applet.vo.coupon.CouponVO;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/17 15:58
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GoodDetails extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = 8087476368916081295L;
|
||||
|
||||
/**
|
||||
* 店铺表id
|
||||
*/
|
||||
private Long storeInfoId;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Long goodsInfoId;
|
||||
/**
|
||||
* 商品分类id
|
||||
*/
|
||||
private Long goodsCategoryId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
|
||||
/**
|
||||
* 商品图片路径
|
||||
*/
|
||||
private String goodsPictureUrl;
|
||||
|
||||
|
||||
/**
|
||||
* 商品度量单位
|
||||
*/
|
||||
private String goodsUnit;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 商品概述
|
||||
*/
|
||||
private String goodsRemark;
|
||||
|
||||
/**
|
||||
* 商品用途
|
||||
*/
|
||||
private String goodsPurpose;
|
||||
|
||||
/**
|
||||
* 商品信息属性
|
||||
*/
|
||||
List<GoodDetailsList> goodDetailsLists;
|
||||
|
||||
/**
|
||||
* 商品信息属性
|
||||
*/
|
||||
List<GoodAttributeDetailsList> goodAttributeDetailsLists;
|
||||
|
||||
/**
|
||||
* 商品最低价格
|
||||
*/
|
||||
private BigDecimal minGoodsPrice;
|
||||
|
||||
/**
|
||||
* 商品详情-用户优惠券集合
|
||||
*/
|
||||
private List<CouponVO> couponList;
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/17 16:15
|
||||
*/
|
||||
@Data
|
||||
public class GoodDetailsList implements Serializable {
|
||||
private static final long serialVersionUID = 6468704416946946009L;
|
||||
|
||||
/**
|
||||
* 商品属性id
|
||||
*/
|
||||
private Long goodsAttributeId;
|
||||
|
||||
/**
|
||||
* 商品属性明细id
|
||||
*/
|
||||
private Long attributeDetailsId;
|
||||
|
||||
/**
|
||||
* 商品属性名称
|
||||
*/
|
||||
private String attributeName;
|
||||
|
||||
/**
|
||||
* 商品属性概述
|
||||
*/
|
||||
private String attributeRemark;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer goodsAttributeSort;
|
||||
|
||||
/**
|
||||
* 商品信息属性
|
||||
*/
|
||||
List<GoodAttributeDetailsList> goodAttributeDetailsLists;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
|
||||
import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/17 17:55
|
||||
*/
|
||||
@Data
|
||||
public class GoodePatientInfo implements Serializable {
|
||||
private static final long serialVersionUID = -9160130965212236070L;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String patientName;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 用户会员基本信息
|
||||
*/
|
||||
List<ReceiveAddressInfo> receiveAddressInfoList;
|
||||
}
|
||||
@ -0,0 +1,118 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/17 14:43
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GoodsList extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -3131284762879886365L;
|
||||
|
||||
/**
|
||||
* 商品分类id
|
||||
*/
|
||||
private Long goodsCategoryId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品属性名称
|
||||
*/
|
||||
private String attributeName;
|
||||
|
||||
/**
|
||||
* 商品属性明细名称
|
||||
*/
|
||||
private String attributeDetailsName;
|
||||
|
||||
/**
|
||||
* 商品主图片路径
|
||||
*/
|
||||
private String goodsPictureUrl;
|
||||
|
||||
/**
|
||||
* 商品属性图片路径
|
||||
*/
|
||||
private String attributePitureUrl;
|
||||
|
||||
/**
|
||||
* 商品度量单位
|
||||
*/
|
||||
private String goodsUnit;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 商品单价,保留到小数点后两位
|
||||
*/
|
||||
private BigDecimal goodsPrice;
|
||||
|
||||
/**
|
||||
* 商品分类id
|
||||
*/
|
||||
private Long goodsInfoId;
|
||||
/**
|
||||
* 商品属性id
|
||||
*/
|
||||
private Long goodsAttributeId;
|
||||
/**
|
||||
* 商品属性明细表id
|
||||
*/
|
||||
private Long attributeDetailsId;
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
|
||||
/**
|
||||
* 商品所有子分类id
|
||||
*/
|
||||
private String goodChildrenCategoryIds;
|
||||
|
||||
/**
|
||||
* 父级分类id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 商品所有子分类id集合
|
||||
*/
|
||||
private List<Integer> goodsCategoryIds;
|
||||
|
||||
/**
|
||||
* 积分兑换标识,0:否,1:是(积分兑换增加)
|
||||
*/
|
||||
private Integer integralExchangeFlag;
|
||||
|
||||
/**
|
||||
* 积分兑换门槛值
|
||||
*/
|
||||
private Integer integralExchangeSill;
|
||||
|
||||
/**
|
||||
* 积分兑换商品数量
|
||||
*/
|
||||
private Integer integralExchangeCount;
|
||||
|
||||
/**
|
||||
* 商品库存
|
||||
*/
|
||||
private Long goodsStock;
|
||||
}
|
||||
@ -0,0 +1,237 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/18 10:56
|
||||
*/
|
||||
@Data
|
||||
public class GoodsOrderPatient implements Serializable {
|
||||
private static final long serialVersionUID = 3631119823163462829L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long goodsId;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
|
||||
/**
|
||||
* 商品属性id
|
||||
*/
|
||||
private Long goodsAttributeId;
|
||||
/**
|
||||
* 商品属性明细表id
|
||||
*/
|
||||
private Long goodsAttributeDetailsId;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单总金额
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String receiveAddress;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
/**
|
||||
* 下班方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET
|
||||
*/
|
||||
private String orderChannel;
|
||||
|
||||
/**
|
||||
* 护理站:NURSE_STATION,商城:SHOPPING_MALL
|
||||
*/
|
||||
|
||||
private String buySource;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否删除,0:否,1:是
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 商品订单表id
|
||||
*/
|
||||
private Long goodsOrderId;
|
||||
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer goodsCount;
|
||||
|
||||
/**
|
||||
* 商品属性名称
|
||||
*/
|
||||
private String goodsAttributeName;
|
||||
|
||||
/**
|
||||
* 商品属性内容
|
||||
*/
|
||||
private String goodsAttributeContent;
|
||||
|
||||
/**
|
||||
* 商品单价(元)
|
||||
*/
|
||||
private BigDecimal goodsPrice;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String goodOrderNo;
|
||||
|
||||
/**
|
||||
* 应付总金额(元)
|
||||
*/
|
||||
private BigDecimal goodTotalPrice;
|
||||
|
||||
/**
|
||||
* 优惠金额(元)
|
||||
*/
|
||||
private BigDecimal discountPrice;
|
||||
|
||||
/**
|
||||
* 运费金额(元)
|
||||
*/
|
||||
private BigDecimal transportPrice;
|
||||
|
||||
/**
|
||||
* 赠送积分
|
||||
*/
|
||||
private Integer giveIntegral;
|
||||
|
||||
/**
|
||||
* 居住小区编码
|
||||
*/
|
||||
private String communityCode;
|
||||
|
||||
/**
|
||||
* 所属区域编码
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
private String patientCode;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* sys_user表id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 紧急联系人名称
|
||||
*/
|
||||
private String urgentContactName;
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
*/
|
||||
private String urgentContactPhone;
|
||||
|
||||
/**
|
||||
* 居住小区名称
|
||||
*/
|
||||
private String communityAliasName;
|
||||
|
||||
/**
|
||||
* 住址经度
|
||||
*/
|
||||
private String homeLongitude;
|
||||
|
||||
/**
|
||||
* 住址纬度
|
||||
*/
|
||||
private String homeLatitude;
|
||||
|
||||
/**
|
||||
* 个人头像地址
|
||||
*/
|
||||
|
||||
private String headPictureUrl;
|
||||
|
||||
/**
|
||||
* 登录密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 会员积分
|
||||
*/
|
||||
private Integer integral;
|
||||
|
||||
/**
|
||||
* 登录标识
|
||||
*/
|
||||
private Integer loginFlag;
|
||||
}
|
||||
@ -0,0 +1,233 @@
|
||||
package com.xinelu.applet.dto.nursingstationgoods;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import lombok.Data;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/10/18 9:51
|
||||
* 商品订单(积分兑换与商品购买共用)
|
||||
*/
|
||||
@Data
|
||||
public class GoodsOrderStationDTO implements Serializable {
|
||||
private static final long serialVersionUID = 8319587190064545742L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long goodsId;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
|
||||
/**
|
||||
* 商品属性id
|
||||
**/
|
||||
@NotNull(message = "商品属性信息不能为空", groups = {Insert.class, Update.class})
|
||||
public Long goodsAttributeId;
|
||||
|
||||
/**
|
||||
* 商品属性明细表id
|
||||
**/
|
||||
@NotNull(message = "商品属性明细表信息不能为空", groups = {Insert.class, Update.class})
|
||||
public Long goodsAttributeDetailsId;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@NotNull(message = "请添加购买人员信息!", groups = {Insert.class, Update.class})
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单总金额
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
@NotBlank(message = "收货人不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 20, message = "收货人不能超过20位", groups = {Insert.class, Update.class})
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
@NotBlank(message = "收货地址不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 100, message = "收货地址不能超过100位", groups = {Insert.class, Update.class})
|
||||
private String receiveAddress;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@NotBlank(message = "联系电话不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 11, message = "联系电话不能超过11位", groups = {Insert.class, Update.class})
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
/**
|
||||
* 下单方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET
|
||||
*/
|
||||
@NotNull(message = "下单方式不能为空", groups = {Insert.class, Update.class})
|
||||
private String orderChannel;
|
||||
|
||||
/**
|
||||
* 护理站:NURSE_STATION,商城:SHOPPING_MALL,健康咨询:HEALTH_CONSULTATION
|
||||
*/
|
||||
@NotNull(message = "购买方式不能为空", groups = {Insert.class, Update.class})
|
||||
private String buySource;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@Length(max = 300, message = "备注信息不能超过300位", groups = {Insert.class, Update.class})
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否删除,0:否,1:是,,暂时未使用
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 商品订单表id,,暂时未使用
|
||||
*/
|
||||
private Long goodsOrderId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@NotBlank(message = "商品名称不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 50, message = "商品名称不能超过50位", groups = {Insert.class, Update.class})
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
@NotNull(message = "商品数量不能为空", groups = {Insert.class, Update.class})
|
||||
private Integer goodsCount;
|
||||
|
||||
/**
|
||||
* 商品属性名称
|
||||
*/
|
||||
@Length(max = 100, message = "商品属性名称不能超过100位", groups = {Insert.class, Update.class})
|
||||
private String goodsAttributeName;
|
||||
|
||||
/**
|
||||
* 商品属性内容
|
||||
*/
|
||||
private String goodsAttributeContent;
|
||||
|
||||
/**
|
||||
* 商品单价(元)
|
||||
*/
|
||||
private BigDecimal goodsPrice;
|
||||
|
||||
/**
|
||||
* 订单编号,暂时未使用
|
||||
*/
|
||||
private String goodOrderNo;
|
||||
|
||||
/**
|
||||
* 应付总金额(元),暂时未使用
|
||||
*/
|
||||
private BigDecimal goodTotalPrice;
|
||||
|
||||
/**
|
||||
* 优惠金额(元)
|
||||
*/
|
||||
private BigDecimal discountPrice;
|
||||
|
||||
/**
|
||||
* 运费金额(元)
|
||||
*/
|
||||
private BigDecimal transportPrice;
|
||||
|
||||
/**
|
||||
* 赠送积分,暂未使用
|
||||
*/
|
||||
private Integer giveIntegral;
|
||||
|
||||
/**
|
||||
* 订单类型,积分兑换:INTEGRAL_EXCHANGE,直接购买:DIRECT_BUY,健康咨询:HEALTH_CONSULTATION
|
||||
*/
|
||||
private String orderType;
|
||||
|
||||
/**
|
||||
* 健康咨询人员表id,记录咨询订单中选择的医生,健康咨询订单使用
|
||||
*/
|
||||
private Long hospitalPersonId;
|
||||
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
|
||||
/**
|
||||
* 积分抵扣数量,积分抵扣使用
|
||||
*/
|
||||
private Integer integralDeductionCount;
|
||||
|
||||
/**
|
||||
* 积分抵扣金额,积分抵扣使用
|
||||
*/
|
||||
private BigDecimal integralDeductionPrice;
|
||||
|
||||
/**
|
||||
* 商品度量单位
|
||||
*/
|
||||
private String goodsUnit;
|
||||
|
||||
/**
|
||||
* 优惠券使用门槛
|
||||
*/
|
||||
private BigDecimal couponConsumePrice;
|
||||
|
||||
/**
|
||||
* 优惠券名称
|
||||
*/
|
||||
private String couponTitle;
|
||||
|
||||
/**
|
||||
* 商品原始金额,即:商品数量 * 商品单价
|
||||
*/
|
||||
@NotNull(message = "商品原始金额不能为空!", groups = {Insert.class, Update.class})
|
||||
private BigDecimal originalTotalPrice;
|
||||
|
||||
/**
|
||||
* 积分兑换数值,积分兑换商品使用
|
||||
*/
|
||||
private Integer integralExchangeSill;
|
||||
|
||||
/**
|
||||
* 积分兑换商品数量,积分兑换商品使用
|
||||
*/
|
||||
private Integer integralExchangeCount;
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package com.xinelu.applet.mapper.nearbynursingstation;
|
||||
|
||||
import com.xinelu.applet.dto.nursestation.NurseStationAppletDTO;
|
||||
import com.xinelu.applet.vo.goodinfo.GoodInfoAndItemVO;
|
||||
import com.xinelu.applet.vo.nearbynursingstation.*;
|
||||
import com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoList;
|
||||
import com.xinelu.applet.vo.specialdisease.StationClassifyInfoVO;
|
||||
import com.xinelu.manage.domain.nurseclassifyinfo.NurseClassifyInfo;
|
||||
import com.xinelu.manage.domain.nursestationlabel.NurseStationLabel;
|
||||
import com.xinelu.manage.domain.nursestationperson.NurseStationPerson;
|
||||
import com.xinelu.manage.domain.nursetype.NurseType;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 护理站信息Mapper接口
|
||||
*
|
||||
* @author ljh
|
||||
* @date 2022-09-02
|
||||
*/
|
||||
public interface NearbyNursingStationMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 首页咨询信息列表集合
|
||||
*
|
||||
* @param informationCategoryType 资讯类型
|
||||
* @return java.util.List<com.xinyilu.nurseapplet.domain.nearbynursingstation.InformationCategoryVO>
|
||||
**/
|
||||
List<InformationCategoryVO> getInformationCategoryList(String informationCategoryType);
|
||||
|
||||
/**
|
||||
* 首页海报查询
|
||||
*
|
||||
* @param poserInfo 海报信息
|
||||
* @return java.util.List<com.xinyilu.base.domain.poserInfo.PoserInfo>
|
||||
**/
|
||||
List<PoserInfoHomeVO> getHomePagePoserInfoList(PoserInfoHomeVO poserInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 获取附近护理站详细信息对象集合
|
||||
*
|
||||
* @param dto 搜索参数
|
||||
* @return java.util.List<com.xinyilu.nurseapplet.domain.nearbynursingstation.NearbyNursingStationVO>
|
||||
**/
|
||||
List<NursingStationAndClassifyVO> selectNursingStationIntroductionList(@Param("dto") NurseStationAppletDTO dto);
|
||||
|
||||
/**
|
||||
* 获取附近本护理站详细信息项目对象集合
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @return java.util.List<com.xinyilu.nurseapplet.domain.nearbynursingstation.NearbyNursingStationItem>
|
||||
**/
|
||||
List<NearbyNursingStationItem> getNurseItemList(Long nurseStationId);
|
||||
|
||||
/**
|
||||
* 获取附近本护理站人员信息集合
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @return java.util.List<com.xinyilu.base.domain.nursestationperson.NurseStationPerson>
|
||||
**/
|
||||
List<NurseStationPerson> getNursePersonList(Long nurseStationId);
|
||||
|
||||
/**
|
||||
* 获取附近本护理站人员标签信息集合
|
||||
*
|
||||
* @param nurseStationIdList 护理站id集合
|
||||
* @return java.util.List<com.xinyilu.base.domain.nursestationlabel.NurseStationLabel>
|
||||
**/
|
||||
List<NurseStationLabel> getNurseStationLabelByList(@Param("nurseStationIdList") List<Long> nurseStationIdList);
|
||||
|
||||
/**
|
||||
* 查询护理类型信息列表
|
||||
*
|
||||
* @return 护理类型信息集合
|
||||
*/
|
||||
List<NurseType> selectNurseTypeList();
|
||||
|
||||
/**
|
||||
* 获取附近护理站和护理站标签信息集合
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @return java.util.List<com.xinyilu.nurseapplet.domain.nearbynursingstation.NearbyNursingStationVO>
|
||||
**/
|
||||
NearbyNursingStationVO selectNursingStationIntroductionListTwo(@Param("nurseStationId") Long nurseStationId);
|
||||
|
||||
/**
|
||||
* 获取附近本护理站产品信息项目对象集合
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @return java.util.List<GoodInfoAndItemVO>
|
||||
**/
|
||||
List<GoodInfoAndItemVO> getNurseGoodsList(Long nurseStationId);
|
||||
|
||||
/**
|
||||
* 获取附近本护理站产品信息项目对象集合
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @param nurseClassifyInfoId 护理项目所属分类id
|
||||
* @param shelfStatus 上架状态
|
||||
* @return java.util.List<GoodInfoAndItemVO>
|
||||
**/
|
||||
List<GoodInfoAndItemVO> getNurseStationItemList(@Param("nurseStationId") Long nurseStationId, @Param("nurseClassifyInfoId") Long nurseClassifyInfoId, @Param("shelfStatus") String shelfStatus);
|
||||
|
||||
/**
|
||||
* 查询护理项目分类信息列表
|
||||
*
|
||||
* @param nurseClassifyInfo 护理机构和护理项目分类信息
|
||||
* @return 护理机构和护理项目分类信息集合
|
||||
*/
|
||||
List<NurseClassifyInfoList> getNurseClassifyList(NurseClassifyInfoList nurseClassifyInfo);
|
||||
|
||||
|
||||
/**
|
||||
* 获取护理站信息对象列表集合
|
||||
*
|
||||
* @param nearbyNursingStationVO 护理站信息对象列表集合
|
||||
* @return java.util.List<com.xinyilu.nurseapplet.domain.nearbynursingstation.NearbyNursingStationVO>
|
||||
**/
|
||||
List<NearbyNursingStationVO> getNursingStationIntroductionList(NearbyNursingStationVO nearbyNursingStationVO);
|
||||
|
||||
/**
|
||||
* 获取附近本护理站项目分类信息集合
|
||||
*
|
||||
* @param nurseStationIdList 护理站id集合
|
||||
* @return java.util.List<com.xinyilu.base.domain.nursestationlabel.NurseStationLabel>
|
||||
**/
|
||||
List<NurseStationClassifyVO> getNurseStationClassifyByList(@Param("nurseStationIdList") List<Long> nurseStationIdList);
|
||||
|
||||
/**
|
||||
* 根据护理分类所属类型查询
|
||||
*
|
||||
* @param classifyType 分类所属类型
|
||||
* @return List<NurseClassifyInfo>
|
||||
*/
|
||||
List<NurseClassifyInfo> selectNurseClassifyByClassifyType(String classifyType);
|
||||
|
||||
/**
|
||||
* 根据护理站id查询对应得护理项目分类集合信息
|
||||
*
|
||||
* @param nurseStationIdList 护理站id集合
|
||||
* @return 分类信息集合
|
||||
*/
|
||||
List<StationClassifyInfoVO> getStationClassifyInfoList(@Param("nurseStationIdList") List<Long> nurseStationIdList);
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.xinelu.applet.service.nearbynursingstation;
|
||||
|
||||
import com.xinelu.applet.dto.nursestation.NurseStationAppletDTO;
|
||||
import com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/9/2 15:50
|
||||
* 附近护理站信息
|
||||
*/
|
||||
public interface INearbyNursingStationService {
|
||||
|
||||
/**
|
||||
* 查询附近的护理站集合
|
||||
*
|
||||
* @param dto 搜获参数
|
||||
* @return com.xinyilu.common.core.domain.AjaxResult
|
||||
**/
|
||||
TableDataInfo getNearbyNursingStationInfoList(NurseStationAppletDTO dto);
|
||||
|
||||
/**
|
||||
* 查询护理项目分类信息列表
|
||||
*
|
||||
* @param nurseClassifyInfo 护理机构和护理项目分类信息
|
||||
* @return 护理机构和护理项目分类信息集合
|
||||
*/
|
||||
NurseClassifyInfoVO getNurseClassifyList(NurseClassifyInfoVO nurseClassifyInfo);
|
||||
|
||||
/**
|
||||
* 获取附近某个护理站详细信息对象
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @param homeLongitude 经度
|
||||
* @param homeLatitude 维度
|
||||
* @return com.xinyilu.common.core.domain.AjaxResult
|
||||
*/
|
||||
AjaxResult selectNursingStationIntroductionList(Long nurseStationId, String homeLongitude, String homeLatitude);
|
||||
}
|
||||
@ -0,0 +1,244 @@
|
||||
package com.xinelu.applet.service.nearbynursingstation.impl;
|
||||
|
||||
import com.xinelu.applet.dto.nursestation.NurseStationAppletDTO;
|
||||
import com.xinelu.applet.mapper.nearbynursingstation.NearbyNursingStationMapper;
|
||||
import com.xinelu.applet.service.nearbynursingstation.INearbyNursingStationService;
|
||||
import com.xinelu.applet.vo.nearbynursingstation.NearbyNursingStationVO;
|
||||
import com.xinelu.applet.vo.nearbynursingstation.NursingStationAndClassifyVO;
|
||||
import com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO;
|
||||
import com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoList;
|
||||
import com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoVO;
|
||||
import com.xinelu.applet.vo.specialdisease.StationClassifyInfoVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.NurseClassifyInfoEnum;
|
||||
import com.xinelu.common.enums.PoserModuleTypeEnum;
|
||||
import com.xinelu.common.utils.PageServiceUtil;
|
||||
import com.xinelu.manage.domain.nurseclassifyinfo.NurseClassifyInfo;
|
||||
import com.xinelu.system.domain.SysConfig;
|
||||
import com.xinelu.system.mapper.SysConfigMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/9/2 12:37
|
||||
* 附近护理站信息
|
||||
*/
|
||||
@Service
|
||||
public class NearbyNursingStationServiceImpl implements INearbyNursingStationService {
|
||||
|
||||
@Resource
|
||||
private NearbyNursingStationMapper nearbyNursingStationMapper;
|
||||
@Resource
|
||||
private PageServiceUtil pageServiceUtil;
|
||||
@Resource
|
||||
private SysConfigMapper sysConfigMapper;
|
||||
|
||||
/**
|
||||
* 距离用地球半径
|
||||
*/
|
||||
private static final double EARTH_RADIUS = 6378.137;
|
||||
|
||||
/**
|
||||
* 营业状态:营业中
|
||||
*/
|
||||
private static final String OPEN_FOR_BUSINESS = "营业中";
|
||||
|
||||
/**
|
||||
* 营业状态:休息中
|
||||
*/
|
||||
private static final String SUSPENSION_OF_BUSINESS = "休息中";
|
||||
|
||||
/**
|
||||
* 查询附近的护理站集合
|
||||
*
|
||||
* @param dto 搜索参数
|
||||
* @return com.xinyilu.common.core.domain.AjaxResult
|
||||
**/
|
||||
@Override
|
||||
public TableDataInfo getNearbyNursingStationInfoList(NurseStationAppletDTO dto) {
|
||||
// 查询附近护理站的信息集合
|
||||
pageServiceUtil.startPage();
|
||||
List<NursingStationAndClassifyVO> nearbyNursingStationList = nearbyNursingStationMapper.selectNursingStationIntroductionList(dto);
|
||||
//获取所有护理站id集合
|
||||
List<Long> stationIdIdList = nearbyNursingStationList.stream().filter(item -> Objects.nonNull(item.getNurseStationId())).map(NursingStationAndClassifyVO::getNurseStationId).distinct().collect(Collectors.toList());
|
||||
//查询所有的分类信息
|
||||
Map<Long, List<StationClassifyInfoVO>> stationClassifyMap = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(stationIdIdList)) {
|
||||
stationClassifyMap = nearbyNursingStationMapper.getStationClassifyInfoList(stationIdIdList).stream().filter(item -> Objects.nonNull(item.getNurseStationId())).collect(Collectors.groupingBy(StationClassifyInfoVO::getNurseStationId));
|
||||
}
|
||||
for (NursingStationAndClassifyVO nearbyNursingStationVO : nearbyNursingStationList) {
|
||||
if (StringUtils.isBlank(nearbyNursingStationVO.getLatitude()) || StringUtils.isBlank(nearbyNursingStationVO.getLongitude())) {
|
||||
nearbyNursingStationVO.setDistance(null);
|
||||
} else {
|
||||
String latitude = nearbyNursingStationVO.getLatitude();
|
||||
String longitude = nearbyNursingStationVO.getLongitude();
|
||||
double latitudeDouble = Double.parseDouble(latitude);
|
||||
double longitudeDouble = Double.parseDouble(longitude);
|
||||
double homeLongitudeDouble = Double.parseDouble(StringUtils.isBlank(dto.getHomeLongitude()) ? "0" : dto.getHomeLongitude());
|
||||
double homeLatitudeDouble = Double.parseDouble(StringUtils.isBlank(dto.getHomeLatitude()) ? "0" : dto.getHomeLatitude());
|
||||
double distance = getDistance(latitudeDouble, longitudeDouble, homeLatitudeDouble, homeLongitudeDouble);
|
||||
String valueOf = String.valueOf(distance);
|
||||
nearbyNursingStationVO.setDistance(valueOf);
|
||||
}
|
||||
if (!stationClassifyMap.isEmpty()) {
|
||||
nearbyNursingStationVO.setClassifyInfoList(stationClassifyMap.getOrDefault(nearbyNursingStationVO.getNurseStationId(), Lists.newArrayList()));
|
||||
}
|
||||
}
|
||||
return pageServiceUtil.getDataTable(nearbyNursingStationList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询护理项目分类信息列表
|
||||
*
|
||||
* @param nurseClassifyInfo 护理机构和护理项目分类信息
|
||||
* @return 护理机构和护理项目分类信息集合
|
||||
*/
|
||||
@Override
|
||||
public NurseClassifyInfoVO getNurseClassifyList(NurseClassifyInfoVO nurseClassifyInfo) {
|
||||
NurseClassifyInfoVO nurseClassifyInfoVO = new NurseClassifyInfoVO();
|
||||
//查询护理站分类和护理项目分类集合信息
|
||||
List<String> typeList = Arrays.asList(NurseClassifyInfoEnum.NURSE_ITEM.getInfo(), NurseClassifyInfoEnum.NURSE_AGENCY.getInfo());
|
||||
NurseClassifyInfoList classifyInfo = new NurseClassifyInfoList();
|
||||
classifyInfo.setTypeList(typeList);
|
||||
List<NurseClassifyInfoList> classifyList = nearbyNursingStationMapper.getNurseClassifyList(classifyInfo);
|
||||
if (CollectionUtils.isNotEmpty(classifyList)) {
|
||||
List<NurseClassifyInfoList> itemClassifyInfoList = classifyList.stream().filter(item -> StringUtils.isNotBlank(item.getClassifyType()) && NurseClassifyInfoEnum.NURSE_ITEM.getInfo().equals(item.getClassifyType())).collect(Collectors.toList());
|
||||
List<NurseClassifyInfoList> agencyClassifyInfoList = classifyList.stream().filter(item -> StringUtils.isNotBlank(item.getClassifyType()) && NurseClassifyInfoEnum.NURSE_AGENCY.getInfo().equals(item.getClassifyType())).collect(Collectors.toList());
|
||||
nurseClassifyInfoVO.setNurseItemClassifyInfoList(itemClassifyInfoList);
|
||||
nurseClassifyInfoVO.setNurseAgencyClassifyInfoList(agencyClassifyInfoList);
|
||||
} else {
|
||||
nurseClassifyInfoVO.setNurseItemClassifyInfoList(Lists.newArrayList());
|
||||
nurseClassifyInfoVO.setNurseAgencyClassifyInfoList(Lists.newArrayList());
|
||||
}
|
||||
//海报信息集合
|
||||
PoserInfoHomeVO poserInfo = new PoserInfoHomeVO();
|
||||
poserInfo.setModuleType(StringUtils.isBlank(nurseClassifyInfo.getModuleType()) ? "" : nurseClassifyInfo.getModuleType());
|
||||
List<PoserInfoHomeVO> homePagePoserInfoList = nearbyNursingStationMapper.getHomePagePoserInfoList(poserInfo);
|
||||
nurseClassifyInfoVO.setPoserInfoList(homePagePoserInfoList);
|
||||
return nurseClassifyInfoVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取附近某个护理站详细信息对象
|
||||
*
|
||||
* @param nurseStationId 护理站id
|
||||
* @param homeLongitude 经度
|
||||
* @param homeLatitude 维度
|
||||
* @return com.xinyilu.common.core.domain.AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult selectNursingStationIntroductionList(Long nurseStationId, String homeLongitude, String homeLatitude) {
|
||||
//获取附近护理站以及护理站标签信息集合
|
||||
NearbyNursingStationVO nearbyNursingStationVO = nearbyNursingStationMapper.selectNursingStationIntroductionListTwo(nurseStationId);
|
||||
//筛选海报模块标识,护理机构模块:NURSE_AGENCY_MODULE
|
||||
List<PoserInfoHomeVO> stationPoserInfoList = nearbyNursingStationVO.getPoserInfoList().stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotBlank(item.getModuleType()) && item.getModuleType().equals(PoserModuleTypeEnum.NURSE_AGENCY_MODULE.getInfo())).collect(Collectors.toList());
|
||||
nearbyNursingStationVO.setPoserInfoList(stationPoserInfoList);
|
||||
//获取配置系统配置中的参数信息
|
||||
List<String> keyList = Arrays.asList("MORNING_START_TIME", "MORNING_END_TIME", "AFTERNOON_START_TIME", "AFTERNOON_END_TIME");
|
||||
Map<String, String> keysMap = sysConfigMapper.getSystemConfigByKeys(keyList).stream()
|
||||
.filter(item -> StringUtils.isNotBlank(item.getConfigKey()) && StringUtils.isNotBlank(item.getConfigValue()))
|
||||
.collect(Collectors.toMap(SysConfig::getConfigKey, SysConfig::getConfigValue));
|
||||
if (keysMap.isEmpty()) {
|
||||
keysMap.put("MORNING_START_TIME", "08:00:00");
|
||||
keysMap.put("MORNING_END_TIME", "12:00:00");
|
||||
keysMap.put("AFTERNOON_START_TIME", "13:30:00");
|
||||
keysMap.put("AFTERNOON_END_TIME", "18:00:00");
|
||||
}
|
||||
//如果系统护理站没有设置营业时间,那么就默赋值系统默认的营业时间
|
||||
if (Objects.isNull(nearbyNursingStationVO.getMorningOpenStartTime())) {
|
||||
nearbyNursingStationVO.setMorningOpenStartTime(LocalTime.parse(keysMap.get("MORNING_START_TIME")));
|
||||
}
|
||||
if (Objects.isNull(nearbyNursingStationVO.getMorningOpenEndTime())) {
|
||||
nearbyNursingStationVO.setMorningOpenEndTime(LocalTime.parse(keysMap.get("MORNING_END_TIME")));
|
||||
}
|
||||
if (Objects.isNull(nearbyNursingStationVO.getAfternoonOpenStartTime())) {
|
||||
nearbyNursingStationVO.setAfternoonOpenStartTime(LocalTime.parse(keysMap.get("AFTERNOON_START_TIME")));
|
||||
}
|
||||
if (Objects.isNull(nearbyNursingStationVO.getAfternoonOpenEndTime())) {
|
||||
nearbyNursingStationVO.setAfternoonOpenEndTime(LocalTime.parse(keysMap.get("AFTERNOON_END_TIME")));
|
||||
}
|
||||
//设置营业时间和营业状态
|
||||
this.setBusinessTime(nearbyNursingStationVO, LocalTime.now());
|
||||
//查询护理项目分类
|
||||
List<NurseClassifyInfo> nurseClassifyInfoList = nearbyNursingStationMapper.selectNurseClassifyByClassifyType(NurseClassifyInfoEnum.NURSE_ITEM.getInfo());
|
||||
nearbyNursingStationVO.setNurseClassifyInfoList(nurseClassifyInfoList);
|
||||
//计算经纬度
|
||||
if (StringUtils.isBlank(nearbyNursingStationVO.getLatitude()) || StringUtils.isBlank(nearbyNursingStationVO.getLongitude())) {
|
||||
nearbyNursingStationVO.setDistance(null);
|
||||
} else {
|
||||
String latitude = nearbyNursingStationVO.getLatitude();
|
||||
String longitude = nearbyNursingStationVO.getLongitude();
|
||||
double latitudeDouble = Double.parseDouble(latitude);
|
||||
double longitudeDouble = Double.parseDouble(longitude);
|
||||
double homeLongitudeDouble = Double.parseDouble(StringUtils.isBlank(homeLongitude) ? "0" : homeLongitude);
|
||||
double homeLatitudeDouble = Double.parseDouble(StringUtils.isBlank(homeLatitude) ? "0" : homeLatitude);
|
||||
double distance = getDistance(latitudeDouble, longitudeDouble, homeLatitudeDouble, homeLongitudeDouble);
|
||||
String valueOf = String.valueOf(distance);
|
||||
nearbyNursingStationVO.setDistance(valueOf);
|
||||
}
|
||||
return AjaxResult.success(nearbyNursingStationVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过经纬度获取距离(单位:米)
|
||||
*
|
||||
* @param latitudeDouble 护理站经度
|
||||
* @param longitudeDouble 护理站纬度
|
||||
* @param homeLatitudeDouble 被护理人经度
|
||||
* @param homeLongitudeDouble 被护理人维度
|
||||
* @return 距离
|
||||
*/
|
||||
public static double getDistance(double latitudeDouble, double longitudeDouble, double homeLatitudeDouble,
|
||||
double homeLongitudeDouble) {
|
||||
//经纬度计算
|
||||
double radLat = rad(latitudeDouble);
|
||||
double homeRadLat = rad(homeLatitudeDouble);
|
||||
double a = radLat - homeRadLat;
|
||||
double b = rad(longitudeDouble) - rad(homeLongitudeDouble);
|
||||
double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2)
|
||||
+ Math.cos(radLat) * Math.cos(homeRadLat) * Math.pow(Math.sin(b / 2), 2)));
|
||||
//地球半径
|
||||
s = s * EARTH_RADIUS;
|
||||
s = Math.round(s * 10000d) / 10000d;
|
||||
s = Double.parseDouble(String.format("%.2f", s));
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* 距离用pai
|
||||
*
|
||||
* @param d 数字
|
||||
* @return 数值
|
||||
*/
|
||||
private static double rad(double d) {
|
||||
return d * Math.PI / 180.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置时间
|
||||
*
|
||||
* @param nearbyNursingStationVO 信息
|
||||
*/
|
||||
private void setBusinessTime(NearbyNursingStationVO nearbyNursingStationVO, LocalTime nowTime) {
|
||||
LocalTime morningOpenStartTime = nearbyNursingStationVO.getMorningOpenStartTime();
|
||||
LocalTime morningOpenEndTime = nearbyNursingStationVO.getMorningOpenEndTime();
|
||||
LocalTime afternoonOpenStartTime = nearbyNursingStationVO.getAfternoonOpenStartTime();
|
||||
LocalTime afternoonOpenEndTime = nearbyNursingStationVO.getAfternoonOpenEndTime();
|
||||
//获取当前时间判断是否营业状态
|
||||
if ((nowTime.isAfter(morningOpenStartTime) && nowTime.isBefore(morningOpenEndTime)) || (nowTime.isAfter(afternoonOpenStartTime) && nowTime.isBefore(afternoonOpenEndTime))) {
|
||||
nearbyNursingStationVO.setBusinessStatus(OPEN_FOR_BUSINESS);
|
||||
} else {
|
||||
nearbyNursingStationVO.setBusinessStatus(SUSPENSION_OF_BUSINESS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package com.xinelu.applet.vo.coupon;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.manage.domain.coupon.Coupon;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 优惠券信息对象 coupon
|
||||
*
|
||||
* @author ZH
|
||||
* @date 2023-02-24
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CouponVO extends Coupon implements Serializable {
|
||||
private static final long serialVersionUID = -4221286869238522896L;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
|
||||
/**
|
||||
* 会员用户优惠券领取记录表id
|
||||
*/
|
||||
private Long patientCouponReceiveId;
|
||||
|
||||
/**
|
||||
* 领取表领取方式
|
||||
*/
|
||||
private String receiveSource;
|
||||
|
||||
/**
|
||||
* 有效期开始时间,yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expirationStartTime;
|
||||
|
||||
/**
|
||||
* 有效期结束时间,yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expirationEndTime;
|
||||
|
||||
/**
|
||||
* 领取时间,yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime receiveTime;
|
||||
|
||||
/**
|
||||
* 未使用:NOT_USED,已使用:USED,已过期:EXPIRED 待领取:WAIT_RECEIVE
|
||||
*/
|
||||
private String useStatus;
|
||||
|
||||
/**
|
||||
* 优惠券有效期,单位:天
|
||||
*/
|
||||
private Integer couponReductionDays;
|
||||
}
|
||||
@ -0,0 +1,106 @@
|
||||
package com.xinelu.applet.vo.goodinfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 商品基本信息对象 goods_info
|
||||
*
|
||||
* @author ZH
|
||||
* @date 2022-10-17
|
||||
*/
|
||||
@Data
|
||||
public class GoodInfoAndItemVO implements Serializable {
|
||||
private static final long serialVersionUID = -373652055239962990L;
|
||||
|
||||
/**
|
||||
* 商品主键id
|
||||
*/
|
||||
private Long goodsInfoId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品图片路径
|
||||
*/
|
||||
private String goodsPictureUrl;
|
||||
|
||||
/**
|
||||
* 商品度量单位
|
||||
*/
|
||||
private String goodsUnit;
|
||||
|
||||
/**
|
||||
* 商品用途,买卖:BUSINESS,租赁:LEASE
|
||||
*/
|
||||
private String goodsPurpose;
|
||||
|
||||
/**
|
||||
* 商品单价,保留到小数点后两位
|
||||
*/
|
||||
private BigDecimal goodsPrice;
|
||||
|
||||
/**
|
||||
* 商品属性名称
|
||||
*/
|
||||
private String attributeName;
|
||||
|
||||
/**
|
||||
* 商品属性明细名称
|
||||
*/
|
||||
private String attributeDetailsName;
|
||||
|
||||
/**
|
||||
* 商品属性明细名称
|
||||
*/
|
||||
private String goodsAttributeId;
|
||||
|
||||
/**
|
||||
* 护理项目id
|
||||
*/
|
||||
private Long stationItemId;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long stationId;
|
||||
|
||||
/**
|
||||
* 护理项目id
|
||||
*/
|
||||
private Long stationItemPriceId;
|
||||
|
||||
/**
|
||||
* 护理项目名称
|
||||
*/
|
||||
private String nurseItemName;
|
||||
|
||||
/**
|
||||
* 护理服务时长和单位
|
||||
*/
|
||||
private String serveDurationUnit;
|
||||
|
||||
/**
|
||||
* 护理项目价格
|
||||
*/
|
||||
private BigDecimal nurseItemPrice;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer itemSort;
|
||||
/**
|
||||
* 护理项目图片地址
|
||||
*/
|
||||
private String itemPictureUrl;
|
||||
|
||||
/**
|
||||
* 提前预约时长
|
||||
*/
|
||||
private String advanceAppointDuration;
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xinelu.applet.vo.goodinfo;
|
||||
|
||||
import com.xinelu.applet.dto.nursingstationgoods.GoodAttributeDetailsList;
|
||||
import com.xinelu.manage.domain.goodsInfo.GoodsInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品信息及商品属性明细信息返回VO
|
||||
*
|
||||
* @author xinyilu
|
||||
* @date 2022-10-17
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GoodInfoVO extends GoodsInfo implements Serializable {
|
||||
private static final long serialVersionUID = -5563763757759175927L;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Long goodsInfoId;
|
||||
|
||||
/**
|
||||
* 商品属性明细集合
|
||||
*/
|
||||
private List<GoodAttributeDetailsList> goodsAttributeDetailsList;
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.xinelu.applet.vo.nearbynursingstation;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/14 17:05
|
||||
*/
|
||||
@Data
|
||||
public class InformationCategoryVO implements Serializable {
|
||||
private static final long serialVersionUID = -1645816395010415385L;
|
||||
/**
|
||||
* 资讯分类名称
|
||||
*/
|
||||
private String informationCategoryName;
|
||||
|
||||
/**
|
||||
* 资讯分类类型,健康咨询:HEALTH_NOUS,OTHER:其他
|
||||
*/
|
||||
private String informationCategoryType;
|
||||
|
||||
/**
|
||||
* information表id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 资讯标题
|
||||
*/
|
||||
private String informationTitle;
|
||||
|
||||
/**
|
||||
* 资讯编码
|
||||
*/
|
||||
private String informationCode;
|
||||
|
||||
/**
|
||||
* 资讯图文内容
|
||||
*/
|
||||
private String informationContent;
|
||||
|
||||
/**
|
||||
* 资讯点击次数
|
||||
*/
|
||||
private Integer informationClickCount;
|
||||
|
||||
/**
|
||||
* 资讯跳转路径
|
||||
*/
|
||||
private String informationJumpLink;
|
||||
|
||||
/**
|
||||
* 资讯来源,枚举类型
|
||||
*/
|
||||
private String informationSource;
|
||||
|
||||
/**
|
||||
* 资讯主缩略图地址
|
||||
*/
|
||||
private String leadThumbnailUrl;
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
package com.xinelu.applet.vo.nearbynursingstation;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/9/2 11:45
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "附近护理站信息对象", description = "nurse_station")
|
||||
public class NearbyNursingStationItem extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -7767760993863858056L;
|
||||
|
||||
/**
|
||||
* 护理站信息表id
|
||||
*/
|
||||
@ApiModelProperty(value = "护理站信息表id")
|
||||
@Excel(name = "护理站信息表id")
|
||||
private Long stationId;
|
||||
/**
|
||||
* 护理站项目id
|
||||
*/
|
||||
private Long stationItemId;
|
||||
|
||||
/**
|
||||
* 护理站项目价格id
|
||||
*/
|
||||
private Long stationItemPriceId;
|
||||
|
||||
|
||||
/**
|
||||
* 护理类型表id
|
||||
*/
|
||||
@ApiModelProperty(value = "护理类型表id")
|
||||
@Excel(name = "护理类型表id")
|
||||
private Long nurseTypeId;
|
||||
|
||||
/**
|
||||
* 护理项目编号
|
||||
*/
|
||||
@ApiModelProperty(value = "护理项目编号")
|
||||
@Excel(name = "护理项目编号")
|
||||
private String nurseItemCode;
|
||||
|
||||
/**
|
||||
* 护理项目名称
|
||||
*/
|
||||
@ApiModelProperty(value = "护理项目名称")
|
||||
@Excel(name = "护理项目名称")
|
||||
private String nurseItemName;
|
||||
|
||||
/**
|
||||
* 护理项目内容简介
|
||||
*/
|
||||
@ApiModelProperty(value = "护理项目内容简介")
|
||||
@Excel(name = "护理项目内容简介")
|
||||
private String nurseItemContent;
|
||||
|
||||
/**
|
||||
* 提前预约时长,单位小时
|
||||
*/
|
||||
@ApiModelProperty(value = "提前预约时长,单位小时")
|
||||
@Excel(name = "提前预约时长,单位小时")
|
||||
private Integer advanceAppointDuration;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Excel(name = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 服务时长和单位
|
||||
*/
|
||||
@ApiModelProperty(value = "服务时长和单位")
|
||||
@Excel(name = "服务时长和单位")
|
||||
private String serveDurationUnit;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
@ApiModelProperty(value = "价格")
|
||||
@Excel(name = "价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
|
||||
|
||||
/**
|
||||
* 护理项目图片地址
|
||||
*/
|
||||
@ApiModelProperty(value = "护理项目图片地址")
|
||||
@Excel(name = "护理项目图片地址")
|
||||
private String itemPictureUrl;
|
||||
|
||||
/**
|
||||
* 护理项目所属分类名称
|
||||
*/
|
||||
private String nurseTypeName;
|
||||
}
|
||||
@ -0,0 +1,253 @@
|
||||
package com.xinelu.applet.vo.nearbynursingstation;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.applet.vo.specialdisease.StationClassifyInfoVO;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.manage.domain.nurseclassifyinfo.NurseClassifyInfo;
|
||||
import com.xinelu.manage.domain.nursestation.NurseStation;
|
||||
import com.xinelu.manage.domain.nursestationlabel.NurseStationLabel;
|
||||
import com.xinelu.manage.domain.nursestationperson.NurseStationPerson;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/9/2 17:26
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class NearbyNursingStationVO implements Serializable {
|
||||
private static final long serialVersionUID = 5221237108334746319L;
|
||||
|
||||
/**
|
||||
* 护理站信息表id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
|
||||
/**
|
||||
* 所属区域编码
|
||||
*/
|
||||
private Long areaCode;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 护理站编号
|
||||
*/
|
||||
private String nurseStationCode;
|
||||
|
||||
/**
|
||||
* 护理站名称
|
||||
*/
|
||||
private String nurseStationName;
|
||||
|
||||
/**
|
||||
* 护理类型,多个用逗号隔开
|
||||
*/
|
||||
private String nurseStationType;
|
||||
|
||||
/**
|
||||
* 护理站简介
|
||||
*/
|
||||
private String agencyIntroduce;
|
||||
|
||||
/**
|
||||
* 护理站信息总概述
|
||||
*/
|
||||
private String nurseStationDescription;
|
||||
|
||||
/**
|
||||
* 护理站经纬(横坐标)
|
||||
*/
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 护理站纬度(纵坐标)
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 护理站地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String dutyPerson;
|
||||
|
||||
/**
|
||||
* 负责人联系电话
|
||||
*/
|
||||
private String dutyPhone;
|
||||
|
||||
/**
|
||||
* 护理站图片路径
|
||||
*/
|
||||
private String stationPictureUrl;
|
||||
|
||||
/**
|
||||
* 护理站图片路径2
|
||||
*/
|
||||
private String stationIntroducePcitureUrl;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 护理站等级,数字代表几个星
|
||||
*/
|
||||
private Integer nurseGrade;
|
||||
|
||||
/**
|
||||
* 营业概述
|
||||
*/
|
||||
private String openingHoursDescribe;
|
||||
|
||||
/**
|
||||
* 上午营业开始时间,格式:HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private LocalTime morningOpenStartTime;
|
||||
|
||||
/**
|
||||
* 上午营业结束时间,格式:HH:mm:ss
|
||||
*/
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private LocalTime morningOpenEndTime;
|
||||
|
||||
/**
|
||||
* 下午营业开始时间,格式:MM:dd
|
||||
*/
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private LocalTime afternoonOpenStartTime;
|
||||
|
||||
/**
|
||||
* 下午营业结束时间,格式:MM:dd
|
||||
*/
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
private LocalTime afternoonOpenEndTime;
|
||||
|
||||
/**
|
||||
* 护理站护理项目信息表id
|
||||
*/
|
||||
@Excel(name = "护理站护理项目信息表id")
|
||||
private Long nurseStationItemId;
|
||||
|
||||
|
||||
/**
|
||||
* 护理站护理项目信息分类表id
|
||||
*/
|
||||
private Long nurseItemClassifyInfoId;
|
||||
|
||||
|
||||
/**
|
||||
* 护理站信息与分类信息关系表id
|
||||
*/
|
||||
private Long nurseStationClassifyRelationId;
|
||||
|
||||
|
||||
/**
|
||||
* 分类信息表id
|
||||
*/
|
||||
private Long nurseClassifyInfoId;
|
||||
|
||||
/**
|
||||
* 护理站分类信息表
|
||||
*/
|
||||
private Long nurseClassId;
|
||||
|
||||
/**
|
||||
* 护理项目分类信息表
|
||||
*/
|
||||
private Long itemClassId;
|
||||
|
||||
/**
|
||||
* 精度
|
||||
*/
|
||||
private String homeLongitude;
|
||||
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
private String homeLatitude;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String classifyName;
|
||||
|
||||
/**
|
||||
* 分类所属类型
|
||||
*/
|
||||
private String classifyType;
|
||||
|
||||
/**
|
||||
* 护理站集合
|
||||
*/
|
||||
List<NurseStation> nurseStationList;
|
||||
|
||||
/**
|
||||
* 护理站项目集合
|
||||
*/
|
||||
List<NearbyNursingStationItem> nearbyNursingStationItemList;
|
||||
|
||||
/**
|
||||
* 护理站人员集合
|
||||
*/
|
||||
List<NurseStationPerson> nurseStationPersonList;
|
||||
|
||||
/**
|
||||
* 护理站标签集合
|
||||
*/
|
||||
List<NurseStationLabel> nurseStationLabelList;
|
||||
|
||||
/**
|
||||
* 护理站标签集合
|
||||
*/
|
||||
List<NurseStationClassifyVO> nurseStationClassifyList;
|
||||
|
||||
/**
|
||||
* 护理站海报
|
||||
*/
|
||||
private List<PoserInfoHomeVO> poserInfoList;
|
||||
|
||||
/**
|
||||
* 护理项目分类
|
||||
*/
|
||||
private List<NurseClassifyInfo> nurseClassifyInfoList;
|
||||
|
||||
/**
|
||||
* 营业状态
|
||||
*/
|
||||
private String businessStatus;
|
||||
|
||||
/**
|
||||
* 距离
|
||||
*/
|
||||
private String distance;
|
||||
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private Long classifyId;
|
||||
|
||||
/**
|
||||
* 护理项目分类集合信息
|
||||
*/
|
||||
private List<StationClassifyInfoVO> classifyInfoList;
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package com.xinelu.applet.vo.nearbynursingstation;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/14 15:12
|
||||
*/
|
||||
@Data
|
||||
public class NurseStationClassifyVO implements Serializable {
|
||||
private static final long serialVersionUID = -4873271982512244053L;
|
||||
|
||||
/**
|
||||
* 护理站的id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
|
||||
/**
|
||||
* 护理项目的id
|
||||
*/
|
||||
private Long nurseClassifyId;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父级分类id
|
||||
*/
|
||||
@ApiModelProperty(value = "父级分类id")
|
||||
@Excel(name = "父级分类id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
@ApiModelProperty(value = "分类编码")
|
||||
@Excel(name = "分类编码")
|
||||
private String classifyCode;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
@Excel(name = "分类名称")
|
||||
@Length(max = 30, message = "分类名称不能超过30个字符", groups = {Insert.class, Update.class})
|
||||
@NotBlank(message = "分类名称不能为空", groups = {Insert.class, Update.class})
|
||||
private String classifyName;
|
||||
|
||||
/**
|
||||
* 分类级别
|
||||
*/
|
||||
@ApiModelProperty(value = "分类级别")
|
||||
@Excel(name = "分类级别")
|
||||
private Integer classifyLevel;
|
||||
|
||||
/**
|
||||
* 分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类
|
||||
*/
|
||||
@ApiModelProperty(value = "分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类")
|
||||
@Excel(name = "分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类")
|
||||
private String classifyType;
|
||||
|
||||
/**
|
||||
* 分类图标存放地址
|
||||
*/
|
||||
@ApiModelProperty(value = "分类图标存放地址")
|
||||
@Excel(name = "分类图标存放地址")
|
||||
@NotBlank(message = "分类图标不能为空", groups = {Insert.class, Update.class})
|
||||
private String classifyPictureUrl;
|
||||
|
||||
/**
|
||||
* 分类排序
|
||||
*/
|
||||
@ApiModelProperty(value = "分类排序")
|
||||
@Excel(name = "分类排序")
|
||||
private Integer classifySort;
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.xinelu.applet.vo.nearbynursingstation;
|
||||
|
||||
import com.xinelu.applet.vo.specialdisease.StationClassifyInfoVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/9/2 17:26
|
||||
*/
|
||||
@Data
|
||||
public class NursingStationAndClassifyVO implements Serializable {
|
||||
private static final long serialVersionUID = -3856826397919702838L;
|
||||
/**
|
||||
* 护理站信息表id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
/**
|
||||
* 护理站编号
|
||||
*/
|
||||
private String nurseStationCode;
|
||||
/**
|
||||
* 护理站名称
|
||||
*/
|
||||
private String nurseStationName;
|
||||
/**
|
||||
* 护理站经纬(横坐标)
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 护理站纬度(纵坐标)
|
||||
*/
|
||||
private String latitude;
|
||||
/**
|
||||
* 护理站图片路径
|
||||
*/
|
||||
private String stationPictureUrl;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 护理站分类信息表
|
||||
*/
|
||||
private Long nurseClassId;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String classifyName;
|
||||
/**
|
||||
* 距离
|
||||
*/
|
||||
private String distance;
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private Long classifyId;
|
||||
/**
|
||||
* 护理项目分类集合信息
|
||||
*/
|
||||
private List<StationClassifyInfoVO> classifyInfoList;
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.xinelu.applet.vo.nearbynursingstation;
|
||||
|
||||
import com.xinelu.manage.domain.poserInfo.PoserInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/15 9:34
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PoserInfoHomeVO extends PoserInfo implements Serializable {
|
||||
private static final long serialVersionUID = -6010747610930803362L;
|
||||
|
||||
/**
|
||||
* 字典编码
|
||||
*/
|
||||
private Long dictCode;
|
||||
|
||||
/**
|
||||
* 字典标签
|
||||
*/
|
||||
private String dictLabel;
|
||||
|
||||
/**
|
||||
* 字典键值
|
||||
*/
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
*/
|
||||
private String dictType;
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.applet.vo.nurseclassifyinfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/9 17:03
|
||||
*/
|
||||
@Data
|
||||
public class NurseClassifyInfoList implements Serializable {
|
||||
private static final long serialVersionUID = -6921235292153222265L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父级分类id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
private String classifyCode;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String classifyName;
|
||||
|
||||
/**
|
||||
* 分类级别
|
||||
*/
|
||||
private Integer classifyLevel;
|
||||
|
||||
/**
|
||||
* 分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类
|
||||
*/
|
||||
private String classifyType;
|
||||
|
||||
/**
|
||||
* 分类图标存放地址
|
||||
*/
|
||||
private String classifyPictureUrl;
|
||||
|
||||
/**
|
||||
* 分类排序
|
||||
*/
|
||||
private Integer classifySort;
|
||||
|
||||
/**
|
||||
* 分类集合
|
||||
*/
|
||||
private List<String> typeList;
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.xinelu.applet.vo.nurseclassifyinfo;
|
||||
|
||||
import com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/9 16:40
|
||||
*/
|
||||
@Data
|
||||
public class NurseClassifyInfoVO implements Serializable {
|
||||
private static final long serialVersionUID = 5971010496497537847L;
|
||||
|
||||
/**
|
||||
* 护理站分类信息集合
|
||||
**/
|
||||
private List<NurseClassifyInfoList> nurseAgencyClassifyInfoList;
|
||||
|
||||
/**
|
||||
* 护理项目分类信息集合
|
||||
**/
|
||||
private List<NurseClassifyInfoList> nurseItemClassifyInfoList;
|
||||
|
||||
/**
|
||||
* 海报信息集合
|
||||
**/
|
||||
private List<PoserInfoHomeVO> poserInfoList;
|
||||
|
||||
/**
|
||||
* 海报图片跳转标识,新人福利:NEW_PEOPLE_WELFARE,首页:HOME_PAGE,商城:SHOPPING
|
||||
*/
|
||||
@ApiModelProperty(value = "海报图片跳转标识,新人福利:NEW_PEOPLE_WELFARE,首页:HOME_PAGE,商城:SHOPPING")
|
||||
@Excel(name = "海报图片跳转标识,新人福利:NEW_PEOPLE_WELFARE,首页:HOME_PAGE,商城:SHOPPING")
|
||||
private String jumpType;
|
||||
|
||||
/**
|
||||
* 海报模块标识,护理机构模块:NURSE_AGENCY_MODULE,护理项目模块:NURSE_ITEM_MODULE,健康咨询模块:HEALTH_CONSUTION_MODULE,首页模块:HOME_PAGE_MODULE
|
||||
*/
|
||||
@ApiModelProperty(value = "海报模块标识,护理机构模块:NURSE_AGENCY_MODULE,护理项目模块:NURSE_ITEM_MODULE,健康咨询模块:HEALTH_CONSUTION_MODULE,首页模块:HOME_PAGE_MODULE")
|
||||
@Excel(name = "海报模块标识,护理机构模块:NURSE_AGENCY_MODULE,护理项目模块:NURSE_ITEM_MODULE,健康咨询模块:HEALTH_CONSUTION_MODULE,首页模块:HOME_PAGE_MODULE")
|
||||
private String moduleType;
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.xinelu.applet.vo.specialdisease;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 护理站护理项目分类标签集合
|
||||
* @Author 纪寒
|
||||
* @Date 2023-02-16 17:48:06
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class StationClassifyInfoVO implements Serializable {
|
||||
private static final long serialVersionUID = 7932811218354122212L;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long nurseStationId;
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private Long classifyId;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String classifyName;
|
||||
}
|
||||
@ -0,0 +1,530 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.applet.mapper.nearbynursingstation.NearbyNursingStationMapper">
|
||||
|
||||
<resultMap type="NurseStationPerson" id="NurseStationPersonResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="nurseStationId" column="nurse_station_id"/>
|
||||
<result property="departmentCode" column="department_code"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="nursePersonCode" column="nurse_person_code"/>
|
||||
<result property="nursePersonName" column="nurse_person_name"/>
|
||||
<result property="nursePersonType" column="nurse_person_type"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 护理站基本信息映射结果集 -->
|
||||
<resultMap type="com.xinelu.applet.vo.nearbynursingstation.NearbyNursingStationVO" id="NurseStationInfoResult">
|
||||
<result property="nurseStationId" column="nurseStationId"/>
|
||||
<result property="areaCode" column="area_code"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="nurseStationCode" column="nurse_station_code"/>
|
||||
<result property="nurseStationName" column="nurse_station_name"/>
|
||||
<result property="nurseStationType" column="nurse_station_type"/>
|
||||
<result property="agencyIntroduce" column="agency_introduce"/>
|
||||
<result property="nurseStationDescription" column="nurse_station_description"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="dutyPerson" column="duty_person"/>
|
||||
<result property="dutyPhone" column="duty_phone"/>
|
||||
<result property="stationPictureUrl" column="station_picture_url"/>
|
||||
<result property="stationIntroducePcitureUrl" column="station_introduce_pciture_url"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="nurseGrade" column="nurse_grade"/>
|
||||
<result property="openingHoursDescribe" column="opening_hours_describe"/>
|
||||
<result property="morningOpenStartTime" column="morning_open_start_time"/>
|
||||
<result property="morningOpenEndTime" column="morning_open_end_time"/>
|
||||
<result property="afternoonOpenStartTime" column="afternoon_open_start_time"/>
|
||||
<result property="afternoonOpenEndTime" column="afternoon_open_end_time"/>
|
||||
<collection property="nurseStationLabelList" javaType="java.util.List" resultMap="NurseStationLabelInfoResult"/>
|
||||
<collection property="poserInfoList" javaType="java.util.List" resultMap="PoserInfoResult"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 护理站标签信息结果集映射 -->
|
||||
<resultMap type="NurseStationLabel" id="NurseStationLabelInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="labelCode" column="label_code"/>
|
||||
<result property="labelDescription" column="label_description"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 海报模块信息结果映射 -->
|
||||
<resultMap type="com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO" id="PoserInfoResult">
|
||||
<result property="id" column="poserInfoId"/>
|
||||
<result property="poserName" column="poser_name"/>
|
||||
<result property="posterPictureUrl" column="poster_picture_url"/>
|
||||
<result property="posterVideoUrl" column="poster_video_url"/>
|
||||
<result property="moduleType" column="module_type"/>
|
||||
<result property="jumpLink" column="jump_link"/>
|
||||
<result property="dictCode" column="dict_code"/>
|
||||
<result property="dictLabel" column="dict_label"/>
|
||||
<result property="dictValue" column="dict_value"/>
|
||||
<result property="dictType" column="dict_type"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNurseStationVo">
|
||||
select id,
|
||||
area_code,
|
||||
user_id,
|
||||
nurse_station_code,
|
||||
nurse_station_name,
|
||||
nurse_station_type,
|
||||
agency_introduce,
|
||||
nurse_station_description,
|
||||
longitude,
|
||||
latitude,
|
||||
phone,
|
||||
address,
|
||||
duty_person,
|
||||
duty_phone,
|
||||
station_picture_url,
|
||||
sort,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from nurse_station
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="getInformationCategoryList" parameterType="string"
|
||||
resultType="com.xinelu.applet.vo.nearbynursingstation.InformationCategoryVO">
|
||||
SELECT
|
||||
IFNULL( ic.information_category_name, '' ) information_category_name,
|
||||
IFNULL( ic.information_category_type, '' ) information_category_type,
|
||||
i.id,
|
||||
IFNULL( i.information_title, '' ) information_title,
|
||||
IFNULL( i.information_code, '' ) information_code,
|
||||
IFNULL( i.information_content, '' ) information_content,
|
||||
IFNULL( i.information_jump_link, '' ) information_jump_link,
|
||||
IFNULL( i.information_source, '' ) information_source,
|
||||
IFNULL( i.lead_thumbnail_url, '' ) lead_thumbnail_url
|
||||
FROM
|
||||
information i
|
||||
LEFT JOIN information_category ic ON i.information_category_id = ic.id
|
||||
<where>
|
||||
<if test="informationCategoryType != null and informationCategoryType != ''">
|
||||
and ic.information_category_type = #{informationCategoryType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY i.information_sort
|
||||
</select>
|
||||
|
||||
<select id="selectNursingStationIntroductionList" parameterType="list"
|
||||
resultType="com.xinelu.applet.vo.nearbynursingstation.NursingStationAndClassifyVO">
|
||||
SELECT
|
||||
ns.id nurseStationId,
|
||||
ns.nurse_station_code,
|
||||
ns.nurse_station_name,
|
||||
ns.longitude,
|
||||
ns.latitude,
|
||||
ns.station_picture_url,
|
||||
ns.sort,
|
||||
nci.id classifyId,
|
||||
nci.classify_name
|
||||
FROM
|
||||
nurse_station ns
|
||||
LEFT JOIN nurse_station_item nsi ON ns.id = nsi.nurse_station_id
|
||||
LEFT JOIN nurse_station_classify_relation nscr ON ns.id = nscr.nurse_station_id
|
||||
LEFT JOIN nurse_classify_info nci ON nscr.nurse_classify_id = nci.id
|
||||
<where>
|
||||
<if test="dto.nurseStationId != null ">
|
||||
and ns.id = #{dto.nurseStationId}
|
||||
</if>
|
||||
<if test="dto.nurseStationName != null and dto.nurseStationName != ''">
|
||||
and ns.nurse_station_name like concat('%', #{dto.nurseStationName}, '%')
|
||||
</if>
|
||||
<!-- 只选择了护理项目分类作为赛选条件 -->
|
||||
<if test="dto.nurseItemClassifyInfoId != null and dto.nurseClassifyInfoId == null">
|
||||
and nsi.nurse_classify_id = #{dto.nurseItemClassifyInfoId}
|
||||
</if>
|
||||
<!-- 只选择了护理站分类作为赛选条件 -->
|
||||
<if test="dto.nurseClassifyInfoId != null and dto.nurseItemClassifyInfoId == null">
|
||||
and nscr.nurse_classify_id = #{dto.nurseClassifyInfoId}
|
||||
</if>
|
||||
<!-- 护理站分类和护理项目分类同时为赛选条件 -->
|
||||
<if test="dto.nurseClassifyInfoId != null and dto.nurseItemClassifyInfoId != null">
|
||||
and nsi.nurse_classify_id = #{dto.nurseItemClassifyInfoId} and nscr.nurse_classify_id =
|
||||
#{dto.nurseClassifyInfoId}
|
||||
</if>
|
||||
<!-- 输入框名称 -->
|
||||
<if test="dto.searchName != null and dto.searchName != ''">
|
||||
and (nci.classify_name like concat(#{dto.searchName}, '%')
|
||||
or ns.nurse_station_name like concat(#{dto.searchName}, '%'))
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
ns.id
|
||||
</select>
|
||||
|
||||
<select id="getNurseItemList" parameterType="com.xinelu.applet.vo.nearbynursingstation.NearbyNursingStationItem"
|
||||
resultType="com.xinelu.applet.vo.nearbynursingstation.NearbyNursingStationItem">
|
||||
select
|
||||
nsi.nurse_item_code,
|
||||
nsi.nurse_item_name,
|
||||
nsi.nurse_item_content,
|
||||
nsi.advance_appoint_duration,
|
||||
nsi.nurse_station_id stationId,
|
||||
nsi.id stationItemId,
|
||||
nsip.id stationItemPriceId,
|
||||
nsi.nurse_type_id,
|
||||
IFNULL(nsip.serve_duration_unit, '') serve_duration_unit,
|
||||
nsip.price,
|
||||
IFNULL(nsi.item_picture_url, '') item_picture_url,
|
||||
IFNULL(nsip.description, '') description,
|
||||
IFNULL(nt.nurse_type_name, '') nurse_type_name
|
||||
from nurse_station_item nsi
|
||||
LEFT JOIN nurse_station_item_price nsip ON nsip.nurse_station_item_id = nsi.id
|
||||
LEFT JOIN nurse_type nt ON nsi.nurse_type_id = nt.id
|
||||
<where>
|
||||
<if test="nurseStationId != null ">
|
||||
and nsi.nurse_station_id = #{nurseStationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getNursePersonList" parameterType="NurseStationPerson" resultType="NurseStationPerson">
|
||||
select nurse_station_id,
|
||||
department_code,
|
||||
nurse_person_code,
|
||||
nurse_person_name,
|
||||
nurse_person_type,
|
||||
phone,
|
||||
address
|
||||
from nurse_station_person
|
||||
<where>
|
||||
<if test="nurseStationId != null ">
|
||||
and nurse_station_id = #{nurseStationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getNurseStationLabelByList" parameterType="NurseStationLabel"
|
||||
resultType="NurseStationLabel">
|
||||
SELECT
|
||||
id,
|
||||
nurse_station_id,
|
||||
user_id,
|
||||
label_code,
|
||||
label_description,
|
||||
sort,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
FROM
|
||||
nurse_station_label
|
||||
<where>
|
||||
<if test="nurseStationIdList != null and nurseStationIdList.size() > 0">
|
||||
and nurse_station_id in
|
||||
<foreach item="nurseStationId" collection="nurseStationIdList" open="(" separator="," close=")">
|
||||
#{nurseStationId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNurseTypeList" resultType="NurseType">
|
||||
SELECT id,
|
||||
user_id,
|
||||
nurse_type_code,
|
||||
nurse_type_name,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
FROM nurse_type
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="selectNursingStationIntroductionListTwo" resultMap="NurseStationInfoResult">
|
||||
SELECT
|
||||
ns.id nurseStationId,
|
||||
IFNULL(ns.area_code, '') area_code,
|
||||
IFNULL(ns.nurse_station_code, '') nurse_station_code,
|
||||
IFNULL(ns.nurse_station_name, '') nurse_station_name,
|
||||
IFNULL(ns.nurse_station_type, '') nurse_station_type,
|
||||
IFNULL(ns.agency_introduce, '') agency_introduce,
|
||||
IFNULL(ns.nurse_station_description, '') nurse_station_description,
|
||||
IFNULL(ns.longitude, '') longitude,
|
||||
IFNULL(ns.latitude, '') latitude,
|
||||
IFNULL(ns.phone, '') phone,
|
||||
IFNULL(ns.address, '') address,
|
||||
IFNULL(ns.duty_person, '') duty_person,
|
||||
IFNULL(ns.duty_phone, '') duty_phone,
|
||||
IFNULL(ns.station_picture_url, '') station_picture_url,
|
||||
IFNULL(ns.station_introduce_pciture_url, '') station_introduce_pciture_url,
|
||||
ns.sort,
|
||||
ns.nurse_grade,
|
||||
ns.opening_hours_describe,
|
||||
ns.morning_open_start_time,
|
||||
ns.morning_open_end_time,
|
||||
ns.afternoon_open_start_time,
|
||||
ns.afternoon_open_end_time,
|
||||
nsl.id,
|
||||
nsl.label_code,
|
||||
nsl.label_description,
|
||||
pi.id poserInfoId,
|
||||
pi.poster_picture_url,
|
||||
pi.poster_video_url,
|
||||
pi.module_type,
|
||||
pi.jump_link
|
||||
FROM nurse_station ns
|
||||
LEFT JOIN nurse_station_label nsl ON ns.id = nsl.nurse_station_id
|
||||
LEFT JOIN poser_info pi ON ns.id = pi.nurse_station_id
|
||||
<where>
|
||||
<if test="nurseStationId != null ">
|
||||
ns.id = #{nurseStationId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getNurseGoodsList" parameterType="Long"
|
||||
resultType="com.xinelu.applet.vo.goodinfo.GoodInfoAndItemVO">
|
||||
SELECT
|
||||
gi.id goodsInfoId,
|
||||
gi.goods_name,
|
||||
gi.goods_picture_url,
|
||||
gi.goods_unit,
|
||||
gi.goods_purpose,
|
||||
gi.sort goodSort,
|
||||
gad.goods_attribute_id,
|
||||
gs.attribute_name,
|
||||
gad.id goods_attribute_details_id,
|
||||
gad.attribute_details_name,
|
||||
gad.goods_price,
|
||||
gad.goods_stock
|
||||
FROM
|
||||
goods_info gi
|
||||
LEFT JOIN goods_attribute gs ON gi.id = gs.goods_id
|
||||
LEFT JOIN goods_attribute_details gad ON gs.id = gad.goods_attribute_id
|
||||
<where>
|
||||
<if test="nurseStationId != null ">
|
||||
and nurse_station_id = #{nurseStationId}
|
||||
</if>
|
||||
and whether_shelf = 1
|
||||
</where>
|
||||
ORDER BY gi.sort DESC
|
||||
</select>
|
||||
|
||||
<select id="getNurseStationItemList" parameterType="Long"
|
||||
resultType="com.xinelu.applet.vo.goodinfo.GoodInfoAndItemVO">
|
||||
SELECT
|
||||
ns.id AS stationId,
|
||||
nsi.id AS stationItemId,
|
||||
np.id AS stationItemPriceId,
|
||||
nsi.nurse_item_name,
|
||||
nsi.item_picture_url,
|
||||
nsi.sort AS itemSort,
|
||||
nsi.advance_appoint_duration,
|
||||
np.serve_duration_unit,
|
||||
np.price AS nurseItemPrice
|
||||
FROM nurse_station_item nsi
|
||||
LEFT JOIN nurse_station_item_price np ON np.nurse_station_item_id = nsi.id
|
||||
LEFT JOIN nurse_station ns ON ns.id = nsi.nurse_station_id
|
||||
LEFT JOIN nurse_classify_info nci ON nci.id = nsi.nurse_classify_id
|
||||
<where>
|
||||
<if test="nurseStationId != null ">
|
||||
and nsi.nurse_station_id = #{nurseStationId}
|
||||
</if>
|
||||
<if test="nurseClassifyInfoId != null ">
|
||||
and nsi.nurse_classify_id = #{nurseClassifyInfoId}
|
||||
</if>
|
||||
and nsi.shelf_status= #{shelfStatus}
|
||||
</where>
|
||||
ORDER BY nsi.sort
|
||||
</select>
|
||||
|
||||
<select id="getNurseClassifyList"
|
||||
parameterType="com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoList"
|
||||
resultType="com.xinelu.applet.vo.nurseclassifyinfo.NurseClassifyInfoList">
|
||||
select id,
|
||||
parent_id,
|
||||
classify_code,
|
||||
classify_name,
|
||||
classify_level,
|
||||
classify_type,
|
||||
classify_picture_url,
|
||||
classify_sort
|
||||
from nurse_classify_info
|
||||
<where>
|
||||
<if test="parentId != null ">
|
||||
and parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="classifyCode != null and classifyCode != ''">
|
||||
and classify_code = #{classifyCode}
|
||||
</if>
|
||||
<if test="classifyName != null and classifyName != ''">
|
||||
and classify_name like concat('%', #{classifyName}, '%')
|
||||
</if>
|
||||
<if test="classifyLevel != null ">
|
||||
and classify_level = #{classifyLevel}
|
||||
</if>
|
||||
<if test="classifyType != null and classifyType != ''">
|
||||
and classify_type = #{classifyType}
|
||||
</if>
|
||||
<if test="classifyPictureUrl != null and classifyPictureUrl != ''">
|
||||
and classify_picture_url = #{classifyPictureUrl}
|
||||
</if>
|
||||
<if test="classifySort != null ">
|
||||
and classify_sort = #{classifySort}
|
||||
</if>
|
||||
<if test="typeList != null and typeList.size() > 0">
|
||||
and classify_type in
|
||||
<foreach item="type" collection="typeList" open="(" separator="," close=")">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY classify_sort
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getNursingStationIntroductionList"
|
||||
parameterType="com.xinelu.applet.vo.nearbynursingstation.NearbyNursingStationVO"
|
||||
resultType="com.xinelu.applet.vo.nearbynursingstation.NearbyNursingStationVO">
|
||||
SELECT
|
||||
nci.classify_name,
|
||||
nci.classify_type,
|
||||
ni.id nurseStationItemId,
|
||||
ni.nurse_classify_id nurseItemClassifyInfoId,
|
||||
nsce.id nurseStationClassifyRelationId,
|
||||
nci.id nurseClassifyInfoId,
|
||||
ns.id nurseStationId,
|
||||
ns.area_code,
|
||||
ns.nurse_station_code,
|
||||
ns.nurse_station_name,
|
||||
ns.nurse_station_type,
|
||||
ns.agency_introduce,
|
||||
ns.nurse_station_description,
|
||||
ns.longitude,
|
||||
ns.latitude,
|
||||
ns.phone,
|
||||
ns.address,
|
||||
ns.duty_person,
|
||||
ns.duty_phone,
|
||||
ns.station_picture_url,
|
||||
ns.nurse_grade,
|
||||
ns.sort
|
||||
FROM nurse_station ns
|
||||
LEFT JOIN nurse_station_item ni on ni.nurse_station_id = ns.id
|
||||
LEFT JOIN nurse_station_classify_relation nsce ON ns.id = nsce.nurse_station_id
|
||||
LEFT JOIN nurse_classify_info nci ON nci.id = nsce.nurse_classify_id
|
||||
<where>
|
||||
<if test="nurseStationId != null ">
|
||||
and ns.id = #{nurseStationId}
|
||||
</if>
|
||||
<if test="nurseStationName != null and nurseStationName != '' or classifyName != null and classifyName != '' ">
|
||||
and ns.nurse_station_name like concat('%', #{nurseStationName}, '%') or nci.classify_name like
|
||||
concat('%', #{classifyName}, '%')
|
||||
</if>
|
||||
<if test="nurseItemClassifyInfoId != null ">
|
||||
and ni.nurse_classify_id = #{nurseItemClassifyInfoId}
|
||||
</if>
|
||||
<if test="nurseClassifyInfoId != null ">
|
||||
and nci.id = #{nurseClassifyInfoId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
ns.id
|
||||
order by ns.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getNurseStationClassifyByList"
|
||||
parameterType="com.xinelu.applet.vo.nearbynursingstation.NurseStationClassifyVO"
|
||||
resultType="com.xinelu.applet.vo.nearbynursingstation.NurseStationClassifyVO">
|
||||
SELECT
|
||||
nsi.nurse_station_id,
|
||||
nsi.nurse_classify_id,
|
||||
nci.id,
|
||||
nci.parent_id,
|
||||
nci.classify_code,
|
||||
nci.classify_name,
|
||||
nci.classify_level,
|
||||
nci.classify_type,
|
||||
nci.classify_picture_url,
|
||||
nci.classify_sort
|
||||
FROM
|
||||
nurse_classify_info nci
|
||||
LEFT JOIN nurse_station_item nsi ON nsi.nurse_classify_id = nci.id
|
||||
<where>
|
||||
<if test="nurseStationIdList != null and nurseStationIdList.size() > 0">
|
||||
and nsi.nurse_station_id in
|
||||
<foreach item="nurseStationId" collection="nurseStationIdList" open="(" separator="," close=")">
|
||||
#{nurseStationId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getHomePagePoserInfoList" parameterType="com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO"
|
||||
resultType="com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO">
|
||||
SELECT
|
||||
pi.id,
|
||||
pi.poser_name,
|
||||
pi.nurse_station_id,
|
||||
pi.nurse_item_id,
|
||||
pi.poster_introduce,
|
||||
pi.poster_picture_url,
|
||||
pi.poster_video_url,
|
||||
pi.module_type,
|
||||
pi.poser_sort,
|
||||
pi.jump_link,
|
||||
pi.jump_type,
|
||||
pi.jump_dict_id,
|
||||
sdd.dict_code,
|
||||
sdd.dict_label,
|
||||
sdd.dict_value,
|
||||
sdd.dict_type
|
||||
FROM
|
||||
poser_info pi
|
||||
left join sys_dict_data sdd on sdd.dict_code = pi.jump_dict_id
|
||||
<where>
|
||||
<if test="moduleType != null and moduleType != ''">
|
||||
and pi.module_type = #{moduleType}
|
||||
</if>
|
||||
<if test="nurseStationId != null ">
|
||||
and pi.nurse_station_id = #{nurseStationId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY pi.poser_sort
|
||||
</select>
|
||||
|
||||
<select id="selectNurseClassifyByClassifyType"
|
||||
resultType="com.xinelu.manage.domain.nurseclassifyinfo.NurseClassifyInfo">
|
||||
select id,
|
||||
classify_code,
|
||||
classify_name,
|
||||
classify_type,
|
||||
classify_sort
|
||||
from nurse_classify_info
|
||||
where classify_type = #{classifyType}
|
||||
</select>
|
||||
|
||||
<select id="getStationClassifyInfoList" parameterType="long"
|
||||
resultType="com.xinelu.applet.vo.specialdisease.StationClassifyInfoVO">
|
||||
SELECT
|
||||
nsi.nurse_station_id,
|
||||
nsi.nurse_classify_id classifyId,
|
||||
nci.classify_name classifyName
|
||||
FROM
|
||||
nurse_classify_info nci
|
||||
INNER JOIN nurse_station_item nsi ON nci.id = nsi.nurse_classify_id
|
||||
WHERE
|
||||
nsi.nurse_station_id in
|
||||
<foreach item="stationId" collection="nurseStationIdList" open="(" separator="," close=")">
|
||||
#{stationId}
|
||||
</foreach>
|
||||
GROUP BY nsi.nurse_station_id, nci.id
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,119 @@
|
||||
package com.xinelu.manage.domain.receiveAddressInfo;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 收货人地址信息对象 receive_address_info
|
||||
*
|
||||
* @author xinyilu
|
||||
* @date 2022-10-18
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "收货人地址信息对象", description = "receive_address_info")
|
||||
public class ReceiveAddressInfo extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -3006189332927896126L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@ApiModelProperty(value = "会员id")
|
||||
@Excel(name = "会员id")
|
||||
@NotNull(message = "会员id为空", groups = {Insert.class, Update.class})
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
@ApiModelProperty(value = "微信openid")
|
||||
@Excel(name = "微信openid")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信unionid
|
||||
*/
|
||||
@ApiModelProperty(value = "微信unionid")
|
||||
@Excel(name = "微信unionid")
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 收货人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "收货人名称")
|
||||
@Excel(name = "收货人名称")
|
||||
@NotBlank(message = "收货人名称为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 30, message = "收货人名称不能超过30位", groups = {Insert.class, Update.class})
|
||||
private String receiveName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
@Excel(name = "联系电话")
|
||||
@NotBlank(message = "联系电话不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 11, message = "联系电话不能超过11位", groups = {Insert.class, Update.class})
|
||||
private String receivePhone;
|
||||
|
||||
/**
|
||||
* 收货人地址
|
||||
*/
|
||||
@ApiModelProperty(value = "收货人地址")
|
||||
@Excel(name = "收货人地址")
|
||||
@NotBlank(message = "收货人地址不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 50, message = "收货人地址不能超过50位", groups = {Insert.class, Update.class})
|
||||
private String receiveAddress;
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
@ApiModelProperty(value = "区域编码")
|
||||
@Excel(name = "区域编码")
|
||||
@NotBlank(message = "请选择地址信息!", groups = {Insert.class, Update.class})
|
||||
@Length(max = 20, message = "区域编码不能超过20位", groups = {Insert.class, Update.class})
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 默认地址标识,0:否,1:是
|
||||
*/
|
||||
private Integer defaultAddressFlag;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("patientId", getPatientId())
|
||||
.append("openid", getOpenid())
|
||||
.append("unionid", getUnionid())
|
||||
.append("receiveName", getReceiveName())
|
||||
.append("receivePhone", getReceivePhone())
|
||||
.append("receiveAddress", getReceiveAddress())
|
||||
.append("areaCode", getAreaCode())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.system.mapper;
|
||||
|
||||
import com.xinelu.system.domain.SysConfig;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -65,4 +66,12 @@ public interface SysConfigMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteConfigByIds(Long[] configIds);
|
||||
|
||||
/**
|
||||
* 根据配置键查询配置信息
|
||||
*
|
||||
* @param keyList 配置键集合
|
||||
* @return 配置集合信息
|
||||
*/
|
||||
List<SysConfig> getSystemConfigByKeys(@Param("keyList") List<String> keyList);
|
||||
}
|
||||
|
||||
@ -109,4 +109,15 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getSystemConfigByKeys" resultType="sysConfig">
|
||||
<include refid="selectConfigVo"/>
|
||||
<if test="keyList != null and keyList.size() > 0">
|
||||
<where>
|
||||
config_key in
|
||||
<foreach collection="keyList" item="keys" open="(" separator="," close=")">
|
||||
#{keys}
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user