Merge remote-tracking branch 'main/main'
This commit is contained in:
commit
1b51ccfb50
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.sheep_file.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.sheep_file.domain.BasSheep;
|
||||
import com.zhyc.module.sheep_file.service.IBasSheepService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sheep_file/sheep_file")
|
||||
public class BasSheepController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasSheepService basSheepService;
|
||||
|
||||
/**
|
||||
* 查询羊只基本信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasSheep basSheep)
|
||||
{
|
||||
startPage();
|
||||
List<BasSheep> list = basSheepService.selectBasSheepList(basSheep);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出羊只基本信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file: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_file:sheep_file:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(basSheepService.selectBasSheepById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊只基本信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:add')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasSheep basSheep)
|
||||
{
|
||||
return toAjax(basSheepService.insertBasSheep(basSheep));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊只基本信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:edit')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasSheep basSheep)
|
||||
{
|
||||
return toAjax(basSheepService.updateBasSheep(basSheep));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊只基本信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheep_file:sheep_file:remove')")
|
||||
@Log(title = "羊只基本信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(basSheepService.deleteBasSheepByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,575 @@
|
||||
package com.zhyc.module.sheep_file.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;
|
||||
|
||||
/**
|
||||
* 羊只基本信息对象 bas_sheep
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
public class BasSheep extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 羊只id */
|
||||
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 soureDate;
|
||||
|
||||
/** 来源牧场id */
|
||||
@Excel(name = "来源牧场id")
|
||||
private Long sourceRanchId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private Long isDelete;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setManageTags(String manageTags)
|
||||
{
|
||||
this.manageTags = manageTags;
|
||||
}
|
||||
|
||||
public String getManageTags()
|
||||
{
|
||||
return manageTags;
|
||||
}
|
||||
|
||||
public void setRanchId(Long ranchId)
|
||||
{
|
||||
this.ranchId = ranchId;
|
||||
}
|
||||
|
||||
public Long getRanchId()
|
||||
{
|
||||
return ranchId;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setElectronicTags(String electronicTags)
|
||||
{
|
||||
this.electronicTags = electronicTags;
|
||||
}
|
||||
|
||||
public String getElectronicTags()
|
||||
{
|
||||
return electronicTags;
|
||||
}
|
||||
|
||||
public void setVarietyId(Long varietyId)
|
||||
{
|
||||
this.varietyId = varietyId;
|
||||
}
|
||||
|
||||
public Long getVarietyId()
|
||||
{
|
||||
return varietyId;
|
||||
}
|
||||
|
||||
public void setFamily(String family)
|
||||
{
|
||||
this.family = family;
|
||||
}
|
||||
|
||||
public String getFamily()
|
||||
{
|
||||
return family;
|
||||
}
|
||||
|
||||
public void setTypeId(Long typeId)
|
||||
{
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
public Long getTypeId()
|
||||
{
|
||||
return typeId;
|
||||
}
|
||||
|
||||
public void setGender(Long gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Long getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setBirthday(Date birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Date getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthWeight(Long birthWeight)
|
||||
{
|
||||
this.birthWeight = birthWeight;
|
||||
}
|
||||
|
||||
public Long getBirthWeight()
|
||||
{
|
||||
return birthWeight;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setStatusId(Long statusId)
|
||||
{
|
||||
this.statusId = statusId;
|
||||
}
|
||||
|
||||
public Long getStatusId()
|
||||
{
|
||||
return statusId;
|
||||
}
|
||||
|
||||
public void setWeaningDate(Date weaningDate)
|
||||
{
|
||||
this.weaningDate = weaningDate;
|
||||
}
|
||||
|
||||
public Date getWeaningDate()
|
||||
{
|
||||
return weaningDate;
|
||||
}
|
||||
|
||||
public void setWeaningWeight(Long weaningWeight)
|
||||
{
|
||||
this.weaningWeight = weaningWeight;
|
||||
}
|
||||
|
||||
public Long getWeaningWeight()
|
||||
{
|
||||
return weaningWeight;
|
||||
}
|
||||
|
||||
public void setBreedStatusId(Long breedStatusId)
|
||||
{
|
||||
this.breedStatusId = breedStatusId;
|
||||
}
|
||||
|
||||
public Long getBreedStatusId()
|
||||
{
|
||||
return breedStatusId;
|
||||
}
|
||||
|
||||
public void setFatherId(Long fatherId)
|
||||
{
|
||||
this.fatherId = fatherId;
|
||||
}
|
||||
|
||||
public Long getFatherId()
|
||||
{
|
||||
return fatherId;
|
||||
}
|
||||
|
||||
public void setMotherId(Long motherId)
|
||||
{
|
||||
this.motherId = motherId;
|
||||
}
|
||||
|
||||
public Long getMotherId()
|
||||
{
|
||||
return motherId;
|
||||
}
|
||||
|
||||
public void setReceptorId(Long receptorId)
|
||||
{
|
||||
this.receptorId = receptorId;
|
||||
}
|
||||
|
||||
public Long getReceptorId()
|
||||
{
|
||||
return receptorId;
|
||||
}
|
||||
|
||||
public void setMatingDate(Date matingDate)
|
||||
{
|
||||
this.matingDate = matingDate;
|
||||
}
|
||||
|
||||
public Date getMatingDate()
|
||||
{
|
||||
return matingDate;
|
||||
}
|
||||
|
||||
public void setMatingTypeId(Long matingTypeId)
|
||||
{
|
||||
this.matingTypeId = matingTypeId;
|
||||
}
|
||||
|
||||
public Long getMatingTypeId()
|
||||
{
|
||||
return matingTypeId;
|
||||
}
|
||||
|
||||
public void setPregDate(Date pregDate)
|
||||
{
|
||||
this.pregDate = pregDate;
|
||||
}
|
||||
|
||||
public Date getPregDate()
|
||||
{
|
||||
return pregDate;
|
||||
}
|
||||
|
||||
public void setLambingDate(Date lambingDate)
|
||||
{
|
||||
this.lambingDate = lambingDate;
|
||||
}
|
||||
|
||||
public Date getLambingDate()
|
||||
{
|
||||
return lambingDate;
|
||||
}
|
||||
|
||||
public void setLambingDay(Long lambingDay)
|
||||
{
|
||||
this.lambingDay = lambingDay;
|
||||
}
|
||||
|
||||
public Long getLambingDay()
|
||||
{
|
||||
return lambingDay;
|
||||
}
|
||||
|
||||
public void setExpectedDate(Date expectedDate)
|
||||
{
|
||||
this.expectedDate = expectedDate;
|
||||
}
|
||||
|
||||
public Date getExpectedDate()
|
||||
{
|
||||
return expectedDate;
|
||||
}
|
||||
|
||||
public void setControlled(Long controlled)
|
||||
{
|
||||
this.controlled = controlled;
|
||||
}
|
||||
|
||||
public Long getControlled()
|
||||
{
|
||||
return controlled;
|
||||
}
|
||||
|
||||
public void setMatingCounts(Long matingCounts)
|
||||
{
|
||||
this.matingCounts = matingCounts;
|
||||
}
|
||||
|
||||
public Long getMatingCounts()
|
||||
{
|
||||
return matingCounts;
|
||||
}
|
||||
|
||||
public void setMatingTotal(Long matingTotal)
|
||||
{
|
||||
this.matingTotal = matingTotal;
|
||||
}
|
||||
|
||||
public Long getMatingTotal()
|
||||
{
|
||||
return matingTotal;
|
||||
}
|
||||
|
||||
public void setMiscarriageCounts(Long miscarriageCounts)
|
||||
{
|
||||
this.miscarriageCounts = miscarriageCounts;
|
||||
}
|
||||
|
||||
public Long getMiscarriageCounts()
|
||||
{
|
||||
return miscarriageCounts;
|
||||
}
|
||||
|
||||
public void setBody(Long body)
|
||||
{
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public Long getBody()
|
||||
{
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBreast(Long breast)
|
||||
{
|
||||
this.breast = breast;
|
||||
}
|
||||
|
||||
public Long getBreast()
|
||||
{
|
||||
return breast;
|
||||
}
|
||||
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSoureDate(Date soureDate)
|
||||
{
|
||||
this.soureDate = soureDate;
|
||||
}
|
||||
|
||||
public Date getSoureDate()
|
||||
{
|
||||
return soureDate;
|
||||
}
|
||||
|
||||
public void setSourceRanchId(Long sourceRanchId)
|
||||
{
|
||||
this.sourceRanchId = sourceRanchId;
|
||||
}
|
||||
|
||||
public Long getSourceRanchId()
|
||||
{
|
||||
return sourceRanchId;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setIsDelete(Long isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Long getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("manageTags", getManageTags())
|
||||
.append("ranchId", getRanchId())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("electronicTags", getElectronicTags())
|
||||
.append("varietyId", getVarietyId())
|
||||
.append("family", getFamily())
|
||||
.append("typeId", getTypeId())
|
||||
.append("gender", getGender())
|
||||
.append("birthday", getBirthday())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("parity", getParity())
|
||||
.append("statusId", getStatusId())
|
||||
.append("weaningDate", getWeaningDate())
|
||||
.append("weaningWeight", getWeaningWeight())
|
||||
.append("breedStatusId", getBreedStatusId())
|
||||
.append("fatherId", getFatherId())
|
||||
.append("motherId", getMotherId())
|
||||
.append("receptorId", getReceptorId())
|
||||
.append("matingDate", getMatingDate())
|
||||
.append("matingTypeId", getMatingTypeId())
|
||||
.append("pregDate", getPregDate())
|
||||
.append("lambingDate", getLambingDate())
|
||||
.append("lambingDay", getLambingDay())
|
||||
.append("expectedDate", getExpectedDate())
|
||||
.append("controlled", getControlled())
|
||||
.append("matingCounts", getMatingCounts())
|
||||
.append("matingTotal", getMatingTotal())
|
||||
.append("miscarriageCounts", getMiscarriageCounts())
|
||||
.append("body", getBody())
|
||||
.append("breast", getBreast())
|
||||
.append("source", getSource())
|
||||
.append("soureDate", getSoureDate())
|
||||
.append("sourceRanchId", getSourceRanchId())
|
||||
.append("comment", getComment())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("isDelete", getIsDelete())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.sheep_file.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
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);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.sheep_file.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
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);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.sheep_file.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.sheep_file.mapper.BasSheepMapper;
|
||||
import com.zhyc.module.sheep_file.domain.BasSheep;
|
||||
import com.zhyc.module.sheep_file.service.IBasSheepService;
|
||||
|
||||
/**
|
||||
* 羊只基本信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-10
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.sheepfold_management.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.sheepfold_management.domain.DaSheepfold;
|
||||
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 羊舍管理Controller
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sheepfold_management/sheepfold_management")
|
||||
public class DaSheepfoldController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDaSheepfoldService daSheepfoldService;
|
||||
|
||||
/**
|
||||
* 查询羊舍管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheepfold_management:sheepfold_management:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DaSheepfold daSheepfold)
|
||||
{
|
||||
startPage();
|
||||
List<DaSheepfold> list = daSheepfoldService.selectDaSheepfoldList(daSheepfold);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出羊舍管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheepfold_management:sheepfold_management:export')")
|
||||
@Log(title = "羊舍管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DaSheepfold daSheepfold)
|
||||
{
|
||||
List<DaSheepfold> list = daSheepfoldService.selectDaSheepfoldList(daSheepfold);
|
||||
ExcelUtil<DaSheepfold> util = new ExcelUtil<DaSheepfold>(DaSheepfold.class);
|
||||
util.exportExcel(response, list, "羊舍管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取羊舍管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheepfold_management:sheepfold_management:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(daSheepfoldService.selectDaSheepfoldById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊舍管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheepfold_management:sheepfold_management:add')")
|
||||
@Log(title = "羊舍管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DaSheepfold daSheepfold)
|
||||
{
|
||||
return toAjax(daSheepfoldService.insertDaSheepfold(daSheepfold));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊舍管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheepfold_management:sheepfold_management:edit')")
|
||||
@Log(title = "羊舍管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DaSheepfold daSheepfold)
|
||||
{
|
||||
return toAjax(daSheepfoldService.updateDaSheepfold(daSheepfold));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊舍管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('sheepfold_management:sheepfold_management:remove')")
|
||||
@Log(title = "羊舍管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(daSheepfoldService.deleteDaSheepfoldByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package com.zhyc.module.sheepfold_management.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 羊舍管理对象 da_sheepfold
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class DaSheepfold extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
private Long id;
|
||||
|
||||
/** 牧场 */
|
||||
@Excel(name = "牧场")
|
||||
private Long ranchId;
|
||||
|
||||
/** 羊舍名称 */
|
||||
@Excel(name = "羊舍名称")
|
||||
private String sheepfoldName;
|
||||
|
||||
/** 羊舍类型id */
|
||||
@Excel(name = "羊舍类型id")
|
||||
private Long sheepfoldTypeId;
|
||||
|
||||
/** 羊舍编号 */
|
||||
@Excel(name = "羊舍编号")
|
||||
private String sheepfoldNo;
|
||||
|
||||
/** 排号 */
|
||||
@Excel(name = "排号")
|
||||
private String rowNo;
|
||||
|
||||
/** 栏数 */
|
||||
@Excel(name = "栏数")
|
||||
private String columns;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setRanchId(Long ranchId)
|
||||
{
|
||||
this.ranchId = ranchId;
|
||||
}
|
||||
|
||||
public Long getRanchId()
|
||||
{
|
||||
return ranchId;
|
||||
}
|
||||
|
||||
public void setSheepfoldName(String sheepfoldName)
|
||||
{
|
||||
this.sheepfoldName = sheepfoldName;
|
||||
}
|
||||
|
||||
public String getSheepfoldName()
|
||||
{
|
||||
return sheepfoldName;
|
||||
}
|
||||
|
||||
public void setSheepfoldTypeId(Long sheepfoldTypeId)
|
||||
{
|
||||
this.sheepfoldTypeId = sheepfoldTypeId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldTypeId()
|
||||
{
|
||||
return sheepfoldTypeId;
|
||||
}
|
||||
|
||||
public void setSheepfoldNo(String sheepfoldNo)
|
||||
{
|
||||
this.sheepfoldNo = sheepfoldNo;
|
||||
}
|
||||
|
||||
public String getSheepfoldNo()
|
||||
{
|
||||
return sheepfoldNo;
|
||||
}
|
||||
|
||||
public void setRowNo(String rowNo)
|
||||
{
|
||||
this.rowNo = rowNo;
|
||||
}
|
||||
|
||||
public String getRowNo()
|
||||
{
|
||||
return rowNo;
|
||||
}
|
||||
|
||||
public void setColumns(String columns)
|
||||
{
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
public String getColumns()
|
||||
{
|
||||
return columns;
|
||||
}
|
||||
|
||||
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("ranchId", getRanchId())
|
||||
.append("sheepfoldName", getSheepfoldName())
|
||||
.append("sheepfoldTypeId", getSheepfoldTypeId())
|
||||
.append("sheepfoldNo", getSheepfoldNo())
|
||||
.append("rowNo", getRowNo())
|
||||
.append("columns", getColumns())
|
||||
.append("comment", getComment())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.sheepfold_management.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
|
||||
/**
|
||||
* 羊舍管理Mapper接口
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface DaSheepfoldMapper
|
||||
{
|
||||
/**
|
||||
* 查询羊舍管理
|
||||
*
|
||||
* @param id 羊舍管理主键
|
||||
* @return 羊舍管理
|
||||
*/
|
||||
public DaSheepfold selectDaSheepfoldById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊舍管理列表
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 羊舍管理集合
|
||||
*/
|
||||
public List<DaSheepfold> selectDaSheepfoldList(DaSheepfold daSheepfold);
|
||||
|
||||
/**
|
||||
* 新增羊舍管理
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDaSheepfold(DaSheepfold daSheepfold);
|
||||
|
||||
/**
|
||||
* 修改羊舍管理
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDaSheepfold(DaSheepfold daSheepfold);
|
||||
|
||||
/**
|
||||
* 删除羊舍管理
|
||||
*
|
||||
* @param id 羊舍管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除羊舍管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.sheepfold_management.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
|
||||
/**
|
||||
* 羊舍管理Service接口
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IDaSheepfoldService
|
||||
{
|
||||
/**
|
||||
* 查询羊舍管理
|
||||
*
|
||||
* @param id 羊舍管理主键
|
||||
* @return 羊舍管理
|
||||
*/
|
||||
public DaSheepfold selectDaSheepfoldById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊舍管理列表
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 羊舍管理集合
|
||||
*/
|
||||
public List<DaSheepfold> selectDaSheepfoldList(DaSheepfold daSheepfold);
|
||||
|
||||
/**
|
||||
* 新增羊舍管理
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDaSheepfold(DaSheepfold daSheepfold);
|
||||
|
||||
/**
|
||||
* 修改羊舍管理
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDaSheepfold(DaSheepfold daSheepfold);
|
||||
|
||||
/**
|
||||
* 批量删除羊舍管理
|
||||
*
|
||||
* @param ids 需要删除的羊舍管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除羊舍管理信息
|
||||
*
|
||||
* @param id 羊舍管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.sheepfold_management.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheepfold_management.mapper.DaSheepfoldMapper;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
|
||||
|
||||
/**
|
||||
* 羊舍管理Service业务层处理
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Service
|
||||
public class DaSheepfoldServiceImpl implements IDaSheepfoldService
|
||||
{
|
||||
@Autowired
|
||||
private DaSheepfoldMapper daSheepfoldMapper;
|
||||
|
||||
/**
|
||||
* 查询羊舍管理
|
||||
*
|
||||
* @param id 羊舍管理主键
|
||||
* @return 羊舍管理
|
||||
*/
|
||||
@Override
|
||||
public DaSheepfold selectDaSheepfoldById(Long id)
|
||||
{
|
||||
return daSheepfoldMapper.selectDaSheepfoldById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询羊舍管理列表
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 羊舍管理
|
||||
*/
|
||||
@Override
|
||||
public List<DaSheepfold> selectDaSheepfoldList(DaSheepfold daSheepfold)
|
||||
{
|
||||
return daSheepfoldMapper.selectDaSheepfoldList(daSheepfold);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊舍管理
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDaSheepfold(DaSheepfold daSheepfold)
|
||||
{
|
||||
return daSheepfoldMapper.insertDaSheepfold(daSheepfold);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊舍管理
|
||||
*
|
||||
* @param daSheepfold 羊舍管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDaSheepfold(DaSheepfold daSheepfold)
|
||||
{
|
||||
return daSheepfoldMapper.updateDaSheepfold(daSheepfold);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除羊舍管理
|
||||
*
|
||||
* @param ids 需要删除的羊舍管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDaSheepfoldByIds(Long[] ids)
|
||||
{
|
||||
return daSheepfoldMapper.deleteDaSheepfoldByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊舍管理信息
|
||||
*
|
||||
* @param id 羊舍管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDaSheepfoldById(Long id)
|
||||
{
|
||||
return daSheepfoldMapper.deleteDaSheepfoldById(id);
|
||||
}
|
||||
}
|
@ -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.sheep_file.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="soureDate" column="soure_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, soure_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="soureDate != null "> and soure_date = #{soureDate}</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="soureDate != null">soure_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="soureDate != null">#{soureDate},</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="soureDate != null">soure_date = #{soureDate},</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>
|
@ -0,0 +1,81 @@
|
||||
<?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.sheepfold_management.mapper.DaSheepfoldMapper">
|
||||
|
||||
<resultMap type="DaSheepfold" id="DaSheepfoldResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="ranchId" column="ranch_id" />
|
||||
<result property="sheepfoldName" column="sheepfold_name" />
|
||||
<result property="sheepfoldTypeId" column="sheepfold_type_id" />
|
||||
<result property="sheepfoldNo" column="sheepfold_no" />
|
||||
<result property="rowNo" column="row_no" />
|
||||
<result property="columns" column="columns" />
|
||||
<result property="comment" column="comment" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDaSheepfoldVo">
|
||||
select id, ranch_id, sheepfold_name, sheepfold_type_id, sheepfold_no, row_no, columns, comment from da_sheepfold
|
||||
</sql>
|
||||
|
||||
<select id="selectDaSheepfoldList" parameterType="DaSheepfold" resultMap="DaSheepfoldResult">
|
||||
<include refid="selectDaSheepfoldVo"/>
|
||||
<where>
|
||||
<if test="ranchId != null "> and ranch_id = #{ranchId}</if>
|
||||
<if test="sheepfoldTypeId != null "> and sheepfold_type_id = #{sheepfoldTypeId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDaSheepfoldById" parameterType="Long" resultMap="DaSheepfoldResult">
|
||||
<include refid="selectDaSheepfoldVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDaSheepfold" parameterType="DaSheepfold" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into da_sheepfold
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ranchId != null">ranch_id,</if>
|
||||
<if test="sheepfoldName != null">sheepfold_name,</if>
|
||||
<if test="sheepfoldTypeId != null">sheepfold_type_id,</if>
|
||||
<if test="sheepfoldNo != null">sheepfold_no,</if>
|
||||
<if test="rowNo != null">row_no,</if>
|
||||
<if test="columns != null">columns,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ranchId != null">#{ranchId},</if>
|
||||
<if test="sheepfoldName != null">#{sheepfoldName},</if>
|
||||
<if test="sheepfoldTypeId != null">#{sheepfoldTypeId},</if>
|
||||
<if test="sheepfoldNo != null">#{sheepfoldNo},</if>
|
||||
<if test="rowNo != null">#{rowNo},</if>
|
||||
<if test="columns != null">#{columns},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDaSheepfold" parameterType="DaSheepfold">
|
||||
update da_sheepfold
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ranchId != null">ranch_id = #{ranchId},</if>
|
||||
<if test="sheepfoldName != null">sheepfold_name = #{sheepfoldName},</if>
|
||||
<if test="sheepfoldTypeId != null">sheepfold_type_id = #{sheepfoldTypeId},</if>
|
||||
<if test="sheepfoldNo != null">sheepfold_no = #{sheepfoldNo},</if>
|
||||
<if test="rowNo != null">row_no = #{rowNo},</if>
|
||||
<if test="columns != null">columns = #{columns},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDaSheepfoldById" parameterType="Long">
|
||||
delete from da_sheepfold where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDaSheepfoldByIds" parameterType="String">
|
||||
delete from da_sheepfold where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user