增加了登录验证

This commit is contained in:
wucongxing8150 2025-07-08 14:04:04 +08:00
parent aa3d6d91cf
commit a7275b5048
9 changed files with 53 additions and 26 deletions

View File

@ -42,7 +42,7 @@ public class ExpertWhiteEntity {
* 行政区划代码
*/
@TableField("prov")
private String province;
private String prov;
/**
* 科室

View File

@ -243,7 +243,7 @@ public class ExpertController {
Integer city_id = (Integer) data.get("city_id");
// 获取白名单用户-姓名医院名称
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(name,hospital_name);
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(mobile,name,hospital_name);
if (expertWhiteEntity == null) {
return ResponseDTO.error(NO_AUTH);
}
@ -485,7 +485,7 @@ public class ExpertController {
Integer city_id = (Integer) data.get("city_id");
// 获取白名单用户-姓名医院名称
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(name,hospital_name);
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(mobile,name,hospital_name);
if (expertWhiteEntity == null) {
return ResponseDTO.error(NO_AUTH);
}

View File

@ -169,8 +169,6 @@ public class ExpertFxqController {
return ResponseDTO.app_ok(g);
}
}
}
// 获取企业放心签实名认证数据
@ -179,7 +177,6 @@ public class ExpertFxqController {
// 获取个人放心签实名认证数据
FxqUserEntity fxqUser = expertFxqService.getPersonal(expertId);
// 获取签署的模版数据
FxqTemplateEntity fxqTemplate = expertFxqService.getTemplate(company.getId());

View File

@ -1,10 +1,12 @@
package net.lab1024.sa.admin.module.app.expert.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertVO;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertWhiteEntity;
import net.lab1024.sa.admin.module.app.expert.dao.ExpertDao;
import net.lab1024.sa.admin.module.app.expert.dao.ExpertWhiteEntityDao;
import net.lab1024.sa.admin.module.app.expert.domain.entity.CasePlatformBankEntity;
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDao;
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
import net.lab1024.sa.admin.module.business.token.service.TokenService;
@ -26,12 +28,24 @@ public class ExpertWhiteEntityService {
* @param hospitalName 专家所属医院名称
* @return 白名单类
*/
public ExpertWhiteEntity getExpertWhiteEntityByNameAndHospitalName(String name, String hospitalName) {
if (name == null || hospitalName == null) {
public ExpertWhiteEntity getExpertWhiteEntityByNameAndHospitalName(String mobile,String name, String hospitalName) {
if ((name == null || hospitalName == null) && mobile == null) {
return null;
}
return expertWhiteEntityDao.getExpertWhiteByNameAndHospital(name, hospitalName);
if (mobile != null){
LambdaQueryWrapper<ExpertWhiteEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ExpertWhiteEntity::getMobile, mobile);
ExpertWhiteEntity expertWhite = expertWhiteEntityDao.selectOne(queryWrapper);
if (expertWhite != null) {
return expertWhite;
}
}
LambdaQueryWrapper<ExpertWhiteEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ExpertWhiteEntity::getName, name);
queryWrapper.eq(ExpertWhiteEntity::getHospitalName, hospitalName);
return expertWhiteEntityDao.selectOne(queryWrapper);
}
}

View File

