Merge branch 'jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into dev_gy_0920

This commit is contained in:
haown 2023-10-13 16:01:42 +08:00
commit c1376ea982
31 changed files with 607 additions and 433 deletions

View File

@ -1,11 +1,8 @@
package com.xinelu.web.controller.applet;
import com.alibaba.fastjson2.JSONObject;
import com.xinelu.common.config.XinELuConfig;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.file.FileUploadUtils;
import com.xinelu.common.utils.file.MimeTypeUtils;
import com.xinelu.familydoctor.applet.pojo.body.PatientInfoBody;
import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo;
import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService;
@ -13,15 +10,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
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.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.R;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.List;
@ -53,16 +44,6 @@ public class ResidentPatientInfoController extends BaseController {
}
}
@ApiOperation("获取微信手机号")
@GetMapping("/getPhone/{code}")
public R<JSONObject> getPhone(@PathVariable String code) {
try {
return R.ok(residentPatientInfoService.getPhone(code));
} catch (Exception e) {
return R.fail(e.getMessage());
}
}
@ApiOperation("注册完善信息")
@PostMapping("")
public R<String> register(@Validated @RequestBody PatientInfoBody body) {
@ -128,10 +109,16 @@ public class ResidentPatientInfoController extends BaseController {
return R.ok(residentPatientInfoService.getCurrentResident(openid, cityCode));
}
@ApiOperation("是否已注册")
/*@ApiOperation("是否已注册")
@GetMapping(value = "/isRegistered/{code}")
public R<PatientInfo> isRegistered(@PathVariable("code") String code) {
return R.ok(residentPatientInfoService.isRegistered(code));
}*/
@ApiOperation("是否已注册")
@GetMapping(value = "/login/{loginCode}/{phoneCode}")
public AjaxResult isRegistered(@PathVariable("loginCode") String loginCode, @PathVariable("phoneCode") String phoneCode) throws Exception {
return AjaxResult.success(residentPatientInfoService.login(loginCode,phoneCode));
}
/**

View File

@ -94,4 +94,6 @@ public interface ResidentPatientInfoMapper {
* @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo
**/
PatientInfo getByCardNo(String cardNo);
int selectPatientInfoByPhone(String phone);
}

View File

@ -1,11 +1,9 @@
package com.xinelu.familydoctor.applet.service;
import com.alibaba.fastjson2.JSONObject;
import com.xinelu.common.entity.AppletPhoneVO;
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 org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
/**
@ -50,7 +48,7 @@ public interface IResidentPatientInfoService {
* @Param [code]
* @return java.lang.String
**/
JSONObject getPhone(String code) throws Exception;
AppletPhoneVO getPhone(String code) throws Exception;
/**
* @return java.lang.String
@ -122,5 +120,6 @@ public interface IResidentPatientInfoService {
* @Param [code]
* @return java.lang.Object
**/
PatientInfo isRegistered(String code);
//PatientInfo isRegistered(String code);
HashMap<String,String> login(String logincode,String phoneCode) throws Exception;
}

View File

