转群,体尺测量,体况评分,乳况评分,修蹄,去势部分模糊查询+多耳号输入,排序优化

This commit is contained in:
zyh
2026-01-16 12:34:24 +08:00
parent 1b24e93ae9
commit 21cfba87ea
48 changed files with 310 additions and 176 deletions

View File

@@ -5,14 +5,7 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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.annotation.Log;
import com.zhyc.common.core.controller.BaseController; import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult; import com.zhyc.common.core.domain.AjaxResult;
@@ -103,4 +96,9 @@ public class ScBodyMeasureController extends BaseController
{ {
return toAjax(scBodyMeasureService.deleteScBodyMeasureByIds(ids)); return toAjax(scBodyMeasureService.deleteScBodyMeasureByIds(ids));
} }
@GetMapping("/search_ear_numbers")
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
return success(scBodyMeasureService.searchEarNumbers(query.trim()));
}
} }

View File

@@ -4,14 +4,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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.annotation.Log;
import com.zhyc.common.core.controller.BaseController; import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult; import com.zhyc.common.core.domain.AjaxResult;
@@ -101,4 +94,9 @@ public class ScBodyScoreController extends BaseController
{ {
return toAjax(scBodyScoreService.deleteScBodyScoreByIds(ids)); return toAjax(scBodyScoreService.deleteScBodyScoreByIds(ids));
} }
@GetMapping("/search_ear_numbers")
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
return success(scBodyScoreService.searchEarNumbers(query.trim()));
}
} }

View File

@@ -4,14 +4,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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.annotation.Log;
import com.zhyc.common.core.controller.BaseController; import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult; import com.zhyc.common.core.domain.AjaxResult;
@@ -101,4 +94,9 @@ public class ScBreastRatingController extends BaseController
{ {
return toAjax(scBreastRatingService.deleteScBreastRatingByIds(ids)); return toAjax(scBreastRatingService.deleteScBreastRatingByIds(ids));
} }
@GetMapping("/search_ear_numbers")
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
return success(scBreastRatingService.searchEarNumbers(query.trim()));
}
} }

View File

@@ -8,6 +8,7 @@ import com.zhyc.common.core.domain.BaseEntity;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List;
/** /**
* 体尺测量对象 sc_body_measure * 体尺测量对象 sc_body_measure
@@ -184,13 +185,7 @@ public class ScBodyMeasure extends BaseEntity {
@Excel(name = "技术员") @Excel(name = "技术员")
private String technician; private String technician;
/**
* 排序字段
*/
private String orderBy;
/** /** 前端多耳号查询条件,非表字段 */
* 排序方向 private List<String> manageTagsList;
*/
private String sortDirection;
} }

View File

@@ -1,6 +1,7 @@
package com.zhyc.module.produce.bodyManage.domain; package com.zhyc.module.produce.bodyManage.domain;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -77,13 +78,6 @@ public class ScBodyScore extends BaseEntity {
@Excel(name = "技术员") @Excel(name = "技术员")
private String technician; private String technician;
/** /** 前端多耳号查询条件,非表字段 */
* 排序字段 private List<String> manageTagsList;
*/
private String orderBy;
/**
* 排序方向
*/
private String sortDirection;
} }

View File

@@ -8,6 +8,7 @@ import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity; import com.zhyc.common.core.domain.BaseEntity;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List;
/** /**
* 乳房评分对象 sc_breast_rating * 乳房评分对象 sc_breast_rating
@@ -110,13 +111,7 @@ public class ScBreastRating extends BaseEntity {
@Excel(name = "技术员") @Excel(name = "技术员")
private String technician; private String technician;
/**
* 排序字段
*/
private String orderBy;
/** /** 前端多耳号查询条件,非表字段 */
* 排序方向 private List<String> manageTagsList;
*/
private String sortDirection;
} }

View File

@@ -2,6 +2,7 @@ package com.zhyc.module.produce.bodyManage.mapper;
import java.util.List; import java.util.List;
import com.zhyc.module.produce.bodyManage.domain.ScBodyMeasure; import com.zhyc.module.produce.bodyManage.domain.ScBodyMeasure;
import org.apache.ibatis.annotations.Param;
/** /**
* 体尺测量Mapper接口 * 体尺测量Mapper接口
@@ -58,4 +59,14 @@ public interface ScBodyMeasureMapper
* @return 结果 * @return 结果
*/ */
public int deleteScBodyMeasureByIds(Long[] ids); public int deleteScBodyMeasureByIds(Long[] ids);
/**
* 模糊搜索耳号
*/
List<String> searchEarNumbers(@Param("query") String query);
/* 列表查询支持多耳号模糊 */
List<ScBodyMeasure> selectScBodyMeasureList(
@Param("sc") ScBodyMeasure sc,
@Param("manageTagsList") List<String> manageTagsList);
} }

View File

