feat(module mapper): 注册"饲喂管理"组件
注册饲喂管理组件源码及其Mapper
This commit is contained in:
parent
8eedf3b3ff
commit
1898417264
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.feed.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.feed.domain.SgFeedDetails;
|
||||
import com.zhyc.module.feed.service.ISgFeedDetailsService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/details")
|
||||
public class SgFeedDetailsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFeedDetailsService sgFeedDetailsService;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedDetails> list = sgFeedDetailsService.selectSgFeedDetailsList(sgFeedDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂记录详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:export')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
List<SgFeedDetails> list = sgFeedDetailsService.selectSgFeedDetailsList(sgFeedDetails);
|
||||
ExcelUtil<SgFeedDetails> util = new ExcelUtil<SgFeedDetails>(SgFeedDetails.class);
|
||||
util.exportExcel(response, list, "饲喂记录详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂记录详情详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFeedDetailsService.selectSgFeedDetailsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:add')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return toAjax(sgFeedDetailsService.insertSgFeedDetails(sgFeedDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:edit')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return toAjax(sgFeedDetailsService.updateSgFeedDetails(sgFeedDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:remove')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFeedDetailsService.deleteSgFeedDetailsByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.feed.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.feed.domain.SgFeedInfo;
|
||||
import com.zhyc.module.feed.service.ISgFeedInfoService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/info")
|
||||
public class SgFeedInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFeedInfoService sgFeedInfoService;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedInfo> list = sgFeedInfoService.selectSgFeedInfoList(sgFeedInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:export')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
List<SgFeedInfo> list = sgFeedInfoService.selectSgFeedInfoList(sgFeedInfo);
|
||||
ExcelUtil<SgFeedInfo> util = new ExcelUtil<SgFeedInfo>(SgFeedInfo.class);
|
||||
util.exportExcel(response, list, "饲喂记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFeedInfoService.selectSgFeedInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:add')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return toAjax(sgFeedInfoService.insertSgFeedInfo(sgFeedInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:edit')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return toAjax(sgFeedInfoService.updateSgFeedInfo(sgFeedInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:remove')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFeedInfoService.deleteSgFeedInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.feed.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.feed.domain.SgFeedRatio;
|
||||
import com.zhyc.module.feed.service.ISgFeedRatioService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂比例Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/ratio")
|
||||
public class SgFeedRatioController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFeedRatioService sgFeedRatioService;
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedRatio> list = sgFeedRatioService.selectSgFeedRatioList(sgFeedRatio);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂比例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:export')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
List<SgFeedRatio> list = sgFeedRatioService.selectSgFeedRatioList(sgFeedRatio);
|
||||
ExcelUtil<SgFeedRatio> util = new ExcelUtil<SgFeedRatio>(SgFeedRatio.class);
|
||||
util.exportExcel(response, list, "饲喂比例数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂比例详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFeedRatioService.selectSgFeedRatioById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:add')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return toAjax(sgFeedRatioService.insertSgFeedRatio(sgFeedRatio));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:edit')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return toAjax(sgFeedRatioService.updateSgFeedRatio(sgFeedRatio));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂比例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:remove')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFeedRatioService.deleteSgFeedRatioByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.feed.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.feed.domain.SgFodder;
|
||||
import com.zhyc.module.feed.service.ISgFodderService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 原料Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/fodder")
|
||||
public class SgFodderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFodderService sgFodderService;
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFodder sgFodder)
|
||||
{
|
||||
startPage();
|
||||
List<SgFodder> list = sgFodderService.selectSgFodderList(sgFodder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出原料列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:export')")
|
||||
@Log(title = "原料", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFodder sgFodder)
|
||||
{
|
||||
List<SgFodder> list = sgFodderService.selectSgFodderList(sgFodder);
|
||||
ExcelUtil<SgFodder> util = new ExcelUtil<SgFodder>(SgFodder.class);
|
||||
util.exportExcel(response, list, "原料数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取原料详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFodderService.selectSgFodderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:add')")
|
||||
@Log(title = "原料", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFodder sgFodder)
|
||||
{
|
||||
return toAjax(sgFodderService.insertSgFodder(sgFodder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:edit')")
|
||||
@Log(title = "原料", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFodder sgFodder)
|
||||
{
|
||||
return toAjax(sgFodderService.updateSgFodder(sgFodder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:remove')")
|
||||
@Log(title = "原料", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFodderService.deleteSgFodderByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.zhyc.module.feed.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;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情对象 sg_feed_details
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFeedDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 原料id */
|
||||
@Excel(name = "原料id")
|
||||
private String fodder;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long number;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String nuit;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setFodder(String fodder)
|
||||
{
|
||||
this.fodder = fodder;
|
||||
}
|
||||
|
||||
public String getFodder()
|
||||
{
|
||||
return fodder;
|
||||
}
|
||||
|
||||
public void setNumber(Long number)
|
||||
{
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Long getNumber()
|
||||
{
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNuit(String nuit)
|
||||
{
|
||||
this.nuit = nuit;
|
||||
}
|
||||
|
||||
public String getNuit()
|
||||
{
|
||||
return nuit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("fodder", getFodder())
|
||||
.append("number", getNumber())
|
||||
.append("nuit", getNuit())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,252 @@
|
||||
package com.zhyc.module.feed.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;
|
||||
|
||||
/**
|
||||
* 饲喂记录对象 sg_feed_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFeedInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 配方编码 */
|
||||
@Excel(name = "配方编码")
|
||||
private Long formulaId;
|
||||
|
||||
/** 羊舍 */
|
||||
@Excel(name = "羊舍")
|
||||
private String sheepfoldId;
|
||||
|
||||
/** 日均计划量 */
|
||||
@Excel(name = "日均计划量")
|
||||
private Long average;
|
||||
|
||||
/** 早上计划量(通过饲喂比例算出来) */
|
||||
@Excel(name = "早上计划量(通过饲喂比例算出来)")
|
||||
private Long planMonring;
|
||||
|
||||
/** 实际添加(早) */
|
||||
@Excel(name = "实际添加", readConverterExp = "早=")
|
||||
private Long actualMonring;
|
||||
|
||||
/** 中午计划量 */
|
||||
@Excel(name = "中午计划量")
|
||||
private Long planNoon;
|
||||
|
||||
/** 实际添加(中) */
|
||||
@Excel(name = "实际添加", readConverterExp = "中=")
|
||||
private Long actualNoon;
|
||||
|
||||
/** 下午计划量 */
|
||||
@Excel(name = "下午计划量")
|
||||
private Long planEvenig;
|
||||
|
||||
/** 实际添加(下) */
|
||||
@Excel(name = "实际添加", readConverterExp = "下=")
|
||||
private Long actualEvening;
|
||||
|
||||
/** 颗粒原料 */
|
||||
@Excel(name = "颗粒原料")
|
||||
private Long particle;
|
||||
|
||||
/** 其他原料 */
|
||||
@Excel(name = "其他原料")
|
||||
private Long other;
|
||||
|
||||
/** 补饲饲料 */
|
||||
@Excel(name = "补饲饲料")
|
||||
private Long replenish;
|
||||
|
||||
/** 饲喂日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "饲喂日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date planDate;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setFormulaId(Long formulaId)
|
||||
{
|
||||
this.formulaId = formulaId;
|
||||
}
|
||||
|
||||
public Long getFormulaId()
|
||||
{
|
||||
return formulaId;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(String sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public String getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setAverage(Long average)
|
||||
{
|
||||
this.average = average;
|
||||
}
|
||||
|
||||
public Long getAverage()
|
||||
{
|
||||
return average;
|
||||
}
|
||||
|
||||
public void setPlanMonring(Long planMonring)
|
||||
{
|
||||
this.planMonring = planMonring;
|
||||
}
|
||||
|
||||
public Long getPlanMonring()
|
||||
{
|
||||
return planMonring;
|
||||
}
|
||||
|
||||
public void setActualMonring(Long actualMonring)
|
||||
{
|
||||
this.actualMonring = actualMonring;
|
||||
}
|
||||
|
||||
public Long getActualMonring()
|
||||
{
|
||||
return actualMonring;
|
||||
}
|
||||
|
||||
public void setPlanNoon(Long planNoon)
|
||||
{
|
||||
this.planNoon = planNoon;
|
||||
}
|
||||
|
||||
public Long getPlanNoon()
|
||||
{
|
||||
return planNoon;
|
||||
}
|
||||
|
||||
public void setActualNoon(Long actualNoon)
|
||||
{
|
||||
this.actualNoon = actualNoon;
|
||||
}
|
||||
|
||||
public Long getActualNoon()
|
||||
{
|
||||
return actualNoon;
|
||||
}
|
||||
|
||||
public void setPlanEvenig(Long planEvenig)
|
||||
{
|
||||
this.planEvenig = planEvenig;
|
||||
}
|
||||
|
||||
public Long getPlanEvenig()
|
||||
{
|
||||
return planEvenig;
|
||||
}
|
||||
|
||||
public void setActualEvening(Long actualEvening)
|
||||
{
|
||||
this.actualEvening = actualEvening;
|
||||
}
|
||||
|
||||
public Long getActualEvening()
|
||||
{
|
||||
return actualEvening;
|
||||
}
|
||||
|
||||
public void setParticle(Long particle)
|
||||
{
|
||||
this.particle = particle;
|
||||
}
|
||||
|
||||
public Long getParticle()
|
||||
{
|
||||
return particle;
|
||||
}
|
||||
|
||||
public void setOther(Long other)
|
||||
{
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
public Long getOther()
|
||||
{
|
||||
return other;
|
||||
}
|
||||
|
||||
public void setReplenish(Long replenish)
|
||||
{
|
||||
this.replenish = replenish;
|
||||
}
|
||||
|
||||
public Long getReplenish()
|
||||
{
|
||||
return replenish;
|
||||
}
|
||||
|
||||
public void setPlanDate(Date planDate)
|
||||
{
|
||||
this.planDate = planDate;
|
||||
}
|
||||
|
||||
public Date getPlanDate()
|
||||
{
|
||||
return planDate;
|
||||
}
|
||||
|
||||
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("formulaId", getFormulaId())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("average", getAverage())
|
||||
.append("planMonring", getPlanMonring())
|
||||
.append("actualMonring", getActualMonring())
|
||||
.append("planNoon", getPlanNoon())
|
||||
.append("actualNoon", getActualNoon())
|
||||
.append("planEvenig", getPlanEvenig())
|
||||
.append("actualEvening", getActualEvening())
|
||||
.append("particle", getParticle())
|
||||
.append("other", getOther())
|
||||
.append("replenish", getReplenish())
|
||||
.append("planDate", getPlanDate())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.zhyc.module.feed.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;
|
||||
|
||||
/**
|
||||
* 饲喂比例对象 sg_feed_ratio
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFeedRatio extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 早晨计划比列 */
|
||||
@Excel(name = "早晨计划比列")
|
||||
private String morning;
|
||||
|
||||
/** 中午计划比例 */
|
||||
@Excel(name = "中午计划比例")
|
||||
private String noon;
|
||||
|
||||
/** 下午计划比例 */
|
||||
@Excel(name = "下午计划比例")
|
||||
private String evening;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setMorning(String morning)
|
||||
{
|
||||
this.morning = morning;
|
||||
}
|
||||
|
||||
public String getMorning()
|
||||
{
|
||||
return morning;
|
||||
}
|
||||
|
||||
public void setNoon(String noon)
|
||||
{
|
||||
this.noon = noon;
|
||||
}
|
||||
|
||||
public String getNoon()
|
||||
{
|
||||
return noon;
|
||||
}
|
||||
|
||||
public void setEvening(String evening)
|
||||
{
|
||||
this.evening = evening;
|
||||
}
|
||||
|
||||
public String getEvening()
|
||||
{
|
||||
return evening;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("morning", getMorning())
|
||||
.append("noon", getNoon())
|
||||
.append("evening", getEvening())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.zhyc.module.feed.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;
|
||||
|
||||
/**
|
||||
* 原料对象 sg_fodder
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFodder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 0补饲饲料1配方原料2颗粒原料 */
|
||||
@Excel(name = "0补饲饲料1配方原料2颗粒原料")
|
||||
private Long fodderType;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setFodderType(Long fodderType)
|
||||
{
|
||||
this.fodderType = fodderType;
|
||||
}
|
||||
|
||||
public Long getFodderType()
|
||||
{
|
||||
return fodderType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("fodderType", getFodderType())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFeedDetailsMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
public SgFeedDetails selectSgFeedDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 饲喂记录详情集合
|
||||
*/
|
||||
public List<SgFeedDetails> selectSgFeedDetailsList(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFeedInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
public SgFeedInfo selectSgFeedInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 饲喂记录集合
|
||||
*/
|
||||
public List<SgFeedInfo> selectSgFeedInfoList(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
|
||||
/**
|
||||
* 饲喂比例Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFeedRatioMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
public SgFeedRatio selectSgFeedRatioById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 饲喂比例集合
|
||||
*/
|
||||
public List<SgFeedRatio> selectSgFeedRatioList(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 删除饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂比例
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
|
||||
/**
|
||||
* 原料Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFodderMapper
|
||||
{
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
public SgFodder selectSgFodderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 原料集合
|
||||
*/
|
||||
public List<SgFodder> selectSgFodderList(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 删除原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFeedDetailsService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
public SgFeedDetails selectSgFeedDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 饲喂记录详情集合
|
||||
*/
|
||||
public List<SgFeedDetails> selectSgFeedDetailsList(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录详情
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录详情主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情信息
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFeedInfoService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
public SgFeedInfo selectSgFeedInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 饲喂记录集合
|
||||
*/
|
||||
public List<SgFeedInfo> selectSgFeedInfoList(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录信息
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
|
||||
/**
|
||||
* 饲喂比例Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFeedRatioService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
public SgFeedRatio selectSgFeedRatioById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 饲喂比例集合
|
||||
*/
|
||||
public List<SgFeedRatio> selectSgFeedRatioList(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂比例
|
||||
*
|
||||
* @param ids 需要删除的饲喂比例主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除饲喂比例信息
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
|
||||
/**
|
||||
* 原料Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFodderService
|
||||
{
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
public SgFodder selectSgFodderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 原料集合
|
||||
*/
|
||||
public List<SgFodder> selectSgFodderList(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param ids 需要删除的原料主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除原料信息
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFeedDetailsMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
import com.zhyc.module.feed.service.ISgFeedDetailsService;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFeedDetailsServiceImpl implements ISgFeedDetailsService
|
||||
{
|
||||
@Autowired
|
||||
private SgFeedDetailsMapper sgFeedDetailsMapper;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
@Override
|
||||
public SgFeedDetails selectSgFeedDetailsById(Long id)
|
||||
{
|
||||
return sgFeedDetailsMapper.selectSgFeedDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedDetails> selectSgFeedDetailsList(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return sgFeedDetailsMapper.selectSgFeedDetailsList(sgFeedDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedDetails(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return sgFeedDetailsMapper.insertSgFeedDetails(sgFeedDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedDetails(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return sgFeedDetailsMapper.updateSgFeedDetails(sgFeedDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录详情
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedDetailsByIds(Long[] ids)
|
||||
{
|
||||
return sgFeedDetailsMapper.deleteSgFeedDetailsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情信息
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedDetailsById(Long id)
|
||||
{
|
||||
return sgFeedDetailsMapper.deleteSgFeedDetailsById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.zhyc.module.feed.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.feed.mapper.SgFeedInfoMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
import com.zhyc.module.feed.service.ISgFeedInfoService;
|
||||
|
||||
/**
|
||||
* 饲喂记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFeedInfoServiceImpl implements ISgFeedInfoService
|
||||
{
|
||||
@Autowired
|
||||
private SgFeedInfoMapper sgFeedInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
@Override
|
||||
public SgFeedInfo selectSgFeedInfoById(Long id)
|
||||
{
|
||||
return sgFeedInfoMapper.selectSgFeedInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedInfo> selectSgFeedInfoList(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return sgFeedInfoMapper.selectSgFeedInfoList(sgFeedInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedInfo(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
sgFeedInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return sgFeedInfoMapper.insertSgFeedInfo(sgFeedInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedInfo(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return sgFeedInfoMapper.updateSgFeedInfo(sgFeedInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedInfoByIds(Long[] ids)
|
||||
{
|
||||
return sgFeedInfoMapper.deleteSgFeedInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录信息
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedInfoById(Long id)
|
||||
{
|
||||
return sgFeedInfoMapper.deleteSgFeedInfoById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFeedRatioMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
import com.zhyc.module.feed.service.ISgFeedRatioService;
|
||||
|
||||
/**
|
||||
* 饲喂比例Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFeedRatioServiceImpl implements ISgFeedRatioService
|
||||
{
|
||||
@Autowired
|
||||
private SgFeedRatioMapper sgFeedRatioMapper;
|
||||
|
||||
/**
|
||||
* 查询饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
@Override
|
||||
public SgFeedRatio selectSgFeedRatioById(Long id)
|
||||
{
|
||||
return sgFeedRatioMapper.selectSgFeedRatioById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedRatio> selectSgFeedRatioList(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return sgFeedRatioMapper.selectSgFeedRatioList(sgFeedRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedRatio(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return sgFeedRatioMapper.insertSgFeedRatio(sgFeedRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedRatio(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return sgFeedRatioMapper.updateSgFeedRatio(sgFeedRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂比例
|
||||
*
|
||||
* @param ids 需要删除的饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedRatioByIds(Long[] ids)
|
||||
{
|
||||
return sgFeedRatioMapper.deleteSgFeedRatioByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂比例信息
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedRatioById(Long id)
|
||||
{
|
||||
return sgFeedRatioMapper.deleteSgFeedRatioById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFodderMapper;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
import com.zhyc.module.feed.service.ISgFodderService;
|
||||
|
||||
/**
|
||||
* 原料Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFodderServiceImpl implements ISgFodderService
|
||||
{
|
||||
@Autowired
|
||||
private SgFodderMapper sgFodderMapper;
|
||||
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
@Override
|
||||
public SgFodder selectSgFodderById(Long id)
|
||||
{
|
||||
return sgFodderMapper.selectSgFodderById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 原料
|
||||
*/
|
||||
@Override
|
||||
public List<SgFodder> selectSgFodderList(SgFodder sgFodder)
|
||||
{
|
||||
return sgFodderMapper.selectSgFodderList(sgFodder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFodder(SgFodder sgFodder)
|
||||
{
|
||||
return sgFodderMapper.insertSgFodder(sgFodder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFodder(SgFodder sgFodder)
|
||||
{
|
||||
return sgFodderMapper.updateSgFodder(sgFodder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param ids 需要删除的原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFodderByIds(Long[] ids)
|
||||
{
|
||||
return sgFodderMapper.deleteSgFodderByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原料信息
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFodderById(Long id)
|
||||
{
|
||||
return sgFodderMapper.deleteSgFodderById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
<?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.feed.mapper.SgFeedDetailsMapper">
|
||||
|
||||
<resultMap type="SgFeedDetails" id="SgFeedDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="fodder" column="fodder" />
|
||||
<result property="number" column="number" />
|
||||
<result property="nuit" column="nuit" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFeedDetailsVo">
|
||||
select id, fodder, number, nuit from sg_feed_details
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFeedDetailsList" parameterType="SgFeedDetails" resultMap="SgFeedDetailsResult">
|
||||
<include refid="selectSgFeedDetailsVo"/>
|
||||
<where>
|
||||
<if test="fodder != null and fodder != ''"> and fodder = #{fodder}</if>
|
||||
<if test="number != null "> and number = #{number}</if>
|
||||
<if test="nuit != null and nuit != ''"> and nuit = #{nuit}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFeedDetailsById" parameterType="Long" resultMap="SgFeedDetailsResult">
|
||||
<include refid="selectSgFeedDetailsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFeedDetails" parameterType="SgFeedDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sg_feed_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="fodder != null">fodder,</if>
|
||||
<if test="number != null">number,</if>
|
||||
<if test="nuit != null">nuit,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="fodder != null">#{fodder},</if>
|
||||
<if test="number != null">#{number},</if>
|
||||
<if test="nuit != null">#{nuit},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFeedDetails" parameterType="SgFeedDetails">
|
||||
update sg_feed_details
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="fodder != null">fodder = #{fodder},</if>
|
||||
<if test="number != null">number = #{number},</if>
|
||||
<if test="nuit != null">nuit = #{nuit},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFeedDetailsById" parameterType="Long">
|
||||
delete from sg_feed_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFeedDetailsByIds" parameterType="String">
|
||||
delete from sg_feed_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
129
zhyc-module/src/main/resources/mapper/feed/SgFeedInfoMapper.xml
Normal file
129
zhyc-module/src/main/resources/mapper/feed/SgFeedInfoMapper.xml
Normal file
@ -0,0 +1,129 @@
|
||||
<?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.feed.mapper.SgFeedInfoMapper">
|
||||
|
||||
<resultMap type="SgFeedInfo" id="SgFeedInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="formulaId" column="formula_id" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="average" column="average" />
|
||||
<result property="planMonring" column="plan_monring" />
|
||||
<result property="actualMonring" column="actual_monring" />
|
||||
<result property="planNoon" column="plan_noon" />
|
||||
<result property="actualNoon" column="actual_noon" />
|
||||
<result property="planEvenig" column="plan_evenig" />
|
||||
<result property="actualEvening" column="actual_evening" />
|
||||
<result property="particle" column="particle" />
|
||||
<result property="other" column="other" />
|
||||
<result property="replenish" column="replenish" />
|
||||
<result property="planDate" column="plan_date" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFeedInfoVo">
|
||||
select id, formula_id, sheepfold_id, average, plan_monring, actual_monring, plan_noon, actual_noon, plan_evenig, actual_evening, particle, other, replenish, plan_date, comment, create_by, create_time from sg_feed_info
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFeedInfoList" parameterType="SgFeedInfo" resultMap="SgFeedInfoResult">
|
||||
<include refid="selectSgFeedInfoVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null "> and formula_id = #{formulaId}</if>
|
||||
<if test="sheepfoldId != null and sheepfoldId != ''"> and sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="average != null "> and average = #{average}</if>
|
||||
<if test="planMonring != null "> and plan_monring = #{planMonring}</if>
|
||||
<if test="actualMonring != null "> and actual_monring = #{actualMonring}</if>
|
||||
<if test="planNoon != null "> and plan_noon = #{planNoon}</if>
|
||||
<if test="actualNoon != null "> and actual_noon = #{actualNoon}</if>
|
||||
<if test="planEvenig != null "> and plan_evenig = #{planEvenig}</if>
|
||||
<if test="actualEvening != null "> and actual_evening = #{actualEvening}</if>
|
||||
<if test="particle != null "> and particle = #{particle}</if>
|
||||
<if test="other != null "> and other = #{other}</if>
|
||||
<if test="replenish != null "> and replenish = #{replenish}</if>
|
||||
<if test="planDate != null "> and plan_date = #{planDate}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFeedInfoById" parameterType="Long" resultMap="SgFeedInfoResult">
|
||||
<include refid="selectSgFeedInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFeedInfo" parameterType="SgFeedInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sg_feed_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="formulaId != null">formula_id,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="average != null">average,</if>
|
||||
<if test="planMonring != null">plan_monring,</if>
|
||||
<if test="actualMonring != null">actual_monring,</if>
|
||||
<if test="planNoon != null">plan_noon,</if>
|
||||
<if test="actualNoon != null">actual_noon,</if>
|
||||
<if test="planEvenig != null">plan_evenig,</if>
|
||||
<if test="actualEvening != null">actual_evening,</if>
|
||||
<if test="particle != null">particle,</if>
|
||||
<if test="other != null">other,</if>
|
||||
<if test="replenish != null">replenish,</if>
|
||||
<if test="planDate != null">plan_date,</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="formulaId != null">#{formulaId},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="average != null">#{average},</if>
|
||||
<if test="planMonring != null">#{planMonring},</if>
|
||||
<if test="actualMonring != null">#{actualMonring},</if>
|
||||
<if test="planNoon != null">#{planNoon},</if>
|
||||
<if test="actualNoon != null">#{actualNoon},</if>
|
||||
<if test="planEvenig != null">#{planEvenig},</if>
|
||||
<if test="actualEvening != null">#{actualEvening},</if>
|
||||
<if test="particle != null">#{particle},</if>
|
||||
<if test="other != null">#{other},</if>
|
||||
<if test="replenish != null">#{replenish},</if>
|
||||
<if test="planDate != null">#{planDate},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFeedInfo" parameterType="SgFeedInfo">
|
||||
update sg_feed_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formulaId != null">formula_id = #{formulaId},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="average != null">average = #{average},</if>
|
||||
<if test="planMonring != null">plan_monring = #{planMonring},</if>
|
||||
<if test="actualMonring != null">actual_monring = #{actualMonring},</if>
|
||||
<if test="planNoon != null">plan_noon = #{planNoon},</if>
|
||||
<if test="actualNoon != null">actual_noon = #{actualNoon},</if>
|
||||
<if test="planEvenig != null">plan_evenig = #{planEvenig},</if>
|
||||
<if test="actualEvening != null">actual_evening = #{actualEvening},</if>
|
||||
<if test="particle != null">particle = #{particle},</if>
|
||||
<if test="other != null">other = #{other},</if>
|
||||
<if test="replenish != null">replenish = #{replenish},</if>
|
||||
<if test="planDate != null">plan_date = #{planDate},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFeedInfoById" parameterType="Long">
|
||||
delete from sg_feed_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFeedInfoByIds" parameterType="String">
|
||||
delete from sg_feed_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,66 @@
|
||||
<?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.feed.mapper.SgFeedRatioMapper">
|
||||
|
||||
<resultMap type="SgFeedRatio" id="SgFeedRatioResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="morning" column="morning" />
|
||||
<result property="noon" column="noon" />
|
||||
<result property="evening" column="evening" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFeedRatioVo">
|
||||
select id, morning, noon, evening from sg_feed_ratio
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFeedRatioList" parameterType="SgFeedRatio" resultMap="SgFeedRatioResult">
|
||||
<include refid="selectSgFeedRatioVo"/>
|
||||
<where>
|
||||
<if test="morning != null and morning != ''"> and morning = #{morning}</if>
|
||||
<if test="noon != null and noon != ''"> and noon = #{noon}</if>
|
||||
<if test="evening != null and evening != ''"> and evening = #{evening}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFeedRatioById" parameterType="Long" resultMap="SgFeedRatioResult">
|
||||
<include refid="selectSgFeedRatioVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFeedRatio" parameterType="SgFeedRatio" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sg_feed_ratio
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="morning != null">morning,</if>
|
||||
<if test="noon != null">noon,</if>
|
||||
<if test="evening != null">evening,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="morning != null">#{morning},</if>
|
||||
<if test="noon != null">#{noon},</if>
|
||||
<if test="evening != null">#{evening},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFeedRatio" parameterType="SgFeedRatio">
|
||||
update sg_feed_ratio
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="morning != null">morning = #{morning},</if>
|
||||
<if test="noon != null">noon = #{noon},</if>
|
||||
<if test="evening != null">evening = #{evening},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFeedRatioById" parameterType="Long">
|
||||
delete from sg_feed_ratio where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFeedRatioByIds" parameterType="String">
|
||||
delete from sg_feed_ratio where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,61 @@
|
||||
<?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.feed.mapper.SgFodderMapper">
|
||||
|
||||
<resultMap type="SgFodder" id="SgFodderResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="fodderType" column="fodder_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFodderVo">
|
||||
select id, name, fodder_type from sg_fodder
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFodderList" parameterType="SgFodder" resultMap="SgFodderResult">
|
||||
<include refid="selectSgFodderVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="fodderType != null "> and fodder_type = #{fodderType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFodderById" parameterType="Long" resultMap="SgFodderResult">
|
||||
<include refid="selectSgFodderVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFodder" parameterType="SgFodder" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sg_fodder
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="fodderType != null">fodder_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="fodderType != null">#{fodderType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFodder" parameterType="SgFodder">
|
||||
update sg_fodder
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="fodderType != null">fodder_type = #{fodderType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFodderById" parameterType="Long">
|
||||
delete from sg_fodder where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFodderByIds" parameterType="String">
|
||||
delete from sg_fodder where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user