diff --git a/xinelu-common/src/main/java/com/xinelu/common/core/domain/entity/SysUser.java b/xinelu-common/src/main/java/com/xinelu/common/core/domain/entity/SysUser.java index 277d2ce..c8f2738 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/core/domain/entity/SysUser.java +++ b/xinelu-common/src/main/java/com/xinelu/common/core/domain/entity/SysUser.java @@ -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) diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java index 67377bc..4f1a948 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java @@ -4,31 +4,37 @@ 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.*; import java.util.stream.Collectors; @@ -55,6 +61,10 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi private RedisTemplate redisTemplate; @Resource private ReceiveAddressInfoMapper receiveAddressInfoMapper; + @Resource + private PatientCouponReceiveMapper patientCouponReceiveMapper; + @Resource + private CouponMapper couponMapper; /** * @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo @@ -260,6 +270,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); + } } /** 新增收货人地址信息 */ @@ -446,4 +465,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 couponList = couponMapper.selectCouponList(coupon); + if (CollectionUtils.isEmpty(couponList)) { + return ; + } + //组装优惠券信息 + List 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.NOT_USED.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("完善用户信息失败,请联系管理员!"); + } + } + } } diff --git a/xinelu-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java b/xinelu-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java index dfe0c21..df52e43 100644 --- a/xinelu-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java +++ b/xinelu-framework/src/main/java/com/xinelu/framework/aspectj/DataScopeAspect.java @@ -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) + ")"); + } } } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java index f3cb280..e89662b 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java @@ -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 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) { diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalpersoninfo/HospitalPersonInfoController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalpersoninfo/HospitalPersonInfoController.java index 72b016b..855bd7d 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalpersoninfo/HospitalPersonInfoController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalpersoninfo/HospitalPersonInfoController.java @@ -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 diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientcouponreceive/PatientCouponReceiveMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientcouponreceive/PatientCouponReceiveMapper.java index c013787..dd337e3 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientcouponreceive/PatientCouponReceiveMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientcouponreceive/PatientCouponReceiveMapper.java @@ -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); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitaldepartmentinfo/impl/HospitalDepartmentInfoServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitaldepartmentinfo/impl/HospitalDepartmentInfoServiceImpl.java index 43ee2d9..eda5d55 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitaldepartmentinfo/impl/HospitalDepartmentInfoServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitaldepartmentinfo/impl/HospitalDepartmentInfoServiceImpl.java @@ -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 selectHospitalDepartmentInfoList(HospitalDepartmentInfo hospitalDepartmentInfo) { return hospitalDepartmentInfoMapper.selectHospitalDepartmentInfoList(hospitalDepartmentInfo); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java index ee8ddfb..4608c0c 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java @@ -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 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 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 hospitalPersonCertificateList = hospitalPersonCertificateMapper.selectHospitalPersonCertificateByIds(Collections.singletonList(hospitalPersonInfo.getId())); //数据库中的 diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/vo/goodsorder/AppGoodsOrderVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/vo/goodsorder/AppGoodsOrderVO.java index 585e351..960d581 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/vo/goodsorder/AppGoodsOrderVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/vo/goodsorder/AppGoodsOrderVO.java @@ -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; + } diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml index 2ec10c3..ab1590e 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml @@ -767,7 +767,7 @@ - and parent_id = #{parentId} + and d.parent_id = #{parentId} - and hospital_id = #{hospitalId} + and d.hospital_id = #{hospitalId} - and hospital_name like concat('%', #{hospitalName}, '%') + and d.hospital_name like concat('%', #{hospitalName}, '%') - and department_code = #{departmentCode} + and dd.epartment_code = #{departmentCode} - and department_name like concat('%', #{departmentName}, '%') + and d.department_name like concat('%', #{departmentName}, '%') - and department_phone = #{departmentPhone} + and d.department_phone = #{departmentPhone} - and department_person = #{departmentPerson} + and d.department_person = #{departmentPerson} - and department_address = #{departmentAddress} + and d.department_address = #{departmentAddress} - and department_level = #{departmentLevel} + and d.department_level = #{departmentLevel} - and department_sort = #{departmentSort} + and d.department_sort = #{departmentSort} + + ${params.dataScope} - ORDER BY id DESC + ORDER BY d.id DESC and hpi.status = #{status} + + ${params.dataScope} ORDER BY id DESC diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/patientcouponreceive/PatientCouponReceiveMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/patientcouponreceive/PatientCouponReceiveMapper.xml index 96b3072..391945f 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/patientcouponreceive/PatientCouponReceiveMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/patientcouponreceive/PatientCouponReceiveMapper.xml @@ -363,4 +363,12 @@ where pcr.patient_id = #{patientId} and pcr.coupon_id = #{couponId} + + diff --git a/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml b/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml index b0f0664..f2b0969 100644 --- a/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -24,6 +24,7 @@ + @@ -49,7 +50,7 @@ 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 @@ create_by, remark, hospital_person_id, + hospital_id, create_time )values( #{userId}, @@ -178,6 +180,7 @@ #{createBy}, #{remark}, #{hospitalPersonId}, + #{hospitalId}, sysdate() )