@@ -2,6 +2,7 @@ package com.zhyc.module.produce.bodyManage.mapper;
import java.util.List; import java.util.List;
import com.zhyc.module.produce.bodyManage.domain.ScBodyScore; import com.zhyc.module.produce.bodyManage.domain.ScBodyScore;
import org.apache.ibatis.annotations.Param;
/** /**
* 体况评分Mapper接口 * 体况评分Mapper接口
@@ -58,4 +59,13 @@ public interface ScBodyScoreMapper
* @return 结果 * @return 结果
*/ */
public int deleteScBodyScoreByIds(Long[] ids); public int deleteScBodyScoreByIds(Long[] ids);
/**
* 模糊搜索耳号
*/
List<String> searchEarNumbers(@Param("query") String query);
/* 列表查询支持多耳号模糊 */
List<ScBodyScore> selectScBodyScoreList(
@Param("sc") ScBodyScore sc,
@Param("manageTagsList") List<String> manageTagsList);
} }

View File

@@ -2,6 +2,7 @@ package com.zhyc.module.produce.bodyManage.mapper;
import java.util.List; import java.util.List;
import com.zhyc.module.produce.bodyManage.domain.ScBreastRating; import com.zhyc.module.produce.bodyManage.domain.ScBreastRating;
import org.apache.ibatis.annotations.Param;
/** /**
* 乳房评分Mapper接口 * 乳房评分Mapper接口
@@ -58,4 +59,14 @@ public interface ScBreastRatingMapper
* @return 结果 * @return 结果
*/ */
public int deleteScBreastRatingByIds(Long[] ids); public int deleteScBreastRatingByIds(Long[] ids);
/**
* 模糊搜索耳号
*/
List<String> searchEarNumbers(@Param("query") String query);
/* 列表查询支持多耳号模糊 */
List<ScBreastRating> selectScBreastRatingList(
@Param("sc") ScBreastRating sc,
@Param("manageTagsList") List<String> manageTagsList);
} }

View File

@@ -58,4 +58,6 @@ public interface IScBodyMeasureService
* @return 结果 * @return 结果
*/ */
public int deleteScBodyMeasureById(Long id); public int deleteScBodyMeasureById(Long id);
List<String> searchEarNumbers(String query);
} }

View File

@@ -58,4 +58,6 @@ public interface IScBodyScoreService
* @return 结果 * @return 结果
*/ */
public int deleteScBodyScoreById(Long id); public int deleteScBodyScoreById(Long id);
List<String> searchEarNumbers(String query);
} }

View File

@@ -58,4 +58,6 @@ public interface IScBreastRatingService
* @return 结果 * @return 结果
*/ */
public int deleteScBreastRatingById(Long id); public int deleteScBreastRatingById(Long id);
List<String> searchEarNumbers(String query);
} }

View File

@@ -44,9 +44,14 @@ public class ScBodyMeasureServiceImpl implements IScBodyMeasureService
* @return 体尺测量 * @return 体尺测量
*/ */
@Override @Override
public List<ScBodyMeasure> selectScBodyMeasureList(ScBodyMeasure scBodyMeasure) public List<ScBodyMeasure> selectScBodyMeasureList(ScBodyMeasure scBodyMeasure) {
{ return scBodyMeasureMapper.selectScBodyMeasureList(scBodyMeasure,
return scBodyMeasureMapper.selectScBodyMeasureList(scBodyMeasure); scBodyMeasure.getManageTagsList());
}
@Override
public List<String> searchEarNumbers(String query) {
return scBodyMeasureMapper.searchEarNumbers(query.trim());
} }
/** /**

View File

@@ -49,7 +49,13 @@ public class ScBodyScoreServiceImpl implements IScBodyScoreService {
*/ */
@Override @Override
public List<ScBodyScore> selectScBodyScoreList(ScBodyScore scBodyScore) { public List<ScBodyScore> selectScBodyScoreList(ScBodyScore scBodyScore) {
return scBodyScoreMapper.selectScBodyScoreList(scBodyScore); return scBodyScoreMapper.selectScBodyScoreList(scBodyScore,
scBodyScore.getManageTagsList());
}
@Override
public List<String> searchEarNumbers(String query) {
return scBodyScoreMapper.searchEarNumbers(query.trim());
} }
/** /**

View File

@@ -52,7 +52,13 @@ public class ScBreastRatingServiceImpl implements IScBreastRatingService {
*/ */
@Override @Override
public List<ScBreastRating> selectScBreastRatingList(ScBreastRating scBreastRating) { public List<ScBreastRating> selectScBreastRatingList(ScBreastRating scBreastRating) {
return scBreastRatingMapper.selectScBreastRatingList(scBreastRating); return scBreastRatingMapper.selectScBreastRatingList(scBreastRating,
scBreastRating.getManageTagsList());
}
@Override
public List<String> searchEarNumbers(String query) {
return scBreastRatingMapper.searchEarNumbers(query.trim());
} }
/** /**

View File

@@ -8,14 +8,7 @@ import com.zhyc.module.produce.manage_sheep.domain.ScTransGroup;
import com.zhyc.module.produce.manage_sheep.service.IScTransGroupService; import com.zhyc.module.produce.manage_sheep.service.IScTransGroupService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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.annotation.Log;
import com.zhyc.common.core.controller.BaseController; import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult; import com.zhyc.common.core.domain.AjaxResult;
@@ -97,12 +90,8 @@ public class ScTransGroupController extends BaseController {
return toAjax(scTransGroupService.deleteScTransGroupByIds(ids)); return toAjax(scTransGroupService.deleteScTransGroupByIds(ids));
} }
@GetMapping("/search_ear_numbers")
/** public AjaxResult searchEarNumbers(@RequestParam("query") String query){
* 审批转群记录 return success(scTransGroupService.searchEarNumbers(query.trim()));
*/ }
// @PutMapping("/approve")
// public AjaxResult approve(@RequestBody ScTransGroup scTransGroup) {
// return toAjax(scTransGroupService.approveScTransGroup(scTransGroup));
// }
} }

