Browse Source

1.兽医管理入驻审核页面,增加审核按钮,审核弹框,审核流程优化,增加单独查询兽医个人信息,资质列表,兽医信息审核,资质信息审核接口,增加审核相关字段

master
ma-zhongxu 4 weeks ago
parent
commit
f3ecab9ddf
  1. 113
      chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVetAuditController.java
  2. 49
      chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java
  3. 8
      chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java
  4. 6
      chenhai-system/src/main/java/com/chenhai/vet/service/IVetPersonalInfoService.java
  5. 5
      chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetPersonalInfoServiceImpl.java
  6. 17
      chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml
  7. 53
      chenhai-ui/src/api/system/vetAduit.js
  8. 1441
      chenhai-ui/src/views/system/vet/aduit/index.vue

113
chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVetAuditController.java

@ -0,0 +1,113 @@
package com.chenhai.web.controller.system;
import com.chenhai.common.annotation.Log;
import com.chenhai.common.core.controller.BaseController;
import com.chenhai.common.core.domain.AjaxResult;
import com.chenhai.common.core.page.TableDataInfo;
import com.chenhai.common.enums.BusinessType;
import com.chenhai.common.utils.SecurityUtils;
import com.chenhai.common.utils.poi.ExcelUtil;
import com.chenhai.vet.domain.VetPersonalInfo;
import com.chenhai.vet.domain.VetQualification;
import com.chenhai.vet.service.IVetPersonalInfoService;
import com.chenhai.vet.service.IVetQualificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 兽医信息审核管理Controller
* 专门用于管理后台的兽医信息审核功能
*/
@RestController
@RequestMapping("/sys/vet/audit")
public class SysVetAuditController extends BaseController
{
@Autowired
private IVetPersonalInfoService vetPersonalInfoService;
@Autowired
private IVetQualificationService vetQualificationService;
/**
* 查询兽医信息列表审核管理专用
*/
@PreAuthorize("@ss.hasPermi('sys:vetAudit:list')")
@GetMapping("/list")
public TableDataInfo list(VetPersonalInfo vetPersonalInfo)
{
startPage();
List<VetPersonalInfo> list = vetPersonalInfoService.selectVetPersonalInfoList(vetPersonalInfo);
return getDataTable(list);
}
/**
* 获取兽医完整审核信息包含证书详情
*/
@PreAuthorize("@ss.hasPermi('sys:vetAudit:view')")
@GetMapping("/full/{id}")
public AjaxResult getAuditFullInfo(@PathVariable("id") Long id)
{
Map<String, Object> fullInfo = vetPersonalInfoService.getVetFullInfoWithQualifications(id);
if (fullInfo == null || fullInfo.isEmpty()) {
return AjaxResult.error("兽医信息不存在");
}
return AjaxResult.success(fullInfo);
}
/**
* 获取兽医个人信息详细信息
*/
@PreAuthorize("@ss.hasPermi('sys:vetAudit:userInfo')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(vetPersonalInfoService.selectVetPersonalInfoById(id));
}
/**
* 兽医个人信息审核
*/
@Log(title = "兽医信息审核", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('sys:vetAudit:auditVetPersonalInfo')")
@PostMapping("/auditVetPersonalInfo")
public AjaxResult auditVetPersonalInfo(@RequestBody VetPersonalInfo vetPersonalInfo)
{
return toAjax(vetPersonalInfoService.auditVetPersonalInfo(vetPersonalInfo));
}
/**
* 查询兽医资质列表含证书信息
*/
@PreAuthorize("@ss.hasPermi('vet:qualification:list')")
@GetMapping("/listQualification")
public TableDataInfo listQualification(VetQualification vetQualification)
{
startPage();
Long userId = SecurityUtils.getUserId();
if (!SecurityUtils.isAdmin(userId)) {
vetQualification.setUserId(userId);
}
List<VetQualification> list = vetQualificationService.selectVetQualificationList(vetQualification);
return getDataTable(list);
}
/**
* 资质证书审核接口
*/
@Log(title = "兽医资质证书审核", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('sys:vetAudit:qualificationAudit')")
@PostMapping("/qualificationAudit")
public AjaxResult qualificationAudit(@RequestBody VetQualification vetQualification) {
vetQualification.setAuditTime(new Date());
return toAjax(vetQualificationService.updateVetQualification(vetQualification));
}
}

49
chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java

@ -90,6 +90,23 @@ public class VetPersonalInfo extends BaseEntity
@Excel(name = "用户昵称")
private String nickName;
/** 审核状态 */
@Excel(name = "审核状态")
private String auditStatus;
/** 审核人 */
@Excel(name = "审核人")
private String auditor;
/** 审核时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date auditTime;
/** 审核描述 */
@Excel(name = "审核描述")
private String auditDesc;
// 添加getter和setter
public void setId(Long id)
{
@ -269,6 +286,38 @@ public class VetPersonalInfo extends BaseEntity
this.user = user;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getAuditor() {
return auditor;
}
public void setAuditor(String auditor) {
this.auditor = auditor;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public String getAuditDesc() {
return auditDesc;
}
public void setAuditDesc(String auditDesc) {
this.auditDesc = auditDesc;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

8
chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java

@ -43,6 +43,14 @@ public interface VetPersonalInfoMapper
*/
public int updateVetPersonalInfo(VetPersonalInfo vetPersonalInfo);
/**
* 审核兽医个人信息
*
* @param vetPersonalInfo 兽医个人信息
* @return 结果
*/
public int auditVetPersonalInfo(VetPersonalInfo vetPersonalInfo);
/**
* 删除兽医个人信息
*

6
chenhai-system/src/main/java/com/chenhai/vet/service/IVetPersonalInfoService.java

@ -45,6 +45,8 @@ public interface IVetPersonalInfoService
*/
public int updateVetPersonalInfo(VetPersonalInfo vetPersonalInfo);
public int auditVetPersonalInfo(VetPersonalInfo vetPersonalInfo);
/**
* 批量删除兽医个人信息
*
@ -79,8 +81,4 @@ public interface IVetPersonalInfoService
Map<String, Object> getVetFullInfoWithQualifications(Long id);
Map<String, Object> getVetFullInfoWithQualificationsByUserId(Long userId);
}

5
chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetPersonalInfoServiceImpl.java

@ -198,6 +198,11 @@ public class VetPersonalInfoServiceImpl implements IVetPersonalInfoService {
}
}
@Override
public int auditVetPersonalInfo(VetPersonalInfo vetPersonalInfo) {
return vetPersonalInfoMapper.auditVetPersonalInfo(vetPersonalInfo);
}
/**
* 根据用户ID查询兽医个人信息
*/

17
chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml

@ -27,6 +27,10 @@
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="auditStatus" column="audit_status"/>
<result property="auditTime" column="audit_time"/>
<result property="auditor" column="auditor"/>
<result property="auditDesc" column="audit_desc"/>
<!-- 关联 SysUser 对象 -->
<association property="user" javaType="SysUser">
@ -50,6 +54,7 @@
v.id, v.user_id, v.real_name, v.gender, v.birthday, v.id_card, v.specialty, v.work_experience,
v.hospital, v.address, v.iphone, v.introduction, v.title, v.phone,
v.expert_type, v.email, v.nick_name, v.create_by, v.create_time, v.update_by, v.update_time,
v.audit_status, v.audit_time, v.auditor, v.audit_desc,
u.user_id as u_user_id,
u.nick_name as u_nick_name,
u.email as u_email
@ -183,6 +188,18 @@
where id = #{id}
</update>
<update id="auditVetPersonalInfo" parameterType="VetPersonalInfo">
UPDATE vet_personal_info
<set>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="auditor != null">auditor = #{auditor},</if>
<if test="auditTime != null">audit_time = #{auditTime},</if>
<if test="auditDesc != null">audit_desc = #{auditDesc},</if>
update_time = sysdate()
</set>
WHERE id = #{id}
</update>
<!-- 删除操作保持不变 -->
<delete id="deleteVetPersonalInfoById" parameterType="Long">
delete from vet_personal_info where id = #{id}

53
chenhai-ui/src/api/system/vetAduit.js

@ -0,0 +1,53 @@
import request from '@/utils/request'
// 查询兽医个人信息列表
export function listInfo(query) {
return request({
url: '/sys/vet/audit/list',
method: 'get',
params: query
})
}
// 查询兽医个人信息详细
export function getInfo(id) {
return request({
url: '/sys/vet/audit/' + id,
method: 'get'
})
}
// 兽医个人信息详情
export function getfull(id) {
return request({
url: '/sys/vet/audit/full/' + id,
method: 'get'
})
}
// 基本信息审核
export function auditBasicInfo(data) {
return request({
url: '/sys/vet/audit/auditVetPersonalInfo',
method: 'post',
data: data
})
}
// 查询兽医资质证书列表
export function listQualification(query) {
return request({
url: '/sys/vet/audit/listQualification',
method: 'get',
params: query
})
}
// 资质证书审核
export function auditCertificate(data) {
return request({
url: '/sys/vet/audit/qualificationAudit',
method: 'post',
data: data
})
}

1441
chenhai-ui/src/views/system/vet/aduit/index.vue
File diff suppressed because it is too large
View File

Loading…
Cancel
Save