diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DewormController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DewormController.java new file mode 100644 index 0000000..6b88da7 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DewormController.java @@ -0,0 +1,105 @@ +package com.zhyc.module.biosafety.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.zhyc.module.biosafety.domain.Deworm; +import com.zhyc.module.biosafety.service.IDewormService; +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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 驱虫Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/biosafety/deworm") +public class DewormController extends BaseController +{ + @Autowired + private IDewormService dewormService; + + /** + * 查询驱虫列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:deworm:list')") + @GetMapping("/list") + public TableDataInfo list(Deworm deworm) + { + startPage(); + List list = dewormService.selectDewormList(deworm); + return getDataTable(list); + } + + /** + * 导出驱虫列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:deworm:export')") + @Log(title = "驱虫", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Deworm deworm) + { + List list = dewormService.selectDewormList(deworm); + ExcelUtil util = new ExcelUtil(Deworm.class); + util.exportExcel(response, list, "驱虫数据"); + } + + /** + * 获取驱虫详细信息 + */ + @PreAuthorize("@ss.hasPermi('biosafety:deworm:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dewormService.selectDewormById(id)); + } + + /** + * 新增驱虫 + */ + @PreAuthorize("@ss.hasPermi('biosafety:deworm:add')") + @Log(title = "驱虫", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Deworm deworm) + { + return toAjax(dewormService.insertDeworm(deworm)); + } + + /** + * 修改驱虫 + */ + @PreAuthorize("@ss.hasPermi('biosafety:deworm:edit')") + @Log(title = "驱虫", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Deworm deworm) + { + return toAjax(dewormService.updateDeworm(deworm)); + } + + /** + * 删除驱虫 + */ + @PreAuthorize("@ss.hasPermi('biosafety:deworm:remove')") + @Log(title = "驱虫", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dewormService.deleteDewormByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DiagnosisController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DiagnosisController.java new file mode 100644 index 0000000..d8138a2 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DiagnosisController.java @@ -0,0 +1,104 @@ +package com.zhyc.module.biosafety.controller; + +import java.util.List; +import javax.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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.module.biosafety.domain.Diagnosis; +import com.zhyc.module.biosafety.service.IDiagnosisService; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 诊疗结果Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/diagnosis/diagnosis") +public class DiagnosisController extends BaseController +{ + @Autowired + private IDiagnosisService diagnosisService; + + /** + * 查询诊疗结果列表 + */ + @PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:list')") + @GetMapping("/list") + public TableDataInfo list(Diagnosis diagnosis) + { + startPage(); + List list = diagnosisService.selectDiagnosisList(diagnosis); + return getDataTable(list); + } + + /** + * 导出诊疗结果列表 + */ + @PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:export')") + @Log(title = "诊疗结果", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Diagnosis diagnosis) + { + List list = diagnosisService.selectDiagnosisList(diagnosis); + ExcelUtil util = new ExcelUtil(Diagnosis.class); + util.exportExcel(response, list, "诊疗结果数据"); + } + + /** + * 获取诊疗结果详细信息 + */ + @PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(diagnosisService.selectDiagnosisById(id)); + } + + /** + * 新增诊疗结果 + */ + @PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:add')") + @Log(title = "诊疗结果", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Diagnosis diagnosis) + { + return toAjax(diagnosisService.insertDiagnosis(diagnosis)); + } + + /** + * 修改诊疗结果 + */ + @PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:edit')") + @Log(title = "诊疗结果", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Diagnosis diagnosis) + { + return toAjax(diagnosisService.updateDiagnosis(diagnosis)); + } + + /** + * 删除诊疗结果 + */ + @PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:remove')") + @Log(title = "诊疗结果", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(diagnosisService.deleteDiagnosisByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DisinfectController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DisinfectController.java new file mode 100644 index 0000000..7e2f934 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/DisinfectController.java @@ -0,0 +1,105 @@ +package com.zhyc.module.biosafety.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.zhyc.module.biosafety.service.IDisinfectService; +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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.module.biosafety.domain.Disinfect; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 消毒记录Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/biosafety/disinfect") +public class DisinfectController extends BaseController +{ + @Autowired + private IDisinfectService disinfectService; + + /** + * 查询消毒记录列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:disinfect:list')") + @GetMapping("/list") + public TableDataInfo list(Disinfect disinfect) + { + startPage(); + List list = disinfectService.selectDisinfectList(disinfect); + return getDataTable(list); + } + + /** + * 导出消毒记录列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:disinfect:export')") + @Log(title = "消毒记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Disinfect disinfect) + { + List list = disinfectService.selectDisinfectList(disinfect); + ExcelUtil util = new ExcelUtil(Disinfect.class); + util.exportExcel(response, list, "消毒记录数据"); + } + + /** + * 获取消毒记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('biosafety:disinfect:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(disinfectService.selectDisinfectById(id)); + } + + /** + * 新增消毒记录 + */ + @PreAuthorize("@ss.hasPermi('biosafety:disinfect:add')") + @Log(title = "消毒记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Disinfect disinfect) + { + return toAjax(disinfectService.insertDisinfect(disinfect)); + } + + /** + * 修改消毒记录 + */ + @PreAuthorize("@ss.hasPermi('biosafety:disinfect:edit')") + @Log(title = "消毒记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Disinfect disinfect) + { + return toAjax(disinfectService.updateDisinfect(disinfect)); + } + + /** + * 删除消毒记录 + */ + @PreAuthorize("@ss.hasPermi('biosafety:disinfect:remove')") + @Log(title = "消毒记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(disinfectService.deleteDisinfectByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java new file mode 100644 index 0000000..5795ca8 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/HealthController.java @@ -0,0 +1,105 @@ +package com.zhyc.module.biosafety.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.zhyc.module.biosafety.service.IHealthService; +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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.module.biosafety.domain.Health; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 保健Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/biosafety/health") +public class HealthController extends BaseController +{ + @Autowired + private IHealthService healthService; + + /** + * 查询保健列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:health:list')") + @GetMapping("/list") + public TableDataInfo list(Health health) + { + startPage(); + List list = healthService.selectHealthList(health); + return getDataTable(list); + } + + /** + * 导出保健列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:health:export')") + @Log(title = "保健", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Health health) + { + List list = healthService.selectHealthList(health); + ExcelUtil util = new ExcelUtil(Health.class); + util.exportExcel(response, list, "保健数据"); + } + + /** + * 获取保健详细信息 + */ + @PreAuthorize("@ss.hasPermi('biosafety:health:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(healthService.selectHealthById(id)); + } + + /** + * 新增保健 + */ + @PreAuthorize("@ss.hasPermi('biosafety:health:add')") + @Log(title = "保健", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Health health) + { + return toAjax(healthService.insertHealth(health)); + } + + /** + * 修改保健 + */ + @PreAuthorize("@ss.hasPermi('biosafety:health:edit')") + @Log(title = "保健", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Health health) + { + return toAjax(healthService.updateHealth(health)); + } + + /** + * 删除保健 + */ + @PreAuthorize("@ss.hasPermi('biosafety:health:remove')") + @Log(title = "保健", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(healthService.deleteHealthByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/ImmunityController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/ImmunityController.java new file mode 100644 index 0000000..f49376c --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/ImmunityController.java @@ -0,0 +1,105 @@ +package com.zhyc.module.biosafety.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.zhyc.module.biosafety.service.IImmunityService; +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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.module.biosafety.domain.Immunity; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 免疫Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/biosafety/immunity") +public class ImmunityController extends BaseController +{ + @Autowired + private IImmunityService immunityService; + + /** + * 查询免疫列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:immunity:list')") + @GetMapping("/list") + public TableDataInfo list(Immunity immunity) + { + startPage(); + List list = immunityService.selectImmunityList(immunity); + return getDataTable(list); + } + + /** + * 导出免疫列表 + */ + @PreAuthorize("@ss.hasPermi('biosafety:immunity:export')") + @Log(title = "免疫", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Immunity immunity) + { + List list = immunityService.selectImmunityList(immunity); + ExcelUtil util = new ExcelUtil(Immunity.class); + util.exportExcel(response, list, "免疫数据"); + } + + /** + * 获取免疫详细信息 + */ + @PreAuthorize("@ss.hasPermi('biosafety:immunity:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(immunityService.selectImmunityById(id)); + } + + /** + * 新增免疫 + */ + @PreAuthorize("@ss.hasPermi('biosafety:immunity:add')") + @Log(title = "免疫", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Immunity immunity) + { + return toAjax(immunityService.insertImmunity(immunity)); + } + + /** + * 修改免疫 + */ + @PreAuthorize("@ss.hasPermi('biosafety:immunity:edit')") + @Log(title = "免疫", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Immunity immunity) + { + return toAjax(immunityService.updateImmunity(immunity)); + } + + /** + * 删除免疫 + */ + @PreAuthorize("@ss.hasPermi('biosafety:immunity:remove')") + @Log(title = "免疫", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(immunityService.deleteImmunityByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/TreatmentController.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/TreatmentController.java new file mode 100644 index 0000000..0e7605e --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/controller/TreatmentController.java @@ -0,0 +1,105 @@ +package com.zhyc.module.biosafety.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.zhyc.module.biosafety.domain.Treatment; +import com.zhyc.module.biosafety.service.ITreatmentService; +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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 治疗记录Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/treatment/treatment") +public class TreatmentController extends BaseController +{ + @Autowired + private ITreatmentService treatmentService; + + /** + * 查询治疗记录列表 + */ + @PreAuthorize("@ss.hasPermi('treatment:treatment:list')") + @GetMapping("/list") + public TableDataInfo list(Treatment treatment) + { + startPage(); + List list = treatmentService.selectTreatmentList(treatment); + return getDataTable(list); + } + + /** + * 导出治疗记录列表 + */ + @PreAuthorize("@ss.hasPermi('treatment:treatment:export')") + @Log(title = "治疗记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Treatment treatment) + { + List list = treatmentService.selectTreatmentList(treatment); + ExcelUtil util = new ExcelUtil(Treatment.class); + util.exportExcel(response, list, "治疗记录数据"); + } + + /** + * 获取治疗记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('treatment:treatment:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(treatmentService.selectTreatmentById(id)); + } + + /** + * 新增治疗记录 + */ + @PreAuthorize("@ss.hasPermi('treatment:treatment:add')") + @Log(title = "治疗记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Treatment treatment) + { + return toAjax(treatmentService.insertTreatment(treatment)); + } + + /** + * 修改治疗记录 + */ + @PreAuthorize("@ss.hasPermi('treatment:treatment:edit')") + @Log(title = "治疗记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Treatment treatment) + { + return toAjax(treatmentService.updateTreatment(treatment)); + } + + /** + * 删除治疗记录 + */ + @PreAuthorize("@ss.hasPermi('treatment:treatment:remove')") + @Log(title = "治疗记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(treatmentService.deleteTreatmentByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Deworm.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Deworm.java new file mode 100644 index 0000000..89896da --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Deworm.java @@ -0,0 +1,194 @@ +package com.zhyc.module.biosafety.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 驱虫对象 sw_deworm + * + * @author ruoyi + * @date 2025-07-15 + */ +public class Deworm extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 羊只id */ + @Excel(name = "羊只id") + private Long sheepId; + + /** 药品使用记录 */ + @Excel(name = "药品使用记录") + private Long usageId; + + /** 品种 */ + @Excel(name = "品种") + private String variety; + + /** 羊只类别 */ + @Excel(name = "羊只类别") + private String sheepType; + + /** 性别 */ + @Excel(name = "性别") + private String gender; + + /** 月龄 */ + @Excel(name = "月龄") + private Long monthAge; + + /** 胎次 */ + @Excel(name = "胎次") + private Long parity; + + /** 驱虫日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "驱虫日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 技术员 */ + @Excel(name = "技术员") + private String technical; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setSheepId(Long sheepId) + { + this.sheepId = sheepId; + } + + public Long getSheepId() + { + return sheepId; + } + + public void setUsageId(Long usageId) + { + this.usageId = usageId; + } + + public Long getUsageId() + { + return usageId; + } + + public void setVariety(String variety) + { + this.variety = variety; + } + + public String getVariety() + { + return variety; + } + + public void setSheepType(String sheepType) + { + this.sheepType = sheepType; + } + + public String getSheepType() + { + return sheepType; + } + + public void setGender(String gender) + { + this.gender = gender; + } + + public String getGender() + { + return gender; + } + + public void setMonthAge(Long monthAge) + { + this.monthAge = monthAge; + } + + public Long getMonthAge() + { + return monthAge; + } + + public void setParity(Long parity) + { + this.parity = parity; + } + + public Long getParity() + { + return parity; + } + + public void setDatetime(Date datetime) + { + this.datetime = datetime; + } + + public Date getDatetime() + { + return datetime; + } + + public void setTechnical(String technical) + { + this.technical = technical; + } + + public String getTechnical() + { + return technical; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("sheepId", getSheepId()) + .append("usageId", getUsageId()) + .append("variety", getVariety()) + .append("sheepType", getSheepType()) + .append("gender", getGender()) + .append("monthAge", getMonthAge()) + .append("parity", getParity()) + .append("datetime", getDatetime()) + .append("technical", getTechnical()) + .append("comment", getComment()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Diagnosis.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Diagnosis.java new file mode 100644 index 0000000..05f9a98 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Diagnosis.java @@ -0,0 +1,239 @@ +package com.zhyc.module.biosafety.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 诊疗结果对象 sw_diagnosis + * + * @author ruoyi + * @date 2025-07-15 + */ +public class Diagnosis extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 治疗记录id */ + @Excel(name = "治疗记录id") + private Long treatId; + + /** 羊只id */ + @Excel(name = "羊只id") + private Long sheepId; + + /** 时间日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "时间日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 羊只类别 */ + @Excel(name = "羊只类别") + private String sheepType; + + /** 性别 */ + @Excel(name = "性别") + private String gender; + + /** 胎次 */ + @Excel(name = "胎次") + private String parity; + + /** 疾病类型 */ + @Excel(name = "疾病类型") + private Long diseasePid; + + /** 子疾病 */ + @Excel(name = "子疾病") + private Long diseaseId; + + /** 诊疗结果 */ + @Excel(name = "诊疗结果") + private Long result; + + /** 开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date begindate; + + /** 结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date enddate; + + /** 治疗天数 */ + @Excel(name = "治疗天数") + private Long treatDay; + + /** 羊舍id */ + @Excel(name = "羊舍id") + private Long sheepfoldId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setTreatId(Long treatId) + { + this.treatId = treatId; + } + + public Long getTreatId() + { + return treatId; + } + + public void setSheepId(Long sheepId) + { + this.sheepId = sheepId; + } + + public Long getSheepId() + { + return sheepId; + } + + public void setDatetime(Date datetime) + { + this.datetime = datetime; + } + + public Date getDatetime() + { + return datetime; + } + + public void setSheepType(String sheepType) + { + this.sheepType = sheepType; + } + + public String getSheepType() + { + return sheepType; + } + + public void setGender(String gender) + { + this.gender = gender; + } + + public String getGender() + { + return gender; + } + + public void setParity(String parity) + { + this.parity = parity; + } + + public String getParity() + { + return parity; + } + + public void setDiseasePid(Long diseasePid) + { + this.diseasePid = diseasePid; + } + + public Long getDiseasePid() + { + return diseasePid; + } + + public void setDiseaseId(Long diseaseId) + { + this.diseaseId = diseaseId; + } + + public Long getDiseaseId() + { + return diseaseId; + } + + public void setResult(Long result) + { + this.result = result; + } + + public Long getResult() + { + return result; + } + + public void setBegindate(Date begindate) + { + this.begindate = begindate; + } + + public Date getBegindate() + { + return begindate; + } + + public void setEnddate(Date enddate) + { + this.enddate = enddate; + } + + public Date getEnddate() + { + return enddate; + } + + public void setTreatDay(Long treatDay) + { + this.treatDay = treatDay; + } + + public Long getTreatDay() + { + return treatDay; + } + + public void setSheepfoldId(Long sheepfoldId) + { + this.sheepfoldId = sheepfoldId; + } + + public Long getSheepfoldId() + { + return sheepfoldId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("treatId", getTreatId()) + .append("sheepId", getSheepId()) + .append("datetime", getDatetime()) + .append("sheepType", getSheepType()) + .append("gender", getGender()) + .append("parity", getParity()) + .append("diseasePid", getDiseasePid()) + .append("diseaseId", getDiseaseId()) + .append("result", getResult()) + .append("begindate", getBegindate()) + .append("enddate", getEnddate()) + .append("treatDay", getTreatDay()) + .append("sheepfoldId", getSheepfoldId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Disinfect.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Disinfect.java new file mode 100644 index 0000000..4b30dd3 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Disinfect.java @@ -0,0 +1,149 @@ +package com.zhyc.module.biosafety.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 消毒记录对象 sw_disinfect + * + * @author ruoyi + * @date 2025-07-15 + */ +public class Disinfect extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 羊舍id */ + @Excel(name = "羊舍id") + private Long sheepfoldId; + + /** 消毒日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "消毒日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 技术员 */ + @Excel(name = "技术员") + private String technician; + + /** 消毒方式 */ + @Excel(name = "消毒方式") + private String way; + + /** 药品使用记录id */ + @Excel(name = "药品使用记录id") + private Long usageId; + + /** 比例 */ + @Excel(name = "比例") + private String ratio; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setSheepfoldId(Long sheepfoldId) + { + this.sheepfoldId = sheepfoldId; + } + + public Long getSheepfoldId() + { + return sheepfoldId; + } + + public void setDatetime(Date datetime) + { + this.datetime = datetime; + } + + public Date getDatetime() + { + return datetime; + } + + public void setTechnician(String technician) + { + this.technician = technician; + } + + public String getTechnician() + { + return technician; + } + + public void setWay(String way) + { + this.way = way; + } + + public String getWay() + { + return way; + } + + public void setUsageId(Long usageId) + { + this.usageId = usageId; + } + + public Long getUsageId() + { + return usageId; + } + + public void setRatio(String ratio) + { + this.ratio = ratio; + } + + public String getRatio() + { + return ratio; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("sheepfoldId", getSheepfoldId()) + .append("datetime", getDatetime()) + .append("technician", getTechnician()) + .append("way", getWay()) + .append("usageId", getUsageId()) + .append("ratio", getRatio()) + .append("comment", getComment()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Health.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Health.java new file mode 100644 index 0000000..2cd9347 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Health.java @@ -0,0 +1,209 @@ +package com.zhyc.module.biosafety.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 保健对象 sw_health + * + * @author ruoyi + * @date 2025-07-15 + */ +public class Health extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 保健日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "保健日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 羊只id */ + @Excel(name = "羊只id") + private Long sheepId; + + /** 用药记录 */ + @Excel(name = "用药记录") + private Long usageId; + + /** 品种 */ + @Excel(name = "品种") + private String variety; + + /** 羊只类别 */ + @Excel(name = "羊只类别") + private String sheepType; + + /** 性别 */ + @Excel(name = "性别") + private String gender; + + /** 月龄 */ + @Excel(name = "月龄") + private String monthAge; + + /** 胎次 */ + @Excel(name = "胎次") + private Long parity; + + /** 羊舍id */ + @Excel(name = "羊舍id") + private Long sheepfoldId; + + /** 技术员 */ + @Excel(name = "技术员") + private String technical; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setDatetime(Date datetime) + { + this.datetime = datetime; + } + + public Date getDatetime() + { + return datetime; + } + + public void setSheepId(Long sheepId) + { + this.sheepId = sheepId; + } + + public Long getSheepId() + { + return sheepId; + } + + public void setUsageId(Long usageId) + { + this.usageId = usageId; + } + + public Long getUsageId() + { + return usageId; + } + + public void setVariety(String variety) + { + this.variety = variety; + } + + public String getVariety() + { + return variety; + } + + public void setSheepType(String sheepType) + { + this.sheepType = sheepType; + } + + public String getSheepType() + { + return sheepType; + } + + public void setGender(String gender) + { + this.gender = gender; + } + + public String getGender() + { + return gender; + } + + public void setMonthAge(String monthAge) + { + this.monthAge = monthAge; + } + + public String getMonthAge() + { + return monthAge; + } + + public void setParity(Long parity) + { + this.parity = parity; + } + + public Long getParity() + { + return parity; + } + + public void setSheepfoldId(Long sheepfoldId) + { + this.sheepfoldId = sheepfoldId; + } + + public Long getSheepfoldId() + { + return sheepfoldId; + } + + public void setTechnical(String technical) + { + this.technical = technical; + } + + public String getTechnical() + { + return technical; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("datetime", getDatetime()) + .append("sheepId", getSheepId()) + .append("usageId", getUsageId()) + .append("variety", getVariety()) + .append("sheepType", getSheepType()) + .append("gender", getGender()) + .append("monthAge", getMonthAge()) + .append("parity", getParity()) + .append("sheepfoldId", getSheepfoldId()) + .append("technical", getTechnical()) + .append("comment", getComment()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Immunity.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Immunity.java new file mode 100644 index 0000000..6dda5ac --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Immunity.java @@ -0,0 +1,209 @@ +package com.zhyc.module.biosafety.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 免疫对象 sw_immunity + * + * @author ruoyi + * @date 2025-07-15 + */ +public class Immunity extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 羊只id */ + @Excel(name = "羊只id") + private Long sheepId; + + /** 使用记录 */ + @Excel(name = "使用记录") + private Long usageId; + + /** 品种 */ + @Excel(name = "品种") + private String variety; + + /** 羊只类型 */ + @Excel(name = "羊只类型") + private Long sheepType; + + /** 羊只性别 */ + @Excel(name = "羊只性别") + private String gender; + + /** 月龄 */ + @Excel(name = "月龄") + private Long monthAge; + + /** 胎次 */ + @Excel(name = "胎次") + private Long parity; + + /** 羊舍id */ + @Excel(name = "羊舍id") + private Long sheepfoldId; + + /** 免疫日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "免疫日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 技术员 */ + @Excel(name = "技术员") + private String technical; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setSheepId(Long sheepId) + { + this.sheepId = sheepId; + } + + public Long getSheepId() + { + return sheepId; + } + + public void setUsageId(Long usageId) + { + this.usageId = usageId; + } + + public Long getUsageId() + { + return usageId; + } + + public void setVariety(String variety) + { + this.variety = variety; + } + + public String getVariety() + { + return variety; + } + + public void setSheepType(Long sheepType) + { + this.sheepType = sheepType; + } + + public Long getSheepType() + { + return sheepType; + } + + public void setGender(String gender) + { + this.gender = gender; + } + + public String getGender() + { + return gender; + } + + public void setMonthAge(Long monthAge) + { + this.monthAge = monthAge; + } + + public Long getMonthAge() + { + return monthAge; + } + + public void setParity(Long parity) + { + this.parity = parity; + } + + public Long getParity() + { + return parity; + } + + public void setSheepfoldId(Long sheepfoldId) + { + this.sheepfoldId = sheepfoldId; + } + + public Long getSheepfoldId() + { + return sheepfoldId; + } + + public void setDatetime(Date datetime) + { + this.datetime = datetime; + } + + public Date getDatetime() + { + return datetime; + } + + public void setTechnical(String technical) + { + this.technical = technical; + } + + public String getTechnical() + { + return technical; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("sheepId", getSheepId()) + .append("usageId", getUsageId()) + .append("variety", getVariety()) + .append("sheepType", getSheepType()) + .append("gender", getGender()) + .append("monthAge", getMonthAge()) + .append("parity", getParity()) + .append("sheepfoldId", getSheepfoldId()) + .append("datetime", getDatetime()) + .append("technical", getTechnical()) + .append("comment", getComment()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/QuarantineReport.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/QuarantineReport.java index bd70445..bfa931f 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/QuarantineReport.java +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/QuarantineReport.java @@ -60,7 +60,7 @@ public class QuarantineReport extends BaseEntity /** 样品 */ @Excel(name = "样品类型") - private Long sample; + private String sample; /** 采样员 */ diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Treatment.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Treatment.java new file mode 100644 index 0000000..4ace5d1 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/domain/Treatment.java @@ -0,0 +1,283 @@ +package com.zhyc.module.biosafety.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 治疗记录对象 sw_treatment + * + * @author ruoyi + * @date 2025-07-15 + */ +public class Treatment extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 诊疗记录id */ + private Long diagId; + + /** 羊只耳号 */ + @Excel(name = "羊只耳号") + private Long sheepId; + + /** 品种 */ + @Excel(name = "品种") + private String variety; + + /** 羊只类别 */ + @Excel(name = "羊只类别") + private String sheepType; + + /** 月龄 */ + @Excel(name = "月龄") + private Long monthAge; + + /** 性别 */ + @Excel(name = "性别") + private String gender; + + /** 胎次 */ + @Excel(name = "胎次") + private Long parity; + + /** 繁殖状态 */ + @Excel(name = "繁殖状态") + private String breed; + + /** 泌乳天数 */ + @Excel(name = "泌乳天数") + private Long lactDay; + + /** 怀孕天数 */ + @Excel(name = "怀孕天数") + private Long gestDay; + + /** 治疗日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "治疗日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 疾病类型 */ + @Excel(name = "疾病类型") + private Long diseaseId; + + /** 父疾病 */ + @Excel(name = "父疾病") + private String diseasePid; + + /** 兽医 */ + @Excel(name = "兽医") + private String veterinary; + + /** 药品使用记录id */ + @Excel(name = "药品使用记录id") + private Long usageId; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setDiagId(Long diagId) + { + this.diagId = diagId; + } + + public Long getDiagId() + { + return diagId; + } + + public void setSheepId(Long sheepId) + { + this.sheepId = sheepId; + } + + public Long getSheepId() + { + return sheepId; + } + + public void setVariety(String variety) + { + this.variety = variety; + } + + public String getVariety() + { + return variety; + } + + public void setSheepType(String sheepType) + { + this.sheepType = sheepType; + } + + public String getSheepType() + { + return sheepType; + } + + public void setMonthAge(Long monthAge) + { + this.monthAge = monthAge; + } + + public Long getMonthAge() + { + return monthAge; + } + + public void setGender(String gender) + { + this.gender = gender; + } + + public String getGender() + { + return gender; + } + + public void setParity(Long parity) + { + this.parity = parity; + } + + public Long getParity() + { + return parity; + } + + public void setBreed(String breed) + { + this.breed = breed; + } + + public String getBreed() + { + return breed; + } + + public void setLactDay(Long lactDay) + { + this.lactDay = lactDay; + } + + public Long getLactDay() + { + return lactDay; + } + + public void setGestDay(Long gestDay) + { + this.gestDay = gestDay; + } + + public Long getGestDay() + { + return gestDay; + } + + public void setDatetime(Date datetime) + { + this.datetime = datetime; + } + + public Date getDatetime() + { + return datetime; + } + + public void setDiseaseId(Long diseaseId) + { + this.diseaseId = diseaseId; + } + + public Long getDiseaseId() + { + return diseaseId; + } + + public void setDiseasePid(String diseasePid) + { + this.diseasePid = diseasePid; + } + + public String getDiseasePid() + { + return diseasePid; + } + + public void setVeterinary(String veterinary) + { + this.veterinary = veterinary; + } + + public String getVeterinary() + { + return veterinary; + } + + public void setUsageId(Long usageId) + { + this.usageId = usageId; + } + + public Long getUsageId() + { + return usageId; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("diagId", getDiagId()) + .append("sheepId", getSheepId()) + .append("variety", getVariety()) + .append("sheepType", getSheepType()) + .append("monthAge", getMonthAge()) + .append("gender", getGender()) + .append("parity", getParity()) + .append("breed", getBreed()) + .append("lactDay", getLactDay()) + .append("gestDay", getGestDay()) + .append("datetime", getDatetime()) + .append("diseaseId", getDiseaseId()) + .append("diseasePid", getDiseasePid()) + .append("veterinary", getVeterinary()) + .append("usageId", getUsageId()) + .append("comment", getComment()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DewormMapper.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DewormMapper.java new file mode 100644 index 0000000..f346774 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DewormMapper.java @@ -0,0 +1,62 @@ +package com.zhyc.module.biosafety.mapper; + +import java.util.List; + +import com.zhyc.module.biosafety.domain.Deworm; + +/** + * 驱虫Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface DewormMapper +{ + /** + * 查询驱虫 + * + * @param id 驱虫主键 + * @return 驱虫 + */ + public Deworm selectDewormById(Long id); + + /** + * 查询驱虫列表 + * + * @param deworm 驱虫 + * @return 驱虫集合 + */ + public List selectDewormList(Deworm deworm); + + /** + * 新增驱虫 + * + * @param deworm 驱虫 + * @return 结果 + */ + public int insertDeworm(Deworm deworm); + + /** + * 修改驱虫 + * + * @param deworm 驱虫 + * @return 结果 + */ + public int updateDeworm(Deworm deworm); + + /** + * 删除驱虫 + * + * @param id 驱虫主键 + * @return 结果 + */ + public int deleteDewormById(Long id); + + /** + * 批量删除驱虫 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDewormByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DiagnosisMapper.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DiagnosisMapper.java new file mode 100644 index 0000000..47110b7 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DiagnosisMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.mapper; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Diagnosis; + +/** + * 诊疗结果Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface DiagnosisMapper +{ + /** + * 查询诊疗结果 + * + * @param id 诊疗结果主键 + * @return 诊疗结果 + */ + public Diagnosis selectDiagnosisById(Long id); + + /** + * 查询诊疗结果列表 + * + * @param diagnosis 诊疗结果 + * @return 诊疗结果集合 + */ + public List selectDiagnosisList(Diagnosis diagnosis); + + /** + * 新增诊疗结果 + * + * @param diagnosis 诊疗结果 + * @return 结果 + */ + public int insertDiagnosis(Diagnosis diagnosis); + + /** + * 修改诊疗结果 + * + * @param diagnosis 诊疗结果 + * @return 结果 + */ + public int updateDiagnosis(Diagnosis diagnosis); + + /** + * 删除诊疗结果 + * + * @param id 诊疗结果主键 + * @return 结果 + */ + public int deleteDiagnosisById(Long id); + + /** + * 批量删除诊疗结果 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDiagnosisByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DisinfectMapper.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DisinfectMapper.java new file mode 100644 index 0000000..4092405 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/DisinfectMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.mapper; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Disinfect; + +/** + * 消毒记录Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface DisinfectMapper +{ + /** + * 查询消毒记录 + * + * @param id 消毒记录主键 + * @return 消毒记录 + */ + public Disinfect selectDisinfectById(Long id); + + /** + * 查询消毒记录列表 + * + * @param disinfect 消毒记录 + * @return 消毒记录集合 + */ + public List selectDisinfectList(Disinfect disinfect); + + /** + * 新增消毒记录 + * + * @param disinfect 消毒记录 + * @return 结果 + */ + public int insertDisinfect(Disinfect disinfect); + + /** + * 修改消毒记录 + * + * @param disinfect 消毒记录 + * @return 结果 + */ + public int updateDisinfect(Disinfect disinfect); + + /** + * 删除消毒记录 + * + * @param id 消毒记录主键 + * @return 结果 + */ + public int deleteDisinfectById(Long id); + + /** + * 批量删除消毒记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDisinfectByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/HealthMapper.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/HealthMapper.java new file mode 100644 index 0000000..0fbfafc --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/HealthMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.mapper; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Health; + +/** + * 保健Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface HealthMapper +{ + /** + * 查询保健 + * + * @param id 保健主键 + * @return 保健 + */ + public Health selectHealthById(Long id); + + /** + * 查询保健列表 + * + * @param health 保健 + * @return 保健集合 + */ + public List selectHealthList(Health health); + + /** + * 新增保健 + * + * @param health 保健 + * @return 结果 + */ + public int insertHealth(Health health); + + /** + * 修改保健 + * + * @param health 保健 + * @return 结果 + */ + public int updateHealth(Health health); + + /** + * 删除保健 + * + * @param id 保健主键 + * @return 结果 + */ + public int deleteHealthById(Long id); + + /** + * 批量删除保健 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteHealthByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/ImmunityMapper.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/ImmunityMapper.java new file mode 100644 index 0000000..ea5161a --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/ImmunityMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.mapper; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Immunity; + +/** + * 免疫Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface ImmunityMapper +{ + /** + * 查询免疫 + * + * @param id 免疫主键 + * @return 免疫 + */ + public Immunity selectImmunityById(Long id); + + /** + * 查询免疫列表 + * + * @param immunity 免疫 + * @return 免疫集合 + */ + public List selectImmunityList(Immunity immunity); + + /** + * 新增免疫 + * + * @param immunity 免疫 + * @return 结果 + */ + public int insertImmunity(Immunity immunity); + + /** + * 修改免疫 + * + * @param immunity 免疫 + * @return 结果 + */ + public int updateImmunity(Immunity immunity); + + /** + * 删除免疫 + * + * @param id 免疫主键 + * @return 结果 + */ + public int deleteImmunityById(Long id); + + /** + * 批量删除免疫 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteImmunityByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/TreatmentMapper.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/TreatmentMapper.java new file mode 100644 index 0000000..1807ed0 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/mapper/TreatmentMapper.java @@ -0,0 +1,62 @@ +package com.zhyc.module.biosafety.mapper; + +import java.util.List; + +import com.zhyc.module.biosafety.domain.Treatment; + +/** + * 治疗记录Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface TreatmentMapper +{ + /** + * 查询治疗记录 + * + * @param id 治疗记录主键 + * @return 治疗记录 + */ + public Treatment selectTreatmentById(Long id); + + /** + * 查询治疗记录列表 + * + * @param treatment 治疗记录 + * @return 治疗记录集合 + */ + public List selectTreatmentList(Treatment treatment); + + /** + * 新增治疗记录 + * + * @param treatment 治疗记录 + * @return 结果 + */ + public int insertTreatment(Treatment treatment); + + /** + * 修改治疗记录 + * + * @param treatment 治疗记录 + * @return 结果 + */ + public int updateTreatment(Treatment treatment); + + /** + * 删除治疗记录 + * + * @param id 治疗记录主键 + * @return 结果 + */ + public int deleteTreatmentById(Long id); + + /** + * 批量删除治疗记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTreatmentByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDewormService.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDewormService.java new file mode 100644 index 0000000..f897fa4 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDewormService.java @@ -0,0 +1,62 @@ +package com.zhyc.module.biosafety.service; + +import java.util.List; + +import com.zhyc.module.biosafety.domain.Deworm; + +/** + * 驱虫Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface IDewormService +{ + /** + * 查询驱虫 + * + * @param id 驱虫主键 + * @return 驱虫 + */ + public Deworm selectDewormById(Long id); + + /** + * 查询驱虫列表 + * + * @param deworm 驱虫 + * @return 驱虫集合 + */ + public List selectDewormList(Deworm deworm); + + /** + * 新增驱虫 + * + * @param deworm 驱虫 + * @return 结果 + */ + public int insertDeworm(Deworm deworm); + + /** + * 修改驱虫 + * + * @param deworm 驱虫 + * @return 结果 + */ + public int updateDeworm(Deworm deworm); + + /** + * 批量删除驱虫 + * + * @param ids 需要删除的驱虫主键集合 + * @return 结果 + */ + public int deleteDewormByIds(Long[] ids); + + /** + * 删除驱虫信息 + * + * @param id 驱虫主键 + * @return 结果 + */ + public int deleteDewormById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDiagnosisService.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDiagnosisService.java new file mode 100644 index 0000000..d88f954 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDiagnosisService.java @@ -0,0 +1,62 @@ +package com.zhyc.module.biosafety.service; + +import java.util.List; + +import com.zhyc.module.biosafety.domain.Diagnosis; + +/** + * 诊疗结果Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface IDiagnosisService +{ + /** + * 查询诊疗结果 + * + * @param id 诊疗结果主键 + * @return 诊疗结果 + */ + public Diagnosis selectDiagnosisById(Long id); + + /** + * 查询诊疗结果列表 + * + * @param diagnosis 诊疗结果 + * @return 诊疗结果集合 + */ + public List selectDiagnosisList(Diagnosis diagnosis); + + /** + * 新增诊疗结果 + * + * @param diagnosis 诊疗结果 + * @return 结果 + */ + public int insertDiagnosis(Diagnosis diagnosis); + + /** + * 修改诊疗结果 + * + * @param diagnosis 诊疗结果 + * @return 结果 + */ + public int updateDiagnosis(Diagnosis diagnosis); + + /** + * 批量删除诊疗结果 + * + * @param ids 需要删除的诊疗结果主键集合 + * @return 结果 + */ + public int deleteDiagnosisByIds(Long[] ids); + + /** + * 删除诊疗结果信息 + * + * @param id 诊疗结果主键 + * @return 结果 + */ + public int deleteDiagnosisById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDisinfectService.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDisinfectService.java new file mode 100644 index 0000000..d6d20f2 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IDisinfectService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.service; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Disinfect; + +/** + * 消毒记录Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface IDisinfectService +{ + /** + * 查询消毒记录 + * + * @param id 消毒记录主键 + * @return 消毒记录 + */ + public Disinfect selectDisinfectById(Long id); + + /** + * 查询消毒记录列表 + * + * @param disinfect 消毒记录 + * @return 消毒记录集合 + */ + public List selectDisinfectList(Disinfect disinfect); + + /** + * 新增消毒记录 + * + * @param disinfect 消毒记录 + * @return 结果 + */ + public int insertDisinfect(Disinfect disinfect); + + /** + * 修改消毒记录 + * + * @param disinfect 消毒记录 + * @return 结果 + */ + public int updateDisinfect(Disinfect disinfect); + + /** + * 批量删除消毒记录 + * + * @param ids 需要删除的消毒记录主键集合 + * @return 结果 + */ + public int deleteDisinfectByIds(Long[] ids); + + /** + * 删除消毒记录信息 + * + * @param id 消毒记录主键 + * @return 结果 + */ + public int deleteDisinfectById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IHealthService.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IHealthService.java new file mode 100644 index 0000000..b9d8e8e --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IHealthService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.service; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Health; + +/** + * 保健Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface IHealthService +{ + /** + * 查询保健 + * + * @param id 保健主键 + * @return 保健 + */ + public Health selectHealthById(Long id); + + /** + * 查询保健列表 + * + * @param health 保健 + * @return 保健集合 + */ + public List selectHealthList(Health health); + + /** + * 新增保健 + * + * @param health 保健 + * @return 结果 + */ + public int insertHealth(Health health); + + /** + * 修改保健 + * + * @param health 保健 + * @return 结果 + */ + public int updateHealth(Health health); + + /** + * 批量删除保健 + * + * @param ids 需要删除的保健主键集合 + * @return 结果 + */ + public int deleteHealthByIds(Long[] ids); + + /** + * 删除保健信息 + * + * @param id 保健主键 + * @return 结果 + */ + public int deleteHealthById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IImmunityService.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IImmunityService.java new file mode 100644 index 0000000..1f75b9b --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/IImmunityService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.biosafety.service; + +import java.util.List; +import com.zhyc.module.biosafety.domain.Immunity; + +/** + * 免疫Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface IImmunityService +{ + /** + * 查询免疫 + * + * @param id 免疫主键 + * @return 免疫 + */ + public Immunity selectImmunityById(Long id); + + /** + * 查询免疫列表 + * + * @param immunity 免疫 + * @return 免疫集合 + */ + public List selectImmunityList(Immunity immunity); + + /** + * 新增免疫 + * + * @param immunity 免疫 + * @return 结果 + */ + public int insertImmunity(Immunity immunity); + + /** + * 修改免疫 + * + * @param immunity 免疫 + * @return 结果 + */ + public int updateImmunity(Immunity immunity); + + /** + * 批量删除免疫 + * + * @param ids 需要删除的免疫主键集合 + * @return 结果 + */ + public int deleteImmunityByIds(Long[] ids); + + /** + * 删除免疫信息 + * + * @param id 免疫主键 + * @return 结果 + */ + public int deleteImmunityById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/ITreatmentService.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/ITreatmentService.java new file mode 100644 index 0000000..3d11b0a --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/ITreatmentService.java @@ -0,0 +1,62 @@ +package com.zhyc.module.biosafety.service; + +import java.util.List; + +import com.zhyc.module.biosafety.domain.Treatment; + +/** + * 治疗记录Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface ITreatmentService +{ + /** + * 查询治疗记录 + * + * @param id 治疗记录主键 + * @return 治疗记录 + */ + public Treatment selectTreatmentById(Long id); + + /** + * 查询治疗记录列表 + * + * @param treatment 治疗记录 + * @return 治疗记录集合 + */ + public List selectTreatmentList(Treatment treatment); + + /** + * 新增治疗记录 + * + * @param treatment 治疗记录 + * @return 结果 + */ + public int insertTreatment(Treatment treatment); + + /** + * 修改治疗记录 + * + * @param treatment 治疗记录 + * @return 结果 + */ + public int updateTreatment(Treatment treatment); + + /** + * 批量删除治疗记录 + * + * @param ids 需要删除的治疗记录主键集合 + * @return 结果 + */ + public int deleteTreatmentByIds(Long[] ids); + + /** + * 删除治疗记录信息 + * + * @param id 治疗记录主键 + * @return 结果 + */ + public int deleteTreatmentById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DewormServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DewormServiceImpl.java new file mode 100644 index 0000000..d0afd0e --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DewormServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.biosafety.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import com.zhyc.module.biosafety.domain.Deworm; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.biosafety.mapper.DewormMapper; +import com.zhyc.module.biosafety.service.IDewormService; + +/** + * 驱虫Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class DewormServiceImpl implements IDewormService +{ + @Autowired + private DewormMapper dewormMapper; + + /** + * 查询驱虫 + * + * @param id 驱虫主键 + * @return 驱虫 + */ + @Override + public Deworm selectDewormById(Long id) + { + return dewormMapper.selectDewormById(id); + } + + /** + * 查询驱虫列表 + * + * @param deworm 驱虫 + * @return 驱虫 + */ + @Override + public List selectDewormList(Deworm deworm) + { + return dewormMapper.selectDewormList(deworm); + } + + /** + * 新增驱虫 + * + * @param deworm 驱虫 + * @return 结果 + */ + @Override + public int insertDeworm(Deworm deworm) + { + deworm.setCreateTime(DateUtils.getNowDate()); + return dewormMapper.insertDeworm(deworm); + } + + /** + * 修改驱虫 + * + * @param deworm 驱虫 + * @return 结果 + */ + @Override + public int updateDeworm(Deworm deworm) + { + deworm.setUpdateTime(DateUtils.getNowDate()); + return dewormMapper.updateDeworm(deworm); + } + + /** + * 批量删除驱虫 + * + * @param ids 需要删除的驱虫主键 + * @return 结果 + */ + @Override + public int deleteDewormByIds(Long[] ids) + { + return dewormMapper.deleteDewormByIds(ids); + } + + /** + * 删除驱虫信息 + * + * @param id 驱虫主键 + * @return 结果 + */ + @Override + public int deleteDewormById(Long id) + { + return dewormMapper.deleteDewormById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DiagnosisServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DiagnosisServiceImpl.java new file mode 100644 index 0000000..319a658 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DiagnosisServiceImpl.java @@ -0,0 +1,95 @@ +package com.zhyc.module.biosafety.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import com.zhyc.module.biosafety.mapper.DiagnosisMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.biosafety.domain.Diagnosis; +import com.zhyc.module.biosafety.service.IDiagnosisService; + +/** + * 诊疗结果Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class DiagnosisServiceImpl implements IDiagnosisService +{ + @Autowired + private DiagnosisMapper diagnosisMapper; + + /** + * 查询诊疗结果 + * + * @param id 诊疗结果主键 + * @return 诊疗结果 + */ + @Override + public Diagnosis selectDiagnosisById(Long id) + { + return diagnosisMapper.selectDiagnosisById(id); + } + + /** + * 查询诊疗结果列表 + * + * @param diagnosis 诊疗结果 + * @return 诊疗结果 + */ + @Override + public List selectDiagnosisList(Diagnosis diagnosis) + { + return diagnosisMapper.selectDiagnosisList(diagnosis); + } + + /** + * 新增诊疗结果 + * + * @param diagnosis 诊疗结果 + * @return 结果 + */ + @Override + public int insertDiagnosis(Diagnosis diagnosis) + { + diagnosis.setCreateTime(DateUtils.getNowDate()); + return diagnosisMapper.insertDiagnosis(diagnosis); + } + + /** + * 修改诊疗结果 + * + * @param diagnosis 诊疗结果 + * @return 结果 + */ + @Override + public int updateDiagnosis(Diagnosis diagnosis) + { + return diagnosisMapper.updateDiagnosis(diagnosis); + } + + /** + * 批量删除诊疗结果 + * + * @param ids 需要删除的诊疗结果主键 + * @return 结果 + */ + @Override + public int deleteDiagnosisByIds(Long[] ids) + { + return diagnosisMapper.deleteDiagnosisByIds(ids); + } + + /** + * 删除诊疗结果信息 + * + * @param id 诊疗结果主键 + * @return 结果 + */ + @Override + public int deleteDiagnosisById(Long id) + { + return diagnosisMapper.deleteDiagnosisById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DisinfectServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DisinfectServiceImpl.java new file mode 100644 index 0000000..18a014e --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/DisinfectServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.biosafety.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.biosafety.mapper.DisinfectMapper; +import com.zhyc.module.biosafety.domain.Disinfect; +import com.zhyc.module.biosafety.service.IDisinfectService; + +/** + * 消毒记录Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class DisinfectServiceImpl implements IDisinfectService +{ + @Autowired + private DisinfectMapper disinfectMapper; + + /** + * 查询消毒记录 + * + * @param id 消毒记录主键 + * @return 消毒记录 + */ + @Override + public Disinfect selectDisinfectById(Long id) + { + return disinfectMapper.selectDisinfectById(id); + } + + /** + * 查询消毒记录列表 + * + * @param disinfect 消毒记录 + * @return 消毒记录 + */ + @Override + public List selectDisinfectList(Disinfect disinfect) + { + return disinfectMapper.selectDisinfectList(disinfect); + } + + /** + * 新增消毒记录 + * + * @param disinfect 消毒记录 + * @return 结果 + */ + @Override + public int insertDisinfect(Disinfect disinfect) + { + disinfect.setCreateTime(DateUtils.getNowDate()); + return disinfectMapper.insertDisinfect(disinfect); + } + + /** + * 修改消毒记录 + * + * @param disinfect 消毒记录 + * @return 结果 + */ + @Override + public int updateDisinfect(Disinfect disinfect) + { + disinfect.setUpdateTime(DateUtils.getNowDate()); + return disinfectMapper.updateDisinfect(disinfect); + } + + /** + * 批量删除消毒记录 + * + * @param ids 需要删除的消毒记录主键 + * @return 结果 + */ + @Override + public int deleteDisinfectByIds(Long[] ids) + { + return disinfectMapper.deleteDisinfectByIds(ids); + } + + /** + * 删除消毒记录信息 + * + * @param id 消毒记录主键 + * @return 结果 + */ + @Override + public int deleteDisinfectById(Long id) + { + return disinfectMapper.deleteDisinfectById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/HealthServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/HealthServiceImpl.java new file mode 100644 index 0000000..7986bf7 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/HealthServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.biosafety.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.biosafety.mapper.HealthMapper; +import com.zhyc.module.biosafety.domain.Health; +import com.zhyc.module.biosafety.service.IHealthService; + +/** + * 保健Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class HealthServiceImpl implements IHealthService +{ + @Autowired + private HealthMapper healthMapper; + + /** + * 查询保健 + * + * @param id 保健主键 + * @return 保健 + */ + @Override + public Health selectHealthById(Long id) + { + return healthMapper.selectHealthById(id); + } + + /** + * 查询保健列表 + * + * @param health 保健 + * @return 保健 + */ + @Override + public List selectHealthList(Health health) + { + return healthMapper.selectHealthList(health); + } + + /** + * 新增保健 + * + * @param health 保健 + * @return 结果 + */ + @Override + public int insertHealth(Health health) + { + health.setCreateTime(DateUtils.getNowDate()); + return healthMapper.insertHealth(health); + } + + /** + * 修改保健 + * + * @param health 保健 + * @return 结果 + */ + @Override + public int updateHealth(Health health) + { + health.setUpdateTime(DateUtils.getNowDate()); + return healthMapper.updateHealth(health); + } + + /** + * 批量删除保健 + * + * @param ids 需要删除的保健主键 + * @return 结果 + */ + @Override + public int deleteHealthByIds(Long[] ids) + { + return healthMapper.deleteHealthByIds(ids); + } + + /** + * 删除保健信息 + * + * @param id 保健主键 + * @return 结果 + */ + @Override + public int deleteHealthById(Long id) + { + return healthMapper.deleteHealthById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/ImmunityServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/ImmunityServiceImpl.java new file mode 100644 index 0000000..145901b --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/ImmunityServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.biosafety.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.biosafety.mapper.ImmunityMapper; +import com.zhyc.module.biosafety.domain.Immunity; +import com.zhyc.module.biosafety.service.IImmunityService; + +/** + * 免疫Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class ImmunityServiceImpl implements IImmunityService +{ + @Autowired + private ImmunityMapper immunityMapper; + + /** + * 查询免疫 + * + * @param id 免疫主键 + * @return 免疫 + */ + @Override + public Immunity selectImmunityById(Long id) + { + return immunityMapper.selectImmunityById(id); + } + + /** + * 查询免疫列表 + * + * @param immunity 免疫 + * @return 免疫 + */ + @Override + public List selectImmunityList(Immunity immunity) + { + return immunityMapper.selectImmunityList(immunity); + } + + /** + * 新增免疫 + * + * @param immunity 免疫 + * @return 结果 + */ + @Override + public int insertImmunity(Immunity immunity) + { + immunity.setCreateTime(DateUtils.getNowDate()); + return immunityMapper.insertImmunity(immunity); + } + + /** + * 修改免疫 + * + * @param immunity 免疫 + * @return 结果 + */ + @Override + public int updateImmunity(Immunity immunity) + { + immunity.setUpdateTime(DateUtils.getNowDate()); + return immunityMapper.updateImmunity(immunity); + } + + /** + * 批量删除免疫 + * + * @param ids 需要删除的免疫主键 + * @return 结果 + */ + @Override + public int deleteImmunityByIds(Long[] ids) + { + return immunityMapper.deleteImmunityByIds(ids); + } + + /** + * 删除免疫信息 + * + * @param id 免疫主键 + * @return 结果 + */ + @Override + public int deleteImmunityById(Long id) + { + return immunityMapper.deleteImmunityById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/TreatmentServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/TreatmentServiceImpl.java new file mode 100644 index 0000000..502a05b --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/biosafety/service/impl/TreatmentServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.biosafety.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.biosafety.mapper.TreatmentMapper; +import com.zhyc.module.biosafety.domain.Treatment; +import com.zhyc.module.biosafety.service.ITreatmentService; + +/** + * 治疗记录Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class TreatmentServiceImpl implements ITreatmentService +{ + @Autowired + private TreatmentMapper treatmentMapper; + + /** + * 查询治疗记录 + * + * @param id 治疗记录主键 + * @return 治疗记录 + */ + @Override + public Treatment selectTreatmentById(Long id) + { + return treatmentMapper.selectTreatmentById(id); + } + + /** + * 查询治疗记录列表 + * + * @param treatment 治疗记录 + * @return 治疗记录 + */ + @Override + public List selectTreatmentList(Treatment treatment) + { + return treatmentMapper.selectTreatmentList(treatment); + } + + /** + * 新增治疗记录 + * + * @param treatment 治疗记录 + * @return 结果 + */ + @Override + public int insertTreatment(Treatment treatment) + { + treatment.setCreateTime(DateUtils.getNowDate()); + return treatmentMapper.insertTreatment(treatment); + } + + /** + * 修改治疗记录 + * + * @param treatment 治疗记录 + * @return 结果 + */ + @Override + public int updateTreatment(Treatment treatment) + { + treatment.setUpdateTime(DateUtils.getNowDate()); + return treatmentMapper.updateTreatment(treatment); + } + + /** + * 批量删除治疗记录 + * + * @param ids 需要删除的治疗记录主键 + * @return 结果 + */ + @Override + public int deleteTreatmentByIds(Long[] ids) + { + return treatmentMapper.deleteTreatmentByIds(ids); + } + + /** + * 删除治疗记录信息 + * + * @param id 治疗记录主键 + * @return 结果 + */ + @Override + public int deleteTreatmentById(Long id) + { + return treatmentMapper.deleteTreatmentById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/controller/NpRawMilkInspeController.java b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/controller/NpRawMilkInspeController.java new file mode 100644 index 0000000..d7989f1 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/controller/NpRawMilkInspeController.java @@ -0,0 +1,104 @@ +package com.zhyc.module.dairyProducts.rawMilkTest.controller; + +import java.util.List; +import javax.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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe; +import com.zhyc.module.dairyProducts.rawMilkTest.service.INpRawMilkInspeService; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 生乳检验记录Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/rawMilkTest/rawMilkTest") +public class NpRawMilkInspeController extends BaseController +{ + @Autowired + private INpRawMilkInspeService npRawMilkInspeService; + + /** + * 查询生乳检验记录列表 + */ + @PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:list')") + @GetMapping("/list") + public TableDataInfo list(NpRawMilkInspe npRawMilkInspe) + { + startPage(); + List list = npRawMilkInspeService.selectNpRawMilkInspeList(npRawMilkInspe); + return getDataTable(list); + } + + /** + * 导出生乳检验记录列表 + */ + @PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:export')") + @Log(title = "生乳检验记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NpRawMilkInspe npRawMilkInspe) + { + List list = npRawMilkInspeService.selectNpRawMilkInspeList(npRawMilkInspe); + ExcelUtil util = new ExcelUtil(NpRawMilkInspe.class); + util.exportExcel(response, list, "生乳检验记录数据"); + } + + /** + * 获取生乳检验记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(npRawMilkInspeService.selectNpRawMilkInspeById(id)); + } + + /** + * 新增生乳检验记录 + */ + @PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:add')") + @Log(title = "生乳检验记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NpRawMilkInspe npRawMilkInspe) + { + return toAjax(npRawMilkInspeService.insertNpRawMilkInspe(npRawMilkInspe)); + } + + /** + * 修改生乳检验记录 + */ + @PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:edit')") + @Log(title = "生乳检验记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NpRawMilkInspe npRawMilkInspe) + { + return toAjax(npRawMilkInspeService.updateNpRawMilkInspe(npRawMilkInspe)); + } + + /** + * 删除生乳检验记录 + */ + @PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:remove')") + @Log(title = "生乳检验记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(npRawMilkInspeService.deleteNpRawMilkInspeByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/domain/NpRawMilkInspe.java b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/domain/NpRawMilkInspe.java new file mode 100644 index 0000000..34bd7b2 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/domain/NpRawMilkInspe.java @@ -0,0 +1,647 @@ +//package com.zhyc.module.dairyProducts.rawMilkTest.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.zhyc.common.annotation.Excel; +//import com.zhyc.common.core.domain.BaseEntity; +// +///** +// * 生乳检验记录对象 np_raw_milk_inspe +// * +// * @author ruoyi +// * @date 2025-07-15 +// */ +//public class NpRawMilkInspe extends BaseEntity +//{ +// private static final long serialVersionUID = 1L; +// +// /** $column.columnComment */ +// private Long id; +// +// /** 检测日期 */ +// @JsonFormat(pattern = "yyyy-MM-dd") +// @Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd") +// private Date datetime; +// +// /** 来源 */ +// @Excel(name = "来源") +// private String source; +// +// /** 冰点(摄氏度) */ +// @Excel(name = "冰点", readConverterExp = "摄=氏度") +// private Double freeze; +// +// /** 相对密度(20摄氏度/40摄氏度) */ +// @Excel(name = "相对密度", readConverterExp = "2=0摄氏度/40摄氏度") +// private Double density; +// +// /** 脂肪g/100g */ +// @Excel(name = "脂肪g/100g") +// private Double fat; +// +// /** 蛋白质g/100g */ +// @Excel(name = "蛋白质g/100g") +// private Double protein; +// +// /** 非脂g/100g */ +// @Excel(name = "非脂g/100g") +// private Double nonFat; +// +// /** 干物质mg/100g */ +// @Excel(name = "干物质mg/100g") +// private Double dryMatter; +// +// /** 杂物质mg/100g */ +// @Excel(name = "杂物质mg/100g") +// private Double impurity; +// +// /** 乳糖g/100g */ +// @Excel(name = "乳糖g/100g") +// private Double lactose; +// +// /** 灰度g/100g */ +// @Excel(name = "灰度g/100g") +// private Double ashContent; +// +// /** 酸度 */ +// @Excel(name = "酸度") +// private Double acidity; +// +// /** ph */ +// @Excel(name = "ph") +// private Double ph; +// +// /** 菌落总数(CFU/g) */ +// @Excel(name = "菌落总数", readConverterExp = "C=FU/g") +// private Double bacterialColony; +// +// /** 乳铁蛋白(mg/L) */ +// @Excel(name = "乳铁蛋白", readConverterExp = "m=g/L") +// private Double lactoferrin; +// +// /** 免疫球蛋白(mg/L) */ +// @Excel(name = "免疫球蛋白", readConverterExp = "m=g/L") +// private Double ig; +// +// /** 体细胞(scc/ml) */ +// @Excel(name = "体细胞", readConverterExp = "s=cc/ml") +// private Double somaticCell; +// +// /** 尿素氮 */ +// @Excel(name = "尿素氮") +// private Double usea; +// +// /** 脂蛋比 */ +// @Excel(name = "脂蛋比") +// private Double fatRatio; +// +// /** 备注 */ +// @Excel(name = "备注") +// private String comment; +// +// public void setId(Long id) +// { +// this.id = id; +// } +// +// public Long getId() +// { +// return id; +// } +// +// public void setDatetime(Date datetime) +// { +// this.datetime = datetime; +// } +// +// public Date getDatetime() +// { +// return datetime; +// } +// +// public void setSource(String source) +// { +// this.source = source; +// } +// +// public String getSource() +// { +// return source; +// } +// +// public void setFreeze(Double freeze) +// { +// this.freeze = freeze; +// } +// +// public Double getFreeze() +// { +// return freeze; +// } +// +// public void setDensity(Double density) +// { +// this.density = density; +// } +// +// public Double getDensity() +// { +// return density; +// } +// +// public void setFat(Double fat) +// { +// this.fat = fat; +// } +// +// public Double getFat() +// { +// return fat; +// } +// +// public void setProtein(Double protein) +// { +// this.protein = protein; +// } +// +// public Double getProtein() +// { +// return protein; +// } +// +// public void setNonFat(Double nonFat) +// { +// this.nonFat = nonFat; +// } +// +// public Double getNonFat() +// { +// return nonFat; +// } +// +// public void setDryMatter(Double dryMatter) +// { +// this.dryMatter = dryMatter; +// } +// +// public Double getDryMatter() +// { +// return dryMatter; +// } +// +// public void setImpurity(Double impurity) +// { +// this.impurity = impurity; +// } +// +// public Double getImpurity() +// { +// return impurity; +// } +// +// public void setLactose(Double lactose) +// { +// this.lactose = lactose; +// } +// +// public Double getLactose() +// { +// return lactose; +// } +// +// public void setAshContent(Double ashContent) +// { +// this.ashContent = ashContent; +// } +// +// public Double getAshContent() +// { +// return ashContent; +// } +// +// public void setAcidity(Double acidity) +// { +// this.acidity = acidity; +// } +// +// public Double getAcidity() +// { +// return acidity; +// } +// +// public void setPh(Double ph) +// { +// this.ph = ph; +// } +// +// public Double getPh() +// { +// return ph; +// } +// +// public void setBacterialColony(Double bacterialColony) +// { +// this.bacterialColony = bacterialColony; +// } +// +// public Double getBacterialColony() +// { +// return bacterialColony; +// } +// +// public void setLactoferrin(Double lactoferrin) +// { +// this.lactoferrin = lactoferrin; +// } +// +// public Double getLactoferrin() +// { +// return lactoferrin; +// } +// +// public void setIg(Double ig) +// { +// this.ig = ig; +// } +// +// public Double getIg() +// { +// return ig; +// } +// +// public void setSomaticCell(Double somaticCell) +// { +// this.somaticCell = somaticCell; +// } +// +// public Double getSomaticCell() +// { +// return somaticCell; +// } +// +// public void setUsea(Double usea) +// { +// this.usea = usea; +// } +// +// public Double getUsea() +// { +// return usea; +// } +// +// public void setFatRatio(Double fatRatio) +// { +// this.fatRatio = fatRatio; +// } +// +// public Double getFatRatio() +// { +// return fatRatio; +// } +// +// public void setComment(String comment) +// { +// this.comment = comment; +// } +// +// public String getComment() +// { +// return comment; +// } +// +// @Override +// public String toString() { +// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +// .append("id", getId()) +// .append("datetime", getDatetime()) +// .append("source", getSource()) +// .append("freeze", getFreeze()) +// .append("density", getDensity()) +// .append("fat", getFat()) +// .append("protein", getProtein()) +// .append("nonFat", getNonFat()) +// .append("dryMatter", getDryMatter()) +// .append("impurity", getImpurity()) +// .append("lactose", getLactose()) +// .append("ashContent", getAshContent()) +// .append("acidity", getAcidity()) +// .append("ph", getPh()) +// .append("bacterialColony", getBacterialColony()) +// .append("lactoferrin", getLactoferrin()) +// .append("ig", getIg()) +// .append("somaticCell", getSomaticCell()) +// .append("usea", getUsea()) +// .append("fatRatio", getFatRatio()) +// .append("comment", getComment()) +// .append("createBy", getCreateBy()) +// .append("createTime", getCreateTime()) +// .toString(); +// } +//} +package com.zhyc.module.dairyProducts.rawMilkTest.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.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 生乳检验记录对象 np_raw_milk_inspe + * + * @author ruoyi + * @date 2025-07-15 + */ +public class NpRawMilkInspe extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 检测日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date datetime; + + /** 来源 */ + @Excel(name = "来源") + private String source; + + /** 冰点(摄氏度) */ + @Excel(name = "冰点", readConverterExp = "摄=氏度") + private Double freeze; + + /** 相对密度(20摄氏度/40摄氏度) */ + @Excel(name = "相对密度", readConverterExp = "2=0摄氏度/40摄氏度") + private Double density; + + /** 脂肪g/100g */ + @Excel(name = "脂肪g/100g") + private Double fat; + + /** 蛋白质g/100g */ + @Excel(name = "蛋白质g/100g") + private Double protein; + + /** 非脂g/100g */ + @Excel(name = "非脂g/100g") + private Double nonFat; + + /** 干物质mg/100g */ + @Excel(name = "干物质mg/100g") + private Double dryMatter; + + /** 杂质度mg/100g */ + @Excel(name = "杂质度mg/100g") + private Double impurityDegree; + + /** 乳糖g/100g */ + @Excel(name = "乳糖g/100g") + private Double lactose; + + /** 灰度g/100g */ + @Excel(name = "灰度g/100g") + private Double ashContent; + + /** 酸度 */ + @Excel(name = "酸度") + private Double acidity; + + /** ph */ + @Excel(name = "ph") + private Double ph; + + /** 菌落总数(CFU/g) */ + @Excel(name = "菌落总数", readConverterExp = "C=FU/g") + private Double bacterialColony; + + /** 乳铁蛋白(mg/L) */ + @Excel(name = "乳铁蛋白", readConverterExp = "m=g/L") + private Double lactoferrin; + + /** 免疫球蛋白(mg/L) */ + @Excel(name = "免疫球蛋白", readConverterExp = "m=g/L") + private Double ig; + + /** 体细胞(scc/ml) */ + @Excel(name = "体细胞", readConverterExp = "s=cc/ml") + private Double somaticCell; + + /** 尿素氮 */ + @Excel(name = "尿素氮") + private Double usea; + + /** 脂蛋比 */ + @Excel(name = "脂蛋比") + private Double fatRatio; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + // Getters and Setters + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setDatetime(Date datetime) { + this.datetime = datetime; + } + + public Date getDatetime() { + return datetime; + } + + public void setSource(String source) { + this.source = source; + } + + public String getSource() { + return source; + } + + public void setFreeze(Double freeze) { + this.freeze = freeze; + } + + public Double getFreeze() { + return freeze; + } + + public void setDensity(Double density) { + this.density = density; + } + + public Double getDensity() { + return density; + } + + public void setFat(Double fat) { + this.fat = fat; + } + + public Double getFat() { + return fat; + } + + public void setProtein(Double protein) { + this.protein = protein; + } + + public Double getProtein() { + return protein; + } + + public void setNonFat(Double nonFat) { + this.nonFat = nonFat; + } + + public Double getNonFat() { + return nonFat; + } + + public void setDryMatter(Double dryMatter) { + this.dryMatter = dryMatter; + } + + public Double getDryMatter() { + return dryMatter; + } + + public void setImpurityDegree(Double impurityDegree) { + this.impurityDegree = impurityDegree; + } + + public Double getImpurityDegree() { + return impurityDegree; + } + + public void setLactose(Double lactose) { + this.lactose = lactose; + } + + public Double getLactose() { + return lactose; + } + + public void setAshContent(Double ashContent) { + this.ashContent = ashContent; + } + + public Double getAshContent() { + return ashContent; + } + + public void setAcidity(Double acidity) { + this.acidity = acidity; + } + + public Double getAcidity() { + return acidity; + } + + public void setPh(Double ph) { + this.ph = ph; + } + + public Double getPh() { + return ph; + } + + public void setBacterialColony(Double bacterialColony) { + this.bacterialColony = bacterialColony; + } + + public Double getBacterialColony() { + return bacterialColony; + } + + public void setLactoferrin(Double lactoferrin) { + this.lactoferrin = lactoferrin; + } + + public Double getLactoferrin() { + return lactoferrin; + } + + public void setIg(Double ig) { + this.ig = ig; + } + + public Double getIg() { + return ig; + } + + public void setSomaticCell(Double somaticCell) { + this.somaticCell = somaticCell; + } + + public Double getSomaticCell() { + return somaticCell; + } + + public void setUsea(Double usea) { + this.usea = usea; + } + + public Double getUsea() { + return usea; + } + + public void setFatRatio(Double fatRatio) { + this.fatRatio = fatRatio; + } + + public Double getFatRatio() { + return fatRatio; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public String getComment() { + return comment; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("datetime", getDatetime()) + .append("source", getSource()) + .append("freeze", getFreeze()) + .append("density", getDensity()) + .append("fat", getFat()) + .append("protein", getProtein()) + .append("nonFat", getNonFat()) + .append("dryMatter", getDryMatter()) + .append("impurityDegree", getImpurityDegree()) + .append("lactose", getLactose()) + .append("ashContent", getAshContent()) + .append("acidity", getAcidity()) + .append("ph", getPh()) + .append("bacterialColony", getBacterialColony()) + .append("lactoferrin", getLactoferrin()) + .append("ig", getIg()) + .append("somaticCell", getSomaticCell()) + .append("usea", getUsea()) + .append("fatRatio", getFatRatio()) + .append("comment", getComment()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/mapper/NpRawMilkInspeMapper.java b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/mapper/NpRawMilkInspeMapper.java new file mode 100644 index 0000000..cbfd525 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/mapper/NpRawMilkInspeMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.dairyProducts.rawMilkTest.mapper; + +import java.util.List; +import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe; + +/** + * 生乳检验记录Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface NpRawMilkInspeMapper +{ + /** + * 查询生乳检验记录 + * + * @param id 生乳检验记录主键 + * @return 生乳检验记录 + */ + public NpRawMilkInspe selectNpRawMilkInspeById(Long id); + + /** + * 查询生乳检验记录列表 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 生乳检验记录集合 + */ + public List selectNpRawMilkInspeList(NpRawMilkInspe npRawMilkInspe); + + /** + * 新增生乳检验记录 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 结果 + */ + public int insertNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe); + + /** + * 修改生乳检验记录 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 结果 + */ + public int updateNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe); + + /** + * 删除生乳检验记录 + * + * @param id 生乳检验记录主键 + * @return 结果 + */ + public int deleteNpRawMilkInspeById(Long id); + + /** + * 批量删除生乳检验记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNpRawMilkInspeByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/service/INpRawMilkInspeService.java b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/service/INpRawMilkInspeService.java new file mode 100644 index 0000000..2d4c1e3 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/service/INpRawMilkInspeService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.dairyProducts.rawMilkTest.service; + +import java.util.List; +import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe; + +/** + * 生乳检验记录Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface INpRawMilkInspeService +{ + /** + * 查询生乳检验记录 + * + * @param id 生乳检验记录主键 + * @return 生乳检验记录 + */ + public NpRawMilkInspe selectNpRawMilkInspeById(Long id); + + /** + * 查询生乳检验记录列表 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 生乳检验记录集合 + */ + public List selectNpRawMilkInspeList(NpRawMilkInspe npRawMilkInspe); + + /** + * 新增生乳检验记录 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 结果 + */ + public int insertNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe); + + /** + * 修改生乳检验记录 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 结果 + */ + public int updateNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe); + + /** + * 批量删除生乳检验记录 + * + * @param ids 需要删除的生乳检验记录主键集合 + * @return 结果 + */ + public int deleteNpRawMilkInspeByIds(Long[] ids); + + /** + * 删除生乳检验记录信息 + * + * @param id 生乳检验记录主键 + * @return 结果 + */ + public int deleteNpRawMilkInspeById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/service/impl/NpRawMilkInspeServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/service/impl/NpRawMilkInspeServiceImpl.java new file mode 100644 index 0000000..fa12858 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/dairyProducts/rawMilkTest/service/impl/NpRawMilkInspeServiceImpl.java @@ -0,0 +1,95 @@ +package com.zhyc.module.dairyProducts.rawMilkTest.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.dairyProducts.rawMilkTest.mapper.NpRawMilkInspeMapper; +import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe; +import com.zhyc.module.dairyProducts.rawMilkTest.service.INpRawMilkInspeService; + +/** + * 生乳检验记录Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class NpRawMilkInspeServiceImpl implements INpRawMilkInspeService +{ + @Autowired + private NpRawMilkInspeMapper npRawMilkInspeMapper; + + /** + * 查询生乳检验记录 + * + * @param id 生乳检验记录主键 + * @return 生乳检验记录 + */ + @Override + public NpRawMilkInspe selectNpRawMilkInspeById(Long id) + { + return npRawMilkInspeMapper.selectNpRawMilkInspeById(id); + } + + /** + * 查询生乳检验记录列表 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 生乳检验记录 + */ + @Override + public List selectNpRawMilkInspeList(NpRawMilkInspe npRawMilkInspe) + { + return npRawMilkInspeMapper.selectNpRawMilkInspeList(npRawMilkInspe); + } + + /** + * 新增生乳检验记录 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 结果 + */ + @Override + public int insertNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe) + { + npRawMilkInspe.setCreateTime(DateUtils.getNowDate()); + return npRawMilkInspeMapper.insertNpRawMilkInspe(npRawMilkInspe); + } + + /** + * 修改生乳检验记录 + * + * @param npRawMilkInspe 生乳检验记录 + * @return 结果 + */ + @Override + public int updateNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe) + { + return npRawMilkInspeMapper.updateNpRawMilkInspe(npRawMilkInspe); + } + + /** + * 批量删除生乳检验记录 + * + * @param ids 需要删除的生乳检验记录主键 + * @return 结果 + */ + @Override + public int deleteNpRawMilkInspeByIds(Long[] ids) + { + return npRawMilkInspeMapper.deleteNpRawMilkInspeByIds(ids); + } + + /** + * 删除生乳检验记录信息 + * + * @param id 生乳检验记录主键 + * @return 结果 + */ + @Override + public int deleteNpRawMilkInspeById(Long id) + { + return npRawMilkInspeMapper.deleteNpRawMilkInspeById(id); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/fileManagement/mapper/SheepFileMapper.java b/zhyc-module/src/main/java/com/zhyc/module/fileManagement/mapper/SheepFileMapper.java index 027a315..ef9c9a0 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/fileManagement/mapper/SheepFileMapper.java +++ b/zhyc-module/src/main/java/com/zhyc/module/fileManagement/mapper/SheepFileMapper.java @@ -6,15 +6,15 @@ import java.util.List; /** * 羊只档案Mapper接口 - * + * * @author wyt * @date 2025-07-13 */ -public interface SheepFileMapper +public interface SheepFileMapper { /** * 查询羊只档案 - * + * * @param id 羊只档案主键 * @return 羊只档案 */ @@ -22,7 +22,7 @@ public interface SheepFileMapper /** * 查询羊只档案列表 - * + * * @param sheepFile 羊只档案 * @return 羊只档案集合 */ @@ -30,7 +30,7 @@ public interface SheepFileMapper /** * 新增羊只档案 - * + * * @param sheepFile 羊只档案 * @return 结果 */ @@ -38,7 +38,7 @@ public interface SheepFileMapper /** * 修改羊只档案 - * + * * @param sheepFile 羊只档案 * @return 结果 */ @@ -46,7 +46,7 @@ public interface SheepFileMapper /** * 删除羊只档案 - * + * * @param id 羊只档案主键 * @return 结果 */ @@ -54,9 +54,10 @@ public interface SheepFileMapper /** * 批量删除羊只档案 - * + * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteSheepFileByIds(Long[] ids); + } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/controller/ScAddSheepController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/controller/ScAddSheepController.java index d205ae0..8602dce 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/controller/ScAddSheepController.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/controller/ScAddSheepController.java @@ -3,9 +3,12 @@ package com.zhyc.module.produce.manage_sheep.add_sheep.controller; import com.zhyc.common.annotation.Log; import com.zhyc.common.core.domain.AjaxResult; import com.zhyc.common.enums.BusinessType; +import com.zhyc.common.exception.ServiceException; import com.zhyc.common.utils.poi.ExcelUtil; import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep; import com.zhyc.module.produce.manage_sheep.add_sheep.service.IScAddSheepService; +import com.zhyc.module.sheepfold_management.domain.DaSheepfold; +import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.PostMapping; @@ -27,14 +30,16 @@ import static com.zhyc.common.utils.SecurityUtils.getUsername; public class ScAddSheepController { @Autowired private IScAddSheepService scAddSheepService; + @Autowired + private IDaSheepfoldService daSheepfoldMapper; //新增羊只验证 @PreAuthorize("@ss.hasPermi('produce:add_sheep:add')") @Log(title = "新增", businessType = BusinessType.INSERT) @PostMapping public AjaxResult addSheep(@RequestBody ScAddSheep scAddSheep) { - if (scAddSheep.getSheepId() == null || scAddSheep.getSheepId().isEmpty()) { - return AjaxResult.error("羊只id不能为空"); + if (scAddSheep.getEarNumber() == null || scAddSheep.getEarNumber().isEmpty()) { + return AjaxResult.error("耳号不能为空"); } if (scAddSheep.getSheepfold() == null || scAddSheep.getSheepfold() == 0) { return AjaxResult.error("羊舍不能为空"); @@ -52,20 +57,33 @@ public class ScAddSheepController { return AjaxResult.error("品种不能为空"); } - boolean success = scAddSheepService.insertScAddSheep(scAddSheep); - if (success) { - return success("新增成功"); - } else { - return AjaxResult.error("新增失败"); + try { + boolean success = scAddSheepService.insertScAddSheep(scAddSheep); + if (success) { + return success("新增成功"); + } else { + return AjaxResult.error("新增失败"); + } + } catch (ServiceException e) { + return AjaxResult.error(e.getMessage()); } } - //导出表单 + @PostMapping("/exportForm") @Log(title = "羊只信息", businessType = BusinessType.EXPORT) public void exportForm(HttpServletResponse response, @RequestBody ScAddSheep scAddSheep) throws IOException { ExcelUtil util = new ExcelUtil<>(ScAddSheep.class); List list = new ArrayList<>(); + + // 设置羊舍名称(从数据库查) + if (scAddSheep.getSheepfold() != null) { + DaSheepfold fold = daSheepfoldMapper.selectDaSheepfoldById(scAddSheep.getSheepfold().longValue()); + if (fold != null) { + scAddSheep.setSheepfoldNameExcel(fold.getSheepfoldName()); + } + } + list.add(scAddSheep); util.exportExcel(response, list, "羊只信息"); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/domain/ScAddSheep.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/domain/ScAddSheep.java index dd3f662..9ac2465 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/domain/ScAddSheep.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/domain/ScAddSheep.java @@ -2,10 +2,16 @@ package com.zhyc.module.produce.manage_sheep.add_sheep.domain; import com.zhyc.common.annotation.Excel; import com.zhyc.common.core.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import java.math.BigDecimal; import java.util.Date; +@Data +@AllArgsConstructor +@NoArgsConstructor public class ScAddSheep extends BaseEntity { /** * 羊只 @@ -15,15 +21,21 @@ public class ScAddSheep extends BaseEntity { */ private static final long serialVersionUID = 1L; @Excel(name = "主键") - private Long id; // 如果数据库主键叫 id,就加这一行 - /** 羊只ID */ - @Excel(name = "羊只ID") - private String sheepId; + private Integer id; // 如果数据库主键叫 id,就加这一行 + /** 羊只耳号 */ + @Excel(name = "耳号") + private String earNumber; /** 羊舍编号 */ - @Excel(name = "羊舍") private Integer sheepfold; +// @Excel(name = "羊舍名称") + private String sheepfoldName; + + // 导出时生成“羊舍名称”列 ,仅 Excel 用,不映射到数据库 + @Excel(name = "羊舍名称") + private String sheepfoldNameExcel; + /** 父号 */ @Excel(name = "父号") private String father; @@ -68,125 +80,6 @@ public class ScAddSheep extends BaseEntity { private String createBy; private Date createTime; - // Getters and Setters - public Long getId() { - return id; - } - public void setId(Long id) { - this.id = id; - } - - public String getSheepId() { - return sheepId; - } - - public void setSheepId(String sheepId) { - this.sheepId = sheepId; - } - - public Integer getSheepfold() { - return sheepfold; - } - - public void setSheepfold(Integer sheepfold) { - this.sheepfold = sheepfold; - } - - public String getFather() { - return father; - } - - public void setFather(String father) { - this.father = father; - } - - public String getMother() { - return mother; - } - - public void setMother(String mother) { - this.mother = mother; - } - - public BigDecimal getBornWeight() { - return bornWeight; - } - - public void setBornWeight(BigDecimal bornWeight) { - this.bornWeight = bornWeight; - } - - public Date getBirthday() { - return birthday; - } - - public void setBirthday(Date birthday) { - this.birthday = birthday; - } - - public Integer getGender() { - return gender; - } - - public void setGender(Integer gender) { - this.gender = gender; - } - - public Integer getParity() { - return parity; - } - - public void setParity(Integer parity) { - this.parity = parity; - } - - public Integer getVarietyId() { - return varietyId; - } - - public void setVarietyId(Integer varietyId) { - this.varietyId = varietyId; - } - - public Date getJoinDate() { - return joinDate; - } - - public void setJoinDate(Date joinDate) { - this.joinDate = joinDate; - } - - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public String getTechnician() { - return technician; - } - - public void setTechnician(String technician) { - this.technician = technician; - } - - public String getCreateBy() { - return createBy; - } - - public void setCreateBy(String createBy) { - this.createBy = createBy; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/mapper/ScAddSheepMapper.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/mapper/ScAddSheepMapper.java index 877b8eb..87ed239 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/mapper/ScAddSheepMapper.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/mapper/ScAddSheepMapper.java @@ -10,6 +10,8 @@ public interface ScAddSheepMapper { int insert(ScAddSheep scAddSheep); List selectScAddSheepList(ScAddSheep scAddSheep); int updateScAddSheep(ScAddSheep scAddSheep); - int deleteScAddSheepByIds(Long[] ids); + int deleteScAddSheepByIds(Integer[] ids); + + ScAddSheep selectByEarNumber(String earNumber); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/IScAddSheepService.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/IScAddSheepService.java index 8381335..eadecb8 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/IScAddSheepService.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/IScAddSheepService.java @@ -7,11 +7,14 @@ import java.util.List; public interface IScAddSheepService { + boolean insertScAddSheep(ScAddSheep scAddSheep); List selectScAddSheepList(ScAddSheep scAddSheep); boolean updateScAddSheep(ScAddSheep scAddSheep); - boolean deleteScAddSheepByIds(Long[] ids); + boolean deleteScAddSheepByIds(Integer[] ids); String importSheep(List list, boolean updateSupport, String operName); + + } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/impl/ScAddSheepServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/impl/ScAddSheepServiceImpl.java index 6829169..bd6a247 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/impl/ScAddSheepServiceImpl.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/add_sheep/service/impl/ScAddSheepServiceImpl.java @@ -5,22 +5,63 @@ import com.zhyc.common.utils.StringUtils; import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep; import com.zhyc.module.produce.manage_sheep.add_sheep.mapper.ScAddSheepMapper; import com.zhyc.module.produce.manage_sheep.add_sheep.service.IScAddSheepService; +import com.zhyc.module.produce.sheep.domain.BasSheep; +import com.zhyc.module.produce.sheep.mapper.BasSheepMapper; +import com.zhyc.module.produce.sheep.service.IBasSheepService; +import com.zhyc.module.produce.sheep.service.impl.BasSheepServiceImpl; +import com.zhyc.module.sheepfold_management.domain.DaSheepfold; +import com.zhyc.module.sheepfold_management.mapper.DaSheepfoldMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Date; import java.util.List; @Service public class ScAddSheepServiceImpl implements IScAddSheepService { + @Autowired private ScAddSheepMapper scAddSheepMapper; + @Autowired + private DaSheepfoldMapper daSheepfoldMapper; + + @Autowired + private IBasSheepService basSheepService; + @Override public boolean insertScAddSheep(ScAddSheep scAddSheep) { - return scAddSheepMapper.insert(scAddSheep) > 0; + // 1. 重复校验 + ScAddSheep exist = scAddSheepMapper.selectByEarNumber(scAddSheep.getEarNumber()); + if (exist != null) { + throw new ServiceException("添加失败,耳号重复"); + } + + // 2. 写入 sc_add_sheep + boolean ok = scAddSheepMapper.insert(scAddSheep) > 0; + if (!ok) return false; + + // 3. 字段映射 → BasSheep + BasSheep bs = new BasSheep(); + bs.setManageTags(scAddSheep.getEarNumber()); // 管理耳号 + bs.setElectronicTags(scAddSheep.getEarNumber()); // 电子耳号 + bs.setSheepfoldId(scAddSheep.getSheepfold().longValue()); // 羊舍 + bs.setFatherId(null); // 父号/母号可后续补全 + bs.setMotherId(null); + bs.setBirthWeight(scAddSheep.getBornWeight().longValue()); + bs.setBirthday(scAddSheep.getBirthday()); + bs.setGender(scAddSheep.getGender().longValue()); + bs.setParity(scAddSheep.getParity().longValue()); + bs.setVarietyId(scAddSheep.getVarietyId().longValue()); + bs.setSourceDate(scAddSheep.getJoinDate()); + bs.setComment(scAddSheep.getComment()); + bs.setCreateBy(scAddSheep.getCreateBy()); + bs.setCreateTime(new Date()); + + // 4. 写入 bas_sheep + basSheepService.insertBasSheep(bs); + return true; } - - @Override public List selectScAddSheepList(ScAddSheep scAddSheep) { return scAddSheepMapper.selectScAddSheepList(scAddSheep); @@ -32,22 +73,63 @@ public class ScAddSheepServiceImpl implements IScAddSheepService { } @Override - public boolean deleteScAddSheepByIds(Long[] ids) { + public boolean deleteScAddSheepByIds(Integer[] ids) { return scAddSheepMapper.deleteScAddSheepByIds(ids) > 0; } + /* ------------------ 导入:羊舍名称 → ID ------------------ */ @Override public String importSheep(List list, boolean updateSupport, String operName) { if (list == null || list.isEmpty()) { throw new ServiceException("导入数据不能为空!"); } + int success = 0, failure = 0; StringBuilder failureMsg = new StringBuilder(); - for (ScAddSheep sheep : list) { + + for (int i = 0; i < list.size(); i++) { + ScAddSheep sheep = list.get(i); try { - if (StringUtils.isBlank(sheep.getSheepId())) { - failure++; failureMsg.append("
第").append(success + failure + 1).append("行:羊只ID不能为空"); continue; + /* 1. 羊舍名称 → ID */ + if (StringUtils.isNotBlank(sheep.getSheepfoldNameExcel())) { + DaSheepfold param = new DaSheepfold(); + param.setSheepfoldName(sheep.getSheepfoldNameExcel()); + List foldList = daSheepfoldMapper.selectDaSheepfoldList(param); + + if (foldList == null || foldList.isEmpty()) { + failure++; + failureMsg.append("
第") + .append(i + 1) + .append("行:羊舍名称不存在【") + .append(sheep.getSheepfoldNameExcel()) + .append("】"); + continue; + } + sheep.setSheepfold(foldList.get(0).getId().intValue()); } + + /* 2. 耳号非空校验 */ + if (StringUtils.isBlank(sheep.getEarNumber())) { + failure++; + failureMsg.append("
第") + .append(i + 1) + .append("行:耳号不能为空"); + continue; + } + + /* 3. 耳号重复校验(增量导入核心) */ + ScAddSheep exist = scAddSheepMapper.selectByEarNumber(sheep.getEarNumber()); + if (exist != null) { + failure++; + failureMsg.append("
第") + .append(i + 1) + .append("行:耳号已存在【") + .append(sheep.getEarNumber()) + .append("】"); + continue; + } + + /* 4. 插入或更新 */ if (updateSupport && sheep.getId() != null) { sheep.setUpdateBy(operName); updateScAddSheep(sheep); @@ -57,11 +139,19 @@ public class ScAddSheepServiceImpl implements IScAddSheepService { } success++; } catch (Exception e) { - failure++; failureMsg.append("
第").append(success + failure + 1).append("行:").append(e.getMessage()); + failure++; + failureMsg.append("
第") + .append(i + 1) + .append("行:") + .append(e.getMessage()); } } - if (failure > 0) throw new ServiceException("导入失败!共 " + failure + " 条:" + failureMsg); + + if (failure > 0) { + throw new ServiceException("导入失败!共 " + failure + " 条:" + failureMsg); + } return "导入成功!共 " + success + " 条"; } -} + +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/controller/ScTransGroupController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/controller/ScTransGroupController.java index fd89b5b..44b8ccf 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/controller/ScTransGroupController.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/controller/ScTransGroupController.java @@ -1,5 +1,6 @@ package com.zhyc.module.produce.manage_sheep.trans_group.controller; +import java.io.IOException; import java.util.List; import javax.servlet.http.HttpServletResponse; @@ -53,10 +54,9 @@ public class ScTransGroupController extends BaseController @PreAuthorize("@ss.hasPermi('produce:trans_group:export')") @Log(title = "转群记录", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, ScTransGroup scTransGroup) - { + public void export(HttpServletResponse response, ScTransGroup scTransGroup) throws IOException { List list = scTransGroupService.selectScTransGroupList(scTransGroup); - ExcelUtil util = new ExcelUtil(ScTransGroup.class); + ExcelUtil util = new ExcelUtil<>(ScTransGroup.class); util.exportExcel(response, list, "转群记录数据"); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/domain/ScTransGroup.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/domain/ScTransGroup.java index e25278a..13d5d35 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/domain/ScTransGroup.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/domain/ScTransGroup.java @@ -1,9 +1,13 @@ package com.zhyc.module.produce.manage_sheep.trans_group.domain; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.zhyc.common.annotation.Excel; import com.zhyc.common.core.domain.BaseEntity; +import org.springframework.beans.factory.annotation.Autowired; /** * 转群记录对象 sc_trans_group @@ -11,6 +15,9 @@ import com.zhyc.common.core.domain.BaseEntity; * @author ruoyi * @date 2025-07-10 */ +@Data +@AllArgsConstructor +@NoArgsConstructor public class ScTransGroup extends BaseEntity { private static final long serialVersionUID = 1L; @@ -23,122 +30,40 @@ public class ScTransGroup extends BaseEntity private Integer sheepId; /** 转入羊舍 */ - @Excel(name = "转入羊舍") private String foldTo; /** 转出羊舍 */ - @Excel(name = "转出羊舍") private String foldFrom; + /** 转出羊舍名称 */ + @Excel(name = "转出羊舍") + private String foldFromName; + + /** 转入羊舍名称 */ + @Excel(name = "转入羊舍") + private String foldToName; /** 转群原因 */ + + private Integer reason; + /** 转群原因描述 用于导出*/ @Excel(name = "转群原因") - private String reason; + private String reasonText; /** 技术员 */ @Excel(name = "技术员") private String technician; /** 状态 */ - @Excel(name = "状态") + private Integer status; + /** 状态描述 用于导出*/ + @Excel(name = "状态") + private String statusText; /** 备注 */ @Excel(name = "备注") private String comment; - public void setId(Integer id) - { - this.id = id; - } - public Integer getId() - { - return id; - } - public void setSheepId(Integer sheepId) - { - this.sheepId = sheepId; - } - - public Integer getSheepId() - { - return sheepId; - } - - public void setFoldTo(String foldTo) - { - this.foldTo = foldTo; - } - - public String getFoldTo() - { - return foldTo; - } - - public void setFoldFrom(String foldFrom) - { - this.foldFrom = foldFrom; - } - - public String getFoldFrom() - { - return foldFrom; - } - - public void setReason(String reason) - { - this.reason = reason; - } - - public String getReason() - { - return reason; - } - - public void setTechnician(String technician) - { - this.technician = technician; - } - - public String getTechnician() - { - return technician; - } - - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - - public void setComment(String comment) - { - this.comment = comment; - } - - public String getComment() - { - return comment; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("sheepId", getSheepId()) - .append("foldTo", getFoldTo()) - .append("foldFrom", getFoldFrom()) - .append("reason", getReason()) - .append("technician", getTechnician()) - .append("status", getStatus()) - .append("comment", getComment()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .toString(); - } } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/service/impl/ScTransGroupServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/service/impl/ScTransGroupServiceImpl.java index f38d30c..4354dd7 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/service/impl/ScTransGroupServiceImpl.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/trans_group/service/impl/ScTransGroupServiceImpl.java @@ -1,6 +1,9 @@ package com.zhyc.module.produce.manage_sheep.trans_group.service.impl; +import java.util.HashMap; import java.util.List; +import java.util.Map; + import com.zhyc.common.utils.DateUtils; import com.zhyc.module.produce.manage_sheep.trans_group.domain.ScTransGroup; import com.zhyc.module.produce.manage_sheep.trans_group.mapper.ScTransGroupMapper; @@ -10,49 +13,57 @@ import org.springframework.stereotype.Service; /** * 转群记录Service业务层处理 - * + * * @author ruoyi * @date 2025-07-10 */ @Service -public class ScTransGroupServiceImpl implements IScTransGroupService -{ +public class ScTransGroupServiceImpl implements IScTransGroupService { @Autowired private ScTransGroupMapper scTransGroupMapper; /** * 查询转群记录 - * + * * @param id 转群记录主键 * @return 转群记录 */ @Override - public ScTransGroup selectScTransGroupById(Integer id) - { - return scTransGroupMapper.selectScTransGroupById(id); + public ScTransGroup selectScTransGroupById(Integer id) { + ScTransGroup group = scTransGroupMapper.selectScTransGroupById(id); + group.setReasonText(convertReason(group.getReason())); + group.setStatusText(convertStatus(group.getStatus())); + return group; } + /** * 查询转群记录列表 - * + * * @param scTransGroup 转群记录 * @return 转群记录 */ @Override - public List selectScTransGroupList(ScTransGroup scTransGroup) - { - return scTransGroupMapper.selectScTransGroupList(scTransGroup); + public List selectScTransGroupList(ScTransGroup scTransGroup) { + List list = scTransGroupMapper.selectScTransGroupList(scTransGroup); + list.forEach(group -> { + group.setReasonText(convertReason(group.getReason())); + group.setStatusText(convertStatus(group.getStatus())); + }); + return list; +// return scTransGroupMapper.selectScTransGroupList(scTransGroup); + } /** * 新增转群记录 - * + * * @param scTransGroup 转群记录 * @return 结果 */ + @Override - public int insertScTransGroup(ScTransGroup scTransGroup) - { + public int insertScTransGroup(ScTransGroup scTransGroup) { scTransGroup.setStatus(0); scTransGroup.setCreateTime(DateUtils.getNowDate()); return scTransGroupMapper.insertScTransGroup(scTransGroup); @@ -60,37 +71,57 @@ public class ScTransGroupServiceImpl implements IScTransGroupService /** * 修改转群记录 - * + * * @param scTransGroup 转群记录 * @return 结果 */ @Override - public int updateScTransGroup(ScTransGroup scTransGroup) - { + public int updateScTransGroup(ScTransGroup scTransGroup) { return scTransGroupMapper.updateScTransGroup(scTransGroup); } /** * 批量删除转群记录 - * + * * @param ids 需要删除的转群记录主键 * @return 结果 */ @Override - public int deleteScTransGroupByIds(Integer[] ids) - { + public int deleteScTransGroupByIds(Integer[] ids) { return scTransGroupMapper.deleteScTransGroupByIds(ids); } /** * 删除转群记录信息 - * + * * @param id 转群记录主键 * @return 结果 */ @Override - public int deleteScTransGroupById(Integer id) - { + public int deleteScTransGroupById(Integer id) { return scTransGroupMapper.deleteScTransGroupById(id); } + + /** + * 转换转群原因 + */ + private String convertReason(Integer reasonCode) { + Map reasonMap = new HashMap<>(); + reasonMap.put(0, "新产羊过抗转群"); + reasonMap.put(1, "治愈转群"); + reasonMap.put(2, "病羊过抗转群"); + return reasonMap.getOrDefault(reasonCode, "未知原因"); + } + + /** + * 转换状态 + */ + private String convertStatus(Integer statusCode) { + Map statusMap = new HashMap<>(); + statusMap.put(0, "待批准"); + statusMap.put(1, "通过"); + statusMap.put(2, "驳回"); + return statusMap.getOrDefault(statusCode, "未知状态"); + } + } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/transition_info/domain/ScTransitionInfo.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/transition_info/domain/ScTransitionInfo.java index 1636a5f..bce520a 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/transition_info/domain/ScTransitionInfo.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/transition_info/domain/ScTransitionInfo.java @@ -1,5 +1,8 @@ package com.zhyc.module.produce.manage_sheep.transition_info.domain; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.zhyc.common.annotation.Excel; @@ -11,6 +14,9 @@ import com.zhyc.common.core.domain.BaseEntity; * @author ruoyi * @date 2025-07-10 */ +@Data +@AllArgsConstructor +@NoArgsConstructor public class ScTransitionInfo extends BaseEntity { private static final long serialVersionUID = 1L; @@ -32,7 +38,7 @@ public class ScTransitionInfo extends BaseEntity /** 转场类型 */ @Excel(name = "转场类型") - private Long transType; + private Integer transType; /** 技术员 */ @Excel(name = "技术员") @@ -46,99 +52,5 @@ public class ScTransitionInfo extends BaseEntity @Excel(name = "备注") private String comment; - public void setId(Integer id) - { - this.id = id; - } - public Integer getId() - { - return id; - } - - public void setSheepId(Integer sheepId) - { - this.sheepId = sheepId; - } - - public Integer getSheepId() - { - return sheepId; - } - - public void setTransTo(String transTo) - { - this.transTo = transTo; - } - - public String getTransTo() - { - return transTo; - } - - public void setTransFrom(String transFrom) - { - this.transFrom = transFrom; - } - - public String getTransFrom() - { - return transFrom; - } - - public void setTransType(Long transType) - { - this.transType = transType; - } - - public Long getTransType() - { - return transType; - } - - public void setTechnician(String technician) - { - this.technician = technician; - } - - public String getTechnician() - { - return technician; - } - - public void setStatus(Integer status) - { - this.status = status; - } - - public Integer getStatus() - { - return status; - } - - public void setComment(String comment) - { - this.comment = comment; - } - - public String getComment() - { - return comment; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("sheepId", getSheepId()) - .append("transTo", getTransTo()) - .append("transFrom", getTransFrom()) - .append("transType", getTransType()) - .append("technician", getTechnician()) - .append("status", getStatus()) - .append("comment", getComment()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .toString(); - } } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/controller/ScFixHoofController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/controller/ScFixHoofController.java index 3e9a227..fe6de0d 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/controller/ScFixHoofController.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/controller/ScFixHoofController.java @@ -66,7 +66,7 @@ public class ScFixHoofController extends BaseController */ @PreAuthorize("@ss.hasPermi('produce:fixHoof:query')") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) + public AjaxResult getInfo(@PathVariable("id") Integer id) { return success(scFixHoofService.selectScFixHoofById(id)); } @@ -99,7 +99,7 @@ public class ScFixHoofController extends BaseController @PreAuthorize("@ss.hasPermi('produce:fixHoof:remove')") @Log(title = "修蹄", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) + public AjaxResult remove(@PathVariable Integer[] ids) { return toAjax(scFixHoofService.deleteScFixHoofByIds(ids)); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/domain/ScFixHoof.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/domain/ScFixHoof.java index a1d445c..7dabc59 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/domain/ScFixHoof.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/domain/ScFixHoof.java @@ -1,5 +1,8 @@ package com.zhyc.module.produce.other.fixHoof.domain; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.zhyc.common.annotation.Excel; @@ -11,20 +14,26 @@ import com.zhyc.common.core.domain.BaseEntity; * @author ruoyi * @date 2025-07-10 */ +@Data +@AllArgsConstructor +@NoArgsConstructor public class ScFixHoof extends BaseEntity { private static final long serialVersionUID = 1L; /** $column.columnComment */ - private Long id; + private Integer id; /** 羊只id */ @Excel(name = "羊只id") - private Long sheepId; + private Integer sheepId; /** 羊舍id */ - @Excel(name = "羊舍id") - private Long sheepfold; + private Integer sheepfold; + + /** 羊舍名称 */ + @Excel(name = "羊舍名称") + private String sheepfoldName; /** 备注 */ @Excel(name = "备注") @@ -34,66 +43,4 @@ public class ScFixHoof extends BaseEntity @Excel(name = "技术员") private String technician; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - - public void setSheepId(Long sheepId) - { - this.sheepId = sheepId; - } - - public Long getSheepId() - { - return sheepId; - } - - public void setSheepfold(Long sheepfold) - { - this.sheepfold = sheepfold; - } - - public Long getSheepfold() - { - return sheepfold; - } - - public void setComment(String comment) - { - this.comment = comment; - } - - public String getComment() - { - return comment; - } - - public void setTechnician(String technician) - { - this.technician = technician; - } - - public String getTechnician() - { - return technician; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("sheepId", getSheepId()) - .append("sheepfold", getSheepfold()) - .append("comment", getComment()) - .append("technician", getTechnician()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .toString(); - } } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/mapper/ScFixHoofMapper.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/mapper/ScFixHoofMapper.java index 75e27ee..a5d71a1 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/mapper/ScFixHoofMapper.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/mapper/ScFixHoofMapper.java @@ -17,7 +17,7 @@ public interface ScFixHoofMapper * @param id 修蹄主键 * @return 修蹄 */ - public ScFixHoof selectScFixHoofById(Long id); + public ScFixHoof selectScFixHoofById(Integer id); /** * 查询修蹄列表 @@ -49,7 +49,7 @@ public interface ScFixHoofMapper * @param id 修蹄主键 * @return 结果 */ - public int deleteScFixHoofById(Long id); + public int deleteScFixHoofById(Integer id); /** * 批量删除修蹄 @@ -57,5 +57,5 @@ public interface ScFixHoofMapper * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteScFixHoofByIds(Long[] ids); + public int deleteScFixHoofByIds(Integer[] ids); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/IScFixHoofService.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/IScFixHoofService.java index 8092f8f..01a2272 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/IScFixHoofService.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/IScFixHoofService.java @@ -17,7 +17,7 @@ public interface IScFixHoofService * @param id 修蹄主键 * @return 修蹄 */ - public ScFixHoof selectScFixHoofById(Long id); + public ScFixHoof selectScFixHoofById(Integer id); /** * 查询修蹄列表 @@ -49,7 +49,7 @@ public interface IScFixHoofService * @param ids 需要删除的修蹄主键集合 * @return 结果 */ - public int deleteScFixHoofByIds(Long[] ids); + public int deleteScFixHoofByIds(Integer[] ids); /** * 删除修蹄信息 @@ -57,5 +57,5 @@ public interface IScFixHoofService * @param id 修蹄主键 * @return 结果 */ - public int deleteScFixHoofById(Long id); + public int deleteScFixHoofById(Integer id); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/impl/ScFixHoofServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/impl/ScFixHoofServiceImpl.java index 68a68ff..5bf5e2a 100644 --- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/impl/ScFixHoofServiceImpl.java +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/fixHoof/service/impl/ScFixHoofServiceImpl.java @@ -27,7 +27,7 @@ public class ScFixHoofServiceImpl implements IScFixHoofService * @return 修蹄 */ @Override - public ScFixHoof selectScFixHoofById(Long id) + public ScFixHoof selectScFixHoofById(Integer id) { return scFixHoofMapper.selectScFixHoofById(id); } @@ -76,7 +76,7 @@ public class ScFixHoofServiceImpl implements IScFixHoofService * @return 结果 */ @Override - public int deleteScFixHoofByIds(Long[] ids) + public int deleteScFixHoofByIds(Integer[] ids) { return scFixHoofMapper.deleteScFixHoofByIds(ids); } @@ -88,7 +88,7 @@ public class ScFixHoofServiceImpl implements IScFixHoofService * @return 结果 */ @Override - public int deleteScFixHoofById(Long id) + public int deleteScFixHoofById(Integer id) { return scFixHoofMapper.deleteScFixHoofById(id); } diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/controller/BasSheepController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/controller/BasSheepController.java new file mode 100644 index 0000000..7efd886 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/controller/BasSheepController.java @@ -0,0 +1,105 @@ +package com.zhyc.module.produce.sheep.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.zhyc.module.produce.sheep.domain.BasSheep; +import com.zhyc.module.produce.sheep.service.IBasSheepService; +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.zhyc.common.annotation.Log; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.enums.BusinessType; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 羊只基本信息Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/sheep/sheep") +public class BasSheepController extends BaseController +{ + @Autowired + private IBasSheepService basSheepService; + + /** + * 查询羊只基本信息列表 + */ + @PreAuthorize("@ss.hasPermi('sheep:sheep:list')") + @GetMapping("/list") + public TableDataInfo list(BasSheep basSheep) + { + startPage(); + List list = basSheepService.selectBasSheepList(basSheep); + return getDataTable(list); + } + + /** + * 导出羊只基本信息列表 + */ + @PreAuthorize("@ss.hasPermi('sheep:sheep:export')") + @Log(title = "羊只基本信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BasSheep basSheep) + { + List list = basSheepService.selectBasSheepList(basSheep); + ExcelUtil util = new ExcelUtil(BasSheep.class); + util.exportExcel(response, list, "羊只基本信息数据"); + } + + /** + * 获取羊只基本信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('sheep:sheep:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(basSheepService.selectBasSheepById(id)); + } + + /** + * 新增羊只基本信息 + */ + @PreAuthorize("@ss.hasPermi('sheep:sheep:add')") + @Log(title = "羊只基本信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BasSheep basSheep) + { + return toAjax(basSheepService.insertBasSheep(basSheep)); + } + + /** + * 修改羊只基本信息 + */ + @PreAuthorize("@ss.hasPermi('sheep:sheep:edit')") + @Log(title = "羊只基本信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BasSheep basSheep) + { + return toAjax(basSheepService.updateBasSheep(basSheep)); + } + + /** + * 删除羊只基本信息 + */ + @PreAuthorize("@ss.hasPermi('sheep:sheep:remove')") + @Log(title = "羊只基本信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(basSheepService.deleteBasSheepByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/domain/BasSheep.java b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/domain/BasSheep.java new file mode 100644 index 0000000..84e2ac6 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/domain/BasSheep.java @@ -0,0 +1,178 @@ +package com.zhyc.module.produce.sheep.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.zhyc.common.annotation.Excel; +import com.zhyc.common.core.domain.BaseEntity; + +/** + * 羊只基本信息对象 bas_sheep + * + * @author ruoyi + * @date 2025-07-15 + */ + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class BasSheep extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 管理耳号 */ + @Excel(name = "管理耳号") + private String manageTags; + + /** 牧场id */ + @Excel(name = "牧场id") + private Long ranchId; + + /** 羊舍id */ + @Excel(name = "羊舍id") + private Long sheepfoldId; + + /** 电子耳号 */ + @Excel(name = "电子耳号") + private String electronicTags; + + /** 品种id */ + @Excel(name = "品种id") + private Long varietyId; + + /** 家系 */ + @Excel(name = "家系") + private String family; + + /** 羊只类别 */ + @Excel(name = "羊只类别") + private Long typeId; + + /** 性别 */ + @Excel(name = "性别") + private Long gender; + + /** 出生日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date birthday; + + /** 出生体重 */ + @Excel(name = "出生体重") + private Long birthWeight; + + /** 胎次 */ + @Excel(name = "胎次") + private Long parity; + + /** 羊只状态 */ + @Excel(name = "羊只状态") + private Long statusId; + + /** 断奶日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "断奶日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date weaningDate; + + /** 断奶体重 */ + @Excel(name = "断奶体重") + private Long weaningWeight; + + /** 繁育状态id */ + @Excel(name = "繁育状态id") + private Long breedStatusId; + + /** 父号id */ + @Excel(name = "父号id") + private Long fatherId; + + /** 母号id */ + @Excel(name = "母号id") + private Long motherId; + + /** 受体id */ + @Excel(name = "受体id") + private Long receptorId; + + /** 配种日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "配种日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date matingDate; + + /** 配种类型 */ + @Excel(name = "配种类型") + private Long matingTypeId; + + /** 孕检日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "孕检日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date pregDate; + + /** 产羔日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "产羔日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date lambingDate; + + /** 产羔时怀孕天数 */ + @Excel(name = "产羔时怀孕天数") + private Long lambingDay; + + /** 预产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "预产日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date expectedDate; + + /** 是否性控 */ + @Excel(name = "是否性控") + private Long controlled; + + /** 配种次数 */ + @Excel(name = "配种次数") + private Long matingCounts; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long matingTotal; + + /** 累计流产次数 */ + @Excel(name = "累计流产次数") + private Long miscarriageCounts; + + /** 体况评分 */ + @Excel(name = "体况评分") + private Long body; + + /** 乳房评分 */ + @Excel(name = "乳房评分") + private Long breast; + + /** 入群来源 */ + @Excel(name = "入群来源") + private String source; + + /** 入群日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "入群日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date sourceDate; + + /** 来源牧场id */ + @Excel(name = "来源牧场id") + private Long sourceRanchId; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + /** 是否删除 */ + @Excel(name = "是否删除") + private Long isDelete; + + +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/mapper/BasSheepMapper.java b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/mapper/BasSheepMapper.java new file mode 100644 index 0000000..e223d22 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/mapper/BasSheepMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.produce.sheep.mapper; + +import java.util.List; +import com.zhyc.module.produce.sheep.domain.BasSheep; + +/** + * 羊只基本信息Mapper接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface BasSheepMapper +{ + /** + * 查询羊只基本信息 + * + * @param id 羊只基本信息主键 + * @return 羊只基本信息 + */ + public BasSheep selectBasSheepById(Long id); + + /** + * 查询羊只基本信息列表 + * + * @param basSheep 羊只基本信息 + * @return 羊只基本信息集合 + */ + public List selectBasSheepList(BasSheep basSheep); + + /** + * 新增羊只基本信息 + * + * @param basSheep 羊只基本信息 + * @return 结果 + */ + public int insertBasSheep(BasSheep basSheep); + + /** + * 修改羊只基本信息 + * + * @param basSheep 羊只基本信息 + * @return 结果 + */ + public int updateBasSheep(BasSheep basSheep); + + /** + * 删除羊只基本信息 + * + * @param id 羊只基本信息主键 + * @return 结果 + */ + public int deleteBasSheepById(Long id); + + /** + * 批量删除羊只基本信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBasSheepByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/service/IBasSheepService.java b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/service/IBasSheepService.java new file mode 100644 index 0000000..76efcf7 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/service/IBasSheepService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.produce.sheep.service; + +import java.util.List; +import com.zhyc.module.produce.sheep.domain.BasSheep; + +/** + * 羊只基本信息Service接口 + * + * @author ruoyi + * @date 2025-07-15 + */ +public interface IBasSheepService +{ + /** + * 查询羊只基本信息 + * + * @param id 羊只基本信息主键 + * @return 羊只基本信息 + */ + public BasSheep selectBasSheepById(Long id); + + /** + * 查询羊只基本信息列表 + * + * @param basSheep 羊只基本信息 + * @return 羊只基本信息集合 + */ + public List selectBasSheepList(BasSheep basSheep); + + /** + * 新增羊只基本信息 + * + * @param basSheep 羊只基本信息 + * @return 结果 + */ + public int insertBasSheep(BasSheep basSheep); + + /** + * 修改羊只基本信息 + * + * @param basSheep 羊只基本信息 + * @return 结果 + */ + public int updateBasSheep(BasSheep basSheep); + + /** + * 批量删除羊只基本信息 + * + * @param ids 需要删除的羊只基本信息主键集合 + * @return 结果 + */ + public int deleteBasSheepByIds(Long[] ids); + + /** + * 删除羊只基本信息信息 + * + * @param id 羊只基本信息主键 + * @return 结果 + */ + public int deleteBasSheepById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/service/impl/BasSheepServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/service/impl/BasSheepServiceImpl.java new file mode 100644 index 0000000..cdc9cdd --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/sheep/service/impl/BasSheepServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.produce.sheep.service.impl; + +import java.util.List; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.produce.sheep.mapper.BasSheepMapper; +import com.zhyc.module.produce.sheep.domain.BasSheep; +import com.zhyc.module.produce.sheep.service.IBasSheepService; + +/** + * 羊只基本信息Service业务层处理 + * + * @author ruoyi + * @date 2025-07-15 + */ +@Service +public class BasSheepServiceImpl implements IBasSheepService +{ + @Autowired + private BasSheepMapper basSheepMapper; + + /** + * 查询羊只基本信息 + * + * @param id 羊只基本信息主键 + * @return 羊只基本信息 + */ + @Override + public BasSheep selectBasSheepById(Long id) + { + return basSheepMapper.selectBasSheepById(id); + } + + /** + * 查询羊只基本信息列表 + * + * @param basSheep 羊只基本信息 + * @return 羊只基本信息 + */ + @Override + public List selectBasSheepList(BasSheep basSheep) + { + return basSheepMapper.selectBasSheepList(basSheep); + } + + /** + * 新增羊只基本信息 + * + * @param basSheep 羊只基本信息 + * @return 结果 + */ + @Override + public int insertBasSheep(BasSheep basSheep) + { + basSheep.setCreateTime(DateUtils.getNowDate()); + return basSheepMapper.insertBasSheep(basSheep); + } + + /** + * 修改羊只基本信息 + * + * @param basSheep 羊只基本信息 + * @return 结果 + */ + @Override + public int updateBasSheep(BasSheep basSheep) + { + basSheep.setUpdateTime(DateUtils.getNowDate()); + return basSheepMapper.updateBasSheep(basSheep); + } + + /** + * 批量删除羊只基本信息 + * + * @param ids 需要删除的羊只基本信息主键 + * @return 结果 + */ + @Override + public int deleteBasSheepByIds(Long[] ids) + { + return basSheepMapper.deleteBasSheepByIds(ids); + } + + /** + * 删除羊只基本信息信息 + * + * @param id 羊只基本信息主键 + * @return 结果 + */ + @Override + public int deleteBasSheepById(Long id) + { + return basSheepMapper.deleteBasSheepById(id); + } +} diff --git a/zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml b/zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml new file mode 100644 index 0000000..91cc932 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_deworm + + + + + + + + insert into sw_deworm + + sheep_id, + usage_id, + variety, + sheep_type, + gender, + month_age, + parity, + datetime, + technical, + comment, + update_by, + update_time, + create_by, + create_time, + + + #{sheepId}, + #{usageId}, + #{variety}, + #{sheepType}, + #{gender}, + #{monthAge}, + #{parity}, + #{datetime}, + #{technical}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + + + + + update sw_deworm + + sheep_id = #{sheepId}, + usage_id = #{usageId}, + variety = #{variety}, + sheep_type = #{sheepType}, + gender = #{gender}, + month_age = #{monthAge}, + parity = #{parity}, + datetime = #{datetime}, + technical = #{technical}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from sw_deworm where id = #{id} + + + + delete from sw_deworm where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/biosafety/DiagnosisMapper.xml b/zhyc-module/src/main/resources/mapper/biosafety/DiagnosisMapper.xml new file mode 100644 index 0000000..68cfea1 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/biosafety/DiagnosisMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, treat_id, sheep_id, datetime, sheep_type, gender, parity, disease_pid, disease_id, result, begindate, enddate, treat_day, sheepfold_id, create_by, create_time from sw_diagnosis + + + + + + + + insert into sw_diagnosis + + treat_id, + sheep_id, + datetime, + sheep_type, + gender, + parity, + disease_pid, + disease_id, + result, + begindate, + enddate, + treat_day, + sheepfold_id, + create_by, + create_time, + + + #{treatId}, + #{sheepId}, + #{datetime}, + #{sheepType}, + #{gender}, + #{parity}, + #{diseasePid}, + #{diseaseId}, + #{result}, + #{begindate}, + #{enddate}, + #{treatDay}, + #{sheepfoldId}, + #{createBy}, + #{createTime}, + + + + + update sw_diagnosis + + treat_id = #{treatId}, + sheep_id = #{sheepId}, + datetime = #{datetime}, + sheep_type = #{sheepType}, + gender = #{gender}, + parity = #{parity}, + disease_pid = #{diseasePid}, + disease_id = #{diseaseId}, + result = #{result}, + begindate = #{begindate}, + enddate = #{enddate}, + treat_day = #{treatDay}, + sheepfold_id = #{sheepfoldId}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from sw_diagnosis where id = #{id} + + + + delete from sw_diagnosis where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/biosafety/DisinfectMapper.xml b/zhyc-module/src/main/resources/mapper/biosafety/DisinfectMapper.xml new file mode 100644 index 0000000..175d4a7 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/biosafety/DisinfectMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + select id, sheepfold_id, datetime, technician, way, usage_id, ratio, comment, update_by, update_time, create_by, create_time from sw_disinfect + + + + + + + + insert into sw_disinfect + + sheepfold_id, + datetime, + technician, + way, + usage_id, + ratio, + comment, + update_by, + update_time, + create_by, + create_time, + + + #{sheepfoldId}, + #{datetime}, + #{technician}, + #{way}, + #{usageId}, + #{ratio}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + + + + + update sw_disinfect + + sheepfold_id = #{sheepfoldId}, + datetime = #{datetime}, + technician = #{technician}, + way = #{way}, + usage_id = #{usageId}, + ratio = #{ratio}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from sw_disinfect where id = #{id} + + + + delete from sw_disinfect where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml b/zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml new file mode 100644 index 0000000..6c5610d --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, technical, comment, update_by, update_time, create_by, create_time from sw_health + + + + + + + + insert into sw_health + + datetime, + sheep_id, + usage_id, + variety, + sheep_type, + gender, + month_age, + parity, + sheepfold_id, + technical, + comment, + update_by, + update_time, + create_by, + create_time, + + + #{datetime}, + #{sheepId}, + #{usageId}, + #{variety}, + #{sheepType}, + #{gender}, + #{monthAge}, + #{parity}, + #{sheepfoldId}, + #{technical}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + + + + + update sw_health + + datetime = #{datetime}, + sheep_id = #{sheepId}, + usage_id = #{usageId}, + variety = #{variety}, + sheep_type = #{sheepType}, + gender = #{gender}, + month_age = #{monthAge}, + parity = #{parity}, + sheepfold_id = #{sheepfoldId}, + technical = #{technical}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from sw_health where id = #{id} + + + + delete from sw_health where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/biosafety/ImmunityMapper.xml b/zhyc-module/src/main/resources/mapper/biosafety/ImmunityMapper.xml new file mode 100644 index 0000000..c7c57a0 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/biosafety/ImmunityMapper.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity + + + + + + + + insert into sw_immunity + + sheep_id, + usage_id, + variety, + sheep_type, + gender, + month_age, + parity, + sheepfold_id, + datetime, + technical, + comment, + update_by, + update_time, + create_by, + create_time, + + + #{sheepId}, + #{usageId}, + #{variety}, + #{sheepType}, + #{gender}, + #{monthAge}, + #{parity}, + #{sheepfoldId}, + #{datetime}, + #{technical}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + + + + + update sw_immunity + + sheep_id = #{sheepId}, + usage_id = #{usageId}, + variety = #{variety}, + sheep_type = #{sheepType}, + gender = #{gender}, + month_age = #{monthAge}, + parity = #{parity}, + sheepfold_id = #{sheepfoldId}, + datetime = #{datetime}, + technical = #{technical}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from sw_immunity where id = #{id} + + + + delete from sw_immunity where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/biosafety/TreatmentMapper.xml b/zhyc-module/src/main/resources/mapper/biosafety/TreatmentMapper.xml new file mode 100644 index 0000000..ea9b470 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/biosafety/TreatmentMapper.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, diag_id, sheep_id, variety, sheep_type, month_age, gender, parity, breed, lact_day, gest_day, datetime, disease_id, disease_pid, veterinary, usage_id, comment, update_by, update_time, create_by, create_time from sw_treatment + + + + + + + + insert into sw_treatment + + diag_id, + sheep_id, + variety, + sheep_type, + month_age, + gender, + parity, + breed, + lact_day, + gest_day, + datetime, + disease_id, + disease_pid, + veterinary, + usage_id, + comment, + update_by, + update_time, + create_by, + create_time, + + + #{diagId}, + #{sheepId}, + #{variety}, + #{sheepType}, + #{monthAge}, + #{gender}, + #{parity}, + #{breed}, + #{lactDay}, + #{gestDay}, + #{datetime}, + #{diseaseId}, + #{diseasePid}, + #{veterinary}, + #{usageId}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + + + + + update sw_treatment + + diag_id = #{diagId}, + sheep_id = #{sheepId}, + variety = #{variety}, + sheep_type = #{sheepType}, + month_age = #{monthAge}, + gender = #{gender}, + parity = #{parity}, + breed = #{breed}, + lact_day = #{lactDay}, + gest_day = #{gestDay}, + datetime = #{datetime}, + disease_id = #{diseaseId}, + disease_pid = #{diseasePid}, + veterinary = #{veterinary}, + usage_id = #{usageId}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from sw_treatment where id = #{id} + + + + delete from sw_treatment where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/dairyProducts/rawMilkTest/NpRawMilkInspeMapper.xml b/zhyc-module/src/main/resources/mapper/dairyProducts/rawMilkTest/NpRawMilkInspeMapper.xml new file mode 100644 index 0000000..e4ee584 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/dairyProducts/rawMilkTest/NpRawMilkInspeMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, datetime, source, freeze, density, fat, protein, non_fat, dry_matter, + impurity, lactose, ash_content, acidity, ph, bacterial_colony, lactoferrin, + ig, somatic_cell, usea, fat_ratio, comment, create_by, create_time + from np_raw_milk_inspe + + + + + + + + insert into np_raw_milk_inspe + + datetime, + source, + freeze, + density, + fat, + protein, + non_fat, + dry_matter, + impurity, + lactose, + ash_content, + acidity, + ph, + bacterial_colony, + lactoferrin, + ig, + somatic_cell, + usea, + fat_ratio, + comment, + create_by, + create_time, + + + #{datetime}, + #{source}, + #{freeze}, + #{density}, + #{fat}, + #{protein}, + #{nonFat}, + #{dryMatter}, + #{impurityDegree}, + #{lactose}, + #{ashContent}, + #{acidity}, + #{ph}, + #{bacterialColony}, + #{lactoferrin}, + #{ig}, + #{somaticCell}, + #{usea}, + #{fatRatio}, + #{comment}, + #{createBy}, + #{createTime}, + + + + + update np_raw_milk_inspe + + datetime = #{datetime}, + source = #{source}, + freeze = #{freeze}, + density = #{density}, + fat = #{fat}, + protein = #{protein}, + non_fat = #{nonFat}, + dry_matter = #{dryMatter}, + impurity = #{impurityDegree}, + lactose = #{lactose}, + ash_content = #{ashContent}, + acidity = #{acidity}, + ph = #{ph}, + bacterial_colony = #{bacterialColony}, + lactoferrin = #{lactoferrin}, + ig = #{ig}, + somatic_cell = #{somaticCell}, + usea = #{usea}, + fat_ratio = #{fatRatio}, + comment = #{comment}, + + where id = #{id} + + + + delete from np_raw_milk_inspe where id = #{id} + + + + delete from np_raw_milk_inspe where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/fileManagement/SheepFileMapper.xml b/zhyc-module/src/main/resources/mapper/fileManagement/SheepFileMapper.xml index 85afd4d..e1280ed 100644 --- a/zhyc-module/src/main/resources/mapper/fileManagement/SheepFileMapper.xml +++ b/zhyc-module/src/main/resources/mapper/fileManagement/SheepFileMapper.xml @@ -311,4 +311,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/add_sheep/ScAddSheepMapper.xml b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/add_sheep/ScAddSheepMapper.xml index d234d5c..9f4de89 100644 --- a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/add_sheep/ScAddSheepMapper.xml +++ b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/add_sheep/ScAddSheepMapper.xml @@ -5,45 +5,52 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + INSERT INTO sc_add_sheep - (sheep_id, sheepfold, father, mother, born_weight, birthday, gender, parity, + (ear_number, sheepfold, father, mother, born_weight, birthday, gender, parity, variety_id, join_date, comment, technician, create_by, create_time) - VALUES - (#{sheepId}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday}, - #{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician}, - #{createBy}, #{createTime}) + VALUES (#{earNumber}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday}, + #{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician}, + #{createBy}, #{createTime}) + UPDATE sc_add_sheep - sheep_id = #{sheepId}, + ear_number = #{earNumber}, sheepfold = #{sheepfold}, father = #{father}, mother = #{mother}, @@ -68,4 +75,7 @@ + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/trans_group/ScTransGroupMapper.xml b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/trans_group/ScTransGroupMapper.xml index 20046c2..665ec43 100644 --- a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/trans_group/ScTransGroupMapper.xml +++ b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/trans_group/ScTransGroupMapper.xml @@ -1,40 +1,57 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - - - - + + + + + + + + + + - select id, sheep_id, fold_to, fold_from, reason, technician, status, comment, create_by, create_time from sc_trans_group + SELECT tg.id, + tg.sheep_id, + tg.fold_to, + tg.fold_from, + tg.reason, + tg.technician, + tg.status, + tg.comment, + tg.create_by, + tg.create_time, + sf_from.sheepfold_name AS foldFromName, + sf_to.sheepfold_name AS foldToName + FROM sc_trans_group tg + LEFT JOIN da_sheepfold sf_from ON tg.fold_from = sf_from.id + LEFT JOIN da_sheepfold sf_to ON tg.fold_to = sf_to.id - + + @@ -49,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" comment, create_by, create_time, - + #{sheepId}, #{foldTo}, @@ -60,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{comment}, #{createBy}, #{createTime}, - + @@ -76,15 +93,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by = #{createBy}, create_time = #{createTime}, - where id = #{id} + where sc_trans_group.id = #{id} - delete from sc_trans_group where id = #{id} + delete + from sc_trans_group + where tg.id = #{id} - delete from sc_trans_group where id in + delete from sc_trans_group where id in #{id} diff --git a/zhyc-module/src/main/resources/mapper/produce/other/fixHoof/ScFixHoofMapper.xml b/zhyc-module/src/main/resources/mapper/produce/other/fixHoof/ScFixHoofMapper.xml index 78eb85c..3ec4178 100644 --- a/zhyc-module/src/main/resources/mapper/produce/other/fixHoof/ScFixHoofMapper.xml +++ b/zhyc-module/src/main/resources/mapper/produce/other/fixHoof/ScFixHoofMapper.xml @@ -1,47 +1,59 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + - - - - - - - + + + + + + + + - select id, sheep_id, sheepfold, comment, technician, create_by, create_time from sc_fix_hoof + select fh.id, + fh.sheep_id, + fh.sheepfold, + sf.sheepfold_name as sheepfoldName, + fh.comment, + fh.technician, + fh.create_by, + fh.create_time + from sc_fix_hoof fh + left join da_sheepfold sf on fh.sheepfold = sf.id - - - where id = #{id} + where fh.id = #{id} insert into sc_fix_hoof - sheep_id, - sheepfold, + and fh.sheep_id like concat('%', #{sheepId}, '%') + and fh.sheepfold = #{sheepfold} comment, technician, create_by, create_time, - + #{sheepId}, #{sheepfold}, @@ -49,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{technician}, #{createBy}, #{createTime}, - + @@ -65,12 +77,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - - delete from sc_fix_hoof where id = #{id} + + delete + from sc_fix_hoof + where id = #{id} - - delete from sc_fix_hoof where id in + + delete from sc_fix_hoof where id in #{id} diff --git a/zhyc-module/src/main/resources/mapper/produce/sheep/BasSheepMapper.xml b/zhyc-module/src/main/resources/mapper/produce/sheep/BasSheepMapper.xml new file mode 100644 index 0000000..18ece91 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/produce/sheep/BasSheepMapper.xml @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, manage_tags, ranch_id, sheepfold_id, electronic_tags, variety_id, family, type_id, gender, birthday, birth_weight, parity, status_id, weaning_date, weaning_weight, breed_status_id, father_id, mother_id, receptor_id, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, expected_date, controlled, mating_counts, mating_total, miscarriage_counts, body, breast, source, source_date, source_ranch_id, comment, update_by, update_time, create_by, create_time, is_delete from bas_sheep + + + + + + + + insert into bas_sheep + + manage_tags, + ranch_id, + sheepfold_id, + electronic_tags, + variety_id, + family, + type_id, + gender, + birthday, + birth_weight, + parity, + status_id, + weaning_date, + weaning_weight, + breed_status_id, + father_id, + mother_id, + receptor_id, + mating_date, + mating_type_id, + preg_date, + lambing_date, + lambing_day, + expected_date, + controlled, + mating_counts, + mating_total, + miscarriage_counts, + body, + breast, + source, + source_date, + source_ranch_id, + comment, + update_by, + update_time, + create_by, + create_time, + is_delete, + + + #{manageTags}, + #{ranchId}, + #{sheepfoldId}, + #{electronicTags}, + #{varietyId}, + #{family}, + #{typeId}, + #{gender}, + #{birthday}, + #{birthWeight}, + #{parity}, + #{statusId}, + #{weaningDate}, + #{weaningWeight}, + #{breedStatusId}, + #{fatherId}, + #{motherId}, + #{receptorId}, + #{matingDate}, + #{matingTypeId}, + #{pregDate}, + #{lambingDate}, + #{lambingDay}, + #{expectedDate}, + #{controlled}, + #{matingCounts}, + #{matingTotal}, + #{miscarriageCounts}, + #{body}, + #{breast}, + #{source}, + #{sourceDate}, + #{sourceRanchId}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + #{isDelete}, + + + + + update bas_sheep + + manage_tags = #{manageTags}, + ranch_id = #{ranchId}, + sheepfold_id = #{sheepfoldId}, + electronic_tags = #{electronicTags}, + variety_id = #{varietyId}, + family = #{family}, + type_id = #{typeId}, + gender = #{gender}, + birthday = #{birthday}, + birth_weight = #{birthWeight}, + parity = #{parity}, + status_id = #{statusId}, + weaning_date = #{weaningDate}, + weaning_weight = #{weaningWeight}, + breed_status_id = #{breedStatusId}, + father_id = #{fatherId}, + mother_id = #{motherId}, + receptor_id = #{receptorId}, + mating_date = #{matingDate}, + mating_type_id = #{matingTypeId}, + preg_date = #{pregDate}, + lambing_date = #{lambingDate}, + lambing_day = #{lambingDay}, + expected_date = #{expectedDate}, + controlled = #{controlled}, + mating_counts = #{matingCounts}, + mating_total = #{matingTotal}, + miscarriage_counts = #{miscarriageCounts}, + body = #{body}, + breast = #{breast}, + source = #{source}, + source_date = #{sourceDate}, + source_ranch_id = #{sourceRanchId}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + is_delete = #{isDelete}, + + where id = #{id} + + + + delete from bas_sheep where id = #{id} + + + + delete from bas_sheep where id in + + #{id} + + + \ No newline at end of file