View File

@@ -6,6 +6,8 @@ import lombok.NoArgsConstructor;
import com.zhyc.common.annotation.Excel; import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity; import com.zhyc.common.core.domain.BaseEntity;
import java.util.List;
/** /**
* 转群记录对象 sc_trans_group * 转群记录对象 sc_trans_group
* *
@@ -112,5 +114,6 @@ public class ScTransGroup extends BaseEntity {
@Excel(name = "备注") @Excel(name = "备注")
private String comment; private String comment;
/** 前端多耳号查询条件,非表字段 */
private List<String> manageTagsList;
} }

View File

@@ -65,7 +65,7 @@ public interface ScChangeCommentMapper
@Param("manageTagsList") List<String> manageTagsList); @Param("manageTagsList") List<String> manageTagsList);
/** /**
* 远程下拉:模糊搜索耳号 * 模糊搜索耳号
*/ */
List<String> searchEarNumbers(@Param("query") String query); List<String> searchEarNumbers(@Param("query") String query);
} }

View File

@@ -61,7 +61,7 @@ public interface ScChangeEarMapper
public int deleteScChangeEarByIds(Integer[] ids); public int deleteScChangeEarByIds(Integer[] ids);
/** /**
* 远程下拉:模糊搜索耳号 * 模糊搜索耳号
*/ */
List<String> searchEarNumbers(@Param("query") String query); List<String> searchEarNumbers(@Param("query") String query);

View File

@@ -61,7 +61,7 @@ public interface ScChangeVarietyMapper
public int deleteScChangeVarietyByIds(Integer[] ids); public int deleteScChangeVarietyByIds(Integer[] ids);
/** /**
* 远程下拉:模糊搜索耳号 * 模糊搜索耳号
*/ */
List<String> searchEarNumbers(@Param("query") String query); List<String> searchEarNumbers(@Param("query") String query);

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.zhyc.module.produce.manage_sheep.domain.ScTransGroup; import com.zhyc.module.produce.manage_sheep.domain.ScTransGroup;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 转群记录Mapper接口 * 转群记录Mapper接口
@@ -60,4 +61,14 @@ public interface ScTransGroupMapper {
* @return 结果 * @return 结果
*/ */
public int deleteScTransGroupByIds(Integer[] ids); public int deleteScTransGroupByIds(Integer[] ids);
/**
* 模糊搜索耳号
*/
List<String> searchEarNumbers(@Param("query") String query);
/* 列表查询支持多耳号模糊 */
List<ScTransGroup> selectScTransGroupList(
@Param("sc") ScTransGroup sc,
@Param("manageTagsList") List<String> manageTagsList);
} }

View File

@@ -65,7 +65,7 @@ public interface ScTransitionInfoMapper
int insertScTransitionInfoBatch(@Param("list") List<ScTransitionInfo> transitionInfoList); int insertScTransitionInfoBatch(@Param("list") List<ScTransitionInfo> transitionInfoList);
/** /**
* 远程下拉:模糊搜索耳号 * 模糊搜索耳号
*/ */
List<String> searchEarNumbers(@Param("query") String query); List<String> searchEarNumbers(@Param("query") String query);

View File

@@ -64,4 +64,6 @@ public interface IScTransGroupService {
* 审批转群记录 * 审批转群记录
*/ */
int approveScTransGroup(ScTransGroup scTransGroup); int approveScTransGroup(ScTransGroup scTransGroup);
List<String> searchEarNumbers(String query);
} }

View File

