From 456e912a2b19d9757da4a6e15621af39717c2f7c Mon Sep 17 00:00:00 2001 From: wyt <414651037@qq.com> Date: Sun, 13 Jul 2025 12:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8A=E5=8F=AA=E6=A1=A3=E6=A1=88=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8sheep=5Ffile=E8=A7=86=E5=9B=BE=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SheepFileController.java | 104 ++ .../module/sheep_file/domain/SheepFile.java | 934 ++++++++++++++++++ .../sheep_file/mapper/SheepFileMapper.java | 61 ++ .../sheep_file/service/ISheepFileService.java | 61 ++ .../service/impl/SheepFileServiceImpl.java | 96 ++ .../mapper/sheep_file/SheepFileMapper.xml | 314 ++++++ 6 files changed, 1570 insertions(+) create mode 100644 zhyc-module/src/main/java/com/zhyc/module/sheep_file/controller/SheepFileController.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/sheep_file/domain/SheepFile.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/sheep_file/mapper/SheepFileMapper.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/ISheepFileService.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/impl/SheepFileServiceImpl.java create mode 100644 zhyc-module/src/main/resources/mapper/sheep_file/SheepFileMapper.xml diff --git a/zhyc-module/src/main/java/com/zhyc/module/sheep_file/controller/SheepFileController.java b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/controller/SheepFileController.java new file mode 100644 index 0000000..25ff2e5 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/controller/SheepFileController.java @@ -0,0 +1,104 @@ +package com.zhyc.module.sheep_file.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.sheep_file.domain.SheepFile; +import com.zhyc.module.sheep_file.service.ISheepFileService; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 羊只档案Controller + * + * @author wyt + * @date 2025-07-13 + */ +@RestController +@RequestMapping("/sheep_file/sheep_file") +public class SheepFileController extends BaseController +{ + @Autowired + private ISheepFileService sheepFileService; + + /** + * 查询羊只档案列表 + */ + @PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:list')") + @GetMapping("/list") + public TableDataInfo list(SheepFile sheepFile) + { + startPage(); + List list = sheepFileService.selectSheepFileList(sheepFile); + return getDataTable(list); + } + + /** + * 导出羊只档案列表 + */ + @PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:export')") + @Log(title = "羊只档案", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SheepFile sheepFile) + { + List list = sheepFileService.selectSheepFileList(sheepFile); + ExcelUtil util = new ExcelUtil(SheepFile.class); + util.exportExcel(response, list, "羊只档案数据"); + } + + /** + * 获取羊只档案详细信息 + */ + @PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sheepFileService.selectSheepFileById(id)); + } + + /** + * 新增羊只档案 + */ + @PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:add')") + @Log(title = "羊只档案", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SheepFile sheepFile) + { + return toAjax(sheepFileService.insertSheepFile(sheepFile)); + } + + /** + * 修改羊只档案 + */ + @PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:edit')") + @Log(title = "羊只档案", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SheepFile sheepFile) + { + return toAjax(sheepFileService.updateSheepFile(sheepFile)); + } + + /** + * 删除羊只档案 + */ + @PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:remove')") + @Log(title = "羊只档案", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sheepFileService.deleteSheepFileByIds(ids)); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/sheep_file/domain/SheepFile.java b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/domain/SheepFile.java new file mode 100644 index 0000000..917c2d4 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/domain/SheepFile.java @@ -0,0 +1,934 @@ +package com.zhyc.module.sheep_file.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; + +/** + * 羊只档案对象 sheep_file + * + * @author wyt + * @date 2025-07-13 + */ +public class SheepFile extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 羊只id */ + private Long id; + + /** 管理耳号 */ + @Excel(name = "管理耳号") + private String bsManageTags; + + /** 牧场id */ + @Excel(name = "牧场id") + private Long ranchId; + + /** 牧场名称 */ + @Excel(name = "牧场名称") + private String drRanch; + + /** 羊舍id */ + @Excel(name = "羊舍id") + private Long sheepfoldId; + + /** 羊舍名称 */ + @Excel(name = "羊舍名称") + private String sheepfoldName; + + /** 电子耳号 */ + @Excel(name = "电子耳号") + private String electronicTags; + + /** 品种id */ + @Excel(name = "品种id") + private Long varietyId; + + /** 品种 */ + @Excel(name = "品种") + private String variety; + + /** 家系 */ + @Excel(name = "家系") + private String family; + + /** 羊只类型 */ + @Excel(name = "羊只类型") + private String name; + + /** 性别 */ + @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 dayAge; + + /** 月龄 */ + @Excel(name = "月龄") + private Long monthAge; + + /** 胎次 */ + @Excel(name = "胎次") + private Long parity; + + /** 出生体重 */ + @Excel(name = "出生体重") + private Long birthWeight; + + /** 断奶日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "断奶日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date weaningDate; + + /** 羊只状态 */ + @Excel(name = "羊只状态") + private Long statusId; + + /** 断奶体重 */ + @Excel(name = "断奶体重") + private Long weaningWeight; + + /** 当前体重 */ + @Excel(name = "当前体重") + private Long currentWeight; + + /** 繁育状态id */ + @Excel(name = "繁育状态id") + private Long breedStatusId; + + /** 繁殖状态 */ + @Excel(name = "繁殖状态") + private String breed; + + /** 父号id */ + @Excel(name = "父号id") + private Long bsFatherId; + + /** 父亲管理耳号 */ + @Excel(name = "父亲管理耳号") + private String fatherManageTags; + + /** 母号id */ + @Excel(name = "母号id") + private Long bsMotherId; + + /** 母亲管理耳号 */ + @Excel(name = "母亲管理耳号") + private String motherManageTags; + + /** 受体id */ + @Excel(name = "受体id") + private Long receptorId; + + /** 受体管理耳号 */ + @Excel(name = "受体管理耳号") + private String receptorManageTags; + + /** 祖父号id */ + @Excel(name = "祖父号id") + private Long fatherFatherId; + + /** 祖父管理耳号 */ + @Excel(name = "祖父管理耳号") + private String grandfatherManageTags; + + /** 祖母号id */ + @Excel(name = "祖母号id") + private Long fatherMotherId; + + /** 祖母管理耳号 */ + @Excel(name = "祖母管理耳号") + private String grandmotherManageTags; + + /** 外祖父号id */ + @Excel(name = "外祖父号id") + private Long fatherId; + + /** 外祖父管理耳号 */ + @Excel(name = "外祖父管理耳号") + private String maternalGrandfatherManageTags; + + /** 外祖母号id */ + @Excel(name = "外祖母号id") + private Long motherId; + + /** 外祖母管理耳号 */ + @Excel(name = "外祖母管理耳号") + private String maternalGrandmotherManageTags; + + /** 配种日期 */ + @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; + + /** 配后天数 */ + @Excel(name = "配后天数") + private Long matingDay; + + /** 怀孕天数 */ + @Excel(name = "怀孕天数") + private Long gestationDay; + + /** 预产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "预产日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date expectedDate; + + /** 产后天数 */ + @Excel(name = "产后天数") + private Long postLambingDay; + + /** 泌乳天数 */ + @Excel(name = "泌乳天数") + private Long lactationDay; + + /** 空怀天数 */ + @Excel(name = "空怀天数") + private Long anestrousDay; + + /** 配种次数 */ + @Excel(name = "配种次数") + private Long matingCounts; + + /** 累计配种次数 */ + @Excel(name = "累计配种次数") + private Long matingTotal; + + /** 累计流产次数 */ + @Excel(name = "累计流产次数") + private Long miscarriageCounts; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + /** 是否性控 */ + @Excel(name = "是否性控") + private Long controlled; + + /** 体况评分 */ + @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 sourceRanch; + + /** 是否删除 */ + private Long isDelete; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setBsManageTags(String bsManageTags) + { + this.bsManageTags = bsManageTags; + } + + public String getBsManageTags() + { + return bsManageTags; + } + + public void setRanchId(Long ranchId) + { + this.ranchId = ranchId; + } + + public Long getRanchId() + { + return ranchId; + } + + public void setDrRanch(String drRanch) + { + this.drRanch = drRanch; + } + + public String getDrRanch() + { + return drRanch; + } + + public void setSheepfoldId(Long sheepfoldId) + { + this.sheepfoldId = sheepfoldId; + } + + public Long getSheepfoldId() + { + return sheepfoldId; + } + + public void setSheepfoldName(String sheepfoldName) + { + this.sheepfoldName = sheepfoldName; + } + + public String getSheepfoldName() + { + return sheepfoldName; + } + + public void setElectronicTags(String electronicTags) + { + this.electronicTags = electronicTags; + } + + public String getElectronicTags() + { + return electronicTags; + } + + public void setVarietyId(Long varietyId) + { + this.varietyId = varietyId; + } + + public Long getVarietyId() + { + return varietyId; + } + + public void setVariety(String variety) + { + this.variety = variety; + } + + public String getVariety() + { + return variety; + } + + public void setFamily(String family) + { + this.family = family; + } + + public String getFamily() + { + return family; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setGender(Long gender) + { + this.gender = gender; + } + + public Long getGender() + { + return gender; + } + + public void setBirthday(Date birthday) + { + this.birthday = birthday; + } + + public Date getBirthday() + { + return birthday; + } + + public void setDayAge(Long dayAge) + { + this.dayAge = dayAge; + } + + public Long getDayAge() + { + return dayAge; + } + + 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 setBirthWeight(Long birthWeight) + { + this.birthWeight = birthWeight; + } + + public Long getBirthWeight() + { + return birthWeight; + } + + public void setWeaningDate(Date weaningDate) + { + this.weaningDate = weaningDate; + } + + public Date getWeaningDate() + { + return weaningDate; + } + + public void setStatusId(Long statusId) + { + this.statusId = statusId; + } + + public Long getStatusId() + { + return statusId; + } + + public void setWeaningWeight(Long weaningWeight) + { + this.weaningWeight = weaningWeight; + } + + public Long getWeaningWeight() + { + return weaningWeight; + } + + public void setCurrentWeight(Long currentWeight) + { + this.currentWeight = currentWeight; + } + + public Long getCurrentWeight() + { + return currentWeight; + } + + public void setBreedStatusId(Long breedStatusId) + { + this.breedStatusId = breedStatusId; + } + + public Long getBreedStatusId() + { + return breedStatusId; + } + + public void setBreed(String breed) + { + this.breed = breed; + } + + public String getBreed() + { + return breed; + } + + public void setBsFatherId(Long bsFatherId) + { + this.bsFatherId = bsFatherId; + } + + public Long getBsFatherId() + { + return bsFatherId; + } + + public void setFatherManageTags(String fatherManageTags) + { + this.fatherManageTags = fatherManageTags; + } + + public String getFatherManageTags() + { + return fatherManageTags; + } + + public void setBsMotherId(Long bsMotherId) + { + this.bsMotherId = bsMotherId; + } + + public Long getBsMotherId() + { + return bsMotherId; + } + + public void setMotherManageTags(String motherManageTags) + { + this.motherManageTags = motherManageTags; + } + + public String getMotherManageTags() + { + return motherManageTags; + } + + public void setReceptorId(Long receptorId) + { + this.receptorId = receptorId; + } + + public Long getReceptorId() + { + return receptorId; + } + + public void setReceptorManageTags(String receptorManageTags) + { + this.receptorManageTags = receptorManageTags; + } + + public String getReceptorManageTags() + { + return receptorManageTags; + } + + public void setFatherFatherId(Long fatherFatherId) + { + this.fatherFatherId = fatherFatherId; + } + + public Long getFatherFatherId() + { + return fatherFatherId; + } + + public void setGrandfatherManageTags(String grandfatherManageTags) + { + this.grandfatherManageTags = grandfatherManageTags; + } + + public String getGrandfatherManageTags() + { + return grandfatherManageTags; + } + + public void setFatherMotherId(Long fatherMotherId) + { + this.fatherMotherId = fatherMotherId; + } + + public Long getFatherMotherId() + { + return fatherMotherId; + } + + public void setGrandmotherManageTags(String grandmotherManageTags) + { + this.grandmotherManageTags = grandmotherManageTags; + } + + public String getGrandmotherManageTags() + { + return grandmotherManageTags; + } + + public void setFatherId(Long fatherId) + { + this.fatherId = fatherId; + } + + public Long getFatherId() + { + return fatherId; + } + + public void setMaternalGrandfatherManageTags(String maternalGrandfatherManageTags) + { + this.maternalGrandfatherManageTags = maternalGrandfatherManageTags; + } + + public String getMaternalGrandfatherManageTags() + { + return maternalGrandfatherManageTags; + } + + public void setMotherId(Long motherId) + { + this.motherId = motherId; + } + + public Long getMotherId() + { + return motherId; + } + + public void setMaternalGrandmotherManageTags(String maternalGrandmotherManageTags) + { + this.maternalGrandmotherManageTags = maternalGrandmotherManageTags; + } + + public String getMaternalGrandmotherManageTags() + { + return maternalGrandmotherManageTags; + } + + public void setMatingDate(Date matingDate) + { + this.matingDate = matingDate; + } + + public Date getMatingDate() + { + return matingDate; + } + + public void setMatingTypeId(Long matingTypeId) + { + this.matingTypeId = matingTypeId; + } + + public Long getMatingTypeId() + { + return matingTypeId; + } + + public void setPregDate(Date pregDate) + { + this.pregDate = pregDate; + } + + public Date getPregDate() + { + return pregDate; + } + + public void setLambingDate(Date lambingDate) + { + this.lambingDate = lambingDate; + } + + public Date getLambingDate() + { + return lambingDate; + } + + public void setLambingDay(Long lambingDay) + { + this.lambingDay = lambingDay; + } + + public Long getLambingDay() + { + return lambingDay; + } + + public void setMatingDay(Long matingDay) + { + this.matingDay = matingDay; + } + + public Long getMatingDay() + { + return matingDay; + } + + public void setGestationDay(Long gestationDay) + { + this.gestationDay = gestationDay; + } + + public Long getGestationDay() + { + return gestationDay; + } + + public void setExpectedDate(Date expectedDate) + { + this.expectedDate = expectedDate; + } + + public Date getExpectedDate() + { + return expectedDate; + } + + public void setPostLambingDay(Long postLambingDay) + { + this.postLambingDay = postLambingDay; + } + + public Long getPostLambingDay() + { + return postLambingDay; + } + + public void setLactationDay(Long lactationDay) + { + this.lactationDay = lactationDay; + } + + public Long getLactationDay() + { + return lactationDay; + } + + public void setAnestrousDay(Long anestrousDay) + { + this.anestrousDay = anestrousDay; + } + + public Long getAnestrousDay() + { + return anestrousDay; + } + + public void setMatingCounts(Long matingCounts) + { + this.matingCounts = matingCounts; + } + + public Long getMatingCounts() + { + return matingCounts; + } + + public void setMatingTotal(Long matingTotal) + { + this.matingTotal = matingTotal; + } + + public Long getMatingTotal() + { + return matingTotal; + } + + public void setMiscarriageCounts(Long miscarriageCounts) + { + this.miscarriageCounts = miscarriageCounts; + } + + public Long getMiscarriageCounts() + { + return miscarriageCounts; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + public void setControlled(Long controlled) + { + this.controlled = controlled; + } + + public Long getControlled() + { + return controlled; + } + + public void setBody(Long body) + { + this.body = body; + } + + public Long getBody() + { + return body; + } + + public void setBreast(Long breast) + { + this.breast = breast; + } + + public Long getBreast() + { + return breast; + } + + public void setSource(String source) + { + this.source = source; + } + + public String getSource() + { + return source; + } + + public void setSourceDate(Date sourceDate) + { + this.sourceDate = sourceDate; + } + + public Date getSourceDate() + { + return sourceDate; + } + + public void setSourceRanchId(Long sourceRanchId) + { + this.sourceRanchId = sourceRanchId; + } + + public Long getSourceRanchId() + { + return sourceRanchId; + } + + public void setSourceRanch(String sourceRanch) + { + this.sourceRanch = sourceRanch; + } + + public String getSourceRanch() + { + return sourceRanch; + } + + public void setIsDelete(Long isDelete) + { + this.isDelete = isDelete; + } + + public Long getIsDelete() + { + return isDelete; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("bsManageTags", getBsManageTags()) + .append("ranchId", getRanchId()) + .append("drRanch", getDrRanch()) + .append("sheepfoldId", getSheepfoldId()) + .append("sheepfoldName", getSheepfoldName()) + .append("electronicTags", getElectronicTags()) + .append("varietyId", getVarietyId()) + .append("variety", getVariety()) + .append("family", getFamily()) + .append("name", getName()) + .append("gender", getGender()) + .append("birthday", getBirthday()) + .append("dayAge", getDayAge()) + .append("monthAge", getMonthAge()) + .append("parity", getParity()) + .append("birthWeight", getBirthWeight()) + .append("weaningDate", getWeaningDate()) + .append("statusId", getStatusId()) + .append("weaningWeight", getWeaningWeight()) + .append("currentWeight", getCurrentWeight()) + .append("breedStatusId", getBreedStatusId()) + .append("breed", getBreed()) + .append("bsFatherId", getBsFatherId()) + .append("fatherManageTags", getFatherManageTags()) + .append("bsMotherId", getBsMotherId()) + .append("motherManageTags", getMotherManageTags()) + .append("receptorId", getReceptorId()) + .append("receptorManageTags", getReceptorManageTags()) + .append("fatherFatherId", getFatherFatherId()) + .append("grandfatherManageTags", getGrandfatherManageTags()) + .append("fatherMotherId", getFatherMotherId()) + .append("grandmotherManageTags", getGrandmotherManageTags()) + .append("fatherId", getFatherId()) + .append("maternalGrandfatherManageTags", getMaternalGrandfatherManageTags()) + .append("motherId", getMotherId()) + .append("maternalGrandmotherManageTags", getMaternalGrandmotherManageTags()) + .append("matingDate", getMatingDate()) + .append("matingTypeId", getMatingTypeId()) + .append("pregDate", getPregDate()) + .append("lambingDate", getLambingDate()) + .append("lambingDay", getLambingDay()) + .append("matingDay", getMatingDay()) + .append("gestationDay", getGestationDay()) + .append("expectedDate", getExpectedDate()) + .append("postLambingDay", getPostLambingDay()) + .append("lactationDay", getLactationDay()) + .append("anestrousDay", getAnestrousDay()) + .append("matingCounts", getMatingCounts()) + .append("matingTotal", getMatingTotal()) + .append("miscarriageCounts", getMiscarriageCounts()) + .append("comment", getComment()) + .append("controlled", getControlled()) + .append("body", getBody()) + .append("breast", getBreast()) + .append("source", getSource()) + .append("sourceDate", getSourceDate()) + .append("sourceRanchId", getSourceRanchId()) + .append("sourceRanch", getSourceRanch()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("isDelete", getIsDelete()) + .toString(); + } +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/sheep_file/mapper/SheepFileMapper.java b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/mapper/SheepFileMapper.java new file mode 100644 index 0000000..480d02e --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/mapper/SheepFileMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.sheep_file.mapper; + +import java.util.List; +import com.zhyc.module.sheep_file.domain.SheepFile; + +/** + * 羊只档案Mapper接口 + * + * @author wyt + * @date 2025-07-13 + */ +public interface SheepFileMapper +{ + /** + * 查询羊只档案 + * + * @param id 羊只档案主键 + * @return 羊只档案 + */ + public SheepFile selectSheepFileById(Long id); + + /** + * 查询羊只档案列表 + * + * @param sheepFile 羊只档案 + * @return 羊只档案集合 + */ + public List selectSheepFileList(SheepFile sheepFile); + + /** + * 新增羊只档案 + * + * @param sheepFile 羊只档案 + * @return 结果 + */ + public int insertSheepFile(SheepFile sheepFile); + + /** + * 修改羊只档案 + * + * @param sheepFile 羊只档案 + * @return 结果 + */ + public int updateSheepFile(SheepFile sheepFile); + + /** + * 删除羊只档案 + * + * @param id 羊只档案主键 + * @return 结果 + */ + public int deleteSheepFileById(Long id); + + /** + * 批量删除羊只档案 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSheepFileByIds(Long[] ids); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/ISheepFileService.java b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/ISheepFileService.java new file mode 100644 index 0000000..a5f012f --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/ISheepFileService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.sheep_file.service; + +import java.util.List; +import com.zhyc.module.sheep_file.domain.SheepFile; + +/** + * 羊只档案Service接口 + * + * @author wyt + * @date 2025-07-13 + */ +public interface ISheepFileService +{ + /** + * 查询羊只档案 + * + * @param id 羊只档案主键 + * @return 羊只档案 + */ + public SheepFile selectSheepFileById(Long id); + + /** + * 查询羊只档案列表 + * + * @param sheepFile 羊只档案 + * @return 羊只档案集合 + */ + public List selectSheepFileList(SheepFile sheepFile); + + /** + * 新增羊只档案 + * + * @param sheepFile 羊只档案 + * @return 结果 + */ + public int insertSheepFile(SheepFile sheepFile); + + /** + * 修改羊只档案 + * + * @param sheepFile 羊只档案 + * @return 结果 + */ + public int updateSheepFile(SheepFile sheepFile); + + /** + * 批量删除羊只档案 + * + * @param ids 需要删除的羊只档案主键集合 + * @return 结果 + */ + public int deleteSheepFileByIds(Long[] ids); + + /** + * 删除羊只档案信息 + * + * @param id 羊只档案主键 + * @return 结果 + */ + public int deleteSheepFileById(Long id); +} diff --git a/zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/impl/SheepFileServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/impl/SheepFileServiceImpl.java new file mode 100644 index 0000000..6a61101 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/sheep_file/service/impl/SheepFileServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.sheep_file.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.sheep_file.mapper.SheepFileMapper; +import com.zhyc.module.sheep_file.domain.SheepFile; +import com.zhyc.module.sheep_file.service.ISheepFileService; + +/** + * 羊只档案Service业务层处理 + * + * @author wyt + * @date 2025-07-13 + */ +@Service +public class SheepFileServiceImpl implements ISheepFileService +{ + @Autowired + private SheepFileMapper sheepFileMapper; + + /** + * 查询羊只档案 + * + * @param id 羊只档案主键 + * @return 羊只档案 + */ + @Override + public SheepFile selectSheepFileById(Long id) + { + return sheepFileMapper.selectSheepFileById(id); + } + + /** + * 查询羊只档案列表 + * + * @param sheepFile 羊只档案 + * @return 羊只档案 + */ + @Override + public List selectSheepFileList(SheepFile sheepFile) + { + return sheepFileMapper.selectSheepFileList(sheepFile); + } + + /** + * 新增羊只档案 + * + * @param sheepFile 羊只档案 + * @return 结果 + */ + @Override + public int insertSheepFile(SheepFile sheepFile) + { + sheepFile.setCreateTime(DateUtils.getNowDate()); + return sheepFileMapper.insertSheepFile(sheepFile); + } + + /** + * 修改羊只档案 + * + * @param sheepFile 羊只档案 + * @return 结果 + */ + @Override + public int updateSheepFile(SheepFile sheepFile) + { + sheepFile.setUpdateTime(DateUtils.getNowDate()); + return sheepFileMapper.updateSheepFile(sheepFile); + } + + /** + * 批量删除羊只档案 + * + * @param ids 需要删除的羊只档案主键 + * @return 结果 + */ + @Override + public int deleteSheepFileByIds(Long[] ids) + { + return sheepFileMapper.deleteSheepFileByIds(ids); + } + + /** + * 删除羊只档案信息 + * + * @param id 羊只档案主键 + * @return 结果 + */ + @Override + public int deleteSheepFileById(Long id) + { + return sheepFileMapper.deleteSheepFileById(id); + } +} diff --git a/zhyc-module/src/main/resources/mapper/sheep_file/SheepFileMapper.xml b/zhyc-module/src/main/resources/mapper/sheep_file/SheepFileMapper.xml new file mode 100644 index 0000000..5008631 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/sheep_file/SheepFileMapper.xml @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, bs_manage_tags, ranch_id, dr_ranch, sheepfold_id, sheepfold_name, electronic_tags, variety_id, variety, family, name, gender, birthday, day_age, month_age, parity, birth_weight, weaning_date, status_id, weaning_weight, current_weight, breed_status_id, breed, bs_father_id, father_manage_tags, bs_mother_id, mother_manage_tags, receptor_id, receptor_manage_tags, father_father_id, grandfather_manage_tags, father_mother_id, grandmother_manage_tags, father_id, maternal_grandfather_manage_tags, mother_id, maternal_grandmother_manage_tags, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, mating_day, gestation_day, expected_date, post_lambing_day, lactation_day, anestrous_day, mating_counts, mating_total, miscarriage_counts, comment, controlled, body, breast, source, source_date, source_ranch_id, source_ranch, update_by, update_time, create_by, create_time, is_delete from sheep_file + + + + + + + + insert into sheep_file + + id, + bs_manage_tags, + ranch_id, + dr_ranch, + sheepfold_id, + sheepfold_name, + electronic_tags, + variety_id, + variety, + family, + name, + gender, + birthday, + day_age, + month_age, + parity, + birth_weight, + weaning_date, + status_id, + weaning_weight, + current_weight, + breed_status_id, + breed, + bs_father_id, + father_manage_tags, + bs_mother_id, + mother_manage_tags, + receptor_id, + receptor_manage_tags, + father_father_id, + grandfather_manage_tags, + father_mother_id, + grandmother_manage_tags, + father_id, + maternal_grandfather_manage_tags, + mother_id, + maternal_grandmother_manage_tags, + mating_date, + mating_type_id, + preg_date, + lambing_date, + lambing_day, + mating_day, + gestation_day, + expected_date, + post_lambing_day, + lactation_day, + anestrous_day, + mating_counts, + mating_total, + miscarriage_counts, + comment, + controlled, + body, + breast, + source, + source_date, + source_ranch_id, + source_ranch, + update_by, + update_time, + create_by, + create_time, + is_delete, + + + #{id}, + #{bsManageTags}, + #{ranchId}, + #{drRanch}, + #{sheepfoldId}, + #{sheepfoldName}, + #{electronicTags}, + #{varietyId}, + #{variety}, + #{family}, + #{name}, + #{gender}, + #{birthday}, + #{dayAge}, + #{monthAge}, + #{parity}, + #{birthWeight}, + #{weaningDate}, + #{statusId}, + #{weaningWeight}, + #{currentWeight}, + #{breedStatusId}, + #{breed}, + #{bsFatherId}, + #{fatherManageTags}, + #{bsMotherId}, + #{motherManageTags}, + #{receptorId}, + #{receptorManageTags}, + #{fatherFatherId}, + #{grandfatherManageTags}, + #{fatherMotherId}, + #{grandmotherManageTags}, + #{fatherId}, + #{maternalGrandfatherManageTags}, + #{motherId}, + #{maternalGrandmotherManageTags}, + #{matingDate}, + #{matingTypeId}, + #{pregDate}, + #{lambingDate}, + #{lambingDay}, + #{matingDay}, + #{gestationDay}, + #{expectedDate}, + #{postLambingDay}, + #{lactationDay}, + #{anestrousDay}, + #{matingCounts}, + #{matingTotal}, + #{miscarriageCounts}, + #{comment}, + #{controlled}, + #{body}, + #{breast}, + #{source}, + #{sourceDate}, + #{sourceRanchId}, + #{sourceRanch}, + #{updateBy}, + #{updateTime}, + #{createBy}, + #{createTime}, + #{isDelete}, + + + + + update sheep_file + + bs_manage_tags = #{bsManageTags}, + ranch_id = #{ranchId}, + dr_ranch = #{drRanch}, + sheepfold_id = #{sheepfoldId}, + sheepfold_name = #{sheepfoldName}, + electronic_tags = #{electronicTags}, + variety_id = #{varietyId}, + variety = #{variety}, + family = #{family}, + name = #{name}, + gender = #{gender}, + birthday = #{birthday}, + day_age = #{dayAge}, + month_age = #{monthAge}, + parity = #{parity}, + birth_weight = #{birthWeight}, + weaning_date = #{weaningDate}, + status_id = #{statusId}, + weaning_weight = #{weaningWeight}, + current_weight = #{currentWeight}, + breed_status_id = #{breedStatusId}, + breed = #{breed}, + bs_father_id = #{bsFatherId}, + father_manage_tags = #{fatherManageTags}, + bs_mother_id = #{bsMotherId}, + mother_manage_tags = #{motherManageTags}, + receptor_id = #{receptorId}, + receptor_manage_tags = #{receptorManageTags}, + father_father_id = #{fatherFatherId}, + grandfather_manage_tags = #{grandfatherManageTags}, + father_mother_id = #{fatherMotherId}, + grandmother_manage_tags = #{grandmotherManageTags}, + father_id = #{fatherId}, + maternal_grandfather_manage_tags = #{maternalGrandfatherManageTags}, + mother_id = #{motherId}, + maternal_grandmother_manage_tags = #{maternalGrandmotherManageTags}, + mating_date = #{matingDate}, + mating_type_id = #{matingTypeId}, + preg_date = #{pregDate}, + lambing_date = #{lambingDate}, + lambing_day = #{lambingDay}, + mating_day = #{matingDay}, + gestation_day = #{gestationDay}, + expected_date = #{expectedDate}, + post_lambing_day = #{postLambingDay}, + lactation_day = #{lactationDay}, + anestrous_day = #{anestrousDay}, + mating_counts = #{matingCounts}, + mating_total = #{matingTotal}, + miscarriage_counts = #{miscarriageCounts}, + comment = #{comment}, + controlled = #{controlled}, + body = #{body}, + breast = #{breast}, + source = #{source}, + source_date = #{sourceDate}, + source_ranch_id = #{sourceRanchId}, + source_ranch = #{sourceRanch}, + update_by = #{updateBy}, + update_time = #{updateTime}, + create_by = #{createBy}, + create_time = #{createTime}, + is_delete = #{isDelete}, + + where id = #{id} + + + + delete from sheep_file where id = #{id} + + + + delete from sheep_file where id in + + #{id} + + + \ No newline at end of file