From e7b52d0f548d85c76472afb7bb595671c82de719 Mon Sep 17 00:00:00 2001
From: zyh <2066096076@qq.com>
Date: Thu, 23 Oct 2025 16:36:01 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BE=8A=E5=8F=AA=E4=B8=AD?=
=?UTF-8?q?=E7=BE=8A=E5=8F=AA=E7=B1=BB=E5=9E=8B=E6=94=B9=E4=B8=BA=E9=9D=9E?=
=?UTF-8?q?=E5=BF=85=E5=A1=AB=EF=BC=9B=E8=BD=AC=E5=9C=BA=E8=BD=AC=E7=BE=A4?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E6=90=9C=E7=B4=A2=E6=A1=86=E5=8E=BB=E9=99=A4?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=92=8C=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=EF=BC=9B=E4=B8=89=E4=B8=AA=E6=94=B9**?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=96=B0=E5=A2=9E=EF=BC=8C=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=EF=BC=8C=E5=AF=BC=E5=87=BA=E5=AE=8C=E5=96=84=EF=BC=9B?=
=?UTF-8?q?=E6=AF=8F=E9=A1=B5=E6=9D=A1=E6=95=B0=E8=AE=BE=E7=BD=AE=EF=BC=9B?=
=?UTF-8?q?=E5=A1=AB=E5=86=99=E6=95=B0=E5=AD=97=E7=9A=84=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E6=95=B0=E5=8F=AF=E6=8E=92=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../bodyManage/domain/ScBodyMeasure.java | 9 ++++
.../bodyManage/domain/ScBodyScore.java | 9 ++++
.../bodyManage/domain/ScBreastRating.java | 8 +++
.../impl/ScBreastRatingServiceImpl.java | 1 +
.../controller/ScAddSheepController.java | 2 +-
.../manage_sheep/domain/ScAddSheep.java | 1 -
.../manage_sheep/domain/ScChangeComment.java | 15 +++++-
.../manage_sheep/domain/ScChangeEar.java | 52 +++++++++++++++----
.../manage_sheep/domain/ScChangeVariety.java | 42 +++++++++++----
.../impl/ScChangeCommentServiceImpl.java | 7 +++
.../service/impl/ScChangeEarServiceImpl.java | 19 +++++--
.../impl/ScChangeVarietyServiceImpl.java | 9 ++++
.../service/impl/ScTransGroupServiceImpl.java | 1 -
.../impl/ScTransitionInfoServiceImpl.java | 8 ++-
.../produce/other/domain/ScCastrate.java | 8 ++-
.../produce/other/domain/ScFixHoof.java | 7 +++
.../bodyManage/ScBodyMeasureMapper.xml | 25 ++++++++-
.../produce/bodyManage/ScBodyScoreMapper.xml | 7 ++-
.../bodyManage/ScBreastRatingMapper.xml | 8 ++-
.../manage_sheep/ScChangeCommentMapper.xml | 14 ++++-
.../manage_sheep/ScChangeEarMapper.xml | 28 +++++++---
.../manage_sheep/ScChangeVarietyMapper.xml | 14 ++++-
.../manage_sheep/ScTransGroupMapper.xml | 8 +--
.../manage_sheep/ScTransitionInfoMapper.xml | 12 ++---
.../mapper/produce/other/ScCastrateMapper.xml | 9 +++-
.../mapper/produce/other/ScFixHoofMapper.xml | 10 +++-
26 files changed, 277 insertions(+), 56 deletions(-)
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyMeasure.java b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyMeasure.java
index 3e73035..ca2ce61 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyMeasure.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyMeasure.java
@@ -183,4 +183,13 @@ public class ScBodyMeasure extends BaseEntity {
@Excel(name = "技术员")
private String technician;
+ /**
+ * 排序字段
+ */
+ private String orderBy;
+
+ /**
+ * 排序方向
+ */
+ private String sortDirection;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyScore.java b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyScore.java
index 83ded3e..eb010ff 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyScore.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBodyScore.java
@@ -77,4 +77,13 @@ public class ScBodyScore extends BaseEntity {
@Excel(name = "技术员")
private String technician;
+ /**
+ * 排序字段
+ */
+ private String orderBy;
+
+ /**
+ * 排序方向
+ */
+ private String sortDirection;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBreastRating.java b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBreastRating.java
index 4eda878..057dda1 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBreastRating.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/domain/ScBreastRating.java
@@ -110,5 +110,13 @@ public class ScBreastRating extends BaseEntity {
@Excel(name = "技术员")
private String technician;
+ /**
+ * 排序字段
+ */
+ private String orderBy;
+ /**
+ * 排序方向
+ */
+ private String sortDirection;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/service/impl/ScBreastRatingServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/service/impl/ScBreastRatingServiceImpl.java
index e813d43..09cd767 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/service/impl/ScBreastRatingServiceImpl.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/bodyManage/service/impl/ScBreastRatingServiceImpl.java
@@ -1,6 +1,7 @@
package com.zhyc.module.produce.bodyManage.service.impl;
import java.util.List;
+import java.util.Map;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.common.utils.SecurityUtils;
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/controller/ScAddSheepController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/controller/ScAddSheepController.java
index 4f56d3b..122d593 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/controller/ScAddSheepController.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/controller/ScAddSheepController.java
@@ -96,7 +96,7 @@ public class ScAddSheepController {
// 根据牧场ID查询牧场信息
DaRanch ranch = daRanchService.selectDaRanchById(scAddSheep.getRanchId().longValue());
if (ranch != null) {
- scAddSheep.setRanchName(ranch.getRanch()); // 将牧场名称设置到实体中
+ scAddSheep.setRanchName(ranch.getRanch());
}
}
// 处理羊舍名称
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScAddSheep.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScAddSheep.java
index bae1352..e462111 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScAddSheep.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScAddSheep.java
@@ -37,7 +37,6 @@ public class ScAddSheep extends BaseEntity {
private String sheepfoldName;
- // 导出时生成“羊舍名称”列 ,仅 Excel 用,不映射到数据库
@Excel(name = "羊舍名称")
private String sheepfoldNameExcel;
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeComment.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeComment.java
index 5db6214..2fd53e3 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeComment.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeComment.java
@@ -1,11 +1,14 @@
package com.zhyc.module.produce.manage_sheep.domain;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;
+import java.util.Date;
+
/**
* 改备注对象 sc_change_comment
*
@@ -53,5 +56,15 @@ public class ScChangeComment extends BaseEntity {
@Excel(name = "原备注")
private String oldComment;
-
+ /**
+ * 事件日期
+ */
+ @Excel(name = "事件日期", width = 30, dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date eventDate;
+ /**
+ * 技术员
+ */
+ @Excel(name = "技术员")
+ private String technician;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeEar.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeEar.java
index e7e9411..76dc820 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeEar.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeEar.java
@@ -1,57 +1,87 @@
package com.zhyc.module.produce.manage_sheep.domain;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;
+import java.util.Date;
+
/**
* 修改电子耳号记录对象 sc_change_ear
- *
+ *
* @author ruoyi
* @date 2025-07-24
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
-public class ScChangeEar extends BaseEntity
-{
+public class ScChangeEar extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** id */
+ /**
+ * id
+ */
private Integer id;
- /** 羊只id */
+ /**
+ * 羊只id
+ */
private Long sheepId;
@Excel(name = "管理耳号")
private String manageTags;
- /** 羊舍 */
+ /**
+ * 羊舍
+ */
private Long sheepfoldId;
@Excel(name = "羊舍")
private String sheepfoldName;
- /** 事件类型(改管理耳号/改电子耳号) */
+ /**
+ * 事件类型(改管理耳号/改电子耳号)
+ */
@Excel(name = "事件类型")
private String eventType;
- /** 选择更改耳号类型(0电子耳号1管理耳号) */
+ /**
+ * 选择更改耳号类型(0电子耳号1管理耳号)
+ */
@Excel(name = "耳号类型", readConverterExp = "0=电子耳号,1=管理耳号")
private Integer earType;
- /** 新耳号/电子耳号 */
+ /**
+ * 新耳号/电子耳号
+ */
@Excel(name = "新耳号/电子耳号")
private String newTag;
- /** 旧耳号/电子耳号 */
+ /**
+ * 旧耳号/电子耳号
+ */
@Excel(name = "旧耳号/电子耳号")
private String oldTag;
- /** 备注 */
+ /**
+ * 备注
+ */
@Excel(name = "备注")
private String comment;
+ /**
+ * 事件日期
+ */
+ @Excel(name = "事件日期", width = 30, dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date eventDate;
+
+ /**
+ * 技术员
+ */
+ @Excel(name = "技术员")
+ private String technician;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeVariety.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeVariety.java
index 3c8953c..a93f079 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeVariety.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/domain/ScChangeVariety.java
@@ -1,6 +1,7 @@
package com.zhyc.module.produce.manage_sheep.domain;
import java.util.Date;
+
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -10,26 +11,31 @@ import com.zhyc.common.core.domain.BaseEntity;
/**
* 改品种记录对象 sc_change_variety
- *
+ *
* @author ruoyi
* @date 2025-07-24
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
-public class ScChangeVariety extends BaseEntity
-{
+public class ScChangeVariety extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** $column.columnComment */
+ /**
+ * $column.columnComment
+ */
private Integer id;
- /** 羊只id */
+ /**
+ * 羊只id
+ */
private Integer sheepId;
@Excel(name = "耳号")
private String manageTags;
- /** 羊舍 */
+ /**
+ * 羊舍
+ */
private Long sheepfoldId;
@Excel(name = "羊舍")
private String sheepfoldName;
@@ -40,17 +46,35 @@ public class ScChangeVariety extends BaseEntity
@Excel(name = "事件类型")
private String eventType;
- /** 原品种 */
+ /**
+ * 原品种
+ */
@Excel(name = "原品种")
private String varietyOld;
- /** 新品种 */
+ /**
+ * 新品种
+ */
@Excel(name = "新品种")
private String varietyNew;
- /** 备注 */
+ /**
+ * 备注
+ */
@Excel(name = "备注")
private String comment;
+ /**
+ * 技术员
+ */
+ @Excel(name = "技术员")
+ private String technician;
+
+ /**
+ * 事件日期
+ */
+ @Excel(name = "事件日期",width = 30, dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date eventDate;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeCommentServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeCommentServiceImpl.java
index 3f0f4dd..1a3ae46 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeCommentServiceImpl.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeCommentServiceImpl.java
@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import com.zhyc.common.utils.SecurityUtils;
+import com.zhyc.common.utils.StringUtils;
import com.zhyc.module.base.domain.BasSheep;
import com.zhyc.module.base.service.IBasSheepService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +62,12 @@ public class ScChangeCommentServiceImpl implements IScChangeCommentService
@Transactional(rollbackFor = Exception.class)
public int insertScChangeComment(ScChangeComment scChangeComment)
{
+ if (StringUtils.isBlank(scChangeComment.getTechnician())) {
+ throw new RuntimeException("技术员不能为空");
+ }
+ if (scChangeComment.getEventDate() == null) {
+ throw new RuntimeException("事件日期不能为空");
+ }
scChangeComment.setCreateTime(new Date());
scChangeComment.setCreateBy(SecurityUtils.getUsername());
int rows = scChangeCommentMapper.insertScChangeComment(scChangeComment);
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeEarServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeEarServiceImpl.java
index 8f78e50..e9126a5 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeEarServiceImpl.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeEarServiceImpl.java
@@ -3,6 +3,7 @@ package com.zhyc.module.produce.manage_sheep.service.impl;
import java.util.List;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.common.utils.SecurityUtils;
+import com.zhyc.common.utils.StringUtils;
import com.zhyc.module.base.domain.BasSheep;
import com.zhyc.module.base.service.IBasSheepService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -81,11 +82,18 @@ public class ScChangeEarServiceImpl implements IScChangeEarService
public int insertScChangeEar(ScChangeEar scChangeEar) {
scChangeEar.setCreateTime(DateUtils.getNowDate());
scChangeEar.setCreateBy(SecurityUtils.getUsername());
-
- // 在新增时,确保旧耳号被正确设置为原始耳号的值
+ if (StringUtils.isBlank(scChangeEar.getTechnician())) {
+ throw new RuntimeException("技术员不能为空");
+ }
+ if (scChangeEar.getEventDate() == null) {
+ throw new RuntimeException("事件日期不能为空");
+ }
if (scChangeEar.getSheepId() == null) {
throw new RuntimeException("未找到对应的羊只ID");
}
+ if (StringUtils.isBlank(scChangeEar.getComment())) {
+ throw new RuntimeException("备注不能为空");
+ }
BasSheep sheep = basSheepService.selectBasSheepById(scChangeEar.getSheepId());
if (sheep == null) {
@@ -113,8 +121,13 @@ public class ScChangeEarServiceImpl implements IScChangeEarService
} else if (scChangeEar.getEarType() == 1) {
sheep.setManageTags(scChangeEar.getNewTag());
}
- basSheepService.updateBasSheep(sheep);
+ // 同步更新羊只主表备注
+ if (StringUtils.isNotBlank(scChangeEar.getComment())) {
+ sheep.setComment(scChangeEar.getComment());
+ }
+
+ basSheepService.updateBasSheep(sheep);
return rows;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeVarietyServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeVarietyServiceImpl.java
index 9551a56..735aa49 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeVarietyServiceImpl.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScChangeVarietyServiceImpl.java
@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import com.zhyc.common.utils.SecurityUtils;
+import com.zhyc.common.utils.StringUtils;
import com.zhyc.module.base.domain.BasSheep;
import com.zhyc.module.base.domain.BasSheepVariety;
import com.zhyc.module.base.service.IBasSheepService;
@@ -66,6 +67,14 @@ public class ScChangeVarietyServiceImpl implements IScChangeVarietyService
{
scChangeVariety.setCreateTime(new Date());
scChangeVariety.setCreateBy(SecurityUtils.getUsername());
+
+ if (StringUtils.isBlank(scChangeVariety.getTechnician())) {
+ throw new RuntimeException("技术员不能为空");
+ }
+ if (scChangeVariety.getEventDate() == null) {
+ throw new RuntimeException("事件日期不能为空");
+ }
+
int rows = scChangeVarietyMapper.insertScChangeVariety(scChangeVariety);
if (rows <= 0) {
return rows;
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransGroupServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransGroupServiceImpl.java
index d68d112..d1ffb9c 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransGroupServiceImpl.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransGroupServiceImpl.java
@@ -87,7 +87,6 @@ public class ScTransGroupServiceImpl implements IScTransGroupService {
}
}
return rows;
-// return scTransGroupMapper.insertScTransGroup(scTransGroup);
}
/**
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransitionInfoServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransitionInfoServiceImpl.java
index 8e619e5..f399396 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransitionInfoServiceImpl.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/manage_sheep/service/impl/ScTransitionInfoServiceImpl.java
@@ -114,9 +114,9 @@ public class ScTransitionInfoServiceImpl implements IScTransitionInfoService
Date now = DateUtils.getNowDate();
for (ScTransitionInfo info : transitionInfoList) {
- info.setCreateBy(username); // 设置创建人
- info.setCreateTime(now); // 设置创建时间
- info.setStatus(0); // 设置默认状态
+ info.setCreateBy(username);
+ info.setCreateTime(now);
+ info.setStatus(0);
}
return scTransitionInfoMapper.insertScTransitionInfoBatch(transitionInfoList);
}
@@ -127,12 +127,10 @@ public class ScTransitionInfoServiceImpl implements IScTransitionInfoService
@Override
@Transactional(rollbackFor = Exception.class)
public int approveScTransitionInfo(ScTransitionInfo scTransitionInfo) {
- // 1. 查询当前记录的原始状态
ScTransitionInfo existing = scTransitionInfoMapper.selectScTransitionInfoById(scTransitionInfo.getId());
if (existing == null) {
throw new RuntimeException("转场记录不存在");
}
- // 2. 校验状态:仅允许审批“待审批”的记录
if (existing.getStatus() != 0) {
throw new RuntimeException("该记录已完成审批,无法重复操作");
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScCastrate.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScCastrate.java
index aae148e..3426e4b 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScCastrate.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScCastrate.java
@@ -1,5 +1,6 @@
package com.zhyc.module.produce.other.domain;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -64,7 +65,12 @@ public class ScCastrate extends BaseEntity {
@Excel(name = "技术员")
private String technician;
-
+ /**
+ * 事件日期
+ */
+ @Excel(name = "事件日期", width = 15, dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private String eventDate;
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScFixHoof.java b/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScFixHoof.java
index 88833e5..bd2a20b 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScFixHoof.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/other/domain/ScFixHoof.java
@@ -1,5 +1,6 @@
package com.zhyc.module.produce.other.domain;
+import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -55,4 +56,10 @@ public class ScFixHoof extends BaseEntity
@Excel(name = "技术员")
private String technician;
+ /**
+ * 事件日期(新增字段)
+ */
+ @Excel(name = "事件日期", width = 15, dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private String eventDate;
}
diff --git a/zhyc-module/src/main/resources/mapper/produce/bodyManage/ScBodyMeasureMapper.xml b/zhyc-module/src/main/resources/mapper/produce/bodyManage/ScBodyMeasureMapper.xml
index 7e75d9c..8b26f99 100644
--- a/zhyc-module/src/main/resources/mapper/produce/bodyManage/ScBodyMeasureMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/bodyManage/ScBodyMeasureMapper.xml
@@ -102,7 +102,30 @@
and sm.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
- ORDER BY sm.create_time DESC
+
+ ORDER BY
+
+ bs.weaning_weight
+ sm.body_length
+ bs.birth_weight
+ bs.current_weight
+ bs.lactation_day
+ bs.gestation_day
+ post_mating_day
+ bs.parity
+ sm.height
+ sm.bust
+ sm.pipe_length
+ sm.chest_depth
+ sm.hip_height
+ sm.rump_width
+ sm.rump_heignt
+ sm.hip_width
+ sm.hip_cross_height
+ ${orderBy}
+
+ ${sortDirection}
+
@@ -65,6 +73,8 @@
old_comment,
create_by,
create_time,
+ event_date,
+ technician,
#{sheepId},
@@ -72,6 +82,8 @@
#{oldComment},
#{createBy},
#{createTime},
+ #{eventDate},
+ #{technician},
diff --git a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeEarMapper.xml b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeEarMapper.xml
index 90c3bff..c85b4ab 100644
--- a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeEarMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeEarMapper.xml
@@ -16,24 +16,28 @@
+
+
- select sce.id as sce_id,
+ select sce.id as sce_id,
sce.sheep_id,
- bs.manage_tags as manage_tags,
+ bs.manage_tags as manage_tags,
sf.sheepfold_name as sheepfold_name,
case
when sce.ear_type = 0 then '改电子耳号'
when sce.ear_type = 1 then '改管理耳号'
else ''
- end as event_type,
+ end as event_type,
sce.ear_type,
sce.newTag,
- sce.oldTag as oldTag,
+ sce.oldTag as oldTag,
sce.comment,
sce.create_by,
- sce.create_time
+ sce.create_time,
+ sce.event_date,
+ sce.technician
from sc_change_ear sce
LEFT JOIN bas_sheep bs ON sce.sheep_id = bs.id
LEFT JOIN da_sheepfold sf ON bs.sheepfold_id = sf.id
@@ -44,7 +48,11 @@
and sce.sheep_id = #{sheepId}
- and bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
+ and (
+ bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
+ OR
+ bs.electronic_tags LIKE CONCAT('%', #{manageTags}, '%')
+ )
and bs.sheepfold_id = #{sheepfoldId}
@@ -60,6 +68,10 @@
and sce.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
+
+ and sce.event_date between #{params.beginEventDate} and #{params.endEventDate}
+
ORDER BY sce.create_time DESC
@@ -79,6 +91,8 @@
comment,
create_by,
create_time,
+ event_date,
+ technician,
#{sheepId},
@@ -88,6 +102,8 @@
#{comment},
#{createBy},
#{createTime},
+ #{eventDate},
+ #{technician},
diff --git a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeVarietyMapper.xml b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeVarietyMapper.xml
index b799809..4370ad8 100644
--- a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeVarietyMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScChangeVarietyMapper.xml
@@ -15,6 +15,8 @@
+
+
@@ -27,7 +29,9 @@
scv.variety_new,
scv.comment,
scv.create_by,
- scv.create_time
+ scv.create_time,
+ scv.technician,
+ scv.event_date
from sc_change_variety scv
left join bas_sheep bs on scv.sheep_id = bs.id
left join da_sheepfold sf on bs.sheepfold_id = sf.id
@@ -51,6 +55,10 @@
and params.endCreateTime != null and params.endCreateTime != ''">
and scv.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
+
+ and scv.event_date between #{params.beginEventDate} and #{params.endEventDate}
+
ORDER BY scv.create_time DESC
@@ -69,6 +77,8 @@
comment,
create_by,
create_time,
+ technician,
+ event_date,
#{sheepId},
@@ -77,6 +87,8 @@
#{comment},
#{createBy},
#{createTime},
+ #{technician},
+ #{eventDate},
diff --git a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransGroupMapper.xml b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransGroupMapper.xml
index 36bef56..ada406b 100644
--- a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransGroupMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransGroupMapper.xml
@@ -58,7 +58,7 @@
and s.manage_tags like concat('%', #{manageTags}, '%')
- and tg.event_type = #{eventType}
+
and tg.trans_date between #{params.beginTransDate} and #{params.endTransDate}
@@ -67,9 +67,9 @@
and status = #{status}
and tg.variety_id = #{varietyId}
and st.id = #{sheepTypeId}
-
- and tg.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
-
+
+
+
ORDER BY tg.create_time DESC
diff --git a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransitionInfoMapper.xml b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransitionInfoMapper.xml
index 66d18ca..89b81f3 100644
--- a/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransitionInfoMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/manage_sheep/ScTransitionInfoMapper.xml
@@ -51,9 +51,9 @@
and bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
-
- and t.event_type = #{eventType}
-
+
+
+
and t.trans_type = #{transType}
@@ -63,9 +63,9 @@
and trans_to = #{transTo}
and trans_from = #{transFrom}
and status = #{status}
-
- and t.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
-
+
+
+
ORDER BY t.create_time DESC
diff --git a/zhyc-module/src/main/resources/mapper/produce/other/ScCastrateMapper.xml b/zhyc-module/src/main/resources/mapper/produce/other/ScCastrateMapper.xml
index 5bec3f1..a3b2eac 100644
--- a/zhyc-module/src/main/resources/mapper/produce/other/ScCastrateMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/other/ScCastrateMapper.xml
@@ -17,6 +17,7 @@
+
@@ -31,7 +32,8 @@
sc.comment,
sc.technician,
sc.create_by,
- sc.create_time
+ sc.create_time,
+ sc.event_date as eventDate
from sc_castrate sc
left join bas_sheep bs on sc.sheep_id = bs.id
left join da_sheepfold sf on bs.sheepfold_id = sf.id
@@ -51,6 +53,9 @@
and sc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
+
+ and sc.event_date between #{params.beginEventDate} and #{params.endEventDate}
+
ORDER BY sc.create_time DESC
@@ -70,6 +75,7 @@
technician,
create_by,
create_time,
+ event_date,
#{sheepId},
@@ -79,6 +85,7 @@
#{technician},
#{createBy},
#{createTime},
+ #{eventDate},
diff --git a/zhyc-module/src/main/resources/mapper/produce/other/ScFixHoofMapper.xml b/zhyc-module/src/main/resources/mapper/produce/other/ScFixHoofMapper.xml
index 92a03c0..77ca28d 100644
--- a/zhyc-module/src/main/resources/mapper/produce/other/ScFixHoofMapper.xml
+++ b/zhyc-module/src/main/resources/mapper/produce/other/ScFixHoofMapper.xml
@@ -15,6 +15,7 @@
+
@@ -28,7 +29,8 @@
fh.comment,
fh.technician,
fh.create_by,
- fh.create_time
+ fh.create_time,
+ fh.event_date as eventDate
from sc_fix_hoof fh
left join bas_sheep bs on fh.sheep_id = bs.id
left join da_sheepfold sf on bs.sheepfold_id = sf.id
@@ -47,6 +49,10 @@
and bs.manage_tags like concat('%', #{manageTags}, '%')
+
+ and fh.event_date between #{params.beginEventDate} and #{params.endEventDate}
+
ORDER BY fh.create_time DESC
@@ -64,6 +70,7 @@
variety_id,
comment,
technician,
+ event_date,
create_by,
create_time)
VALUES
@@ -72,6 +79,7 @@
#{varietyId},
#{comment},
#{technician},
+ #{eventDate},
#{createBy},
#{createTime})