新增校验用户就诊卡信息切面类
This commit is contained in:
4
.idea/MarsCodeWorkspaceAppSettings.xml
generated
4
.idea/MarsCodeWorkspaceAppSettings.xml
generated
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
||||
<option name="ckgOperationStatus" value="SUCCESS" />
|
||||
<option name="progress" value="0.9927478" />
|
||||
<option name="ckgOperationStatus" value="DELETE" />
|
||||
<option name="lastCKGNotifyTime" value="1770603565559" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -7,10 +7,10 @@
|
||||
<map>
|
||||
<entry key="com.zeroturnaround.jrebel.FormatVersion" value="7.0.0" />
|
||||
<entry key="jrebelEnabled" value="true" />
|
||||
<entry key="lastExternalPluginCheckTime" value="1760511839624" />
|
||||
<entry key="lastExternalPluginCheckTime" value="1770600825542" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="version" value="11" />
|
||||
<option name="version" value="15" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
|
||||
@@ -6,8 +6,10 @@ import com.guahao.WebLog;
|
||||
import com.guahao.api.counts.model.InterfaceCount;
|
||||
import com.guahao.api.counts.service.InterfaceCountService;
|
||||
// import com.guahao.api.walkinto.service.PayService;
|
||||
import com.guahao.common.annotation.CheckPatientId;
|
||||
import com.guahao.common.response.ErrorCode;
|
||||
import com.guahao.common.response.ResponseResult;
|
||||
import com.guahao.common.util.SafeUtil;
|
||||
import com.guahao.common.util.XmlUtil;
|
||||
import com.guahao.h5.hsjc.mapper.HsjcMapper;
|
||||
import com.guahao.h5.hsjc.service.HsjcService;
|
||||
@@ -63,6 +65,7 @@ public class HsjcController {
|
||||
|
||||
@RequestMapping("/opPacscx")
|
||||
@WebLog(description = "opPacscx")
|
||||
|
||||
public Object opPacscx(Integer userId, String token,
|
||||
String QueryCode, Integer QueryType, String StartTime, String EndTime) {
|
||||
|
||||
|
||||
@@ -174,8 +174,8 @@ public class ReserveController {
|
||||
*/
|
||||
@RequestMapping(value = "/opBillsPayedRefund", method = RequestMethod.POST)
|
||||
@WebLog(description = "opBillsPayedRefund")
|
||||
// 移除了 @Transactional(rollbackFor = Exception.class) 注解,取消事务控制
|
||||
public Object opBillsPayedRefund(HisRefundVo vo) {
|
||||
//可改造成callable多线程,返回结果判断,加快速度
|
||||
try {
|
||||
log.info("退费vo: {}", vo);
|
||||
// 1. 执行退号
|
||||
|
||||
@@ -53,5 +53,5 @@ public interface UserCardMapper extends BaseMapper<UserCard> {
|
||||
|
||||
List<UserCardVo> selectByPatientId(@Param("patientId") String patientId);
|
||||
|
||||
List<String> selectByUserId(Integer uid);
|
||||
List<UserCard> selectByUserId(Integer userId);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.guahao.h5.user.service;
|
||||
|
||||
import com.guahao.common.Exception.LogicException;
|
||||
import com.guahao.common.util.SafeUtil;
|
||||
import com.guahao.common.util.SoapUtil;
|
||||
import com.guahao.common.util.XmlUtil;
|
||||
import com.guahao.h5.message.service.MessageCenterService;
|
||||
import com.guahao.h5.message.vo.MessageCenterVo;
|
||||
import com.guahao.h5.user.mapper.UserCardMapper;
|
||||
import com.guahao.h5.user.model.UserCard;
|
||||
import com.guahao.h5.user.model.UserCardVo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -26,6 +28,8 @@ public class UserCardService {
|
||||
|
||||
@Autowired
|
||||
private MessageCenterService messageCenterService;
|
||||
@Autowired
|
||||
private SafeUtil safeUtil;
|
||||
|
||||
/**
|
||||
* 查询本地所有就诊卡
|
||||
@@ -67,6 +71,8 @@ public class UserCardService {
|
||||
*/
|
||||
public int queryUserCard(UserCardVo vo) throws Exception {
|
||||
int resultInt = 0;
|
||||
// 清除该用户的缓存,确保下次查询能拿到最新数据
|
||||
safeUtil.clearUserCardCache(vo.getUserId());
|
||||
log.info("开始执行查询queryUserCard");
|
||||
//isModify 0 -- 查询 1 -- 修改
|
||||
if (vo.getIsModify().equals("0")) {
|
||||
@@ -246,6 +252,8 @@ public class UserCardService {
|
||||
*/
|
||||
public int insertUserCard(UserCardVo vo) throws Exception {
|
||||
int resultInt = 0;
|
||||
// 清除该用户的缓存,确保下次查询能拿到最新数据
|
||||
safeUtil.clearUserCardCache(vo.getUserId());
|
||||
if (vo.getId() == null) {
|
||||
resultInt = userCardMapper.selectCardCount(vo);
|
||||
if (resultInt != 0) {
|
||||
@@ -340,6 +348,12 @@ public class UserCardService {
|
||||
* 删除就诊卡
|
||||
*/
|
||||
public int deleteUserCard(Integer userId,Integer id) throws Exception {
|
||||
// 清除该用户的缓存,确保下次查询能拿到最新数据
|
||||
safeUtil.clearUserCardCache(userId);
|
||||
return userCardMapper.deleteUserCard(userId,id);
|
||||
}
|
||||
|
||||
public List<UserCard> selectByUserId(Integer userId) {
|
||||
return userCardMapper.selectByUserId(userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.guahao.common.Exception.LogicException;
|
||||
import com.guahao.common.util.MD5Util;
|
||||
import com.guahao.common.util.VeDate;
|
||||
import com.guahao.h5.user.mapper.UserMapper;
|
||||
import com.guahao.h5.user.model.UserCard;
|
||||
import com.guahao.h5.user.model.UserVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -197,4 +198,25 @@ public class UserService {
|
||||
}
|
||||
return userMapper.isBlack(userId);
|
||||
}
|
||||
public Boolean hasUser(Integer userId, String patientId) {
|
||||
//判断该id下是否有绑定所查的用户信息
|
||||
List<UserCard> list = userCardService.selectByUserId(userId);
|
||||
|
||||
if (list == null || list.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查用户是否绑定了特定的就诊卡号
|
||||
for (UserCard userCard : list) {
|
||||
if (patientId.equals(userCard.getCard_no())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<UserCard> queryUserCardsByUserId(Integer userId) {
|
||||
return userCardService.selectByUserId(userId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.guahao.h5.token.service.TokenService;
|
||||
import com.guahao.h5.token.vo.TokenVo;
|
||||
import com.guahao.h5.user.mapper.UserCardMapper;
|
||||
import com.guahao.h5.user.mapper.UserMapper;
|
||||
import com.guahao.h5.user.model.UserCard;
|
||||
import com.guahao.h5.user.model.UserCardVo;
|
||||
import com.guahao.h5.user.model.UserVo;
|
||||
import com.guahao.h5.user.service.UserService;
|
||||
@@ -98,10 +99,10 @@ public class YbController {
|
||||
String json = ybService.getPayAuthCode(qrcode,openid);
|
||||
JSONObject jsonObject1 = JSON.parseObject(json);
|
||||
String payAuthNo = jsonObject1.getString("pay_auth_no");
|
||||
List<String> cardList = userCardMapper.selectByUserId(uid);
|
||||
List<UserCard> cardList = userCardMapper.selectByUserId(uid);
|
||||
if (cardList.size() > 0){
|
||||
cardList.forEach(cardNo -> {
|
||||
hsjcMapper.updatePayAuthNoList(payAuthNo,cardNo);
|
||||
cardList.forEach(vo -> {
|
||||
hsjcMapper.updatePayAuthNoList(payAuthNo,vo.getCard_no());
|
||||
});
|
||||
}
|
||||
IDVO vo =userCardMapper.queryUserCardDefaltByOpenid(openid);
|
||||
|
||||
@@ -151,8 +151,9 @@
|
||||
<select id="selectByPatientId" resultType="com.guahao.h5.user.model.UserCardVo">
|
||||
select * from user_card where patient_id = #{patientId} AND deleted = 0
|
||||
</select>
|
||||
<select id="selectByUserId" resultType="java.lang.String">
|
||||
select card_no from user_card where user_id = #{uid} AND deleted = 0
|
||||
|
||||
<select id="selectByUserId" resultType="com.guahao.h5.user.model.UserCard">
|
||||
select * from user_card where user_id = #{userId} AND deleted = 0
|
||||
</select>
|
||||
|
||||
<!--新增就诊卡-->
|
||||
|
||||
Reference in New Issue
Block a user