diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java index b793b23..126f46f 100644 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java @@ -3,6 +3,8 @@ package com.chenhai.web.controller.muhu; import com.chenhai.common.core.controller.BaseController; import com.chenhai.common.core.domain.AjaxResult; import com.chenhai.common.core.domain.entity.SysArea; +import com.chenhai.common.core.domain.entity.SysUser; +import com.chenhai.common.core.domain.model.LoginUser; import com.chenhai.system.service.ISysAreaService; import com.chenhai.system.service.ISysUserService; import org.springframework.beans.factory.annotation.Autowired; @@ -38,8 +40,16 @@ public class MuhuUserController extends BaseController } @PreAuthorize("@ss.hasRole('muhu')") - @PutMapping("/saveUserAreaCode") - public AjaxResult getArea(@RequestParam(value = "areaCode") String areaCode) { + @GetMapping("/getUserInfo") + public AjaxResult checkUserAreaCode() { + LoginUser loginUser = getLoginUser(); + SysUser user = loginUser.getUser(); + return success(user); + } + + @PreAuthorize("@ss.hasRole('muhu')") + @PutMapping("/saveUserAreaCode/{areaCode}") + public AjaxResult getArea(@PathVariable("areaCode") String areaCode) { Long userId = getUserId(); return toAjax(sysUserService.updateUserAreaCode(userId, areaCode)); } diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacCategoryController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacCategoryController.java new file mode 100644 index 0000000..879fb74 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacCategoryController.java @@ -0,0 +1,104 @@ +package com.chenhai.web.controller.system; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +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 com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.system.domain.SysVacCategory; +import com.chenhai.system.service.ISysVacCategoryService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 疫苗类别Controller + * + * @author ruoyi + * @date 2026-01-29 + */ +@RestController +@RequestMapping("/system/vacCategory") +public class SysVacCategoryController extends BaseController +{ + @Autowired + private ISysVacCategoryService sysVacCategoryService; + + /** + * 查询疫苗类别列表 + */ + @PreAuthorize("@ss.hasPermi('system:vacCategory:list')") + @GetMapping("/list") + public TableDataInfo list(SysVacCategory sysVacCategory) + { + startPage(); + List list = sysVacCategoryService.selectSysVacCategoryList(sysVacCategory); + return getDataTable(list); + } + + /** + * 导出疫苗类别列表 + */ + @PreAuthorize("@ss.hasPermi('system:vacCategory:export')") + @Log(title = "疫苗类别", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysVacCategory sysVacCategory) + { + List list = sysVacCategoryService.selectSysVacCategoryList(sysVacCategory); + ExcelUtil util = new ExcelUtil(SysVacCategory.class); + util.exportExcel(response, list, "疫苗类别数据"); + } + + /** + * 获取疫苗类别详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:vacCategory:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysVacCategoryService.selectSysVacCategoryById(id)); + } + + /** + * 新增疫苗类别 + */ + @PreAuthorize("@ss.hasPermi('system:vacCategory:add')") + @Log(title = "疫苗类别", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysVacCategory sysVacCategory) + { + return toAjax(sysVacCategoryService.insertSysVacCategory(sysVacCategory)); + } + + /** + * 修改疫苗类别 + */ + @PreAuthorize("@ss.hasPermi('system:vacCategory:edit')") + @Log(title = "疫苗类别", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysVacCategory sysVacCategory) + { + return toAjax(sysVacCategoryService.updateSysVacCategory(sysVacCategory)); + } + + /** + * 删除疫苗类别 + */ + @PreAuthorize("@ss.hasPermi('system:vacCategory:remove')") + @Log(title = "疫苗类别", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysVacCategoryService.deleteSysVacCategoryByIds(ids)); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacCategory.java b/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacCategory.java new file mode 100644 index 0000000..44f5ff6 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacCategory.java @@ -0,0 +1,389 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 疫苗类别对象 sys_vac_category + * + * @author ruoyi + * @date 2026-01-29 + */ +public class SysVacCategory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 疫苗ID */ + private Long id; + + /** 兽药批准文号 */ + @Excel(name = "兽药批准文号") + private String approvalNumber; + + /** 产品批号 */ + @Excel(name = "产品批号") + private String batchNumber; + + /** 通用名称(国家标准名称) */ + @Excel(name = "通用名称", readConverterExp = "国=家标准名称") + private String genericName; + + /** 商品名称(品牌名称) */ + @Excel(name = "商品名称", readConverterExp = "品=牌名称") + private String tradeName; + + /** 规格,如:100ml/瓶 */ + @Excel(name = "规格,如:100ml/瓶") + private String specification; + + /** 生产厂家 */ + @Excel(name = "生产厂家") + private String manufacturer; + + /** 生产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date manufactureDate; + + /** 有效期至 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "有效期至", width = 30, dateFormat = "yyyy-MM-dd") + private Date expiryDate; + + /** 适用动物(逗号分隔字典值) */ + @Excel(name = "适用动物", readConverterExp = "逗=号分隔字典值") + private String livestockTypes; + + /** 预防疫病 */ + @Excel(name = "预防疫病") + private String preventDisease; + + /** 是否强制免疫:0-否 1-是 */ + @Excel(name = "是否强制免疫:0-否 1-是") + private String isMandatory; + + /** 免疫期(天) */ + @Excel(name = "免疫期", readConverterExp = "天=") + private Long immunePeriod; + + /** 用法用量 */ + @Excel(name = "用法用量") + private String dosage; + + /** 接种途径(字典) */ + @Excel(name = "接种途径", readConverterExp = "字=典") + private String administrationRoute; + + /** 贮藏条件 */ + @Excel(name = "贮藏条件") + private String storageCondition; + + /** 注意事项 */ + @Excel(name = "注意事项") + private String precautions; + + /** 状态:1-可用 0-停用 */ + @Excel(name = "状态:1-可用 0-停用") + private String status; + + /** 库存数量 */ + @Excel(name = "库存数量") + private Long stockQuantity; + + /** 已使用数量 */ + @Excel(name = "已使用数量") + private Long usedQuantity; + + /** 创建者 */ + @Excel(name = "创建者") + private String createdBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdTime; + + /** 更新者 */ + @Excel(name = "更新者") + private String updatedBy; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updatedTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setApprovalNumber(String approvalNumber) + { + this.approvalNumber = approvalNumber; + } + + public String getApprovalNumber() + { + return approvalNumber; + } + + public void setBatchNumber(String batchNumber) + { + this.batchNumber = batchNumber; + } + + public String getBatchNumber() + { + return batchNumber; + } + + public void setGenericName(String genericName) + { + this.genericName = genericName; + } + + public String getGenericName() + { + return genericName; + } + + public void setTradeName(String tradeName) + { + this.tradeName = tradeName; + } + + public String getTradeName() + { + return tradeName; + } + + public void setSpecification(String specification) + { + this.specification = specification; + } + + public String getSpecification() + { + return specification; + } + + public void setManufacturer(String manufacturer) + { + this.manufacturer = manufacturer; + } + + public String getManufacturer() + { + return manufacturer; + } + + public void setManufactureDate(Date manufactureDate) + { + this.manufactureDate = manufactureDate; + } + + public Date getManufactureDate() + { + return manufactureDate; + } + + public void setExpiryDate(Date expiryDate) + { + this.expiryDate = expiryDate; + } + + public Date getExpiryDate() + { + return expiryDate; + } + + public void setLivestockTypes(String livestockTypes) + { + this.livestockTypes = livestockTypes; + } + + public String getLivestockTypes() + { + return livestockTypes; + } + + public void setPreventDisease(String preventDisease) + { + this.preventDisease = preventDisease; + } + + public String getPreventDisease() + { + return preventDisease; + } + + public void setIsMandatory(String isMandatory) + { + this.isMandatory = isMandatory; + } + + public String getIsMandatory() + { + return isMandatory; + } + + public void setImmunePeriod(Long immunePeriod) + { + this.immunePeriod = immunePeriod; + } + + public Long getImmunePeriod() + { + return immunePeriod; + } + + public void setDosage(String dosage) + { + this.dosage = dosage; + } + + public String getDosage() + { + return dosage; + } + + public void setAdministrationRoute(String administrationRoute) + { + this.administrationRoute = administrationRoute; + } + + public String getAdministrationRoute() + { + return administrationRoute; + } + + public void setStorageCondition(String storageCondition) + { + this.storageCondition = storageCondition; + } + + public String getStorageCondition() + { + return storageCondition; + } + + public void setPrecautions(String precautions) + { + this.precautions = precautions; + } + + public String getPrecautions() + { + return precautions; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setStockQuantity(Long stockQuantity) + { + this.stockQuantity = stockQuantity; + } + + public Long getStockQuantity() + { + return stockQuantity; + } + + public void setUsedQuantity(Long usedQuantity) + { + this.usedQuantity = usedQuantity; + } + + public Long getUsedQuantity() + { + return usedQuantity; + } + + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + + public void setUpdatedBy(String updatedBy) + { + this.updatedBy = updatedBy; + } + + public String getUpdatedBy() + { + return updatedBy; + } + + public void setUpdatedTime(Date updatedTime) + { + this.updatedTime = updatedTime; + } + + public Date getUpdatedTime() + { + return updatedTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("approvalNumber", getApprovalNumber()) + .append("batchNumber", getBatchNumber()) + .append("genericName", getGenericName()) + .append("tradeName", getTradeName()) + .append("specification", getSpecification()) + .append("manufacturer", getManufacturer()) + .append("manufactureDate", getManufactureDate()) + .append("expiryDate", getExpiryDate()) + .append("livestockTypes", getLivestockTypes()) + .append("preventDisease", getPreventDisease()) + .append("isMandatory", getIsMandatory()) + .append("immunePeriod", getImmunePeriod()) + .append("dosage", getDosage()) + .append("administrationRoute", getAdministrationRoute()) + .append("storageCondition", getStorageCondition()) + .append("precautions", getPrecautions()) + .append("status", getStatus()) + .append("stockQuantity", getStockQuantity()) + .append("usedQuantity", getUsedQuantity()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacCategoryMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacCategoryMapper.java new file mode 100644 index 0000000..c88d253 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacCategoryMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.SysVacCategory; + +/** + * 疫苗类别Mapper接口 + * + * @author ruoyi + * @date 2026-01-29 + */ +public interface SysVacCategoryMapper +{ + /** + * 查询疫苗类别 + * + * @param id 疫苗类别主键 + * @return 疫苗类别 + */ + public SysVacCategory selectSysVacCategoryById(Long id); + + /** + * 查询疫苗类别列表 + * + * @param sysVacCategory 疫苗类别 + * @return 疫苗类别集合 + */ + public List selectSysVacCategoryList(SysVacCategory sysVacCategory); + + /** + * 新增疫苗类别 + * + * @param sysVacCategory 疫苗类别 + * @return 结果 + */ + public int insertSysVacCategory(SysVacCategory sysVacCategory); + + /** + * 修改疫苗类别 + * + * @param sysVacCategory 疫苗类别 + * @return 结果 + */ + public int updateSysVacCategory(SysVacCategory sysVacCategory); + + /** + * 删除疫苗类别 + * + * @param id 疫苗类别主键 + * @return 结果 + */ + public int deleteSysVacCategoryById(Long id); + + /** + * 批量删除疫苗类别 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysVacCategoryByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacCategoryService.java b/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacCategoryService.java new file mode 100644 index 0000000..97fbe59 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacCategoryService.java @@ -0,0 +1,61 @@ +package com.chenhai.system.service; + +import java.util.List; +import com.chenhai.system.domain.SysVacCategory; + +/** + * 疫苗类别Service接口 + * + * @author ruoyi + * @date 2026-01-29 + */ +public interface ISysVacCategoryService +{ + /** + * 查询疫苗类别 + * + * @param id 疫苗类别主键 + * @return 疫苗类别 + */ + public SysVacCategory selectSysVacCategoryById(Long id); + + /** + * 查询疫苗类别列表 + * + * @param sysVacCategory 疫苗类别 + * @return 疫苗类别集合 + */ + public List selectSysVacCategoryList(SysVacCategory sysVacCategory); + + /** + * 新增疫苗类别 + * + * @param sysVacCategory 疫苗类别 + * @return 结果 + */ + public int insertSysVacCategory(SysVacCategory sysVacCategory); + + /** + * 修改疫苗类别 + * + * @param sysVacCategory 疫苗类别 + * @return 结果 + */ + public int updateSysVacCategory(SysVacCategory sysVacCategory); + + /** + * 批量删除疫苗类别 + * + * @param ids 需要删除的疫苗类别主键集合 + * @return 结果 + */ + public int deleteSysVacCategoryByIds(Long[] ids); + + /** + * 删除疫苗类别信息 + * + * @param id 疫苗类别主键 + * @return 结果 + */ + public int deleteSysVacCategoryById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacCategoryServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacCategoryServiceImpl.java new file mode 100644 index 0000000..5e4db4c --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacCategoryServiceImpl.java @@ -0,0 +1,93 @@ +package com.chenhai.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.system.mapper.SysVacCategoryMapper; +import com.chenhai.system.domain.SysVacCategory; +import com.chenhai.system.service.ISysVacCategoryService; + +/** + * 疫苗类别Service业务层处理 + * + * @author ruoyi + * @date 2026-01-29 + */ +@Service +public class SysVacCategoryServiceImpl implements ISysVacCategoryService +{ + @Autowired + private SysVacCategoryMapper sysVacCategoryMapper; + + /** + * 查询疫苗类别 + * + * @param id 疫苗类别主键 + * @return 疫苗类别 + */ + @Override + public SysVacCategory selectSysVacCategoryById(Long id) + { + return sysVacCategoryMapper.selectSysVacCategoryById(id); + } + + /** + * 查询疫苗类别列表 + * + * @param sysVacCategory 疫苗类别 + * @return 疫苗类别 + */ + @Override + public List selectSysVacCategoryList(SysVacCategory sysVacCategory) + { + return sysVacCategoryMapper.selectSysVacCategoryList(sysVacCategory); + } + + /** + * 新增疫苗类别 + * + * @param sysVacCategory 疫苗类别 + * @return 结果 + */ + @Override + public int insertSysVacCategory(SysVacCategory sysVacCategory) + { + return sysVacCategoryMapper.insertSysVacCategory(sysVacCategory); + } + + /** + * 修改疫苗类别 + * + * @param sysVacCategory 疫苗类别 + * @return 结果 + */ + @Override + public int updateSysVacCategory(SysVacCategory sysVacCategory) + { + return sysVacCategoryMapper.updateSysVacCategory(sysVacCategory); + } + + /** + * 批量删除疫苗类别 + * + * @param ids 需要删除的疫苗类别主键 + * @return 结果 + */ + @Override + public int deleteSysVacCategoryByIds(Long[] ids) + { + return sysVacCategoryMapper.deleteSysVacCategoryByIds(ids); + } + + /** + * 删除疫苗类别信息 + * + * @param id 疫苗类别主键 + * @return 结果 + */ + @Override + public int deleteSysVacCategoryById(Long id) + { + return sysVacCategoryMapper.deleteSysVacCategoryById(id); + } +} diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml index c27a160..b339115 100644 --- a/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -66,13 +66,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, - u.login_ip, u.login_date, u.pwd_update_date, u.create_by, u.create_time, u.remark, + u.login_ip, u.login_date, u.pwd_update_date, u.area_code, u.create_by, u.create_time, u.remark, d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status, + a.id as sys_area_id, a.name as sys_area_name, a.code as sys_area_code from sys_user u left join sys_dept d on u.dept_id = d.dept_id left join sys_user_role ur on u.user_id = ur.user_id left join sys_role r on r.role_id = ur.role_id + left join sys_area a on u.area_code = a.code + + + and approval_number = #{approvalNumber} + and batch_number = #{batchNumber} + and generic_name like concat('%', #{genericName}, '%') + and trade_name like concat('%', #{tradeName}, '%') + and specification = #{specification} + and manufacturer = #{manufacturer} + and manufacture_date = #{manufactureDate} + and expiry_date = #{expiryDate} + and livestock_types = #{livestockTypes} + and prevent_disease = #{preventDisease} + and is_mandatory = #{isMandatory} + and immune_period = #{immunePeriod} + and dosage = #{dosage} + and administration_route = #{administrationRoute} + and storage_condition = #{storageCondition} + and precautions = #{precautions} + and status = #{status} + and stock_quantity = #{stockQuantity} + and used_quantity = #{usedQuantity} + and created_by = #{createdBy} + and created_time = #{createdTime} + and updated_by = #{updatedBy} + and updated_time = #{updatedTime} + + + + + + + insert into sys_vac_category + + approval_number, + batch_number, + generic_name, + trade_name, + specification, + manufacturer, + manufacture_date, + expiry_date, + livestock_types, + prevent_disease, + is_mandatory, + immune_period, + dosage, + administration_route, + storage_condition, + precautions, + status, + stock_quantity, + used_quantity, + created_by, + created_time, + updated_by, + updated_time, + remark, + + + #{approvalNumber}, + #{batchNumber}, + #{genericName}, + #{tradeName}, + #{specification}, + #{manufacturer}, + #{manufactureDate}, + #{expiryDate}, + #{livestockTypes}, + #{preventDisease}, + #{isMandatory}, + #{immunePeriod}, + #{dosage}, + #{administrationRoute}, + #{storageCondition}, + #{precautions}, + #{status}, + #{stockQuantity}, + #{usedQuantity}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{remark}, + + + + + update sys_vac_category + + approval_number = #{approvalNumber}, + batch_number = #{batchNumber}, + generic_name = #{genericName}, + trade_name = #{tradeName}, + specification = #{specification}, + manufacturer = #{manufacturer}, + manufacture_date = #{manufactureDate}, + expiry_date = #{expiryDate}, + livestock_types = #{livestockTypes}, + prevent_disease = #{preventDisease}, + is_mandatory = #{isMandatory}, + immune_period = #{immunePeriod}, + dosage = #{dosage}, + administration_route = #{administrationRoute}, + storage_condition = #{storageCondition}, + precautions = #{precautions}, + status = #{status}, + stock_quantity = #{stockQuantity}, + used_quantity = #{usedQuantity}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from sys_vac_category where id = #{id} + + + + delete from sys_vac_category where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-ui/src/api/system/vacCategory.js b/chenhai-ui/src/api/system/vacCategory.js new file mode 100644 index 0000000..d70eeb1 --- /dev/null +++ b/chenhai-ui/src/api/system/vacCategory.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询疫苗类别列表 +export function listVacCategory(query) { + return request({ + url: '/system/vacCategory/list', + method: 'get', + params: query + }) +} + +// 查询疫苗类别详细 +export function getVacCategory(id) { + return request({ + url: '/system/vacCategory/' + id, + method: 'get' + }) +} + +// 新增疫苗类别 +export function addVacCategory(data) { + return request({ + url: '/system/vacCategory', + method: 'post', + data: data + }) +} + +// 修改疫苗类别 +export function updateVacCategory(data) { + return request({ + url: '/system/vacCategory', + method: 'put', + data: data + }) +} + +// 删除疫苗类别 +export function delVacCategory(id) { + return request({ + url: '/system/vacCategory/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/assets/icons/svg/livestockVaccines.svg b/chenhai-ui/src/assets/icons/svg/livestockVaccines.svg new file mode 100644 index 0000000..b06b014 --- /dev/null +++ b/chenhai-ui/src/assets/icons/svg/livestockVaccines.svg @@ -0,0 +1 @@ + diff --git a/chenhai-ui/src/views/system/vacCategory/index.vue b/chenhai-ui/src/views/system/vacCategory/index.vue new file mode 100644 index 0000000..14cea79 --- /dev/null +++ b/chenhai-ui/src/views/system/vacCategory/index.vue @@ -0,0 +1,654 @@ + + +