diff --git a/zhyc-admin/src/main/java/com/zhyc/web/controller/system/SysLoginController.java b/zhyc-admin/src/main/java/com/zhyc/web/controller/system/SysLoginController.java
index f3b318a..edfc953 100644
--- a/zhyc-admin/src/main/java/com/zhyc/web/controller/system/SysLoginController.java
+++ b/zhyc-admin/src/main/java/com/zhyc/web/controller/system/SysLoginController.java
@@ -51,7 +51,7 @@ public class SysLoginController
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
- loginBody.getUuid());
+ loginBody.getUuid(),loginBody.getFlag());
ajax.put(Constants.TOKEN, token);
return ajax;
}
diff --git a/zhyc-admin/src/main/resources/application.yml b/zhyc-admin/src/main/resources/application.yml
index 49cc5ba..641e1c3 100644
--- a/zhyc-admin/src/main/resources/application.yml
+++ b/zhyc-admin/src/main/resources/application.yml
@@ -99,7 +99,7 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
- expireTime: 30
+ expireTime: 120
# MyBatis配置
mybatis:
diff --git a/zhyc-common/src/main/java/com/zhyc/common/core/domain/model/LoginBody.java b/zhyc-common/src/main/java/com/zhyc/common/core/domain/model/LoginBody.java
index fda8f5b..7de3fc6 100644
--- a/zhyc-common/src/main/java/com/zhyc/common/core/domain/model/LoginBody.java
+++ b/zhyc-common/src/main/java/com/zhyc/common/core/domain/model/LoginBody.java
@@ -26,6 +26,10 @@ public class LoginBody
* 唯一标识
*/
private String uuid;
+ /**
+ * 登录参数
+ */
+ private boolean flag;
public String getUsername()
{
@@ -66,4 +70,12 @@ public class LoginBody
{
this.uuid = uuid;
}
+
+ public boolean getFlag() {
+ return flag;
+ }
+
+ public void setFlag(boolean flag) {
+ this.flag = flag;
+ }
}
diff --git a/zhyc-common/src/main/resources/mapper/embryo/ScEmbryoFlushMapper.xml b/zhyc-common/src/main/resources/mapper/embryo/ScEmbryoFlushMapper.xml
new file mode 100644
index 0000000..448874e
--- /dev/null
+++ b/zhyc-common/src/main/resources/mapper/embryo/ScEmbryoFlushMapper.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select id, flush_time, donor_female_no, donor_male_no, grade_a_plus, grade_a, grade_b, grade_c, grade_d, cell_2_4, cell_8, cell_16, unfertilized, degenerated, transferred, recipient_cnt, embryo_type, embryo_source, destination, storage_method, flush_operator, collect_operator, remark, created_by, created_at from sc_embryo_flush
+
+
+
+
+
+
+
+ insert into sc_embryo_flush
+
+ flush_time,
+ donor_female_no,
+ donor_male_no,
+ grade_a_plus,
+ grade_a,
+ grade_b,
+ grade_c,
+ grade_d,
+ cell_2_4,
+ cell_8,
+ cell_16,
+ unfertilized,
+ degenerated,
+ transferred,
+ recipient_cnt,
+ embryo_type,
+ embryo_source,
+ destination,
+ storage_method,
+ flush_operator,
+ collect_operator,
+ remark,
+ created_by,
+ created_at,
+
+
+ #{flushTime},
+ #{donorFemaleNo},
+ #{donorMaleNo},
+ #{gradeAPlus},
+ #{gradeA},
+ #{gradeB},
+ #{gradeC},
+ #{gradeD},
+ #{cell24},
+ #{cell8},
+ #{cell16},
+ #{unfertilized},
+ #{degenerated},
+ #{transferred},
+ #{recipientCnt},
+ #{embryoType},
+ #{embryoSource},
+ #{destination},
+ #{storageMethod},
+ #{flushOperator},
+ #{collectOperator},
+ #{remark},
+ #{createdBy},
+ #{createdAt},
+
+
+
+
+ update sc_embryo_flush
+
+ flush_time = #{flushTime},
+ donor_female_no = #{donorFemaleNo},
+ donor_male_no = #{donorMaleNo},
+ grade_a_plus = #{gradeAPlus},
+ grade_a = #{gradeA},
+ grade_b = #{gradeB},
+ grade_c = #{gradeC},
+ grade_d = #{gradeD},
+ cell_2_4 = #{cell24},
+ cell_8 = #{cell8},
+ cell_16 = #{cell16},
+ unfertilized = #{unfertilized},
+ degenerated = #{degenerated},
+ transferred = #{transferred},
+ recipient_cnt = #{recipientCnt},
+ embryo_type = #{embryoType},
+ embryo_source = #{embryoSource},
+ destination = #{destination},
+ storage_method = #{storageMethod},
+ flush_operator = #{flushOperator},
+ collect_operator = #{collectOperator},
+ remark = #{remark},
+ created_by = #{createdBy},
+ created_at = #{createdAt},
+
+ where id = #{id}
+
+
+
+ delete from sc_embryo_flush where id = #{id}
+
+
+
+ delete from sc_embryo_flush where id in
+
+ #{id}
+
+
+
\ No newline at end of file
diff --git a/zhyc-framework/src/main/java/com/zhyc/framework/web/service/SysLoginService.java b/zhyc-framework/src/main/java/com/zhyc/framework/web/service/SysLoginService.java
index 854517f..581b332 100644
--- a/zhyc-framework/src/main/java/com/zhyc/framework/web/service/SysLoginService.java
+++ b/zhyc-framework/src/main/java/com/zhyc/framework/web/service/SysLoginService.java
@@ -54,17 +54,18 @@ public class SysLoginService
/**
* 登录验证
- *
+ *
* @param username 用户名
* @param password 密码
- * @param code 验证码
- * @param uuid 唯一标识
+ * @param code 验证码
+ * @param uuid 唯一标识
+ * @param flag 是否开启验证
* @return 结果
*/
- public String login(String username, String password, String code, String uuid)
+ public String login(String username, String password, String code, String uuid, boolean flag)
{
// 验证码校验
- validateCaptcha(username, code, uuid);
+ validateCaptcha(username, code, uuid,flag);
// 登录前置校验
loginPreCheck(username, password);
// 用户验证
@@ -106,12 +107,13 @@ public class SysLoginService
* @param username 用户名
* @param code 验证码
* @param uuid 唯一标识
+ * @param flag 是否进行验证码校验
* @return 结果
*/
- public void validateCaptcha(String username, String code, String uuid)
+ public void validateCaptcha(String username, String code, String uuid,boolean flag)
{
boolean captchaEnabled = configService.selectCaptchaEnabled();
- if (captchaEnabled)
+ if (captchaEnabled && !flag)
{
String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
String captcha = redisCache.getCacheObject(verifyKey);
diff --git a/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java b/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java
index 9160779..78dccce 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/common/domain/UserPost.java
@@ -4,9 +4,11 @@ import lombok.Data;
@Data
public class UserPost {
+// 用户id
+ private String userId;
// 用户名
private String nickName;
-// 用户
+// 岗位名称
private String postName;
// 岗位编码
private String postCode;
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFeController.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFeController.java
new file mode 100644
index 0000000..979b92c
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFeController.java
@@ -0,0 +1,156 @@
+package com.zhyc.module.frozen.controller;
+
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zhyc.common.utils.SecurityUtils;
+import com.zhyc.common.utils.StringUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import com.zhyc.common.annotation.Log;
+import com.zhyc.common.core.controller.BaseController;
+import com.zhyc.common.core.domain.AjaxResult;
+import com.zhyc.common.enums.BusinessType;
+import com.zhyc.module.frozen.domain.DdFe;
+import com.zhyc.module.frozen.service.IDdFeService;
+import com.zhyc.common.utils.poi.ExcelUtil;
+import com.zhyc.common.core.page.TableDataInfo;
+
+/**
+ * 冻胚库存Controller
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+@RestController
+@RequestMapping("/frozen/embryo")
+public class DdFeController extends BaseController
+{
+ @Autowired
+ private IDdFeService ddFeService;
+
+ /**
+ * 查询冻胚库存列表
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(DdFe ddFe)
+ {
+ startPage();
+ List list = ddFeService.selectDdFeList(ddFe);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出冻胚库存列表
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:export')")
+ @Log(title = "冻胚库存", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DdFe ddFe)
+ {
+ List list = ddFeService.selectDdFeList(ddFe);
+ ExcelUtil util = new ExcelUtil(DdFe.class);
+ util.exportExcel(response, list, "冻胚库存数据");
+ }
+
+ /**
+ * 获取冻胚库存详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(ddFeService.selectDdFeById(id));
+ }
+
+ /**
+ * 新增冻胚库存
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:add')")
+ @Log(title = "冻胚库存", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody DdFe ddFe)
+ {
+ ddFe.setCreateBy(SecurityUtils.getUsername());
+ return toAjax(ddFeService.insertDdFe(ddFe));
+ }
+
+ /**
+ * 修改冻胚库存
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:edit')")
+ @Log(title = "冻胚库存", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody DdFe ddFe)
+ {
+ return toAjax(ddFeService.updateDdFe(ddFe));
+ }
+
+ /**
+ * 删除冻胚库存
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:remove')")
+ @Log(title = "冻胚库存", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(ddFeService.deleteDdFeByIds(ids));
+ }
+
+ /**
+ * 根据供体母羊耳号获取最近一次冲胚信息
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:add')")
+ @GetMapping("/getFlushInfoByEwe/{eweNo}")
+ public AjaxResult getFlushInfoByEwe(@PathVariable("eweNo") String eweNo) {
+ if (StringUtils.isBlank(eweNo)) {
+ return error("耳号不能为空");
+ }
+ Map echo = ddFeService.getLastFlushInfoByEwe(eweNo.trim());
+ return echo == null ? error("该母羊无冲胚记录,请先录入冲胚记录") : success(echo);
+ }
+
+ /**
+ * 根据母羊耳号 + 胚胎等级 返回该等级数量
+ * 无记录返回 0
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:add')")
+ @GetMapping("/getQtyByGrade")
+ public AjaxResult getQtyByGrade(@RequestParam String eweNo,
+ @RequestParam String grade) {
+ Map flush = ddFeService.getLastFlushInfoByEwe(eweNo);
+ if (flush == null) return success(0);
+
+ Integer qty;
+ switch (grade) {
+ case "A": qty = (Integer) flush.getOrDefault("gradeA", 0); break;
+ case "B": qty = (Integer) flush.getOrDefault("gradeB", 0); break;
+ case "C": qty = (Integer) flush.getOrDefault("gradeC", 0); break;
+ case "D": qty = (Integer) flush.getOrDefault("gradeD", 0); break;
+ case "囊胚": qty = (Integer) flush.getOrDefault("cell24", 0); break;
+ case "桑椹胚": qty = (Integer) flush.getOrDefault("cell8", 0); break;
+ default: qty = 0;
+ }
+ return success(qty);
+ }
+
+ /**
+ * 批量废弃
+ */
+ @PreAuthorize("@ss.hasPermi('frozen:embryo:discard')")
+ @Log(title = "冻胚库存", businessType = BusinessType.UPDATE)
+ @PutMapping("/batchDiscard")
+ public AjaxResult batchDiscard(@RequestBody List list) {
+ if (list == null || list.isEmpty()) {
+ return error("请选择要废弃的记录");
+ }
+ list.forEach(dto -> {
+ dto.setStatus("废弃");
+ ddFeService.discard(dto);
+ });
+ return success();
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFsController.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFsController.java
new file mode 100644
index 0000000..cda2832
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFsController.java
@@ -0,0 +1,114 @@
+package com.zhyc.module.frozen.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+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.core.controller.BaseController;
+import com.zhyc.common.core.domain.AjaxResult;
+import com.zhyc.common.enums.BusinessType;
+import com.zhyc.module.frozen.domain.DdFs;
+import com.zhyc.module.frozen.service.IDdFsService;
+import com.zhyc.common.utils.poi.ExcelUtil;
+import com.zhyc.common.core.page.TableDataInfo;
+
+/**
+ * 冻精库存Controller
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+@RestController
+@RequestMapping("/sperm/sperm")
+public class DdFsController extends BaseController
+{
+ @Autowired
+ private IDdFsService ddFsService;
+
+ /**
+ * 查询冻精库存列表
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(DdFs ddFs)
+ {
+ startPage();
+ List list = ddFsService.selectDdFsList(ddFs);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出冻精库存列表
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:export')")
+ @Log(title = "冻精库存", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DdFs ddFs)
+ {
+ List list = ddFsService.selectDdFsList(ddFs);
+ ExcelUtil util = new ExcelUtil(DdFs.class);
+ util.exportExcel(response, list, "冻精库存数据");
+ }
+
+ /**
+ * 获取冻精库存详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(ddFsService.selectDdFsById(id));
+ }
+
+ /**
+ * 新增冻精库存
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:add')")
+ @Log(title = "冻精库存", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody DdFs ddFs)
+ {
+ return toAjax(ddFsService.insertDdFs(ddFs));
+ }
+
+ /**
+ * 修改冻精库存
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:edit')")
+ @Log(title = "冻精库存", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody DdFs ddFs)
+ {
+ return toAjax(ddFsService.updateDdFs(ddFs));
+ }
+
+ /**
+ * 删除冻精库存
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:remove')")
+ @Log(title = "冻精库存", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(ddFsService.deleteDdFsByIds(ids));
+ }
+
+ /**
+ * 批量废弃
+ */
+ @PreAuthorize("@ss.hasPermi('sperm:sperm:discard')")
+ @Log(title = "冻精库存", businessType = BusinessType.UPDATE)
+ @PutMapping("/discard")
+ public AjaxResult discard(@RequestBody List list) {
+ return AjaxResult.success(ddFsService.discard(list));
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdSaleController.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdSaleController.java
new file mode 100644
index 0000000..d78b11f
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdSaleController.java
@@ -0,0 +1,104 @@
+package com.zhyc.module.frozen.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+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.core.controller.BaseController;
+import com.zhyc.common.core.domain.AjaxResult;
+import com.zhyc.common.enums.BusinessType;
+import com.zhyc.module.frozen.domain.DdSale;
+import com.zhyc.module.frozen.service.IDdSaleService;
+import com.zhyc.common.utils.poi.ExcelUtil;
+import com.zhyc.common.core.page.TableDataInfo;
+
+/**
+ * 销售主单Controller
+ *
+ * @author HashMap
+ * @date 2025-12-01
+ */
+@RestController
+@RequestMapping("/sale/sale")
+public class DdSaleController extends BaseController
+{
+ @Autowired
+ private IDdSaleService ddSaleService;
+
+ /**
+ * 查询销售主单列表
+ */
+ @PreAuthorize("@ss.hasPermi('sale:sale:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(DdSale ddSale)
+ {
+ startPage();
+ List list = ddSaleService.selectDdSaleList(ddSale);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出销售主单列表
+ */
+ @PreAuthorize("@ss.hasPermi('sale:sale:export')")
+ @Log(title = "销售主单", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, DdSale ddSale)
+ {
+ List list = ddSaleService.selectDdSaleList(ddSale);
+ ExcelUtil util = new ExcelUtil(DdSale.class);
+ util.exportExcel(response, list, "销售主单数据");
+ }
+
+ /**
+ * 获取销售主单详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('sale:sale:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(ddSaleService.selectDdSaleById(id));
+ }
+
+ /**
+ * 新增销售主单
+ */
+ @PreAuthorize("@ss.hasPermi('sale:sale:add')")
+ @Log(title = "销售主单", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody DdSale ddSale)
+ {
+ return toAjax(ddSaleService.insertDdSale(ddSale));
+ }
+
+ /**
+ * 修改销售主单
+ */
+ @PreAuthorize("@ss.hasPermi('sale:sale:edit')")
+ @Log(title = "销售主单", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody DdSale ddSale)
+ {
+ return toAjax(ddSaleService.updateDdSale(ddSale));
+ }
+
+ /**
+ * 删除销售主单
+ */
+ @PreAuthorize("@ss.hasPermi('sale:sale:remove')")
+ @Log(title = "销售主单", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(ddSaleService.deleteDdSaleByIds(ids));
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFe.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFe.java
new file mode 100644
index 0000000..0bbab98
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFe.java
@@ -0,0 +1,299 @@
+package com.zhyc.module.frozen.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zhyc.common.annotation.Excel;
+import com.zhyc.common.core.domain.BaseEntity;
+
+/**
+ * 冻胚库存对象 dd_fe
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+public class DdFe extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 主键 */
+ private Long id;
+
+ /** 胚胎编号 YS+日期+序号 */
+ @Excel(name = "胚胎编号")
+ private String code;
+
+ /** 冻胚日期(事件录入日) */
+ @Excel(name = "冻胚日期", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date freezeDate;
+
+ /** 供体公羊耳号 */
+ @Excel(name = "供体公羊耳号")
+ private String drId;
+
+ /** 供体公羊品种 */
+ @Excel(name = "供体公羊品种")
+ private String drBreed;
+
+ /** 供体母羊耳号 */
+ @Excel(name = "供体母羊耳号")
+ private String deId;
+
+ /** 供体母羊品种 */
+ @Excel(name = "供体母羊品种")
+ private String deBreed;
+
+ /** 胚胎品种(自动生成) */
+ @Excel(name = "胚胎品种")
+ private String embBreed;
+
+ /** 胚胎阶段等级('A', 'B', 'C', 'D', '囊胚', '桑椹胚') */
+ @Excel(name = "胚胎阶段等级")
+ private String grade;
+
+ /** 胚胎数量 */
+ @Excel(name = "胚胎数量")
+ private Long qty;
+
+ /** 是否性控 1是 0否 */
+ @Excel(name = "是否性控",readConverterExp = "1=是,0=否")
+ private Integer sexCtl;
+
+ /** 状态(0正常1销售 2自用3废弃) */
+ @Excel(name = "状态")
+ private String status;
+
+ /** 技术员 */
+ @Excel(name = "技术员")
+ private String tech;
+
+ /** 液氮罐ID */
+ @Excel(name = "液氮罐ID")
+ private Long tankId;
+
+ /** 提桶ID */
+ @Excel(name = "提桶ID")
+ private Long bucketId;
+
+ /** 冷冻架ID */
+ @Excel(name = "冷冻架ID")
+ private Long rackId;
+
+ /** 出库日期(出库后回写) */
+ @Excel(name = "出库日期", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date outDate;
+
+ /** 废弃原因(废弃时填写) */
+ @Excel(name = "废弃原因")
+ private String discardTxt;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setCode(String code)
+ {
+ this.code = code;
+ }
+
+ public String getCode()
+ {
+ return code;
+ }
+
+ public void setFreezeDate(Date freezeDate)
+ {
+ this.freezeDate = freezeDate;
+ }
+
+ public Date getFreezeDate()
+ {
+ return freezeDate;
+ }
+
+ public void setDrId(String drId)
+ {
+ this.drId = drId;
+ }
+
+ public String getDrId()
+ {
+ return drId;
+ }
+
+ public void setDrBreed(String drBreed)
+ {
+ this.drBreed = drBreed;
+ }
+
+ public String getDrBreed()
+ {
+ return drBreed;
+ }
+
+ public void setDeId(String deId)
+ {
+ this.deId = deId;
+ }
+
+ public String getDeId()
+ {
+ return deId;
+ }
+
+ public void setDeBreed(String deBreed)
+ {
+ this.deBreed = deBreed;
+ }
+
+ public String getDeBreed()
+ {
+ return deBreed;
+ }
+
+ public void setEmbBreed(String embBreed)
+ {
+ this.embBreed = embBreed;
+ }
+
+ public String getEmbBreed()
+ {
+ return embBreed;
+ }
+
+ public void setGrade(String grade)
+ {
+ this.grade = grade;
+ }
+
+ public String getGrade()
+ {
+ return grade;
+ }
+
+ public void setQty(Long qty)
+ {
+ this.qty = qty;
+ }
+
+ public Long getQty()
+ {
+ return qty;
+ }
+
+ public void setSexCtl(Integer sexCtl)
+ {
+ this.sexCtl = sexCtl;
+ }
+
+ public Integer getSexCtl()
+ {
+ return sexCtl;
+ }
+
+ public void setStatus(String status)
+ {
+ this.status = status;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+
+ public void setTech(String tech)
+ {
+ this.tech = tech;
+ }
+
+ public String getTech()
+ {
+ return tech;
+ }
+
+ public void setTankId(Long tankId)
+ {
+ this.tankId = tankId;
+ }
+
+ public Long getTankId()
+ {
+ return tankId;
+ }
+
+ public void setBucketId(Long bucketId)
+ {
+ this.bucketId = bucketId;
+ }
+
+ public Long getBucketId()
+ {
+ return bucketId;
+ }
+
+ public void setRackId(Long rackId)
+ {
+ this.rackId = rackId;
+ }
+
+ public Long getRackId()
+ {
+ return rackId;
+ }
+
+ public void setOutDate(Date outDate)
+ {
+ this.outDate = outDate;
+ }
+
+ public Date getOutDate()
+ {
+ return outDate;
+ }
+
+ public void setDiscardTxt(String discardTxt)
+ {
+ this.discardTxt = discardTxt;
+ }
+
+ public String getDiscardTxt()
+ {
+ return discardTxt;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("code", getCode())
+ .append("freezeDate", getFreezeDate())
+ .append("drId", getDrId())
+ .append("drBreed", getDrBreed())
+ .append("deId", getDeId())
+ .append("deBreed", getDeBreed())
+ .append("embBreed", getEmbBreed())
+ .append("grade", getGrade())
+ .append("qty", getQty())
+ .append("sexCtl", getSexCtl())
+ .append("status", getStatus())
+ .append("tech", getTech())
+ .append("tankId", getTankId())
+ .append("bucketId", getBucketId())
+ .append("rackId", getRackId())
+ .append("outDate", getOutDate())
+ .append("discardTxt", getDiscardTxt())
+ .append("remark", getRemark())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .toString();
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFs.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFs.java
new file mode 100644
index 0000000..50e7c1b
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFs.java
@@ -0,0 +1,254 @@
+package com.zhyc.module.frozen.domain;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zhyc.common.annotation.Excel;
+import com.zhyc.common.core.domain.BaseEntity;
+
+/**
+ * 冻精库存对象 dd_fs
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+public class DdFs extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private Long id;
+
+ /**
+ * 冻精号/公羊耳号
+ */
+ @Excel(name = "冻精号")
+ private String code;
+
+ /**
+ * 冻精日期(事件录入日)
+ */
+ @Excel(name = "冻精日期", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date freezeDt;
+
+ /**
+ * 冻精品种(同公羊品种)
+ */
+ @Excel(name = "冻精品种")
+ private String breed;
+
+ /**
+ * 生产批次(日期格式)
+ */
+ @Excel(name = "生产批次")
+ private String batch;
+
+ /**
+ * 规格(0.25mL,0.5mL)
+ */
+ @Excel(name = "规格")
+ private String spec;
+
+ /**
+ * 数量(支)
+ */
+ @Excel(name = "数量")
+ private Long qty;
+
+ /**
+ * 是否性控 1是 0否
+ */
+ @Excel(name = "是否性控", readConverterExp = "1=是,0=否")
+ private Integer sexCtl;
+
+ /**
+ * 状态(0正常1销售2自用3废弃)
+ */
+ @Excel(name = "状态")
+ private String stat;
+
+ /**
+ * 技术员
+ */
+ @Excel(name = "技术员")
+ private String tech;
+
+ /**
+ * 液氮罐ID
+ */
+ @Excel(name = "液氮罐ID")
+ private Long tankId;
+
+ /**
+ * 提桶ID
+ */
+ @Excel(name = "提桶ID")
+ private Long bucketId;
+
+ /**
+ * 冷冻架ID
+ */
+ @Excel(name = "冷冻架ID")
+ private Long rackId;
+
+ /**
+ * 出库日期(出库后回写)
+ */
+ @Excel(name = "出库日期", dateFormat = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date outDt;
+
+ /**
+ * 废弃原因
+ */
+ @Excel(name = "废弃原因")
+ private String discardTxt;
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setFreezeDt(Date freezeDt) {
+ this.freezeDt = freezeDt;
+ }
+
+ public Date getFreezeDt() {
+ return freezeDt;
+ }
+
+ public void setBreed(String breed) {
+ this.breed = breed;
+ }
+
+ public String getBreed() {
+ return breed;
+ }
+
+ public void setBatch(String batch) {
+ this.batch = batch;
+ }
+
+ public String getBatch() {
+ return batch;
+ }
+
+ public void setSpec(String spec) {
+ this.spec = spec;
+ }
+
+ public String getSpec() {
+ return spec;
+ }
+
+ public void setQty(Long qty) {
+ this.qty = qty;
+ }
+
+ public Long getQty() {
+ return qty;
+ }
+
+ public void setSexCtl(Integer sexCtl) {
+ this.sexCtl = sexCtl;
+ }
+
+ public Integer getSexCtl() {
+ return sexCtl;
+ }
+
+ public void setStat(String stat) {
+ this.stat = stat;
+ }
+
+ public String getStat() {
+ return stat;
+ }
+
+ public void setTech(String tech) {
+ this.tech = tech;
+ }
+
+ public String getTech() {
+ return tech;
+ }
+
+ public void setTankId(Long tankId) {
+ this.tankId = tankId;
+ }
+
+ public Long getTankId() {
+ return tankId;
+ }
+
+ public void setBucketId(Long bucketId) {
+ this.bucketId = bucketId;
+ }
+
+ public Long getBucketId() {
+ return bucketId;
+ }
+
+ public void setRackId(Long rackId) {
+ this.rackId = rackId;
+ }
+
+ public Long getRackId() {
+ return rackId;
+ }
+
+ public void setOutDt(Date outDt) {
+ this.outDt = outDt;
+ }
+
+ public Date getOutDt() {
+ return outDt;
+ }
+
+ public void setDiscardTxt(String discardTxt) {
+ this.discardTxt = discardTxt;
+ }
+
+ public String getDiscardTxt() {
+ return discardTxt;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("code", getCode())
+ .append("freezeDt", getFreezeDt())
+ .append("breed", getBreed())
+ .append("batch", getBatch())
+ .append("spec", getSpec())
+ .append("qty", getQty())
+ .append("sexCtl", getSexCtl())
+ .append("stat", getStat())
+ .append("tech", getTech())
+ .append("tankId", getTankId())
+ .append("bucketId", getBucketId())
+ .append("rackId", getRackId())
+ .append("outDt", getOutDt())
+ .append("discardTxt", getDiscardTxt())
+ .append("remark", getRemark())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .toString();
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdSale.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdSale.java
new file mode 100644
index 0000000..dc112c6
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdSale.java
@@ -0,0 +1,194 @@
+package com.zhyc.module.frozen.domain;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zhyc.common.annotation.Excel;
+import com.zhyc.common.core.domain.BaseEntity;
+
+/**
+ * 销售主单对象 dd_sl
+ *
+ * @author HashMap
+ * @date 2025-12-01
+ */
+public class DdSale extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 主键 */
+ private Long id;
+
+ /** 销售日期 */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "销售日期", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date saleDate;
+
+ /** 客户名称 */
+ @Excel(name = "客户名称")
+ private String custName;
+
+ /** 客户电话 */
+ @Excel(name = "客户电话")
+ private String custPhone;
+
+ /** 客户地址 */
+ @Excel(name = "客户地址")
+ private String custAddr;
+
+ /** 销售人员 */
+ @Excel(name = "销售人员")
+ private String salesper;
+
+ /** 检疫证号(可选) */
+ @Excel(name = "检疫证号", readConverterExp = "可=选")
+ private String quaranNo;
+
+ /** 审批编号(可选) */
+ @Excel(name = "审批编号", readConverterExp = "可=选")
+ private String apprNo;
+
+ /** 总价 */
+ @Excel(name = "总价")
+ private BigDecimal price;
+
+ /** 技术员 */
+ @Excel(name = "技术员")
+ private String tech;
+
+ /** 销售明细信息 */
+ private List ddSaleItemList;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setSaleDate(Date saleDate)
+ {
+ this.saleDate = saleDate;
+ }
+
+ public Date getSaleDate()
+ {
+ return saleDate;
+ }
+
+ public void setCustName(String custName)
+ {
+ this.custName = custName;
+ }
+
+ public String getCustName()
+ {
+ return custName;
+ }
+
+ public void setCustPhone(String custPhone)
+ {
+ this.custPhone = custPhone;
+ }
+
+ public String getCustPhone()
+ {
+ return custPhone;
+ }
+
+ public void setCustAddr(String custAddr)
+ {
+ this.custAddr = custAddr;
+ }
+
+ public String getCustAddr()
+ {
+ return custAddr;
+ }
+
+ public void setSalesper(String salesper)
+ {
+ this.salesper = salesper;
+ }
+
+ public String getSalesper()
+ {
+ return salesper;
+ }
+
+ public void setQuaranNo(String quaranNo)
+ {
+ this.quaranNo = quaranNo;
+ }
+
+ public String getQuaranNo()
+ {
+ return quaranNo;
+ }
+
+ public void setApprNo(String apprNo)
+ {
+ this.apprNo = apprNo;
+ }
+
+ public String getApprNo()
+ {
+ return apprNo;
+ }
+
+ public void setPrice(BigDecimal price)
+ {
+ this.price = price;
+ }
+
+ public BigDecimal getPrice()
+ {
+ return price;
+ }
+
+ public void setTech(String tech)
+ {
+ this.tech = tech;
+ }
+
+ public String getTech()
+ {
+ return tech;
+ }
+
+ public List getDdSaleItemList()
+ {
+ return ddSaleItemList;
+ }
+
+ public void setDdSaleItemList(List ddSaleItemList)
+ {
+ this.ddSaleItemList = ddSaleItemList;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("saleDate", getSaleDate())
+ .append("custName", getCustName())
+ .append("custPhone", getCustPhone())
+ .append("custAddr", getCustAddr())
+ .append("salesper", getSalesper())
+ .append("quaranNo", getQuaranNo())
+ .append("apprNo", getApprNo())
+ .append("price", getPrice())
+ .append("tech", getTech())
+ .append("remark", getRemark())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("ddSaleItemList", getDdSaleItemList())
+ .toString();
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdSaleItem.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdSaleItem.java
new file mode 100644
index 0000000..99a1a2c
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdSaleItem.java
@@ -0,0 +1,151 @@
+package com.zhyc.module.frozen.domain;
+
+import java.math.BigDecimal;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zhyc.common.annotation.Excel;
+import com.zhyc.common.core.domain.BaseEntity;
+
+/**
+ * 销售明细对象 dd_sl_item
+ *
+ * @author HashMap
+ * @date 2025-12-01
+ */
+public class DdSaleItem extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 主键 */
+ private Long id;
+
+ /** 销售主单ID */
+ @Excel(name = "销售主单ID")
+ private Long saleId;
+
+ /** 明细类型(冻胚embryo冻精semen) */
+ @Excel(name = "明细类型", readConverterExp = "冻=胚embryo冻精semen")
+ private String itemType;
+
+ /** 胚胎编号或冻精号 */
+ @Excel(name = "胚胎编号或冻精号")
+ private String itemCode;
+
+ /** 数量 */
+ @Excel(name = "数量")
+ private Long qty;
+
+ /** 单价(元) */
+ @Excel(name = "单价", readConverterExp = "元=")
+ private BigDecimal unitPrice;
+
+ /** 所在液氮罐ID */
+ @Excel(name = "所在液氮罐ID")
+ private Long tankId;
+
+ /** 所在提桶ID */
+ @Excel(name = "所在提桶ID")
+ private Long bucketId;
+
+ /** 所在冷冻架ID */
+ @Excel(name = "所在冷冻架ID")
+ private Long rackId;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setSaleId(Long saleId)
+ {
+ this.saleId = saleId;
+ }
+
+ public Long getSaleId()
+ {
+ return saleId;
+ }
+ public void setItemType(String itemType)
+ {
+ this.itemType = itemType;
+ }
+
+ public String getItemType()
+ {
+ return itemType;
+ }
+ public void setItemCode(String itemCode)
+ {
+ this.itemCode = itemCode;
+ }
+
+ public String getItemCode()
+ {
+ return itemCode;
+ }
+ public void setQty(Long qty)
+ {
+ this.qty = qty;
+ }
+
+ public Long getQty()
+ {
+ return qty;
+ }
+ public void setUnitPrice(BigDecimal unitPrice)
+ {
+ this.unitPrice = unitPrice;
+ }
+
+ public BigDecimal getUnitPrice()
+ {
+ return unitPrice;
+ }
+ public void setTankId(Long tankId)
+ {
+ this.tankId = tankId;
+ }
+
+ public Long getTankId()
+ {
+ return tankId;
+ }
+ public void setBucketId(Long bucketId)
+ {
+ this.bucketId = bucketId;
+ }
+
+ public Long getBucketId()
+ {
+ return bucketId;
+ }
+ public void setRackId(Long rackId)
+ {
+ this.rackId = rackId;
+ }
+
+ public Long getRackId()
+ {
+ return rackId;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("saleId", getSaleId())
+ .append("itemType", getItemType())
+ .append("itemCode", getItemCode())
+ .append("qty", getQty())
+ .append("unitPrice", getUnitPrice())
+ .append("tankId", getTankId())
+ .append("bucketId", getBucketId())
+ .append("rackId", getRackId())
+ .append("createTime", getCreateTime())
+ .toString();
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFeMapper.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFeMapper.java
new file mode 100644
index 0000000..ded9e82
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFeMapper.java
@@ -0,0 +1,75 @@
+package com.zhyc.module.frozen.mapper;
+
+import java.util.List;
+import java.util.Map;
+
+import com.zhyc.module.frozen.domain.DdFe;
+import com.zhyc.module.produce.breed.domain.ScEmbryoFlush;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 冻胚库存Mapper接口
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+public interface DdFeMapper
+{
+ /**
+ * 查询冻胚库存
+ *
+ * @param id 冻胚库存主键
+ * @return 冻胚库存
+ */
+ public DdFe selectDdFeById(Long id);
+
+ /**
+ * 查询冻胚库存列表
+ *
+ * @param ddFe 冻胚库存
+ * @return 冻胚库存集合
+ */
+ public List selectDdFeList(DdFe ddFe);
+
+ /**
+ * 新增冻胚库存
+ *
+ * @param ddFe 冻胚库存
+ * @return 结果
+ */
+ public int insertDdFe(DdFe ddFe);
+
+ /**
+ * 修改冻胚库存
+ *
+ * @param ddFe 冻胚库存
+ * @return 结果
+ */
+ public int updateDdFe(DdFe ddFe);
+
+ /**
+ * 删除冻胚库存
+ *
+ * @param id 冻胚库存主键
+ * @return 结果
+ */
+ public int deleteDdFeById(Long id);
+
+ /**
+ * 批量删除冻胚库存
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDdFeByIds(Long[] ids);
+
+ /**
+ * 按母羊耳号取最新一条冲胚记录(只读)
+ */
+ Map selectFlushByEwe(@Param("eweNo") String eweNo);
+
+ /**
+ * 废弃更新(只改状态、出库日期、废弃原因、更新人)
+ */
+ int updateDiscard(DdFe dto);
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFsMapper.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFsMapper.java
new file mode 100644
index 0000000..4afdfc7
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFsMapper.java
@@ -0,0 +1,61 @@
+package com.zhyc.module.frozen.mapper;
+
+import java.util.List;
+import com.zhyc.module.frozen.domain.DdFs;
+
+/**
+ * 冻精库存Mapper接口
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+public interface DdFsMapper
+{
+ /**
+ * 查询冻精库存
+ *
+ * @param id 冻精库存主键
+ * @return 冻精库存
+ */
+ public DdFs selectDdFsById(Long id);
+
+ /**
+ * 查询冻精库存列表
+ *
+ * @param ddFs 冻精库存
+ * @return 冻精库存集合
+ */
+ public List selectDdFsList(DdFs ddFs);
+
+ /**
+ * 新增冻精库存
+ *
+ * @param ddFs 冻精库存
+ * @return 结果
+ */
+ public int insertDdFs(DdFs ddFs);
+
+ /**
+ * 修改冻精库存
+ *
+ * @param ddFs 冻精库存
+ * @return 结果
+ */
+ public int updateDdFs(DdFs ddFs);
+
+ /**
+ * 删除冻精库存
+ *
+ * @param id 冻精库存主键
+ * @return 结果
+ */
+ public int deleteDdFsById(Long id);
+
+ /**
+ * 批量删除冻精库存
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDdFsByIds(Long[] ids);
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdSaleMapper.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdSaleMapper.java
new file mode 100644
index 0000000..0094fd3
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdSaleMapper.java
@@ -0,0 +1,87 @@
+package com.zhyc.module.frozen.mapper;
+
+import java.util.List;
+import com.zhyc.module.frozen.domain.DdSale;
+import com.zhyc.module.frozen.domain.DdSaleItem;
+
+/**
+ * 销售主单Mapper接口
+ *
+ * @author HashMap
+ * @date 2025-12-01
+ */
+public interface DdSaleMapper
+{
+ /**
+ * 查询销售主单
+ *
+ * @param id 销售主单主键
+ * @return 销售主单
+ */
+ public DdSale selectDdSaleById(Long id);
+
+ /**
+ * 查询销售主单列表
+ *
+ * @param ddSale 销售主单
+ * @return 销售主单集合
+ */
+ public List selectDdSaleList(DdSale ddSale);
+
+ /**
+ * 新增销售主单
+ *
+ * @param ddSale 销售主单
+ * @return 结果
+ */
+ public int insertDdSale(DdSale ddSale);
+
+ /**
+ * 修改销售主单
+ *
+ * @param ddSale 销售主单
+ * @return 结果
+ */
+ public int updateDdSale(DdSale ddSale);
+
+ /**
+ * 删除销售主单
+ *
+ * @param id 销售主单主键
+ * @return 结果
+ */
+ public int deleteDdSaleById(Long id);
+
+ /**
+ * 批量删除销售主单
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDdSaleByIds(Long[] ids);
+
+ /**
+ * 批量删除销售明细
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteDdSaleItemBySaleIds(Long[] ids);
+
+ /**
+ * 批量新增销售明细
+ *
+ * @param ddSaleItemList 销售明细列表
+ * @return 结果
+ */
+ public int batchDdSaleItem(List ddSaleItemList);
+
+
+ /**
+ * 通过销售主单主键删除销售明细信息
+ *
+ * @param id 销售主单ID
+ * @return 结果
+ */
+ public int deleteDdSaleItemBySaleId(Long id);
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFeService.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFeService.java
new file mode 100644
index 0000000..d047937
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFeService.java
@@ -0,0 +1,70 @@
+package com.zhyc.module.frozen.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.zhyc.module.frozen.domain.DdFe;
+
+/**
+ * 冻胚库存Service接口
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+public interface IDdFeService {
+ /**
+ * 查询冻胚库存
+ *
+ * @param id 冻胚库存主键
+ * @return 冻胚库存
+ */
+ public DdFe selectDdFeById(Long id);
+
+ /**
+ * 查询冻胚库存列表
+ *
+ * @param ddFe 冻胚库存
+ * @return 冻胚库存集合
+ */
+ public List selectDdFeList(DdFe ddFe);
+
+ /**
+ * 新增冻胚库存
+ *
+ * @param ddFe 冻胚库存
+ * @return 结果
+ */
+ public int insertDdFe(DdFe ddFe);
+
+ /**
+ * 修改冻胚库存
+ *
+ * @param ddFe 冻胚库存
+ * @return 结果
+ */
+ public int updateDdFe(DdFe ddFe);
+
+ /**
+ * 批量删除冻胚库存
+ *
+ * @param ids 需要删除的冻胚库存主键集合
+ * @return 结果
+ */
+ public int deleteDdFeByIds(Long[] ids);
+
+ /**
+ * 删除冻胚库存信息
+ *
+ * @param id 冻胚库存主键
+ * @return 结果
+ */
+ public int deleteDdFeById(Long id);
+
+ /**
+ * 根据母羊耳号取最近一次冲胚信息
+ */
+ Map getLastFlushInfoByEwe(String eweNo);
+
+ // 废弃
+ int discard(DdFe dto);
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFsService.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFsService.java
new file mode 100644
index 0000000..a800579
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFsService.java
@@ -0,0 +1,64 @@
+package com.zhyc.module.frozen.service;
+
+import java.util.List;
+
+import com.zhyc.module.frozen.domain.DdFs;
+
+/**
+ * 冻精库存Service接口
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+public interface IDdFsService {
+ /**
+ * 查询冻精库存
+ *
+ * @param id 冻精库存主键
+ * @return 冻精库存
+ */
+ public DdFs selectDdFsById(Long id);
+
+ /**
+ * 查询冻精库存列表
+ *
+ * @param ddFs 冻精库存
+ * @return 冻精库存集合
+ */
+ public List selectDdFsList(DdFs ddFs);
+
+ /**
+ * 新增冻精库存
+ *
+ * @param ddFs 冻精库存
+ * @return 结果
+ */
+ public int insertDdFs(DdFs ddFs);
+
+ /**
+ * 修改冻精库存
+ *
+ * @param ddFs 冻精库存
+ * @return 结果
+ */
+ public int updateDdFs(DdFs ddFs);
+
+ /**
+ * 批量删除冻精库存
+ *
+ * @param ids 需要删除的冻精库存主键集合
+ * @return 结果
+ */
+ public int deleteDdFsByIds(Long[] ids);
+
+ /**
+ * 删除冻精库存信息
+ *
+ * @param id 冻精库存主键
+ * @return 结果
+ */
+ public int deleteDdFsById(Long id);
+
+ //废弃
+ int discard(List list);
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdSaleService.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdSaleService.java
new file mode 100644
index 0000000..75340d8
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdSaleService.java
@@ -0,0 +1,61 @@
+package com.zhyc.module.frozen.service;
+
+import java.util.List;
+import com.zhyc.module.frozen.domain.DdSale;
+
+/**
+ * 销售主单Service接口
+ *
+ * @author HashMap
+ * @date 2025-12-01
+ */
+public interface IDdSaleService
+{
+ /**
+ * 查询销售主单
+ *
+ * @param id 销售主单主键
+ * @return 销售主单
+ */
+ public DdSale selectDdSaleById(Long id);
+
+ /**
+ * 查询销售主单列表
+ *
+ * @param ddSale 销售主单
+ * @return 销售主单集合
+ */
+ public List selectDdSaleList(DdSale ddSale);
+
+ /**
+ * 新增销售主单
+ *
+ * @param ddSale 销售主单
+ * @return 结果
+ */
+ public int insertDdSale(DdSale ddSale);
+
+ /**
+ * 修改销售主单
+ *
+ * @param ddSale 销售主单
+ * @return 结果
+ */
+ public int updateDdSale(DdSale ddSale);
+
+ /**
+ * 批量删除销售主单
+ *
+ * @param ids 需要删除的销售主单主键集合
+ * @return 结果
+ */
+ public int deleteDdSaleByIds(Long[] ids);
+
+ /**
+ * 删除销售主单信息
+ *
+ * @param id 销售主单主键
+ * @return 结果
+ */
+ public int deleteDdSaleById(Long id);
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFeServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFeServiceImpl.java
new file mode 100644
index 0000000..306a8e6
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFeServiceImpl.java
@@ -0,0 +1,147 @@
+package com.zhyc.module.frozen.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.zhyc.common.utils.DateUtils;
+import com.zhyc.common.utils.StringUtils;
+import com.zhyc.module.produce.breed.domain.ScEmbryoFlush;
+import com.zhyc.module.produce.breed.mapper.ScEmbryoFlushMapper;
+import com.zhyc.module.produce.breed.service.IScEmbryoFlushService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zhyc.module.frozen.mapper.DdFeMapper;
+import com.zhyc.module.frozen.domain.DdFe;
+import com.zhyc.module.frozen.service.IDdFeService;
+
+import javax.annotation.Resource;
+
+/**
+ * 冻胚库存Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+@Service
+public class DdFeServiceImpl implements IDdFeService
+{
+ @Autowired
+ private DdFeMapper ddFeMapper;
+ @Autowired
+ private ScEmbryoFlushMapper scEmbryoFlushMapper;
+ @Autowired
+ private IScEmbryoFlushService scEmbryoFlushService;
+ /**
+ * 查询冻胚库存
+ *
+ * @param id 冻胚库存主键
+ * @return 冻胚库存
+ */
+ @Override
+ public DdFe selectDdFeById(Long id)
+ {
+ return ddFeMapper.selectDdFeById(id);
+ }
+
+ /**
+ * 查询冻胚库存列表
+ *
+ * @param ddFe 冻胚库存
+ * @return 冻胚库存
+ */
+ @Override
+ public List selectDdFeList(DdFe ddFe)
+ {
+ return ddFeMapper.selectDdFeList(ddFe);
+ }
+
+ /**
+ * 新增冻胚库存
+ *
+ * @param ddFe 冻胚库存
+ * @return 结果
+ */
+ @Override
+ public int insertDdFe(DdFe ddFe)
+ {
+ ddFe.setCreateTime(DateUtils.getNowDate());
+ return ddFeMapper.insertDdFe(ddFe);
+ }
+
+ /**
+ * 修改冻胚库存
+ *
+ * @param ddFe 冻胚库存
+ * @return 结果
+ */
+ @Override
+ public int updateDdFe(DdFe ddFe)
+ {
+ return ddFeMapper.updateDdFe(ddFe);
+ }
+
+ /**
+ * 批量删除冻胚库存
+ *
+ * @param ids 需要删除的冻胚库存主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDdFeByIds(Long[] ids)
+ {
+ return ddFeMapper.deleteDdFeByIds(ids);
+ }
+
+ /**
+ * 删除冻胚库存信息
+ *
+ * @param id 冻胚库存主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDdFeById(Long id)
+ {
+ return ddFeMapper.deleteDdFeById(id);
+ }
+
+ @Override
+ public Map getLastFlushInfoByEwe(String eweNo) {
+ // 1. 冲胚数据(冻胚自己的 SQL)
+ Map flush = ddFeMapper.selectFlushByEwe(eweNo);
+ if (flush == null) return null;
+
+ String ramId = (String) flush.get("ramId");
+ if (StringUtils.isBlank(ramId)) return null;
+
+ // 2. 公羊品种
+ Map ram = scEmbryoFlushMapper.selectSheepInfoByManageTag(ramId);
+ String ramBreed = (String) ram.get("variety");
+
+ // 3. 母羊品种
+ Map ewe = scEmbryoFlushMapper.selectSheepInfoByManageTag(eweNo);
+ String eweBreed = (String) ewe.get("variety");
+
+ // 4. 胚胎品种
+ String embryoBreed = scEmbryoFlushService.calculateEmbryoVariety(ramBreed, eweBreed);
+
+ // 5. 封装 4 字段
+ Map rsp = new HashMap<>(8);
+ rsp.put("drId", ramId);
+ rsp.put("drBreed", ramBreed);
+ rsp.put("deBreed", eweBreed);
+ rsp.put("embBreed", embryoBreed);
+ // 如果以后需要等级数量,也从这个 flush map 里取
+ rsp.put("gradeA", flush.get("gradeA"));
+ rsp.put("gradeB", flush.get("gradeB"));
+ rsp.put("gradeC", flush.get("gradeC"));
+ rsp.put("gradeD", flush.get("gradeD"));
+ return rsp;
+ }
+
+// 废弃
+ @Override
+ public int discard(DdFe dto) {
+ return ddFeMapper.updateDiscard(dto);
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFsServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFsServiceImpl.java
new file mode 100644
index 0000000..52a1c73
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFsServiceImpl.java
@@ -0,0 +1,129 @@
+package com.zhyc.module.frozen.service.impl;
+
+import java.util.List;
+
+import com.zhyc.common.exception.ServiceException;
+import com.zhyc.common.utils.DateUtils;
+import com.zhyc.module.base.domain.BasSheep;
+import com.zhyc.module.base.domain.BasSheepVariety;
+import com.zhyc.module.base.mapper.BasSheepMapper;
+import com.zhyc.module.base.mapper.BasSheepVarietyMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zhyc.module.frozen.mapper.DdFsMapper;
+import com.zhyc.module.frozen.domain.DdFs;
+import com.zhyc.module.frozen.service.IDdFsService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 冻精库存Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2025-11-29
+ */
+@Service
+public class DdFsServiceImpl implements IDdFsService {
+ @Autowired
+ private DdFsMapper ddFsMapper;
+ @Autowired
+ private BasSheepMapper basSheepMapper;
+ @Autowired
+ private BasSheepVarietyMapper basSheepVarietyMapper;
+
+ /**
+ * 查询冻精库存
+ *
+ * @param id 冻精库存主键
+ * @return 冻精库存
+ */
+ @Override
+ public DdFs selectDdFsById(Long id) {
+ return ddFsMapper.selectDdFsById(id);
+ }
+
+ /**
+ * 查询冻精库存列表
+ *
+ * @param ddFs 冻精库存
+ * @return 冻精库存
+ */
+ @Override
+ public List selectDdFsList(DdFs ddFs) {
+ return ddFsMapper.selectDdFsList(ddFs);
+ }
+
+ /**
+ * 新增冻精库存
+ *
+ * @param ddFs 冻精库存
+ * @return 结果
+ */
+ @Override
+ public int insertDdFs(DdFs ddFs) {
+ BasSheep ram = basSheepMapper.selectBasSheepByManageTags(ddFs.getCode());
+ if (ram == null) {
+ throw new ServiceException("公羊不存在");
+ }
+ if (ram.getStatusId() == null || !ram.getStatusId().equals(1L)) {
+ throw new ServiceException("羊只不在群");
+ }
+ if (ram.getGender() == null || !ram.getGender().equals(2L)) {
+ throw new ServiceException("该耳号对应不是公羊");
+ }
+
+ if (ddFs.getBreed() == null || ddFs.getBreed().trim().isEmpty()) {
+ BasSheepVariety variety = basSheepVarietyMapper.selectBasSheepVarietyById(ram.getVarietyId());
+ ddFs.setBreed(variety == null ? "" : variety.getVariety());
+ }
+ ddFs.setCreateTime(DateUtils.getNowDate());
+ return ddFsMapper.insertDdFs(ddFs);
+ }
+
+ /**
+ * 修改冻精库存
+ *
+ * @param ddFs 冻精库存
+ * @return 结果
+ */
+ @Override
+ public int updateDdFs(DdFs ddFs) {
+ return ddFsMapper.updateDdFs(ddFs);
+ }
+
+ /**
+ * 批量删除冻精库存
+ *
+ * @param ids 需要删除的冻精库存主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDdFsByIds(Long[] ids) {
+ return ddFsMapper.deleteDdFsByIds(ids);
+ }
+
+ /**
+ * 删除冻精库存信息
+ *
+ * @param id 冻精库存主键
+ * @return 结果
+ */
+ @Override
+ public int deleteDdFsById(Long id) {
+ return ddFsMapper.deleteDdFsById(id);
+ }
+
+ // 废弃
+ @Override
+ public int discard(List list) {
+ return list.stream()
+ .mapToInt(item -> {
+ DdFs update = new DdFs();
+ update.setId(item.getId());
+ update.setStat("废弃");
+ update.setDiscardTxt(item.getDiscardTxt());
+ return ddFsMapper.updateDdFs(update);
+ })
+ .sum();
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdSaleServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdSaleServiceImpl.java
new file mode 100644
index 0000000..d2827f5
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdSaleServiceImpl.java
@@ -0,0 +1,133 @@
+package com.zhyc.module.frozen.service.impl;
+
+import java.util.List;
+import com.zhyc.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import com.zhyc.common.utils.StringUtils;
+import org.springframework.transaction.annotation.Transactional;
+import com.zhyc.module.frozen.domain.DdSaleItem;
+import com.zhyc.module.frozen.mapper.DdSaleMapper;
+import com.zhyc.module.frozen.domain.DdSale;
+import com.zhyc.module.frozen.service.IDdSaleService;
+
+/**
+ * 销售主单Service业务层处理
+ *
+ * @author HashMap
+ * @date 2025-12-01
+ */
+@Service
+public class DdSaleServiceImpl implements IDdSaleService
+{
+ @Autowired
+ private DdSaleMapper ddSaleMapper;
+
+ /**
+ * 查询销售主单
+ *
+ * @param id 销售主单主键
+ * @return 销售主单
+ */
+ @Override
+ public DdSale selectDdSaleById(Long id)
+ {
+ return ddSaleMapper.selectDdSaleById(id);
+ }
+
+ /**
+ * 查询销售主单列表
+ *
+ * @param ddSale 销售主单
+ * @return 销售主单
+ */
+ @Override
+ public List selectDdSaleList(DdSale ddSale)
+ {
+ return ddSaleMapper.selectDdSaleList(ddSale);
+ }
+
+ /**
+ * 新增销售主单
+ *
+ * @param ddSale 销售主单
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int insertDdSale(DdSale ddSale)
+ {
+ ddSale.setCreateTime(DateUtils.getNowDate());
+ int rows = ddSaleMapper.insertDdSale(ddSale);
+ insertDdSaleItem(ddSale);
+ return rows;
+ }
+
+ /**
+ * 修改销售主单
+ *
+ * @param ddSale 销售主单
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int updateDdSale(DdSale ddSale)
+ {
+ ddSaleMapper.deleteDdSaleItemBySaleId(ddSale.getId());
+ insertDdSaleItem(ddSale);
+ return ddSaleMapper.updateDdSale(ddSale);
+ }
+
+ /**
+ * 批量删除销售主单
+ *
+ * @param ids 需要删除的销售主单主键
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int deleteDdSaleByIds(Long[] ids)
+ {
+ ddSaleMapper.deleteDdSaleItemBySaleIds(ids);
+ return ddSaleMapper.deleteDdSaleByIds(ids);
+ }
+
+ /**
+ * 删除销售主单信息
+ *
+ * @param id 销售主单主键
+ * @return 结果
+ */
+ @Transactional
+ @Override
+ public int deleteDdSaleById(Long id)
+ {
+ ddSaleMapper.deleteDdSaleItemBySaleId(id);
+ return ddSaleMapper.deleteDdSaleById(id);
+ }
+
+ /**
+ * 新增销售明细信息
+ *
+ * @param ddSale 销售主单对象
+ */
+ public void insertDdSaleItem(DdSale ddSale)
+ {
+ List ddSaleItemList = ddSale.getDdSaleItemList();
+ Long id = ddSale.getId();
+ if (StringUtils.isNotNull(ddSaleItemList))
+ {
+ List list = new ArrayList();
+ for (DdSaleItem ddSaleItem : ddSaleItemList)
+ {
+ ddSaleItem.setSaleId(id);
+ list.add(ddSaleItem);
+ }
+ if (list.size() > 0)
+ {
+ ddSaleMapper.batchDdSaleItem(list);
+ }
+ }
+ }
+}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScBreedRecordController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScBreedRecordController.java
index 50c37c2..499be05 100644
--- a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScBreedRecordController.java
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScBreedRecordController.java
@@ -99,7 +99,7 @@ public class ScBreedRecordController extends BaseController
}
/**
- * 根据母羊耳号获取最新配种计划信息(优先从配种计划生成表获取)
+ * 根据母羊耳号获取最新配种计划信息(优先从配种计划生成表获取)
*/
@PreAuthorize("@ss.hasPermi('Breeding_records:Breeding_records:query')")
@GetMapping(value = "/getLatestBreedPlan/{manageTags}")
@@ -139,12 +139,12 @@ public class ScBreedRecordController extends BaseController
scBreedRecord.setRamId(ramId.toString());
}
- // 验证配种方式
+ // 修改:验证配种方式 - 增加3-冲胚 和 4-自然发情人工授精
if (scBreedRecord.getBreedType() == null) {
return error("配种方式不能为空");
}
- if (scBreedRecord.getBreedType() != 1 && scBreedRecord.getBreedType() != 2) {
- return error("配种方式只能是:1-同期发情 或 2-本交");
+ if (scBreedRecord.getBreedType() < 1 || scBreedRecord.getBreedType() > 4) {
+ return error("配种方式只能是:1-同期发情、2-本交、3-冲胚、4-自然发情人工授精");
}
// 验证技术员
@@ -186,10 +186,10 @@ public class ScBreedRecordController extends BaseController
scBreedRecord.setRamId(ramId.toString());
}
- // 验证配种方式
+ // 修改:验证配种方式
if (scBreedRecord.getBreedType() != null) {
- if (scBreedRecord.getBreedType() != 1 && scBreedRecord.getBreedType() != 2) {
- return error("配种方式只能是:1-同期发情 或 2-本交");
+ if (scBreedRecord.getBreedType() < 1 || scBreedRecord.getBreedType() > 4) {
+ return error("配种方式只能是:1-同期发情、2-本交、3-冲胚、4-自然发情人工授精");
}
}
@@ -223,7 +223,7 @@ public class ScBreedRecordController extends BaseController
if (result > 0) {
return success("孕检结果同步成功");
} else {
- return error("孕检结果同步失败,可能未找到对应的配种记录");
+ return error("孕检结果同步失败,可能未找到对应的配种记录");
}
}
diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScEmbryoFlushController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScEmbryoFlushController.java
new file mode 100644
index 0000000..d5d5426
--- /dev/null
+++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScEmbryoFlushController.java
@@ -0,0 +1,129 @@
+package com.zhyc.module.produce.breed.controller;
+
+import java.util.List;
+import java.util.Map;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import com.zhyc.common.annotation.Log;
+import com.zhyc.common.core.controller.BaseController;
+import com.zhyc.common.core.domain.AjaxResult;
+import com.zhyc.common.enums.BusinessType;
+import com.zhyc.module.produce.breed.domain.ScEmbryoFlush;
+import com.zhyc.module.produce.breed.service.IScEmbryoFlushService;
+import com.zhyc.common.utils.poi.ExcelUtil;
+import com.zhyc.common.core.page.TableDataInfo;
+
+/**
+ * 冲胚记录Controller
+ *
+ * @author ruoyi
+ * @date 2025-11-28
+ */
+@RestController
+@RequestMapping("/embryo/flush")
+public class ScEmbryoFlushController extends BaseController
+{
+ @Autowired
+ private IScEmbryoFlushService scEmbryoFlushService;
+
+ /**
+ * 查询冲胚记录列表
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(ScEmbryoFlush scEmbryoFlush)
+ {
+ startPage();
+ List list = scEmbryoFlushService.selectScEmbryoFlushList(scEmbryoFlush);
+ return getDataTable(list);
+ }
+
+ /**
+ * 导出冲胚记录列表
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:export')")
+ @Log(title = "冲胚记录", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ScEmbryoFlush scEmbryoFlush)
+ {
+ List list = scEmbryoFlushService.selectScEmbryoFlushList(scEmbryoFlush);
+ ExcelUtil util = new ExcelUtil(ScEmbryoFlush.class);
+ util.exportExcel(response, list, "冲胚记录数据");
+ }
+
+ /**
+ * 获取冲胚记录详细信息
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:query')")
+ @GetMapping(value = "/{id}")
+ public AjaxResult getInfo(@PathVariable("id") Long id)
+ {
+ return success(scEmbryoFlushService.selectScEmbryoFlushById(id));
+ }
+
+ /**
+ * 新增冲胚记录
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:add')")
+ @Log(title = "冲胚记录", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody ScEmbryoFlush scEmbryoFlush)
+ {
+ return toAjax(scEmbryoFlushService.insertScEmbryoFlush(scEmbryoFlush));
+ }
+
+ /**
+ * 修改冲胚记录
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:edit')")
+ @Log(title = "冲胚记录", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody ScEmbryoFlush scEmbryoFlush)
+ {
+ return toAjax(scEmbryoFlushService.updateScEmbryoFlush(scEmbryoFlush));
+ }
+
+ /**
+ * 删除冲胚记录
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:remove')")
+ @Log(title = "冲胚记录", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{ids}")
+ public AjaxResult remove(@PathVariable Long[] ids)
+ {
+ return toAjax(scEmbryoFlushService.deleteScEmbryoFlushByIds(ids));
+ }
+
+ /**
+ * 根据供体母羊耳号获取关联信息
+ * 返回:母羊品种、父号、父号品种、胚胎品种、牧场信息、配种日期等
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:query')")
+ @GetMapping("/getDonorInfo")
+ public AjaxResult getDonorRelatedInfo(@RequestParam("donorFemaleNo") String donorFemaleNo)
+ {
+ Map info = scEmbryoFlushService.getDonorRelatedInfo(donorFemaleNo);
+ return success(info);
+ }
+
+ /**
+ * 获取供体母羊下拉列表
+ */
+ @PreAuthorize("@ss.hasPermi('embryo:flush:query')")
+ @GetMapping("/donorFemaleList")
+ public AjaxResult getDonorFemaleList()
+ {
+ List