8 changed files with 1688 additions and 4 deletions
-
113chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVetAuditController.java
-
49chenhai-system/src/main/java/com/chenhai/vet/domain/VetPersonalInfo.java
-
8chenhai-system/src/main/java/com/chenhai/vet/mapper/VetPersonalInfoMapper.java
-
6chenhai-system/src/main/java/com/chenhai/vet/service/IVetPersonalInfoService.java
-
5chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetPersonalInfoServiceImpl.java
-
17chenhai-system/src/main/resources/mapper/vet/VetPersonalInfoMapper.xml
-
53chenhai-ui/src/api/system/vetAduit.js
-
1441chenhai-ui/src/views/system/vet/aduit/index.vue
@ -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)); |
|||
} |
|||
|
|||
} |
|||
@ -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
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue