Merge remote-tracking branch 'origin/main'

This commit is contained in:
wyt 2025-07-16 18:24:13 +08:00
commit 20f007edbb
68 changed files with 6162 additions and 525 deletions

View File

@ -0,0 +1,105 @@
package com.zhyc.module.biosafety.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.biosafety.domain.Deworm;
import com.zhyc.module.biosafety.service.IDewormService;
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.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 驱虫Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/biosafety/deworm")
public class DewormController extends BaseController
{
@Autowired
private IDewormService dewormService;
/**
* 查询驱虫列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:deworm:list')")
@GetMapping("/list")
public TableDataInfo list(Deworm deworm)
{
startPage();
List<Deworm> list = dewormService.selectDewormList(deworm);
return getDataTable(list);
}
/**
* 导出驱虫列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:deworm:export')")
@Log(title = "驱虫", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Deworm deworm)
{
List<Deworm> list = dewormService.selectDewormList(deworm);
ExcelUtil<Deworm> util = new ExcelUtil<Deworm>(Deworm.class);
util.exportExcel(response, list, "驱虫数据");
}
/**
* 获取驱虫详细信息
*/
@PreAuthorize("@ss.hasPermi('biosafety:deworm:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dewormService.selectDewormById(id));
}
/**
* 新增驱虫
*/
@PreAuthorize("@ss.hasPermi('biosafety:deworm:add')")
@Log(title = "驱虫", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Deworm deworm)
{
return toAjax(dewormService.insertDeworm(deworm));
}
/**
* 修改驱虫
*/
@PreAuthorize("@ss.hasPermi('biosafety:deworm:edit')")
@Log(title = "驱虫", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Deworm deworm)
{
return toAjax(dewormService.updateDeworm(deworm));
}
/**
* 删除驱虫
*/
@PreAuthorize("@ss.hasPermi('biosafety:deworm:remove')")
@Log(title = "驱虫", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dewormService.deleteDewormByIds(ids));
}
}

View File

@ -0,0 +1,104 @@
package com.zhyc.module.biosafety.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.biosafety.domain.Diagnosis;
import com.zhyc.module.biosafety.service.IDiagnosisService;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 诊疗结果Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/diagnosis/diagnosis")
public class DiagnosisController extends BaseController
{
@Autowired
private IDiagnosisService diagnosisService;
/**
* 查询诊疗结果列表
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:list')")
@GetMapping("/list")
public TableDataInfo list(Diagnosis diagnosis)
{
startPage();
List<Diagnosis> list = diagnosisService.selectDiagnosisList(diagnosis);
return getDataTable(list);
}
/**
* 导出诊疗结果列表
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:export')")
@Log(title = "诊疗结果", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Diagnosis diagnosis)
{
List<Diagnosis> list = diagnosisService.selectDiagnosisList(diagnosis);
ExcelUtil<Diagnosis> util = new ExcelUtil<Diagnosis>(Diagnosis.class);
util.exportExcel(response, list, "诊疗结果数据");
}
/**
* 获取诊疗结果详细信息
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(diagnosisService.selectDiagnosisById(id));
}
/**
* 新增诊疗结果
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:add')")
@Log(title = "诊疗结果", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Diagnosis diagnosis)
{
return toAjax(diagnosisService.insertDiagnosis(diagnosis));
}
/**
* 修改诊疗结果
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:edit')")
@Log(title = "诊疗结果", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Diagnosis diagnosis)
{
return toAjax(diagnosisService.updateDiagnosis(diagnosis));
}
/**
* 删除诊疗结果
*/
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:remove')")
@Log(title = "诊疗结果", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(diagnosisService.deleteDiagnosisByIds(ids));
}
}

View File

@ -0,0 +1,105 @@
package com.zhyc.module.biosafety.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.biosafety.service.IDisinfectService;
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.biosafety.domain.Disinfect;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 消毒记录Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/biosafety/disinfect")
public class DisinfectController extends BaseController
{
@Autowired
private IDisinfectService disinfectService;
/**
* 查询消毒记录列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:list')")
@GetMapping("/list")
public TableDataInfo list(Disinfect disinfect)
{
startPage();
List<Disinfect> list = disinfectService.selectDisinfectList(disinfect);
return getDataTable(list);
}
/**
* 导出消毒记录列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:export')")
@Log(title = "消毒记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Disinfect disinfect)
{
List<Disinfect> list = disinfectService.selectDisinfectList(disinfect);
ExcelUtil<Disinfect> util = new ExcelUtil<Disinfect>(Disinfect.class);
util.exportExcel(response, list, "消毒记录数据");
}
/**
* 获取消毒记录详细信息
*/
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(disinfectService.selectDisinfectById(id));
}
/**
* 新增消毒记录
*/
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:add')")
@Log(title = "消毒记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Disinfect disinfect)
{
return toAjax(disinfectService.insertDisinfect(disinfect));
}
/**
* 修改消毒记录
*/
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:edit')")
@Log(title = "消毒记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Disinfect disinfect)
{
return toAjax(disinfectService.updateDisinfect(disinfect));
}
/**
* 删除消毒记录
*/
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:remove')")
@Log(title = "消毒记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(disinfectService.deleteDisinfectByIds(ids));
}
}

View File

@ -0,0 +1,105 @@
package com.zhyc.module.biosafety.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.biosafety.service.IHealthService;
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.biosafety.domain.Health;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 保健Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/biosafety/health")
public class HealthController extends BaseController
{
@Autowired
private IHealthService healthService;
/**
* 查询保健列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:health:list')")
@GetMapping("/list")
public TableDataInfo list(Health health)
{
startPage();
List<Health> list = healthService.selectHealthList(health);
return getDataTable(list);
}
/**
* 导出保健列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:health:export')")
@Log(title = "保健", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Health health)
{
List<Health> list = healthService.selectHealthList(health);
ExcelUtil<Health> util = new ExcelUtil<Health>(Health.class);
util.exportExcel(response, list, "保健数据");
}
/**
* 获取保健详细信息
*/
@PreAuthorize("@ss.hasPermi('biosafety:health:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(healthService.selectHealthById(id));
}
/**
* 新增保健
*/
@PreAuthorize("@ss.hasPermi('biosafety:health:add')")
@Log(title = "保健", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Health health)
{
return toAjax(healthService.insertHealth(health));
}
/**
* 修改保健
*/
@PreAuthorize("@ss.hasPermi('biosafety:health:edit')")
@Log(title = "保健", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Health health)
{
return toAjax(healthService.updateHealth(health));
}
/**
* 删除保健
*/
@PreAuthorize("@ss.hasPermi('biosafety:health:remove')")
@Log(title = "保健", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(healthService.deleteHealthByIds(ids));
}
}

View File

@ -0,0 +1,105 @@
package com.zhyc.module.biosafety.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.biosafety.service.IImmunityService;
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.biosafety.domain.Immunity;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 免疫Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/biosafety/immunity")
public class ImmunityController extends BaseController
{
@Autowired
private IImmunityService immunityService;
/**
* 查询免疫列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:immunity:list')")
@GetMapping("/list")
public TableDataInfo list(Immunity immunity)
{
startPage();
List<Immunity> list = immunityService.selectImmunityList(immunity);
return getDataTable(list);
}
/**
* 导出免疫列表
*/
@PreAuthorize("@ss.hasPermi('biosafety:immunity:export')")
@Log(title = "免疫", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Immunity immunity)
{
List<Immunity> list = immunityService.selectImmunityList(immunity);
ExcelUtil<Immunity> util = new ExcelUtil<Immunity>(Immunity.class);
util.exportExcel(response, list, "免疫数据");
}
/**
* 获取免疫详细信息
*/
@PreAuthorize("@ss.hasPermi('biosafety:immunity:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(immunityService.selectImmunityById(id));
}
/**
* 新增免疫
*/
@PreAuthorize("@ss.hasPermi('biosafety:immunity:add')")
@Log(title = "免疫", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Immunity immunity)
{
return toAjax(immunityService.insertImmunity(immunity));
}
/**
* 修改免疫
*/
@PreAuthorize("@ss.hasPermi('biosafety:immunity:edit')")
@Log(title = "免疫", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Immunity immunity)
{
return toAjax(immunityService.updateImmunity(immunity));
}
/**
* 删除免疫
*/
@PreAuthorize("@ss.hasPermi('biosafety:immunity:remove')")
@Log(title = "免疫", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(immunityService.deleteImmunityByIds(ids));
}
}

View File

@ -0,0 +1,105 @@
package com.zhyc.module.biosafety.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.biosafety.domain.Treatment;
import com.zhyc.module.biosafety.service.ITreatmentService;
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.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 治疗记录Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/treatment/treatment")
public class TreatmentController extends BaseController
{
@Autowired
private ITreatmentService treatmentService;
/**
* 查询治疗记录列表
*/
@PreAuthorize("@ss.hasPermi('treatment:treatment:list')")
@GetMapping("/list")
public TableDataInfo list(Treatment treatment)
{
startPage();
List<Treatment> list = treatmentService.selectTreatmentList(treatment);
return getDataTable(list);
}
/**
* 导出治疗记录列表
*/
@PreAuthorize("@ss.hasPermi('treatment:treatment:export')")
@Log(title = "治疗记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Treatment treatment)
{
List<Treatment> list = treatmentService.selectTreatmentList(treatment);
ExcelUtil<Treatment> util = new ExcelUtil<Treatment>(Treatment.class);
util.exportExcel(response, list, "治疗记录数据");
}
/**
* 获取治疗记录详细信息
*/
@PreAuthorize("@ss.hasPermi('treatment:treatment:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(treatmentService.selectTreatmentById(id));
}
/**
* 新增治疗记录
*/
@PreAuthorize("@ss.hasPermi('treatment:treatment:add')")
@Log(title = "治疗记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Treatment treatment)
{
return toAjax(treatmentService.insertTreatment(treatment));
}
/**
* 修改治疗记录
*/
@PreAuthorize("@ss.hasPermi('treatment:treatment:edit')")
@Log(title = "治疗记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Treatment treatment)
{
return toAjax(treatmentService.updateTreatment(treatment));
}
/**
* 删除治疗记录
*/
@PreAuthorize("@ss.hasPermi('treatment:treatment:remove')")
@Log(title = "治疗记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(treatmentService.deleteTreatmentByIds(ids));
}
}

View File

@ -0,0 +1,194 @@
package com.zhyc.module.biosafety.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;
/**
* 驱虫对象 sw_deworm
*
* @author ruoyi
* @date 2025-07-15
*/
public class Deworm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 羊只id */
@Excel(name = "羊只id")
private Long sheepId;
/** 药品使用记录 */
@Excel(name = "药品使用记录")
private Long usageId;
/** 品种 */
@Excel(name = "品种")
private String variety;
/** 羊只类别 */
@Excel(name = "羊只类别")
private String sheepType;
/** 性别 */
@Excel(name = "性别")
private String gender;
/** 月龄 */
@Excel(name = "月龄")
private Long monthAge;
/** 胎次 */
@Excel(name = "胎次")
private Long parity;
/** 驱虫日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "驱虫日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 技术员 */
@Excel(name = "技术员")
private String technical;
/** 备注 */
@Excel(name = "备注")
private String comment;
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 setUsageId(Long usageId)
{
this.usageId = usageId;
}
public Long getUsageId()
{
return usageId;
}
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(String gender)
{
this.gender = gender;
}
public String getGender()
{
return gender;
}
public void setMonthAge(Long monthAge)
{
this.monthAge = monthAge;
}
public Long getMonthAge()
{
return monthAge;
}
public void setParity(Long parity)
{
this.parity = parity;
}
public Long getParity()
{
return parity;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
public void setTechnical(String technical)
{
this.technical = technical;
}
public String getTechnical()
{
return technical;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("sheepId", getSheepId())
.append("usageId", getUsageId())
.append("variety", getVariety())
.append("sheepType", getSheepType())
.append("gender", getGender())
.append("monthAge", getMonthAge())
.append("parity", getParity())
.append("datetime", getDatetime())
.append("technical", getTechnical())
.append("comment", getComment())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,239 @@
package com.zhyc.module.biosafety.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;
/**
* 诊疗结果对象 sw_diagnosis
*
* @author ruoyi
* @date 2025-07-15
*/
public class Diagnosis extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 治疗记录id */
@Excel(name = "治疗记录id")
private Long treatId;
/** 羊只id */
@Excel(name = "羊只id")
private Long sheepId;
/** 时间日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "时间日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 羊只类别 */
@Excel(name = "羊只类别")
private String sheepType;
/** 性别 */
@Excel(name = "性别")
private String gender;
/** 胎次 */
@Excel(name = "胎次")
private String parity;
/** 疾病类型 */
@Excel(name = "疾病类型")
private Long diseasePid;
/** 子疾病 */
@Excel(name = "子疾病")
private Long diseaseId;
/** 诊疗结果 */
@Excel(name = "诊疗结果")
private Long result;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date begindate;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date enddate;
/** 治疗天数 */
@Excel(name = "治疗天数")
private Long treatDay;
/** 羊舍id */
@Excel(name = "羊舍id")
private Long sheepfoldId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTreatId(Long treatId)
{
this.treatId = treatId;
}
public Long getTreatId()
{
return treatId;
}
public void setSheepId(Long sheepId)
{
this.sheepId = sheepId;
}
public Long getSheepId()
{
return sheepId;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
public void setSheepType(String sheepType)
{
this.sheepType = sheepType;
}
public String getSheepType()
{
return sheepType;
}
public void setGender(String gender)
{
this.gender = gender;
}
public String getGender()
{
return gender;
}
public void setParity(String parity)
{
this.parity = parity;
}
public String getParity()
{
return parity;
}
public void setDiseasePid(Long diseasePid)
{
this.diseasePid = diseasePid;
}
public Long getDiseasePid()
{
return diseasePid;
}
public void setDiseaseId(Long diseaseId)
{
this.diseaseId = diseaseId;
}
public Long getDiseaseId()
{
return diseaseId;
}
public void setResult(Long result)
{
this.result = result;
}
public Long getResult()
{
return result;
}
public void setBegindate(Date begindate)
{
this.begindate = begindate;
}
public Date getBegindate()
{
return begindate;
}
public void setEnddate(Date enddate)
{
this.enddate = enddate;
}
public Date getEnddate()
{
return enddate;
}
public void setTreatDay(Long treatDay)
{
this.treatDay = treatDay;
}
public Long getTreatDay()
{
return treatDay;
}
public void setSheepfoldId(Long sheepfoldId)
{
this.sheepfoldId = sheepfoldId;
}
public Long getSheepfoldId()
{
return sheepfoldId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("treatId", getTreatId())
.append("sheepId", getSheepId())
.append("datetime", getDatetime())
.append("sheepType", getSheepType())
.append("gender", getGender())
.append("parity", getParity())
.append("diseasePid", getDiseasePid())
.append("diseaseId", getDiseaseId())
.append("result", getResult())
.append("begindate", getBegindate())
.append("enddate", getEnddate())
.append("treatDay", getTreatDay())
.append("sheepfoldId", getSheepfoldId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,149 @@
package com.zhyc.module.biosafety.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;
/**
* 消毒记录对象 sw_disinfect
*
* @author ruoyi
* @date 2025-07-15
*/
public class Disinfect extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long id;
/** 羊舍id */
@Excel(name = "羊舍id")
private Long sheepfoldId;
/** 消毒日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "消毒日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 技术员 */
@Excel(name = "技术员")
private String technician;
/** 消毒方式 */
@Excel(name = "消毒方式")
private String way;
/** 药品使用记录id */
@Excel(name = "药品使用记录id")
private Long usageId;
/** 比例 */
@Excel(name = "比例")
private String ratio;
/** 备注 */
@Excel(name = "备注")
private String comment;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSheepfoldId(Long sheepfoldId)
{
this.sheepfoldId = sheepfoldId;
}
public Long getSheepfoldId()
{
return sheepfoldId;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
public void setTechnician(String technician)
{
this.technician = technician;
}
public String getTechnician()
{
return technician;
}
public void setWay(String way)
{
this.way = way;
}
public String getWay()
{
return way;
}
public void setUsageId(Long usageId)
{
this.usageId = usageId;
}
public Long getUsageId()
{
return usageId;
}
public void setRatio(String ratio)
{
this.ratio = ratio;
}
public String getRatio()
{
return ratio;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("sheepfoldId", getSheepfoldId())
.append("datetime", getDatetime())
.append("technician", getTechnician())
.append("way", getWay())
.append("usageId", getUsageId())
.append("ratio", getRatio())
.append("comment", getComment())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,209 @@
package com.zhyc.module.biosafety.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;
/**
* 保健对象 sw_health
*
* @author ruoyi
* @date 2025-07-15
*/
public class Health extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 保健日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "保健日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 羊只id */
@Excel(name = "羊只id")
private Long sheepId;
/** 用药记录 */
@Excel(name = "用药记录")
private Long usageId;
/** 品种 */
@Excel(name = "品种")
private String variety;
/** 羊只类别 */
@Excel(name = "羊只类别")
private String sheepType;
/** 性别 */
@Excel(name = "性别")
private String gender;
/** 月龄 */
@Excel(name = "月龄")
private String monthAge;
/** 胎次 */
@Excel(name = "胎次")
private Long parity;
/** 羊舍id */
@Excel(name = "羊舍id")
private Long sheepfoldId;
/** 技术员 */
@Excel(name = "技术员")
private String technical;
/** 备注 */
@Excel(name = "备注")
private String comment;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
public void setSheepId(Long sheepId)
{
this.sheepId = sheepId;
}
public Long getSheepId()
{
return sheepId;
}
public void setUsageId(Long usageId)
{
this.usageId = usageId;
}
public Long getUsageId()
{
return usageId;
}
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(String gender)
{
this.gender = gender;
}
public String getGender()
{
return gender;
}
public void setMonthAge(String monthAge)
{
this.monthAge = monthAge;
}
public String getMonthAge()
{
return monthAge;
}
public void setParity(Long parity)
{
this.parity = parity;
}
public Long getParity()
{
return parity;
}
public void setSheepfoldId(Long sheepfoldId)
{
this.sheepfoldId = sheepfoldId;
}
public Long getSheepfoldId()
{
return sheepfoldId;
}
public void setTechnical(String technical)
{
this.technical = technical;
}
public String getTechnical()
{
return technical;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("datetime", getDatetime())
.append("sheepId", getSheepId())
.append("usageId", getUsageId())
.append("variety", getVariety())
.append("sheepType", getSheepType())
.append("gender", getGender())
.append("monthAge", getMonthAge())
.append("parity", getParity())
.append("sheepfoldId", getSheepfoldId())
.append("technical", getTechnical())
.append("comment", getComment())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,209 @@
package com.zhyc.module.biosafety.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;
/**
* 免疫对象 sw_immunity
*
* @author ruoyi
* @date 2025-07-15
*/
public class Immunity extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 羊只id */
@Excel(name = "羊只id")
private Long sheepId;
/** 使用记录 */
@Excel(name = "使用记录")
private Long usageId;
/** 品种 */
@Excel(name = "品种")
private String variety;
/** 羊只类型 */
@Excel(name = "羊只类型")
private Long sheepType;
/** 羊只性别 */
@Excel(name = "羊只性别")
private String gender;
/** 月龄 */
@Excel(name = "月龄")
private Long monthAge;
/** 胎次 */
@Excel(name = "胎次")
private Long parity;
/** 羊舍id */
@Excel(name = "羊舍id")
private Long sheepfoldId;
/** 免疫日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "免疫日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 技术员 */
@Excel(name = "技术员")
private String technical;
/** 备注 */
@Excel(name = "备注")
private String comment;
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 setUsageId(Long usageId)
{
this.usageId = usageId;
}
public Long getUsageId()
{
return usageId;
}
public void setVariety(String variety)
{
this.variety = variety;
}
public String getVariety()
{
return variety;
}
public void setSheepType(Long sheepType)
{
this.sheepType = sheepType;
}
public Long getSheepType()
{
return sheepType;
}
public void setGender(String gender)
{
this.gender = gender;
}
public String getGender()
{
return gender;
}
public void setMonthAge(Long monthAge)
{
this.monthAge = monthAge;
}
public Long getMonthAge()
{
return monthAge;
}
public void setParity(Long parity)
{
this.parity = parity;
}
public Long getParity()
{
return parity;
}
public void setSheepfoldId(Long sheepfoldId)
{
this.sheepfoldId = sheepfoldId;
}
public Long getSheepfoldId()
{
return sheepfoldId;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
public void setTechnical(String technical)
{
this.technical = technical;
}
public String getTechnical()
{
return technical;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("sheepId", getSheepId())
.append("usageId", getUsageId())
.append("variety", getVariety())
.append("sheepType", getSheepType())
.append("gender", getGender())
.append("monthAge", getMonthAge())
.append("parity", getParity())
.append("sheepfoldId", getSheepfoldId())
.append("datetime", getDatetime())
.append("technical", getTechnical())
.append("comment", getComment())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -60,7 +60,7 @@ public class QuarantineReport extends BaseEntity
/** 样品 */
@Excel(name = "样品类型")
private Long sample;
private String sample;
/** 采样员 */

View File

@ -0,0 +1,283 @@
package com.zhyc.module.biosafety.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;
/**
* 治疗记录对象 sw_treatment
*
* @author ruoyi
* @date 2025-07-15
*/
public class Treatment extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 诊疗记录id */
private Long diagId;
/** 羊只耳号 */
@Excel(name = "羊只耳号")
private Long sheepId;
/** 品种 */
@Excel(name = "品种")
private String variety;
/** 羊只类别 */
@Excel(name = "羊只类别")
private String sheepType;
/** 月龄 */
@Excel(name = "月龄")
private Long monthAge;
/** 性别 */
@Excel(name = "性别")
private String gender;
/** 胎次 */
@Excel(name = "胎次")
private Long parity;
/** 繁殖状态 */
@Excel(name = "繁殖状态")
private String breed;
/** 泌乳天数 */
@Excel(name = "泌乳天数")
private Long lactDay;
/** 怀孕天数 */
@Excel(name = "怀孕天数")
private Long gestDay;
/** 治疗日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "治疗日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 疾病类型 */
@Excel(name = "疾病类型")
private Long diseaseId;
/** 父疾病 */
@Excel(name = "父疾病")
private String diseasePid;
/** 兽医 */
@Excel(name = "兽医")
private String veterinary;
/** 药品使用记录id */
@Excel(name = "药品使用记录id")
private Long usageId;
/** 备注 */
@Excel(name = "备注")
private String comment;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDiagId(Long diagId)
{
this.diagId = diagId;
}
public Long getDiagId()
{
return diagId;
}
public void setSheepId(Long sheepId)
{
this.sheepId = sheepId;
}
public Long getSheepId()
{
return sheepId;
}
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 setMonthAge(Long monthAge)
{
this.monthAge = monthAge;
}
public Long getMonthAge()
{
return monthAge;
}
public void setGender(String gender)
{
this.gender = gender;
}
public String getGender()
{
return gender;
}
public void setParity(Long parity)
{
this.parity = parity;
}
public Long getParity()
{
return parity;
}
public void setBreed(String breed)
{
this.breed = breed;
}
public String getBreed()
{
return breed;
}
public void setLactDay(Long lactDay)
{
this.lactDay = lactDay;
}
public Long getLactDay()
{
return lactDay;
}
public void setGestDay(Long gestDay)
{
this.gestDay = gestDay;
}
public Long getGestDay()
{
return gestDay;
}
public void setDatetime(Date datetime)
{
this.datetime = datetime;
}
public Date getDatetime()
{
return datetime;
}
public void setDiseaseId(Long diseaseId)
{
this.diseaseId = diseaseId;
}
public Long getDiseaseId()
{
return diseaseId;
}
public void setDiseasePid(String diseasePid)
{
this.diseasePid = diseasePid;
}
public String getDiseasePid()
{
return diseasePid;
}
public void setVeterinary(String veterinary)
{
this.veterinary = veterinary;
}
public String getVeterinary()
{
return veterinary;
}
public void setUsageId(Long usageId)
{
this.usageId = usageId;
}
public Long getUsageId()
{
return usageId;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("diagId", getDiagId())
.append("sheepId", getSheepId())
.append("variety", getVariety())
.append("sheepType", getSheepType())
.append("monthAge", getMonthAge())
.append("gender", getGender())
.append("parity", getParity())
.append("breed", getBreed())
.append("lactDay", getLactDay())
.append("gestDay", getGestDay())
.append("datetime", getDatetime())
.append("diseaseId", getDiseaseId())
.append("diseasePid", getDiseasePid())
.append("veterinary", getVeterinary())
.append("usageId", getUsageId())
.append("comment", getComment())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,62 @@
package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Deworm;
/**
* 驱虫Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface DewormMapper
{
/**
* 查询驱虫
*
* @param id 驱虫主键
* @return 驱虫
*/
public Deworm selectDewormById(Long id);
/**
* 查询驱虫列表
*
* @param deworm 驱虫
* @return 驱虫集合
*/
public List<Deworm> selectDewormList(Deworm deworm);
/**
* 新增驱虫
*
* @param deworm 驱虫
* @return 结果
*/
public int insertDeworm(Deworm deworm);
/**
* 修改驱虫
*
* @param deworm 驱虫
* @return 结果
*/
public int updateDeworm(Deworm deworm);
/**
* 删除驱虫
*
* @param id 驱虫主键
* @return 结果
*/
public int deleteDewormById(Long id);
/**
* 批量删除驱虫
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDewormByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Diagnosis;
/**
* 诊疗结果Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface DiagnosisMapper
{
/**
* 查询诊疗结果
*
* @param id 诊疗结果主键
* @return 诊疗结果
*/
public Diagnosis selectDiagnosisById(Long id);
/**
* 查询诊疗结果列表
*
* @param diagnosis 诊疗结果
* @return 诊疗结果集合
*/
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis);
/**
* 新增诊疗结果
*
* @param diagnosis 诊疗结果
* @return 结果
*/
public int insertDiagnosis(Diagnosis diagnosis);
/**
* 修改诊疗结果
*
* @param diagnosis 诊疗结果
* @return 结果
*/
public int updateDiagnosis(Diagnosis diagnosis);
/**
* 删除诊疗结果
*
* @param id 诊疗结果主键
* @return 结果
*/
public int deleteDiagnosisById(Long id);
/**
* 批量删除诊疗结果
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDiagnosisByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Disinfect;
/**
* 消毒记录Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface DisinfectMapper
{
/**
* 查询消毒记录
*
* @param id 消毒记录主键
* @return 消毒记录
*/
public Disinfect selectDisinfectById(Long id);
/**
* 查询消毒记录列表
*
* @param disinfect 消毒记录
* @return 消毒记录集合
*/
public List<Disinfect> selectDisinfectList(Disinfect disinfect);
/**
* 新增消毒记录
*
* @param disinfect 消毒记录
* @return 结果
*/
public int insertDisinfect(Disinfect disinfect);
/**
* 修改消毒记录
*
* @param disinfect 消毒记录
* @return 结果
*/
public int updateDisinfect(Disinfect disinfect);
/**
* 删除消毒记录
*
* @param id 消毒记录主键
* @return 结果
*/
public int deleteDisinfectById(Long id);
/**
* 批量删除消毒记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDisinfectByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Health;
/**
* 保健Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface HealthMapper
{
/**
* 查询保健
*
* @param id 保健主键
* @return 保健
*/
public Health selectHealthById(Long id);
/**
* 查询保健列表
*
* @param health 保健
* @return 保健集合
*/
public List<Health> selectHealthList(Health health);
/**
* 新增保健
*
* @param health 保健
* @return 结果
*/
public int insertHealth(Health health);
/**
* 修改保健
*
* @param health 保健
* @return 结果
*/
public int updateHealth(Health health);
/**
* 删除保健
*
* @param id 保健主键
* @return 结果
*/
public int deleteHealthById(Long id);
/**
* 批量删除保健
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteHealthByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Immunity;
/**
* 免疫Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface ImmunityMapper
{
/**
* 查询免疫
*
* @param id 免疫主键
* @return 免疫
*/
public Immunity selectImmunityById(Long id);
/**
* 查询免疫列表
*
* @param immunity 免疫
* @return 免疫集合
*/
public List<Immunity> selectImmunityList(Immunity immunity);
/**
* 新增免疫
*
* @param immunity 免疫
* @return 结果
*/
public int insertImmunity(Immunity immunity);
/**
* 修改免疫
*
* @param immunity 免疫
* @return 结果
*/
public int updateImmunity(Immunity immunity);
/**
* 删除免疫
*
* @param id 免疫主键
* @return 结果
*/
public int deleteImmunityById(Long id);
/**
* 批量删除免疫
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteImmunityByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.zhyc.module.biosafety.mapper;
import java.util.List;
import com.zhyc.module.biosafety.domain.Treatment;
/**
* 治疗记录Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface TreatmentMapper
{
/**
* 查询治疗记录
*
* @param id 治疗记录主键
* @return 治疗记录
*/
public Treatment selectTreatmentById(Long id);
/**
* 查询治疗记录列表
*
* @param treatment 治疗记录
* @return 治疗记录集合
*/
public List<Treatment> selectTreatmentList(Treatment treatment);
/**
* 新增治疗记录
*
* @param treatment 治疗记录
* @return 结果
*/
public int insertTreatment(Treatment treatment);
/**
* 修改治疗记录
*
* @param treatment 治疗记录
* @return 结果
*/
public int updateTreatment(Treatment treatment);
/**
* 删除治疗记录
*
* @param id 治疗记录主键
* @return 结果
*/
public int deleteTreatmentById(Long id);
/**
* 批量删除治疗记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTreatmentByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.zhyc.module.biosafety.service;
import java.util.List;
import com.zhyc.module.biosafety.domain.Deworm;
/**
* 驱虫Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface IDewormService
{
/**
* 查询驱虫
*
* @param id 驱虫主键
* @return 驱虫
*/
public Deworm selectDewormById(Long id);
/**
* 查询驱虫列表
*
* @param deworm 驱虫
* @return 驱虫集合
*/
public List<Deworm> selectDewormList(Deworm deworm);
/**
* 新增驱虫
*
* @param deworm 驱虫
* @return 结果
*/
public int insertDeworm(Deworm deworm);
/**
* 修改驱虫
*
* @param deworm 驱虫
* @return 结果
*/
public int updateDeworm(Deworm deworm);
/**
* 批量删除驱虫
*
* @param ids 需要删除的驱虫主键集合
* @return 结果
*/
public int deleteDewormByIds(Long[] ids);
/**
* 删除驱虫信息
*
* @param id 驱虫主键
* @return 结果
*/
public int deleteDewormById(Long id);
}

View File

@ -0,0 +1,62 @@
package com.zhyc.module.biosafety.service;
import java.util.List;
import com.zhyc.module.biosafety.domain.Diagnosis;
/**
* 诊疗结果Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface IDiagnosisService
{
/**
* 查询诊疗结果
*
* @param id 诊疗结果主键
* @return 诊疗结果
*/
public Diagnosis selectDiagnosisById(Long id);
/**
* 查询诊疗结果列表
*
* @param diagnosis 诊疗结果
* @return 诊疗结果集合
*/
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis);
/**
* 新增诊疗结果
*
* @param diagnosis 诊疗结果
* @return 结果
*/
public int insertDiagnosis(Diagnosis diagnosis);
/**
* 修改诊疗结果
*
* @param diagnosis 诊疗结果
* @return 结果
*/
public int updateDiagnosis(Diagnosis diagnosis);
/**
* 批量删除诊疗结果
*
* @param ids 需要删除的诊疗结果主键集合
* @return 结果
*/
public int deleteDiagnosisByIds(Long[] ids);
/**
* 删除诊疗结果信息
*
* @param id 诊疗结果主键
* @return 结果
*/
public int deleteDiagnosisById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.service;
import java.util.List;
import com.zhyc.module.biosafety.domain.Disinfect;
/**
* 消毒记录Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface IDisinfectService
{
/**
* 查询消毒记录
*
* @param id 消毒记录主键
* @return 消毒记录
*/
public Disinfect selectDisinfectById(Long id);
/**
* 查询消毒记录列表
*
* @param disinfect 消毒记录
* @return 消毒记录集合
*/
public List<Disinfect> selectDisinfectList(Disinfect disinfect);
/**
* 新增消毒记录
*
* @param disinfect 消毒记录
* @return 结果
*/
public int insertDisinfect(Disinfect disinfect);
/**
* 修改消毒记录
*
* @param disinfect 消毒记录
* @return 结果
*/
public int updateDisinfect(Disinfect disinfect);
/**
* 批量删除消毒记录
*
* @param ids 需要删除的消毒记录主键集合
* @return 结果
*/
public int deleteDisinfectByIds(Long[] ids);
/**
* 删除消毒记录信息
*
* @param id 消毒记录主键
* @return 结果
*/
public int deleteDisinfectById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.service;
import java.util.List;
import com.zhyc.module.biosafety.domain.Health;
/**
* 保健Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface IHealthService
{
/**
* 查询保健
*
* @param id 保健主键
* @return 保健
*/
public Health selectHealthById(Long id);
/**
* 查询保健列表
*
* @param health 保健
* @return 保健集合
*/
public List<Health> selectHealthList(Health health);
/**
* 新增保健
*
* @param health 保健
* @return 结果
*/
public int insertHealth(Health health);
/**
* 修改保健
*
* @param health 保健
* @return 结果
*/
public int updateHealth(Health health);
/**
* 批量删除保健
*
* @param ids 需要删除的保健主键集合
* @return 结果
*/
public int deleteHealthByIds(Long[] ids);
/**
* 删除保健信息
*
* @param id 保健主键
* @return 结果
*/
public int deleteHealthById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.biosafety.service;
import java.util.List;
import com.zhyc.module.biosafety.domain.Immunity;
/**
* 免疫Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface IImmunityService
{
/**
* 查询免疫
*
* @param id 免疫主键
* @return 免疫
*/
public Immunity selectImmunityById(Long id);
/**
* 查询免疫列表
*
* @param immunity 免疫
* @return 免疫集合
*/
public List<Immunity> selectImmunityList(Immunity immunity);
/**
* 新增免疫
*
* @param immunity 免疫
* @return 结果
*/
public int insertImmunity(Immunity immunity);
/**
* 修改免疫
*
* @param immunity 免疫
* @return 结果
*/
public int updateImmunity(Immunity immunity);
/**
* 批量删除免疫
*
* @param ids 需要删除的免疫主键集合
* @return 结果
*/
public int deleteImmunityByIds(Long[] ids);
/**
* 删除免疫信息
*
* @param id 免疫主键
* @return 结果
*/
public int deleteImmunityById(Long id);
}

View File

@ -0,0 +1,62 @@
package com.zhyc.module.biosafety.service;
import java.util.List;
import com.zhyc.module.biosafety.domain.Treatment;
/**
* 治疗记录Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface ITreatmentService
{
/**
* 查询治疗记录
*
* @param id 治疗记录主键
* @return 治疗记录
*/
public Treatment selectTreatmentById(Long id);
/**
* 查询治疗记录列表
*
* @param treatment 治疗记录
* @return 治疗记录集合
*/
public List<Treatment> selectTreatmentList(Treatment treatment);
/**
* 新增治疗记录
*
* @param treatment 治疗记录
* @return 结果
*/
public int insertTreatment(Treatment treatment);
/**
* 修改治疗记录
*
* @param treatment 治疗记录
* @return 结果
*/
public int updateTreatment(Treatment treatment);
/**
* 批量删除治疗记录
*
* @param ids 需要删除的治疗记录主键集合
* @return 结果
*/
public int deleteTreatmentByIds(Long[] ids);
/**
* 删除治疗记录信息
*
* @param id 治疗记录主键
* @return 结果
*/
public int deleteTreatmentById(Long id);
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.biosafety.service.impl;
import java.util.List;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.module.biosafety.domain.Deworm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhyc.module.biosafety.mapper.DewormMapper;
import com.zhyc.module.biosafety.service.IDewormService;
/**
* 驱虫Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class DewormServiceImpl implements IDewormService
{
@Autowired
private DewormMapper dewormMapper;
/**
* 查询驱虫
*
* @param id 驱虫主键
* @return 驱虫
*/
@Override
public Deworm selectDewormById(Long id)
{
return dewormMapper.selectDewormById(id);
}
/**
* 查询驱虫列表
*
* @param deworm 驱虫
* @return 驱虫
*/
@Override
public List<Deworm> selectDewormList(Deworm deworm)
{
return dewormMapper.selectDewormList(deworm);
}
/**
* 新增驱虫
*
* @param deworm 驱虫
* @return 结果
*/
@Override
public int insertDeworm(Deworm deworm)
{
deworm.setCreateTime(DateUtils.getNowDate());
return dewormMapper.insertDeworm(deworm);
}
/**
* 修改驱虫
*
* @param deworm 驱虫
* @return 结果
*/
@Override
public int updateDeworm(Deworm deworm)
{
deworm.setUpdateTime(DateUtils.getNowDate());
return dewormMapper.updateDeworm(deworm);
}
/**
* 批量删除驱虫
*
* @param ids 需要删除的驱虫主键
* @return 结果
*/
@Override
public int deleteDewormByIds(Long[] ids)
{
return dewormMapper.deleteDewormByIds(ids);
}
/**
* 删除驱虫信息
*
* @param id 驱虫主键
* @return 结果
*/
@Override
public int deleteDewormById(Long id)
{
return dewormMapper.deleteDewormById(id);
}
}

View File

@ -0,0 +1,95 @@
package com.zhyc.module.biosafety.service.impl;
import java.util.List;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.module.biosafety.mapper.DiagnosisMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhyc.module.biosafety.domain.Diagnosis;
import com.zhyc.module.biosafety.service.IDiagnosisService;
/**
* 诊疗结果Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class DiagnosisServiceImpl implements IDiagnosisService
{
@Autowired
private DiagnosisMapper diagnosisMapper;
/**
* 查询诊疗结果
*
* @param id 诊疗结果主键
* @return 诊疗结果
*/
@Override
public Diagnosis selectDiagnosisById(Long id)
{
return diagnosisMapper.selectDiagnosisById(id);
}
/**
* 查询诊疗结果列表
*
* @param diagnosis 诊疗结果
* @return 诊疗结果
*/
@Override
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis)
{
return diagnosisMapper.selectDiagnosisList(diagnosis);
}
/**
* 新增诊疗结果
*
* @param diagnosis 诊疗结果
* @return 结果
*/
@Override
public int insertDiagnosis(Diagnosis diagnosis)
{
diagnosis.setCreateTime(DateUtils.getNowDate());
return diagnosisMapper.insertDiagnosis(diagnosis);
}
/**
* 修改诊疗结果
*
* @param diagnosis 诊疗结果
* @return 结果
*/
@Override
public int updateDiagnosis(Diagnosis diagnosis)
{
return diagnosisMapper.updateDiagnosis(diagnosis);
}
/**
* 批量删除诊疗结果
*
* @param ids 需要删除的诊疗结果主键
* @return 结果
*/
@Override
public int deleteDiagnosisByIds(Long[] ids)
{
return diagnosisMapper.deleteDiagnosisByIds(ids);
}
/**
* 删除诊疗结果信息
*
* @param id 诊疗结果主键
* @return 结果
*/
@Override
public int deleteDiagnosisById(Long id)
{
return diagnosisMapper.deleteDiagnosisById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.biosafety.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.biosafety.mapper.DisinfectMapper;
import com.zhyc.module.biosafety.domain.Disinfect;
import com.zhyc.module.biosafety.service.IDisinfectService;
/**
* 消毒记录Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class DisinfectServiceImpl implements IDisinfectService
{
@Autowired
private DisinfectMapper disinfectMapper;
/**
* 查询消毒记录
*
* @param id 消毒记录主键
* @return 消毒记录
*/
@Override
public Disinfect selectDisinfectById(Long id)
{
return disinfectMapper.selectDisinfectById(id);
}
/**
* 查询消毒记录列表
*
* @param disinfect 消毒记录
* @return 消毒记录
*/
@Override
public List<Disinfect> selectDisinfectList(Disinfect disinfect)
{
return disinfectMapper.selectDisinfectList(disinfect);
}
/**
* 新增消毒记录
*
* @param disinfect 消毒记录
* @return 结果
*/
@Override
public int insertDisinfect(Disinfect disinfect)
{
disinfect.setCreateTime(DateUtils.getNowDate());
return disinfectMapper.insertDisinfect(disinfect);
}
/**
* 修改消毒记录
*
* @param disinfect 消毒记录
* @return 结果
*/
@Override
public int updateDisinfect(Disinfect disinfect)
{
disinfect.setUpdateTime(DateUtils.getNowDate());
return disinfectMapper.updateDisinfect(disinfect);
}
/**
* 批量删除消毒记录
*
* @param ids 需要删除的消毒记录主键
* @return 结果
*/
@Override
public int deleteDisinfectByIds(Long[] ids)
{
return disinfectMapper.deleteDisinfectByIds(ids);
}
/**
* 删除消毒记录信息
*
* @param id 消毒记录主键
* @return 结果
*/
@Override
public int deleteDisinfectById(Long id)
{
return disinfectMapper.deleteDisinfectById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.biosafety.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.biosafety.mapper.HealthMapper;
import com.zhyc.module.biosafety.domain.Health;
import com.zhyc.module.biosafety.service.IHealthService;
/**
* 保健Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class HealthServiceImpl implements IHealthService
{
@Autowired
private HealthMapper healthMapper;
/**
* 查询保健
*
* @param id 保健主键
* @return 保健
*/
@Override
public Health selectHealthById(Long id)
{
return healthMapper.selectHealthById(id);
}
/**
* 查询保健列表
*
* @param health 保健
* @return 保健
*/
@Override
public List<Health> selectHealthList(Health health)
{
return healthMapper.selectHealthList(health);
}
/**
* 新增保健
*
* @param health 保健
* @return 结果
*/
@Override
public int insertHealth(Health health)
{
health.setCreateTime(DateUtils.getNowDate());
return healthMapper.insertHealth(health);
}
/**
* 修改保健
*
* @param health 保健
* @return 结果
*/
@Override
public int updateHealth(Health health)
{
health.setUpdateTime(DateUtils.getNowDate());
return healthMapper.updateHealth(health);
}
/**
* 批量删除保健
*
* @param ids 需要删除的保健主键
* @return 结果
*/
@Override
public int deleteHealthByIds(Long[] ids)
{
return healthMapper.deleteHealthByIds(ids);
}
/**
* 删除保健信息
*
* @param id 保健主键
* @return 结果
*/
@Override
public int deleteHealthById(Long id)
{
return healthMapper.deleteHealthById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.biosafety.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.biosafety.mapper.ImmunityMapper;
import com.zhyc.module.biosafety.domain.Immunity;
import com.zhyc.module.biosafety.service.IImmunityService;
/**
* 免疫Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class ImmunityServiceImpl implements IImmunityService
{
@Autowired
private ImmunityMapper immunityMapper;
/**
* 查询免疫
*
* @param id 免疫主键
* @return 免疫
*/
@Override
public Immunity selectImmunityById(Long id)
{
return immunityMapper.selectImmunityById(id);
}
/**
* 查询免疫列表
*
* @param immunity 免疫
* @return 免疫
*/
@Override
public List<Immunity> selectImmunityList(Immunity immunity)
{
return immunityMapper.selectImmunityList(immunity);
}
/**
* 新增免疫
*
* @param immunity 免疫
* @return 结果
*/
@Override
public int insertImmunity(Immunity immunity)
{
immunity.setCreateTime(DateUtils.getNowDate());
return immunityMapper.insertImmunity(immunity);
}
/**
* 修改免疫
*
* @param immunity 免疫
* @return 结果
*/
@Override
public int updateImmunity(Immunity immunity)
{
immunity.setUpdateTime(DateUtils.getNowDate());
return immunityMapper.updateImmunity(immunity);
}
/**
* 批量删除免疫
*
* @param ids 需要删除的免疫主键
* @return 结果
*/
@Override
public int deleteImmunityByIds(Long[] ids)
{
return immunityMapper.deleteImmunityByIds(ids);
}
/**
* 删除免疫信息
*
* @param id 免疫主键
* @return 结果
*/
@Override
public int deleteImmunityById(Long id)
{
return immunityMapper.deleteImmunityById(id);
}
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.biosafety.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.biosafety.mapper.TreatmentMapper;
import com.zhyc.module.biosafety.domain.Treatment;
import com.zhyc.module.biosafety.service.ITreatmentService;
/**
* 治疗记录Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class TreatmentServiceImpl implements ITreatmentService
{
@Autowired
private TreatmentMapper treatmentMapper;
/**
* 查询治疗记录
*
* @param id 治疗记录主键
* @return 治疗记录
*/
@Override
public Treatment selectTreatmentById(Long id)
{
return treatmentMapper.selectTreatmentById(id);
}
/**
* 查询治疗记录列表
*
* @param treatment 治疗记录
* @return 治疗记录
*/
@Override
public List<Treatment> selectTreatmentList(Treatment treatment)
{
return treatmentMapper.selectTreatmentList(treatment);
}
/**
* 新增治疗记录
*
* @param treatment 治疗记录
* @return 结果
*/
@Override
public int insertTreatment(Treatment treatment)
{
treatment.setCreateTime(DateUtils.getNowDate());
return treatmentMapper.insertTreatment(treatment);
}
/**
* 修改治疗记录
*
* @param treatment 治疗记录
* @return 结果
*/
@Override
public int updateTreatment(Treatment treatment)
{
treatment.setUpdateTime(DateUtils.getNowDate());
return treatmentMapper.updateTreatment(treatment);
}
/**
* 批量删除治疗记录
*
* @param ids 需要删除的治疗记录主键
* @return 结果
*/
@Override
public int deleteTreatmentByIds(Long[] ids)
{
return treatmentMapper.deleteTreatmentByIds(ids);
}
/**
* 删除治疗记录信息
*
* @param id 治疗记录主键
* @return 结果
*/
@Override
public int deleteTreatmentById(Long id)
{
return treatmentMapper.deleteTreatmentById(id);
}
}

View File

@ -0,0 +1,104 @@
package com.zhyc.module.dairyProducts.rawMilkTest.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.dairyProducts.rawMilkTest.domain.NpRawMilkInspe;
import com.zhyc.module.dairyProducts.rawMilkTest.service.INpRawMilkInspeService;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 生乳检验记录Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/rawMilkTest/rawMilkTest")
public class NpRawMilkInspeController extends BaseController
{
@Autowired
private INpRawMilkInspeService npRawMilkInspeService;
/**
* 查询生乳检验记录列表
*/
@PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:list')")
@GetMapping("/list")
public TableDataInfo list(NpRawMilkInspe npRawMilkInspe)
{
startPage();
List<NpRawMilkInspe> list = npRawMilkInspeService.selectNpRawMilkInspeList(npRawMilkInspe);
return getDataTable(list);
}
/**
* 导出生乳检验记录列表
*/
@PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:export')")
@Log(title = "生乳检验记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, NpRawMilkInspe npRawMilkInspe)
{
List<NpRawMilkInspe> list = npRawMilkInspeService.selectNpRawMilkInspeList(npRawMilkInspe);
ExcelUtil<NpRawMilkInspe> util = new ExcelUtil<NpRawMilkInspe>(NpRawMilkInspe.class);
util.exportExcel(response, list, "生乳检验记录数据");
}
/**
* 获取生乳检验记录详细信息
*/
@PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(npRawMilkInspeService.selectNpRawMilkInspeById(id));
}
/**
* 新增生乳检验记录
*/
@PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:add')")
@Log(title = "生乳检验记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody NpRawMilkInspe npRawMilkInspe)
{
return toAjax(npRawMilkInspeService.insertNpRawMilkInspe(npRawMilkInspe));
}
/**
* 修改生乳检验记录
*/
@PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:edit')")
@Log(title = "生乳检验记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody NpRawMilkInspe npRawMilkInspe)
{
return toAjax(npRawMilkInspeService.updateNpRawMilkInspe(npRawMilkInspe));
}
/**
* 删除生乳检验记录
*/
@PreAuthorize("@ss.hasPermi('rawMilkTest:rawMilkTest:remove')")
@Log(title = "生乳检验记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(npRawMilkInspeService.deleteNpRawMilkInspeByIds(ids));
}
}

View File

@ -0,0 +1,647 @@
//package com.zhyc.module.dairyProducts.rawMilkTest.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;
//
///**
// * 生乳检验记录对象 np_raw_milk_inspe
// *
// * @author ruoyi
// * @date 2025-07-15
// */
//public class NpRawMilkInspe extends BaseEntity
//{
// private static final long serialVersionUID = 1L;
//
// /** $column.columnComment */
// private Long id;
//
// /** 检测日期 */
// @JsonFormat(pattern = "yyyy-MM-dd")
// @Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd")
// private Date datetime;
//
// /** 来源 */
// @Excel(name = "来源")
// private String source;
//
// /** 冰点(摄氏度) */
// @Excel(name = "冰点", readConverterExp = "摄=氏度")
// private Double freeze;
//
// /** 相对密度20摄氏度/40摄氏度 */
// @Excel(name = "相对密度", readConverterExp = "2=0摄氏度/40摄氏度")
// private Double density;
//
// /** 脂肪g/100g */
// @Excel(name = "脂肪g/100g")
// private Double fat;
//
// /** 蛋白质g/100g */
// @Excel(name = "蛋白质g/100g")
// private Double protein;
//
// /** 非脂g/100g */
// @Excel(name = "非脂g/100g")
// private Double nonFat;
//
// /** 干物质mg/100g */
// @Excel(name = "干物质mg/100g")
// private Double dryMatter;
//
// /** 杂物质mg/100g */
// @Excel(name = "杂物质mg/100g")
// private Double impurity;
//
// /** 乳糖g/100g */
// @Excel(name = "乳糖g/100g")
// private Double lactose;
//
// /** 灰度g/100g */
// @Excel(name = "灰度g/100g")
// private Double ashContent;
//
// /** 酸度 */
// @Excel(name = "酸度")
// private Double acidity;
//
// /** ph */
// @Excel(name = "ph")
// private Double ph;
//
// /** 菌落总数CFU/g */
// @Excel(name = "菌落总数", readConverterExp = "C=FU/g")
// private Double bacterialColony;
//
// /** 乳铁蛋白mg/L */
// @Excel(name = "乳铁蛋白", readConverterExp = "m=g/L")
// private Double lactoferrin;
//
// /** 免疫球蛋白mg/L */
// @Excel(name = "免疫球蛋白", readConverterExp = "m=g/L")
// private Double ig;
//
// /** 体细胞scc/ml */
// @Excel(name = "体细胞", readConverterExp = "s=cc/ml")
// private Double somaticCell;
//
// /** 尿素氮 */
// @Excel(name = "尿素氮")
// private Double usea;
//
// /** 脂蛋比 */
// @Excel(name = "脂蛋比")
// private Double fatRatio;
//
// /** 备注 */
// @Excel(name = "备注")
// private String comment;
//
// public void setId(Long id)
// {
// this.id = id;
// }
//
// public Long getId()
// {
// return id;
// }
//
// public void setDatetime(Date datetime)
// {
// this.datetime = datetime;
// }
//
// public Date getDatetime()
// {
// return datetime;
// }
//
// public void setSource(String source)
// {
// this.source = source;
// }
//
// public String getSource()
// {
// return source;
// }
//
// public void setFreeze(Double freeze)
// {
// this.freeze = freeze;
// }
//
// public Double getFreeze()
// {
// return freeze;
// }
//
// public void setDensity(Double density)
// {
// this.density = density;
// }
//
// public Double getDensity()
// {
// return density;
// }
//
// public void setFat(Double fat)
// {
// this.fat = fat;
// }
//
// public Double getFat()
// {
// return fat;
// }
//
// public void setProtein(Double protein)
// {
// this.protein = protein;
// }
//
// public Double getProtein()
// {
// return protein;
// }
//
// public void setNonFat(Double nonFat)
// {
// this.nonFat = nonFat;
// }
//
// public Double getNonFat()
// {
// return nonFat;
// }
//
// public void setDryMatter(Double dryMatter)
// {
// this.dryMatter = dryMatter;
// }
//
// public Double getDryMatter()
// {
// return dryMatter;
// }
//
// public void setImpurity(Double impurity)
// {
// this.impurity = impurity;
// }
//
// public Double getImpurity()
// {
// return impurity;
// }
//
// public void setLactose(Double lactose)
// {
// this.lactose = lactose;
// }
//
// public Double getLactose()
// {
// return lactose;
// }
//
// public void setAshContent(Double ashContent)
// {
// this.ashContent = ashContent;
// }
//
// public Double getAshContent()
// {
// return ashContent;
// }
//
// public void setAcidity(Double acidity)
// {
// this.acidity = acidity;
// }
//
// public Double getAcidity()
// {
// return acidity;
// }
//
// public void setPh(Double ph)
// {
// this.ph = ph;
// }
//
// public Double getPh()
// {
// return ph;
// }
//
// public void setBacterialColony(Double bacterialColony)
// {
// this.bacterialColony = bacterialColony;
// }
//
// public Double getBacterialColony()
// {
// return bacterialColony;
// }
//
// public void setLactoferrin(Double lactoferrin)
// {
// this.lactoferrin = lactoferrin;
// }
//
// public Double getLactoferrin()
// {
// return lactoferrin;
// }
//
// public void setIg(Double ig)
// {
// this.ig = ig;
// }
//
// public Double getIg()
// {
// return ig;
// }
//
// public void setSomaticCell(Double somaticCell)
// {
// this.somaticCell = somaticCell;
// }
//
// public Double getSomaticCell()
// {
// return somaticCell;
// }
//
// public void setUsea(Double usea)
// {
// this.usea = usea;
// }
//
// public Double getUsea()
// {
// return usea;
// }
//
// public void setFatRatio(Double fatRatio)
// {
// this.fatRatio = fatRatio;
// }
//
// public Double getFatRatio()
// {
// return fatRatio;
// }
//
// public void setComment(String comment)
// {
// this.comment = comment;
// }
//
// public String getComment()
// {
// return comment;
// }
//
// @Override
// public String toString() {
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
// .append("id", getId())
// .append("datetime", getDatetime())
// .append("source", getSource())
// .append("freeze", getFreeze())
// .append("density", getDensity())
// .append("fat", getFat())
// .append("protein", getProtein())
// .append("nonFat", getNonFat())
// .append("dryMatter", getDryMatter())
// .append("impurity", getImpurity())
// .append("lactose", getLactose())
// .append("ashContent", getAshContent())
// .append("acidity", getAcidity())
// .append("ph", getPh())
// .append("bacterialColony", getBacterialColony())
// .append("lactoferrin", getLactoferrin())
// .append("ig", getIg())
// .append("somaticCell", getSomaticCell())
// .append("usea", getUsea())
// .append("fatRatio", getFatRatio())
// .append("comment", getComment())
// .append("createBy", getCreateBy())
// .append("createTime", getCreateTime())
// .toString();
// }
//}
package com.zhyc.module.dairyProducts.rawMilkTest.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;
/**
* 生乳检验记录对象 np_raw_milk_inspe
*
* @author ruoyi
* @date 2025-07-15
*/
public class NpRawMilkInspe extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 检测日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date datetime;
/** 来源 */
@Excel(name = "来源")
private String source;
/** 冰点(摄氏度) */
@Excel(name = "冰点", readConverterExp = "摄=氏度")
private Double freeze;
/** 相对密度20摄氏度/40摄氏度 */
@Excel(name = "相对密度", readConverterExp = "2=0摄氏度/40摄氏度")
private Double density;
/** 脂肪g/100g */
@Excel(name = "脂肪g/100g")
private Double fat;
/** 蛋白质g/100g */
@Excel(name = "蛋白质g/100g")
private Double protein;
/** 非脂g/100g */
@Excel(name = "非脂g/100g")
private Double nonFat;
/** 干物质mg/100g */
@Excel(name = "干物质mg/100g")
private Double dryMatter;
/** 杂质度mg/100g */
@Excel(name = "杂质度mg/100g")
private Double impurityDegree;
/** 乳糖g/100g */
@Excel(name = "乳糖g/100g")
private Double lactose;
/** 灰度g/100g */
@Excel(name = "灰度g/100g")
private Double ashContent;
/** 酸度 */
@Excel(name = "酸度")
private Double acidity;
/** ph */
@Excel(name = "ph")
private Double ph;
/** 菌落总数CFU/g */
@Excel(name = "菌落总数", readConverterExp = "C=FU/g")
private Double bacterialColony;
/** 乳铁蛋白mg/L */
@Excel(name = "乳铁蛋白", readConverterExp = "m=g/L")
private Double lactoferrin;
/** 免疫球蛋白mg/L */
@Excel(name = "免疫球蛋白", readConverterExp = "m=g/L")
private Double ig;
/** 体细胞scc/ml */
@Excel(name = "体细胞", readConverterExp = "s=cc/ml")
private Double somaticCell;
/** 尿素氮 */
@Excel(name = "尿素氮")
private Double usea;
/** 脂蛋比 */
@Excel(name = "脂蛋比")
private Double fatRatio;
/** 备注 */
@Excel(name = "备注")
private String comment;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
// Getters and Setters
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setDatetime(Date datetime) {
this.datetime = datetime;
}
public Date getDatetime() {
return datetime;
}
public void setSource(String source) {
this.source = source;
}
public String getSource() {
return source;
}
public void setFreeze(Double freeze) {
this.freeze = freeze;
}
public Double getFreeze() {
return freeze;
}
public void setDensity(Double density) {
this.density = density;
}
public Double getDensity() {
return density;
}
public void setFat(Double fat) {
this.fat = fat;
}
public Double getFat() {
return fat;
}
public void setProtein(Double protein) {
this.protein = protein;
}
public Double getProtein() {
return protein;
}
public void setNonFat(Double nonFat) {
this.nonFat = nonFat;
}
public Double getNonFat() {
return nonFat;
}
public void setDryMatter(Double dryMatter) {
this.dryMatter = dryMatter;
}
public Double getDryMatter() {
return dryMatter;
}
public void setImpurityDegree(Double impurityDegree) {
this.impurityDegree = impurityDegree;
}
public Double getImpurityDegree() {
return impurityDegree;
}
public void setLactose(Double lactose) {
this.lactose = lactose;
}
public Double getLactose() {
return lactose;
}
public void setAshContent(Double ashContent) {
this.ashContent = ashContent;
}
public Double getAshContent() {
return ashContent;
}
public void setAcidity(Double acidity) {
this.acidity = acidity;
}
public Double getAcidity() {
return acidity;
}
public void setPh(Double ph) {
this.ph = ph;
}
public Double getPh() {
return ph;
}
public void setBacterialColony(Double bacterialColony) {
this.bacterialColony = bacterialColony;
}
public Double getBacterialColony() {
return bacterialColony;
}
public void setLactoferrin(Double lactoferrin) {
this.lactoferrin = lactoferrin;
}
public Double getLactoferrin() {
return lactoferrin;
}
public void setIg(Double ig) {
this.ig = ig;
}
public Double getIg() {
return ig;
}
public void setSomaticCell(Double somaticCell) {
this.somaticCell = somaticCell;
}
public Double getSomaticCell() {
return somaticCell;
}
public void setUsea(Double usea) {
this.usea = usea;
}
public Double getUsea() {
return usea;
}
public void setFatRatio(Double fatRatio) {
this.fatRatio = fatRatio;
}
public Double getFatRatio() {
return fatRatio;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getComment() {
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("datetime", getDatetime())
.append("source", getSource())
.append("freeze", getFreeze())
.append("density", getDensity())
.append("fat", getFat())
.append("protein", getProtein())
.append("nonFat", getNonFat())
.append("dryMatter", getDryMatter())
.append("impurityDegree", getImpurityDegree())
.append("lactose", getLactose())
.append("ashContent", getAshContent())
.append("acidity", getAcidity())
.append("ph", getPh())
.append("bacterialColony", getBacterialColony())
.append("lactoferrin", getLactoferrin())
.append("ig", getIg())
.append("somaticCell", getSomaticCell())
.append("usea", getUsea())
.append("fatRatio", getFatRatio())
.append("comment", getComment())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.dairyProducts.rawMilkTest.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe;
/**
* 生乳检验记录Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface NpRawMilkInspeMapper
{
/**
* 查询生乳检验记录
*
* @param id 生乳检验记录主键
* @return 生乳检验记录
*/
public NpRawMilkInspe selectNpRawMilkInspeById(Long id);
/**
* 查询生乳检验记录列表
*
* @param npRawMilkInspe 生乳检验记录
* @return 生乳检验记录集合
*/
public List<NpRawMilkInspe> selectNpRawMilkInspeList(NpRawMilkInspe npRawMilkInspe);
/**
* 新增生乳检验记录
*
* @param npRawMilkInspe 生乳检验记录
* @return 结果
*/
public int insertNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe);
/**
* 修改生乳检验记录
*
* @param npRawMilkInspe 生乳检验记录
* @return 结果
*/
public int updateNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe);
/**
* 删除生乳检验记录
*
* @param id 生乳检验记录主键
* @return 结果
*/
public int deleteNpRawMilkInspeById(Long id);
/**
* 批量删除生乳检验记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteNpRawMilkInspeByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.dairyProducts.rawMilkTest.service;
import java.util.List;
import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe;
/**
* 生乳检验记录Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface INpRawMilkInspeService
{
/**
* 查询生乳检验记录
*
* @param id 生乳检验记录主键
* @return 生乳检验记录
*/
public NpRawMilkInspe selectNpRawMilkInspeById(Long id);
/**
* 查询生乳检验记录列表
*
* @param npRawMilkInspe 生乳检验记录
* @return 生乳检验记录集合
*/
public List<NpRawMilkInspe> selectNpRawMilkInspeList(NpRawMilkInspe npRawMilkInspe);
/**
* 新增生乳检验记录
*
* @param npRawMilkInspe 生乳检验记录
* @return 结果
*/
public int insertNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe);
/**
* 修改生乳检验记录
*
* @param npRawMilkInspe 生乳检验记录
* @return 结果
*/
public int updateNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe);
/**
* 批量删除生乳检验记录
*
* @param ids 需要删除的生乳检验记录主键集合
* @return 结果
*/
public int deleteNpRawMilkInspeByIds(Long[] ids);
/**
* 删除生乳检验记录信息
*
* @param id 生乳检验记录主键
* @return 结果
*/
public int deleteNpRawMilkInspeById(Long id);
}

View File

@ -0,0 +1,95 @@
package com.zhyc.module.dairyProducts.rawMilkTest.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.dairyProducts.rawMilkTest.mapper.NpRawMilkInspeMapper;
import com.zhyc.module.dairyProducts.rawMilkTest.domain.NpRawMilkInspe;
import com.zhyc.module.dairyProducts.rawMilkTest.service.INpRawMilkInspeService;
/**
* 生乳检验记录Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class NpRawMilkInspeServiceImpl implements INpRawMilkInspeService
{
@Autowired
private NpRawMilkInspeMapper npRawMilkInspeMapper;
/**
* 查询生乳检验记录
*
* @param id 生乳检验记录主键
* @return 生乳检验记录
*/
@Override
public NpRawMilkInspe selectNpRawMilkInspeById(Long id)
{
return npRawMilkInspeMapper.selectNpRawMilkInspeById(id);
}
/**
* 查询生乳检验记录列表
*
* @param npRawMilkInspe 生乳检验记录
* @return 生乳检验记录
*/
@Override
public List<NpRawMilkInspe> selectNpRawMilkInspeList(NpRawMilkInspe npRawMilkInspe)
{
return npRawMilkInspeMapper.selectNpRawMilkInspeList(npRawMilkInspe);
}
/**
* 新增生乳检验记录
*
* @param npRawMilkInspe 生乳检验记录
* @return 结果
*/
@Override
public int insertNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe)
{
npRawMilkInspe.setCreateTime(DateUtils.getNowDate());
return npRawMilkInspeMapper.insertNpRawMilkInspe(npRawMilkInspe);
}
/**
* 修改生乳检验记录
*
* @param npRawMilkInspe 生乳检验记录
* @return 结果
*/
@Override
public int updateNpRawMilkInspe(NpRawMilkInspe npRawMilkInspe)
{
return npRawMilkInspeMapper.updateNpRawMilkInspe(npRawMilkInspe);
}
/**
* 批量删除生乳检验记录
*
* @param ids 需要删除的生乳检验记录主键
* @return 结果
*/
@Override
public int deleteNpRawMilkInspeByIds(Long[] ids)
{
return npRawMilkInspeMapper.deleteNpRawMilkInspeByIds(ids);
}
/**
* 删除生乳检验记录信息
*
* @param id 生乳检验记录主键
* @return 结果
*/
@Override
public int deleteNpRawMilkInspeById(Long id)
{
return npRawMilkInspeMapper.deleteNpRawMilkInspeById(id);
}
}

View File

@ -59,4 +59,5 @@ public interface SheepFileMapper
* @return 结果
*/
public int deleteSheepFileByIds(Long[] ids);
}

View File

@ -3,9 +3,12 @@ package com.zhyc.module.produce.manage_sheep.add_sheep.controller;
import com.zhyc.common.annotation.Log;
import com.zhyc.common.core.domain.AjaxResult;
import com.zhyc.common.enums.BusinessType;
import com.zhyc.common.exception.ServiceException;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep;
import com.zhyc.module.produce.manage_sheep.add_sheep.service.IScAddSheepService;
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
@ -27,14 +30,16 @@ import static com.zhyc.common.utils.SecurityUtils.getUsername;
public class ScAddSheepController {
@Autowired
private IScAddSheepService scAddSheepService;
@Autowired
private IDaSheepfoldService daSheepfoldMapper;
//新增羊只验证
@PreAuthorize("@ss.hasPermi('produce:add_sheep:add')")
@Log(title = "新增", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult addSheep(@RequestBody ScAddSheep scAddSheep) {
if (scAddSheep.getSheepId() == null || scAddSheep.getSheepId().isEmpty()) {
return AjaxResult.error("羊只id不能为空");
if (scAddSheep.getEarNumber() == null || scAddSheep.getEarNumber().isEmpty()) {
return AjaxResult.error("耳号不能为空");
}
if (scAddSheep.getSheepfold() == null || scAddSheep.getSheepfold() == 0) {
return AjaxResult.error("羊舍不能为空");
@ -52,20 +57,33 @@ public class ScAddSheepController {
return AjaxResult.error("品种不能为空");
}
boolean success = scAddSheepService.insertScAddSheep(scAddSheep);
if (success) {
return success("新增成功");
} else {
return AjaxResult.error("新增失败");
try {
boolean success = scAddSheepService.insertScAddSheep(scAddSheep);
if (success) {
return success("新增成功");
} else {
return AjaxResult.error("新增失败");
}
} catch (ServiceException e) {
return AjaxResult.error(e.getMessage());
}
}
//导出表单
@PostMapping("/exportForm")
@Log(title = "羊只信息", businessType = BusinessType.EXPORT)
public void exportForm(HttpServletResponse response, @RequestBody ScAddSheep scAddSheep) throws IOException {
ExcelUtil<ScAddSheep> util = new ExcelUtil<>(ScAddSheep.class);
List<ScAddSheep> list = new ArrayList<>();
// 设置羊舍名称从数据库查
if (scAddSheep.getSheepfold() != null) {
DaSheepfold fold = daSheepfoldMapper.selectDaSheepfoldById(scAddSheep.getSheepfold().longValue());
if (fold != null) {
scAddSheep.setSheepfoldNameExcel(fold.getSheepfoldName());
}
}
list.add(scAddSheep);
util.exportExcel(response, list, "羊只信息");
}

View File

@ -2,10 +2,16 @@ package com.zhyc.module.produce.manage_sheep.add_sheep.domain;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScAddSheep extends BaseEntity {
/**
* 羊只
@ -15,15 +21,21 @@ public class ScAddSheep extends BaseEntity {
*/
private static final long serialVersionUID = 1L;
@Excel(name = "主键")
private Long id; // 如果数据库主键叫 id就加这一行
/** 羊只ID */
@Excel(name = "羊只ID")
private String sheepId;
private Integer id; // 如果数据库主键叫 id就加这一行
/** 羊只耳号 */
@Excel(name = "耳号")
private String earNumber;
/** 羊舍编号 */
@Excel(name = "羊舍")
private Integer sheepfold;
// @Excel(name = "羊舍名称")
private String sheepfoldName;
// 导出时生成羊舍名称 Excel 不映射到数据库
@Excel(name = "羊舍名称")
private String sheepfoldNameExcel;
/** 父号 */
@Excel(name = "父号")
private String father;
@ -68,125 +80,6 @@ public class ScAddSheep extends BaseEntity {
private String createBy;
private Date createTime;
// Getters and Setters
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSheepId() {
return sheepId;
}
public void setSheepId(String sheepId) {
this.sheepId = sheepId;
}
public Integer getSheepfold() {
return sheepfold;
}
public void setSheepfold(Integer sheepfold) {
this.sheepfold = sheepfold;
}
public String getFather() {
return father;
}
public void setFather(String father) {
this.father = father;
}
public String getMother() {
return mother;
}
public void setMother(String mother) {
this.mother = mother;
}
public BigDecimal getBornWeight() {
return bornWeight;
}
public void setBornWeight(BigDecimal bornWeight) {
this.bornWeight = bornWeight;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public Integer getGender() {
return gender;
}
public void setGender(Integer gender) {
this.gender = gender;
}
public Integer getParity() {
return parity;
}
public void setParity(Integer parity) {
this.parity = parity;
}
public Integer getVarietyId() {
return varietyId;
}
public void setVarietyId(Integer varietyId) {
this.varietyId = varietyId;
}
public Date getJoinDate() {
return joinDate;
}
public void setJoinDate(Date joinDate) {
this.joinDate = joinDate;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getTechnician() {
return technician;
}
public void setTechnician(String technician) {
this.technician = technician;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -10,6 +10,8 @@ public interface ScAddSheepMapper {
int insert(ScAddSheep scAddSheep);
List<ScAddSheep> selectScAddSheepList(ScAddSheep scAddSheep);
int updateScAddSheep(ScAddSheep scAddSheep);
int deleteScAddSheepByIds(Long[] ids);
int deleteScAddSheepByIds(Integer[] ids);
ScAddSheep selectByEarNumber(String earNumber);
}

View File

@ -7,11 +7,14 @@ import java.util.List;
public interface IScAddSheepService {
boolean insertScAddSheep(ScAddSheep scAddSheep);
List<ScAddSheep> selectScAddSheepList(ScAddSheep scAddSheep);
boolean updateScAddSheep(ScAddSheep scAddSheep);
boolean deleteScAddSheepByIds(Long[] ids);
boolean deleteScAddSheepByIds(Integer[] ids);
String importSheep(List<ScAddSheep> list, boolean updateSupport, String operName);
}

View File

@ -5,22 +5,63 @@ import com.zhyc.common.utils.StringUtils;
import com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep;
import com.zhyc.module.produce.manage_sheep.add_sheep.mapper.ScAddSheepMapper;
import com.zhyc.module.produce.manage_sheep.add_sheep.service.IScAddSheepService;
import com.zhyc.module.produce.sheep.domain.BasSheep;
import com.zhyc.module.produce.sheep.mapper.BasSheepMapper;
import com.zhyc.module.produce.sheep.service.IBasSheepService;
import com.zhyc.module.produce.sheep.service.impl.BasSheepServiceImpl;
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
import com.zhyc.module.sheepfold_management.mapper.DaSheepfoldMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class ScAddSheepServiceImpl implements IScAddSheepService {
@Autowired
private ScAddSheepMapper scAddSheepMapper;
@Autowired
private DaSheepfoldMapper daSheepfoldMapper;
@Autowired
private IBasSheepService basSheepService;
@Override
public boolean insertScAddSheep(ScAddSheep scAddSheep) {
return scAddSheepMapper.insert(scAddSheep) > 0;
// 1. 重复校验
ScAddSheep exist = scAddSheepMapper.selectByEarNumber(scAddSheep.getEarNumber());
if (exist != null) {
throw new ServiceException("添加失败,耳号重复");
}
// 2. 写入 sc_add_sheep
boolean ok = scAddSheepMapper.insert(scAddSheep) > 0;
if (!ok) return false;
// 3. 字段映射 BasSheep
BasSheep bs = new BasSheep();
bs.setManageTags(scAddSheep.getEarNumber()); // 管理耳号
bs.setElectronicTags(scAddSheep.getEarNumber()); // 电子耳号
bs.setSheepfoldId(scAddSheep.getSheepfold().longValue()); // 羊舍
bs.setFatherId(null); // 父号/母号可后续补全
bs.setMotherId(null);
bs.setBirthWeight(scAddSheep.getBornWeight().longValue());
bs.setBirthday(scAddSheep.getBirthday());
bs.setGender(scAddSheep.getGender().longValue());
bs.setParity(scAddSheep.getParity().longValue());
bs.setVarietyId(scAddSheep.getVarietyId().longValue());
bs.setSourceDate(scAddSheep.getJoinDate());
bs.setComment(scAddSheep.getComment());
bs.setCreateBy(scAddSheep.getCreateBy());
bs.setCreateTime(new Date());
// 4. 写入 bas_sheep
basSheepService.insertBasSheep(bs);
return true;
}
@Override
public List<ScAddSheep> selectScAddSheepList(ScAddSheep scAddSheep) {
return scAddSheepMapper.selectScAddSheepList(scAddSheep);
@ -32,22 +73,63 @@ public class ScAddSheepServiceImpl implements IScAddSheepService {
}
@Override
public boolean deleteScAddSheepByIds(Long[] ids) {
public boolean deleteScAddSheepByIds(Integer[] ids) {
return scAddSheepMapper.deleteScAddSheepByIds(ids) > 0;
}
/* ------------------ 导入:羊舍名称 → ID ------------------ */
@Override
public String importSheep(List<ScAddSheep> list, boolean updateSupport, String operName) {
if (list == null || list.isEmpty()) {
throw new ServiceException("导入数据不能为空!");
}
int success = 0, failure = 0;
StringBuilder failureMsg = new StringBuilder();
for (ScAddSheep sheep : list) {
for (int i = 0; i < list.size(); i++) {
ScAddSheep sheep = list.get(i);
try {
if (StringUtils.isBlank(sheep.getSheepId())) {
failure++; failureMsg.append("<br/>第").append(success + failure + 1).append("羊只ID不能为空"); continue;
/* 1. 羊舍名称 → ID */
if (StringUtils.isNotBlank(sheep.getSheepfoldNameExcel())) {
DaSheepfold param = new DaSheepfold();
param.setSheepfoldName(sheep.getSheepfoldNameExcel());
List<DaSheepfold> foldList = daSheepfoldMapper.selectDaSheepfoldList(param);
if (foldList == null || foldList.isEmpty()) {
failure++;
failureMsg.append("<br/>第")
.append(i + 1)
.append("行:羊舍名称不存在【")
.append(sheep.getSheepfoldNameExcel())
.append("");
continue;
}
sheep.setSheepfold(foldList.get(0).getId().intValue());
}
/* 2. 耳号非空校验 */
if (StringUtils.isBlank(sheep.getEarNumber())) {
failure++;
failureMsg.append("<br/>第")
.append(i + 1)
.append("行:耳号不能为空");
continue;
}
/* 3. 耳号重复校验(增量导入核心) */
ScAddSheep exist = scAddSheepMapper.selectByEarNumber(sheep.getEarNumber());
if (exist != null) {
failure++;
failureMsg.append("<br/>第")
.append(i + 1)
.append("行:耳号已存在【")
.append(sheep.getEarNumber())
.append("");
continue;
}
/* 4. 插入或更新 */
if (updateSupport && sheep.getId() != null) {
sheep.setUpdateBy(operName);
updateScAddSheep(sheep);
@ -57,11 +139,19 @@ public class ScAddSheepServiceImpl implements IScAddSheepService {
}
success++;
} catch (Exception e) {
failure++; failureMsg.append("<br/>第").append(success + failure + 1).append("行:").append(e.getMessage());
failure++;
failureMsg.append("<br/>第")
.append(i + 1)
.append("行:")
.append(e.getMessage());
}
}
if (failure > 0) throw new ServiceException("导入失败!共 " + failure + " 条:" + failureMsg);
if (failure > 0) {
throw new ServiceException("导入失败!共 " + failure + " 条:" + failureMsg);
}
return "导入成功!共 " + success + "";
}
}
}

View File

@ -1,5 +1,6 @@
package com.zhyc.module.produce.manage_sheep.trans_group.controller;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@ -53,10 +54,9 @@ public class ScTransGroupController extends BaseController
@PreAuthorize("@ss.hasPermi('produce:trans_group:export')")
@Log(title = "转群记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ScTransGroup scTransGroup)
{
public void export(HttpServletResponse response, ScTransGroup scTransGroup) throws IOException {
List<ScTransGroup> list = scTransGroupService.selectScTransGroupList(scTransGroup);
ExcelUtil<ScTransGroup> util = new ExcelUtil<ScTransGroup>(ScTransGroup.class);
ExcelUtil<ScTransGroup> util = new ExcelUtil<>(ScTransGroup.class);
util.exportExcel(response, list, "转群记录数据");
}

View File

@ -1,9 +1,13 @@
package com.zhyc.module.produce.manage_sheep.trans_group.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
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;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 转群记录对象 sc_trans_group
@ -11,6 +15,9 @@ import com.zhyc.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-07-10
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScTransGroup extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -23,122 +30,40 @@ public class ScTransGroup extends BaseEntity
private Integer sheepId;
/** 转入羊舍 */
@Excel(name = "转入羊舍")
private String foldTo;
/** 转出羊舍 */
@Excel(name = "转出羊舍")
private String foldFrom;
/** 转出羊舍名称 */
@Excel(name = "转出羊舍")
private String foldFromName;
/** 转入羊舍名称 */
@Excel(name = "转入羊舍")
private String foldToName;
/** 转群原因 */
private Integer reason;
/** 转群原因描述 用于导出*/
@Excel(name = "转群原因")
private String reason;
private String reasonText;
/** 技术员 */
@Excel(name = "技术员")
private String technician;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 状态描述 用于导出*/
@Excel(name = "状态")
private String statusText;
/** 备注 */
@Excel(name = "备注")
private String comment;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setSheepId(Integer sheepId)
{
this.sheepId = sheepId;
}
public Integer getSheepId()
{
return sheepId;
}
public void setFoldTo(String foldTo)
{
this.foldTo = foldTo;
}
public String getFoldTo()
{
return foldTo;
}
public void setFoldFrom(String foldFrom)
{
this.foldFrom = foldFrom;
}
public String getFoldFrom()
{
return foldFrom;
}
public void setReason(String reason)
{
this.reason = reason;
}
public String getReason()
{
return reason;
}
public void setTechnician(String technician)
{
this.technician = technician;
}
public String getTechnician()
{
return technician;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("sheepId", getSheepId())
.append("foldTo", getFoldTo())
.append("foldFrom", getFoldFrom())
.append("reason", getReason())
.append("technician", getTechnician())
.append("status", getStatus())
.append("comment", getComment())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -1,6 +1,9 @@
package com.zhyc.module.produce.manage_sheep.trans_group.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.module.produce.manage_sheep.trans_group.domain.ScTransGroup;
import com.zhyc.module.produce.manage_sheep.trans_group.mapper.ScTransGroupMapper;
@ -15,8 +18,7 @@ import org.springframework.stereotype.Service;
* @date 2025-07-10
*/
@Service
public class ScTransGroupServiceImpl implements IScTransGroupService
{
public class ScTransGroupServiceImpl implements IScTransGroupService {
@Autowired
private ScTransGroupMapper scTransGroupMapper;
@ -27,11 +29,14 @@ public class ScTransGroupServiceImpl implements IScTransGroupService
* @return 转群记录
*/
@Override
public ScTransGroup selectScTransGroupById(Integer id)
{
return scTransGroupMapper.selectScTransGroupById(id);
public ScTransGroup selectScTransGroupById(Integer id) {
ScTransGroup group = scTransGroupMapper.selectScTransGroupById(id);
group.setReasonText(convertReason(group.getReason()));
group.setStatusText(convertStatus(group.getStatus()));
return group;
}
/**
* 查询转群记录列表
*
@ -39,9 +44,15 @@ public class ScTransGroupServiceImpl implements IScTransGroupService
* @return 转群记录
*/
@Override
public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup)
{
return scTransGroupMapper.selectScTransGroupList(scTransGroup);
public List<ScTransGroup> selectScTransGroupList(ScTransGroup scTransGroup) {
List<ScTransGroup> list = scTransGroupMapper.selectScTransGroupList(scTransGroup);
list.forEach(group -> {
group.setReasonText(convertReason(group.getReason()));
group.setStatusText(convertStatus(group.getStatus()));
});
return list;
// return scTransGroupMapper.selectScTransGroupList(scTransGroup);
}
/**
@ -50,9 +61,9 @@ public class ScTransGroupServiceImpl implements IScTransGroupService
* @param scTransGroup 转群记录
* @return 结果
*/
@Override
public int insertScTransGroup(ScTransGroup scTransGroup)
{
public int insertScTransGroup(ScTransGroup scTransGroup) {
scTransGroup.setStatus(0);
scTransGroup.setCreateTime(DateUtils.getNowDate());
return scTransGroupMapper.insertScTransGroup(scTransGroup);
@ -65,8 +76,7 @@ public class ScTransGroupServiceImpl implements IScTransGroupService
* @return 结果
*/
@Override
public int updateScTransGroup(ScTransGroup scTransGroup)
{
public int updateScTransGroup(ScTransGroup scTransGroup) {
return scTransGroupMapper.updateScTransGroup(scTransGroup);
}
@ -77,8 +87,7 @@ public class ScTransGroupServiceImpl implements IScTransGroupService
* @return 结果
*/
@Override
public int deleteScTransGroupByIds(Integer[] ids)
{
public int deleteScTransGroupByIds(Integer[] ids) {
return scTransGroupMapper.deleteScTransGroupByIds(ids);
}
@ -89,8 +98,30 @@ public class ScTransGroupServiceImpl implements IScTransGroupService
* @return 结果
*/
@Override
public int deleteScTransGroupById(Integer id)
{
public int deleteScTransGroupById(Integer id) {
return scTransGroupMapper.deleteScTransGroupById(id);
}
/**
* 转换转群原因
*/
private String convertReason(Integer reasonCode) {
Map<Integer, String> reasonMap = new HashMap<>();
reasonMap.put(0, "新产羊过抗转群");
reasonMap.put(1, "治愈转群");
reasonMap.put(2, "病羊过抗转群");
return reasonMap.getOrDefault(reasonCode, "未知原因");
}
/**
* 转换状态
*/
private String convertStatus(Integer statusCode) {
Map<Integer, String> statusMap = new HashMap<>();
statusMap.put(0, "待批准");
statusMap.put(1, "通过");
statusMap.put(2, "驳回");
return statusMap.getOrDefault(statusCode, "未知状态");
}
}

View File

@ -1,5 +1,8 @@
package com.zhyc.module.produce.manage_sheep.transition_info.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
@ -11,6 +14,9 @@ import com.zhyc.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-07-10
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScTransitionInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -32,7 +38,7 @@ public class ScTransitionInfo extends BaseEntity
/** 转场类型 */
@Excel(name = "转场类型")
private Long transType;
private Integer transType;
/** 技术员 */
@Excel(name = "技术员")
@ -46,99 +52,5 @@ public class ScTransitionInfo extends BaseEntity
@Excel(name = "备注")
private String comment;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setSheepId(Integer sheepId)
{
this.sheepId = sheepId;
}
public Integer getSheepId()
{
return sheepId;
}
public void setTransTo(String transTo)
{
this.transTo = transTo;
}
public String getTransTo()
{
return transTo;
}
public void setTransFrom(String transFrom)
{
this.transFrom = transFrom;
}
public String getTransFrom()
{
return transFrom;
}
public void setTransType(Long transType)
{
this.transType = transType;
}
public Long getTransType()
{
return transType;
}
public void setTechnician(String technician)
{
this.technician = technician;
}
public String getTechnician()
{
return technician;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("sheepId", getSheepId())
.append("transTo", getTransTo())
.append("transFrom", getTransFrom())
.append("transType", getTransType())
.append("technician", getTechnician())
.append("status", getStatus())
.append("comment", getComment())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -66,7 +66,7 @@ public class ScFixHoofController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('produce:fixHoof:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
public AjaxResult getInfo(@PathVariable("id") Integer id)
{
return success(scFixHoofService.selectScFixHoofById(id));
}
@ -99,7 +99,7 @@ public class ScFixHoofController extends BaseController
@PreAuthorize("@ss.hasPermi('produce:fixHoof:remove')")
@Log(title = "修蹄", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
public AjaxResult remove(@PathVariable Integer[] ids)
{
return toAjax(scFixHoofService.deleteScFixHoofByIds(ids));
}

View File

@ -1,5 +1,8 @@
package com.zhyc.module.produce.other.fixHoof.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
@ -11,20 +14,26 @@ import com.zhyc.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-07-10
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ScFixHoof extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
private Integer id;
/** 羊只id */
@Excel(name = "羊只id")
private Long sheepId;
private Integer sheepId;
/** 羊舍id */
@Excel(name = "羊舍id")
private Long sheepfold;
private Integer sheepfold;
/** 羊舍名称 */
@Excel(name = "羊舍名称")
private String sheepfoldName;
/** 备注 */
@Excel(name = "备注")
@ -34,66 +43,4 @@ public class ScFixHoof extends BaseEntity
@Excel(name = "技术员")
private String technician;
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 setSheepfold(Long sheepfold)
{
this.sheepfold = sheepfold;
}
public Long getSheepfold()
{
return sheepfold;
}
public void setComment(String comment)
{
this.comment = comment;
}
public String getComment()
{
return comment;
}
public void setTechnician(String technician)
{
this.technician = technician;
}
public String getTechnician()
{
return technician;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("sheepId", getSheepId())
.append("sheepfold", getSheepfold())
.append("comment", getComment())
.append("technician", getTechnician())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -17,7 +17,7 @@ public interface ScFixHoofMapper
* @param id 修蹄主键
* @return 修蹄
*/
public ScFixHoof selectScFixHoofById(Long id);
public ScFixHoof selectScFixHoofById(Integer id);
/**
* 查询修蹄列表
@ -49,7 +49,7 @@ public interface ScFixHoofMapper
* @param id 修蹄主键
* @return 结果
*/
public int deleteScFixHoofById(Long id);
public int deleteScFixHoofById(Integer id);
/**
* 批量删除修蹄
@ -57,5 +57,5 @@ public interface ScFixHoofMapper
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteScFixHoofByIds(Long[] ids);
public int deleteScFixHoofByIds(Integer[] ids);
}

View File

@ -17,7 +17,7 @@ public interface IScFixHoofService
* @param id 修蹄主键
* @return 修蹄
*/
public ScFixHoof selectScFixHoofById(Long id);
public ScFixHoof selectScFixHoofById(Integer id);
/**
* 查询修蹄列表
@ -49,7 +49,7 @@ public interface IScFixHoofService
* @param ids 需要删除的修蹄主键集合
* @return 结果
*/
public int deleteScFixHoofByIds(Long[] ids);
public int deleteScFixHoofByIds(Integer[] ids);
/**
* 删除修蹄信息
@ -57,5 +57,5 @@ public interface IScFixHoofService
* @param id 修蹄主键
* @return 结果
*/
public int deleteScFixHoofById(Long id);
public int deleteScFixHoofById(Integer id);
}

View File

@ -27,7 +27,7 @@ public class ScFixHoofServiceImpl implements IScFixHoofService
* @return 修蹄
*/
@Override
public ScFixHoof selectScFixHoofById(Long id)
public ScFixHoof selectScFixHoofById(Integer id)
{
return scFixHoofMapper.selectScFixHoofById(id);
}
@ -76,7 +76,7 @@ public class ScFixHoofServiceImpl implements IScFixHoofService
* @return 结果
*/
@Override
public int deleteScFixHoofByIds(Long[] ids)
public int deleteScFixHoofByIds(Integer[] ids)
{
return scFixHoofMapper.deleteScFixHoofByIds(ids);
}
@ -88,7 +88,7 @@ public class ScFixHoofServiceImpl implements IScFixHoofService
* @return 结果
*/
@Override
public int deleteScFixHoofById(Long id)
public int deleteScFixHoofById(Integer id)
{
return scFixHoofMapper.deleteScFixHoofById(id);
}

View File

@ -0,0 +1,105 @@
package com.zhyc.module.produce.sheep.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.produce.sheep.domain.BasSheep;
import com.zhyc.module.produce.sheep.service.IBasSheepService;
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.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 羊只基本信息Controller
*
* @author ruoyi
* @date 2025-07-15
*/
@RestController
@RequestMapping("/sheep/sheep")
public class BasSheepController extends BaseController
{
@Autowired
private IBasSheepService basSheepService;
/**
* 查询羊只基本信息列表
*/
@PreAuthorize("@ss.hasPermi('sheep:sheep:list')")
@GetMapping("/list")
public TableDataInfo list(BasSheep basSheep)
{
startPage();
List<BasSheep> list = basSheepService.selectBasSheepList(basSheep);
return getDataTable(list);
}
/**
* 导出羊只基本信息列表
*/
@PreAuthorize("@ss.hasPermi('sheep:sheep:export')")
@Log(title = "羊只基本信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasSheep basSheep)
{
List<BasSheep> list = basSheepService.selectBasSheepList(basSheep);
ExcelUtil<BasSheep> util = new ExcelUtil<BasSheep>(BasSheep.class);
util.exportExcel(response, list, "羊只基本信息数据");
}
/**
* 获取羊只基本信息详细信息
*/
@PreAuthorize("@ss.hasPermi('sheep:sheep:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(basSheepService.selectBasSheepById(id));
}
/**
* 新增羊只基本信息
*/
@PreAuthorize("@ss.hasPermi('sheep:sheep:add')")
@Log(title = "羊只基本信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasSheep basSheep)
{
return toAjax(basSheepService.insertBasSheep(basSheep));
}
/**
* 修改羊只基本信息
*/
@PreAuthorize("@ss.hasPermi('sheep:sheep:edit')")
@Log(title = "羊只基本信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasSheep basSheep)
{
return toAjax(basSheepService.updateBasSheep(basSheep));
}
/**
* 删除羊只基本信息
*/
@PreAuthorize("@ss.hasPermi('sheep:sheep:remove')")
@Log(title = "羊只基本信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(basSheepService.deleteBasSheepByIds(ids));
}
}

View File

@ -0,0 +1,178 @@
package com.zhyc.module.produce.sheep.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
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;
/**
* 羊只基本信息对象 bas_sheep
*
* @author ruoyi
* @date 2025-07-15
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasSheep extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 管理耳号 */
@Excel(name = "管理耳号")
private String manageTags;
/** 牧场id */
@Excel(name = "牧场id")
private Long ranchId;
/** 羊舍id */
@Excel(name = "羊舍id")
private Long sheepfoldId;
/** 电子耳号 */
@Excel(name = "电子耳号")
private String electronicTags;
/** 品种id */
@Excel(name = "品种id")
private Long varietyId;
/** 家系 */
@Excel(name = "家系")
private String family;
/** 羊只类别 */
@Excel(name = "羊只类别")
private Long typeId;
/** 性别 */
@Excel(name = "性别")
private Long gender;
/** 出生日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthday;
/** 出生体重 */
@Excel(name = "出生体重")
private Long birthWeight;
/** 胎次 */
@Excel(name = "胎次")
private Long parity;
/** 羊只状态 */
@Excel(name = "羊只状态")
private Long statusId;
/** 断奶日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "断奶日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date weaningDate;
/** 断奶体重 */
@Excel(name = "断奶体重")
private Long weaningWeight;
/** 繁育状态id */
@Excel(name = "繁育状态id")
private Long breedStatusId;
/** 父号id */
@Excel(name = "父号id")
private Long fatherId;
/** 母号id */
@Excel(name = "母号id")
private Long motherId;
/** 受体id */
@Excel(name = "受体id")
private Long receptorId;
/** 配种日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "配种日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date matingDate;
/** 配种类型 */
@Excel(name = "配种类型")
private Long matingTypeId;
/** 孕检日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "孕检日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date pregDate;
/** 产羔日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "产羔日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date lambingDate;
/** 产羔时怀孕天数 */
@Excel(name = "产羔时怀孕天数")
private Long lambingDay;
/** 预产日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "预产日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date expectedDate;
/** 是否性控 */
@Excel(name = "是否性控")
private Long controlled;
/** 配种次数 */
@Excel(name = "配种次数")
private Long matingCounts;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long matingTotal;
/** 累计流产次数 */
@Excel(name = "累计流产次数")
private Long miscarriageCounts;
/** 体况评分 */
@Excel(name = "体况评分")
private Long body;
/** 乳房评分 */
@Excel(name = "乳房评分")
private Long breast;
/** 入群来源 */
@Excel(name = "入群来源")
private String source;
/** 入群日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "入群日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date sourceDate;
/** 来源牧场id */
@Excel(name = "来源牧场id")
private Long sourceRanchId;
/** 备注 */
@Excel(name = "备注")
private String comment;
/** 是否删除 */
@Excel(name = "是否删除")
private Long isDelete;
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.produce.sheep.mapper;
import java.util.List;
import com.zhyc.module.produce.sheep.domain.BasSheep;
/**
* 羊只基本信息Mapper接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface BasSheepMapper
{
/**
* 查询羊只基本信息
*
* @param id 羊只基本信息主键
* @return 羊只基本信息
*/
public BasSheep selectBasSheepById(Long id);
/**
* 查询羊只基本信息列表
*
* @param basSheep 羊只基本信息
* @return 羊只基本信息集合
*/
public List<BasSheep> selectBasSheepList(BasSheep basSheep);
/**
* 新增羊只基本信息
*
* @param basSheep 羊只基本信息
* @return 结果
*/
public int insertBasSheep(BasSheep basSheep);
/**
* 修改羊只基本信息
*
* @param basSheep 羊只基本信息
* @return 结果
*/
public int updateBasSheep(BasSheep basSheep);
/**
* 删除羊只基本信息
*
* @param id 羊只基本信息主键
* @return 结果
*/
public int deleteBasSheepById(Long id);
/**
* 批量删除羊只基本信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasSheepByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.produce.sheep.service;
import java.util.List;
import com.zhyc.module.produce.sheep.domain.BasSheep;
/**
* 羊只基本信息Service接口
*
* @author ruoyi
* @date 2025-07-15
*/
public interface IBasSheepService
{
/**
* 查询羊只基本信息
*
* @param id 羊只基本信息主键
* @return 羊只基本信息
*/
public BasSheep selectBasSheepById(Long id);
/**
* 查询羊只基本信息列表
*
* @param basSheep 羊只基本信息
* @return 羊只基本信息集合
*/
public List<BasSheep> selectBasSheepList(BasSheep basSheep);
/**
* 新增羊只基本信息
*
* @param basSheep 羊只基本信息
* @return 结果
*/
public int insertBasSheep(BasSheep basSheep);
/**
* 修改羊只基本信息
*
* @param basSheep 羊只基本信息
* @return 结果
*/
public int updateBasSheep(BasSheep basSheep);
/**
* 批量删除羊只基本信息
*
* @param ids 需要删除的羊只基本信息主键集合
* @return 结果
*/
public int deleteBasSheepByIds(Long[] ids);
/**
* 删除羊只基本信息信息
*
* @param id 羊只基本信息主键
* @return 结果
*/
public int deleteBasSheepById(Long id);
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.produce.sheep.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.produce.sheep.mapper.BasSheepMapper;
import com.zhyc.module.produce.sheep.domain.BasSheep;
import com.zhyc.module.produce.sheep.service.IBasSheepService;
/**
* 羊只基本信息Service业务层处理
*
* @author ruoyi
* @date 2025-07-15
*/
@Service
public class BasSheepServiceImpl implements IBasSheepService
{
@Autowired
private BasSheepMapper basSheepMapper;
/**
* 查询羊只基本信息
*
* @param id 羊只基本信息主键
* @return 羊只基本信息
*/
@Override
public BasSheep selectBasSheepById(Long id)
{
return basSheepMapper.selectBasSheepById(id);
}
/**
* 查询羊只基本信息列表
*
* @param basSheep 羊只基本信息
* @return 羊只基本信息
*/
@Override
public List<BasSheep> selectBasSheepList(BasSheep basSheep)
{
return basSheepMapper.selectBasSheepList(basSheep);
}
/**
* 新增羊只基本信息
*
* @param basSheep 羊只基本信息
* @return 结果
*/
@Override
public int insertBasSheep(BasSheep basSheep)
{
basSheep.setCreateTime(DateUtils.getNowDate());
return basSheepMapper.insertBasSheep(basSheep);
}
/**
* 修改羊只基本信息
*
* @param basSheep 羊只基本信息
* @return 结果
*/
@Override
public int updateBasSheep(BasSheep basSheep)
{
basSheep.setUpdateTime(DateUtils.getNowDate());
return basSheepMapper.updateBasSheep(basSheep);
}
/**
* 批量删除羊只基本信息
*
* @param ids 需要删除的羊只基本信息主键
* @return 结果
*/
@Override
public int deleteBasSheepByIds(Long[] ids)
{
return basSheepMapper.deleteBasSheepByIds(ids);
}
/**
* 删除羊只基本信息信息
*
* @param id 羊只基本信息主键
* @return 结果
*/
@Override
public int deleteBasSheepById(Long id)
{
return basSheepMapper.deleteBasSheepById(id);
}
}

View File

@ -0,0 +1,110 @@
<?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.biosafety.mapper.DewormMapper">
<resultMap type="Deworm" id="DewormResult">
<result property="id" column="id" />
<result property="sheepId" column="sheep_id" />
<result property="usageId" column="usage_id" />
<result property="variety" column="variety" />
<result property="sheepType" column="sheep_type" />
<result property="gender" column="gender" />
<result property="monthAge" column="month_age" />
<result property="parity" column="parity" />
<result property="datetime" column="datetime" />
<result property="technical" column="technical" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDewormVo">
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_deworm
</sql>
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
<include refid="selectDewormVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
</where>
</select>
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">
<include refid="selectDewormVo"/>
where id = #{id}
</select>
<insert id="insertDeworm" parameterType="Deworm" useGeneratedKeys="true" keyProperty="id">
insert into sw_deworm
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sheepId != null">sheep_id,</if>
<if test="usageId != null">usage_id,</if>
<if test="variety != null">variety,</if>
<if test="sheepType != null">sheep_type,</if>
<if test="gender != null">gender,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="datetime != null">datetime,</if>
<if test="technical != null">technical,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepId != null">#{sheepId},</if>
<if test="usageId != null">#{usageId},</if>
<if test="variety != null">#{variety},</if>
<if test="sheepType != null">#{sheepType},</if>
<if test="gender != null">#{gender},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="datetime != null">#{datetime},</if>
<if test="technical != null">#{technical},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDeworm" parameterType="Deworm">
update sw_deworm
<trim prefix="SET" suffixOverrides=",">
<if test="sheepId != null">sheep_id = #{sheepId},</if>
<if test="usageId != null">usage_id = #{usageId},</if>
<if test="variety != null">variety = #{variety},</if>
<if test="sheepType != null">sheep_type = #{sheepType},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="datetime != null">datetime = #{datetime},</if>
<if test="technical != null">technical = #{technical},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDewormById" parameterType="Long">
delete from sw_deworm where id = #{id}
</delete>
<delete id="deleteDewormByIds" parameterType="String">
delete from sw_deworm where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,118 @@
<?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.biosafety.mapper.DiagnosisMapper">
<resultMap type="Diagnosis" id="DiagnosisResult">
<result property="id" column="id" />
<result property="treatId" column="treat_id" />
<result property="sheepId" column="sheep_id" />
<result property="datetime" column="datetime" />
<result property="sheepType" column="sheep_type" />
<result property="gender" column="gender" />
<result property="parity" column="parity" />
<result property="diseasePid" column="disease_pid" />
<result property="diseaseId" column="disease_id" />
<result property="result" column="result" />
<result property="begindate" column="begindate" />
<result property="enddate" column="enddate" />
<result property="treatDay" column="treat_day" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDiagnosisVo">
select id, treat_id, sheep_id, datetime, sheep_type, gender, parity, disease_pid, disease_id, result, begindate, enddate, treat_day, sheepfold_id, create_by, create_time from sw_diagnosis
</sql>
<select id="selectDiagnosisList" parameterType="Diagnosis" resultMap="DiagnosisResult">
<include refid="selectDiagnosisVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
<if test="diseasePid != null "> and disease_pid = #{diseasePid}</if>
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
<if test="result != null "> and result = #{result}</if>
<if test="treatDay != null "> and treat_day = #{treatDay}</if>
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
</where>
</select>
<select id="selectDiagnosisById" parameterType="Long" resultMap="DiagnosisResult">
<include refid="selectDiagnosisVo"/>
where id = #{id}
</select>
<insert id="insertDiagnosis" parameterType="Diagnosis" useGeneratedKeys="true" keyProperty="id">
insert into sw_diagnosis
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="treatId != null">treat_id,</if>
<if test="sheepId != null">sheep_id,</if>
<if test="datetime != null">datetime,</if>
<if test="sheepType != null">sheep_type,</if>
<if test="gender != null">gender,</if>
<if test="parity != null">parity,</if>
<if test="diseasePid != null">disease_pid,</if>
<if test="diseaseId != null">disease_id,</if>
<if test="result != null">result,</if>
<if test="begindate != null">begindate,</if>
<if test="enddate != null">enddate,</if>
<if test="treatDay != null">treat_day,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="treatId != null">#{treatId},</if>
<if test="sheepId != null">#{sheepId},</if>
<if test="datetime != null">#{datetime},</if>
<if test="sheepType != null">#{sheepType},</if>
<if test="gender != null">#{gender},</if>
<if test="parity != null">#{parity},</if>
<if test="diseasePid != null">#{diseasePid},</if>
<if test="diseaseId != null">#{diseaseId},</if>
<if test="result != null">#{result},</if>
<if test="begindate != null">#{begindate},</if>
<if test="enddate != null">#{enddate},</if>
<if test="treatDay != null">#{treatDay},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDiagnosis" parameterType="Diagnosis">
update sw_diagnosis
<trim prefix="SET" suffixOverrides=",">
<if test="treatId != null">treat_id = #{treatId},</if>
<if test="sheepId != null">sheep_id = #{sheepId},</if>
<if test="datetime != null">datetime = #{datetime},</if>
<if test="sheepType != null">sheep_type = #{sheepType},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="diseasePid != null">disease_pid = #{diseasePid},</if>
<if test="diseaseId != null">disease_id = #{diseaseId},</if>
<if test="result != null">result = #{result},</if>
<if test="begindate != null">begindate = #{begindate},</if>
<if test="enddate != null">enddate = #{enddate},</if>
<if test="treatDay != null">treat_day = #{treatDay},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDiagnosisById" parameterType="Long">
delete from sw_diagnosis where id = #{id}
</delete>
<delete id="deleteDiagnosisByIds" parameterType="String">
delete from sw_diagnosis where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,102 @@
<?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.biosafety.mapper.DisinfectMapper">
<resultMap type="Disinfect" id="DisinfectResult">
<result property="id" column="id" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="datetime" column="datetime" />
<result property="technician" column="technician" />
<result property="way" column="way" />
<result property="usageId" column="usage_id" />
<result property="ratio" column="ratio" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectDisinfectVo">
select id, sheepfold_id, datetime, technician, way, usage_id, ratio, comment, update_by, update_time, create_by, create_time from sw_disinfect
</sql>
<select id="selectDisinfectList" parameterType="Disinfect" resultMap="DisinfectResult">
<include refid="selectDisinfectVo"/>
<where>
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
<if test="datetime != null "> and datetime = #{datetime}</if>
<if test="technician != null and technician != ''"> and technician = #{technician}</if>
<if test="way != null and way != ''"> and way = #{way}</if>
<if test="usageId != null "> and usage_id = #{usageId}</if>
<if test="ratio != null and ratio != ''"> and ratio = #{ratio}</if>
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
</where>
</select>
<select id="selectDisinfectById" parameterType="Long" resultMap="DisinfectResult">
<include refid="selectDisinfectVo"/>
where id = #{id}
</select>
<insert id="insertDisinfect" parameterType="Disinfect" useGeneratedKeys="true" keyProperty="id">
insert into sw_disinfect
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="datetime != null">datetime,</if>
<if test="technician != null">technician,</if>
<if test="way != null">way,</if>
<if test="usageId != null">usage_id,</if>
<if test="ratio != null">ratio,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="datetime != null">#{datetime},</if>
<if test="technician != null">#{technician},</if>
<if test="way != null">#{way},</if>
<if test="usageId != null">#{usageId},</if>
<if test="ratio != null">#{ratio},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateDisinfect" parameterType="Disinfect">
update sw_disinfect
<trim prefix="SET" suffixOverrides=",">
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="datetime != null">datetime = #{datetime},</if>
<if test="technician != null">technician = #{technician},</if>
<if test="way != null">way = #{way},</if>
<if test="usageId != null">usage_id = #{usageId},</if>
<if test="ratio != null">ratio = #{ratio},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDisinfectById" parameterType="Long">
delete from sw_disinfect where id = #{id}
</delete>
<delete id="deleteDisinfectByIds" parameterType="String">
delete from sw_disinfect where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,113 @@
<?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.biosafety.mapper.HealthMapper">
<resultMap type="Health" id="HealthResult">
<result property="id" column="id" />
<result property="datetime" column="datetime" />
<result property="sheepId" column="sheep_id" />
<result property="usageId" column="usage_id" />
<result property="variety" column="variety" />
<result property="sheepType" column="sheep_type" />
<result property="gender" column="gender" />
<result property="monthAge" column="month_age" />
<result property="parity" column="parity" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="technical" column="technical" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectHealthVo">
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, technical, comment, update_by, update_time, create_by, create_time from sw_health
</sql>
<select id="selectHealthList" parameterType="Health" resultMap="HealthResult">
<include refid="selectHealthVo"/>
<where>
<if test="datetime != null "> and datetime = #{datetime}</if>
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
</where>
</select>
<select id="selectHealthById" parameterType="Long" resultMap="HealthResult">
<include refid="selectHealthVo"/>
where id = #{id}
</select>
<insert id="insertHealth" parameterType="Health" useGeneratedKeys="true" keyProperty="id">
insert into sw_health
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="datetime != null">datetime,</if>
<if test="sheepId != null">sheep_id,</if>
<if test="usageId != null">usage_id,</if>
<if test="variety != null">variety,</if>
<if test="sheepType != null">sheep_type,</if>
<if test="gender != null">gender,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="technical != null">technical,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="datetime != null">#{datetime},</if>
<if test="sheepId != null">#{sheepId},</if>
<if test="usageId != null">#{usageId},</if>
<if test="variety != null">#{variety},</if>
<if test="sheepType != null">#{sheepType},</if>
<if test="gender != null">#{gender},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="technical != null">#{technical},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateHealth" parameterType="Health">
update sw_health
<trim prefix="SET" suffixOverrides=",">
<if test="datetime != null">datetime = #{datetime},</if>
<if test="sheepId != null">sheep_id = #{sheepId},</if>
<if test="usageId != null">usage_id = #{usageId},</if>
<if test="variety != null">variety = #{variety},</if>
<if test="sheepType != null">sheep_type = #{sheepType},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="technical != null">technical = #{technical},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHealthById" parameterType="Long">
delete from sw_health where id = #{id}
</delete>
<delete id="deleteHealthByIds" parameterType="String">
delete from sw_health where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,115 @@
<?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.biosafety.mapper.ImmunityMapper">
<resultMap type="Immunity" id="ImmunityResult">
<result property="id" column="id" />
<result property="sheepId" column="sheep_id" />
<result property="usageId" column="usage_id" />
<result property="variety" column="variety" />
<result property="sheepType" column="sheep_type" />
<result property="gender" column="gender" />
<result property="monthAge" column="month_age" />
<result property="parity" column="parity" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="datetime" column="datetime" />
<result property="technical" column="technical" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectImmunityVo">
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity
</sql>
<select id="selectImmunityList" parameterType="Immunity" resultMap="ImmunityResult">
<include refid="selectImmunityVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="sheepType != null "> and sheep_type = #{sheepType}</if>
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
</where>
</select>
<select id="selectImmunityById" parameterType="Long" resultMap="ImmunityResult">
<include refid="selectImmunityVo"/>
where id = #{id}
</select>
<insert id="insertImmunity" parameterType="Immunity" useGeneratedKeys="true" keyProperty="id">
insert into sw_immunity
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sheepId != null">sheep_id,</if>
<if test="usageId != null">usage_id,</if>
<if test="variety != null">variety,</if>
<if test="sheepType != null">sheep_type,</if>
<if test="gender != null">gender,</if>
<if test="monthAge != null">month_age,</if>
<if test="parity != null">parity,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="datetime != null">datetime,</if>
<if test="technical != null">technical,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepId != null">#{sheepId},</if>
<if test="usageId != null">#{usageId},</if>
<if test="variety != null">#{variety},</if>
<if test="sheepType != null">#{sheepType},</if>
<if test="gender != null">#{gender},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="parity != null">#{parity},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="datetime != null">#{datetime},</if>
<if test="technical != null">#{technical},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateImmunity" parameterType="Immunity">
update sw_immunity
<trim prefix="SET" suffixOverrides=",">
<if test="sheepId != null">sheep_id = #{sheepId},</if>
<if test="usageId != null">usage_id = #{usageId},</if>
<if test="variety != null">variety = #{variety},</if>
<if test="sheepType != null">sheep_type = #{sheepType},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="datetime != null">datetime = #{datetime},</if>
<if test="technical != null">technical = #{technical},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteImmunityById" parameterType="Long">
delete from sw_immunity where id = #{id}
</delete>
<delete id="deleteImmunityByIds" parameterType="String">
delete from sw_immunity where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,135 @@
<?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.biosafety.mapper.TreatmentMapper">
<resultMap type="Treatment" id="TreatmentResult">
<result property="id" column="id" />
<result property="diagId" column="diag_id" />
<result property="sheepId" column="sheep_id" />
<result property="variety" column="variety" />
<result property="sheepType" column="sheep_type" />
<result property="monthAge" column="month_age" />
<result property="gender" column="gender" />
<result property="parity" column="parity" />
<result property="breed" column="breed" />
<result property="lactDay" column="lact_day" />
<result property="gestDay" column="gest_day" />
<result property="datetime" column="datetime" />
<result property="diseaseId" column="disease_id" />
<result property="diseasePid" column="disease_pid" />
<result property="veterinary" column="veterinary" />
<result property="usageId" column="usage_id" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTreatmentVo">
select id, diag_id, sheep_id, variety, sheep_type, month_age, gender, parity, breed, lact_day, gest_day, datetime, disease_id, disease_pid, veterinary, usage_id, comment, update_by, update_time, create_by, create_time from sw_treatment
</sql>
<select id="selectTreatmentList" parameterType="Treatment" resultMap="TreatmentResult">
<include refid="selectTreatmentVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
<if test="veterinary != null and veterinary != ''"> and veterinary = #{veterinary}</if>
</where>
</select>
<select id="selectTreatmentById" parameterType="Long" resultMap="TreatmentResult">
<include refid="selectTreatmentVo"/>
where id = #{id}
</select>
<insert id="insertTreatment" parameterType="Treatment" useGeneratedKeys="true" keyProperty="id">
insert into sw_treatment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="diagId != null">diag_id,</if>
<if test="sheepId != null">sheep_id,</if>
<if test="variety != null">variety,</if>
<if test="sheepType != null">sheep_type,</if>
<if test="monthAge != null">month_age,</if>
<if test="gender != null">gender,</if>
<if test="parity != null">parity,</if>
<if test="breed != null">breed,</if>
<if test="lactDay != null">lact_day,</if>
<if test="gestDay != null">gest_day,</if>
<if test="datetime != null">datetime,</if>
<if test="diseaseId != null">disease_id,</if>
<if test="diseasePid != null">disease_pid,</if>
<if test="veterinary != null">veterinary,</if>
<if test="usageId != null">usage_id,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="diagId != null">#{diagId},</if>
<if test="sheepId != null">#{sheepId},</if>
<if test="variety != null">#{variety},</if>
<if test="sheepType != null">#{sheepType},</if>
<if test="monthAge != null">#{monthAge},</if>
<if test="gender != null">#{gender},</if>
<if test="parity != null">#{parity},</if>
<if test="breed != null">#{breed},</if>
<if test="lactDay != null">#{lactDay},</if>
<if test="gestDay != null">#{gestDay},</if>
<if test="datetime != null">#{datetime},</if>
<if test="diseaseId != null">#{diseaseId},</if>
<if test="diseasePid != null">#{diseasePid},</if>
<if test="veterinary != null">#{veterinary},</if>
<if test="usageId != null">#{usageId},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTreatment" parameterType="Treatment">
update sw_treatment
<trim prefix="SET" suffixOverrides=",">
<if test="diagId != null">diag_id = #{diagId},</if>
<if test="sheepId != null">sheep_id = #{sheepId},</if>
<if test="variety != null">variety = #{variety},</if>
<if test="sheepType != null">sheep_type = #{sheepType},</if>
<if test="monthAge != null">month_age = #{monthAge},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="breed != null">breed = #{breed},</if>
<if test="lactDay != null">lact_day = #{lactDay},</if>
<if test="gestDay != null">gest_day = #{gestDay},</if>
<if test="datetime != null">datetime = #{datetime},</if>
<if test="diseaseId != null">disease_id = #{diseaseId},</if>
<if test="diseasePid != null">disease_pid = #{diseasePid},</if>
<if test="veterinary != null">veterinary = #{veterinary},</if>
<if test="usageId != null">usage_id = #{usageId},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTreatmentById" parameterType="Long">
delete from sw_treatment where id = #{id}
</delete>
<delete id="deleteTreatmentByIds" parameterType="String">
delete from sw_treatment where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,142 @@
<?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.dairyProducts.rawMilkTest.mapper.NpRawMilkInspeMapper">
<resultMap type="NpRawMilkInspe" id="NpRawMilkInspeResult">
<result property="id" column="id" />
<result property="datetime" column="datetime" />
<result property="source" column="source" />
<result property="freeze" column="freeze" />
<result property="density" column="density" />
<result property="fat" column="fat" />
<result property="protein" column="protein" />
<result property="nonFat" column="non_fat" />
<result property="dryMatter" column="dry_matter" />
<result property="impurityDegree" column="impurity" />
<result property="lactose" column="lactose" />
<result property="ashContent" column="ash_content" />
<result property="acidity" column="acidity" />
<result property="ph" column="ph" />
<result property="bacterialColony" column="bacterial_colony" />
<result property="lactoferrin" column="lactoferrin" />
<result property="ig" column="ig" />
<result property="somaticCell" column="somatic_cell" />
<result property="usea" column="usea" />
<result property="fatRatio" column="fat_ratio" />
<result property="comment" column="comment" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectNpRawMilkInspeVo">
select id, datetime, source, freeze, density, fat, protein, non_fat, dry_matter,
impurity, lactose, ash_content, acidity, ph, bacterial_colony, lactoferrin,
ig, somatic_cell, usea, fat_ratio, comment, create_by, create_time
from np_raw_milk_inspe
</sql>
<select id="selectNpRawMilkInspeList" parameterType="NpRawMilkInspe" resultMap="NpRawMilkInspeResult">
<include refid="selectNpRawMilkInspeVo"/>
<where>
<if test="datetime != null "> and datetime = #{datetime}</if>
<if test="source != null and source != ''"> and source like concat('%', #{source}, '%')</if>
</where>
</select>
<select id="selectNpRawMilkInspeById" parameterType="Long" resultMap="NpRawMilkInspeResult">
<include refid="selectNpRawMilkInspeVo"/>
where id = #{id}
</select>
<insert id="insertNpRawMilkInspe" parameterType="NpRawMilkInspe" useGeneratedKeys="true" keyProperty="id">
insert into np_raw_milk_inspe
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="datetime != null">datetime,</if>
<if test="source != null">source,</if>
<if test="freeze != null">freeze,</if>
<if test="density != null">density,</if>
<if test="fat != null">fat,</if>
<if test="protein != null">protein,</if>
<if test="nonFat != null">non_fat,</if>
<if test="dryMatter != null">dry_matter,</if>
<if test="impurityDegree != null">impurity,</if>
<if test="lactose != null">lactose,</if>
<if test="ashContent != null">ash_content,</if>
<if test="acidity != null">acidity,</if>
<if test="ph != null">ph,</if>
<if test="bacterialColony != null">bacterial_colony,</if>
<if test="lactoferrin != null">lactoferrin,</if>
<if test="ig != null">ig,</if>
<if test="somaticCell != null">somatic_cell,</if>
<if test="usea != null">usea,</if>
<if test="fatRatio != null">fat_ratio,</if>
<if test="comment != null">comment,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="datetime != null">#{datetime},</if>
<if test="source != null">#{source},</if>
<if test="freeze != null">#{freeze},</if>
<if test="density != null">#{density},</if>
<if test="fat != null">#{fat},</if>
<if test="protein != null">#{protein},</if>
<if test="nonFat != null">#{nonFat},</if>
<if test="dryMatter != null">#{dryMatter},</if>
<if test="impurityDegree != null">#{impurityDegree},</if>
<if test="lactose != null">#{lactose},</if>
<if test="ashContent != null">#{ashContent},</if>
<if test="acidity != null">#{acidity},</if>
<if test="ph != null">#{ph},</if>
<if test="bacterialColony != null">#{bacterialColony},</if>
<if test="lactoferrin != null">#{lactoferrin},</if>
<if test="ig != null">#{ig},</if>
<if test="somaticCell != null">#{somaticCell},</if>
<if test="usea != null">#{usea},</if>
<if test="fatRatio != null">#{fatRatio},</if>
<if test="comment != null">#{comment},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateNpRawMilkInspe" parameterType="NpRawMilkInspe">
update np_raw_milk_inspe
<trim prefix="SET" suffixOverrides=",">
<if test="datetime != null">datetime = #{datetime},</if>
<if test="source != null">source = #{source},</if>
<if test="freeze != null">freeze = #{freeze},</if>
<if test="density != null">density = #{density},</if>
<if test="fat != null">fat = #{fat},</if>
<if test="protein != null">protein = #{protein},</if>
<if test="nonFat != null">non_fat = #{nonFat},</if>
<if test="dryMatter != null">dry_matter = #{dryMatter},</if>
<if test="impurityDegree != null">impurity = #{impurityDegree},</if>
<if test="lactose != null">lactose = #{lactose},</if>
<if test="ashContent != null">ash_content = #{ashContent},</if>
<if test="acidity != null">acidity = #{acidity},</if>
<if test="ph != null">ph = #{ph},</if>
<if test="bacterialColony != null">bacterial_colony = #{bacterialColony},</if>
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
<if test="ig != null">ig = #{ig},</if>
<if test="somaticCell != null">somatic_cell = #{somaticCell},</if>
<if test="usea != null">usea = #{usea},</if>
<if test="fatRatio != null">fat_ratio = #{fatRatio},</if>
<if test="comment != null">comment = #{comment},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNpRawMilkInspeById" parameterType="Long">
delete from np_raw_milk_inspe where id = #{id}
</delete>
<delete id="deleteNpRawMilkInspeByIds" parameterType="String">
delete from np_raw_milk_inspe where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -311,4 +311,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>

View File

@ -5,45 +5,52 @@
<mapper namespace="com.zhyc.module.produce.manage_sheep.add_sheep.mapper.ScAddSheepMapper">
<resultMap type="com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep" id="ScAddSheepResult">
<result property="id" column="id" />
<result property="sheepId" column="sheep_id" />
<result property="sheepfold" column="sheepfold" />
<result property="father" column="father" />
<result property="mother" column="mother" />
<result property="bornWeight" column="born_weight" />
<result property="birthday" column="birthday" />
<result property="gender" column="gender" />
<result property="parity" column="parity" />
<result property="varietyId" column="variety_id" />
<result property="joinDate" column="join_date" />
<result property="comment" column="comment" />
<result property="technician" column="technician" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="id" column="id"/>
<result property="earNumber" column="ear_number"/>
<result property="sheepfold" column="sheepfold"/>
<result property="sheepfoldName" column="sheepfoldName"/>
<result property="sheepfoldNameExcel" column="sheepfoldName"/>
<result property="father" column="father"/>
<result property="mother" column="mother"/>
<result property="bornWeight" column="born_weight"/>
<result property="birthday" column="birthday"/>
<result property="gender" column="gender"/>
<result property="parity" column="parity"/>
<result property="varietyId" column="variety_id"/>
<result property="joinDate" column="join_date"/>
<result property="comment" column="comment"/>
<result property="technician" column="technician"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
</resultMap>
<insert id="insert" parameterType="ScAddSheep" useGeneratedKeys="true" keyProperty="id">
INSERT INTO sc_add_sheep
(sheep_id, sheepfold, father, mother, born_weight, birthday, gender, parity,
(ear_number, sheepfold, father, mother, born_weight, birthday, gender, parity,
variety_id, join_date, comment, technician, create_by, create_time)
VALUES
(#{sheepId}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday},
#{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician},
#{createBy}, #{createTime})
VALUES (#{earNumber}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday},
#{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician},
#{createBy}, #{createTime})
</insert>
<select id="selectScAddSheepList" parameterType="ScAddSheep" resultMap="ScAddSheepResult">
SELECT * FROM sc_add_sheep
SELECT
sas.*,
sf.sheepfold_name AS sheepfoldName
FROM sc_add_sheep sas
LEFT JOIN da_sheepfold sf ON sas.sheepfold = sf.id
<where>
<if test="sheepId != null and sheepId != ''">AND sheep_id LIKE CONCAT('%', #{sheepId}, '%')</if>
<!-- 其他字段同理,按需扩展 -->
<if test="earNumber != null and earNumber != ''">
AND sas.ear_number LIKE CONCAT('%', #{earNumber}, '%')
</if>
</where>
</select>
<update id="updateScAddSheep" parameterType="ScAddSheep">
UPDATE sc_add_sheep
<set>
sheep_id = #{sheepId},
ear_number = #{earNumber},
sheepfold = #{sheepfold},
father = #{father},
mother = #{mother},
@ -68,4 +75,7 @@
</foreach>
</delete>
<select id="selectByEarNumber" parameterType="string" resultMap="ScAddSheepResult">
SELECT * FROM sc_add_sheep WHERE ear_number = #{earNumber}
</select>
</mapper>

View File

@ -1,40 +1,57 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhyc.module.produce.manage_sheep.trans_group.mapper.ScTransGroupMapper">
<resultMap type="ScTransGroup" id="ScTransGroupResult">
<result property="id" column="id" />
<result property="sheepId" column="sheep_id" />
<result property="foldTo" column="fold_to" />
<result property="foldFrom" column="fold_from" />
<result property="reason" column="reason" />
<result property="technician" column="technician" />
<result property="status" column="status" />
<result property="comment" column="comment" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="id" column="id"/>
<result property="sheepId" column="sheep_id"/>
<result property="foldTo" column="fold_to"/>
<result property="foldFrom" column="fold_from"/>
<result property="reason" column="reason"/>
<result property="technician" column="technician"/>
<result property="status" column="status"/>
<result property="comment" column="comment"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectScTransGroupVo">
select id, sheep_id, fold_to, fold_from, reason, technician, status, comment, create_by, create_time from sc_trans_group
SELECT tg.id,
tg.sheep_id,
tg.fold_to,
tg.fold_from,
tg.reason,
tg.technician,
tg.status,
tg.comment,
tg.create_by,
tg.create_time,
sf_from.sheepfold_name AS foldFromName,
sf_to.sheepfold_name AS foldToName
FROM sc_trans_group tg
LEFT JOIN da_sheepfold sf_from ON tg.fold_from = sf_from.id
LEFT JOIN da_sheepfold sf_to ON tg.fold_to = sf_to.id
</sql>
<select id="selectScTransGroupList" parameterType="ScTransGroup" resultMap="ScTransGroupResult">
<include refid="selectScTransGroupVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="foldTo != null and foldTo != ''"> and fold_to = #{foldTo}</if>
<if test="foldFrom != null and foldFrom != ''"> and fold_from = #{foldFrom}</if>
<if test="status != null "> and status = #{status}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
<if test="foldTo != null and foldTo != ''">and fold_to = #{foldTo}</if>
<if test="foldFrom != null and foldFrom != ''">and fold_from = #{foldFrom}</if>
<if test="status != null ">and status = #{status}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
</where>
</select>
<select id="selectScTransGroupById" parameterType="Integer" resultMap="ScTransGroupResult">
<include refid="selectScTransGroupVo"/>
where id = #{id}
where tg.id = #{id}
</select>
<insert id="insertScTransGroup" parameterType="ScTransGroup" useGeneratedKeys="true" keyProperty="id">
@ -49,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="comment != null">comment,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepId != null">#{sheepId},</if>
<if test="foldTo != null and foldTo != ''">#{foldTo},</if>
@ -60,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="comment != null">#{comment},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</trim>
</insert>
<update id="updateScTransGroup" parameterType="ScTransGroup">
@ -76,11 +93,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
where sc_trans_group.id = #{id}
</update>
<delete id="deleteScTransGroupById" parameterType="Integer">
delete from sc_trans_group where id = #{id}
delete
from sc_trans_group
where tg.id = #{id}
</delete>
<delete id="deleteScTransGroupByIds" parameterType="String">

View File

@ -1,47 +1,59 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhyc.module.produce.other.fixHoof.mapper.ScFixHoofMapper">
<resultMap type="ScFixHoof" id="ScFixHoofResult">
<result property="id" column="id" />
<result property="sheepId" column="sheep_id" />
<result property="sheepfold" column="sheepfold" />
<result property="comment" column="comment" />
<result property="technician" column="technician" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="id" column="id"/>
<result property="sheepId" column="sheep_id"/>
<result property="sheepfold" column="sheepfold"/>
<result property="sheepfoldName" column="sheepfoldName"/>
<result property="comment" column="comment"/>
<result property="technician" column="technician"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectScFixHoofVo">
select id, sheep_id, sheepfold, comment, technician, create_by, create_time from sc_fix_hoof
select fh.id,
fh.sheep_id,
fh.sheepfold,
sf.sheepfold_name as sheepfoldName,
fh.comment,
fh.technician,
fh.create_by,
fh.create_time
from sc_fix_hoof fh
left join da_sheepfold sf on fh.sheepfold = sf.id
</sql>
<select id="selectScFixHoofList" parameterType="ScFixHoof" resultMap="ScFixHoofResult">
<include refid="selectScFixHoofVo"/>
<where>
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
<if test="sheepfold != null "> and sheepfold = #{sheepfold}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
<if test="sheepfold != null ">and sheepfold = #{sheepfold}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
</where>
</select>
<select id="selectScFixHoofById" parameterType="Long" resultMap="ScFixHoofResult">
<select id="selectScFixHoofById" parameterType="java.lang.Integer" resultMap="ScFixHoofResult">
<include refid="selectScFixHoofVo"/>
where id = #{id}
where fh.id = #{id}
</select>
<insert id="insertScFixHoof" parameterType="ScFixHoof" useGeneratedKeys="true" keyProperty="id">
insert into sc_fix_hoof
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sheepId != null">sheep_id,</if>
<if test="sheepfold != null">sheepfold,</if>
<if test="sheepId != null and sheepId != ''">and fh.sheep_id like concat('%', #{sheepId}, '%')</if>
<if test="sheepfold != null">and fh.sheepfold = #{sheepfold}</if>
<if test="comment != null">comment,</if>
<if test="technician != null and technician != ''">technician,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sheepId != null">#{sheepId},</if>
<if test="sheepfold != null">#{sheepfold},</if>
@ -49,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="technician != null and technician != ''">#{technician},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</trim>
</insert>
<update id="updateScFixHoof" parameterType="ScFixHoof">
@ -65,11 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</update>
<delete id="deleteScFixHoofById" parameterType="Long">
delete from sc_fix_hoof where id = #{id}
<delete id="deleteScFixHoofById" parameterType="java.lang.Integer">
delete
from sc_fix_hoof
where id = #{id}
</delete>
<delete id="deleteScFixHoofByIds" parameterType="String">
<delete id="deleteScFixHoofByIds" parameterType="java.lang.Integer">
delete from sc_fix_hoof where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}

View File

@ -0,0 +1,242 @@
<?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.produce.sheep.mapper.BasSheepMapper">
<resultMap type="BasSheep" id="BasSheepResult">
<result property="id" column="id" />
<result property="manageTags" column="manage_tags" />
<result property="ranchId" column="ranch_id" />
<result property="sheepfoldId" column="sheepfold_id" />
<result property="electronicTags" column="electronic_tags" />
<result property="varietyId" column="variety_id" />
<result property="family" column="family" />
<result property="typeId" column="type_id" />
<result property="gender" column="gender" />
<result property="birthday" column="birthday" />
<result property="birthWeight" column="birth_weight" />
<result property="parity" column="parity" />
<result property="statusId" column="status_id" />
<result property="weaningDate" column="weaning_date" />
<result property="weaningWeight" column="weaning_weight" />
<result property="breedStatusId" column="breed_status_id" />
<result property="fatherId" column="father_id" />
<result property="motherId" column="mother_id" />
<result property="receptorId" column="receptor_id" />
<result property="matingDate" column="mating_date" />
<result property="matingTypeId" column="mating_type_id" />
<result property="pregDate" column="preg_date" />
<result property="lambingDate" column="lambing_date" />
<result property="lambingDay" column="lambing_day" />
<result property="expectedDate" column="expected_date" />
<result property="controlled" column="controlled" />
<result property="matingCounts" column="mating_counts" />
<result property="matingTotal" column="mating_total" />
<result property="miscarriageCounts" column="miscarriage_counts" />
<result property="body" column="body" />
<result property="breast" column="breast" />
<result property="source" column="source" />
<result property="sourceDate" column="source_date" />
<result property="sourceRanchId" column="source_ranch_id" />
<result property="comment" column="comment" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="isDelete" column="is_delete" />
</resultMap>
<sql id="selectBasSheepVo">
select id, manage_tags, ranch_id, sheepfold_id, electronic_tags, variety_id, family, type_id, gender, birthday, birth_weight, parity, status_id, weaning_date, weaning_weight, breed_status_id, father_id, mother_id, receptor_id, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, expected_date, controlled, mating_counts, mating_total, miscarriage_counts, body, breast, source, source_date, source_ranch_id, comment, update_by, update_time, create_by, create_time, is_delete from bas_sheep
</sql>
<select id="selectBasSheepList" parameterType="BasSheep" resultMap="BasSheepResult">
<include refid="selectBasSheepVo"/>
<where>
<if test="manageTags != null and manageTags != ''"> and manage_tags = #{manageTags}</if>
<if test="ranchId != null "> and ranch_id = #{ranchId}</if>
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
<if test="electronicTags != null and electronicTags != ''"> and electronic_tags = #{electronicTags}</if>
<if test="varietyId != null "> and variety_id = #{varietyId}</if>
<if test="family != null and family != ''"> and family = #{family}</if>
<if test="typeId != null "> and type_id = #{typeId}</if>
<if test="gender != null "> and gender = #{gender}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
<if test="birthWeight != null "> and birth_weight = #{birthWeight}</if>
<if test="parity != null "> and parity = #{parity}</if>
<if test="statusId != null "> and status_id = #{statusId}</if>
<if test="weaningDate != null "> and weaning_date = #{weaningDate}</if>
<if test="weaningWeight != null "> and weaning_weight = #{weaningWeight}</if>
<if test="breedStatusId != null "> and breed_status_id = #{breedStatusId}</if>
<if test="fatherId != null "> and father_id = #{fatherId}</if>
<if test="motherId != null "> and mother_id = #{motherId}</if>
<if test="receptorId != null "> and receptor_id = #{receptorId}</if>
<if test="matingDate != null "> and mating_date = #{matingDate}</if>
<if test="matingTypeId != null "> and mating_type_id = #{matingTypeId}</if>
<if test="pregDate != null "> and preg_date = #{pregDate}</if>
<if test="lambingDate != null "> and lambing_date = #{lambingDate}</if>
<if test="lambingDay != null "> and lambing_day = #{lambingDay}</if>
<if test="expectedDate != null "> and expected_date = #{expectedDate}</if>
<if test="controlled != null "> and controlled = #{controlled}</if>
<if test="matingCounts != null "> and mating_counts = #{matingCounts}</if>
<if test="matingTotal != null "> and mating_total = #{matingTotal}</if>
<if test="miscarriageCounts != null "> and miscarriage_counts = #{miscarriageCounts}</if>
<if test="body != null "> and body = #{body}</if>
<if test="breast != null "> and breast = #{breast}</if>
<if test="source != null and source != ''"> and source = #{source}</if>
<if test="sourceDate != null "> and source_date = #{sourceDate}</if>
<if test="sourceRanchId != null "> and source_ranch_id = #{sourceRanchId}</if>
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectBasSheepById" parameterType="Long" resultMap="BasSheepResult">
<include refid="selectBasSheepVo"/>
where id = #{id}
</select>
<insert id="insertBasSheep" parameterType="BasSheep" useGeneratedKeys="true" keyProperty="id">
insert into bas_sheep
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="manageTags != null">manage_tags,</if>
<if test="ranchId != null">ranch_id,</if>
<if test="sheepfoldId != null">sheepfold_id,</if>
<if test="electronicTags != null">electronic_tags,</if>
<if test="varietyId != null">variety_id,</if>
<if test="family != null">family,</if>
<if test="typeId != null">type_id,</if>
<if test="gender != null">gender,</if>
<if test="birthday != null">birthday,</if>
<if test="birthWeight != null">birth_weight,</if>
<if test="parity != null">parity,</if>
<if test="statusId != null">status_id,</if>
<if test="weaningDate != null">weaning_date,</if>
<if test="weaningWeight != null">weaning_weight,</if>
<if test="breedStatusId != null">breed_status_id,</if>
<if test="fatherId != null">father_id,</if>
<if test="motherId != null">mother_id,</if>
<if test="receptorId != null">receptor_id,</if>
<if test="matingDate != null">mating_date,</if>
<if test="matingTypeId != null">mating_type_id,</if>
<if test="pregDate != null">preg_date,</if>
<if test="lambingDate != null">lambing_date,</if>
<if test="lambingDay != null">lambing_day,</if>
<if test="expectedDate != null">expected_date,</if>
<if test="controlled != null">controlled,</if>
<if test="matingCounts != null">mating_counts,</if>
<if test="matingTotal != null">mating_total,</if>
<if test="miscarriageCounts != null">miscarriage_counts,</if>
<if test="body != null">body,</if>
<if test="breast != null">breast,</if>
<if test="source != null">source,</if>
<if test="sourceDate != null">source_date,</if>
<if test="sourceRanchId != null">source_ranch_id,</if>
<if test="comment != null">comment,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="manageTags != null">#{manageTags},</if>
<if test="ranchId != null">#{ranchId},</if>
<if test="sheepfoldId != null">#{sheepfoldId},</if>
<if test="electronicTags != null">#{electronicTags},</if>
<if test="varietyId != null">#{varietyId},</if>
<if test="family != null">#{family},</if>
<if test="typeId != null">#{typeId},</if>
<if test="gender != null">#{gender},</if>
<if test="birthday != null">#{birthday},</if>
<if test="birthWeight != null">#{birthWeight},</if>
<if test="parity != null">#{parity},</if>
<if test="statusId != null">#{statusId},</if>
<if test="weaningDate != null">#{weaningDate},</if>
<if test="weaningWeight != null">#{weaningWeight},</if>
<if test="breedStatusId != null">#{breedStatusId},</if>
<if test="fatherId != null">#{fatherId},</if>
<if test="motherId != null">#{motherId},</if>
<if test="receptorId != null">#{receptorId},</if>
<if test="matingDate != null">#{matingDate},</if>
<if test="matingTypeId != null">#{matingTypeId},</if>
<if test="pregDate != null">#{pregDate},</if>
<if test="lambingDate != null">#{lambingDate},</if>
<if test="lambingDay != null">#{lambingDay},</if>
<if test="expectedDate != null">#{expectedDate},</if>
<if test="controlled != null">#{controlled},</if>
<if test="matingCounts != null">#{matingCounts},</if>
<if test="matingTotal != null">#{matingTotal},</if>
<if test="miscarriageCounts != null">#{miscarriageCounts},</if>
<if test="body != null">#{body},</if>
<if test="breast != null">#{breast},</if>
<if test="source != null">#{source},</if>
<if test="sourceDate != null">#{sourceDate},</if>
<if test="sourceRanchId != null">#{sourceRanchId},</if>
<if test="comment != null">#{comment},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</insert>
<update id="updateBasSheep" parameterType="BasSheep">
update bas_sheep
<trim prefix="SET" suffixOverrides=",">
<if test="manageTags != null">manage_tags = #{manageTags},</if>
<if test="ranchId != null">ranch_id = #{ranchId},</if>
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
<if test="electronicTags != null">electronic_tags = #{electronicTags},</if>
<if test="varietyId != null">variety_id = #{varietyId},</if>
<if test="family != null">family = #{family},</if>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="gender != null">gender = #{gender},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="birthWeight != null">birth_weight = #{birthWeight},</if>
<if test="parity != null">parity = #{parity},</if>
<if test="statusId != null">status_id = #{statusId},</if>
<if test="weaningDate != null">weaning_date = #{weaningDate},</if>
<if test="weaningWeight != null">weaning_weight = #{weaningWeight},</if>
<if test="breedStatusId != null">breed_status_id = #{breedStatusId},</if>
<if test="fatherId != null">father_id = #{fatherId},</if>
<if test="motherId != null">mother_id = #{motherId},</if>
<if test="receptorId != null">receptor_id = #{receptorId},</if>
<if test="matingDate != null">mating_date = #{matingDate},</if>
<if test="matingTypeId != null">mating_type_id = #{matingTypeId},</if>
<if test="pregDate != null">preg_date = #{pregDate},</if>
<if test="lambingDate != null">lambing_date = #{lambingDate},</if>
<if test="lambingDay != null">lambing_day = #{lambingDay},</if>
<if test="expectedDate != null">expected_date = #{expectedDate},</if>
<if test="controlled != null">controlled = #{controlled},</if>
<if test="matingCounts != null">mating_counts = #{matingCounts},</if>
<if test="matingTotal != null">mating_total = #{matingTotal},</if>
<if test="miscarriageCounts != null">miscarriage_counts = #{miscarriageCounts},</if>
<if test="body != null">body = #{body},</if>
<if test="breast != null">breast = #{breast},</if>
<if test="source != null">source = #{source},</if>
<if test="sourceDate != null">source_date = #{sourceDate},</if>
<if test="sourceRanchId != null">source_ranch_id = #{sourceRanchId},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBasSheepById" parameterType="Long">
delete from bas_sheep where id = #{id}
</delete>
<delete id="deleteBasSheepByIds" parameterType="String">
delete from bas_sheep where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>