生物安全羊只多耳号模糊查询

This commit is contained in:
2026-01-13 22:53:54 +08:00
parent 5ac6b4b09d
commit f6c0d66484
18 changed files with 112 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ public class Deworm extends BaseEntity
/** 羊只id */
@Excel(name = "羊只耳号")
private String sheepNo;
private String[] sheepNos;
@Excel(name = "品种")
private String variety;
@Excel(name = "羊只类别")

View File

@@ -37,6 +37,7 @@ public class Diagnosis extends BaseEntity
/** 羊只id */
@Excel(name = "羊只耳号")
private String sheepNo;
private String[] sheepNos;
private Long sheepId;

View File

@@ -37,6 +37,8 @@ public class Health extends BaseEntity
/** 羊只id */
@Excel(name = "羊只耳号")
private String sheepNo;
private String[] sheepNos;
@Excel(name = "品种")
private String variety;
@Excel(name = "羊只类别")

View File

@@ -36,6 +36,8 @@ public class Immunity extends BaseEntity
/** 羊只id */
@Excel(name = "羊只耳号")
private String sheepNo;
private String[] sheepNos;
@Excel(name = "品种")
private String variety;

View File

@@ -36,6 +36,8 @@ public class QuarantineReport extends BaseEntity
@Excel(name = "羊只耳号")
private String sheepNo;
private String[] sheepNos;
@Excel(name = "羊只类别")
private String sheepType;
@Excel(name = "羊只性别")

View File

@@ -32,6 +32,7 @@ public class Treatment extends BaseEntity
/** 羊只耳号 */
@Excel(name = "羊只耳号")
private String sheepNo;
private String[] sheepNos;
private Long sheepId;
// 用于批量新增

View File

@@ -59,6 +59,15 @@ public class DewormServiceImpl implements IDewormService
@Override
public List<Deworm> selectDewormList(Deworm deworm)
{
String[] sheepNos = null;
if (deworm.getSheepNo() != null && !deworm.getSheepNo().isEmpty()) {
if (deworm.getSheepNo().contains(",")) {
sheepNos = deworm.getSheepNo().split(",");
} else {
sheepNos = new String[]{deworm.getSheepNo()};
}
}
deworm.setSheepNos(sheepNos);
return dewormMapper.selectDewormList(deworm);
}

View File

@@ -49,6 +49,7 @@ public class DiagnosisServiceImpl implements IDiagnosisService
@Override
public Diagnosis selectDiagnosisById(Long id)
{
return diagnosisMapper.selectDiagnosisById(id);
}
@@ -61,6 +62,15 @@ public class DiagnosisServiceImpl implements IDiagnosisService
@Override
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis)
{
String[] sheepNos = null;
if (diagnosis.getSheepNo() != null && !diagnosis.getSheepNo().isEmpty()) {
if (diagnosis.getSheepNo().contains(",")) {
sheepNos = diagnosis.getSheepNo().split(",");
} else {
sheepNos = new String[]{diagnosis.getSheepNo()};
}
}
diagnosis.setSheepNos(sheepNos);
return diagnosisMapper.selectDiagnosisList(diagnosis);
}

View File

@@ -64,6 +64,15 @@ public class HealthServiceImpl implements IHealthService
@Override
public List<Health> selectHealthList(Health health)
{
String[] sheepNos = null;
if (health.getSheepNo() != null && !health.getSheepNo().isEmpty()) {
if (health.getSheepNo().contains(",")) {
sheepNos = health.getSheepNo().split(",");
} else {
sheepNos = new String[]{health.getSheepNo()};
}
}
health.setSheepNos(sheepNos);
return healthMapper.selectHealthList(health);
}

View File

@@ -63,6 +63,15 @@ public class ImmunityServiceImpl implements IImmunityService
@Override
public List<Immunity> selectImmunityList(Immunity immunity)
{
String[] sheepNos = null;
if (immunity.getSheepNo() != null && !immunity.getSheepNo().isEmpty()) {
if (immunity.getSheepNo().contains(",")) {
sheepNos = immunity.getSheepNo().split(",");
} else {
sheepNos = new String[]{immunity.getSheepNo()};
}
}
immunity.setSheepNos(sheepNos);
return immunityMapper.selectImmunityList(immunity);
}

View File

@@ -48,6 +48,15 @@ public class QuarantineReportServiceImpl implements IQuarantineReportService
@Override
public List<QuarantineReport> selectQuarantineReportList(QuarantineReport quarantineReport)
{
String[] sheepNos = null;
if (quarantineReport.getSheepNo() != null && !quarantineReport.getSheepNo().isEmpty()) {
if (quarantineReport.getSheepNo().contains(",")) {
sheepNos = quarantineReport.getSheepNo().split(",");
} else {
sheepNos = new String[]{quarantineReport.getSheepNo()};
}
}
quarantineReport.setSheepNos(sheepNos);
return quarantineReportMapper.selectQuarantineReportList(quarantineReport);
}

View File

@@ -67,6 +67,15 @@ public class TreatmentServiceImpl implements ITreatmentService
@Override
public List<Treatment> selectTreatmentList(Treatment treatment)
{
String[] sheepNos = null;
if (treatment.getSheepNo() != null && !treatment.getSheepNo().isEmpty()) {
if (treatment.getSheepNo().contains(",")) {
sheepNos = treatment.getSheepNo().split(",");
} else {
sheepNos = new String[]{treatment.getSheepNo()};
}
}
treatment.setSheepNos(sheepNos);
return treatmentMapper.selectTreatmentList(treatment);
}

View File

@@ -36,6 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="sheepId != null">and sheep_id = #{sheepId}</if>
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
<if test="sheepNos != null and sheepNos.length > 0">
AND (
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
</foreach>
)
</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>

View File

@@ -45,6 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<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="sheepNos != null and sheepNos.length > 0">
AND (
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
</foreach>
)
</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>

View File

@@ -43,6 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="datetime != null "> and datetime = #{datetime}</if>
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
<if test="sheepNos != null and sheepNos.length > 0">
AND (
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
</foreach>
)
</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="technical != null and technical != ''"> and technical = #{technical}</if>
</where>

View File

@@ -41,6 +41,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="sheepType != null "> and sheep_type = #{sheepType}</if>
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
<if test="sheepNos != null and sheepNos.length > 0">
AND (
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
</foreach>
)
</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="technical != null and technical != ''"> and technical = #{technical}</if>
</where>

View File

@@ -45,7 +45,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectQuarantineReportVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="sheepNo != null and sheepNo != ''">and 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="sheepNos != null and sheepNos.length > 0">
AND (
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
</foreach>
)
</if>
<if test="quarItem != null "> and quar_item = #{quarItem}</if>
<if test="sampleType != null "> and sample_type = #{sampleType}</if>
<if test="sampler != null and sampler != ''"> and sampler like concat('%',#{sampler},'%') </if>

View File

@@ -55,6 +55,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
<if test="sheepNos != null and sheepNos.length > 0">
AND (
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
</foreach>
)
</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="diseaseId != null "> and disease_id = #{diseaseId}</if>
<if test="status != null and status !=''"> and status = #{status}</if>