修改
This commit is contained in:
@@ -38,6 +38,7 @@ public class SwMedicineUsage extends BaseEntity
|
||||
/** 耳号 */
|
||||
@Excel(name = "耳号",width = 20, needMerge = true)
|
||||
private String sheepNo;
|
||||
private String[] sheepNos;
|
||||
private Integer sheepId;
|
||||
/** 使用时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@@ -46,6 +46,14 @@ public class SwMedicineUsageServiceImpl implements ISwMedicineUsageService
|
||||
@Override
|
||||
public List<SwMedicineUsage> selectSwMedicineUsageList(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
String[] sheepNos = null;
|
||||
if (swMedicineUsage.getSheepNo() != null && !swMedicineUsage.getSheepNo().isEmpty()) {
|
||||
if (swMedicineUsage.getSheepNo().contains(" ")) {
|
||||
sheepNos = swMedicineUsage.getSheepNo().split(" ");
|
||||
swMedicineUsage.setSheepNos(sheepNos);
|
||||
swMedicineUsage.setSheepNo(null);
|
||||
}
|
||||
}
|
||||
return swMedicineUsageMapper.selectSwMedicineUsageList(swMedicineUsage);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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>
|
||||
|
||||
<!-- 4. 使用时间区间 -->
|
||||
<if test="params.beginUseTime != null and params.endUseTime != null">
|
||||
|
||||
Reference in New Issue
Block a user