Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -59,13 +59,29 @@ public class SheepFileController extends BaseController
|
|||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
// 使用默认值
|
// 使用默认值
|
||||||
}
|
}
|
||||||
|
} else if (queryParams.containsKey("page") && queryParams.get("page") != null) {
|
||||||
|
// 如果 pageNum 不存在,则尝试使用 page
|
||||||
|
try {
|
||||||
|
pageNum = Integer.parseInt(queryParams.get("page").toString());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 使用默认值
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (queryParams.containsKey("pageSize") && queryParams.get("pageSize") != null) {
|
if (queryParams.containsKey("pageSize") && queryParams.get("pageSize") != null) {
|
||||||
try {
|
try {
|
||||||
pageSize = Integer.parseInt(queryParams.get("pageSize").toString());
|
pageSize = Integer.parseInt(queryParams.get("pageSize").toString());
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
// 使用默认值
|
// 使用默认值
|
||||||
}
|
}
|
||||||
|
}else if (queryParams.containsKey("limit") && queryParams.get("limit") != null) {
|
||||||
|
// 如果 pageSize 不存在,则尝试使用 limit
|
||||||
|
try {
|
||||||
|
pageSize = Integer.parseInt(queryParams.get("limit").toString());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 使用默认值
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提取常规查询参数到 SheepFile 对象
|
// 提取常规查询参数到 SheepFile 对象
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class SheepFileSqlProvider {
|
|||||||
// 添加动态条件
|
// 添加动态条件
|
||||||
addDynamicConditions(sql, conditions);
|
addDynamicConditions(sql, conditions);
|
||||||
|
|
||||||
sql.ORDER_BY("id DESC");
|
sql.ORDER_BY("id ASC");
|
||||||
|
|
||||||
return sql.toString();
|
return sql.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 ScChangeCommentController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(scChangeCommentService.deleteScChangeCommentByIds(ids));
|
return toAjax(scChangeCommentService.deleteScChangeCommentByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/search_ear_numbers")
|
||||||
|
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
|
||||||
|
return success(scChangeCommentService.searchEarNumbers(query.trim()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,7 @@ import com.zhyc.module.base.domain.BasSheep;
|
|||||||
import com.zhyc.module.base.service.IBasSheepService;
|
import com.zhyc.module.base.service.IBasSheepService;
|
||||||
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;
|
||||||
@@ -23,6 +16,7 @@ import com.zhyc.module.produce.manage_sheep.domain.ScChangeEar;
|
|||||||
import com.zhyc.module.produce.manage_sheep.service.IScChangeEarService;
|
import com.zhyc.module.produce.manage_sheep.service.IScChangeEarService;
|
||||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
import com.zhyc.common.core.page.TableDataInfo;
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改电子耳号记录Controller
|
* 修改电子耳号记录Controller
|
||||||
@@ -116,4 +110,9 @@ public class ScChangeEarController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(scChangeEarService.deleteScChangeEarByIds(ids));
|
return toAjax(scChangeEarService.deleteScChangeEarByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/search_ear_numbers")
|
||||||
|
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
|
||||||
|
return success(scChangeEarService.searchEarNumbers(query.trim()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 ScChangeVarietyController extends BaseController
|
|||||||
{
|
{
|
||||||
return toAjax(scChangeVarietyService.deleteScChangeVarietyByIds(ids));
|
return toAjax(scChangeVarietyService.deleteScChangeVarietyByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/search_ear_numbers")
|
||||||
|
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
|
||||||
|
return success(scChangeVarietyService.searchEarNumbers(query.trim()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -116,4 +109,9 @@ public class ScTransitionInfoController extends BaseController {
|
|||||||
int rows = scTransitionInfoService.approveScTransitionInfo(scTransitionInfo);
|
int rows = scTransitionInfoService.approveScTransitionInfo(scTransitionInfo);
|
||||||
return toAjax(rows);
|
return toAjax(rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/search_ear_numbers")
|
||||||
|
public AjaxResult searchEarNumbers(@RequestParam("query") String query){
|
||||||
|
return success(scTransitionInfoService.searchEarNumbers(query.trim()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改备注对象 sc_change_comment
|
* 改备注对象 sc_change_comment
|
||||||
@@ -67,4 +68,7 @@ public class ScChangeComment extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "技术员")
|
@Excel(name = "技术员")
|
||||||
private String technician;
|
private String technician;
|
||||||
|
|
||||||
|
/** 前端多耳号条件,非数据库字段 */
|
||||||
|
private List<String> manageTagsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改电子耳号记录对象 sc_change_ear
|
* 修改电子耳号记录对象 sc_change_ear
|
||||||
@@ -84,4 +85,7 @@ public class ScChangeEar extends BaseEntity {
|
|||||||
@Excel(name = "技术员")
|
@Excel(name = "技术员")
|
||||||
private String technician;
|
private String technician;
|
||||||
|
|
||||||
|
|
||||||
|
/** 前端多耳号查询条件,非表字段 */
|
||||||
|
private List<String> manageTagsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.zhyc.module.produce.manage_sheep.domain;
|
package com.zhyc.module.produce.manage_sheep.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,4 +78,6 @@ public class ScChangeVariety extends BaseEntity {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date eventDate;
|
private Date eventDate;
|
||||||
|
|
||||||
|
/** 前端多耳号查询条件,非表字段 */
|
||||||
|
private List<String> manageTagsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,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_transition_info
|
* 转场对象 sc_transition_info
|
||||||
@@ -96,5 +97,6 @@ public class ScTransitionInfo extends BaseEntity {
|
|||||||
@Excel(name = "备注")
|
@Excel(name = "备注")
|
||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
|
/** 前端多耳号查询条件,非表字段 */
|
||||||
|
private List<String> manageTagsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zhyc.module.produce.manage_sheep.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.zhyc.module.produce.manage_sheep.domain.ScChangeComment;
|
import com.zhyc.module.produce.manage_sheep.domain.ScChangeComment;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改备注Mapper接口
|
* 改备注Mapper接口
|
||||||
@@ -58,4 +59,13 @@ public interface ScChangeCommentMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteScChangeCommentByIds(Long[] ids);
|
public int deleteScChangeCommentByIds(Long[] ids);
|
||||||
|
|
||||||
|
List<ScChangeComment> selectScChangeCommentList(
|
||||||
|
@Param("sc") ScChangeComment sc,
|
||||||
|
@Param("manageTagsList") List<String> manageTagsList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 远程下拉:模糊搜索耳号
|
||||||
|
*/
|
||||||
|
List<String> searchEarNumbers(@Param("query") String query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zhyc.module.produce.manage_sheep.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.zhyc.module.produce.manage_sheep.domain.ScChangeEar;
|
import com.zhyc.module.produce.manage_sheep.domain.ScChangeEar;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改电子耳号记录Mapper接口
|
* 修改电子耳号记录Mapper接口
|
||||||
@@ -58,4 +59,14 @@ public interface ScChangeEarMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteScChangeEarByIds(Integer[] ids);
|
public int deleteScChangeEarByIds(Integer[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 远程下拉:模糊搜索耳号
|
||||||
|
*/
|
||||||
|
List<String> searchEarNumbers(@Param("query") String query);
|
||||||
|
|
||||||
|
/* 列表查询支持多耳号模糊 */
|
||||||
|
List<ScChangeEar> selectScChangeEarList(
|
||||||
|
@Param("sc") ScChangeEar sc,
|
||||||
|
@Param("manageTagsList") List<String> manageTagsList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.zhyc.module.produce.manage_sheep.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.zhyc.module.produce.manage_sheep.domain.ScChangeVariety;
|
import com.zhyc.module.produce.manage_sheep.domain.ScChangeVariety;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 改品种记录Mapper接口
|
* 改品种记录Mapper接口
|
||||||
@@ -58,4 +59,14 @@ public interface ScChangeVarietyMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteScChangeVarietyByIds(Integer[] ids);
|
public int deleteScChangeVarietyByIds(Integer[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 远程下拉:模糊搜索耳号
|
||||||
|
*/
|
||||||
|
List<String> searchEarNumbers(@Param("query") String query);
|
||||||
|
|
||||||
|
/* 列表查询支持多耳号模糊 */
|
||||||
|
List<ScChangeVariety> selectScChangeVarietyList(
|
||||||
|
@Param("sc") ScChangeVariety sc,
|
||||||
|
@Param("manageTagsList") List<String> manageTagsList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,4 +64,13 @@ 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<ScTransitionInfo> selectScTransitionInfoList(
|
||||||
|
@Param("sc") ScTransitionInfo sc,
|
||||||
|
@Param("manageTagsList") List<String> manageTagsList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,4 +58,9 @@ public interface IScChangeCommentService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteScChangeCommentById(Long id);
|
public int deleteScChangeCommentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 远程模糊搜索耳号(下拉用)
|
||||||
|
*/
|
||||||
|
List<String> searchEarNumbers(String query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,4 +58,6 @@ public interface IScChangeEarService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteScChangeEarById(Integer id);
|
public int deleteScChangeEarById(Integer id);
|
||||||
|
|
||||||
|
List<String> searchEarNumbers(String query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,4 +58,6 @@ public interface IScChangeVarietyService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteScChangeVarietyById(Integer id);
|
public int deleteScChangeVarietyById(Integer id);
|
||||||
|
|
||||||
|
List<String> searchEarNumbers(String query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,4 +71,5 @@ public interface IScTransitionInfoService {
|
|||||||
//审批转场
|
//审批转场
|
||||||
public int approveScTransitionInfo(ScTransitionInfo scTransitionInfo);
|
public int approveScTransitionInfo(ScTransitionInfo scTransitionInfo);
|
||||||
|
|
||||||
|
List<String> searchEarNumbers(String query);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,9 +49,14 @@ public class ScChangeCommentServiceImpl implements IScChangeCommentService
|
|||||||
@Override
|
@Override
|
||||||
public List<ScChangeComment> selectScChangeCommentList(ScChangeComment scChangeComment)
|
public List<ScChangeComment> selectScChangeCommentList(ScChangeComment scChangeComment)
|
||||||
{
|
{
|
||||||
return scChangeCommentMapper.selectScChangeCommentList(scChangeComment);
|
// 把实体和独立参数一起传过去
|
||||||
|
return scChangeCommentMapper.selectScChangeCommentList(scChangeComment,
|
||||||
|
scChangeComment.getManageTagsList());
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public List<String> searchEarNumbers(String query) {
|
||||||
|
return scChangeCommentMapper.searchEarNumbers(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增改备注
|
* 新增改备注
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ public class ScChangeEarServiceImpl implements IScChangeEarService
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ScChangeEar> selectScChangeEarList(ScChangeEar scChangeEar) {
|
public List<ScChangeEar> selectScChangeEarList(ScChangeEar scChangeEar) {
|
||||||
List<ScChangeEar> list = scChangeEarMapper.selectScChangeEarList(scChangeEar);
|
return scChangeEarMapper.selectScChangeEarList(scChangeEar,
|
||||||
return list;
|
scChangeEar.getManageTagsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,4 +166,10 @@ public class ScChangeEarServiceImpl implements IScChangeEarService
|
|||||||
{
|
{
|
||||||
return scChangeEarMapper.deleteScChangeEarById(id);
|
return scChangeEarMapper.deleteScChangeEarById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> searchEarNumbers(String query) {
|
||||||
|
return scChangeEarMapper.searchEarNumbers(query.trim());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ public class ScChangeVarietyServiceImpl implements IScChangeVarietyService
|
|||||||
@Override
|
@Override
|
||||||
public List<ScChangeVariety> selectScChangeVarietyList(ScChangeVariety scChangeVariety)
|
public List<ScChangeVariety> selectScChangeVarietyList(ScChangeVariety scChangeVariety)
|
||||||
{
|
{
|
||||||
return scChangeVarietyMapper.selectScChangeVarietyList(scChangeVariety);
|
return scChangeVarietyMapper.selectScChangeVarietyList(scChangeVariety,
|
||||||
|
scChangeVariety.getManageTagsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -133,4 +134,9 @@ public class ScChangeVarietyServiceImpl implements IScChangeVarietyService
|
|||||||
{
|
{
|
||||||
return scChangeVarietyMapper.deleteScChangeVarietyById(id);
|
return scChangeVarietyMapper.deleteScChangeVarietyById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> searchEarNumbers(String query) {
|
||||||
|
return scChangeVarietyMapper.searchEarNumbers(query.trim());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ public class ScTransitionInfoServiceImpl implements IScTransitionInfoService
|
|||||||
@Override
|
@Override
|
||||||
public List<ScTransitionInfo> selectScTransitionInfoList(ScTransitionInfo scTransitionInfo)
|
public List<ScTransitionInfo> selectScTransitionInfoList(ScTransitionInfo scTransitionInfo)
|
||||||
{
|
{
|
||||||
return scTransitionInfoMapper.selectScTransitionInfoList(scTransitionInfo);
|
return scTransitionInfoMapper.selectScTransitionInfoList(scTransitionInfo,
|
||||||
|
scTransitionInfo.getManageTagsList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -212,4 +213,9 @@ public class ScTransitionInfoServiceImpl implements IScTransitionInfoService
|
|||||||
transTypeMap.put(2, "育肥调拨");
|
transTypeMap.put(2, "育肥调拨");
|
||||||
return transTypeMap.getOrDefault(transTypeCode, "未知类型");
|
return transTypeMap.getOrDefault(transTypeCode, "未知类型");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> searchEarNumbers(String query) {
|
||||||
|
return scTransitionInfoMapper.searchEarNumbers(query.trim());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="statusId != null "> and status_id = #{statusId}</if>
|
<if test="statusId != null "> and status_id = #{statusId}</if>
|
||||||
<if test="breed != null and breed != ''"> and breed = #{breed}</if>
|
<if test="breed != null and breed != ''"> and breed = #{breed}</if>
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY id ASC <!-- 修改为升序 -->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSheepFileById" parameterType="Long" resultMap="SheepFileResult">
|
<select id="selectSheepFileById" parameterType="Long" resultMap="SheepFileResult">
|
||||||
@@ -260,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY id DESC
|
ORDER BY id ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- <!– 查询所有公羊(gender=2) –>-->
|
<!-- <!– 查询所有公羊(gender=2) –>-->
|
||||||
|
|||||||
@@ -35,26 +35,31 @@
|
|||||||
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="selectScChangeCommentList" parameterType="ScChangeComment" resultMap="ScChangeCommentResult">
|
<select id="selectScChangeCommentList" resultMap="ScChangeCommentResult">
|
||||||
<include refid="selectScChangeCommentVo"/>
|
<include refid="selectScChangeCommentVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="manageTags != null and manageTags != ''">
|
<!-- 多耳号 + 每只模糊 -->
|
||||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||||
|
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||||
|
bs.manage_tags like concat('%', #{tag}, '%')
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
<if test="sc.sheepfoldId != null">
|
||||||
<if test="newComment != null and newComment != ''">
|
and bs.sheepfold_id = #{sc.sheepfoldId}
|
||||||
and scc.new_comment like concat('%', #{newComment}, '%')
|
|
||||||
</if>
|
</if>
|
||||||
<if test="oldComment != null and oldComment != ''">
|
<if test="sc.newComment != null and sc.newComment != ''">
|
||||||
and scc.old_comment like concat('%', #{oldComment}, '%')
|
and scc.new_comment like concat('%', #{sc.newComment}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''
|
<if test="sc.oldComment != null and sc.oldComment != ''">
|
||||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
and scc.old_comment like concat('%', #{sc.oldComment}, '%')
|
||||||
and scc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != ''
|
||||||
and params.endEventDate != null and params.endEventDate != ''">
|
and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||||
and scc.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
and scc.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||||
|
</if>
|
||||||
|
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != ''
|
||||||
|
and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||||
|
and scc.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY scc.create_time DESC
|
ORDER BY scc.create_time DESC
|
||||||
@@ -111,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>
|
||||||
@@ -43,34 +43,27 @@
|
|||||||
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="selectScChangeEarList" parameterType="ScChangeEar" resultMap="ScChangeEarResult">
|
<select id="selectScChangeEarList" resultMap="ScChangeEarResult">
|
||||||
<include refid="selectScChangeEarVo"/>
|
<include refid="selectScChangeEarVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="sheepId != null">and sce.sheep_id = #{sheepId}</if>
|
<if test="sc.sheepId != null">and sce.sheep_id = #{sc.sheepId}</if>
|
||||||
<if test="manageTags != null and manageTags != ''">
|
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||||
and (
|
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||||
bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
(bs.manage_tags like concat('%', #{tag}, '%')
|
||||||
OR
|
or bs.electronic_tags like concat('%', #{tag}, '%'))
|
||||||
bs.electronic_tags LIKE CONCAT('%', #{manageTags}, '%')
|
</foreach>
|
||||||
)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
|
||||||
<if test="sheepfoldName != null and sheepfoldName != ''">
|
<if test="sc.earType != null">and sce.ear_type = #{sc.earType}</if>
|
||||||
and sf.sheepfold_name LIKE CONCAT('%', #{sheepfoldName}, '%')
|
<if test="sc.newTag != null and sc.newTag != ''">and sce.newTag like concat('%', #{sc.newTag}, '%')</if>
|
||||||
|
<if test="sc.oldTag != null and sc.oldTag != ''">and sce.oldTag like concat('%', #{sc.oldTag}, '%')</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 sce.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="earType != null ">and sce.ear_type = #{earType}</if>
|
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != ''
|
||||||
<if test="newTag != null and newTag != ''">
|
and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||||
and sce.newTag LIKE CONCAT('%', #{newTag}, '%')
|
and sce.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||||
</if>
|
|
||||||
<if test="oldTag != null and oldTag != ''">
|
|
||||||
and sce.oldTag LIKE CONCAT('%', #{oldTag}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
|
||||||
and sce.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
|
||||||
</if>
|
|
||||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
|
||||||
and params.endEventDate != null and params.endEventDate != ''">
|
|
||||||
and sce.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY sce.create_time DESC
|
ORDER BY sce.create_time DESC
|
||||||
@@ -133,4 +126,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>
|
||||||
@@ -37,27 +37,26 @@
|
|||||||
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="selectScChangeVarietyList" parameterType="ScChangeVariety" resultMap="ScChangeVarietyResult">
|
<select id="selectScChangeVarietyList" resultMap="ScChangeVarietyResult">
|
||||||
<include refid="selectScChangeVarietyVo"/>
|
<include refid="selectScChangeVarietyVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="sheepId != null">and scv.sheep_id = #{sheepId}</if>
|
<!-- 多耳号 + 每只模糊 -->
|
||||||
<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="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
|
||||||
<if test="varietyOld != null and varietyOld != ''">
|
<!-- 其余统一加 sc. 前缀 -->
|
||||||
and scv.variety_old like concat('%', #{varietyOld}, '%')
|
<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.varietyOld != null and sc.varietyOld != ''">and scv.variety_old like concat('%', #{sc.varietyOld}, '%')</if>
|
||||||
|
<if test="sc.varietyNew != null and sc.varietyNew != ''">and scv.variety_new like concat('%', #{sc.varietyNew}, '%')</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 scv.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="varietyNew != null and varietyNew != ''">
|
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||||
and scv.variety_new like concat('%', #{varietyNew}, '%')
|
and scv.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||||
</if>
|
|
||||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''
|
|
||||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
|
||||||
and scv.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
|
||||||
</if>
|
|
||||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
|
||||||
and params.endEventDate != null and params.endEventDate != ''">
|
|
||||||
and scv.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY scv.create_time DESC
|
ORDER BY scv.create_time DESC
|
||||||
@@ -117,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>
|
||||||
@@ -44,28 +44,26 @@
|
|||||||
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="selectScTransitionInfoList" parameterType="ScTransitionInfo" resultMap="ScTransitionInfoResult">
|
<select id="selectScTransitionInfoList" resultMap="ScTransitionInfoResult">
|
||||||
<include refid="selectScTransitionInfoVo"/>
|
<include refid="selectScTransitionInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
|
<!-- 多耳号 + 每只模糊 -->
|
||||||
<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="eventType != null and eventType != ''">-->
|
|
||||||
<!-- and t.event_type = #{eventType}-->
|
<!-- 其余统一加 sc. 前缀 -->
|
||||||
<!-- </if>-->
|
<if test="sc.sheepId != null">and t.sheep_id = #{sc.sheepId}</if>
|
||||||
<if test="transType != null">and t.trans_type = #{transType}</if>
|
<if test="sc.transType != null">and t.trans_type = #{sc.transType}</if>
|
||||||
<if test="params.beginTransitionDate != null and params.beginTransitionDate != ''
|
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
|
||||||
and params.endTransitionDate != null and params.endTransitionDate != ''">
|
<if test="sc.transTo != null and sc.transTo != ''">and t.trans_to = #{sc.transTo}</if>
|
||||||
and t.transition_date between #{params.beginTransitionDate} and #{params.endTransitionDate}
|
<if test="sc.transFrom != null and sc.transFrom != ''">and t.trans_from = #{sc.transFrom}</if>
|
||||||
|
<if test="sc.status != null">and t.status = #{sc.status}</if>
|
||||||
|
<if test="sc.params != null and sc.params.beginTransitionDate != null and sc.params.beginTransitionDate != '' and sc.params.endTransitionDate != null and sc.params.endTransitionDate != ''">
|
||||||
|
and t.transition_date between #{sc.params.beginTransitionDate} and #{sc.params.endTransitionDate}
|
||||||
</if>
|
</if>
|
||||||
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if>
|
|
||||||
<if test="transTo != null and transTo != ''">and trans_to = #{transTo}</if>
|
|
||||||
<if test="transFrom != null and transFrom != ''">and trans_from = #{transFrom}</if>
|
|
||||||
<if test="status != null ">and status = #{status}</if>
|
|
||||||
<!-- <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">-->
|
|
||||||
<!-- and t.create_time between #{params.beginCreateTime} and #{params.endCreateTime}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
</where>
|
</where>
|
||||||
ORDER BY t.create_time DESC
|
ORDER BY t.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
@@ -154,4 +152,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>
|
||||||
Reference in New Issue
Block a user