冻胚冻精

This commit is contained in:
zyh 2025-11-29 18:52:08 +08:00
parent d0a8e2207b
commit 96ac2f2dbf
13 changed files with 1454 additions and 0 deletions

View File

@ -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<DdFe> 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<DdFe> list = ddFeService.selectDdFeList(ddFe);
ExcelUtil<DdFe> util = new ExcelUtil<DdFe>(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));
}
}

View File

@ -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<DdFs> 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<DdFs> list = ddFsService.selectDdFsList(ddFs);
ExcelUtil<DdFs> util = new ExcelUtil<DdFs>(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));
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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<DdFe> 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);
}

View File

@ -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<DdFs> 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);
}

View File

@ -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<DdFe> 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);
}

View File

@ -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<DdFs> 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);
}

View File

@ -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<DdFe> 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);
}
}

View File

@ -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<DdFs> 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);
}
}

View File

@ -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<ScAddSheep> util = new ExcelUtil<>(ScAddSheep.class);

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhyc.module.frozen.mapper.DdFeMapper">
<resultMap type="com.zhyc.module.frozen.domain.DdFe" id="DdFeResult">
<result property="id" column="id" />
<result property="code" column="code" />
<result property="freezeDate" column="freeze_date" />
<result property="drId" column="dr_id" />
<result property="drBreed" column="dr_breed" />
<result property="deId" column="de_id" />
<result property="deBreed" column="de_breed" />
<result property="embBreed" column="emb_breed" />
<result property="grade" column="grade" />
<result property="qty" column="qty" />
<result property="sexCtl" column="sex_ctl" />
<result property="status" column="status" />
<result property="tech" column="tech" />
<result property="tankId" column="tank_id" />
<result property="bucketId" column="bucket_id" />
<result property="rackId" column="rack_id" />
<result property="outDate" column="out_date" />
<result property="discardTxt" column="discard_txt" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDdFeVo">
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
</sql>
<select id="selectDdFeList" parameterType="DdFe" resultMap="DdFeResult">
<include refid="selectDdFeVo"/>
<where>
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
<if test="freezeDate != null "> and freeze_date = #{freezeDate}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="tech != null and tech != ''"> and tech = #{tech}</if>
<if test="outDate != null "> and out_date = #{outDate}</if>
</where>
</select>
<select id="selectDdFeById" parameterType="Long" resultMap="DdFeResult">
<include refid="selectDdFeVo"/>
where id = #{id}
</select>
<insert id="insertDdFe" parameterType="DdFe" useGeneratedKeys="true" keyProperty="id">
insert into dd_fe
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">code,</if>
<if test="freezeDate != null">freeze_date,</if>
<if test="drId != null">dr_id,</if>
<if test="drBreed != null">dr_breed,</if>
<if test="deId != null">de_id,</if>
<if test="deBreed != null">de_breed,</if>
<if test="embBreed != null">emb_breed,</if>
<if test="grade != null">grade,</if>
<if test="qty != null">qty,</if>
<if test="sexCtl != null">sex_ctl,</if>
<if test="status != null">status,</if>
<if test="tech != null">tech,</if>
<if test="tankId != null">tank_id,</if>
<if test="bucketId != null">bucket_id,</if>
<if test="rackId != null">rack_id,</if>
<if test="outDate != null">out_date,</if>
<if test="discardTxt != null">discard_txt,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">#{code},</if>
<if test="freezeDate != null">#{freezeDate},</if>
<if test="drId != null">#{drId},</if>
<if test="drBreed != null">#{drBreed},</if>
<if test="deId != null">#{deId},</if>
<if test="deBreed != null">#{deBreed},</if>
<if test="embBreed != null">#{embBreed},</if>
<if test="grade != null">#{grade},</if>
<if test="qty != null">#{qty},</if>
<if test="sexCtl != null">#{sexCtl},</if>
<if test="status != null">#{status},</if>
<if test="tech != null">#{tech},</if>
<if test="tankId != null">#{tankId},</if>
<if test="bucketId != null">#{bucketId},</if>
<if test="rackId != null">#{rackId},</if>
<if test="outDate != null">#{outDate},</if>
<if test="discardTxt != null">#{discardTxt},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDdFe" parameterType="DdFe">
update dd_fe
<trim prefix="SET" suffixOverrides=",">
<if test="code != null">code = #{code},</if>
<if test="freezeDate != null">freeze_date = #{freezeDate},</if>
<if test="drId != null">dr_id = #{drId},</if>
<if test="drBreed != null">dr_breed = #{drBreed},</if>
<if test="deId != null">de_id = #{deId},</if>
<if test="deBreed != null">de_breed = #{deBreed},</if>
<if test="embBreed != null">emb_breed = #{embBreed},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="qty != null">qty = #{qty},</if>
<if test="sexCtl != null">sex_ctl = #{sexCtl},</if>
<if test="status != null">status = #{status},</if>
<if test="tech != null">tech = #{tech},</if>
<if test="tankId != null">tank_id = #{tankId},</if>
<if test="bucketId != null">bucket_id = #{bucketId},</if>
<if test="rackId != null">rack_id = #{rackId},</if>
<if test="outDate != null">out_date = #{outDate},</if>
<if test="discardTxt != null">discard_txt = #{discardTxt},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDdFeById" parameterType="Long">
delete from dd_fe where id = #{id}
</delete>
<delete id="deleteDdFeByIds" parameterType="String">
delete from dd_fe where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhyc.module.frozen.mapper.DdFsMapper">
<resultMap type="com.zhyc.module.frozen.domain.DdFs" id="DdFsResult">
<result property="id" column="id" />
<result property="code" column="code" />
<result property="freezeDt" column="freeze_dt" />
<result property="breed" column="breed" />
<result property="batch" column="batch" />
<result property="spec" column="spec" />
<result property="qty" column="qty" />
<result property="sexCtl" column="sex_ctl" />
<result property="stat" column="stat" />
<result property="tech" column="tech" />
<result property="tankId" column="tank_id" />
<result property="bucketId" column="bucket_id" />
<result property="rackId" column="rack_id" />
<result property="outDt" column="out_dt" />
<result property="discardTxt" column="discard_txt" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDdFsVo">
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
</sql>
<select id="selectDdFsList" parameterType="DdFs" resultMap="DdFsResult">
<include refid="selectDdFsVo"/>
<where>
<if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
<if test="freezeDt != null "> and freeze_dt = #{freezeDt}</if>
<if test="tech != null and tech != ''"> and tech like concat('%', #{tech}, '%')</if>
<if test="outDt != null "> and out_dt = #{outDt}</if>
</where>
</select>
<select id="selectDdFsById" parameterType="Long" resultMap="DdFsResult">
<include refid="selectDdFsVo"/>
where id = #{id}
</select>
<insert id="insertDdFs" parameterType="DdFs" useGeneratedKeys="true" keyProperty="id">
insert into dd_fs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">code,</if>
<if test="freezeDt != null">freeze_dt,</if>
<if test="breed != null">breed,</if>
<if test="batch != null">batch,</if>
<if test="spec != null">spec,</if>
<if test="qty != null">qty,</if>
<if test="sexCtl != null">sex_ctl,</if>
<if test="stat != null">stat,</if>
<if test="tech != null">tech,</if>
<if test="tankId != null">tank_id,</if>
<if test="bucketId != null">bucket_id,</if>
<if test="rackId != null">rack_id,</if>
<if test="outDt != null">out_dt,</if>
<if test="discardTxt != null">discard_txt,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">#{code},</if>
<if test="freezeDt != null">#{freezeDt},</if>
<if test="breed != null">#{breed},</if>
<if test="batch != null">#{batch},</if>
<if test="spec != null">#{spec},</if>
<if test="qty != null">#{qty},</if>
<if test="sexCtl != null">#{sexCtl},</if>
<if test="stat != null">#{stat},</if>
<if test="tech != null">#{tech},</if>
<if test="tankId != null">#{tankId},</if>
<if test="bucketId != null">#{bucketId},</if>
<if test="rackId != null">#{rackId},</if>
<if test="outDt != null">#{outDt},</if>
<if test="discardTxt != null">#{discardTxt},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDdFs" parameterType="DdFs">
update dd_fs
<trim prefix="SET" suffixOverrides=",">
<if test="code != null">code = #{code},</if>
<if test="freezeDt != null">freeze_dt = #{freezeDt},</if>
<if test="breed != null">breed = #{breed},</if>
<if test="batch != null">batch = #{batch},</if>
<if test="spec != null">spec = #{spec},</if>
<if test="qty != null">qty = #{qty},</if>
<if test="sexCtl != null">sex_ctl = #{sexCtl},</if>
<if test="stat != null">stat = #{stat},</if>
<if test="tech != null">tech = #{tech},</if>
<if test="tankId != null">tank_id = #{tankId},</if>
<if test="bucketId != null">bucket_id = #{bucketId},</if>
<if test="rackId != null">rack_id = #{rackId},</if>
<if test="outDt != null">out_dt = #{outDt},</if>
<if test="discardTxt != null">discard_txt = #{discardTxt},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDdFsById" parameterType="Long">
delete from dd_fs where id = #{id}
</delete>
<delete id="deleteDdFsByIds" parameterType="String">
delete from dd_fs where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>