@ -1,14 +1,12 @@
package com.xinelu.familydoctor.applet.service.impl;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.xinelu.common.config.AppletChatConfig;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.entity.AppletPhoneVO;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.http.HttpService;
@ -19,10 +17,11 @@ 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.service.IResidentPatientInfoService;
import com.xinelu.familydoctor.applet.utils.AppletAccessTokenUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -43,7 +42,10 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
private HttpService httpService;
@Resource
private AppletChatConfig appletChatConfig;
@Resource
private AppletAccessTokenUtils appletAccessTokenUtils;
@Resource
private RedisTemplate<String, Object> redisTemplate;
/**
* @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo
* @Author mengkuiliang
@ -88,7 +90,8 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
if (!json.containsKey("openid")) {
throw new ServiceException(json.getString("errmsg"));
}
return json.getString("openid");
String openid = json.getString("openid");
return openid;
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
@ -102,11 +105,8 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
* @Param [code]
**/
@Override
public JSONObject getPhone(String code) {
try {
public AppletPhoneVO getPhone(String code) throws Exception {
JSONObject result;
// 获取token
String token_url = String.format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", appletChatConfig.getAppletId(), appletChatConfig.getSecret());
SslUtils.ignoreSsl();
@ -120,25 +120,13 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
if (StringUtils.isEmpty(accessToken)) {
return null;
}
//获取手机号 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/user-info/phone-number/getPhoneNumber.html
String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber" + "?access_token=" + accessToken;
JSONObject params = new JSONObject();
params.put("code", code);
SslUtils.ignoreSsl();
result = httpService.post(url, null, params);
if (result == null) {
return null;
}
log.info("获取小程序手机号 : {}", result.toJSONString());
if (result.getInteger("errcode") != 0) {
return null;
}
return result;
} catch (Exception e) {
e.printStackTrace();
}
return null;
return JSON.parseObject(result.toString(), AppletPhoneVO.class);
}
/**
@ -322,8 +310,36 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
* @Param [code]
* @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo
**/
@Override
/*@Override
public PatientInfo isRegistered(String code) {
return getCurrentResident(getOpenId(code), null);
}*/
@Override
public HashMap<String, String> login(String loginCode,String phoneCode) throws Exception {
HashMap<String, String> HashMap = new HashMap<>();
try {
SslUtils.ignoreSsl();
String params = "appid=" + appletChatConfig.getAppletId() + "&secret=" + appletChatConfig.getSecret() + "&js_code=" + loginCode + "&grant_type=" + appletChatConfig.getGrantType();
log.info("获取openID请求参数{}", params);
String result = HttpUtils.sendPost("https://api.weixin.qq.com/sns/jscode2session", params);
JSONObject json = JSONObject.parseObject(result);
// {"errcode":40029,"errmsg":"invalid code, rid: 650bf9c3-31a6c960-2b437029"}
log.info("获取openID响应结果{}", json.toJSONString());
if (!json.containsKey("openid")) {
throw new ServiceException(json.getString("errmsg"));
}
String openid = json.getString("openid");
HashMap.put("openid",openid);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
String code;
AppletPhoneVO phone = getPhone(phoneCode);
String phoneNumber = phone.getPhoneInfo().getPhoneNumber();
HashMap.put("phone",phoneNumber);
code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1";
HashMap.put("code",code);
return HashMap;
}
}

View File

@ -0,0 +1,98 @@
package com.xinelu.familydoctor.applet.utils;
import com.xinelu.common.config.AppletChatConfig;
import com.xinelu.common.config.NurseAppletChatConfig;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.entity.AppletAccessToken;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.AppletChatUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
/**
* @Description 获取小程序AccessToken公共方法
* @Author 纪寒
* @Date 2023-02-27 18:02:05
* @Version 1.0
*/
@Component
public class AppletAccessTokenUtils {
@Resource
private RedisTemplate<String, Object> redisTemplate;
@Resource
private AppletChatConfig appletChatConfig;
@Resource
private NurseAppletChatConfig nurseAppletChatConfig;
/**
* 返回成功状态码
*/
private static final int SUCCESS_CODE = 0;
/**
* 获取小程序AccessToken方法
*
* @return 小程序的AccessToken
*/
public String getAppletAccessToken() {
String accessToken;
String accessTokenKey = Constants.NURSE_STATION_APPLET_ACCESS_TOKEN + "accessToken";
//从Redis中取出accessToken
Object object = redisTemplate.opsForValue().get(accessTokenKey);
if (Objects.isNull(object)) {
//没有获取accessToken
AppletAccessToken appletAccessToken = AppletChatUtil.getAppletAccessToken(appletChatConfig.getAppletId(), appletChatConfig.getSecret());
if (Objects.isNull(appletAccessToken)) {
throw new ServiceException("获取微信小程序accessToken信息失败");
}
if (Objects.nonNull(appletAccessToken.getErrcode()) && appletAccessToken.getErrcode() != SUCCESS_CODE) {
throw new ServiceException("获取微信小程序accessToken信息失败失败信息为" + appletAccessToken.getErrmsg(), 201);
}
if (StringUtils.isBlank(appletAccessToken.getAccessToken())) {
throw new ServiceException("accessToken信息为空");
}
//存入Redis中
redisTemplate.opsForValue().set(accessTokenKey, appletAccessToken.getAccessToken(), 3600, TimeUnit.SECONDS);
accessToken = appletAccessToken.getAccessToken();
} else {
accessToken = (String) object;
}
return accessToken;
}
/**
* 护理员小程序获取小程序AccessToken方法
*
* @return 小程序的AccessToken
*/
public String getPersonAppletAccessToken() {
String accessToken;
String accessTokenKey = Constants.NURSE_STATION_PERSON_APPLET_ACCESS_TOKEN + "accessToken";
//从Redis中取出accessToken
Object object = redisTemplate.opsForValue().get(accessTokenKey);
if (Objects.isNull(object)) {
//没有获取accessToken
AppletAccessToken appletAccessToken = AppletChatUtil.getAppletAccessToken(nurseAppletChatConfig.getAppletId(), nurseAppletChatConfig.getSecret());
if (Objects.isNull(appletAccessToken)) {
throw new ServiceException("获取微信小程序accessToken信息失败");
}
if (Objects.nonNull(appletAccessToken.getErrcode()) && appletAccessToken.getErrcode() != SUCCESS_CODE) {
throw new ServiceException("获取微信小程序accessToken信息失败失败信息为" + appletAccessToken.getErrmsg(), 201);
}
if (StringUtils.isBlank(appletAccessToken.getAccessToken())) {
throw new ServiceException("accessToken信息为空");
}
//存入Redis中
redisTemplate.opsForValue().set(accessTokenKey, appletAccessToken.getAccessToken(), 3600, TimeUnit.SECONDS);
accessToken = appletAccessToken.getAccessToken();
} else {
accessToken = (String) object;
}
return accessToken;
}
}

View File

@ -451,4 +451,12 @@
update patient_info set is_checked = #{isChecked} where patient_code = #{patientCode}
</update>
<!-- 获取注册详细信息 -->
<select id="selectPatientInfoByPhone" parameterType="String" resultType="java.lang.Integer">
select count(1) from patient_info
where phone = #{pnone}
and login_flag = '1'
</select>
</mapper>

View File

@ -112,7 +112,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage").anonymous()
.antMatchers("/login", "/register", "/captchaImage","/newapp/login/appLogin").anonymous()
// 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

View File

@ -1,4 +1,33 @@
package com.xinelu.applet.controller.newapp;
import com.xinelu.applet.service.newapp.NewAppLoginService;
import com.xinelu.common.core.domain.AjaxResult;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/newapp/login")
public class NewAppLoginController {
@Resource
private NewAppLoginService newAppLoginService;
/**
* 新app登录
* @param personAccount
* @param personPassword
* @return
*/
@PostMapping("/appLogin")
public AjaxResult login(@RequestParam("personAccount") String personAccount, @RequestParam("personPassword") String personPassword) {
if (StringUtils.isBlank(personAccount)) {
return AjaxResult.error("请输入账号!");
}
if (StringUtils.isBlank(personPassword)) {
return AjaxResult.error("请输入密码!");
}
return AjaxResult.success(newAppLoginService.login(personAccount, personPassword));
}
}

View File

@ -35,6 +35,22 @@ public class NurseAppLoginController extends BaseController {
@Resource
private NurseAppLoginService nurseAppLoginService;
/**
* 判断用户是否完善信息-微信小程序和APP共用
*
* @param patientId 用户id
* @return 结果
*/
@MobileRequestAuthorization
@GetMapping("/AppIdentification")
public AjaxResult getIdentification(Long patientId) {
if (Objects.isNull(patientId)) {
return AjaxResult.error("当前用户信息不存在,无法完善个人信息!");
}
return nurseAppLoginService.getIdentification(patientId);
}
/**
* 查询护理人列表信息会员小程序和App共用
*
@ -97,5 +113,4 @@ public class NurseAppLoginController extends BaseController {
List<OrderAndItemVO> appointmentOrderDetails = nurseAppLoginService.selectAppServiceOrderItem(patientId, orderStatus);
return getDataTable(appointmentOrderDetails);
}
}
}

View File

@ -0,0 +1,14 @@
package com.xinelu.applet.mapper.newapp;
import org.apache.ibatis.annotations.Param;
public interface NewAppLoginMapper {
/**
* 新app登录
* @param personAccount
* @param personPassword
* @return
*/
int login(@Param("personAccount") String personAccount, @Param("personPassword") String personPassword);
}

View File

@ -24,12 +24,10 @@ import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.domain.sysarea.SysArea;
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
@ -76,8 +74,6 @@ public class AppletLoginServiceImpl implements AppletLoginService {
private AppointmentOrderDetailsMapper appointmentOrderDetailsMapper;
@Resource
private AppletAccessTokenUtil appletAccessTokenUtil;
@Resource
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
/**
@ -444,19 +440,6 @@ public class AppletLoginServiceImpl implements AppletLoginService {
log.info("新增预约订单主表失败,失败原因:[{}]", appointmentOrder);
throw new ServiceException("预约护理信息失败,请联系管理员!");
}
//新增预约订单流程记录信息表
AppointmentOrderProcessRecord appointment = new AppointmentOrderProcessRecord();
appointment.setOperatePersonId(dto.getPatientId());
appointment.setAppointmentOrderId(appointmentOrder.getId());
appointment.setAppointmentOrderNo(orderNo);
appointment.setOperateTime(LocalDateTime.now());
appointment.setOperateType(OrderProcessOperateTypeEnum.PLACE_ORDER.getInfo());
appointment.setOperateDetails("预约订单下单操作");
appointment.setCreateTime(LocalDateTime.now());
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointment);
if (count <= 0) {
throw new ServiceException("预约订单流程记录失败,请联系管理员!");
}
}
/**

View File

@ -0,0 +1,15 @@
package com.xinelu.applet.service.newapp;
import com.xinelu.common.core.domain.AjaxResult;
import org.springframework.stereotype.Service;
@Service
public interface NewAppLoginService {
/**
* 新app登录
* @param personAccount
* @param personPassword
* @return
*/
AjaxResult login(String personAccount, String personPassword);
}

View File

@ -0,0 +1,30 @@
package com.xinelu.applet.service.newapp.impl;
import com.xinelu.applet.mapper.newapp.NewAppLoginMapper;
import com.xinelu.applet.service.newapp.NewAppLoginService;
import com.xinelu.common.core.domain.AjaxResult;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class NewAppLoginServiceImpl implements NewAppLoginService {
@Resource
private NewAppLoginMapper newAppLoginMapper;
/**
* 新app登录
* @param personAccount
* @param personPassword
* @return
*/
@Override
public AjaxResult login(String personAccount, String personPassword) {
int count = newAppLoginMapper.login(personAccount, personPassword);
if (count>0){
return AjaxResult.success("登录成功!");
}else {
return AjaxResult.error("账号或密码错误!");
}
}
}

View File

@ -4,13 +4,10 @@ package com.xinelu.applet.service.nurseappletpersonworkorder.Impl;
import com.xinelu.applet.dto.nursepersonapplogin.OrderFallbackDTO;
import com.xinelu.applet.service.nurseappletpersonworkorder.NurseAppletPersonWorkOrderService;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.OrderProcessOperateTypeEnum;
import com.xinelu.common.enums.OrderStatusEnum;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
import com.xinelu.manage.service.stationmessagepush.StationMessagePushService;
import com.xinelu.manage.vo.appointmentorder.AppointmentReceivingOrderVO;
import lombok.extern.slf4j.Slf4j;
@ -18,7 +15,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Objects;
/**
@ -33,8 +29,6 @@ public class NurseAppletPersonWorkOrderServiceImpl implements NurseAppletPersonW
@Resource
private AppointmentOrderMapper appointmentOrderMapper;
@Resource
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
@Resource
private StationMessagePushService stationMessagePushService;
@Resource
private AppointmentOrderDetailsMapper appointmentOrderDetailsMapper;
@ -56,18 +50,6 @@ public class NurseAppletPersonWorkOrderServiceImpl implements NurseAppletPersonW
if (update < 0) {
throw new ServiceException("接单失败,请联系管理员!");
}
AppointmentOrderProcessRecord appointmentOrderProcessRecord = new AppointmentOrderProcessRecord();
appointmentOrderProcessRecord.setAppointmentOrderNo(orderFallbackDTO.getAppointmentOrderNo());
appointmentOrderProcessRecord.setCreateTime(LocalDateTime.now());
appointmentOrderProcessRecord.setOperatePersonId(orderFallbackDTO.getStationPersonId());
appointmentOrderProcessRecord.setOperateTime(LocalDateTime.now());
appointmentOrderProcessRecord.setOperateType(OrderProcessOperateTypeEnum.RECEIVE_ORDER.getInfo());
appointmentOrderProcessRecord.setAppointmentOrderId(orderFallbackDTO.getAppointmentOrderId());
appointmentOrderProcessRecord.setOperateDetails("接单");
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointmentOrderProcessRecord);
if (count <= 0) {
throw new ServiceException("增加预约订单流程记录失败,请联系管理员!");
}
//异步发送消息
stationMessagePushService.receivingOrdersOperationsPush(appointmentReceivingOrder);
return AjaxResult.success();

View File

@ -14,6 +14,14 @@ import java.util.List;
*/
public interface NurseAppLoginService {
/**
* 判断用户是否完善信息-微信小程序和APP共用
*
* @param patientId 用户id
* @return 结果
*/
AjaxResult getIdentification(Long patientId);
/**
* 查询护理人列表信息
*

View File

@ -1,67 +1,36 @@
package com.xinelu.applet.service.nurseapplogin.impl;
import com.xinelu.applet.dto.appletlogin.AppletUserInfoDTO;
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
import com.xinelu.applet.mapper.appletlogin.AppletLoginMapper;
import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper;
import com.xinelu.applet.mapper.patientcenter.PatientCenterMapper;
import com.xinelu.applet.service.messagepush.MessagePushService;
import com.xinelu.applet.service.nurseapplogin.NurseAppLoginService;
import com.xinelu.applet.utils.AppointmentTimeUtil;
import com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO;
import com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO;
import com.xinelu.applet.vo.nurseapplogin.AppLoginVO;
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
import com.xinelu.common.config.AppletChatConfig;
import com.xinelu.common.config.XinELuConfig;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.*;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.enums.AppointmentTimeIntervalEnum;
import com.xinelu.common.enums.GooodsOrderStatusEnum;
import com.xinelu.common.utils.AgeUtil;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.common.utils.regex.RegexUtil;
import com.xinelu.manage.domain.coupon.Coupon;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
import com.xinelu.manage.domain.patientcouponreceive.PatientCouponReceive;
import com.xinelu.manage.domain.patientdiseaseinfo.PatientDiseaseInfo;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.domain.patientintegralchange.PatientIntegralChange;
import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo;
import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord;
import com.xinelu.manage.domain.systemsettingsinfo.SystemSettingsInfo;
import com.xinelu.manage.mapper.coupon.CouponMapper;
import com.xinelu.manage.mapper.patientcouponreceive.PatientCouponReceiveMapper;
import com.xinelu.manage.mapper.patientdiseaseinfo.PatientDiseaseInfoMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.patientintegralchange.PatientIntegralChangeMapper;
import com.xinelu.manage.mapper.receiveAddressInfo.ReceiveAddressInfoMapper;
import com.xinelu.manage.mapper.subscribemessagerecord.SubscribeMessageRecordMapper;
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
import com.xinelu.manage.mapper.systemsettingsinfo.SystemSettingsInfoMapper;
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
import com.xinelu.manage.vo.sysarea.SysAreaVO;
import com.xinelu.system.domain.SysConfig;
import com.xinelu.system.mapper.SysConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
@ -83,6 +52,27 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
private AppointmentTimeUtil appointmentTimeUtil;
@Resource
private SysConfigMapper sysConfigMapper;
@Resource
private PatientInfoMapper patientInfoMapper;
/**
* 判断用户是否完善信息-微信小程序和APP共用
*
* @param patientId 用户id
* @return 结果
*/
@Override
public AjaxResult getIdentification(Long patientId) {
//判断当前用户信息是否存在
PatientInfoVO patientInfo = patientInfoMapper.getPatientInfoById(patientId);
if (Objects.isNull(patientInfo)) {
return AjaxResult.error("当前用户信息不存在,无法完善个人信息!");
}
AppLoginVO appLoginVO = new AppLoginVO();
appLoginVO.setLoginFlag(Objects.nonNull(patientInfo.getLoginFlag()) && patientInfo.getLoginFlag() == 1);
return AjaxResult.success(appLoginVO);
}
/**
* 查询护理人列表信息

View File

@ -7,7 +7,6 @@ import com.xinelu.applet.service.nursepersonapplogin.INursePersonAppLoginService
import com.xinelu.applet.vo.nursepersonapplogin.*;
import com.xinelu.common.config.XinELuConfig;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.OrderProcessOperateTypeEnum;
import com.xinelu.common.enums.OrderStatusEnum;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.AgeUtil;
@ -16,12 +15,10 @@ import com.xinelu.common.utils.file.MimeTypeUtils;
import com.xinelu.common.utils.regex.RegexUtil;
import com.xinelu.common.utils.sign.Md5Utils;
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
import com.xinelu.manage.domain.nursestationperson.NurseStationPerson;
import com.xinelu.manage.domain.nursestationpersonrevenue.NurseStationPersonRevenue;
import com.xinelu.manage.domain.patientdiseaseinfo.PatientDiseaseInfo;
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
import com.xinelu.manage.mapper.nursestation.NurseStationMapper;
import com.xinelu.manage.mapper.nursestationperson.NurseStationPersonMapper;
import com.xinelu.manage.mapper.nursestationpersonrevenue.NurseStationPersonRevenueMapper;
@ -71,8 +68,6 @@ public class NursePersonAppLoginServiceImpl implements INursePersonAppLoginServi
@Resource
private XinELuConfig xinYiLuConfig;
@Resource
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
@Resource
private NurseStationPersonRevenueMapper nurseStationPersonRevenueMapper;
@Resource
private PatientDiseaseInfoMapper patientDiseaseInfoMapper;
@ -173,19 +168,6 @@ public class NursePersonAppLoginServiceImpl implements INursePersonAppLoginServi
if (update <= 0) {
throw new ServiceException("任务退回失败,请联系管理员!");
}
//流程记录
AppointmentOrderProcessRecord appointmentOrderProcessRecord = new AppointmentOrderProcessRecord();
appointmentOrderProcessRecord.setAppointmentOrderNo(orderFallbackDTO.getAppointmentOrderNo());
appointmentOrderProcessRecord.setCreateTime(LocalDateTime.now());
appointmentOrderProcessRecord.setOperatePersonId(orderFallbackDTO.getStationPersonId());
appointmentOrderProcessRecord.setOperateTime(LocalDateTime.now());
appointmentOrderProcessRecord.setOperateType(OrderProcessOperateTypeEnum.ACTIVE_BACK_ORDER.getInfo());
appointmentOrderProcessRecord.setOperateDetails(orderFallbackDTO.getTaskReturnReason());
appointmentOrderProcessRecord.setAppointmentOrderId(orderFallbackDTO.getAppointmentOrderId());
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointmentOrderProcessRecord);
if (count <= 0) {
throw new ServiceException("预约订单流程记录失败,请联系管理员!");
}
//异步发送信息
stationMessagePushService.refusalOrdersOperationsPush(appointmentReceivingOrder);
return AjaxResult.success();
@ -227,19 +209,6 @@ public class NursePersonAppLoginServiceImpl implements INursePersonAppLoginServi
if (stationPersonRevenue <= 0) {
throw new ServiceException("新增护理员订单佣金收益记录失败,请联系管理员!");
}
//新增预约订单流程记录信息表
AppointmentOrderProcessRecord appointment = new AppointmentOrderProcessRecord();
appointment.setOperatePersonId(Objects.isNull(orderDetails.getNurseStationPersonId()) ? null : orderDetails.getNurseStationPersonId());
appointment.setAppointmentOrderId(Objects.isNull(orderDetails.getId()) ? null : orderDetails.getId());
appointment.setAppointmentOrderNo(StringUtils.isBlank(orderDetails.getOrderNo()) ? "" : orderDetails.getOrderNo());
appointment.setOperateTime(LocalDateTime.now());
appointment.setOperateType(OrderProcessOperateTypeEnum.FINISH_ORDER.getInfo());
appointment.setOperateDetails("预约订单任务完成操作");
appointment.setCreateTime(LocalDateTime.now());
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointment);
if (count <= 0) {
throw new ServiceException("预约订单流程记录失败,请联系管理员!");
}
//更新护理员账户总金额
Long nurseStationPersonId = Objects.isNull(orderDetails.getNurseStationPersonId()) ? 0 : orderDetails.getNurseStationPersonId();
BigDecimal orderCommissionAmount = Objects.isNull(orderDetails.getOrderCommissionAmount()) ? BigDecimal.ZERO : orderDetails.getOrderCommissionAmount();

View File

@ -0,0 +1,45 @@
package com.xinelu.applet.vo.nurseapplogin;
import lombok.Data;
import java.io.Serializable;
/**
* 登录信息返回标识
*
* @author zhangheng
* @date 2022-10-12
*/
@Data
public class AppLoginVO implements Serializable {
private static final long serialVersionUID = 1820130502268738492L;
/**
* 返回提示信息
*/
private String message;
/**
* 登录标识标识
*/
private Boolean registerFlag;
/**
* 完善信息标识
*/
private Boolean loginFlag;
/**
* 用户id
*/
private Long patientId;
/**
* 用户姓名
*/
private String patientName;
/**
* 用户手机号
*/
private String phone;
}

View File

@ -153,4 +153,9 @@ public class PatientAndDiseaseVO implements Serializable {
*/
private String disablingReason;
/**
* 用户编号
*/
private String patientCode;
}

View File

@ -0,0 +1,21 @@
<?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.newapp.NewAppLoginMapper">
<select id="login" resultType="int">
select
count(1)
from hospital_person_info
<where>
<if test="personAccount != null">
person_account = #{personAccount}
</if>
<if test="personPassword != null">
and person_password = #{personPassword}
</if>
</where>
</select>
</mapper>

View File

@ -23,6 +23,7 @@
<result property="birthDate" column="birth_date"/>
<result property="disablingCondition" column="disabling_condition"/>
<result property="disablingReason" column="disabling_reason"/>
<result property="patientCode" column="patient_code"/>
<collection property="patientDiseaseInfoList" javaType="java.util.List" resultMap="PatientDiseaseInfoResult"/>
</resultMap>
@ -79,6 +80,7 @@
pi.location_name,
pi.disabling_condition,
pi.disabling_reason,
pi.patient_code,
pdi.id patientDiseaseId,
pdi.disease_id,
pdi.disease_name,

View File

@ -10,6 +10,7 @@ import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDtoo;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
import io.swagger.annotations.Api;
@ -108,6 +109,15 @@ public class HospitalPersonInfoController extends BaseController {
return hospitalPersonInfoService.updateHospitalPersonInfo(hospitalPersonInfo);
}
/**
* 修改健康咨询-科室人员信息
* @return
*/
@PostMapping("/update")
public AjaxResult update(@RequestBody HospitalPersonInfoDtoo hospitalPersonInfo) {
return AjaxResult.success(hospitalPersonInfoService.editHospitalPersonInfo(hospitalPersonInfo));
}
/**
* 删除健康咨询-科室人员信息
*/

View File

@ -0,0 +1,144 @@
package com.xinelu.manage.dto.hospitalpersoninfo;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import com.xinelu.common.custominterface.Insert;
import com.xinelu.common.custominterface.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 健康咨询-科室人员信息对象 hospital_person_info
*
* @author xinyilu
* @date 2023-02-14
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "健康咨询-科室人员信息对象", description = "hospital_person_info")
public class HospitalPersonInfoDtoo extends BaseDomain implements Serializable {
private static final long serialVersionUID = 8750821883343940709L;
/**
* 主键id
*/
private Long id;
/**
* 所属医院id
*/
@ApiModelProperty(value = "所属医院id")
@Excel(name = "所属医院id")
private Long hospitalId;
/**
* 所属部门id
*/
@ApiModelProperty(value = "所属部门id")
@Excel(name = "所属部门id")
private Long departmentId;
/**
* 科室人员编码
*/
@ApiModelProperty(value = "科室人员编码")
@Excel(name = "科室人员编码")
private String personCode;
/**
* 科室人员名称
*/
@ApiModelProperty(value = "科室人员名称")
@Excel(name = "科室人员名称")
@Length(max = 50, message = "科室人员名称不能超过50位", groups = {Insert.class, Update.class})
private String personName;
/**
* 科室人员联系电话
*/
@ApiModelProperty(value = "科室人员联系电话")
@Excel(name = "科室人员联系电话")
private String personPhone;
/**
* 科室人员地址
*/
@ApiModelProperty(value = "科室人员地址")
@Excel(name = "科室人员地址")
@Length(max = 300, message = "科室人员地址不能超过300位", groups = {Insert.class, Update.class})
private String personAddress;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
@Excel(name = "身份证号")
private String cardNo;
/**
* 人员职称主任医师CHIEF_PHYSICIAN副主任医师DEPUTY_CHIEF_PHYSICIAN主治医师ATTENDING_DOCTOR医师PHYSICIAN医士HEALER住院医师RESIDENT_PHYSICIAN
*/
@ApiModelProperty(value = "人员职称主任医师CHIEF_PHYSICIAN副主任医师DEPUTY_CHIEF_PHYSICIAN主治医师ATTENDING_DOCTOR医师PHYSICIAN医士HEALER住院医师RESIDENT_PHYSICIAN")
@Excel(name = "人员职称主任医师CHIEF_PHYSICIAN副主任医师DEPUTY_CHIEF_PHYSICIAN主治医师ATTENDING_DOCTOR医师PHYSICIAN医士HEALER住院医师RESIDENT_PHYSICIAN")
private String academicTitle;
/**
* 咨询费用
*/
@ApiModelProperty(value = "咨询费用")
@Excel(name = "咨询费用")
private BigDecimal consultingFee;
/**
* 个人简介
*/
@ApiModelProperty(value = "个人简介")
@Excel(name = "个人简介")
private String personIntroduce;
/**
* 显示顺序
*/
@ApiModelProperty(value = "显示顺序")
@Excel(name = "显示顺序")
private Integer personSort;
/**
* 科室人员头像地址
*/
private String personPictureUrl;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("hospitalId", getHospitalId())
.append("departmentId", getDepartmentId())
.append("personCode", getPersonCode())
.append("personName", getPersonName())
.append("personPhone", getPersonPhone())
.append("personAddress", getPersonAddress())
.append("cardNo", getCardNo())
.append("academicTitle", getAcademicTitle())
.append("consultingFee", getConsultingFee())
.append("personIntroduce", getPersonIntroduce())
.append("personSort", getPersonSort())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -1,72 +0,0 @@
package com.xinelu.manage.mapper.appointmentorderprocessrecord;
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
import java.util.List;
/**
* 预约订单流程记录信息Mapper接口
*
* @author xinyilu
* @date 2023-03-29
*/
public interface AppointmentOrderProcessRecordMapper {
/**
* 查询预约订单流程记录信息
*
* @param id 预约订单流程记录信息主键
* @return 预约订单流程记录信息
*/
AppointmentOrderProcessRecord selectAppointmentOrderProcessRecordById(Long id);
/**
* 查询预约订单流程记录信息列表
*
* @param appointmentOrderProcessRecord 预约订单流程记录信息
* @return 预约订单流程记录信息集合
*/
List<AppointmentOrderProcessRecord> selectAppointmentOrderProcessRecordList(AppointmentOrderProcessRecord appointmentOrderProcessRecord);
/**
* 新增预约订单流程记录信息
*
* @param appointmentOrderProcessRecord 预约订单流程记录信息
* @return 结果
*/
int insertAppointmentOrderProcessRecord(AppointmentOrderProcessRecord appointmentOrderProcessRecord);
/**
* 修改预约订单流程记录信息
*
* @param appointmentOrderProcessRecord 预约订单流程记录信息
* @return 结果
*/
int updateAppointmentOrderProcessRecord(AppointmentOrderProcessRecord appointmentOrderProcessRecord);
/**
* 删除预约订单流程记录信息
*
* @param id 预约订单流程记录信息主键
* @return 结果
*/
int deleteAppointmentOrderProcessRecordById(Long id);
/**
* 批量删除预约订单流程记录信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
int deleteAppointmentOrderProcessRecordByIds(Long[] ids);
/**
* 批量新增预约订单流程记录信息
*
* @param appointmentOrderProcessRecordList 预约订单流程记录信息
* @return 结果
*/
int insertAppointmentOrderProcessRecordList(List<AppointmentOrderProcessRecord> appointmentOrderProcessRecordList);
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.hospitalpersoninfo;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDtoo;
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
import java.util.List;
import org.apache.ibatis.annotations.Param;
@ -53,6 +54,14 @@ public interface HospitalPersonInfoMapper {
*/
int updateHospitalPersonInfo(HospitalPersonInfo hospitalPersonInfo);
/**
* 修改健康咨询-科室人员信息
*
* @param hospitalPersonInfo 健康咨询-科室人员信息
* @return 结果
*/
int editHospitalPersonInfo(HospitalPersonInfoDtoo hospitalPersonInfo);
/**
* 删除健康咨询-科室人员信息
*

View File

@ -3,18 +3,15 @@ package com.xinelu.manage.service.appointmentorder.impl;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.AppointmentOrderTypeEnum;
import com.xinelu.common.enums.OrderProcessOperateTypeEnum;
import com.xinelu.common.enums.OrderStatusEnum;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
import com.xinelu.manage.domain.appointmentorderconsumable.AppointmentOrderConsumable;
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
import com.xinelu.manage.mapper.appointmentorderconsumable.AppointmentOrderConsumableMapper;
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
import com.xinelu.manage.service.appointmentorder.IAppointmentOrderService;
import com.xinelu.manage.service.stationmessagepush.StationMessagePushService;
import com.xinelu.manage.vo.appointmentorder.AppointmentOrderVO;
@ -47,8 +44,6 @@ public class AppointmentOrderServiceImpl implements IAppointmentOrderService {
private AppointmentOrderConsumableMapper appointmentOrderConsumableMapper;
@Resource
private StationMessagePushService stationMessagePushService;
@Resource
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
/**
* 查询预约订单信息
@ -183,19 +178,6 @@ public class AppointmentOrderServiceImpl implements IAppointmentOrderService {
if (updateAppointmentOrderStatus <= 0) {
throw new ServiceException("派单失败,请联系管理员!");
}
//记录订单流程信息
AppointmentOrderProcessRecord appointmentOrderProcessRecord = new AppointmentOrderProcessRecord();
appointmentOrderProcessRecord.setAppointmentOrderNo(appointmentOrder.getOrderNo());
appointmentOrderProcessRecord.setCreateTime(LocalDateTime.now());
appointmentOrderProcessRecord.setOperatePersonId(appointmentOrder.getNurseStationPersonId());
appointmentOrderProcessRecord.setOperateTime(LocalDateTime.now());
appointmentOrderProcessRecord.setOperateType(OrderProcessOperateTypeEnum.DISPATCH_ORDER.getInfo());
appointmentOrderProcessRecord.setAppointmentOrderId(appointmentOrders.getId());
appointmentOrderProcessRecord.setOperateDetails("派单");
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointmentOrderProcessRecord);
if (count <= 0) {
throw new ServiceException("增加预约订单流程记录失败,请联系管理员!");
}
stationMessagePushService.waitReceiveMessagePush(appointmentOrder);
return AjaxResult.success();
}

View File

@ -3,6 +3,7 @@ package com.xinelu.manage.service.hospitalpersoninfo;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDtoo;
import com.xinelu.manage.vo.hospitalpersoninfo.HospitalPersonInfoVO;
import java.util.List;
@ -69,4 +70,11 @@ public interface IHospitalPersonInfoService {
* @param pictureUrl 图片地址
**/
void deletePictureUrl(String pictureUrl);
/**
* 修改医生手机号和密码
* @param hospitalPersonInfo
* @return
*/
int editHospitalPersonInfo(HospitalPersonInfoDtoo hospitalPersonInfo);
}

View File

@ -11,6 +11,7 @@ import com.xinelu.common.utils.regex.RegexUtil;
import com.xinelu.manage.domain.hospitalpersoncertificate.HospitalPersonCertificate;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDTO;
import com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDtoo;
import com.xinelu.manage.mapper.hospitalpersoncertificate.HospitalPersonCertificateMapper;
import com.xinelu.manage.mapper.hospitalpersoninfo.HospitalPersonInfoMapper;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
@ -318,4 +319,14 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService
}
}
}
/**
* 修改医生手机号和密码
* @param hospitalPersonInfo
* @return
*/
@Override
public int editHospitalPersonInfo(HospitalPersonInfoDtoo hospitalPersonInfo) {
return hospitalPersonInfoMapper.editHospitalPersonInfo(hospitalPersonInfo);
}
}