@@ -7,14 +7,7 @@ import com.zhyc.module.produce.other.domain.ScCastrate;
import com.zhyc.module.produce.other.service.IScCastrateService; import com.zhyc.module.produce.other.service.IScCastrateService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
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.annotation.Log;
import com.zhyc.common.core.controller.BaseController; import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult; import com.zhyc.common.core.domain.AjaxResult;
@@ -102,4 +95,9 @@ public class ScCastrateController extends BaseController
{ {
return toAjax(scCastrateService.deleteScCastrateByIds(ids)); return toAjax(scCastrateService.deleteScCastrateByIds(ids));
} }
@GetMapping("/search_ear_numbers")
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
return success(scCastrateService.searchEarNumbers(query.trim()));
}
} }

View File

@@ -107,7 +107,10 @@ public class ScFixHoofController extends BaseController
return toAjax(scFixHoofService.deleteScFixHoofByIds(ids)); return toAjax(scFixHoofService.deleteScFixHoofByIds(ids));
} }
@GetMapping("/search_ear_numbers")
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
return success(scFixHoofService.searchEarNumbers(query.trim()));
}
} }

View File

@@ -1,4 +1,4 @@
package com.zhyc.module.produce.manage_sheep.service.impl; package com.zhyc.module.produce.other.controller.impl;
import com.zhyc.common.exception.ServiceException; import com.zhyc.common.exception.ServiceException;
import com.zhyc.common.utils.StringUtils; import com.zhyc.common.utils.StringUtils;

View File

@@ -1,4 +1,4 @@
package com.zhyc.module.produce.manage_sheep.service.impl; package com.zhyc.module.produce.other.controller.impl;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package com.zhyc.module.produce.manage_sheep.service.impl; package com.zhyc.module.produce.other.controller.impl;
import java.util.List; import java.util.List;
import com.zhyc.common.utils.DateUtils; import com.zhyc.common.utils.DateUtils;

View File

@@ -1,4 +1,4 @@
package com.zhyc.module.produce.manage_sheep.service.impl; package com.zhyc.module.produce.other.controller.impl;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package com.zhyc.module.produce.manage_sheep.service.impl; package com.zhyc.module.produce.other.controller.impl;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
@@ -56,7 +56,8 @@ public class ScTransGroupServiceImpl implements IScTransGroupService {
*/ */
@Override @Override
public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup) { public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup) {
List<ScTransGroup> list = scTransGroupMapper.selectScTransGroupList(scTransGroup); List<ScTransGroup> list = scTransGroupMapper.selectScTransGroupList(scTransGroup,
scTransGroup.getManageTagsList());
list.forEach(group -> { list.forEach(group -> {
group.setReasonText(convertReason(group.getReason())); group.setReasonText(convertReason(group.getReason()));
group.setStatusText(convertStatus(group.getStatus())); group.setStatusText(convertStatus(group.getStatus()));
@@ -209,4 +210,9 @@ public class ScTransGroupServiceImpl implements IScTransGroupService {
eventTypeMap.put(4, "预售转群"); eventTypeMap.put(4, "预售转群");
return eventTypeMap.getOrDefault(eventType, "未知"); return eventTypeMap.getOrDefault(eventType, "未知");
} }
@Override
public List<String> searchEarNumbers(String query) {
return scTransGroupMapper.searchEarNumbers(query.trim());
}
} }

View File

@@ -1,4 +1,4 @@
package com.zhyc.module.produce.manage_sheep.service.impl; package com.zhyc.module.produce.other.controller.impl;
import java.util.*; import java.util.*;

View File

@@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
import com.zhyc.common.annotation.Excel; import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity; import com.zhyc.common.core.domain.BaseEntity;
import java.util.List;
/** /**
* 去势对象 sc_castrate * 去势对象 sc_castrate
* *
@@ -72,5 +74,6 @@ public class ScCastrate extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private String eventDate; private String eventDate;
/** 前端多耳号查询条件,非表字段 */
private List<String> manageTagsList;
} }

View File

@@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
import com.zhyc.common.annotation.Excel; import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity; import com.zhyc.common.core.domain.BaseEntity;
import java.util.List;
/** /**
* 修蹄对象 sc_fix_hoof * 修蹄对象 sc_fix_hoof
* *
@@ -62,4 +64,7 @@ public class ScFixHoof extends BaseEntity
@Excel(name = "事件日期", width = 15, dateFormat = "yyyy-MM-dd") @Excel(name = "事件日期", width = 15, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private String eventDate; private String eventDate;
/** 前端多耳号查询条件,非表字段 */
private List<String> manageTagsList;
} }

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.zhyc.module.produce.other.domain.ScCastrate; import com.zhyc.module.produce.other.domain.ScCastrate;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 去势Mapper接口 * 去势Mapper接口
@@ -61,4 +62,14 @@ public interface ScCastrateMapper
* @return 结果 * @return 结果
*/ */
public int deleteScCastrateByIds(Long[] ids); public int deleteScCastrateByIds(Long[] ids);
/**
* 模糊搜索耳号
*/
List<String> searchEarNumbers(@Param("query") String query);
/* 列表查询支持多耳号模糊 */
List<ScCastrate> selectScCastrateList(
@Param("sc") ScCastrate sc,
@Param("manageTagsList") List<String> manageTagsList);
} }

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.zhyc.module.produce.other.domain.ScFixHoof; import com.zhyc.module.produce.other.domain.ScFixHoof;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 修蹄Mapper接口 * 修蹄Mapper接口
@@ -61,5 +62,13 @@ public interface ScFixHoofMapper {
*/ */
public int deleteScFixHoofByIds(Integer[] ids); public int deleteScFixHoofByIds(Integer[] ids);
/**
*模糊搜索耳号
*/
List<String> searchEarNumbers(@Param("query") String query);
/* 列表查询支持多耳号模糊 */
List<ScFixHoof> selectScFixHoofList(
@Param("sc") ScFixHoof sc,
@Param("manageTagsList") List<String> manageTagsList);
} }

