Merge remote-tracking branch 'origin/main'

This commit is contained in:
zyk 2025-07-23 14:40:13 +08:00
commit f53375249f
46 changed files with 164 additions and 211 deletions

View File

@ -1,6 +1,7 @@
package com.zhyc.module.base.mapper;
import com.zhyc.module.base.domain.BasSheepGroup;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
* @author wyt
* @date 2025-07-14
*/
@Mapper
public interface BasSheepGroupMapper
{
/**

View File

@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.zhyc.module.base.domain.BasSheepGroupMapping;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 羊只分组关联Mapper接口
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
* @author wyt
* @date 2025-07-16
*/
@Mapper
public interface BasSheepGroupMappingMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.base.mapper;
import java.util.List;
import com.zhyc.module.base.domain.BasSheep;
import org.apache.ibatis.annotations.Mapper;
/**
* 羊只基本信息Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.base.domain.BasSheep;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface BasSheepMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.base.mapper;
import java.util.List;
import com.zhyc.module.base.domain.BasSheepVariety;
import org.apache.ibatis.annotations.Mapper;
/**
* 羊只品种Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.base.domain.BasSheepVariety;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface BasSheepVarietyMapper
{
/**

View File

@ -1,6 +1,7 @@
package com.zhyc.module.base.mapper;
import com.zhyc.module.base.domain.DaSheepfold;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
* @author wyt
* @date 2025-07-11
*/
@Mapper
public interface DaSheepfoldMapper
{
/**

View File

@ -1,6 +1,7 @@
package com.zhyc.module.base.mapper;
import com.zhyc.module.base.domain.SheepFile;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
* @author wyt
* @date 2025-07-13
*/
@Mapper
public interface SheepFileMapper
{
/**

View File

@ -96,7 +96,7 @@ public class DiagnosisController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:remove')")
@Log(title = "诊疗结果", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(diagnosisService.deleteDiagnosisByIds(ids));

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
@ -13,6 +14,7 @@ import com.zhyc.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-07-15
*/
@Data
public class Diagnosis extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -21,11 +23,13 @@ public class Diagnosis extends BaseEntity
private Long id;
/** 治疗记录id */
@Excel(name = "治疗记录id")
@Excel(name = "治疗记录")
private Long treatId;
/** 羊只id */
@Excel(name = "羊只id")
@Excel(name = "羊只耳号")
private String sheepNo;
private Long sheepId;
/** 时间日期 */
@ -41,21 +45,30 @@ public class Diagnosis extends BaseEntity
@Excel(name = "性别")
private String gender;
/** 性别 */
@Excel(name = "月龄")
private Long monthAge;
/** 胎次 */
@Excel(name = "胎次")
private String parity;
/** 疾病类型 */
@Excel(name = "疾病类型")
private String diseasePName;
private Long diseasePid;
/** 子疾病 */
@Excel(name = "子疾病")
private String diseaseName;
private Long diseaseId;
/** 诊疗结果 */
@Excel(name = "诊疗结果")
private Long result;
private String result;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@ -72,168 +85,9 @@ public class Diagnosis extends BaseEntity
private Long treatDay;
/** 羊舍id */
@Excel(name = "羊舍id")
@Excel(name = "羊舍")
private String sheepfold;
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();
}
}

View File

@ -18,7 +18,7 @@ public class SwUnit extends BaseEntity
private static final long serialVersionUID = 1L;
/** 编号 */
private Long id;
private String id;
/** 单位 */
@Excel(name = "单位")

View File

@ -18,20 +18,11 @@ public class SwUsage extends BaseEntity
private static final long serialVersionUID = 1L;
/** 编号 */
private Long id;
private String id;
/** 使用方法 */
@Excel(name = "使用方法")
private String name;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
}

View File

