diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScSheepDeathController.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScSheepDeathController.java new file mode 100644 index 0000000..cbd1964 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/controller/ScSheepDeathController.java @@ -0,0 +1,120 @@ +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.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.ScSheepDeath; +import com.zhyc.module.produce.breed.service.IScSheepDeathService; +import com.zhyc.common.utils.poi.ExcelUtil; +import com.zhyc.common.core.page.TableDataInfo; + +/** + * 羊只死淘记录Controller + * + * @author ruoyi + * @date 2025-08-06 + */ +@RestController +@RequestMapping("/sheep_death/death") +public class ScSheepDeathController extends BaseController +{ + @Autowired + private IScSheepDeathService scSheepDeathService; + + /** + * 查询羊只死淘记录列表 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:list')") + @GetMapping("/list") + public TableDataInfo list(ScSheepDeath scSheepDeath) + { + startPage(); + List list = scSheepDeathService.selectScSheepDeathList(scSheepDeath); + return getDataTable(list); + } + + /** + * 根据管理耳号查询羊只信息 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:query')") + @GetMapping("/sheepInfo/{manageTags}") + public AjaxResult getSheepInfo(@PathVariable("manageTags") String manageTags) + { + Map sheepInfo = scSheepDeathService.selectSheepFileByManageTags(manageTags); + if (sheepInfo != null) { + return success(sheepInfo); + } else { + return error("未找到该耳号对应的羊只信息"); + } + } + + /** + * 导出羊只死淘记录列表 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:export')") + @Log(title = "羊只死淘记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ScSheepDeath scSheepDeath) + { + List list = scSheepDeathService.selectScSheepDeathList(scSheepDeath); + ExcelUtil util = new ExcelUtil(ScSheepDeath.class); + util.exportExcel(response, list, "羊只死淘记录数据"); + } + + /** + * 获取羊只死淘记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(scSheepDeathService.selectScSheepDeathById(id)); + } + + /** + * 新增羊只死淘记录 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:add')") + @Log(title = "羊只死淘记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ScSheepDeath scSheepDeath) + { + return toAjax(scSheepDeathService.insertScSheepDeath(scSheepDeath)); + } + + /** + * 修改羊只死淘记录 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:edit')") + @Log(title = "羊只死淘记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ScSheepDeath scSheepDeath) + { + return toAjax(scSheepDeathService.updateScSheepDeath(scSheepDeath)); + } + + /** + * 删除羊只死淘记录 + */ + @PreAuthorize("@ss.hasPermi('sheep_death:death:remove')") + @Log(title = "羊只死淘记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(scSheepDeathService.deleteScSheepDeathByIds(ids)); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/domain/ScSheepDeath.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/domain/ScSheepDeath.java new file mode 100644 index 0000000..52f04dd --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/domain/ScSheepDeath.java @@ -0,0 +1,356 @@ +package com.zhyc.module.produce.breed.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; + +/** + * 羊只死淘记录对象 sc_sheep_death + * + * @author ruoyi + * @date 2025-08-06 + */ +public class ScSheepDeath extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 羊只ID */ + @Excel(name = "羊只ID") + private Long sheepId; + + /** 管理耳号 */ + @Excel(name = "管理耳号") + private String manageTags; + + /** 事件类型 */ + @Excel(name = "事件类型") + private String eventType; + + /** 死亡日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "死亡日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date deathDate; + + /** 疾病类型ID */ + @Excel(name = "疾病类型ID") + private Long diseaseTypeId; + + /** 疾病子类型ID */ + @Excel(name = "疾病子类型ID") + private Long diseaseSubtypeId; + + /** 死淘去向 */ + @Excel(name = "死淘去向") + private String disposalDirection; + + /** 技术员 */ + @Excel(name = "技术员") + private String technician; + + /** 处理人 */ + @Excel(name = "处理人") + private String handler; + + /** 班组 */ + @Excel(name = "班组") + private String workGroup; + + /** 备注 */ + @Excel(name = "备注") + private String comment; + + /** 是否删除(0:未删除 1:已删除) */ + @Excel(name = "是否删除(0:未删除 1:已删除)") + private Long isDelete; + + // 以下字段仅用于前端显示,不存储到数据库 + /** 品种 */ + private String variety; + + /** 死亡时羊只类别 */ + private String sheepType; + + /** 性别 */ + private Integer gender; + + /** 日龄 */ + private Long dayAge; + + /** 胎次 */ + private Integer parity; + + /** 羊舍 */ + private String sheepfoldName; + + /** 繁育状态 */ + private String breedStatus; + + /** 死亡时产后天数 */ + private Integer postLambingDay; + + /** 死亡时泌乳天数 */ + private Integer lactationDay; + + /** 死亡时怀孕天数 */ + private Integer gestationDay; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setSheepId(Long sheepId) + { + this.sheepId = sheepId; + } + + public Long getSheepId() + { + return sheepId; + } + + public void setManageTags(String manageTags) + { + this.manageTags = manageTags; + } + + public String getManageTags() + { + return manageTags; + } + + public void setEventType(String eventType) + { + this.eventType = eventType; + } + + public String getEventType() + { + return eventType; + } + + public void setDeathDate(Date deathDate) + { + this.deathDate = deathDate; + } + + public Date getDeathDate() + { + return deathDate; + } + + public void setDiseaseTypeId(Long diseaseTypeId) + { + this.diseaseTypeId = diseaseTypeId; + } + + public Long getDiseaseTypeId() + { + return diseaseTypeId; + } + + public void setDiseaseSubtypeId(Long diseaseSubtypeId) + { + this.diseaseSubtypeId = diseaseSubtypeId; + } + + public Long getDiseaseSubtypeId() + { + return diseaseSubtypeId; + } + + public void setDisposalDirection(String disposalDirection) + { + this.disposalDirection = disposalDirection; + } + + public String getDisposalDirection() + { + return disposalDirection; + } + + public void setTechnician(String technician) + { + this.technician = technician; + } + + public String getTechnician() + { + return technician; + } + + public void setHandler(String handler) + { + this.handler = handler; + } + + public String getHandler() + { + return handler; + } + + public void setWorkGroup(String workGroup) + { + this.workGroup = workGroup; + } + + public String getWorkGroup() + { + return workGroup; + } + + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + + public void setIsDelete(Long isDelete) + { + this.isDelete = isDelete; + } + + public Long getIsDelete() + { + return isDelete; + } + + // 以下为仅用于显示的字段的getter/setter + public void setVariety(String variety) + { + this.variety = variety; + } + + public String getVariety() + { + return variety; + } + + public void setSheepType(String sheepType) + { + this.sheepType = sheepType; + } + + public String getSheepType() + { + return sheepType; + } + + public void setGender(Integer gender) + { + this.gender = gender; + } + + public Integer getGender() + { + return gender; + } + + public void setDayAge(Long dayAge) + { + this.dayAge = dayAge; + } + + public Long getDayAge() + { + return dayAge; + } + + public void setParity(Integer parity) + { + this.parity = parity; + } + + public Integer getParity() + { + return parity; + } + + public void setSheepfoldName(String sheepfoldName) + { + this.sheepfoldName = sheepfoldName; + } + + public String getSheepfoldName() + { + return sheepfoldName; + } + + public void setBreedStatus(String breedStatus) + { + this.breedStatus = breedStatus; + } + + public String getBreedStatus() + { + return breedStatus; + } + + public void setPostLambingDay(Integer postLambingDay) + { + this.postLambingDay = postLambingDay; + } + + public Integer getPostLambingDay() + { + return postLambingDay; + } + + public void setLactationDay(Integer lactationDay) + { + this.lactationDay = lactationDay; + } + + public Integer getLactationDay() + { + return lactationDay; + } + + public void setGestationDay(Integer gestationDay) + { + this.gestationDay = gestationDay; + } + + public Integer getGestationDay() + { + return gestationDay; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("sheepId", getSheepId()) + .append("manageTags", getManageTags()) + .append("eventType", getEventType()) + .append("deathDate", getDeathDate()) + .append("diseaseTypeId", getDiseaseTypeId()) + .append("diseaseSubtypeId", getDiseaseSubtypeId()) + .append("disposalDirection", getDisposalDirection()) + .append("technician", getTechnician()) + .append("handler", getHandler()) + .append("workGroup", getWorkGroup()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("comment", getComment()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("isDelete", getIsDelete()) + .toString(); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/mapper/ScSheepDeathMapper.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/mapper/ScSheepDeathMapper.java new file mode 100644 index 0000000..980d20d --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/mapper/ScSheepDeathMapper.java @@ -0,0 +1,70 @@ +package com.zhyc.module.produce.breed.mapper; + +import java.util.List; +import java.util.Map; +import com.zhyc.module.produce.breed.domain.ScSheepDeath; + +/** + * 羊只死淘记录Mapper接口 + * + * @author ruoyi + * @date 2025-08-06 + */ +public interface ScSheepDeathMapper +{ + /** + * 查询羊只死淘记录 + * + * @param id 羊只死淘记录主键 + * @return 羊只死淘记录 + */ + public ScSheepDeath selectScSheepDeathById(Long id); + + /** + * 查询羊只死淘记录列表 + * + * @param scSheepDeath 羊只死淘记录 + * @return 羊只死淘记录集合 + */ + public List selectScSheepDeathList(ScSheepDeath scSheepDeath); + + /** + * 根据管理耳号查询sheep_file视图信息 + * + * @param manageTags 管理耳号 + * @return 羊只信息 + */ + public Map selectSheepFileByManageTags(String manageTags); + + /** + * 新增羊只死淘记录 + * + * @param scSheepDeath 羊只死淘记录 + * @return 结果 + */ + public int insertScSheepDeath(ScSheepDeath scSheepDeath); + + /** + * 修改羊只死淘记录 + * + * @param scSheepDeath 羊只死淘记录 + * @return 结果 + */ + public int updateScSheepDeath(ScSheepDeath scSheepDeath); + + /** + * 删除羊只死淘记录 + * + * @param id 羊只死淘记录主键 + * @return 结果 + */ + public int deleteScSheepDeathById(Long id); + + /** + * 批量删除羊只死淘记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteScSheepDeathByIds(Long[] ids); +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/service/IScSheepDeathService.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/service/IScSheepDeathService.java new file mode 100644 index 0000000..e1100d5 --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/service/IScSheepDeathService.java @@ -0,0 +1,70 @@ +package com.zhyc.module.produce.breed.service; + +import java.util.List; +import java.util.Map; +import com.zhyc.module.produce.breed.domain.ScSheepDeath; + +/** + * 羊只死淘记录Service接口 + * + * @author ruoyi + * @date 2025-08-06 + */ +public interface IScSheepDeathService +{ + /** + * 查询羊只死淘记录 + * + * @param id 羊只死淘记录主键 + * @return 羊只死淘记录 + */ + public ScSheepDeath selectScSheepDeathById(Long id); + + /** + * 查询羊只死淘记录列表 + * + * @param scSheepDeath 羊只死淘记录 + * @return 羊只死淘记录集合 + */ + public List selectScSheepDeathList(ScSheepDeath scSheepDeath); + + /** + * 根据管理耳号查询sheep_file视图信息 + * + * @param manageTags 管理耳号 + * @return 羊只信息 + */ + public Map selectSheepFileByManageTags(String manageTags); + + /** + * 新增羊只死淘记录 + * + * @param scSheepDeath 羊只死淘记录 + * @return 结果 + */ + public int insertScSheepDeath(ScSheepDeath scSheepDeath); + + /** + * 修改羊只死淘记录 + * + * @param scSheepDeath 羊只死淘记录 + * @return 结果 + */ + public int updateScSheepDeath(ScSheepDeath scSheepDeath); + + /** + * 批量删除羊只死淘记录 + * + * @param ids 需要删除的羊只死淘记录主键集合 + * @return 结果 + */ + public int deleteScSheepDeathByIds(Long[] ids); + + /** + * 删除羊只死淘记录信息 + * + * @param id 羊只死淘记录主键 + * @return 结果 + */ + public int deleteScSheepDeathById(Long id); +} \ No newline at end of file diff --git a/zhyc-module/src/main/java/com/zhyc/module/produce/breed/service/impl/ScSheepDeathServiceImpl.java b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/service/impl/ScSheepDeathServiceImpl.java new file mode 100644 index 0000000..12e7afd --- /dev/null +++ b/zhyc-module/src/main/java/com/zhyc/module/produce/breed/service/impl/ScSheepDeathServiceImpl.java @@ -0,0 +1,166 @@ +package com.zhyc.module.produce.breed.service.impl; + +import java.util.List; +import java.util.Map; +import com.zhyc.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.zhyc.module.produce.breed.mapper.ScSheepDeathMapper; +import com.zhyc.module.produce.breed.domain.ScSheepDeath; +import com.zhyc.module.produce.breed.service.IScSheepDeathService; + +/** + * 羊只死淘记录Service业务层处理 + * + * @author ruoyi + * @date 2025-08-06 + */ +@Service +public class ScSheepDeathServiceImpl implements IScSheepDeathService +{ + @Autowired + private ScSheepDeathMapper scSheepDeathMapper; + + /** + * 查询羊只死淘记录 + * + * @param id 羊只死淘记录主键 + * @return 羊只死淘记录 + */ + @Override + public ScSheepDeath selectScSheepDeathById(Long id) + { + ScSheepDeath scSheepDeath = scSheepDeathMapper.selectScSheepDeathById(id); + // 查询时也需要填充显示字段 + if (scSheepDeath != null && scSheepDeath.getManageTags() != null) { + Map sheepInfo = selectSheepFileByManageTags(scSheepDeath.getManageTags()); + if (sheepInfo != null) { + scSheepDeath.setVariety(sheepInfo.get("variety") != null ? sheepInfo.get("variety").toString() : null); + scSheepDeath.setSheepType(sheepInfo.get("sheepType") != null ? sheepInfo.get("sheepType").toString() : null); + scSheepDeath.setGender(sheepInfo.get("gender") != null ? Integer.valueOf(sheepInfo.get("gender").toString()) : null); + scSheepDeath.setDayAge(sheepInfo.get("dayAge") != null ? Long.valueOf(sheepInfo.get("dayAge").toString()) : null); + scSheepDeath.setParity(sheepInfo.get("parity") != null ? Integer.valueOf(sheepInfo.get("parity").toString()) : null); + scSheepDeath.setSheepfoldName(sheepInfo.get("sheepfoldName") != null ? sheepInfo.get("sheepfoldName").toString() : null); + scSheepDeath.setBreedStatus(sheepInfo.get("breedStatus") != null ? sheepInfo.get("breedStatus").toString() : null); + scSheepDeath.setPostLambingDay(sheepInfo.get("postLambingDay") != null ? Integer.valueOf(sheepInfo.get("postLambingDay").toString()) : null); + scSheepDeath.setLactationDay(sheepInfo.get("lactationDay") != null ? Integer.valueOf(sheepInfo.get("lactationDay").toString()) : null); + scSheepDeath.setGestationDay(sheepInfo.get("gestationDay") != null ? Integer.valueOf(sheepInfo.get("gestationDay").toString()) : null); + } + } + return scSheepDeath; + } + + /** + * 查询羊只死淘记录列表 + * + * @param scSheepDeath 羊只死淘记录 + * @return 羊只死淘记录 + */ + @Override + public List selectScSheepDeathList(ScSheepDeath scSheepDeath) + { + List list = scSheepDeathMapper.selectScSheepDeathList(scSheepDeath); + // 为列表中的每条记录填充显示字段 + for (ScSheepDeath death : list) { + if (death.getManageTags() != null) { + Map sheepInfo = selectSheepFileByManageTags(death.getManageTags()); + if (sheepInfo != null) { + death.setVariety(sheepInfo.get("variety") != null ? sheepInfo.get("variety").toString() : null); + death.setSheepType(sheepInfo.get("sheepType") != null ? sheepInfo.get("sheepType").toString() : null); + death.setGender(sheepInfo.get("gender") != null ? Integer.valueOf(sheepInfo.get("gender").toString()) : null); + death.setDayAge(sheepInfo.get("dayAge") != null ? Long.valueOf(sheepInfo.get("dayAge").toString()) : null); + death.setParity(sheepInfo.get("parity") != null ? Integer.valueOf(sheepInfo.get("parity").toString()) : null); + death.setSheepfoldName(sheepInfo.get("sheepfoldName") != null ? sheepInfo.get("sheepfoldName").toString() : null); + death.setBreedStatus(sheepInfo.get("breedStatus") != null ? sheepInfo.get("breedStatus").toString() : null); + death.setPostLambingDay(sheepInfo.get("postLambingDay") != null ? Integer.valueOf(sheepInfo.get("postLambingDay").toString()) : null); + death.setLactationDay(sheepInfo.get("lactationDay") != null ? Integer.valueOf(sheepInfo.get("lactationDay").toString()) : null); + death.setGestationDay(sheepInfo.get("gestationDay") != null ? Integer.valueOf(sheepInfo.get("gestationDay").toString()) : null); + } + } + } + return list; + } + + /** + * 根据管理耳号查询sheep_file视图信息 + * + * @param manageTags 管理耳号 + * @return 羊只信息 + */ + @Override + public Map selectSheepFileByManageTags(String manageTags) + { + return scSheepDeathMapper.selectSheepFileByManageTags(manageTags); + } + + /** + * 新增羊只死淘记录 + * + * @param scSheepDeath 羊只死淘记录 + * @return 结果 + */ + @Override + public int insertScSheepDeath(ScSheepDeath scSheepDeath) + { + // 设置事件类型默认为"死亡" + if (scSheepDeath.getEventType() == null || scSheepDeath.getEventType().isEmpty()) { + scSheepDeath.setEventType("死亡"); + } + + // 如果有管理耳号,查询并设置羊只ID + if (scSheepDeath.getManageTags() != null && !scSheepDeath.getManageTags().isEmpty()) { + Map sheepInfo = selectSheepFileByManageTags(scSheepDeath.getManageTags()); + if (sheepInfo != null) { + scSheepDeath.setSheepId(sheepInfo.get("sheepId") != null ? Long.valueOf(sheepInfo.get("sheepId").toString()) : null); + } + } + + scSheepDeath.setCreateTime(DateUtils.getNowDate()); + return scSheepDeathMapper.insertScSheepDeath(scSheepDeath); + } + + /** + * 修改羊只死淘记录 + * + * @param scSheepDeath 羊只死淘记录 + * @return 结果 + */ + @Override + public int updateScSheepDeath(ScSheepDeath scSheepDeath) + { + // 如果管理耳号发生变化,重新查询并设置羊只ID + if (scSheepDeath.getManageTags() != null && !scSheepDeath.getManageTags().isEmpty()) { + Map sheepInfo = selectSheepFileByManageTags(scSheepDeath.getManageTags()); + if (sheepInfo != null) { + scSheepDeath.setSheepId(sheepInfo.get("sheepId") != null ? Long.valueOf(sheepInfo.get("sheepId").toString()) : null); + } + } + + scSheepDeath.setUpdateTime(DateUtils.getNowDate()); + return scSheepDeathMapper.updateScSheepDeath(scSheepDeath); + } + + /** + * 批量删除羊只死淘记录 + * + * @param ids 需要删除的羊只死淘记录主键 + * @return 结果 + */ + @Override + public int deleteScSheepDeathByIds(Long[] ids) + { + return scSheepDeathMapper.deleteScSheepDeathByIds(ids); + } + + /** + * 删除羊只死淘记录信息 + * + * @param id 羊只死淘记录主键 + * @return 结果 + */ + @Override + public int deleteScSheepDeathById(Long id) + { + return scSheepDeathMapper.deleteScSheepDeathById(id); + } +} \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/sheep_death/ScSheepDeathMapper.xml b/zhyc-module/src/main/resources/mapper/sheep_death/ScSheepDeathMapper.xml new file mode 100644 index 0000000..baedeeb --- /dev/null +++ b/zhyc-module/src/main/resources/mapper/sheep_death/ScSheepDeathMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, sheep_id, manage_tags, event_type, death_date, disease_type_id, disease_subtype_id, disposal_direction, technician, handler, work_group, create_by, create_time, comment, update_by, update_time, is_delete from sc_sheep_death + + + + + + + + + + + insert into sc_sheep_death + + sheep_id, + manage_tags, + event_type, + death_date, + disease_type_id, + disease_subtype_id, + disposal_direction, + technician, + handler, + work_group, + create_by, + create_time, + comment, + update_by, + update_time, + is_delete, + + + #{sheepId}, + #{manageTags}, + #{eventType}, + #{deathDate}, + #{diseaseTypeId}, + #{diseaseSubtypeId}, + #{disposalDirection}, + #{technician}, + #{handler}, + #{workGroup}, + #{createBy}, + #{createTime}, + #{comment}, + #{updateBy}, + #{updateTime}, + #{isDelete}, + + + + + update sc_sheep_death + + sheep_id = #{sheepId}, + manage_tags = #{manageTags}, + event_type = #{eventType}, + death_date = #{deathDate}, + disease_type_id = #{diseaseTypeId}, + disease_subtype_id = #{diseaseSubtypeId}, + disposal_direction = #{disposalDirection}, + technician = #{technician}, + handler = #{handler}, + work_group = #{workGroup}, + create_by = #{createBy}, + create_time = #{createTime}, + comment = #{comment}, + update_by = #{updateBy}, + update_time = #{updateTime}, + is_delete = #{isDelete}, + + where id = #{id} + + + + delete from sc_sheep_death where id = #{id} + + + + delete from sc_sheep_death where id in + + #{id} + + + \ No newline at end of file