From 96ac2f2dbf6d72c7ad5455b552b9ca10ca9e11d6 Mon Sep 17 00:00:00 2001 From: zyh <2066096076@qq.com> Date: Sat, 29 Nov 2025 18:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=BB=E8=83=9A=E5=86=BB=E7=B2=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frozen/controller/DdFeController.java | 104 ++++++ .../frozen/controller/DdFsController.java | 104 ++++++ .../com/zhyc/module/frozen/domain/DdFe.java | 299 ++++++++++++++++++ .../com/zhyc/module/frozen/domain/DdFs.java | 252 +++++++++++++++ .../zhyc/module/frozen/mapper/DdFeMapper.java | 61 ++++ .../zhyc/module/frozen/mapper/DdFsMapper.java | 61 ++++ .../module/frozen/service/IDdFeService.java | 61 ++++ .../module/frozen/service/IDdFsService.java | 61 ++++ .../frozen/service/impl/DdFeServiceImpl.java | 95 ++++++ .../frozen/service/impl/DdFsServiceImpl.java | 95 ++++++ .../controller/ScAddSheepController.java | 1 + .../resources/mapper/frozen/DdFeMapper.xml | 137 ++++++++ .../resources/mapper/frozen/DdFsMapper.xml | 123 +++++++ 13 files changed, 1454 insertions(+) create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFeController.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFsController.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFe.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFs.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFeMapper.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFsMapper.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFeService.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFsService.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFeServiceImpl.java create mode 100644 zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFsServiceImpl.java create mode 100644 zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml create mode 100644 zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml 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..88237eb --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFeController.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.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) + { + 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)); + } +} 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..22f76a8 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/controller/DdFsController.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.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)); + } +} 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..6f04a2a --- /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 = "胚胎编号 YS+日期+序号") + private String code; + + /** 冻胚日期(事件录入日) */ + @Excel(name = "冻胚日期", readConverterExp = "事=件录入日") + @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 = "胚胎品种", readConverterExp = "自=动生成") + private String embBreed; + + /** 胚胎阶段等级('A', 'B', 'C', 'D', '囊胚', '桑椹胚') */ + @Excel(name = "胚胎阶段等级('A', 'B', 'C', 'D', '囊胚', '桑椹胚')") + private String grade; + + /** 胚胎数量 */ + @Excel(name = "胚胎数量") + private Long qty; + + /** 是否性控 1是 0否 */ + @Excel(name = "是否性控 1是 0否") + private Integer sexCtl; + + /** 状态(0正常1销售 2自用3废弃) */ + @Excel(name = "状态(0正常1销售 2自用3废弃)") + 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 = "出库日期", readConverterExp = "出=库后回写") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date outDate; + + /** 废弃原因(废弃时填写) */ + @Excel(name = "废弃原因", readConverterExp = "废=弃时填写") + 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..290d131 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/domain/DdFs.java @@ -0,0 +1,252 @@ +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 = "冻精日期", readConverterExp = "事=件录入日") + private Date freezeDt; + + /** 冻精品种(同公羊品种) */ + @Excel(name = "冻精品种", readConverterExp = "同=公羊品种") + private String breed; + + /** 生产批次(日期格式) */ + @Excel(name = "生产批次", readConverterExp = "日=期格式") + private String batch; + + /** 规格(0.25mL,0.5mL) */ + @Excel(name = "规格(0.25mL,0.5mL)") + private String spec; + + /** 数量(支) */ + @Excel(name = "数量", readConverterExp = "支=") + private Long qty; + + /** 是否性控 1是 0否 */ + @Excel(name = "是否性控 1是 0否") + private Integer sexCtl; + + /** 状态(0正常1销售2自用3废弃) */ + @Excel(name = "状态", readConverterExp = "0=正常1销售2自用3废弃") + 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 = "出库日期", readConverterExp = "出=库后回写") + 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/mapper/DdFeMapper.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFeMapper.java new file mode 100644 index 0000000..cea50ba --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/mapper/DdFeMapper.java @@ -0,0 +1,61 @@ +package com.zhyc.module.frozen.mapper; + +import java.util.List; +import com.zhyc.module.frozen.domain.DdFe; + +/** + * 冻胚库存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); +} 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/service/IDdFeService.java b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFeService.java new file mode 100644 index 0000000..a071ba3 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFeService.java @@ -0,0 +1,61 @@ +package com.zhyc.module.frozen.service; + +import java.util.List; +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); +} 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..632489f --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/IDdFsService.java @@ -0,0 +1,61 @@ +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); +} 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..5a61fa9 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFeServiceImpl.java @@ -0,0 +1,95 @@ +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 com.zhyc.module.frozen.mapper.DdFeMapper; +import com.zhyc.module.frozen.domain.DdFe; +import com.zhyc.module.frozen.service.IDdFeService; + +/** + * 冻胚库存Service业务层处理 + * + * @author ruoyi + * @date 2025-11-29 + */ +@Service +public class DdFeServiceImpl implements IDdFeService +{ + @Autowired + private DdFeMapper ddFeMapper; + + /** + * 查询冻胚库存 + * + * @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); + } +} 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..6b3c86d --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/frozen/service/impl/DdFsServiceImpl.java @@ -0,0 +1,95 @@ +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 com.zhyc.module.frozen.mapper.DdFsMapper; +import com.zhyc.module.frozen.domain.DdFs; +import com.zhyc.module.frozen.service.IDdFsService; + +/** + * 冻精库存Service业务层处理 + * + * @author ruoyi + * @date 2025-11-29 + */ +@Service +public class DdFsServiceImpl implements IDdFsService +{ + @Autowired + private DdFsMapper ddFsMapper; + + /** + * 查询冻精库存 + * + * @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) + { + 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); + } +} 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 122d593..51bc1c9 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 @@ -87,6 +87,7 @@ public class ScAddSheepController { //导出 @Log(title = "羊只信息", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('produce:add_sheep:export')") @PostMapping("/exportForm") public void exportForm(HttpServletResponse response, @RequestBody ScAddSheep scAddSheep) throws IOException { ExcelUtil util = new ExcelUtil<>(ScAddSheep.class); diff --git a/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml b/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml new file mode 100644 index 0000000..976d719 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, code, freeze_date, dr_id, dr_breed, de_id, de_breed, emb_breed, grade, qty, sex_ctl, status, tech, tank_id, bucket_id, rack_id, out_date, discard_txt, remark, create_by, create_time from dd_fe + + + + + + + + insert into dd_fe + + code, + freeze_date, + dr_id, + dr_breed, + de_id, + de_breed, + emb_breed, + grade, + qty, + sex_ctl, + status, + tech, + tank_id, + bucket_id, + rack_id, + out_date, + discard_txt, + remark, + create_by, + create_time, + + + #{code}, + #{freezeDate}, + #{drId}, + #{drBreed}, + #{deId}, + #{deBreed}, + #{embBreed}, + #{grade}, + #{qty}, + #{sexCtl}, + #{status}, + #{tech}, + #{tankId}, + #{bucketId}, + #{rackId}, + #{outDate}, + #{discardTxt}, + #{remark}, + #{createBy}, + #{createTime}, + + + + + update dd_fe + + code = #{code}, + freeze_date = #{freezeDate}, + dr_id = #{drId}, + dr_breed = #{drBreed}, + de_id = #{deId}, + de_breed = #{deBreed}, + emb_breed = #{embBreed}, + grade = #{grade}, + qty = #{qty}, + sex_ctl = #{sexCtl}, + status = #{status}, + tech = #{tech}, + tank_id = #{tankId}, + bucket_id = #{bucketId}, + rack_id = #{rackId}, + out_date = #{outDate}, + discard_txt = #{discardTxt}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from dd_fe where id = #{id} + + + + delete from dd_fe where id in + + #{id} + + + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml b/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml new file mode 100644 index 0000000..0000c30 --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, code, freeze_dt, breed, batch, spec, qty, sex_ctl, stat, tech, tank_id, bucket_id, rack_id, out_dt, discard_txt, remark, create_by, create_time from dd_fs + + + + + + + + insert into dd_fs + + code, + freeze_dt, + breed, + batch, + spec, + qty, + sex_ctl, + stat, + tech, + tank_id, + bucket_id, + rack_id, + out_dt, + discard_txt, + remark, + create_by, + create_time, + + + #{code}, + #{freezeDt}, + #{breed}, + #{batch}, + #{spec}, + #{qty}, + #{sexCtl}, + #{stat}, + #{tech}, + #{tankId}, + #{bucketId}, + #{rackId}, + #{outDt}, + #{discardTxt}, + #{remark}, + #{createBy}, + #{createTime}, + + + + + update dd_fs + + code = #{code}, + freeze_dt = #{freezeDt}, + breed = #{breed}, + batch = #{batch}, + spec = #{spec}, + qty = #{qty}, + sex_ctl = #{sexCtl}, + stat = #{stat}, + tech = #{tech}, + tank_id = #{tankId}, + bucket_id = #{bucketId}, + rack_id = #{rackId}, + out_dt = #{outDt}, + discard_txt = #{discardTxt}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from dd_fs where id = #{id} + + + + delete from dd_fs where id in + + #{id} + + + \ No newline at end of file