@ -81,6 +81,8 @@ public class Treatment extends BaseEntity
/** 父疾病 */
@Excel(name = "父疾病")
private String diseasePName;
private Long diseasePid;
/** 兽医 */

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Deworm;
import org.apache.ibatis.annotations.Mapper;
/**
* 驱虫Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.Deworm;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface DewormMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Diagnosis;
import org.apache.ibatis.annotations.Mapper;
/**
* 诊疗结果Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.Diagnosis;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface DiagnosisMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Disinfect;
import org.apache.ibatis.annotations.Mapper;
/**
* 消毒记录Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.Disinfect;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface DisinfectMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Health;
import org.apache.ibatis.annotations.Mapper;
/**
* 保健Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.Health;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface HealthMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Immunity;
import org.apache.ibatis.annotations.Mapper;
/**
* 免疫Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.Immunity;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface ImmunityMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.QuarantineItems;
import org.apache.ibatis.annotations.Mapper;
/**
* 检疫项目Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.QuarantineItems;
* @author ruoyi
* @date 2025-07-14
*/
@Mapper
public interface QuarantineItemsMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.QuarantineReport;
import org.apache.ibatis.annotations.Mapper;
/**
* 检疫记录Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.QuarantineReport;
* @author ruoyi
* @date 2025-07-14
*/
@Mapper
public interface QuarantineReportMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.QuarantineSample;
import org.apache.ibatis.annotations.Mapper;
/**
* 样品类型Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.QuarantineSample;
* @author ruoyi
* @date 2025-07-14
*/
@Mapper
public interface QuarantineSampleMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.SwDisease;
import org.apache.ibatis.annotations.Mapper;
/**
* 疾病Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.SwDisease;
* @author ruoyi
* @date 2025-07-09
*/
@Mapper
public interface SwDiseaseMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.SwMedicType;
import org.apache.ibatis.annotations.Mapper;
/**
* 药品类型Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.SwMedicType;
* @author ruoyi
* @date 2025-07-11
*/
@Mapper
public interface SwMedicTypeMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.SwMedicine;
import org.apache.ibatis.annotations.Mapper;
/**
* 药品Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.SwMedicine;
* @author ruoyi
* @date 2025-07-11
*/
@Mapper
public interface SwMedicineMapper
{
/**

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
import org.apache.ibatis.annotations.Mapper;
/**
* 药品使用记录Mapper接口
@ -11,6 +12,7 @@ import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
* @author ruoyi
* @date 2025-07-12
*/
@Mapper
public interface SwMedicineUsageMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.SwPrescription;
import com.zhyc.module.biosafety.domain.SwPresDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* 处方Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.SwPresDetail;
* @author ruoyi
* @date 2025-07-11
*/
@Mapper
public interface SwPrescriptionMapper
{
/**

View File

@ -1,6 +1,7 @@
package com.zhyc.module.biosafety.mapper;
import com.zhyc.module.biosafety.domain.SwUnit;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
* @author ruoyi
* @date 2025-07-11
*/
@Mapper
public interface SwUnitMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.SwUsage;
import org.apache.ibatis.annotations.Mapper;
/**
* 药品使用方法Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.biosafety.domain.SwUsage;
* @author ruoyi
* @date 2025-07-11
*/
@Mapper
public interface SwUsageMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Treatment;
import org.apache.ibatis.annotations.Mapper;
/**
* 治疗记录Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.biosafety.domain.Treatment;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface TreatmentMapper
{
/**

View File

@ -1,12 +1,19 @@
package com.zhyc.module.biosafety.service.impl;
import java.util.List;
import java.util.Objects;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.module.base.domain.BasSheep;
import com.zhyc.module.base.domain.SheepFile;
import com.zhyc.module.base.mapper.BasSheepMapper;
import com.zhyc.module.base.mapper.SheepFileMapper;
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;
import org.springframework.transaction.annotation.Transactional;
/**
* 诊疗结果Service业务层处理
@ -19,6 +26,10 @@ public class DiagnosisServiceImpl implements IDiagnosisService
{
@Autowired
private DiagnosisMapper diagnosisMapper;
@Autowired
private SheepFileMapper sheepFileMapper;
@Autowired
private BasSheepMapper sheepMapper;
/**
* 查询诊疗结果
@ -51,9 +62,22 @@ public class DiagnosisServiceImpl implements IDiagnosisService
* @return 结果
*/
@Override
@Transactional
public int insertDiagnosis(Diagnosis diagnosis)
{
SheepFile sheepFile = sheepFileMapper.selectSheepFileById(diagnosis.getSheepId());
diagnosis.setSheepType(sheepFile.getName());
diagnosis.setParity(String.valueOf(sheepFile.getParity()));
diagnosis.setGender(String.valueOf(sheepFile.getGender()));
diagnosis.setMonthAge(sheepFile.getMonthAge());
diagnosis.setCreateTime(DateUtils.getNowDate());
if (!Objects.equals(sheepFile.getSheepfoldId(), diagnosis.getSheepfoldId())){
BasSheep basSheep = new BasSheep();
basSheep.setId(diagnosis.getSheepId());
basSheep.setSheepfoldId(diagnosis.getSheepfoldId());
sheepMapper.updateBasSheep(basSheep);
}
// 转入其他羊舍
return diagnosisMapper.insertDiagnosis(diagnosis);
}
@ -64,8 +88,13 @@ public class DiagnosisServiceImpl implements IDiagnosisService
* @return 结果
*/
@Override
@Transactional
public int updateDiagnosis(Diagnosis diagnosis)
{
BasSheep basSheep = new BasSheep();
basSheep.setId(diagnosis.getSheepId());
basSheep.setSheepfoldId(diagnosis.getSheepfoldId());
sheepMapper.updateBasSheep(basSheep);
return diagnosisMapper.updateDiagnosis(diagnosis);
}

View File

@ -2,6 +2,7 @@ package com.zhyc.module.dairyProducts.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.domain.NpFreshMilkInsp;
import org.apache.ibatis.annotations.Mapper;
/**
* 鲜奶生产成品检验记录Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.dairyProducts.domain.NpFreshMilkInsp;
* @author ruoyi
* @date 2025-07-18
*/
@Mapper
public interface NpFreshMilkInspMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.dairyProducts.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.domain.NpRawMilkInspe;
import org.apache.ibatis.annotations.Mapper;
/**
* 生乳检验记录Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.dairyProducts.domain.NpRawMilkInspe;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface NpRawMilkInspeMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.dairyProducts.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.domain.NpYogurtInsp;
import org.apache.ibatis.annotations.Mapper;
/**
* 酸奶生产成品检疫记录Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.dairyProducts.domain.NpYogurtInsp;
* @author ruoyi
* @date 2025-07-17
*/
@Mapper
public interface NpYogurtInspMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.dairyProducts.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.domain.XzDryMatterCorrection;
import org.apache.ibatis.annotations.Mapper;
/**
* 干物质校正Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.dairyProducts.domain.XzDryMatterCorrection;
* @author ruoyi
* @date 2025-07-12
*/
@Mapper
public interface XzDryMatterCorrectionMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.dairyProducts.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.domain.XzParityCorrection;
import org.apache.ibatis.annotations.Mapper;
/**
* 胎次校正Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.dairyProducts.domain.XzParityCorrection;
* @author ruoyi
* @date 2025-07-14
*/
@Mapper
public interface XzParityCorrectionMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.dairyProducts.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.domain.XzWegihCorrection;
import org.apache.ibatis.annotations.Mapper;
/**
* 称重校正Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.dairyProducts.domain.XzWegihCorrection;
* @author ruoyi
* @date 2025-07-12
*/
@Mapper
public interface XzWegihCorrectionMapper
{
/**

View File

@ -2,6 +2,8 @@ package com.zhyc.module.produce.breed.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.zhyc.module.produce.breed.domain.ScBreedPlanGenerate;
import com.zhyc.module.produce.breed.domain.ScBreedPlan;
@ -12,6 +14,7 @@ import com.zhyc.module.produce.breed.domain.ScBreedPlan;
* @author ruoyi
* @date 2025-07-16
*/
@Mapper
public interface ScBreedPlanGenerateMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.produce.breed.mapper;
import java.util.List;
import com.zhyc.module.produce.breed.domain.ScBreedPlan;
import org.apache.ibatis.annotations.Mapper;
/**
* 配种计划Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.produce.breed.domain.ScBreedPlan;
* @author ruoyi
* @date 2025-07-16
*/
@Mapper
public interface ScBreedPlanMapper
{
/**

View File

@ -2,6 +2,7 @@ package com.zhyc.module.produce.breed.mapper;
import java.util.List;
import com.zhyc.module.produce.breed.domain.ScDryMilk;
import org.apache.ibatis.annotations.Mapper;
/**
* 干奶记录Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.produce.breed.domain.ScDryMilk;
* @author ruoyi
* @date 2025-07-15
*/
@Mapper
public interface ScDryMilkMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.produce.breed.mapper;
import java.util.List;
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
import com.zhyc.module.produce.breed.domain.ScLambDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* 产羔记录Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.produce.breed.domain.ScLambDetail;
* @author ruoyi
* @date 2025-07-11
*/
@Mapper
public interface ScLambingRecordMapper
{
/**

View File

@ -1,20 +1,22 @@
package com.zhyc.module.produce.breed.mapper;
import java.util.List;
import java.util.Map;
import com.zhyc.module.produce.breed.domain.ScPregnancyRecord;
import org.apache.ibatis.annotations.Mapper;
/**
* 孕检记录Mapper接口
*
* @author zhyc
* @date 2025-01-21
*
* @author ruoyi
* @date 2025-07-17
*/
public interface ScPregnancyRecordMapper
@Mapper
public interface ScPregnancyRecordMapper
{
/**
* 查询孕检记录
*
*
* @param id 孕检记录主键
* @return 孕检记录
*/
@ -22,7 +24,7 @@ public interface ScPregnancyRecordMapper
/**
* 查询孕检记录列表
*
*
* @param scPregnancyRecord 孕检记录
* @return 孕检记录集合
*/
@ -30,7 +32,7 @@ public interface ScPregnancyRecordMapper
/**
* 新增孕检记录
*
*
* @param scPregnancyRecord 孕检记录
* @return 结果
*/
@ -38,7 +40,7 @@ public interface ScPregnancyRecordMapper
/**
* 修改孕检记录
*
*
* @param scPregnancyRecord 孕检记录
* @return 结果
*/
@ -46,7 +48,7 @@ public interface ScPregnancyRecordMapper
/**
* 删除孕检记录
*
*
* @param id 孕检记录主键
* @return 结果
*/
@ -54,25 +56,9 @@ public interface ScPregnancyRecordMapper
/**
* 批量删除孕检记录
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteScPregnancyRecordByIds(Long[] ids);
/**
* 根据耳号查询羊只信息
*
* @param manageTags 耳号
* @return 羊只信息
*/
public Map<String, Object> selectSheepByManageTags(String manageTags);
/**
* 更新羊只基础表中的孕检相关字段
*
* @param params 更新参数
* @return 结果
*/
public int updateSheepPregnancyInfo(Map<String, Object> params);
}
}

View File

@ -2,6 +2,7 @@ package com.zhyc.module.produce.breed.mapper;
import java.util.List;
import com.zhyc.module.produce.breed.domain.ScWeanRecord;
import org.apache.ibatis.annotations.Mapper;
/**
* 断奶记录Mapper接口
@ -9,6 +10,7 @@ import com.zhyc.module.produce.breed.domain.ScWeanRecord;
* @author zhyc
* @date 2024-01-01
*/
@Mapper
public interface ScWeanRecordMapper {
/**
* 查询断奶记录

View File

@ -3,6 +3,7 @@ package com.zhyc.module.produce.manage_sheep.mapper;
import java.util.List;
import com.zhyc.module.produce.manage_sheep.domain.ScTransGroup;
import org.apache.ibatis.annotations.Mapper;
/**
* 转群记录Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.produce.manage_sheep.domain.ScTransGroup;
* @author ruoyi
* @date 2025-07-10
*/
@Mapper
public interface ScTransGroupMapper {
/**
* 查询转群记录

View File

@ -3,6 +3,7 @@ package com.zhyc.module.produce.manage_sheep.mapper;
import java.util.List;
import com.zhyc.module.produce.manage_sheep.domain.ScTransitionInfo;
import org.apache.ibatis.annotations.Mapper;
/**
* 转场Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.produce.manage_sheep.domain.ScTransitionInfo;
* @author ruoyi
* @date 2025-07-10
*/
@Mapper
public interface ScTransitionInfoMapper
{
/**

View File

@ -3,6 +3,7 @@ package com.zhyc.module.produce.other.mapper;
import java.util.List;
import com.zhyc.module.produce.other.domain.ScCastrate;
import org.apache.ibatis.annotations.Mapper;
/**
* 去势Mapper接口
@ -10,6 +11,7 @@ import com.zhyc.module.produce.other.domain.ScCastrate;
* @author ruoyi
* @date 2025-07-09
*/
@Mapper
public interface ScCastrateMapper
{
/**

View File

@ -3,7 +3,7 @@ package com.zhyc.module.produce.other.mapper;
import java.util.List;
import com.zhyc.module.produce.other.domain.ScFixHoof;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
/**
* 修蹄Mapper接口
@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Param;
* @author ruoyi
* @date 2025-07-10
*/
@Mapper
public interface ScFixHoofMapper {
/**
* 查询修蹄

View File

@ -8,10 +8,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="treatId" column="treat_id" />
<result property="sheepId" column="sheep_id" />
<result property="sheepNo" column="sheep_no"/>
<result property="datetime" column="datetime" />
<result property="sheepType" column="sheep_type" />
<result property="gender" column="gender" />
<result property="monthAge" column="month_age"/>
<result property="parity" column="parity" />
<result property="diseasePName" column="disease_pname"/>
<result property="diseaseName" column="disease_name"/>
<result property="diseasePid" column="disease_pid" />
<result property="diseaseId" column="disease_id" />
<result property="result" column="result" />
@ -19,30 +23,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="enddate" column="enddate" />
<result property="treatDay" column="treat_day" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="sheepfold" column="sheepfold_name"/>
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDiagnosisVo">
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
select sd.id, treat_id, sheep_id, sd.datetime, sheep_type, sd.gender,sd.month_age,sd.parity, disease_pid, disease_id,
result, begindate, enddate, treat_day, sd.sheepfold_id, sd.create_by, sd.create_time,
sf.bs_manage_tags sheep_no,sf.sheepfold_name ,
s2.name disease_pname,s1.name disease_name
from sw_diagnosis sd
left join sheep_file sf on sf.id = sd.sheep_id
left join sw_disease s1 on sd.disease_id = s1.id
left join sw_disease s2 on sd.disease_pid = s2.id
</sql>
<select id="selectDiagnosisList" parameterType="Diagnosis" resultMap="DiagnosisResult">
<include refid="selectDiagnosisVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="sheepId != null "> and sd.sheep_id = #{sheepId}</if>
<if test="sheepNo != null"> and sf.bs_manage_tags like concat('%', #{sheepNo}, '%')</if>
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
<if test="diseasePid != null "> and disease_pid = #{diseasePid}</if>
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
<if test="result != null "> and result = #{result}</if>
<if test="treatDay != null "> and treat_day = #{treatDay}</if>
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
<if test="sheepfoldId != null "> and sd.sheepfold_id = #{sheepfoldId}</if>
</where>
</select>
<select id="selectDiagnosisById" parameterType="Long" resultMap="DiagnosisResult">
<include refid="selectDiagnosisVo"/>
where id = #{id}
where sd.id = #{id}
</select>
<insert id="insertDiagnosis" parameterType="Diagnosis" useGeneratedKeys="true" keyProperty="id">

View File

@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="diseaseId" column="disease_id" />
<result property="diseaseName" column="disease_name"/>
<result property="diseasePid" column="disease_pid" />
<result property="diseasePName" column="disease_pname"/>
<result property="veterinary" column="veterinary" />
<result property="usageId" column="usage_id" />
<result property="comment" column="comment" />
@ -33,10 +34,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectTreatmentVo">
select t.id, diag_id, sheep_id, variety, sheep_type, month_age, t.gender, t.parity, breed, lact_day, gest_day, datetime, disease_id, disease_pid, veterinary, usage_id, t.comment, t.update_by, t.update_time, t.create_by, t.create_time,
bs.manage_tags,
sd.name disease_name
sd.name disease_name,
sd2.name disease_pname
from sw_treatment t
left join bas_sheep bs on t.sheep_id = bs.id
left join sw_disease sd on t.disease_id = sd.id
left join sw_disease sd2 on t.disease_pid = sd2.id
</sql>
<select id="selectTreatmentList" parameterType="Treatment" resultMap="TreatmentResult">