diff --git a/zhyc-module/src/main/java/com/zhyc/module/base/controller/BreedRamFileController.java b/zhyc-module/src/main/java/com/zhyc/module/base/controller/BreedRamFileController.java new file mode 100644 index 0000000..7274064 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/base/controller/BreedRamFileController.java @@ -0,0 +1,104 @@ +package com.zhyc.module.base.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.enums.BusinessType; +import com.zhyc.module.base.domain.BreedRamFile; +import com.zhyc.module.base.service.IBreedRamFileService; +import com.zhyc.common.core.controller.BaseController; +import com.zhyc.common.core.domain.AjaxResult; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 种公羊档案Controller + * + * @author zhyc + * @date 2025-07-29 + */ +@RestController +@RequestMapping("/ram_file/bas_ram_file") +public class BreedRamFileController extends BaseController +{ + @Autowired + private IBreedRamFileService breedRamFileService; + + /** + * 查询种公羊档案列表 + */ + @PreAuthorize("@ss.hasPermi('breed_ram_file:breed_ram_file:list')") + @GetMapping("/list") + public TableDataInfo list(BreedRamFile breedRamFile) + { + startPage(); + List list = breedRamFileService.selectBreedRamFileList(breedRamFile); + return getDataTable(list); + } + + /** + * 导出种公羊档案列表 + */ + @PreAuthorize("@ss.hasPermi('breed_ram_file:breed_ram_file:export')") + @Log(title = "种公羊档案", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BreedRamFile breedRamFile) + { + List list = breedRamFileService.selectBreedRamFileList(breedRamFile); + ExcelUtil util = new ExcelUtil(BreedRamFile.class); + util.exportExcel(response, list, "种公羊档案数据"); + } + + /** + * 获取种公羊档案详细信息 + */ + @PreAuthorize("@ss.hasPermi('breed_ram_file:breed_ram_file:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(breedRamFileService.selectBreedRamFileById(id)); + } + + /** + * 新增种公羊档案 + */ + @PreAuthorize("@ss.hasPermi('breed_ram_file:breed_ram_file:add')") + @Log(title = "种公羊档案", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BreedRamFile breedRamFile) + { + return toAjax(breedRamFileService.insertBreedRamFile(breedRamFile)); + } + + /** + * 修改种公羊档案 + */ + @PreAuthorize("@ss.hasPermi('breed_ram_file:breed_ram_file:edit')") + @Log(title = "种公羊档案", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BreedRamFile breedRamFile) + { + return toAjax(breedRamFileService.updateBreedRamFile(breedRamFile)); + } + + /** + * 删除种公羊档案 + */ + @PreAuthorize("@ss.hasPermi('breed_ram_file:breed_ram_file:remove')") + @Log(title = "种公羊档案", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(breedRamFileService.deleteBreedRamFileByIds(ids)); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/base/domain/BreedRamFile.java b/zhyc-module/src/main/java/com/zhyc/module/base/domain/BreedRamFile.java new file mode 100644 index 0000000..463308d --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/base/domain/BreedRamFile.java @@ -0,0 +1,890 @@ +package com.zhyc.module.base.domain; + +import java.math.BigDecimal; +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; + +/** + * 种公羊档案对象 breed_ram_file + * + * @author zhyc + * @date 2025-07-29 + */ +public class BreedRamFile extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 种公羊id */ + private Long id; + + /** 普通耳号 */ + @Excel(name = "普通耳号") + private String ordinaryEarNumber; + + /** 牧场id */ + @Excel(name = "牧场id") + private Long ranchId; + + /** 牧场名称 */ + @Excel(name = "牧场名称") + private String ranchName; + + /** 羊舍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 sheepCategory; + + /** 当前状态 */ + @Excel(name = "当前状态") + private String currentStatus; + + /** 生日 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd") + private Date birthday; + + /** 动态 */ + @Excel(name = "动态") + private String dynamicInfo; + + /** 月龄 */ + @Excel(name = "月龄") + private Long monthAge; + + /** 出生体重 */ + @Excel(name = "出生体重") + private BigDecimal birthWeight; + + /** 断奶日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "断奶日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date weaningDate; + + /** 断奶日龄 */ + @Excel(name = "断奶日龄") + private Long weaningDayAge; + + /** 断奶体重 */ + @Excel(name = "断奶体重") + private BigDecimal weaningWeight; + + /** 断奶日增重 */ + @Excel(name = "断奶日增重") + private BigDecimal weaningDailyGain; + + /** 断奶后日增重 */ + @Excel(name = "断奶后日增重") + private BigDecimal postWeaningDailyGain; + + /** 当前体重 */ + @Excel(name = "当前体重") + private BigDecimal currentWeight; + + /** 当前体重称重日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "当前体重称重日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date currentWeightDate; + + /** 活动量 */ + @Excel(name = "活动量") + private String activityLevel; + + /** 性欲情况 */ + @Excel(name = "性欲情况") + private String sexualStatus; + + /** 阴囊周长 */ + @Excel(name = "阴囊周长") + private BigDecimal scrotumCircumference; + + /** 采精时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "采精时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date spermCollectionTime; + + /** 精液量 */ + @Excel(name = "精液量") + private BigDecimal spermVolume; + + /** 精液活力 */ + @Excel(name = "精液活力") + private String spermVitality; + + /** 精液密度 */ + @Excel(name = "精液密度") + private String spermDensity; + + /** 精液品质 */ + @Excel(name = "精液品质") + private String spermQuality; + + /** 配种状态 */ + @Excel(name = "配种状态") + private Long breedingStatus; + + /** 上次计划时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "上次计划时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastPlanTime; + + /** 本次计划时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "本次计划时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date currentPlanTime; + + /** 蛋白率%EBV */ + @Excel(name = "蛋白率%EBV") + private BigDecimal proteinRateEbv; + + /** 乳脂率%EBV */ + @Excel(name = "乳脂率%EBV") + private BigDecimal milkFatRateEbv; + + /** 乳体细胞(SCS)EBV */ + @Excel(name = "乳体细胞", readConverterExp = "S=CS") + private BigDecimal scsEbv; + + /** 生长性能EBV */ + @Excel(name = "生长性能EBV") + private BigDecimal growthPerformanceEbv; + + /** 抗逆性EBV */ + @Excel(name = "抗逆性EBV") + private BigDecimal resistanceEbv; + + /** 繁殖性能EBV */ + @Excel(name = "繁殖性能EBV") + private BigDecimal reproductionPerformanceEbv; + + /** 体型性状EBV */ + @Excel(name = "体型性状EBV") + private BigDecimal bodyTypeEbv; + + /** 综合育种值 */ + @Excel(name = "综合育种值") + private BigDecimal comprehensiveBreedingValue; + + /** 父号 */ + @Excel(name = "父号") + private String fatherNumber; + + /** 母号 */ + @Excel(name = "母号") + private String motherNumber; + + /** 祖父 */ + @Excel(name = "祖父") + private String grandfatherNumber; + + /** 祖母 */ + @Excel(name = "祖母") + private String grandmotherNumber; + + /** 外祖父 */ + @Excel(name = "外祖父") + private String maternalGrandfatherNumber; + + /** 外祖母 */ + @Excel(name = "外祖母") + private String maternalGrandmotherNumber; + + /** 是否核心羊群(0否1是) */ + @Excel(name = "是否核心羊群", readConverterExp = "0=否,1=是") + private Long isCoreFlock; + + /** 是否种用(0否1是) */ + @Excel(name = "是否种用", readConverterExp = "0=否,1=是") + private Long isBreedingUse; + + /** 孕检 */ + @Excel(name = "孕检") + private String pregnancyCheck; + + /** 总配母羊数 */ + @Excel(name = "总配母羊数") + private Long totalMatedEwes; + + /** 本交孕检母羊数 */ + @Excel(name = "本交孕检母羊数") + private Long naturalPregnancyCheckEwes; + + /** 本交受孕率% */ + @Excel(name = "本交受孕率%") + private BigDecimal naturalConceptionRate; + + /** 人工孕检母羊数 */ + @Excel(name = "人工孕检母羊数") + private Long artificialPregnancyCheckEwes; + + /** 人工受孕率% */ + @Excel(name = "人工受孕率%") + private BigDecimal artificialConceptionRate; + + /** 公羊母亲奶量 */ + @Excel(name = "公羊母亲奶量") + private BigDecimal ramMotherMilkVolume; + + /** 产奶量估计育种值(Kg) */ + @Excel(name = "产奶量估计育种值", readConverterExp = "K=g") + private BigDecimal milkProductionEbv; + + /** 准确性 */ + @Excel(name = "准确性") + private BigDecimal accuracy; + + /** 信息数 */ + @Excel(name = "信息数") + private Long informationCount; + + /** 是否亲子鉴定(0否1是) */ + @Excel(name = "是否亲子鉴定", readConverterExp = "0=否,1=是") + private Long isPaternityTested; + + /** 是否删除(0否1是) */ + private Long isDelete; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setOrdinaryEarNumber(String ordinaryEarNumber) + { + this.ordinaryEarNumber = ordinaryEarNumber; + } + + public String getOrdinaryEarNumber() + { + return ordinaryEarNumber; + } + public void setRanchId(Long ranchId) + { + this.ranchId = ranchId; + } + + public Long getRanchId() + { + return ranchId; + } + public void setRanchName(String ranchName) + { + this.ranchName = ranchName; + } + + public String getRanchName() + { + return ranchName; + } + 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 setSheepCategory(String sheepCategory) + { + this.sheepCategory = sheepCategory; + } + + public String getSheepCategory() + { + return sheepCategory; + } + public void setCurrentStatus(String currentStatus) + { + this.currentStatus = currentStatus; + } + + public String getCurrentStatus() + { + return currentStatus; + } + public void setBirthday(Date birthday) + { + this.birthday = birthday; + } + + public Date getBirthday() + { + return birthday; + } + public void setDynamicInfo(String dynamicInfo) + { + this.dynamicInfo = dynamicInfo; + } + + public String getDynamicInfo() + { + return dynamicInfo; + } + public void setMonthAge(Long monthAge) + { + this.monthAge = monthAge; + } + + public Long getMonthAge() + { + return monthAge; + } + public void setBirthWeight(BigDecimal birthWeight) + { + this.birthWeight = birthWeight; + } + + public BigDecimal getBirthWeight() + { + return birthWeight; + } + public void setWeaningDate(Date weaningDate) + { + this.weaningDate = weaningDate; + } + + public Date getWeaningDate() + { + return weaningDate; + } + public void setWeaningDayAge(Long weaningDayAge) + { + this.weaningDayAge = weaningDayAge; + } + + public Long getWeaningDayAge() + { + return weaningDayAge; + } + public void setWeaningWeight(BigDecimal weaningWeight) + { + this.weaningWeight = weaningWeight; + } + + public BigDecimal getWeaningWeight() + { + return weaningWeight; + } + public void setWeaningDailyGain(BigDecimal weaningDailyGain) + { + this.weaningDailyGain = weaningDailyGain; + } + + public BigDecimal getWeaningDailyGain() + { + return weaningDailyGain; + } + public void setPostWeaningDailyGain(BigDecimal postWeaningDailyGain) + { + this.postWeaningDailyGain = postWeaningDailyGain; + } + + public BigDecimal getPostWeaningDailyGain() + { + return postWeaningDailyGain; + } + public void setCurrentWeight(BigDecimal currentWeight) + { + this.currentWeight = currentWeight; + } + + public BigDecimal getCurrentWeight() + { + return currentWeight; + } + public void setCurrentWeightDate(Date currentWeightDate) + { + this.currentWeightDate = currentWeightDate; + } + + public Date getCurrentWeightDate() + { + return currentWeightDate; + } + public void setActivityLevel(String activityLevel) + { + this.activityLevel = activityLevel; + } + + public String getActivityLevel() + { + return activityLevel; + } + public void setSexualStatus(String sexualStatus) + { + this.sexualStatus = sexualStatus; + } + + public String getSexualStatus() + { + return sexualStatus; + } + public void setScrotumCircumference(BigDecimal scrotumCircumference) + { + this.scrotumCircumference = scrotumCircumference; + } + + public BigDecimal getScrotumCircumference() + { + return scrotumCircumference; + } + public void setSpermCollectionTime(Date spermCollectionTime) + { + this.spermCollectionTime = spermCollectionTime; + } + + public Date getSpermCollectionTime() + { + return spermCollectionTime; + } + public void setSpermVolume(BigDecimal spermVolume) + { + this.spermVolume = spermVolume; + } + + public BigDecimal getSpermVolume() + { + return spermVolume; + } + public void setSpermVitality(String spermVitality) + { + this.spermVitality = spermVitality; + } + + public String getSpermVitality() + { + return spermVitality; + } + public void setSpermDensity(String spermDensity) + { + this.spermDensity = spermDensity; + } + + public String getSpermDensity() + { + return spermDensity; + } + public void setSpermQuality(String spermQuality) + { + this.spermQuality = spermQuality; + } + + public String getSpermQuality() + { + return spermQuality; + } + public void setBreedingStatus(Long breedingStatus) + { + this.breedingStatus = breedingStatus; + } + + public Long getBreedingStatus() + { + return breedingStatus; + } + public void setLastPlanTime(Date lastPlanTime) + { + this.lastPlanTime = lastPlanTime; + } + + public Date getLastPlanTime() + { + return lastPlanTime; + } + public void setCurrentPlanTime(Date currentPlanTime) + { + this.currentPlanTime = currentPlanTime; + } + + public Date getCurrentPlanTime() + { + return currentPlanTime; + } + public void setProteinRateEbv(BigDecimal proteinRateEbv) + { + this.proteinRateEbv = proteinRateEbv; + } + + public BigDecimal getProteinRateEbv() + { + return proteinRateEbv; + } + public void setMilkFatRateEbv(BigDecimal milkFatRateEbv) + { + this.milkFatRateEbv = milkFatRateEbv; + } + + public BigDecimal getMilkFatRateEbv() + { + return milkFatRateEbv; + } + public void setScsEbv(BigDecimal scsEbv) + { + this.scsEbv = scsEbv; + } + + public BigDecimal getScsEbv() + { + return scsEbv; + } + public void setGrowthPerformanceEbv(BigDecimal growthPerformanceEbv) + { + this.growthPerformanceEbv = growthPerformanceEbv; + } + + public BigDecimal getGrowthPerformanceEbv() + { + return growthPerformanceEbv; + } + public void setResistanceEbv(BigDecimal resistanceEbv) + { + this.resistanceEbv = resistanceEbv; + } + + public BigDecimal getResistanceEbv() + { + return resistanceEbv; + } + public void setReproductionPerformanceEbv(BigDecimal reproductionPerformanceEbv) + { + this.reproductionPerformanceEbv = reproductionPerformanceEbv; + } + + public BigDecimal getReproductionPerformanceEbv() + { + return reproductionPerformanceEbv; + } + public void setBodyTypeEbv(BigDecimal bodyTypeEbv) + { + this.bodyTypeEbv = bodyTypeEbv; + } + + public BigDecimal getBodyTypeEbv() + { + return bodyTypeEbv; + } + public void setComprehensiveBreedingValue(BigDecimal comprehensiveBreedingValue) + { + this.comprehensiveBreedingValue = comprehensiveBreedingValue; + } + + public BigDecimal getComprehensiveBreedingValue() + { + return comprehensiveBreedingValue; + } + public void setFatherNumber(String fatherNumber) + { + this.fatherNumber = fatherNumber; + } + + public String getFatherNumber() + { + return fatherNumber; + } + public void setMotherNumber(String motherNumber) + { + this.motherNumber = motherNumber; + } + + public String getMotherNumber() + { + return motherNumber; + } + public void setGrandfatherNumber(String grandfatherNumber) + { + this.grandfatherNumber = grandfatherNumber; + } + + public String getGrandfatherNumber() + { + return grandfatherNumber; + } + public void setGrandmotherNumber(String grandmotherNumber) + { + this.grandmotherNumber = grandmotherNumber; + } + + public String getGrandmotherNumber() + { + return grandmotherNumber; + } + public void setMaternalGrandfatherNumber(String maternalGrandfatherNumber) + { + this.maternalGrandfatherNumber = maternalGrandfatherNumber; + } + + public String getMaternalGrandfatherNumber() + { + return maternalGrandfatherNumber; + } + public void setMaternalGrandmotherNumber(String maternalGrandmotherNumber) + { + this.maternalGrandmotherNumber = maternalGrandmotherNumber; + } + + public String getMaternalGrandmotherNumber() + { + return maternalGrandmotherNumber; + } + public void setIsCoreFlock(Long isCoreFlock) + { + this.isCoreFlock = isCoreFlock; + } + + public Long getIsCoreFlock() + { + return isCoreFlock; + } + public void setIsBreedingUse(Long isBreedingUse) + { + this.isBreedingUse = isBreedingUse; + } + + public Long getIsBreedingUse() + { + return isBreedingUse; + } + public void setPregnancyCheck(String pregnancyCheck) + { + this.pregnancyCheck = pregnancyCheck; + } + + public String getPregnancyCheck() + { + return pregnancyCheck; + } + public void setTotalMatedEwes(Long totalMatedEwes) + { + this.totalMatedEwes = totalMatedEwes; + } + + public Long getTotalMatedEwes() + { + return totalMatedEwes; + } + public void setNaturalPregnancyCheckEwes(Long naturalPregnancyCheckEwes) + { + this.naturalPregnancyCheckEwes = naturalPregnancyCheckEwes; + } + + public Long getNaturalPregnancyCheckEwes() + { + return naturalPregnancyCheckEwes; + } + public void setNaturalConceptionRate(BigDecimal naturalConceptionRate) + { + this.naturalConceptionRate = naturalConceptionRate; + } + + public BigDecimal getNaturalConceptionRate() + { + return naturalConceptionRate; + } + public void setArtificialPregnancyCheckEwes(Long artificialPregnancyCheckEwes) + { + this.artificialPregnancyCheckEwes = artificialPregnancyCheckEwes; + } + + public Long getArtificialPregnancyCheckEwes() + { + return artificialPregnancyCheckEwes; + } + public void setArtificialConceptionRate(BigDecimal artificialConceptionRate) + { + this.artificialConceptionRate = artificialConceptionRate; + } + + public BigDecimal getArtificialConceptionRate() + { + return artificialConceptionRate; + } + public void setRamMotherMilkVolume(BigDecimal ramMotherMilkVolume) + { + this.ramMotherMilkVolume = ramMotherMilkVolume; + } + + public BigDecimal getRamMotherMilkVolume() + { + return ramMotherMilkVolume; + } + public void setMilkProductionEbv(BigDecimal milkProductionEbv) + { + this.milkProductionEbv = milkProductionEbv; + } + + public BigDecimal getMilkProductionEbv() + { + return milkProductionEbv; + } + public void setAccuracy(BigDecimal accuracy) + { + this.accuracy = accuracy; + } + + public BigDecimal getAccuracy() + { + return accuracy; + } + public void setInformationCount(Long informationCount) + { + this.informationCount = informationCount; + } + + public Long getInformationCount() + { + return informationCount; + } + public void setIsPaternityTested(Long isPaternityTested) + { + this.isPaternityTested = isPaternityTested; + } + + public Long getIsPaternityTested() + { + return isPaternityTested; + } + 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("ordinaryEarNumber", getOrdinaryEarNumber()) + .append("ranchId", getRanchId()) + .append("ranchName", getRanchName()) + .append("sheepfoldId", getSheepfoldId()) + .append("sheepfoldName", getSheepfoldName()) + .append("electronicTags", getElectronicTags()) + .append("varietyId", getVarietyId()) + .append("variety", getVariety()) + .append("sheepCategory", getSheepCategory()) + .append("currentStatus", getCurrentStatus()) + .append("birthday", getBirthday()) + .append("dynamicInfo", getDynamicInfo()) + .append("monthAge", getMonthAge()) + .append("birthWeight", getBirthWeight()) + .append("weaningDate", getWeaningDate()) + .append("weaningDayAge", getWeaningDayAge()) + .append("weaningWeight", getWeaningWeight()) + .append("weaningDailyGain", getWeaningDailyGain()) + .append("postWeaningDailyGain", getPostWeaningDailyGain()) + .append("currentWeight", getCurrentWeight()) + .append("currentWeightDate", getCurrentWeightDate()) + .append("activityLevel", getActivityLevel()) + .append("sexualStatus", getSexualStatus()) + .append("scrotumCircumference", getScrotumCircumference()) + .append("spermCollectionTime", getSpermCollectionTime()) + .append("spermVolume", getSpermVolume()) + .append("spermVitality", getSpermVitality()) + .append("spermDensity", getSpermDensity()) + .append("spermQuality", getSpermQuality()) + .append("breedingStatus", getBreedingStatus()) + .append("lastPlanTime", getLastPlanTime()) + .append("currentPlanTime", getCurrentPlanTime()) + .append("remark", getRemark()) + .append("proteinRateEbv", getProteinRateEbv()) + .append("milkFatRateEbv", getMilkFatRateEbv()) + .append("scsEbv", getScsEbv()) + .append("growthPerformanceEbv", getGrowthPerformanceEbv()) + .append("resistanceEbv", getResistanceEbv()) + .append("reproductionPerformanceEbv", getReproductionPerformanceEbv()) + .append("bodyTypeEbv", getBodyTypeEbv()) + .append("comprehensiveBreedingValue", getComprehensiveBreedingValue()) + .append("fatherNumber", getFatherNumber()) + .append("motherNumber", getMotherNumber()) + .append("grandfatherNumber", getGrandfatherNumber()) + .append("grandmotherNumber", getGrandmotherNumber()) + .append("maternalGrandfatherNumber", getMaternalGrandfatherNumber()) + .append("maternalGrandmotherNumber", getMaternalGrandmotherNumber()) + .append("isCoreFlock", getIsCoreFlock()) + .append("isBreedingUse", getIsBreedingUse()) + .append("pregnancyCheck", getPregnancyCheck()) + .append("totalMatedEwes", getTotalMatedEwes()) + .append("naturalPregnancyCheckEwes", getNaturalPregnancyCheckEwes()) + .append("naturalConceptionRate", getNaturalConceptionRate()) + .append("artificialPregnancyCheckEwes", getArtificialPregnancyCheckEwes()) + .append("artificialConceptionRate", getArtificialConceptionRate()) + .append("ramMotherMilkVolume", getRamMotherMilkVolume()) + .append("milkProductionEbv", getMilkProductionEbv()) + .append("accuracy", getAccuracy()) + .append("informationCount", getInformationCount()) + .append("isPaternityTested", getIsPaternityTested()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("isDelete", getIsDelete()) + .toString(); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/base/mapper/BreedRamFileMapper.java b/zhyc-module/src/main/java/com/zhyc/module/base/mapper/BreedRamFileMapper.java new file mode 100644 index 0000000..bb6eaa2 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/base/mapper/BreedRamFileMapper.java @@ -0,0 +1,109 @@ +package com.zhyc.module.base.mapper; + +import java.util.List; +import com.zhyc.module.base.domain.BreedRamFile; + +/** + * 种公羊档案Mapper接口 + * + * @author zhyc + * @date 2025-07-29 + */ +public interface BreedRamFileMapper +{ + /** + * 查询种公羊档案 + * + * @param id 种公羊档案主键 + * @return 种公羊档案 + */ + public BreedRamFile selectBreedRamFileById(Long id); + + /** + * 查询种公羊档案列表 + * + * @param breedRamFile 种公羊档案 + * @return 种公羊档案集合 + */ + public List selectBreedRamFileList(BreedRamFile breedRamFile); + + /** + * 新增种公羊档案 + * + * @param breedRamFile 种公羊档案 + * @return 结果 + */ + public int insertBreedRamFile(BreedRamFile breedRamFile); + + /** + * 修改种公羊档案 + * + * @param breedRamFile 种公羊档案 + * @return 结果 + */ + public int updateBreedRamFile(BreedRamFile breedRamFile); + + /** + * 删除种公羊档案 + * + * @param id 种公羊档案主键 + * @return 结果 + */ + public int deleteBreedRamFileById(Long id); + + /** + * 批量删除种公羊档案 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBreedRamFileByIds(Long[] ids); + + /** + * 根据普通耳号查询种公羊档案 + * + * @param ordinaryEarNumber 普通耳号 + * @return 种公羊档案 + */ + public BreedRamFile selectBreedRamFileByOrdinaryEarNumber(String ordinaryEarNumber); + + /** + * 根据电子耳号查询种公羊档案 + * + * @param electronicTags 电子耳号 + * @return 种公羊档案 + */ + public BreedRamFile selectBreedRamFileByElectronicTags(String electronicTags); + + /** + * 根据牧场ID查询种公羊档案列表 + * + * @param ranchId 牧场ID + * @return 种公羊档案集合 + */ + public List selectBreedRamFileListByRanchId(Long ranchId); + + /** + * 根据羊舍ID查询种公羊档案列表 + * + * @param sheepfoldId 羊舍ID + * @return 种公羊档案集合 + */ + public List selectBreedRamFileListBySheepfoldId(Long sheepfoldId); + + /** + * 查询核心羊群种公羊档案列表 + * + * @param breedRamFile 种公羊档案 + * @return 种公羊档案集合 + */ + public List selectCoreFlockBreedRamFileList(BreedRamFile breedRamFile); + + /** + * 查询种用种公羊档案列表 + * + * @param breedRamFile 种公羊档案 + * @return 种公羊档案集合 + */ + public List selectBreedingUseBreedRamFileList(BreedRamFile breedRamFile); +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/base/service/IBreedRamFileService.java b/zhyc-module/src/main/java/com/zhyc/module/base/service/IBreedRamFileService.java new file mode 100644 index 0000000..847f3b0 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/base/service/IBreedRamFileService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.base.service; + +import java.util.List; +import com.zhyc.module.base.domain.BreedRamFile; + +/** + * 种公羊档案Service接口 + * + * @author zhyc + * @date 2025-07-29 + */ +public interface IBreedRamFileService +{ + /** + * 查询种公羊档案 + * + * @param id 种公羊档案主键 + * @return 种公羊档案 + */ + public BreedRamFile selectBreedRamFileById(Long id); + + /** + * 查询种公羊档案列表 + * + * @param breedRamFile 种公羊档案 + * @return 种公羊档案集合 + */ + public List selectBreedRamFileList(BreedRamFile breedRamFile); + + /** + * 新增种公羊档案 + * + * @param breedRamFile 种公羊档案 + * @return 结果 + */ + public int insertBreedRamFile(BreedRamFile breedRamFile); + + /** + * 修改种公羊档案 + * + * @param breedRamFile 种公羊档案 + * @return 结果 + */ + public int updateBreedRamFile(BreedRamFile breedRamFile); + + /** + * 批量删除种公羊档案 + * + * @param ids 需要删除的种公羊档案主键集合 + * @return 结果 + */ + public int deleteBreedRamFileByIds(Long[] ids); + + /** + * 删除种公羊档案信息 + * + * @param id 种公羊档案主键 + * @return 结果 + */ + public int deleteBreedRamFileById(Long id); +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/base/service/impl/BreedRamFileServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/base/service/impl/BreedRamFileServiceImpl.java new file mode 100644 index 0000000..7e7d8fe --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/base/service/impl/BreedRamFileServiceImpl.java @@ -0,0 +1,96 @@ +package com.zhyc.module.base.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.base.mapper.BreedRamFileMapper; +import com.zhyc.module.base.domain.BreedRamFile; +import com.zhyc.module.base.service.IBreedRamFileService; + +/** + * 种公羊档案Service业务层处理 + * + * @author zhyc + * @date 2025-07-29 + */ +@Service +public class BreedRamFileServiceImpl implements IBreedRamFileService +{ + @Autowired + private BreedRamFileMapper breedRamFileMapper; + + /** + * 查询种公羊档案 + * + * @param id 种公羊档案主键 + * @return 种公羊档案 + */ + @Override + public BreedRamFile selectBreedRamFileById(Long id) + { + return breedRamFileMapper.selectBreedRamFileById(id); + } + + /** + * 查询种公羊档案列表 + * + * @param breedRamFile 种公羊档案 + * @return 种公羊档案 + */ + @Override + public List selectBreedRamFileList(BreedRamFile breedRamFile) + { + return breedRamFileMapper.selectBreedRamFileList(breedRamFile); + } + + /** + * 新增种公羊档案 + * + * @param breedRamFile 种公羊档案 + * @return 结果 + */ + @Override + public int insertBreedRamFile(BreedRamFile breedRamFile) + { + breedRamFile.setCreateTime(DateUtils.getNowDate()); + return breedRamFileMapper.insertBreedRamFile(breedRamFile); + } + + /** + * 修改种公羊档案 + * + * @param breedRamFile 种公羊档案 + * @return 结果 + */ + @Override + public int updateBreedRamFile(BreedRamFile breedRamFile) + { + breedRamFile.setUpdateTime(DateUtils.getNowDate()); + return breedRamFileMapper.updateBreedRamFile(breedRamFile); + } + + /** + * 批量删除种公羊档案 + * + * @param ids 需要删除的种公羊档案主键 + * @return 结果 + */ + @Override + public int deleteBreedRamFileByIds(Long[] ids) + { + return breedRamFileMapper.deleteBreedRamFileByIds(ids); + } + + /** + * 删除种公羊档案信息 + * + * @param id 种公羊档案主键 + * @return 结果 + */ + @Override + public int deleteBreedRamFileById(Long id) + { + return breedRamFileMapper.deleteBreedRamFileById(id); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/base/BreedRamFileMapper.xml b/zhyc-module/src/main/resources/mapper/base/BreedRamFileMapper.xml new file mode 100644 index 0000000..6f666ee --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/base/BreedRamFileMapper.xml @@ -0,0 +1,417 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, ordinary_ear_number, ranch_id, ranch_name, sheepfold_id, sheepfold_name, electronic_tags, variety_id, variety, sheep_category, current_status, birthday, dynamic_info, month_age, birth_weight, weaning_date, weaning_day_age, weaning_weight, weaning_daily_gain, post_weaning_daily_gain, current_weight, current_weight_date, activity_level, sexual_status, scrotum_circumference, sperm_collection_time, sperm_volume, sperm_vitality, sperm_density, sperm_quality, breeding_status, last_plan_time, current_plan_time, comment, protein_rate_ebv, milk_fat_rate_ebv, scs_ebv, growth_performance_ebv, resistance_ebv, reproduction_performance_ebv, body_type_ebv, comprehensive_breeding_value, father_number, mother_number, grandfather_number, grandmother_number, maternal_grandfather_number, maternal_grandmother_number, is_core_flock, is_breeding_use, pregnancy_check, total_mated_ewes, natural_pregnancy_check_ewes, natural_conception_rate, artificial_pregnancy_check_ewes, artificial_conception_rate, ram_mother_milk_volume, milk_production_ebv, accuracy, information_count, is_paternity_tested, create_by, create_time, update_by, update_time, is_delete from breed_ram_file + + + + + + + + + + + + + + + + + + + + insert into breed_ram_file + + ordinary_ear_number, + ranch_id, + ranch_name, + sheepfold_id, + sheepfold_name, + electronic_tags, + variety_id, + variety, + sheep_category, + current_status, + birthday, + dynamic_info, + month_age, + birth_weight, + weaning_date, + weaning_day_age, + weaning_weight, + weaning_daily_gain, + post_weaning_daily_gain, + current_weight, + current_weight_date, + activity_level, + sexual_status, + scrotum_circumference, + sperm_collection_time, + sperm_volume, + sperm_vitality, + sperm_density, + sperm_quality, + breeding_status, + last_plan_time, + current_plan_time, + comment, + protein_rate_ebv, + milk_fat_rate_ebv, + scs_ebv, + growth_performance_ebv, + resistance_ebv, + reproduction_performance_ebv, + body_type_ebv, + comprehensive_breeding_value, + father_number, + mother_number, + grandfather_number, + grandmother_number, + maternal_grandfather_number, + maternal_grandmother_number, + is_core_flock, + is_breeding_use, + pregnancy_check, + total_mated_ewes, + natural_pregnancy_check_ewes, + natural_conception_rate, + artificial_pregnancy_check_ewes, + artificial_conception_rate, + ram_mother_milk_volume, + milk_production_ebv, + accuracy, + information_count, + is_paternity_tested, + create_by, + create_time, + update_by, + update_time, + is_delete, + + + #{ordinaryEarNumber}, + #{ranchId}, + #{ranchName}, + #{sheepfoldId}, + #{sheepfoldName}, + #{electronicTags}, + #{varietyId}, + #{variety}, + #{sheepCategory}, + #{currentStatus}, + #{birthday}, + #{dynamicInfo}, + #{monthAge}, + #{birthWeight}, + #{weaningDate}, + #{weaningDayAge}, + #{weaningWeight}, + #{weaningDailyGain}, + #{postWeaningDailyGain}, + #{currentWeight}, + #{currentWeightDate}, + #{activityLevel}, + #{sexualStatus}, + #{scrotumCircumference}, + #{spermCollectionTime}, + #{spermVolume}, + #{spermVitality}, + #{spermDensity}, + #{spermQuality}, + #{breedingStatus}, + #{lastPlanTime}, + #{currentPlanTime}, + #{remark}, + #{proteinRateEbv}, + #{milkFatRateEbv}, + #{scsEbv}, + #{growthPerformanceEbv}, + #{resistanceEbv}, + #{reproductionPerformanceEbv}, + #{bodyTypeEbv}, + #{comprehensiveBreedingValue}, + #{fatherNumber}, + #{motherNumber}, + #{grandfatherNumber}, + #{grandmotherNumber}, + #{maternalGrandfatherNumber}, + #{maternalGrandmotherNumber}, + #{isCoreFlock}, + #{isBreedingUse}, + #{pregnancyCheck}, + #{totalMatedEwes}, + #{naturalPregnancyCheckEwes}, + #{naturalConceptionRate}, + #{artificialPregnancyCheckEwes}, + #{artificialConceptionRate}, + #{ramMotherMilkVolume}, + #{milkProductionEbv}, + #{accuracy}, + #{informationCount}, + #{isPaternityTested}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{isDelete}, + + + + + update breed_ram_file + + ordinary_ear_number = #{ordinaryEarNumber}, + ranch_id = #{ranchId}, + ranch_name = #{ranchName}, + sheepfold_id = #{sheepfoldId}, + sheepfold_name = #{sheepfoldName}, + electronic_tags = #{electronicTags}, + variety_id = #{varietyId}, + variety = #{variety}, + sheep_category = #{sheepCategory}, + current_status = #{currentStatus}, + birthday = #{birthday}, + dynamic_info = #{dynamicInfo}, + month_age = #{monthAge}, + birth_weight = #{birthWeight}, + weaning_date = #{weaningDate}, + weaning_day_age = #{weaningDayAge}, + weaning_weight = #{weaningWeight}, + weaning_daily_gain = #{weaningDailyGain}, + post_weaning_daily_gain = #{postWeaningDailyGain}, + current_weight = #{currentWeight}, + current_weight_date = #{currentWeightDate}, + activity_level = #{activityLevel}, + sexual_status = #{sexualStatus}, + scrotum_circumference = #{scrotumCircumference}, + sperm_collection_time = #{spermCollectionTime}, + sperm_volume = #{spermVolume}, + sperm_vitality = #{spermVitality}, + sperm_density = #{spermDensity}, + sperm_quality = #{spermQuality}, + breeding_status = #{breedingStatus}, + last_plan_time = #{lastPlanTime}, + current_plan_time = #{currentPlanTime}, + comment = #{remark}, + protein_rate_ebv = #{proteinRateEbv}, + milk_fat_rate_ebv = #{milkFatRateEbv}, + scs_ebv = #{scsEbv}, + growth_performance_ebv = #{growthPerformanceEbv}, + resistance_ebv = #{resistanceEbv}, + reproduction_performance_ebv = #{reproductionPerformanceEbv}, + body_type_ebv = #{bodyTypeEbv}, + comprehensive_breeding_value = #{comprehensiveBreedingValue}, + father_number = #{fatherNumber}, + mother_number = #{motherNumber}, + grandfather_number = #{grandfatherNumber}, + grandmother_number = #{grandmotherNumber}, + maternal_grandfather_number = #{maternalGrandfatherNumber}, + maternal_grandmother_number = #{maternalGrandmotherNumber}, + is_core_flock = #{isCoreFlock}, + is_breeding_use = #{isBreedingUse}, + pregnancy_check = #{pregnancyCheck}, + total_mated_ewes = #{totalMatedEwes}, + natural_pregnancy_check_ewes = #{naturalPregnancyCheckEwes}, + natural_conception_rate = #{naturalConceptionRate}, + artificial_pregnancy_check_ewes = #{artificialPregnancyCheckEwes}, + artificial_conception_rate = #{artificialConceptionRate}, + ram_mother_milk_volume = #{ramMotherMilkVolume}, + milk_production_ebv = #{milkProductionEbv}, + accuracy = #{accuracy}, + information_count = #{informationCount}, + is_paternity_tested = #{isPaternityTested}, + update_by = #{updateBy}, + update_time = #{updateTime}, + is_delete = #{isDelete}, + + where id = #{id} + + + + delete from breed_ram_file where id = #{id} + + + + delete from breed_ram_file where id in + + #{id} + + + + \ No newline at end of file