Merge remote-tracking branch 'origin/jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支
This commit is contained in:
commit
50ddc45c9f
@ -144,17 +144,14 @@ public class ResidentServiceApplyController extends BaseController {
|
||||
|
||||
@ApiOperation("服务评价列表")
|
||||
@GetMapping("/evaluateRecord/{identity}")
|
||||
public R<List<OrderEvaluateVo>> performanceEvaluateRecord(@PathVariable String identity) {
|
||||
PatientInfo patientInfo = residentPatientInfoService.getByCardNo(identity);
|
||||
if (patientInfo != null && !StringUtils.isBlank(patientInfo.getCityCode())) {
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(patientInfo.getCityCode()) + "/performance/recordV2/" + identity, null, String.class);
|
||||
public R<List<OrderEvaluateVo>> performanceEvaluateRecord(@PathVariable String identity, @RequestHeader("region") String region) {
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/performance/recordV2/" + identity, null, String.class);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (jsonObject.getInteger("code") == 1) {
|
||||
if (jsonObject.get("data") != null && jsonObject.getJSONArray("data").size() > 0) {
|
||||
return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(OrderEvaluateVo.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,8 +249,8 @@ xss:
|
||||
|
||||
# 家医配置
|
||||
fd:
|
||||
dz: http://8.131.93.145:54089/fd/mp
|
||||
dy: http://8.131.93.145:54089/fd/mp
|
||||
dz: http://8.131.93.145:54007/fd/mp
|
||||
dy: http://8.131.93.145:54008/fd/mp
|
||||
# 签约附近的机构多少公里内 <=0时不限制
|
||||
distance: 0
|
||||
|
||||
@ -281,15 +281,15 @@ applet-page-config:
|
||||
# 首页跳转路径
|
||||
page-url: pages/startup/startup
|
||||
# 个人中心-优惠券页面跳转路径
|
||||
coupon-page-url: pages/coupon/coupon
|
||||
coupon-page-url: pagesB/coupon/coupon
|
||||
# 商品订单页面跳转路径
|
||||
goods-order-page-url: pages/CommodityOrder/CommodityOrder
|
||||
goods-order-page-url: pagesB/CommodityOrder/CommodityOrder
|
||||
# 预约订单页面跳转路径
|
||||
appoint-order-page-url: pages/Nursingstationserviceorder/Nursingstationserviceorder
|
||||
appoint-order-page-url: pagesB/Nursingstationserviceorder/Nursingstationserviceorder
|
||||
# 积分页面跳转路径
|
||||
integral-page-url: pages/integral/integral
|
||||
integral-page-url: pagesB/integral/integral
|
||||
# 护理结构详情页面跳转路径
|
||||
nursestation-details-page-url: pages/nursestation/nursestation
|
||||
nursestation-details-page-url: pagesB/nursestation/nursestation
|
||||
|
||||
# 新医路微信商户号配置参数
|
||||
xyl-we-chat-config:
|
||||
|
||||
@ -212,7 +212,7 @@ public class Constants {
|
||||
/**
|
||||
* 微信小程序ACCESS_TOKEN前缀
|
||||
*/
|
||||
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN";
|
||||
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN_XYL_";
|
||||
|
||||
/**
|
||||
* 护理员微信小程序ACCESS_TOKEN前缀
|
||||
|
||||
@ -118,6 +118,11 @@ public class SysUser extends BaseEntity {
|
||||
*/
|
||||
private Long hospitalPersonId;
|
||||
|
||||
/**
|
||||
* 医院主键
|
||||
*/
|
||||
private Long hospitalId;
|
||||
|
||||
/**
|
||||
* 部门对象
|
||||
*/
|
||||
@ -347,6 +352,14 @@ public class SysUser extends BaseEntity {
|
||||
this.hospitalPersonId = hospitalPersonId;
|
||||
}
|
||||
|
||||
public Long getHospitalId() {
|
||||
return hospitalId;
|
||||
}
|
||||
|
||||
public void setHospitalId(Long hospitalId) {
|
||||
this.hospitalId = hospitalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
||||
@ -39,20 +39,10 @@ import java.util.concurrent.TimeUnit;
|
||||
@Component
|
||||
public class AppletChatUtil {
|
||||
|
||||
private static RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
private static AppletChatConfig appletChatConfig;
|
||||
|
||||
@Resource
|
||||
public void redisTemplate(RedisTemplate<String, Object> redisTemplate) {
|
||||
AppletChatUtil.redisTemplate = redisTemplate;
|
||||
}
|
||||
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
@Resource
|
||||
public void appletChatConfig(AppletChatConfig appletChatConfig) {
|
||||
AppletChatUtil.appletChatConfig = appletChatConfig;
|
||||
}
|
||||
|
||||
private AppletChatConfig appletChatConfig;
|
||||
|
||||
/**
|
||||
* 返回成功状态码
|
||||
@ -164,7 +154,7 @@ public class AppletChatUtil {
|
||||
* @param filePathWeChatCodeUrl 文件保存路径
|
||||
* @return java.lang.String 二维码地址
|
||||
*/
|
||||
public static String createAppletCode(Long weChatCodeId, boolean failFlag, String fileName, String appletPageUrl, String filePathWeChatCodeUrl) {
|
||||
public String createAppletCode(Long weChatCodeId, boolean failFlag, String fileName, String appletPageUrl, String filePathWeChatCodeUrl) {
|
||||
if (BooleanUtils.isTrue(failFlag)) {
|
||||
//删除原有Redis中的key值
|
||||
String accessTokenKey = Constants.NURSE_STATION_APPLET_ACCESS_TOKEN + "accessToken";
|
||||
@ -250,7 +240,7 @@ public class AppletChatUtil {
|
||||
*
|
||||
* @return 小程序的AccessToken
|
||||
*/
|
||||
public static String getAppletAccessToken() {
|
||||
public String getAppletAccessToken() {
|
||||
String accessToken;
|
||||
String accessTokenKey = Constants.NURSE_STATION_APPLET_ACCESS_TOKEN + "accessToken";
|
||||
//从Redis中取出accessToken
|
||||
|
||||
@ -239,8 +239,6 @@ public class PatientInfoBody extends BaseEntity {
|
||||
/**
|
||||
* 绑定城市(1:德州 2:东营)
|
||||
*/
|
||||
@NotNull(message = "绑定城市不能为空")
|
||||
@NotBlank(message = "绑定城市不能为空")
|
||||
@ApiModelProperty(value = "绑定城市(1:德州 2:东营)")
|
||||
private String cityCode;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.familydoctor.applet.pojo.body;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.familydoctor.applet.pojo.dto.ResidentServiceFormApplyDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -47,19 +48,20 @@ public class ResidentServiceApplyBody extends ResidentServiceFormApplyDto{
|
||||
* 预约时间
|
||||
*/
|
||||
@ApiModelProperty(value = "预约时间", required = true)
|
||||
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date bookingTime;
|
||||
|
||||
/**
|
||||
* 预约机构编号
|
||||
*/
|
||||
@ApiModelProperty(value = "预约机构编号", required = true)
|
||||
private String orgNo;
|
||||
private String hospitalId;
|
||||
|
||||
/**
|
||||
* 预约机构名称
|
||||
*/
|
||||
@ApiModelProperty(value = "预约机构名称", required = true)
|
||||
private String orgName;
|
||||
private String hospitalName;
|
||||
|
||||
/**
|
||||
* 预约团队编号
|
||||
|
||||
@ -4,36 +4,39 @@ import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.xinelu.common.config.AppletChatConfig;
|
||||
import com.xinelu.common.entity.AppletPhoneVO;
|
||||
import com.xinelu.common.enums.CouponReceiveTypeEnum;
|
||||
import com.xinelu.common.enums.CouponUseStatusEnum;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
import com.xinelu.common.utils.http.HttpService;
|
||||
import com.xinelu.common.utils.http.HttpUtils;
|
||||
import com.xinelu.common.utils.http.SslUtils;
|
||||
import com.xinelu.common.utils.spring.SpringUtils;
|
||||
import com.xinelu.common.utils.uuid.IdUtils;
|
||||
import com.xinelu.familydoctor.applet.mapper.ResidentPatientInfoMapper;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.PatientInfoBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.PatientInfoQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.vo.SignInfoDetailVo;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService;
|
||||
import com.xinelu.familydoctor.applet.utils.AppletAccessTokenUtils;
|
||||
import com.xinelu.manage.domain.coupon.Coupon;
|
||||
import com.xinelu.manage.domain.patientcouponreceive.PatientCouponReceive;
|
||||
import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo;
|
||||
import com.xinelu.manage.mapper.coupon.CouponMapper;
|
||||
import com.xinelu.manage.mapper.patientcouponreceive.PatientCouponReceiveMapper;
|
||||
import com.xinelu.manage.mapper.receiveAddressInfo.ReceiveAddressInfoMapper;
|
||||
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -58,6 +61,10 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
@Resource
|
||||
private ReceiveAddressInfoMapper receiveAddressInfoMapper;
|
||||
@Resource
|
||||
private PatientCouponReceiveMapper patientCouponReceiveMapper;
|
||||
@Resource
|
||||
private CouponMapper couponMapper;
|
||||
|
||||
/**
|
||||
* @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo
|
||||
@ -192,10 +199,9 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
} else {
|
||||
patientInfo.setDisease("0");
|
||||
}
|
||||
patientInfo.setLoginFlag(Long.valueOf(1));
|
||||
patientInfo.setLoginFlag(1L);
|
||||
patientInfo.setBindOpenid(body.getOpenid());
|
||||
updatePatientInfo(patientInfo);
|
||||
|
||||
// 新增
|
||||
} else {
|
||||
patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo());
|
||||
@ -216,7 +222,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
patientInfo.setUpdateBy(body.getCardNo());
|
||||
patientInfo.setHeadPictureUrl(body.getHeadPictureUrl());
|
||||
patientInfo.setDelFlag(0);
|
||||
patientInfo.setLoginFlag(Long.valueOf(1));
|
||||
patientInfo.setLoginFlag(1L);
|
||||
if (body.getDiseaseList() != null) {
|
||||
patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
|
||||
} else {
|
||||
@ -229,6 +235,10 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
}
|
||||
// 注册
|
||||
} else {
|
||||
List<PatientInfo> list = residentPatientInfoMapper.getList(body.getOpenid(), null);
|
||||
if(list != null && list.size() >= 8) {
|
||||
throw new ServiceException("同一个微信最多绑定8个居民");
|
||||
}
|
||||
PatientInfo entity = new PatientInfo();
|
||||
BeanUtils.copyBeanProp(entity, body);
|
||||
// 已绑定openid,将该值置空
|
||||
@ -245,7 +255,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
entity.setIsChecked("0");
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreateBy(body.getCardNo());
|
||||
entity.setLoginFlag(Long.valueOf(1));
|
||||
entity.setLoginFlag(1L);
|
||||
entity.setDelFlag(0);
|
||||
entity.setBindOpenid(body.getOpenid());
|
||||
residentPatientInfoMapper.insertPatientInfo(entity);
|
||||
@ -264,6 +274,15 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
}
|
||||
this.insertReceiveAddress(patientInfo);
|
||||
}
|
||||
PatientInfo patient = residentPatientInfoMapper.getLoginByOpenId(body.getOpenid());
|
||||
//判断是否是第一次完善,如果是则发放新人优惠券信息
|
||||
PatientCouponReceive patientCouponReceive = new PatientCouponReceive();
|
||||
patientCouponReceive.setReceiveSource(CouponReceiveTypeEnum.NEW_PEOPLE_WELFARE.getInfo());
|
||||
patientCouponReceive.setPatientId(patient.getId());
|
||||
int couponReceiveCount = patientCouponReceiveMapper.getCouponReceiveByReceiveSource(patient.getId(), CouponReceiveTypeEnum.NEW_PEOPLE_WELFARE.getInfo());
|
||||
if (Objects.nonNull(patient.getLoginFlag()) && patient.getLoginFlag() ==1 && couponReceiveCount <= 0) {
|
||||
issueCoupons(patient);
|
||||
}
|
||||
}
|
||||
|
||||
/** 新增收货人地址信息 */
|
||||
@ -450,4 +469,50 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
HashMap.put("cityCode", cityCode);
|
||||
return HashMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发放优惠券方法胡
|
||||
*
|
||||
* @param patient 会员信息
|
||||
*/
|
||||
public void issueCoupons(PatientInfo patient ) {
|
||||
PatientCouponReceiveInfoVO receiveInfoVO = new PatientCouponReceiveInfoVO();
|
||||
//查询新人福利的优惠券列表信息
|
||||
Coupon coupon = new Coupon();
|
||||
Long patientId = patient.getId();
|
||||
coupon.setReceiveType(CouponReceiveTypeEnum.NEW_PEOPLE_WELFARE.getInfo());
|
||||
List<Coupon> couponList = couponMapper.selectCouponList(coupon);
|
||||
if (CollectionUtils.isEmpty(couponList)) {
|
||||
return ;
|
||||
}
|
||||
//组装优惠券信息
|
||||
List<PatientCouponReceive> couponReceiveList = Lists.newArrayList();
|
||||
for (Coupon couponInfo : couponList) {
|
||||
if (Objects.isNull(couponInfo.getId())) {
|
||||
continue;
|
||||
}
|
||||
PatientCouponReceive couponReceive = new PatientCouponReceive();
|
||||
couponReceive.setPatientId(patientId);
|
||||
couponReceive.setCouponId(couponInfo.getId());
|
||||
couponReceive.setReceiveSource(CouponReceiveTypeEnum.NEW_PEOPLE_WELFARE.getInfo());
|
||||
couponReceive.setUseStatus(CouponUseStatusEnum.WAIT_RECEIVE.getInfo());
|
||||
couponReceive.setExpirationStartTime(LocalDateTime.now());
|
||||
couponReceive.setExpirationEndTime(LocalDate.now().plusDays(Objects.isNull(couponInfo.getCouponReductionDays()) ? 0 : couponInfo.getCouponReductionDays()).atTime(23, 59, 59));
|
||||
couponReceive.setReceiveTime(LocalDateTime.now());
|
||||
couponReceive.setCouponReductionDays(Objects.isNull(couponInfo.getCouponReductionDays()) ? 0 : couponInfo.getCouponReductionDays());
|
||||
couponReceive.setCreateTime(LocalDateTime.now());
|
||||
couponReceive.setCouponTitle(StringUtils.isBlank(couponInfo.getCouponTitle()) ? "" : couponInfo.getCouponTitle());
|
||||
couponReceive.setCouponPrice(Objects.isNull(couponInfo.getCouponPrice()) ? BigDecimal.ZERO : couponInfo.getCouponPrice());
|
||||
couponReceive.setCouponConsumePrice(Objects.isNull(couponInfo.getCouponConsumePrice()) ? BigDecimal.ZERO : couponInfo.getCouponConsumePrice());
|
||||
couponReceive.setCouponDescription(StringUtils.isBlank(couponInfo.getCouponDescription()) ? "" : couponInfo.getCouponDescription());
|
||||
couponReceiveList.add(couponReceive);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(couponReceiveList)) {
|
||||
int insertCount = patientCouponReceiveMapper.insertBatchPatientReceive(couponReceiveList);
|
||||
if (insertCount <= 0) {
|
||||
log.error("完善用户信息接口-新人送券执行失败,输入参数[{}]", couponReceiveList);
|
||||
throw new ServiceException("完善用户信息失败,请联系管理员!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,6 +88,8 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
// 审批状态0:待批准 1:已同意 2:已拒绝
|
||||
entity.setApprovalStatus("0");
|
||||
entity.setBookingNo(IdUtils.simpleUUID());
|
||||
entity.setOrgNo(body.getHospitalId());
|
||||
entity.setOrgName(body.getHospitalName());
|
||||
if(StringUtils.isBlank(entity.getServiceWay())) {
|
||||
entity.setServiceWay("2");
|
||||
}
|
||||
@ -101,7 +103,7 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
messagePushBody.setBusType("10");
|
||||
messagePushBody.setOpenid(patientInfo.getBindOpenid());
|
||||
messagePushBody.setReceiveName(patientInfo.getPatientName());
|
||||
messagePushBody.setText1(body.getOrgName());
|
||||
messagePushBody.setText1(body.getHospitalName());
|
||||
messagePushBody.setText2(body.getFormName().length() >= 20? body.getFormName().substring(0,17) + "...": body.getFormName());
|
||||
messagePushBody.setText3(body.getFormName());
|
||||
messagePushBody.setSendTitle("服务预约");
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.framework.aspectj;
|
||||
|
||||
import com.xinelu.common.annotation.DataScope;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import com.xinelu.common.core.domain.entity.SysRole;
|
||||
import com.xinelu.common.core.domain.entity.SysUser;
|
||||
@ -86,20 +87,21 @@ public class DataScopeAspect {
|
||||
break;
|
||||
} else if (DATA_SCOPE_CUSTOM.equals(dataScope)) {
|
||||
sqlString.append(StringUtils.format(
|
||||
" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias,
|
||||
" OR {}.hospital_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias,
|
||||
role.getRoleId()));
|
||||
} else if (DATA_SCOPE_DEPT.equals(dataScope)) {
|
||||
sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
|
||||
sqlString.append(StringUtils.format(" OR {}.hospital_id = {} ", deptAlias, user.getHospitalId()));
|
||||
} else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) {
|
||||
sqlString.append(StringUtils.format(
|
||||
" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
|
||||
deptAlias, user.getDeptId(), user.getDeptId()));
|
||||
//sqlString.append(StringUtils.format(
|
||||
// " OR {}.hospital_id IN ( SELECT hospital_id FROM hospital_info WHERE hospital_id = {} or find_in_set( {} , ancestors ) )",
|
||||
// deptAlias, user.getHospitalId(), user.getHospitalId()));
|
||||
sqlString.append(StringUtils.format(" OR {}.hospital_id = {} ", deptAlias, user.getHospitalId()));
|
||||
} else if (DATA_SCOPE_SELF.equals(dataScope)) {
|
||||
if (StringUtils.isNotBlank(userAlias)) {
|
||||
sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId()));
|
||||
sqlString.append(StringUtils.format(" OR {}.doctor_id = {} ", userAlias, user.getUserId()));
|
||||
} else {
|
||||
// 数据权限为仅本人且没有userAlias别名不查询任何数据
|
||||
sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
||||
sqlString.append(StringUtils.format(" OR {}.hospital_id = 0 ", deptAlias));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -110,6 +112,10 @@ public class DataScopeAspect {
|
||||
BaseEntity baseEntity = (BaseEntity) params;
|
||||
baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
|
||||
}
|
||||
if (StringUtils.isNotNull(params) && params instanceof BaseDomain) {
|
||||
BaseDomain baseDomain = (BaseDomain) params;
|
||||
baseDomain.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,17 @@ package com.xinelu.applet.controller.appletscreeningproject;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.manage.domain.screeningproject.ScreeningProject;
|
||||
import com.xinelu.manage.service.screeningproject.IScreeningProjectService;
|
||||
import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO;
|
||||
import com.xinelu.manage.service.screeningrecord.IScreeningRecordService;
|
||||
import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -22,12 +28,29 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Api(tags = "项目控制器-小程序")
|
||||
public class AppletScreeningProjectController extends BaseController {
|
||||
@Resource
|
||||
private IScreeningProjectService projectService;
|
||||
private IScreeningRecordService screeningRecordService;
|
||||
|
||||
@ApiOperation("筛查项目列表")
|
||||
@GetMapping("list")
|
||||
public R<List<ScreeningProject>> list(ScreeningProject project) {
|
||||
List<ScreeningProject> list = projectService.findList(project);
|
||||
return R.ok(list);
|
||||
public R<List<ScreeningProject>> list(ScreeningRecordDTO query) {
|
||||
// 查询居民预约过的项目
|
||||
List<ScreeningProject> projectList = new ArrayList<>();
|
||||
|
||||
query.setScreeningType("1");
|
||||
List<ScreeningRecordVo> recordList = screeningRecordService.list(query);
|
||||
if (CollectionUtils.isNotEmpty(recordList)) {
|
||||
// 按照项目进行分组
|
||||
Map<String, List<ScreeningRecordVo>> groupByProject = recordList.stream()
|
||||
.collect(Collectors.groupingBy(ScreeningRecordVo::getProjectId));
|
||||
for (String projectId : groupByProject.keySet()) {
|
||||
ScreeningProject project = new ScreeningProject();
|
||||
project.setProjectId(projectId);
|
||||
project.setProjectName(groupByProject.get(projectId).get(0).getProjectName());
|
||||
project.setHospitalId(groupByProject.get(projectId).get(0).getHospitalId());
|
||||
project.setHospitalName(groupByProject.get(projectId).get(0).getHospitalName());
|
||||
projectList.add(project);
|
||||
}
|
||||
}
|
||||
return R.ok(projectList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,13 +20,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
@ -102,13 +96,14 @@ public class ChatRecordController extends BaseController {
|
||||
|
||||
@ApiOperation(value = "获取指定类型的消息记录", notes = "1:通知公告 2:健康推送 4:消息通知")
|
||||
@GetMapping("/getMegList")
|
||||
public TableDataInfo getMegList(MessageSearchDto messageDto) {
|
||||
public TableDataInfo getMegList(MessageSearchDto messageDto, @RequestHeader("region") String region) {
|
||||
if (messageDto.getPatientId() == null) {
|
||||
throw new ServiceException("居民业务主键不能为空");
|
||||
}
|
||||
if (StringUtils.isBlank(messageDto.getMessageCategory())) {
|
||||
throw new ServiceException("消息类型不能为空");
|
||||
}
|
||||
messageDto.setCityCode(region);
|
||||
startPage();
|
||||
return getDataTable(chatRecordService.getMegList(messageDto));
|
||||
}
|
||||
|
||||
@ -9,12 +9,10 @@ import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.custominterface.Query;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@ -91,11 +89,11 @@ public class NurseAppLoginController extends BaseController {
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/appPersonal")
|
||||
public AjaxResult nurseAppPersonal(Long patientId) {
|
||||
public AjaxResult nurseAppPersonal(Long patientId, @RequestHeader("region") String region) {
|
||||
if (Objects.isNull(patientId)) {
|
||||
return AjaxResult.error("用户信息不能为空!");
|
||||
}
|
||||
return nurseAppLoginService.nurseAppPersonal(patientId);
|
||||
return nurseAppLoginService.nurseAppPersonal(patientId, region);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -44,7 +44,7 @@ public interface NurseAppLoginService {
|
||||
* @param patientId 会员id
|
||||
* @return 结果
|
||||
*/
|
||||
AjaxResult nurseAppPersonal(Long patientId);
|
||||
AjaxResult nurseAppPersonal(Long patientId, String region);
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
|
||||
@ -180,7 +180,7 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult nurseAppPersonal(Long patientId) {
|
||||
public AjaxResult nurseAppPersonal(Long patientId, String region) {
|
||||
PatientAndDiseaseVO patientDisease = nurseAppLoginMapper.getPatientDiseaseByPatientId(patientId);
|
||||
if (Objects.nonNull(patientDisease) && Objects.nonNull(patientDisease.getBirthDate())) {
|
||||
patientDisease.setAge(AgeUtil.getAgeMonth(String.valueOf(patientDisease.getBirthDate())));
|
||||
@ -205,6 +205,7 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
|
||||
} else {
|
||||
patientDisease.setAreaName("");
|
||||
}
|
||||
patientDisease.setCityCode(region);
|
||||
// 更新签约编号
|
||||
setSignInfo(patientDisease);
|
||||
//查询所有商品订单
|
||||
|
||||
@ -162,11 +162,17 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
||||
if (CollectionUtils.isNotEmpty(goodsOrderAndConsultationOrder)) {
|
||||
patientOrders.addAll(goodsOrderAndConsultationOrder);
|
||||
}
|
||||
PatientOrderVO resultHttp = new PatientOrderVO();
|
||||
if (Objects.nonNull(nurseOrder.getRegion())) {
|
||||
try {
|
||||
String result = HttpUtils.sendGet(SpringUtils.getFdUrl(nurseOrder.getRegion()) + "/performance/recordV2/" + nurseOrder.getCardNo());
|
||||
if (StringUtils.isBlank(result)) {
|
||||
log.info("获取家医小程序用户订单信息失败,result = " + result);
|
||||
}
|
||||
PatientOrderVO resultHttp = JSON.parseObject(result, PatientOrderVO.class);
|
||||
resultHttp = JSON.parseObject(result, PatientOrderVO.class);
|
||||
} catch (Exception e) {
|
||||
log.error("查询家医履约评价记录异常: " + e.getMessage());
|
||||
}
|
||||
if (Objects.nonNull(resultHttp) && CollectionUtils.isNotEmpty(resultHttp.getData()) && Objects.nonNull(resultHttp.getData().get(0).getOrderNo())) {
|
||||
List<PatientOrder> data = resultHttp.getData();
|
||||
data.forEach(item -> item.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo()));
|
||||
@ -186,6 +192,7 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
||||
patientOrders.addAll(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setTotal(new PageInfo(patientOrders).getTotal());
|
||||
if (CollectionUtils.isNotEmpty(patientOrders)) {
|
||||
|
||||
@ -6,7 +6,6 @@ import com.xinelu.applet.dto.patientcenter.PatientCenterCouponDTO;
|
||||
import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper;
|
||||
import com.xinelu.applet.mapper.nursingstationgoods.NursingStationGoodsMapper;
|
||||
import com.xinelu.applet.mapper.patientcenter.PatientCenterMapper;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.applet.service.patientcenter.PatientCenterService;
|
||||
import com.xinelu.applet.vo.coupon.CouponVO;
|
||||
import com.xinelu.applet.vo.patientcenter.PatientCenterCouponVO;
|
||||
@ -43,6 +42,7 @@ import com.xinelu.manage.mapper.patientintegralchange.PatientIntegralChangeMappe
|
||||
import com.xinelu.manage.mapper.patientsignininfo.PatientSignInInfoMapper;
|
||||
import com.xinelu.manage.mapper.subscribemessagerecord.SubscribeMessageRecordMapper;
|
||||
import com.xinelu.manage.mapper.systemsettingsinfo.SystemSettingsInfoMapper;
|
||||
import com.xinelu.manage.service.messagepush.MessagePushService;
|
||||
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -108,7 +108,8 @@ public class PatientCenterServiceImpl implements PatientCenterService {
|
||||
private SubscribeMessageRecordMapper subscribeMessageRecordMapper;
|
||||
@Resource
|
||||
private MessagePushService messagePushService;
|
||||
|
||||
@Resource
|
||||
private AppletChatUtil appletChatUtil;
|
||||
/**
|
||||
* 用户第一次签到次数
|
||||
*/
|
||||
@ -262,10 +263,10 @@ public class PatientCenterServiceImpl implements PatientCenterService {
|
||||
String appletPageUrl = appletPageConfig.getPageUrl();
|
||||
//邀请人二维码存放路径
|
||||
String filePathWeChatCodeUrl = xinYiLuConfig.getPersonalWeChatCodeUrl();
|
||||
String appletCodePicture = AppletChatUtil.createAppletCode(inviteId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
String appletCodePicture = appletChatUtil.createAppletCode(inviteId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
|
||||
//第一次调用获取小程序二维码信息失败,重新递归调用一次,第二次失败直接返回提示信息
|
||||
appletCodePicture = AppletChatUtil.createAppletCode(inviteId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
appletCodePicture = appletChatUtil.createAppletCode(inviteId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
|
||||
return AjaxResult.error("获取小程序二维码信息失败,请联系管理员!");
|
||||
}
|
||||
|
||||
@ -54,6 +54,12 @@ public class HospitalInfoController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:hospital:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HospitalInfo hospitalInfo) {
|
||||
if (!getLoginUser().getUser().isAdmin()) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
hospitalInfo.setId(hospitalPersonInfo.getHospitalId());
|
||||
}
|
||||
}
|
||||
startPage();
|
||||
List<HospitalInfo> list = hospitalInfoService.selectHospitalInfoList(hospitalInfo);
|
||||
return getDataTable(list);
|
||||
@ -65,7 +71,6 @@ public class HospitalInfoController extends BaseController {
|
||||
@ApiOperation("查询医院信息管理列表")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult getList(HospitalInfo hospitalInfo) {
|
||||
// TODO 根据用户权限获取医院列表,机构管理员只能看自己机构,超级管理员查看所有
|
||||
if (!getLoginUser().getUser().isAdmin()) {
|
||||
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId());
|
||||
if (hospitalPersonInfo != null) {
|
||||
|
||||
@ -15,13 +15,18 @@ import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 健康咨询-科室人员信息Controller
|
||||
|
||||
@ -63,4 +63,7 @@ public class MessageSearchDto {
|
||||
|
||||
@ApiModelProperty(value = "通知适用人群编号集合", hidden = true)
|
||||
private List<String> crowdNoList;
|
||||
|
||||
@ApiModelProperty("城市编码(1:德州 2:东营)")
|
||||
private String cityCode;
|
||||
}
|
||||
|
||||
@ -127,4 +127,12 @@ public interface PatientCouponReceiveMapper {
|
||||
* @return 会员用户优惠券领取记录
|
||||
*/
|
||||
PatientCouponReceiveInfoVO selectPatientCouponReceive(@Param("patientId") Long patientId, @Param("couponId") Long couponId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param receiveSource 优惠券状态
|
||||
* @return int
|
||||
*/
|
||||
int getCouponReceiveByReceiveSource(@Param("patientId") Long patientId, @Param("receiveSource") String receiveSource);
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ public class ChatRecordServiceImpl implements IChatRecordService {
|
||||
return chatRecordMapper.selectMegList(messageDto);
|
||||
// 健康推送
|
||||
} else if(messageDto.getMessageCategory().equals("2")) {
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(patientInfo.getCityCode()) + "/resident/signinfo/detail/" + patientInfo.getCardNo(), null, String.class);
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(messageDto.getCityCode()) + "/resident/signinfo/detail/" + patientInfo.getCardNo(), null, String.class);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (!"1".equals(jsonObject.get("code"))) {
|
||||
throw new ServiceException(jsonObject.get("msg").toString());
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.service.hospitaldepartmentinfo.impl;
|
||||
|
||||
import com.xinelu.common.annotation.DataScope;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
@ -55,6 +56,7 @@ public class HospitalDepartmentInfoServiceImpl implements IHospitalDepartmentInf
|
||||
* @return 科室信息管理
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<HospitalDepartmentInfo> selectHospitalDepartmentInfoList(HospitalDepartmentInfo hospitalDepartmentInfo) {
|
||||
return hospitalDepartmentInfoMapper.selectHospitalDepartmentInfoList(hospitalDepartmentInfo);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.service.hospitalpersoninfo.impl;
|
||||
|
||||
import com.xinelu.common.annotation.DataScope;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import com.xinelu.common.constant.Constants;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
@ -72,6 +73,7 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
||||
* @return 健康咨询-科室人员信息
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "hpi", userAlias = "u")
|
||||
public List<HospitalPersonInfoVO> selectHospitalPersonInfoList(HospitalPersonInfoVO hospitalPersonInfo) {
|
||||
return hospitalPersonInfoMapper.selectHospitalPersonInfoList(hospitalPersonInfo);
|
||||
}
|
||||
@ -138,6 +140,7 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
||||
sysUser.setNickName(hospitalPersonInfo.getPersonName());
|
||||
sysUser.setHospitalPersonId(hospitalPersonInfo.getId());
|
||||
sysUser.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
sysUser.setStatus("0");
|
||||
sysUser.setDelFlag("0");
|
||||
userMapper.insertUser(sysUser);
|
||||
@ -169,6 +172,32 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
|
||||
hospitalPersonInfo.setUpdateTime(LocalDateTime.now());
|
||||
hospitalPersonInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
hospitalPersonInfoMapper.updateHospitalPersonInfo(hospitalPersonInfo);
|
||||
// 修改sys_user表
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setHospitalPersonId(hospitalPersonInfo.getId());
|
||||
List<SysUser> userList = userMapper.selectUserList(sysUser);
|
||||
if (CollectionUtils.isEmpty(userList)) {
|
||||
SysUser newUser = new SysUser();
|
||||
newUser.setUserName(hospitalPersonInfo.getPersonAccount());
|
||||
newUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
||||
newUser.setNickName(hospitalPersonInfo.getPersonName());
|
||||
newUser.setHospitalPersonId(hospitalPersonInfo.getId());
|
||||
newUser.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
newUser.setStatus("0");
|
||||
newUser.setDelFlag("0");
|
||||
userMapper.insertUser(newUser);
|
||||
} else {
|
||||
SysUser updUser = userList.get(0);
|
||||
updUser.setUserName(hospitalPersonInfo.getPersonAccount());
|
||||
updUser.setPassword(SecurityUtils.encryptPassword(hospitalPersonInfo.getPersonPassword()));
|
||||
updUser.setNickName(hospitalPersonInfo.getPersonName());
|
||||
updUser.setHospitalPersonId(hospitalPersonInfo.getId());
|
||||
updUser.setHospitalId(hospitalPersonInfo.getHospitalId());
|
||||
updUser.setStatus("0");
|
||||
updUser.setDelFlag("0");
|
||||
userMapper.updateUser(updUser);
|
||||
}
|
||||
|
||||
//根据科室人员id去查询对应的资质证书 使用流来获取所有的证书路径
|
||||
List<HospitalPersonCertificate> hospitalPersonCertificateList = hospitalPersonCertificateMapper.selectHospitalPersonCertificateByIds(Collections.singletonList(hospitalPersonInfo.getId()));
|
||||
//数据库中的
|
||||
|
||||
@ -69,6 +69,8 @@ public class NurseStationServiceImpl implements INurseStationService {
|
||||
private AppletPageConfig appletPageConfig;
|
||||
@Resource
|
||||
private XinELuConfig xinYiLuConfig;
|
||||
@Resource
|
||||
private AppletChatUtil appletChatUtil;
|
||||
|
||||
/**
|
||||
* 护理站营业时间默认值
|
||||
@ -617,10 +619,10 @@ public class NurseStationServiceImpl implements INurseStationService {
|
||||
String appletPageUrl = appletPageConfig.getNurseStationDetailsPageUrl();
|
||||
//机构二维码存放路径
|
||||
String filePathWeChatCodeUrl = xinYiLuConfig.getStationWechatCodeUrl();
|
||||
String appletCodePicture = AppletChatUtil.createAppletCode(nurseStationId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
String appletCodePicture = appletChatUtil.createAppletCode(nurseStationId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
|
||||
//第一次调用获取小程序二维码信息失败,重新递归调用一次,第二次失败直接返回提示信息
|
||||
appletCodePicture = AppletChatUtil.createAppletCode(nurseStationId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
appletCodePicture = appletChatUtil.createAppletCode(nurseStationId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
|
||||
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
|
||||
return AjaxResult.error("获取小程序二维码信息失败,请联系管理员!");
|
||||
}
|
||||
|
||||
@ -33,6 +33,12 @@ public class AppGoodsOrderVO {
|
||||
@ApiModelProperty(value = "患者名称")
|
||||
private String patientName;
|
||||
|
||||
@ApiModelProperty(value = "医生主键")
|
||||
private Long doctorId;
|
||||
|
||||
@ApiModelProperty(value = "医生姓名")
|
||||
private String doctorName;
|
||||
|
||||
/**
|
||||
* 患者身份证号
|
||||
*/
|
||||
@ -105,4 +111,5 @@ public class AppGoodsOrderVO {
|
||||
**/
|
||||
@ApiModelProperty(value = "健康咨询内容")
|
||||
private String healthConsultationContent;
|
||||
|
||||
}
|
||||
|
||||
@ -767,7 +767,7 @@
|
||||
<select id="getConsultationOrders" resultType="com.xinelu.manage.vo.goodsorder.AppGoodsOrderVO">
|
||||
select
|
||||
c.patient_id as patientId, c.id as consultationInfoId,
|
||||
c.patient_name as patientName, c.card_no as cardNo,
|
||||
c.patient_name as patientName, c.doctor_id as doctorId,c.doctor_name as doctorName, c.card_no as cardNo,
|
||||
c.phone, c.address,c.appointment_date, c.appointment_start_time, c.appointment_end_time,c.problem_description,
|
||||
gr.id as goodsOrderId,gr.order_no, gr.order_status, gr.total_price, gr.health_consultation_content
|
||||
from goods_order gr left join consultation_info c on gr.consultation_info_id = c.id
|
||||
|
||||
@ -23,22 +23,22 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHospitalDepartmentInfoVo">
|
||||
select id,
|
||||
parent_id,
|
||||
hospital_id,
|
||||
hospital_name,
|
||||
department_code,
|
||||
department_name,
|
||||
department_phone,
|
||||
department_person,
|
||||
department_address,
|
||||
department_level,
|
||||
department_sort,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from hospital_department_info
|
||||
select d.id,
|
||||
d.parent_id,
|
||||
d.hospital_id,
|
||||
d.hospital_name,
|
||||
d.department_code,
|
||||
d.department_name,
|
||||
d.department_phone,
|
||||
d.department_person,
|
||||
d.department_address,
|
||||
d.department_level,
|
||||
d.department_sort,
|
||||
d.create_by,
|
||||
d.create_time,
|
||||
d.update_by,
|
||||
d.update_time
|
||||
from hospital_department_info d
|
||||
</sql>
|
||||
|
||||
<select id="selectHospitalDepartmentInfoList" parameterType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo"
|
||||
@ -46,43 +46,45 @@
|
||||
<include refid="selectHospitalDepartmentInfoVo"/>
|
||||
<where>
|
||||
<if test="parentId != null ">
|
||||
and parent_id = #{parentId}
|
||||
and d.parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="hospitalId != null ">
|
||||
and hospital_id = #{hospitalId}
|
||||
and d.hospital_id = #{hospitalId}
|
||||
</if>
|
||||
<if test="hospitalName != null and hospitalName != ''">
|
||||
and hospital_name like concat('%', #{hospitalName}, '%')
|
||||
and d.hospital_name like concat('%', #{hospitalName}, '%')
|
||||
</if>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and department_code = #{departmentCode}
|
||||
and dd.epartment_code = #{departmentCode}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and department_name like concat('%', #{departmentName}, '%')
|
||||
and d.department_name like concat('%', #{departmentName}, '%')
|
||||
</if>
|
||||
<if test="departmentPhone != null and departmentPhone != ''">
|
||||
and department_phone = #{departmentPhone}
|
||||
and d.department_phone = #{departmentPhone}
|
||||
</if>
|
||||
<if test="departmentPerson != null and departmentPerson != ''">
|
||||
and department_person = #{departmentPerson}
|
||||
and d.department_person = #{departmentPerson}
|
||||
</if>
|
||||
<if test="departmentAddress != null and departmentAddress != ''">
|
||||
and department_address = #{departmentAddress}
|
||||
and d.department_address = #{departmentAddress}
|
||||
</if>
|
||||
<if test="departmentLevel != null ">
|
||||
and department_level = #{departmentLevel}
|
||||
and d.department_level = #{departmentLevel}
|
||||
</if>
|
||||
<if test="departmentSort != null ">
|
||||
and department_sort = #{departmentSort}
|
||||
and d.department_sort = #{departmentSort}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
ORDER BY d.id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectHospitalDepartmentInfoById" parameterType="Long"
|
||||
resultMap="HospitalDepartmentInfoResult">
|
||||
<include refid="selectHospitalDepartmentInfoVo"/>
|
||||
where id = #{id}
|
||||
where d.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHospitalDepartmentInfo" parameterType="com.xinelu.manage.domain.hospitaldepartmentinfo.HospitalDepartmentInfo" useGeneratedKeys="true"
|
||||
|
||||
@ -152,6 +152,8 @@
|
||||
<if test="status != null and status != ''">
|
||||
and hpi.status = #{status}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
@ -363,4 +363,13 @@
|
||||
where pcr.patient_id = #{patientId}
|
||||
and pcr.coupon_id = #{couponId}
|
||||
</select>
|
||||
|
||||
<select id="getCouponReceiveByReceiveSource" resultType="java.lang.Integer">
|
||||
select
|
||||
count(1)
|
||||
from patient_coupon_receive
|
||||
where
|
||||
patient_id = #{patientId}
|
||||
and receive_source = #{receiveSource}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="hospitalPersonId" column="hospital_person_id"/>
|
||||
<result property="hospitalId" column="hospital_id"/>
|
||||
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult"/>
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||
</resultMap>
|
||||
@ -49,7 +50,7 @@
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status,
|
||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.hospital_person_id,
|
||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.hospital_person_id,u.hospital_id,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||
from sys_user u
|
||||
@ -163,6 +164,7 @@
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="hospitalPersonId != null and hospitalPersonId != ''">hospital_person_id,</if>
|
||||
<if test="hospitalId != null and hospitalId != ''">hospital_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
@ -178,6 +180,7 @@
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="hospitalPersonId != null and hospitalPersonId != ''">#{hospitalPersonId},</if>
|
||||
<if test="hospitalId != null and hospitalId != ''">#{hospitalId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user