View File

@@ -59,5 +59,5 @@ public interface IScCastrateService {
*/ */
public int deleteScCastrateById(Long id); public int deleteScCastrateById(Long id);
List<String> searchEarNumbers(String query);
} }

View File

@@ -67,5 +67,5 @@ public interface IScFixHoofService {
*/ */
Long findIdByManageTags(String manageTags); Long findIdByManageTags(String manageTags);
List<String> searchEarNumbers(String query);
} }

View File

@@ -44,7 +44,8 @@ public class ScCastrateServiceImpl implements IScCastrateService {
*/ */
@Override @Override
public List<ScCastrate> selectScCastrateList(ScCastrate scCastrate) { public List<ScCastrate> selectScCastrateList(ScCastrate scCastrate) {
return scCastrateMapper.selectScCastrateList(scCastrate); return scCastrateMapper.selectScCastrateList(scCastrate,
scCastrate.getManageTagsList());
} }
/** /**
@@ -105,4 +106,10 @@ public class ScCastrateServiceImpl implements IScCastrateService {
public int deleteScCastrateById(Long id) { public int deleteScCastrateById(Long id) {
return scCastrateMapper.deleteScCastrateById(id); return scCastrateMapper.deleteScCastrateById(id);
} }
@Override
public List<String> searchEarNumbers(String query) {
return scCastrateMapper.searchEarNumbers(query.trim());
}
} }

View File

@@ -51,9 +51,11 @@ public class ScFixHoofServiceImpl implements IScFixHoofService {
*/ */
@Override @Override
public List<ScFixHoof> selectScFixHoofList(ScFixHoof scFixHoof) { public List<ScFixHoof> selectScFixHoofList(ScFixHoof scFixHoof) {
return scFixHoofMapper.selectScFixHoofList(scFixHoof); return scFixHoofMapper.selectScFixHoofList(scFixHoof,
scFixHoof.getManageTagsList());
} }
/** /**
* 新增修蹄 * 新增修蹄
* *
@@ -118,5 +120,8 @@ public class ScFixHoofServiceImpl implements IScFixHoofService {
return sheep.getId(); return sheep.getId();
} }
@Override
public List<String> searchEarNumbers(String query) {
return scFixHoofMapper.searchEarNumbers(query.trim());
}
} }

View File

@@ -85,24 +85,26 @@
LEFT JOIN bas_sheep_variety bsv ON bs.variety_id = bsv.id LEFT JOIN bas_sheep_variety bsv ON bs.variety_id = bsv.id
</sql> </sql>
<select id="selectScBodyMeasureList" parameterType="ScBodyMeasure" resultMap="ScBodyMeasureResult"> <select id="selectScBodyMeasureList" resultMap="ScBodyMeasureResult">
<include refid="selectScBodyMeasureVo"/> <include refid="selectScBodyMeasureVo"/>
<where> <where>
<if test="sheepId != null ">and sm.sheep_id = #{sheepId}</if> <if test="manageTagsList != null and manageTagsList.size() > 0">
<if test="params.beginMeasureDate != null and params.endMeasureDate != null"> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
and sm.measure_date between #{params.beginMeasureDate} and #{params.endMeasureDate} bs.manage_tags like concat('%', #{tag}, '%')
</foreach>
</if> </if>
<if test="manageTags != null and manageTags != ''"> <if test="sc.sheepId != null">and sm.sheep_id = #{sc.sheepId}</if>
and bs.manage_tags like concat('%', #{manageTags}, '%') <if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
<if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
<if test="sc.sheepTypeId != null">and bs.type_id = #{sc.sheepTypeId}</if>
<if test="sc.params != null and sc.params.beginMeasureDate != null and sc.params.beginMeasureDate != '' and sc.params.endMeasureDate != null and sc.params.endMeasureDate != ''">
and sm.measure_date between #{sc.params.beginMeasureDate} and #{sc.params.endMeasureDate}
</if> </if>
<if test="sheepfoldId != null">AND bs.sheepfold_id = #{sheepfoldId}</if> <if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
<if test="varietyId != null">AND bsv.id = #{varietyId}</if> and sm.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
<if test="sheepTypeId != null">and bs.type_id = #{sheepTypeId}</if>
<if test="params.beginCreateTime != null and params.endCreateTime != null">
and sm.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
</where> </where>
<if test="true">ORDER BY sm.create_time DESC</if> ORDER BY sm.create_time DESC
</select> </select>
<select id="selectScBodyMeasureById" parameterType="Long" resultMap="ScBodyMeasureResult"> <select id="selectScBodyMeasureById" parameterType="Long" resultMap="ScBodyMeasureResult">
@@ -188,4 +190,12 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT bs.manage_tags
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
</select>
</mapper> </mapper>

View File

@@ -41,24 +41,26 @@
left join bas_sheep_variety bsv on bs.variety_id = bsv.id left join bas_sheep_variety bsv on bs.variety_id = bsv.id
</sql> </sql>
<select id="selectScBodyScoreList" parameterType="ScBodyScore" resultMap="ScBodyScoreResult"> <select id="selectScBodyScoreList" resultMap="ScBodyScoreResult">
<include refid="selectScBodyScoreVo"/> <include refid="selectScBodyScoreVo"/>
<where> <where>
<if test="sheepId != null and sheepId != ''">and sbs.sheep_id = #{sheepId}</if> <if test="manageTagsList != null and manageTagsList.size() > 0">
<if test="varietyId != null">and bsv.id = #{varietyId}</if> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
<if test="sheepfold != null">and bs.sheepfold_id = #{sheepfold}</if> bs.manage_tags like concat('%', #{tag}, '%')
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> </foreach>
and sbs.datetime between #{params.beginDatetime} and #{params.endDatetime}
</if> </if>
<if test="score != null ">and score = #{score}</if> <if test="sc.sheepId != null and sc.sheepId != ''">and sbs.sheep_id = #{sc.sheepId}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> <if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
and sbs.create_time between #{params.beginCreateTime} and #{params.endCreateTime} <if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
<if test="sc.score != null ">and sbs.score = #{sc.score}</if>
<if test="sc.params != null and sc.params.beginDatetime != null and sc.params.beginDatetime != '' and sc.params.endDatetime != null and sc.params.endDatetime != ''">
and sbs.datetime between #{sc.params.beginDatetime} and #{sc.params.endDatetime}
</if> </if>
<if test="manageTags != null and manageTags != ''"> <if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
and bs.manage_tags like concat('%', #{manageTags}, '%') and sbs.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
</if> </if>
</where> </where>
<if test="true">ORDER BY sbs.create_time DESC</if> ORDER BY sbs.create_time DESC
</select> </select>
<select id="selectScBodyScoreById" parameterType="Long" resultMap="ScBodyScoreResult"> <select id="selectScBodyScoreById" parameterType="Long" resultMap="ScBodyScoreResult">
@@ -117,4 +119,13 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT bs.manage_tags
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
</select>
</mapper> </mapper>

View File

@@ -41,22 +41,24 @@
left join da_sheepfold sf on bs.sheepfold_id = sf.id left join da_sheepfold sf on bs.sheepfold_id = sf.id
</sql> </sql>
<select id="selectScBreastRatingList" parameterType="ScBreastRating" resultMap="ScBreastRatingResult"> <select id="selectScBreastRatingList" resultMap="ScBreastRatingResult">
<include refid="selectScBreastRatingVo"/> <include refid="selectScBreastRatingVo"/>
<where> <where>
<if test="manageTags != null and manageTags != ''"> <if test="manageTagsList != null and manageTagsList.size() > 0">
and bs.manage_tags like concat('%', #{manageTags}, '%') <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
bs.manage_tags like concat('%', #{tag}, '%')
</foreach>
</if> </if>
<if test="varietyId != null">and bsv.id = #{varietyId}</if> <if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
<if test="sheepfoldId != null">and sf.id = #{sheepfoldId}</if> <if test="sc.sheepfoldId != null">and sf.id = #{sc.sheepfoldId}</if>
<if test="params.beginEventDate != null and params.endEventDate != null"> <if test="sc.params != null and sc.params.beginEventDate != null and sc.params.endEventDate != null">
and sbr.event_date between #{params.beginEventDate} and #{params.endEventDate} and sbr.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
</if> </if>
<if test="params.beginCreateTime != null and params.endCreateTime != null"> <if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.endCreateTime != null">
and sbr.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and sbr.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
</if> </if>
</where> </where>
<if test="true">ORDER BY sbr.create_time DESC</if> ORDER BY sbr.create_time DESC
</select> </select>
<select id="selectScBreastRatingById" parameterType="Long" resultMap="ScBreastRatingResult"> <select id="selectScBreastRatingById" parameterType="Long" resultMap="ScBreastRatingResult">
@@ -127,4 +129,12 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT bs.manage_tags
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
</select>
</mapper> </mapper>

View File

@@ -38,7 +38,6 @@
<select id="selectScChangeCommentList" resultMap="ScChangeCommentResult"> <select id="selectScChangeCommentList" resultMap="ScChangeCommentResult">
<include refid="selectScChangeCommentVo"/> <include refid="selectScChangeCommentVo"/>
<where> <where>
<!-- 多耳号 + 每只模糊 -->
<if test="manageTagsList != null and manageTagsList.size() > 0"> <if test="manageTagsList != null and manageTagsList.size() > 0">
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")"> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
bs.manage_tags like concat('%', #{tag}, '%') bs.manage_tags like concat('%', #{tag}, '%')

View File

@@ -40,14 +40,11 @@
<select id="selectScChangeVarietyList" resultMap="ScChangeVarietyResult"> <select id="selectScChangeVarietyList" resultMap="ScChangeVarietyResult">
<include refid="selectScChangeVarietyVo"/> <include refid="selectScChangeVarietyVo"/>
<where> <where>
<!-- 多耳号 + 每只模糊 -->
<if test="manageTagsList != null and manageTagsList.size() > 0"> <if test="manageTagsList != null and manageTagsList.size() > 0">
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")"> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
bs.manage_tags like concat('%', #{tag}, '%') bs.manage_tags like concat('%', #{tag}, '%')
</foreach> </foreach>
</if> </if>
<!-- 其余统一加 sc. 前缀 -->
<if test="sc.sheepId != null">and scv.sheep_id = #{sc.sheepId}</if> <if test="sc.sheepId != null">and scv.sheep_id = #{sc.sheepId}</if>
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if> <if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
<if test="sc.varietyOld != null and sc.varietyOld != ''">and scv.variety_old like concat('%', #{sc.varietyOld}, '%')</if> <if test="sc.varietyOld != null and sc.varietyOld != ''">and scv.variety_old like concat('%', #{sc.varietyOld}, '%')</if>

View File

@@ -51,25 +51,23 @@
LEFT JOIN bas_sheep_variety bv ON tg.variety_id = bv.id LEFT JOIN bas_sheep_variety bv ON tg.variety_id = bv.id
</sql> </sql>
<select id="selectScTransGroupList" parameterType="ScTransGroup" resultMap="ScTransGroupResult"> <select id="selectScTransGroupList" resultMap="ScTransGroupResult">
<include refid="selectScTransGroupVo"/> <include refid="selectScTransGroupVo"/>
<where> <where>
<if test="sheepId != null">and sheep_id = #{sheepId}</if> <if test="manageTagsList != null and manageTagsList.size() > 0">
<if test="manageTags != null and manageTags != ''"> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
and s.manage_tags like concat('%', #{manageTags}, '%') s.manage_tags like concat('%', #{tag}, '%')
</foreach>
</if> </if>
<!-- <if test="eventType != null">and tg.event_type = #{eventType}</if>--> <if test="sc.sheepId != null">and tg.sheep_id = #{sc.sheepId}</if>
<if test="params.beginTransDate != null and params.beginTransDate != '' and params.endTransDate != null and params.endTransDate != ''"> <if test="sc.foldTo != null and sc.foldTo != ''">and tg.fold_to = #{sc.foldTo}</if>
and tg.trans_date between #{params.beginTransDate} and #{params.endTransDate} <if test="sc.foldFrom != null and sc.foldFrom != ''">and tg.fold_from = #{sc.foldFrom}</if>
<if test="sc.status != null">and tg.status = #{sc.status}</if>
<if test="sc.varietyId != null">and tg.variety_id = #{sc.varietyId}</if>
<if test="sc.sheepTypeId != null">and st.id = #{sc.sheepTypeId}</if>
<if test="sc.params != null and sc.params.beginTransDate != null and sc.params.beginTransDate != '' and sc.params.endTransDate != null and sc.params.endTransDate != ''">
and tg.trans_date between #{sc.params.beginTransDate} and #{sc.params.endTransDate}
</if> </if>
<if test="foldTo != null and foldTo != ''">and fold_to = #{foldTo}</if>
<if test="foldFrom != null and foldFrom != ''">and fold_from = #{foldFrom}</if>
<if test="status != null">and status = #{status}</if>
<if test="varietyId != null">and tg.variety_id = #{varietyId}</if>
<if test="sheepTypeId != null">and st.id = #{sheepTypeId}</if>
<!-- <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">-->
<!-- and tg.create_time between #{params.beginCreateTime} and #{params.endCreateTime}-->
<!-- </if>-->
</where> </where>
ORDER BY tg.create_time DESC ORDER BY tg.create_time DESC
</select> </select>
@@ -144,4 +142,13 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT s.manage_tags
FROM bas_sheep s
WHERE s.manage_tags LIKE CONCAT('%', #{query}, '%')
AND s.is_delete = 0
ORDER BY s.manage_tags
LIMIT 50
</select>
</mapper> </mapper>

View File

@@ -47,14 +47,11 @@
<select id="selectScTransitionInfoList" resultMap="ScTransitionInfoResult"> <select id="selectScTransitionInfoList" resultMap="ScTransitionInfoResult">
<include refid="selectScTransitionInfoVo"/> <include refid="selectScTransitionInfoVo"/>
<where> <where>
<!-- 多耳号 + 每只模糊 -->
<if test="manageTagsList != null and manageTagsList.size() > 0"> <if test="manageTagsList != null and manageTagsList.size() > 0">
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")"> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
bs.manage_tags like concat('%', #{tag}, '%') bs.manage_tags like concat('%', #{tag}, '%')
</foreach> </foreach>
</if> </if>
<!-- 其余统一加 sc. 前缀 -->
<if test="sc.sheepId != null">and t.sheep_id = #{sc.sheepId}</if> <if test="sc.sheepId != null">and t.sheep_id = #{sc.sheepId}</if>
<if test="sc.transType != null">and t.trans_type = #{sc.transType}</if> <if test="sc.transType != null">and t.trans_type = #{sc.transType}</if>
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if> <if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>

View File

@@ -40,21 +40,22 @@
left join bas_sheep_variety bv on bs.variety_id = bv.id left join bas_sheep_variety bv on bs.variety_id = bv.id
</sql> </sql>
<select id="selectScCastrateList" parameterType="ScCastrate" resultMap="ScCastrateResult"> <select id="selectScCastrateList" resultMap="ScCastrateResult">
<include refid="selectScCastrateVo"/> <include refid="selectScCastrateVo"/>
<where> <where>
<if test="manageTags != null and manageTags != ''"> <if test="manageTagsList != null and manageTagsList.size() > 0">
and bs.manage_tags like concat('%', #{manageTags}, '%') <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
bs.manage_tags like concat('%', #{tag}, '%')
</foreach>
</if> </if>
<if test="sheepfold != null ">and bs.sheepfold_id = #{sheepfold}</if> <if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if> <if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
<if test="technician != null and technician != ''">and sc.technician like concat('%', #{technician}, '%') <if test="sc.technician != null and sc.technician != ''">and sc.technician like concat('%', #{sc.technician}, '%')</if>
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
and sc.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
</if> </if>
<if test="params.beginCreateTime != null and params.endCreateTime != null"> <if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
and sc.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and sc.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
</if>
<if test="params.beginEventDate != null and params.endEventDate != null">
and sc.event_date between #{params.beginEventDate} and #{params.endEventDate}
</if> </if>
</where> </where>
ORDER BY sc.create_time DESC ORDER BY sc.create_time DESC
@@ -115,4 +116,13 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT bs.manage_tags
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
</select>
</mapper> </mapper>

View File

@@ -37,21 +37,22 @@
left join bas_sheep_variety bv on bs.variety_id = bv.id left join bas_sheep_variety bv on bs.variety_id = bv.id
</sql> </sql>
<select id="selectScFixHoofList" parameterType="ScFixHoof" resultMap="ScFixHoofResult"> <select id="selectScFixHoofList" resultMap="ScFixHoofResult">
<include refid="selectScFixHoofVo"/> <include refid="selectScFixHoofVo"/>
<where> <where>
<if test="sheepId != null ">and sheep_id = #{sheepId}</if> <if test="manageTagsList != null and manageTagsList.size() > 0">
<if test="sheepfold != null ">and bs.sheepfold_id = #{sheepfold}</if> <foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if> bs.manage_tags like concat('%', #{tag}, '%')
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> </foreach>
and fh.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="manageTags != null and manageTags != ''"> <if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
and bs.manage_tags like concat('%', #{manageTags}, '%') <if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
<if test="sc.technician != null and sc.technician != ''">and fh.technician like concat('%', #{sc.technician}, '%')</if>
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
and fh.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
</if> </if>
<if test="params.beginEventDate != null and params.beginEventDate != '' <if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
and params.endEventDate != null and params.endEventDate != ''"> and fh.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
and fh.event_date between #{params.beginEventDate} and #{params.endEventDate}
</if> </if>
</where> </where>
ORDER BY fh.create_time DESC ORDER BY fh.create_time DESC
@@ -111,5 +112,12 @@
</foreach> </foreach>
</delete> </delete>
<select id="searchEarNumbers" resultType="java.lang.String">
SELECT DISTINCT bs.manage_tags
FROM bas_sheep bs
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
AND bs.is_delete = 0
ORDER BY bs.manage_tags
LIMIT 50
</select>
</mapper> </mapper>