diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacInfoController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacInfoController.java new file mode 100644 index 0000000..9f6e489 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacInfoController.java @@ -0,0 +1,119 @@ +package com.chenhai.web.controller.system; + +import java.util.List; + +import com.chenhai.system.domain.SysVacCategory; +import com.chenhai.system.service.ISysVacCategoryService; +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.SysVacInfo; +import com.chenhai.system.service.ISysVacInfoService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 疫苗信息Controller + * + * @author ruoyi + * @date 2026-01-28 + */ +@RestController +@RequestMapping("/system/vacInfo") +public class SysVacInfoController extends BaseController +{ + @Autowired + private ISysVacInfoService sysVacInfoService; + + @Autowired + private ISysVacCategoryService sysVacCategoryService; + + /** + * 查询疫苗信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:vacInfo:list')") + @GetMapping("/list") + public TableDataInfo list(SysVacInfo sysVacInfo) + { + startPage(); + List list = sysVacInfoService.selectSysVacInfoList(sysVacInfo); + return getDataTable(list); + } + + @PreAuthorize("@ss.hasPermi('system:vacInfo:list')") + @GetMapping("/getVacCategorylist") + public TableDataInfo list(SysVacCategory sysVacCategory) + { + startPage(); + List list = sysVacCategoryService.selectSysVacCategoryList(sysVacCategory); + return getDataTable(list); + } + + /** + * 导出疫苗信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:vacInfo:export')") + @Log(title = "疫苗信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysVacInfo sysVacInfo) + { + List list = sysVacInfoService.selectSysVacInfoList(sysVacInfo); + ExcelUtil util = new ExcelUtil(SysVacInfo.class); + util.exportExcel(response, list, "疫苗信息数据"); + } + + /** + * 获取疫苗信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:vacInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysVacInfoService.selectSysVacInfoById(id)); + } + + /** + * 新增疫苗信息 + */ + @PreAuthorize("@ss.hasPermi('system:vacInfo:add')") + @Log(title = "疫苗信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysVacInfo sysVacInfo) + { + return toAjax(sysVacInfoService.insertSysVacInfo(sysVacInfo)); + } + + /** + * 修改疫苗信息 + */ + @PreAuthorize("@ss.hasPermi('system:vacInfo:edit')") + @Log(title = "疫苗信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysVacInfo sysVacInfo) + { + return toAjax(sysVacInfoService.updateSysVacInfo(sysVacInfo)); + } + + /** + * 删除疫苗信息 + */ + @PreAuthorize("@ss.hasPermi('system:vacInfo:remove')") + @Log(title = "疫苗信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysVacInfoService.deleteSysVacInfoByIds(ids)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacRegistrationController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacRegistrationController.java new file mode 100644 index 0000000..be54b45 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SysVacRegistrationController.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.SysVacRegistration; +import com.chenhai.system.service.ISysVacRegistrationService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 疫苗预约Controller + * + * @author ruoyi + * @date 2026-01-28 + */ +@RestController +@RequestMapping("/system/VacRegistration") +public class SysVacRegistrationController extends BaseController +{ + @Autowired + private ISysVacRegistrationService sysVacRegistrationService; + + /** + * 查询疫苗预约列表 + */ + @PreAuthorize("@ss.hasPermi('system:VacRegistration:list')") + @GetMapping("/list") + public TableDataInfo list(SysVacRegistration sysVacRegistration) + { + startPage(); + List list = sysVacRegistrationService.selectSysVacRegistrationList(sysVacRegistration); + return getDataTable(list); + } + + /** + * 导出疫苗预约列表 + */ + @PreAuthorize("@ss.hasPermi('system:VacRegistration:export')") + @Log(title = "疫苗预约", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysVacRegistration sysVacRegistration) + { + List list = sysVacRegistrationService.selectSysVacRegistrationList(sysVacRegistration); + ExcelUtil util = new ExcelUtil(SysVacRegistration.class); + util.exportExcel(response, list, "疫苗预约数据"); + } + + /** + * 获取疫苗预约详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:VacRegistration:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysVacRegistrationService.selectSysVacRegistrationById(id)); + } + + /** + * 新增疫苗预约 + */ + @PreAuthorize("@ss.hasPermi('system:VacRegistration:add')") + @Log(title = "疫苗预约", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysVacRegistration sysVacRegistration) + { + return toAjax(sysVacRegistrationService.insertSysVacRegistration(sysVacRegistration)); + } + + /** + * 修改疫苗预约 + */ + @PreAuthorize("@ss.hasPermi('system:VacRegistration:edit')") + @Log(title = "疫苗预约", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysVacRegistration sysVacRegistration) + { + return toAjax(sysVacRegistrationService.updateSysVacRegistration(sysVacRegistration)); + } + + /** + * 删除疫苗预约 + */ + @PreAuthorize("@ss.hasPermi('system:VacRegistration:remove')") + @Log(title = "疫苗预约", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysVacRegistrationService.deleteSysVacRegistrationByIds(ids)); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacInfo.java b/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacInfo.java new file mode 100644 index 0000000..7184a1d --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacInfo.java @@ -0,0 +1,223 @@ +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_info + * + * @author ruoyi + * @date 2026-01-28 + */ +public class SysVacInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 疫苗信息ID */ + private Long id; + + /** 疫苗标题 */ + @Excel(name = "疫苗标题") + private String title; + + /** 牲畜类型 */ + @Excel(name = "牲畜类型") + private String livestockType; + + /** 疫苗类型(字典:vaccine_type) */ + @Excel(name = "疫苗类型", readConverterExp = "字=典:vaccine_type") + private String vaccineType; + + /** 详细描述 */ + @Excel(name = "详细描述") + private String description; + + /** 接种日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "接种日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date vaccinationDate; + + /** 接种地点 */ + @Excel(name = "接种地点") + private String vaccinationLocation; + + /** 可预约数量 */ + @Excel(name = "可预约数量") + private Long availableSlots; + + /** 总数量 */ + @Excel(name = "总数量") + private Long totalSlots; + + /** 状态:1-进行中 2-已结束 3-已取消 */ + @Excel(name = "状态:1-进行中 2-已结束 3-已取消") + private Integer status; + + /** 发布时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date publishTime; + + /** 报名截止时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "报名截止时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + + public String getLivestockType() { + return livestockType; + } + + public void setLivestockType(String livestockType) { + this.livestockType = livestockType; + } + + public void setVaccineType(String vaccineType) + { + this.vaccineType = vaccineType; + } + + public String getVaccineType() + { + return vaccineType; + } + + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + + public void setVaccinationDate(Date vaccinationDate) + { + this.vaccinationDate = vaccinationDate; + } + + public Date getVaccinationDate() + { + return vaccinationDate; + } + + public void setVaccinationLocation(String vaccinationLocation) + { + this.vaccinationLocation = vaccinationLocation; + } + + public String getVaccinationLocation() + { + return vaccinationLocation; + } + + public void setAvailableSlots(Long availableSlots) + { + this.availableSlots = availableSlots; + } + + public Long getAvailableSlots() + { + return availableSlots; + } + + public void setTotalSlots(Long totalSlots) + { + this.totalSlots = totalSlots; + } + + public Long getTotalSlots() + { + return totalSlots; + } + + public void setStatus(Integer status) + { + this.status = status; + } + + public Integer getStatus() + { + return status; + } + + public void setPublishTime(Date publishTime) + { + this.publishTime = publishTime; + } + + public Date getPublishTime() + { + return publishTime; + } + + public void setEndTime(Date endTime) + { + this.endTime = endTime; + } + + public Date getEndTime() + { + return endTime; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("vaccineType", getVaccineType()) + .append("description", getDescription()) + .append("vaccinationDate", getVaccinationDate()) + .append("vaccinationLocation", getVaccinationLocation()) + .append("availableSlots", getAvailableSlots()) + .append("totalSlots", getTotalSlots()) + .append("status", getStatus()) + .append("publishTime", getPublishTime()) + .append("endTime", getEndTime()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacRegistration.java b/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacRegistration.java new file mode 100644 index 0000000..9b3385d --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/SysVacRegistration.java @@ -0,0 +1,227 @@ +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_registration + * + * @author ruoyi + * @date 2026-01-28 + */ +public class SysVacRegistration extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 预约记录ID */ + private Long id; + + /** 疫苗信息ID */ + @Excel(name = "疫苗信息ID") + private Long vaccineId; + + /** 牧户用户ID */ + @Excel(name = "牧户用户ID") + private Long userId; + + /** 牲畜类型(字典:livestock_type) */ + @Excel(name = "牲畜类型", readConverterExp = "字=典:livestock_type") + private String livestockType; + + /** 牲畜数量 */ + @Excel(name = "牲畜数量") + private Long livestockCount; + + /** 联系人姓名 */ + @Excel(name = "联系人姓名") + private String contactName; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String contactPhone; + + /** 状态:1-待确认 2-已确认 3-已完成 4-已取消 */ + @Excel(name = "状态:1-待确认 2-已确认 3-已完成 4-已取消") + private Integer status; + + /** 预约时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date registrationTime; + + /** 确认时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date confirmedTime; + + /** 完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date completedTime; + + /** 取消时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date cancelTime; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setVaccineId(Long vaccineId) + { + this.vaccineId = vaccineId; + } + + public Long getVaccineId() + { + return vaccineId; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + public void setLivestockType(String livestockType) + { + this.livestockType = livestockType; + } + + public String getLivestockType() + { + return livestockType; + } + + public void setLivestockCount(Long livestockCount) + { + this.livestockCount = livestockCount; + } + + public Long getLivestockCount() + { + return livestockCount; + } + + public void setContactName(String contactName) + { + this.contactName = contactName; + } + + public String getContactName() + { + return contactName; + } + + public void setContactPhone(String contactPhone) + { + this.contactPhone = contactPhone; + } + + public String getContactPhone() + { + return contactPhone; + } + + public void setStatus(Integer status) + { + this.status = status; + } + + public Integer getStatus() + { + return status; + } + + public void setRegistrationTime(Date registrationTime) + { + this.registrationTime = registrationTime; + } + + public Date getRegistrationTime() + { + return registrationTime; + } + + public void setConfirmedTime(Date confirmedTime) + { + this.confirmedTime = confirmedTime; + } + + public Date getConfirmedTime() + { + return confirmedTime; + } + + public void setCompletedTime(Date completedTime) + { + this.completedTime = completedTime; + } + + public Date getCompletedTime() + { + return completedTime; + } + + public void setCancelTime(Date cancelTime) + { + this.cancelTime = cancelTime; + } + + public Date getCancelTime() + { + return cancelTime; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("vaccineId", getVaccineId()) + .append("userId", getUserId()) + .append("livestockType", getLivestockType()) + .append("livestockCount", getLivestockCount()) + .append("contactName", getContactName()) + .append("contactPhone", getContactPhone()) + .append("status", getStatus()) + .append("registrationTime", getRegistrationTime()) + .append("confirmedTime", getConfirmedTime()) + .append("completedTime", getCompletedTime()) + .append("cancelTime", getCancelTime()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacInfoMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacInfoMapper.java new file mode 100644 index 0000000..c16d4b5 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacInfoMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.SysVacInfo; + +/** + * 疫苗信息Mapper接口 + * + * @author ruoyi + * @date 2026-01-28 + */ +public interface SysVacInfoMapper +{ + /** + * 查询疫苗信息 + * + * @param id 疫苗信息主键 + * @return 疫苗信息 + */ + public SysVacInfo selectSysVacInfoById(Long id); + + /** + * 查询疫苗信息列表 + * + * @param sysVacInfo 疫苗信息 + * @return 疫苗信息集合 + */ + public List selectSysVacInfoList(SysVacInfo sysVacInfo); + + /** + * 新增疫苗信息 + * + * @param sysVacInfo 疫苗信息 + * @return 结果 + */ + public int insertSysVacInfo(SysVacInfo sysVacInfo); + + /** + * 修改疫苗信息 + * + * @param sysVacInfo 疫苗信息 + * @return 结果 + */ + public int updateSysVacInfo(SysVacInfo sysVacInfo); + + /** + * 删除疫苗信息 + * + * @param id 疫苗信息主键 + * @return 结果 + */ + public int deleteSysVacInfoById(Long id); + + /** + * 批量删除疫苗信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysVacInfoByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacRegistrationMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacRegistrationMapper.java new file mode 100644 index 0000000..d154b4c --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/SysVacRegistrationMapper.java @@ -0,0 +1,61 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.SysVacRegistration; + +/** + * 疫苗预约Mapper接口 + * + * @author ruoyi + * @date 2026-01-28 + */ +public interface SysVacRegistrationMapper +{ + /** + * 查询疫苗预约 + * + * @param id 疫苗预约主键 + * @return 疫苗预约 + */ + public SysVacRegistration selectSysVacRegistrationById(Long id); + + /** + * 查询疫苗预约列表 + * + * @param sysVacRegistration 疫苗预约 + * @return 疫苗预约集合 + */ + public List selectSysVacRegistrationList(SysVacRegistration sysVacRegistration); + + /** + * 新增疫苗预约 + * + * @param sysVacRegistration 疫苗预约 + * @return 结果 + */ + public int insertSysVacRegistration(SysVacRegistration sysVacRegistration); + + /** + * 修改疫苗预约 + * + * @param sysVacRegistration 疫苗预约 + * @return 结果 + */ + public int updateSysVacRegistration(SysVacRegistration sysVacRegistration); + + /** + * 删除疫苗预约 + * + * @param id 疫苗预约主键 + * @return 结果 + */ + public int deleteSysVacRegistrationById(Long id); + + /** + * 批量删除疫苗预约 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysVacRegistrationByIds(Long[] ids); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacInfoService.java b/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacInfoService.java new file mode 100644 index 0000000..6566ec7 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacInfoService.java @@ -0,0 +1,61 @@ +package com.chenhai.system.service; + +import java.util.List; +import com.chenhai.system.domain.SysVacInfo; + +/** + * 疫苗信息Service接口 + * + * @author ruoyi + * @date 2026-01-28 + */ +public interface ISysVacInfoService +{ + /** + * 查询疫苗信息 + * + * @param id 疫苗信息主键 + * @return 疫苗信息 + */ + public SysVacInfo selectSysVacInfoById(Long id); + + /** + * 查询疫苗信息列表 + * + * @param sysVacInfo 疫苗信息 + * @return 疫苗信息集合 + */ + public List selectSysVacInfoList(SysVacInfo sysVacInfo); + + /** + * 新增疫苗信息 + * + * @param sysVacInfo 疫苗信息 + * @return 结果 + */ + public int insertSysVacInfo(SysVacInfo sysVacInfo); + + /** + * 修改疫苗信息 + * + * @param sysVacInfo 疫苗信息 + * @return 结果 + */ + public int updateSysVacInfo(SysVacInfo sysVacInfo); + + /** + * 批量删除疫苗信息 + * + * @param ids 需要删除的疫苗信息主键集合 + * @return 结果 + */ + public int deleteSysVacInfoByIds(Long[] ids); + + /** + * 删除疫苗信息信息 + * + * @param id 疫苗信息主键 + * @return 结果 + */ + public int deleteSysVacInfoById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacRegistrationService.java b/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacRegistrationService.java new file mode 100644 index 0000000..411b6ec --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/ISysVacRegistrationService.java @@ -0,0 +1,61 @@ +package com.chenhai.system.service; + +import java.util.List; +import com.chenhai.system.domain.SysVacRegistration; + +/** + * 疫苗预约Service接口 + * + * @author ruoyi + * @date 2026-01-28 + */ +public interface ISysVacRegistrationService +{ + /** + * 查询疫苗预约 + * + * @param id 疫苗预约主键 + * @return 疫苗预约 + */ + public SysVacRegistration selectSysVacRegistrationById(Long id); + + /** + * 查询疫苗预约列表 + * + * @param sysVacRegistration 疫苗预约 + * @return 疫苗预约集合 + */ + public List selectSysVacRegistrationList(SysVacRegistration sysVacRegistration); + + /** + * 新增疫苗预约 + * + * @param sysVacRegistration 疫苗预约 + * @return 结果 + */ + public int insertSysVacRegistration(SysVacRegistration sysVacRegistration); + + /** + * 修改疫苗预约 + * + * @param sysVacRegistration 疫苗预约 + * @return 结果 + */ + public int updateSysVacRegistration(SysVacRegistration sysVacRegistration); + + /** + * 批量删除疫苗预约 + * + * @param ids 需要删除的疫苗预约主键集合 + * @return 结果 + */ + public int deleteSysVacRegistrationByIds(Long[] ids); + + /** + * 删除疫苗预约信息 + * + * @param id 疫苗预约主键 + * @return 结果 + */ + public int deleteSysVacRegistrationById(Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacInfoServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacInfoServiceImpl.java new file mode 100644 index 0000000..e2b9d3f --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.chenhai.system.service.impl; + +import java.util.List; +import com.chenhai.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.system.mapper.SysVacInfoMapper; +import com.chenhai.system.domain.SysVacInfo; +import com.chenhai.system.service.ISysVacInfoService; + +/** + * 疫苗信息Service业务层处理 + * + * @author ruoyi + * @date 2026-01-28 + */ +@Service +public class SysVacInfoServiceImpl implements ISysVacInfoService +{ + @Autowired + private SysVacInfoMapper sysVacInfoMapper; + + /** + * 查询疫苗信息 + * + * @param id 疫苗信息主键 + * @return 疫苗信息 + */ + @Override + public SysVacInfo selectSysVacInfoById(Long id) + { + return sysVacInfoMapper.selectSysVacInfoById(id); + } + + /** + * 查询疫苗信息列表 + * + * @param sysVacInfo 疫苗信息 + * @return 疫苗信息 + */ + @Override + public List selectSysVacInfoList(SysVacInfo sysVacInfo) + { + return sysVacInfoMapper.selectSysVacInfoList(sysVacInfo); + } + + /** + * 新增疫苗信息 + * + * @param sysVacInfo 疫苗信息 + * @return 结果 + */ + @Override + public int insertSysVacInfo(SysVacInfo sysVacInfo) + { + sysVacInfo.setCreateTime(DateUtils.getNowDate()); + return sysVacInfoMapper.insertSysVacInfo(sysVacInfo); + } + + /** + * 修改疫苗信息 + * + * @param sysVacInfo 疫苗信息 + * @return 结果 + */ + @Override + public int updateSysVacInfo(SysVacInfo sysVacInfo) + { + sysVacInfo.setUpdateTime(DateUtils.getNowDate()); + return sysVacInfoMapper.updateSysVacInfo(sysVacInfo); + } + + /** + * 批量删除疫苗信息 + * + * @param ids 需要删除的疫苗信息主键 + * @return 结果 + */ + @Override + public int deleteSysVacInfoByIds(Long[] ids) + { + return sysVacInfoMapper.deleteSysVacInfoByIds(ids); + } + + /** + * 删除疫苗信息信息 + * + * @param id 疫苗信息主键 + * @return 结果 + */ + @Override + public int deleteSysVacInfoById(Long id) + { + return sysVacInfoMapper.deleteSysVacInfoById(id); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacRegistrationServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacRegistrationServiceImpl.java new file mode 100644 index 0000000..04aff7f --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/impl/SysVacRegistrationServiceImpl.java @@ -0,0 +1,96 @@ +package com.chenhai.system.service.impl; + +import java.util.List; +import com.chenhai.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.system.mapper.SysVacRegistrationMapper; +import com.chenhai.system.domain.SysVacRegistration; +import com.chenhai.system.service.ISysVacRegistrationService; + +/** + * 疫苗预约Service业务层处理 + * + * @author ruoyi + * @date 2026-01-28 + */ +@Service +public class SysVacRegistrationServiceImpl implements ISysVacRegistrationService +{ + @Autowired + private SysVacRegistrationMapper sysVacRegistrationMapper; + + /** + * 查询疫苗预约 + * + * @param id 疫苗预约主键 + * @return 疫苗预约 + */ + @Override + public SysVacRegistration selectSysVacRegistrationById(Long id) + { + return sysVacRegistrationMapper.selectSysVacRegistrationById(id); + } + + /** + * 查询疫苗预约列表 + * + * @param sysVacRegistration 疫苗预约 + * @return 疫苗预约 + */ + @Override + public List selectSysVacRegistrationList(SysVacRegistration sysVacRegistration) + { + return sysVacRegistrationMapper.selectSysVacRegistrationList(sysVacRegistration); + } + + /** + * 新增疫苗预约 + * + * @param sysVacRegistration 疫苗预约 + * @return 结果 + */ + @Override + public int insertSysVacRegistration(SysVacRegistration sysVacRegistration) + { + sysVacRegistration.setCreateTime(DateUtils.getNowDate()); + return sysVacRegistrationMapper.insertSysVacRegistration(sysVacRegistration); + } + + /** + * 修改疫苗预约 + * + * @param sysVacRegistration 疫苗预约 + * @return 结果 + */ + @Override + public int updateSysVacRegistration(SysVacRegistration sysVacRegistration) + { + sysVacRegistration.setUpdateTime(DateUtils.getNowDate()); + return sysVacRegistrationMapper.updateSysVacRegistration(sysVacRegistration); + } + + /** + * 批量删除疫苗预约 + * + * @param ids 需要删除的疫苗预约主键 + * @return 结果 + */ + @Override + public int deleteSysVacRegistrationByIds(Long[] ids) + { + return sysVacRegistrationMapper.deleteSysVacRegistrationByIds(ids); + } + + /** + * 删除疫苗预约信息 + * + * @param id 疫苗预约主键 + * @return 结果 + */ + @Override + public int deleteSysVacRegistrationById(Long id) + { + return sysVacRegistrationMapper.deleteSysVacRegistrationById(id); + } +} diff --git a/chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml index c0ed8a0..a1c9e62 100644 --- a/chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml +++ b/chenhai-system/src/main/resources/mapper/system/SysVacCategoryMapper.xml @@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and manufacturer = #{manufacturer} and manufacture_date = #{manufactureDate} and expiry_date = #{expiryDate} - and livestock_types = #{livestockTypes} + and livestock_types like concat('%', #{livestockTypes}, '%') and prevent_disease = #{preventDisease} and is_mandatory = #{isMandatory} and immune_period = #{immunePeriod} diff --git a/chenhai-system/src/main/resources/mapper/system/SysVacInfoMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysVacInfoMapper.xml new file mode 100644 index 0000000..518c480 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysVacInfoMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, title, livestock_type, vaccine_type, description, vaccination_date, vaccination_location, available_slots, total_slots, status, publish_time, end_time, del_flag, create_by, create_time, update_by, update_time, remark from sys_vac_info + + + + + + + + insert into sys_vac_info + + title, + livestock_type, + vaccine_type, + description, + vaccination_date, + vaccination_location, + available_slots, + total_slots, + status, + publish_time, + end_time, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{title}, + #{livestockType}, + #{vaccineType}, + #{description}, + #{vaccinationDate}, + #{vaccinationLocation}, + #{availableSlots}, + #{totalSlots}, + #{status}, + #{publishTime}, + #{endTime}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_vac_info + + title = #{title}, + livestock_type = #{livestockType}, + vaccine_type = #{vaccineType}, + description = #{description}, + vaccination_date = #{vaccinationDate}, + vaccination_location = #{vaccinationLocation}, + available_slots = #{availableSlots}, + total_slots = #{totalSlots}, + status = #{status}, + publish_time = #{publishTime}, + end_time = #{endTime}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from sys_vac_info where id = #{id} + + + + delete from sys_vac_info where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysVacRegistrationMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysVacRegistrationMapper.xml new file mode 100644 index 0000000..9dc355d --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/system/SysVacRegistrationMapper.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, vaccine_id, user_id, livestock_type, livestock_count, contact_name, contact_phone, status, registration_time, confirmed_time, completed_time, cancel_time, del_flag, create_by, create_time, update_by, update_time, remark from sys_vac_registration + + + + + + + + insert into sys_vac_registration + + vaccine_id, + user_id, + livestock_type, + livestock_count, + contact_name, + contact_phone, + status, + registration_time, + confirmed_time, + completed_time, + cancel_time, + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{vaccineId}, + #{userId}, + #{livestockType}, + #{livestockCount}, + #{contactName}, + #{contactPhone}, + #{status}, + #{registrationTime}, + #{confirmedTime}, + #{completedTime}, + #{cancelTime}, + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_vac_registration + + vaccine_id = #{vaccineId}, + user_id = #{userId}, + livestock_type = #{livestockType}, + livestock_count = #{livestockCount}, + contact_name = #{contactName}, + contact_phone = #{contactPhone}, + status = #{status}, + registration_time = #{registrationTime}, + confirmed_time = #{confirmedTime}, + completed_time = #{completedTime}, + cancel_time = #{cancelTime}, + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from sys_vac_registration where id = #{id} + + + + delete from sys_vac_registration where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-ui/src/api/system/VacRegistration.js b/chenhai-ui/src/api/system/VacRegistration.js new file mode 100644 index 0000000..491cde3 --- /dev/null +++ b/chenhai-ui/src/api/system/VacRegistration.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询疫苗预约列表 +export function listVacRegistration(query) { + return request({ + url: '/system/VacRegistration/list', + method: 'get', + params: query + }) +} + +// 查询疫苗预约详细 +export function getVacRegistration(id) { + return request({ + url: '/system/VacRegistration/' + id, + method: 'get' + }) +} + +// 新增疫苗预约 +export function addVacRegistration(data) { + return request({ + url: '/system/VacRegistration', + method: 'post', + data: data + }) +} + +// 修改疫苗预约 +export function updateVacRegistration(data) { + return request({ + url: '/system/VacRegistration', + method: 'put', + data: data + }) +} + +// 删除疫苗预约 +export function delVacRegistration(id) { + return request({ + url: '/system/VacRegistration/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/vacInfo.js b/chenhai-ui/src/api/system/vacInfo.js new file mode 100644 index 0000000..27b007e --- /dev/null +++ b/chenhai-ui/src/api/system/vacInfo.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询疫苗信息列表 +export function listVacInfo(query) { + return request({ + url: '/system/vacInfo/list', + method: 'get', + params: query + }) +} + +// 查询疫苗类别列表(新增接口) +export function getVacCategorylist(query) { + return request({ + url: '/system/vacInfo/getVacCategorylist', + method: 'get', + params: query + }) +} + +// 查询疫苗信息详细 +export function getVacInfo(id) { + return request({ + url: '/system/vacInfo/' + id, + method: 'get' + }) +} + +// 新增疫苗信息 +export function addVacInfo(data) { + return request({ + url: '/system/vacInfo', + method: 'post', + data: data + }) +} + +// 修改疫苗信息 +export function updateVacInfo(data) { + return request({ + url: '/system/vacInfo', + method: 'put', + data: data + }) +} + +// 删除疫苗信息 +export function delVacInfo(id) { + return request({ + url: '/system/vacInfo/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/assets/icons/svg/vacInfo.svg b/chenhai-ui/src/assets/icons/svg/vacInfo.svg new file mode 100644 index 0000000..89952b5 --- /dev/null +++ b/chenhai-ui/src/assets/icons/svg/vacInfo.svg @@ -0,0 +1 @@ + diff --git a/chenhai-ui/src/views/system/VacRegistration/index.vue b/chenhai-ui/src/views/system/VacRegistration/index.vue new file mode 100644 index 0000000..266696a --- /dev/null +++ b/chenhai-ui/src/views/system/VacRegistration/index.vue @@ -0,0 +1,485 @@ + + + diff --git a/chenhai-ui/src/views/system/vacInfo/index.vue b/chenhai-ui/src/views/system/vacInfo/index.vue new file mode 100644 index 0000000..dc2fbe9 --- /dev/null +++ b/chenhai-ui/src/views/system/vacInfo/index.vue @@ -0,0 +1,658 @@ + + +