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-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