View File

@ -1,187 +0,0 @@
<?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.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper">
<resultMap type="AppointmentOrderProcessRecord" id="AppointmentOrderProcessRecordResult">
<result property="id" column="id"/>
<result property="operatePersonId" column="operate_person_id"/>
<result property="appointmentOrderId" column="appointment_order_id"/>
<result property="appointmentOrderNo" column="appointment_order_no"/>
<result property="operateTime" column="operate_time"/>
<result property="operateType" column="operate_type"/>
<result property="operateDetails" column="operate_details"/>
<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>
<sql id="selectAppointmentOrderProcessRecordVo">
select id,
operate_person_id,
appointment_order_id,
appointment_order_no,
operate_time,
operate_type,
operate_details,
create_by,
create_time,
update_by,
update_time
from appointment_order_process_record
</sql>
<select id="selectAppointmentOrderProcessRecordList" parameterType="AppointmentOrderProcessRecord"
resultMap="AppointmentOrderProcessRecordResult">
<include refid="selectAppointmentOrderProcessRecordVo"/>
<where>
<if test="operatePersonId != null ">
and operate_person_id = #{operatePersonId}
</if>
<if test="appointmentOrderId != null ">
and appointment_order_id = #{appointmentOrderId}
</if>
<if test="appointmentOrderNo != null and appointmentOrderNo != ''">
and appointment_order_no = #{appointmentOrderNo}
</if>
<if test="operateTime != null ">
and operate_time = #{operateTime}
</if>
<if test="operateType != null and operateType != ''">
and operate_type = #{operateType}
</if>
<if test="operateDetails != null and operateDetails != ''">
and operate_details = #{operateDetails}
</if>
</where>
</select>
<select id="selectAppointmentOrderProcessRecordById" parameterType="Long"
resultMap="AppointmentOrderProcessRecordResult">
<include refid="selectAppointmentOrderProcessRecordVo"/>
where id = #{id}
</select>
<insert id="insertAppointmentOrderProcessRecord" parameterType="AppointmentOrderProcessRecord"
useGeneratedKeys="true"
keyProperty="id">
insert into appointment_order_process_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="operatePersonId != null">operate_person_id,
</if>
<if test="appointmentOrderId != null">appointment_order_id,
</if>
<if test="appointmentOrderNo != null">appointment_order_no,
</if>
<if test="operateTime != null">operate_time,
</if>
<if test="operateType != null">operate_type,
</if>
<if test="operateDetails != null">operate_details,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="operatePersonId != null">#{operatePersonId},
</if>
<if test="appointmentOrderId != null">#{appointmentOrderId},
</if>
<if test="appointmentOrderNo != null">#{appointmentOrderNo},
</if>
<if test="operateTime != null">#{operateTime},
</if>
<if test="operateType != null">#{operateType},
</if>
<if test="operateDetails != null">#{operateDetails},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updateAppointmentOrderProcessRecord" parameterType="AppointmentOrderProcessRecord">
update appointment_order_process_record
<trim prefix="SET" suffixOverrides=",">
<if test="operatePersonId != null">operate_person_id =
#{operatePersonId},
</if>
<if test="appointmentOrderId != null">appointment_order_id =
#{appointmentOrderId},
</if>
<if test="appointmentOrderNo != null">appointment_order_no =
#{appointmentOrderNo},
</if>
<if test="operateTime != null">operate_time =
#{operateTime},
</if>
<if test="operateType != null">operate_type =
#{operateType},
</if>
<if test="operateDetails != null">operate_details =
#{operateDetails},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppointmentOrderProcessRecordById" parameterType="Long">
delete
from appointment_order_process_record
where id = #{id}
</delete>
<delete id="deleteAppointmentOrderProcessRecordByIds" parameterType="String">
delete from appointment_order_process_record where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<insert id="insertAppointmentOrderProcessRecordList">
insert into appointment_order_process_record(
appointment_order_id,
appointment_order_no,
operate_time,
operate_type,
operate_details,
create_time
) values
<foreach item="appointmentOrderProcessRecordList" index="index" collection="list" separator=",">
(
#{appointmentOrderProcessRecordList.appointmentOrderId},
#{appointmentOrderProcessRecordList.appointmentOrderNo},
#{appointmentOrderProcessRecordList.operateTime},
#{appointmentOrderProcessRecordList.operateType},
#{appointmentOrderProcessRecordList.operateDetails},
#{appointmentOrderProcessRecordList.createTime}
)
</foreach>
</insert>
</mapper>

View File

@ -332,6 +332,57 @@
where id = #{id}
</update>
<update id="editHospitalPersonInfo" parameterType="com.xinelu.manage.dto.hospitalpersoninfo.HospitalPersonInfoDtoo">
update hospital_person_info
<trim prefix="SET" suffixOverrides=",">
<if test="hospitalId != null">hospital_id =
#{hospitalId},
</if>
<if test="departmentId != null">department_id =
#{departmentId},
</if>
<if test="personCode != null">person_code =
#{personCode},
</if>
<if test="personName != null">person_name =
#{personName},
</if>
person_phone = #{personPhone},
<if test="personAddress != null">person_address =
#{personAddress},
</if>
card_no = #{cardNo},
<if test="academicTitle != null">academic_title =
#{academicTitle},
</if>
<if test="consultingFee != null">consulting_fee =
#{consultingFee},
</if>
<if test="personIntroduce != null">person_introduce =
#{personIntroduce},
</if>
<if test="personSort != null">person_sort =
#{personSort},
</if>
<if test="personPictureUrl != null">person_picture_url =
#{personPictureUrl},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHospitalPersonInfoById" parameterType="Long">
delete
from hospital_person_info