@ -246,7 +246,7 @@ public class CaseplatformCaseExcelController {
response.setCharacterEncoding("utf-8");
writer.finish();
// outputStream.close();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();

View File

@ -37,7 +37,7 @@ public class CaseplatformCaseEntity {
/**
* 病历类型
*/
private Integer caseType;
private String caseType;
/**
* 专家 id

View File

@ -241,8 +241,8 @@ public class CaseplatformCaseService {
for (Iterator<Row> it = sheet.rowIterator(); it.hasNext();) {
Row row = it.next();
// 跳过第一行
if (rowNum++ == 0 || rowNum++ == 1) continue;
// 跳过第一行/二行
if (rowNum++ <= 2) continue;
// 判断整行是否为空
boolean isEmptyRow = true;
@ -257,6 +257,7 @@ public class CaseplatformCaseService {
continue; // 跳过空行
}
String index = "";
String name = "";
String bankName = "";
String prov = "";
@ -273,19 +274,20 @@ public class CaseplatformCaseService {
DataFormatter dataFormatter = new DataFormatter();
Cell cell0 = row.getCell(0); if (cell0 != null) name = cell0.toString().trim();
Cell cell0 = row.getCell(0); if (cell0 != null) index = cell0.toString().trim();
Cell cell1 = row.getCell(1); if (cell1 != null) bankName = cell1.toString().trim();
Cell cell2 = row.getCell(2); if (cell2 != null) prov = cell2.toString().trim();
Cell cell3 = row.getCell(3); if (cell3 != null) city = cell3.toString().trim();
Cell cell4 = row.getCell(4); if (cell4 != null) bankCardNo = cell4.toString().trim();
Cell cell5 = row.getCell(5); if (cell5 != null) actualAmountStr = dataFormatter.formatCellValue(cell5).trim();
Cell cell6 = row.getCell(6); if (cell6 != null) remark = cell6.toString().trim();
Cell cell7 = row.getCell(7); if (cell7 != null) taxAmountStr = dataFormatter.formatCellValue(cell7).trim();
Cell cell8 = row.getCell(8); if (cell8 != null) totalAmountStr = dataFormatter.formatCellValue(cell8).trim();
Cell cell9 = row.getCell(9); if (cell9 != null) hospitalName = cell9.toString().trim();
Cell cell10 = row.getCell(10); if (cell10 != null) mobile = dataFormatter.formatCellValue(cell10).trim();
Cell cell11 = row.getCell(11); if (cell11 != null) idCardNo = dataFormatter.formatCellValue(cell11).trim();
Cell cell12 = row.getCell(11); if (cell11 != null) relatedCaseId = dataFormatter.formatCellValue(cell12).trim();
Cell cell5 = row.getCell(5); if (cell5 != null) name = cell5.toString().trim();
Cell cell6 = row.getCell(6); if (cell6 != null) actualAmountStr = dataFormatter.formatCellValue(cell6).trim();
Cell cell7 = row.getCell(7); if (cell7 != null) remark = cell7.toString().trim();
Cell cell8 = row.getCell(8); if (cell8 != null) taxAmountStr = dataFormatter.formatCellValue(cell8).trim();
Cell cell9 = row.getCell(9); if (cell9 != null) totalAmountStr = dataFormatter.formatCellValue(cell9).trim();
Cell cell10 = row.getCell(10); if (cell10 != null) hospitalName = cell10.toString().trim();
Cell cell11 = row.getCell(11); if (cell11 != null) mobile = dataFormatter.formatCellValue(cell11).trim();
Cell cell12 = row.getCell(12); if (cell12 != null) idCardNo = dataFormatter.formatCellValue(cell12).trim();
Cell cell13 = row.getCell(13); if (cell13 != null) relatedCaseId = dataFormatter.formatCellValue(cell13).trim();
// 病例id
String[] caseIdList = relatedCaseId.split(",");

View File

@ -16,7 +16,9 @@ import me.chanjar.weixin.common.error.WxErrorException;
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertLoginVO;
import net.lab1024.sa.admin.module.app.expert.admin.ExpertWhiteEntity;
import net.lab1024.sa.admin.module.app.expert.service.ExpertService;
import net.lab1024.sa.admin.module.app.expert.service.ExpertWhiteEntityService;
import net.lab1024.sa.admin.module.business.captcha.service.CaptchaService;
import net.lab1024.sa.admin.module.wx.miniapp.utils.JsonUtils;
import net.lab1024.sa.common.common.annoation.NoNeedLogin;
@ -36,6 +38,8 @@ import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import static net.lab1024.sa.common.common.code.UserErrorCode.NO_AUTH;
/**
* 微信小程序用户接口
*
@ -49,6 +53,9 @@ public class WxMaUserController {
private final WxMaService wxMaService;
@Autowired
private ExpertWhiteEntityService expertWhiteEntityService;
public WxMaUserController(WxMaService wxMaService) {
this.wxMaService = wxMaService;
}
@ -159,6 +166,15 @@ public class WxMaUserController {
Integer prov_id = (Integer) data.get("prov_id");
Integer county_id = (Integer) data.get("county_id");
Integer city_id = (Integer) data.get("city_id");
// 获取白名单用户-姓名医院名称
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(phoneNumber,name,hospital_name);
if (expertWhiteEntity == null) {
return ResponseDTO.error(NO_AUTH);
}
ExpertEntity expert = new ExpertEntity();
expert.setName(name);
if(StrUtil.isBlank(photo)){

View File

@ -150,10 +150,8 @@
OR INSTR(t_caseplatform_case.expert_name,#{queryForm.name})
)
</if>
<!--0待审核 1审核通过 2审核不通过-->
<if test="queryForm.status != null">
AND t_caseplatform_case.status = 1
</if>
AND t_caseplatform_case.status = 1
AND t_caseplatform_case.settlement_flag = 0
<if test="queryForm.settlementFlag != null">
AND t_caseplatform_case.settlement_flag = #{queryForm.settlementFlag}
</if>