Compare commits
3 Commits
07468b9c00
...
e965c9c35c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e965c9c35c | ||
![]() |
3b527145d3 | ||
![]() |
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,107 @@
|
||||
package com.zhyc.module.feed.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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.SgFeedPlan;
|
||||
import com.zhyc.module.feed.service.ISgFeedPlanService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂计划Controller
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/FeedPlan")
|
||||
public class SgFeedPlanController extends BaseController
|
||||
{
|
||||
private final ISgFeedPlanService sgFeedPlanService;
|
||||
|
||||
public SgFeedPlanController(ISgFeedPlanService sgFeedPlanService) {
|
||||
this.sgFeedPlanService = sgFeedPlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedPlan> list = sgFeedPlanService.selectSgFeedPlanList(sgFeedPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:export')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
List<SgFeedPlan> list = sgFeedPlanService.selectSgFeedPlanList(sgFeedPlan);
|
||||
ExcelUtil<SgFeedPlan> util = new ExcelUtil<>(SgFeedPlan.class);
|
||||
util.exportExcel(response, list, "饲喂计划数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂计划详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:query')")
|
||||
@GetMapping(value = "/{createDate}")
|
||||
public AjaxResult getInfo(@PathVariable("createDate") Date createDate)
|
||||
{
|
||||
return success(sgFeedPlanService.selectSgFeedPlanByCreateDate(createDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:add')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
return toAjax(sgFeedPlanService.insertSgFeedPlan(sgFeedPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:edit')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
return toAjax(sgFeedPlanService.updateSgFeedPlan(sgFeedPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:remove')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{createDates}")
|
||||
public AjaxResult remove(@PathVariable Date[] createDates)
|
||||
{
|
||||
return toAjax(sgFeedPlanService.deleteSgFeedPlanByCreateDates(createDates));
|
||||
}
|
||||
}
|
@ -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,106 @@
|
||||
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.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.SgFormulaList;
|
||||
import com.zhyc.module.feed.service.ISgFormulaListService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 配方列表Controller
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/FormulaList")
|
||||
public class SgFormulaListController extends BaseController
|
||||
{
|
||||
private final ISgFormulaListService sgFormulaListService;
|
||||
|
||||
public SgFormulaListController(ISgFormulaListService sgFormulaListService) {
|
||||
this.sgFormulaListService = sgFormulaListService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配方列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaList:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFormulaList sgFormulaList)
|
||||
{
|
||||
startPage();
|
||||
List<SgFormulaList> list = sgFormulaListService.selectSgFormulaListList(sgFormulaList);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配方列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaList:export')")
|
||||
@Log(title = "配方列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFormulaList sgFormulaList)
|
||||
{
|
||||
List<SgFormulaList> list = sgFormulaListService.selectSgFormulaListList(sgFormulaList);
|
||||
ExcelUtil<SgFormulaList> util = new ExcelUtil<>(SgFormulaList.class);
|
||||
util.exportExcel(response, list, "配方列表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配方列表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaList:query')")
|
||||
@GetMapping(value = "/{code}")
|
||||
public AjaxResult getInfo(@PathVariable("code") Long code)
|
||||
{
|
||||
return success(sgFormulaListService.selectSgFormulaListByCode(code));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配方列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaList:add')")
|
||||
@Log(title = "配方列表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFormulaList sgFormulaList)
|
||||
{
|
||||
return toAjax(sgFormulaListService.insertSgFormulaList(sgFormulaList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配方列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaList:edit')")
|
||||
@Log(title = "配方列表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFormulaList sgFormulaList)
|
||||
{
|
||||
return toAjax(sgFormulaListService.updateSgFormulaList(sgFormulaList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配方列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaList:remove')")
|
||||
@Log(title = "配方列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{codes}")
|
||||
public AjaxResult remove(@PathVariable Long[] codes)
|
||||
{
|
||||
return toAjax(sgFormulaListService.deleteSgFormulaListByCodes(codes));
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
package com.zhyc.module.feed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.feed.domain.SgFormulaList;
|
||||
import com.zhyc.module.feed.service.ISgFormulaListService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
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.SgFormulaManagement;
|
||||
import com.zhyc.module.feed.service.ISgFormulaManagementService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 配方管理Controller
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/FormulaManagement")
|
||||
public class SgFormulaManagementController extends BaseController {
|
||||
private final ISgFormulaManagementService sgFormulaManagementService;
|
||||
private final ISgFormulaListService sgFormulaListService;
|
||||
|
||||
public SgFormulaManagementController(ISgFormulaManagementService sgFormulaManagementService, ISgFormulaListService sgFormulaListService) {
|
||||
this.sgFormulaManagementService = sgFormulaManagementService;
|
||||
this.sgFormulaListService = sgFormulaListService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配方管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaManagement:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFormulaManagement sgFormulaManagement) {
|
||||
startPage();
|
||||
// 非查询详情时设定BatchId为0查询配方模板
|
||||
if (null != sgFormulaManagement && !Objects.equals(sgFormulaManagement.getQueryType(), "query")) {
|
||||
sgFormulaManagement.setBatchId("0");
|
||||
}
|
||||
List<SgFormulaManagement> FormulaManagement = sgFormulaManagementService.selectSgFormulaManagementList(sgFormulaManagement);
|
||||
for (SgFormulaManagement sgFormulaManagementItem : FormulaManagement) {
|
||||
SgFormulaManagement query = new SgFormulaManagement();
|
||||
query.setFormulaId(sgFormulaManagementItem.getFormulaId());
|
||||
query.setQueryType("Sub");
|
||||
List<SgFormulaManagement> subFormula = sgFormulaManagementService.selectSgFormulaManagementList(query);
|
||||
sgFormulaManagementItem.setSubFormulaList(subFormula);
|
||||
}
|
||||
return getDataTable(FormulaManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配方管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaManagement:export')")
|
||||
@Log(title = "配方管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFormulaManagement sgFormulaManagement) {
|
||||
List<SgFormulaManagement> list = sgFormulaManagementService.selectSgFormulaManagementList(sgFormulaManagement);
|
||||
ExcelUtil<SgFormulaManagement> util = new ExcelUtil<>(SgFormulaManagement.class);
|
||||
util.exportExcel(response, list, "配方管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取配方管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaManagement:query')")
|
||||
@GetMapping(value = "/{formulaId}")
|
||||
public AjaxResult getInfo(@PathVariable("formulaId") String formulaId) {
|
||||
return success(sgFormulaManagementService.selectSgFormulaManagementByFormulaId(formulaId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配方管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaManagement:add')")
|
||||
@Log(title = "配方管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult add(@RequestBody SgFormulaManagement sgFormulaManagement) {
|
||||
if (null == sgFormulaManagement)
|
||||
throw new RuntimeException("ERROR: 数据为空");
|
||||
if (Objects.equals(sgFormulaManagement.getBatchId(), "0")) {
|
||||
SgFormulaManagement exist = sgFormulaManagementService.selectSgFormulaManagementByFormulaId(sgFormulaManagement.getFormulaId());
|
||||
if (exist != null) {
|
||||
throw new RuntimeException("WARNING: 配方编码重复,录入失败");
|
||||
}
|
||||
} else {
|
||||
SgFormulaManagement exist = new SgFormulaManagement();
|
||||
exist.setFormulaId(sgFormulaManagement.getFormulaId());
|
||||
exist.setBatchId(sgFormulaManagement.getBatchId());
|
||||
if (!sgFormulaManagementService.selectSgFormulaManagementList(exist).isEmpty()) {
|
||||
throw new RuntimeException("WARNING: 批号重复,录入失败");
|
||||
}
|
||||
}
|
||||
List<SgFormulaList> sgFormulaList = sgFormulaManagement.getSgFormulaList();
|
||||
for (SgFormulaList sgFormulaListItem : sgFormulaList) {
|
||||
// 前端引用模板数据时会引用主键Code,在插入前置为空
|
||||
sgFormulaListItem.setCode(null);
|
||||
sgFormulaListItem.setFormulaId(sgFormulaManagement.getFormulaId());
|
||||
sgFormulaListItem.setBatchId(sgFormulaManagement.getBatchId());
|
||||
sgFormulaListService.insertSgFormulaList(sgFormulaListItem);
|
||||
}
|
||||
return toAjax(sgFormulaManagementService.insertSgFormulaManagement(sgFormulaManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配方管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaManagement:edit')")
|
||||
@Log(title = "配方管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult edit(@RequestBody SgFormulaManagement sgFormulaManagement) {
|
||||
List<SgFormulaList> sgFormulaList = sgFormulaManagement.getSgFormulaList();
|
||||
if (null != sgFormulaManagement.getFormulaId() && null != sgFormulaManagement.getBatchId()) {
|
||||
SgFormulaList delete = new SgFormulaList();
|
||||
delete.setFormulaId(sgFormulaManagement.getFormulaId());
|
||||
delete.setBatchId(sgFormulaManagement.getBatchId());
|
||||
sgFormulaListService.deleteSgFormulaListByFormulaIdAndBatchId(delete);
|
||||
} else {
|
||||
throw new RuntimeException("FormulaID & BatchID不能为空");
|
||||
}
|
||||
|
||||
// 配方表同步更新
|
||||
for (SgFormulaList sgFormulaListItem : sgFormulaList) {
|
||||
sgFormulaListItem.setBatchId(sgFormulaManagement.getBatchId());
|
||||
sgFormulaListItem.setFormulaId(sgFormulaManagement.getFormulaId());
|
||||
sgFormulaListService.insertSgFormulaList(sgFormulaListItem);
|
||||
}
|
||||
return toAjax(sgFormulaManagementService.updateSgFormulaManagement(sgFormulaManagement));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配方管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FormulaManagement:remove')")
|
||||
@Log(title = "配方管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{formulaId}/{batchId}")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult remove(@PathVariable String formulaId, @PathVariable String batchId) {
|
||||
SgFormulaManagement sgFormulaManagement = new SgFormulaManagement();
|
||||
sgFormulaManagement.setFormulaId(formulaId);
|
||||
sgFormulaManagement.setBatchId(batchId);
|
||||
if (sgFormulaManagement.getBatchId().equals("0")) {
|
||||
sgFormulaManagement.setBatchId(null);
|
||||
List<SgFormulaManagement> list = sgFormulaManagementService.selectSgFormulaManagementList(sgFormulaManagement);
|
||||
if (list.size() > 1) {
|
||||
throw new RuntimeException("WARNING 该配方正被使用,无法删除");
|
||||
}
|
||||
sgFormulaManagement.setBatchId(batchId);
|
||||
}
|
||||
// 前置检查完毕 执行删除
|
||||
sgFormulaManagement.setBatchId(batchId);
|
||||
return toAjax(sgFormulaManagementService.deleteSgFormulaManagement(sgFormulaManagement));
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
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.SgMaterial;
|
||||
import com.zhyc.module.feed.service.ISgMaterialService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 原料Controller
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/material")
|
||||
public class SgMaterialController extends BaseController
|
||||
{
|
||||
private final ISgMaterialService sgMaterialService;
|
||||
|
||||
public SgMaterialController(ISgMaterialService sgMaterialService) {
|
||||
this.sgMaterialService = sgMaterialService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:material:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgMaterial sgMaterial)
|
||||
{
|
||||
startPage();
|
||||
List<SgMaterial> list = sgMaterialService.selectSgMaterialList(sgMaterial);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出原料列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:material:export')")
|
||||
@Log(title = "原料", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgMaterial sgMaterial)
|
||||
{
|
||||
List<SgMaterial> list = sgMaterialService.selectSgMaterialList(sgMaterial);
|
||||
ExcelUtil<SgMaterial> util = new ExcelUtil<>(SgMaterial.class);
|
||||
util.exportExcel(response, list, "原料数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取原料详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:material:query')")
|
||||
@GetMapping(value = "/{materialId}")
|
||||
public AjaxResult getInfo(@PathVariable("materialId") String materialId)
|
||||
{
|
||||
return success(sgMaterialService.selectSgMaterialByMaterialId(materialId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:material:add')")
|
||||
@Log(title = "原料", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgMaterial sgMaterial)
|
||||
{
|
||||
return toAjax(sgMaterialService.insertSgMaterial(sgMaterial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:material:edit')")
|
||||
@Log(title = "原料", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgMaterial sgMaterial)
|
||||
{
|
||||
return toAjax(sgMaterialService.updateSgMaterial(sgMaterial));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:material:remove')")
|
||||
@Log(title = "原料", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{materialIds}")
|
||||
public AjaxResult remove(@PathVariable String[] materialIds)
|
||||
{
|
||||
return toAjax(sgMaterialService.deleteSgMaterialByMaterialIds(materialIds));
|
||||
}
|
||||
}
|
@ -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,132 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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_plan
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class SgFeedPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 创建日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
|
||||
/** 配方编码 */
|
||||
@Excel(name = "配方编码")
|
||||
private String formulaId;
|
||||
|
||||
/** 羊舍 */
|
||||
@Excel(name = "羊舍")
|
||||
private Long sheepHouseId;
|
||||
|
||||
/** 羊只数量 */
|
||||
@Excel(name = "羊只数量")
|
||||
private Long sheepCount;
|
||||
|
||||
/** 日均计划量 */
|
||||
@Excel(name = "日均计划量")
|
||||
private Long planDailySize;
|
||||
|
||||
/** 计划量(早) */
|
||||
@Excel(name = "计划量(早)")
|
||||
private Long planMorningSize;
|
||||
|
||||
/** 计划总量(早) */
|
||||
@Excel(name = "计划总量(早)")
|
||||
private Long planMorningTotal;
|
||||
|
||||
/** 饲喂比例(早) */
|
||||
@Excel(name = "饲喂比例(早)")
|
||||
private Long ratioMorning;
|
||||
|
||||
/** 实际量(早) */
|
||||
@Excel(name = "实际量(早)")
|
||||
private Long actualMorningSize;
|
||||
|
||||
/** 计划量(中) */
|
||||
@Excel(name = "计划量(中)")
|
||||
private Long planNoonSize;
|
||||
|
||||
/** 计划总量(中) */
|
||||
@Excel(name = "计划总量(中)")
|
||||
private Long planNoonTotal;
|
||||
|
||||
/** 实际量(中) */
|
||||
@Excel(name = "实际量(中)")
|
||||
private Long actualNoonSize;
|
||||
|
||||
/** 饲喂比例(中) */
|
||||
@Excel(name = "饲喂比例(中)")
|
||||
private Long ratioNoon;
|
||||
|
||||
/** 计划量(下) */
|
||||
@Excel(name = "计划量(下)")
|
||||
private Long planAfternoonSize;
|
||||
|
||||
/** 计划总量(下) */
|
||||
@Excel(name = "计划总量(下)")
|
||||
private Long planAfternoonTotal;
|
||||
|
||||
/** 实际量(下) */
|
||||
@Excel(name = "实际量(下)")
|
||||
private Long actualAfternoonSize;
|
||||
|
||||
/** 饲喂比例(下) */
|
||||
@Excel(name = "饲喂比例(下)")
|
||||
private Long ratioAfternoon;
|
||||
|
||||
/** 计划饲喂总量 */
|
||||
@Excel(name = "计划饲喂总量")
|
||||
private Long planFeedTotal;
|
||||
|
||||
/** 饲草班人员 */
|
||||
@Excel(name = "饲草班人员")
|
||||
private String zookeeper;
|
||||
|
||||
/** 饲喂计划日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "饲喂计划日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date planDate;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("createDate", getCreateDate())
|
||||
.append("formulaId", getFormulaId())
|
||||
.append("sheepHouseId", getSheepHouseId())
|
||||
.append("sheepCount", getSheepCount())
|
||||
.append("planDailySize", getPlanDailySize())
|
||||
.append("planMorningSize", getPlanMorningSize())
|
||||
.append("planMorningTotal", getPlanMorningTotal())
|
||||
.append("ratioMorning", getRatioMorning())
|
||||
.append("actualMorningSize", getActualMorningSize())
|
||||
.append("planNoonSize", getPlanNoonSize())
|
||||
.append("planNoonTotal", getPlanNoonTotal())
|
||||
.append("actualNoonSize", getActualNoonSize())
|
||||
.append("ratioNoon", getRatioNoon())
|
||||
.append("planAfternoonSize", getPlanAfternoonSize())
|
||||
.append("planAfternoonTotal", getPlanAfternoonTotal())
|
||||
.append("actualAfternoonSize", getActualAfternoonSize())
|
||||
.append("ratioAfternoon", getRatioAfternoon())
|
||||
.append("planFeedTotal", getPlanFeedTotal())
|
||||
.append("zookeeper", getZookeeper())
|
||||
.append("planDate", getPlanDate())
|
||||
.append("remark", getRemark())
|
||||
.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,62 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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_formula_list
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class SgFormulaList extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 序号 */
|
||||
private Long code;
|
||||
|
||||
/** 配方编号 */
|
||||
private String formulaId;
|
||||
|
||||
/** 配方编号 */
|
||||
private String batchId;
|
||||
/** 原料编号 */
|
||||
@Excel(name = "原料编号")
|
||||
private String materialId;
|
||||
|
||||
/** 原料名称 */
|
||||
@Excel(name = "原料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 比例 */
|
||||
@Excel(name = "比例")
|
||||
private Long ratio;
|
||||
|
||||
/** 颗粒原料 */
|
||||
@Excel(name = "颗粒原料")
|
||||
private String isGranular;
|
||||
|
||||
/** 补饲 */
|
||||
@Excel(name = "补饲")
|
||||
private String isSupplement;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("code", getCode())
|
||||
.append("formulaId", getFormulaId())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("ratio", getRatio())
|
||||
.append("isGranular", getIsGranular())
|
||||
.append("isSupplement", getIsSupplement())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
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_formula_management
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class SgFormulaManagement extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 配方编号 */
|
||||
private String formulaId;
|
||||
|
||||
/** 饲养阶段 */
|
||||
@Excel(name = "饲养阶段")
|
||||
private String feedStage;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
private String batchId;
|
||||
|
||||
/** 开始使用时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始使用时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date useStartDate;
|
||||
|
||||
/** 结束使用时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束使用时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date useEndDate;
|
||||
|
||||
/** 使用状态 */
|
||||
@Excel(name = "使用状态")
|
||||
private String useState;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 配方列表 */
|
||||
private List<SgFormulaList> sgFormulaList;
|
||||
|
||||
/** 子配方 */
|
||||
private List<SgFormulaManagement> subFormulaList;
|
||||
|
||||
/** 查询类型 *
|
||||
* Sub : 子配方查询
|
||||
* query : 类型查询
|
||||
* */
|
||||
private String queryType;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("formulaId", getFormulaId())
|
||||
.append("feedStage", getFeedStage())
|
||||
.append("batchId", getBatchId())
|
||||
.append("useStartDate", getUseStartDate())
|
||||
.append("useEndDate", getUseEndDate())
|
||||
.append("useState", getUseState())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
public class SgMaterial extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String materialId;
|
||||
private String materialName;
|
||||
private String isGranular;
|
||||
}
|
@ -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,64 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedPlan;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 饲喂计划Mapper接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
*/
|
||||
@Mapper
|
||||
public interface SgFeedPlanMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂计划
|
||||
*
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 饲喂计划
|
||||
*/
|
||||
SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
/**
|
||||
* 查询饲喂计划列表
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 饲喂计划集合
|
||||
*/
|
||||
List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 新增饲喂计划
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 修改饲喂计划
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 删除饲喂计划
|
||||
*
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂计划
|
||||
*
|
||||
* @param createDates 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDates(Date[] createDates);
|
||||
}
|
@ -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,71 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFormulaList;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 配方列表Mapper接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@Mapper
|
||||
public interface SgFormulaListMapper
|
||||
{
|
||||
/**
|
||||
* 查询配方列表
|
||||
*
|
||||
* @param code 配方列表主键
|
||||
* @return 配方列表
|
||||
*/
|
||||
SgFormulaList selectSgFormulaListByCode(Long code);
|
||||
|
||||
/**
|
||||
* 查询配方列表列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 配方列表集合
|
||||
*/
|
||||
List<SgFormulaList> selectSgFormulaListList(SgFormulaList sgFormulaList);
|
||||
|
||||
/**
|
||||
* 新增配方列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFormulaList(SgFormulaList sgFormulaList);
|
||||
|
||||
/**
|
||||
* 修改配方列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFormulaList(SgFormulaList sgFormulaList);
|
||||
|
||||
/**
|
||||
* 删除配方列表
|
||||
*
|
||||
* @param code 配方列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaListByCode(Long code);
|
||||
|
||||
/**
|
||||
* 批量删除配方列表
|
||||
*
|
||||
* @param codes 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaListByCodes(Long[] codes);
|
||||
|
||||
/**
|
||||
* 批量删除配方列表
|
||||
*
|
||||
* @param sgFormulaList 参数实体
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaListByFormulaIdAndBatchId(SgFormulaList sgFormulaList);
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFormulaManagement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 配方管理Mapper接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@Mapper
|
||||
public interface SgFormulaManagementMapper
|
||||
{
|
||||
/**
|
||||
* 查询配方管理
|
||||
*
|
||||
* @param formulaId 配方管理主键
|
||||
* @return 配方管理
|
||||
*/
|
||||
SgFormulaManagement selectSgFormulaManagementByFormulaId(String formulaId);
|
||||
|
||||
/**
|
||||
* 查询配方管理列表
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 配方管理集合
|
||||
*/
|
||||
List<SgFormulaManagement> selectSgFormulaManagementList(SgFormulaManagement sgFormulaManagement);
|
||||
|
||||
/**
|
||||
* 新增配方管理
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFormulaManagement(SgFormulaManagement sgFormulaManagement);
|
||||
|
||||
/**
|
||||
* 修改配方管理
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFormulaManagement(SgFormulaManagement sgFormulaManagement);
|
||||
|
||||
/**
|
||||
* 删除配方管理
|
||||
*
|
||||
* @param formulaId 配方管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaManagementByFormulaId(String formulaId);
|
||||
|
||||
/**
|
||||
* 批量删除配方管理
|
||||
*
|
||||
* @param formulaIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaManagementByFormulaIds(String[] formulaIds);
|
||||
|
||||
int deleteSgFormulaManagement(SgFormulaManagement sgFormulaManagement);
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgMaterial;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 原料Mapper接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface SgMaterialMapper
|
||||
{
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param materialId 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
public SgMaterial selectSgMaterialByMaterialId(String materialId);
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 原料集合
|
||||
*/
|
||||
public List<SgMaterial> selectSgMaterialList(SgMaterial sgMaterial);
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgMaterial(SgMaterial sgMaterial);
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgMaterial(SgMaterial sgMaterial);
|
||||
|
||||
/**
|
||||
* 删除原料
|
||||
*
|
||||
* @param materialId 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgMaterialByMaterialId(String materialId);
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param materialIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgMaterialByMaterialIds(String[] materialIds);
|
||||
}
|
@ -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,62 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedPlan;
|
||||
|
||||
/**
|
||||
* 饲喂计划Service接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
*/
|
||||
public interface ISgFeedPlanService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂计划
|
||||
*
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 饲喂计划
|
||||
*/
|
||||
SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
/**
|
||||
* 查询饲喂计划列表
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 饲喂计划集合
|
||||
*/
|
||||
List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 新增饲喂计划
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 修改饲喂计划
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂计划
|
||||
*
|
||||
* @param createDates 需要删除的饲喂计划主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDates(Date[] createDates);
|
||||
|
||||
/**
|
||||
* 删除饲喂计划信息
|
||||
*
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDate(Date createDate);
|
||||
}
|
@ -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,63 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFormulaList;
|
||||
|
||||
/**
|
||||
* 配方列表Service接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
public interface ISgFormulaListService
|
||||
{
|
||||
/**
|
||||
* 查询配方列表
|
||||
*
|
||||
* @param code 配方列表主键
|
||||
* @return 配方列表
|
||||
*/
|
||||
SgFormulaList selectSgFormulaListByCode(Long code);
|
||||
|
||||
/**
|
||||
* 查询配方列表列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 配方列表集合
|
||||
*/
|
||||
List<SgFormulaList> selectSgFormulaListList(SgFormulaList sgFormulaList);
|
||||
|
||||
/**
|
||||
* 新增配方列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFormulaList(SgFormulaList sgFormulaList);
|
||||
|
||||
/**
|
||||
* 修改配方列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFormulaList(SgFormulaList sgFormulaList);
|
||||
|
||||
/**
|
||||
* 批量删除配方列表
|
||||
*
|
||||
* @param codes 需要删除的配方列表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaListByCodes(Long[] codes);
|
||||
|
||||
/**
|
||||
* 删除配方列表信息
|
||||
*
|
||||
* @param code 配方列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaListByCode(Long code);
|
||||
|
||||
int deleteSgFormulaListByFormulaIdAndBatchId(SgFormulaList sgFormulaList);
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFormulaManagement;
|
||||
|
||||
/**
|
||||
* 配方管理Service接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
public interface ISgFormulaManagementService
|
||||
{
|
||||
/**
|
||||
* 查询配方管理
|
||||
*
|
||||
* @param formulaId 配方管理主键
|
||||
* @return 配方管理
|
||||
*/
|
||||
SgFormulaManagement selectSgFormulaManagementByFormulaId(String formulaId);
|
||||
|
||||
/**
|
||||
* 查询配方管理列表
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 配方管理集合
|
||||
*/
|
||||
List<SgFormulaManagement> selectSgFormulaManagementList(SgFormulaManagement sgFormulaManagement);
|
||||
|
||||
/**
|
||||
* 新增配方管理
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFormulaManagement(SgFormulaManagement sgFormulaManagement);
|
||||
|
||||
/**
|
||||
* 修改配方管理
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFormulaManagement(SgFormulaManagement sgFormulaManagement);
|
||||
|
||||
/**
|
||||
* 批量删除配方管理
|
||||
*
|
||||
* @param formulaIds 需要删除的配方管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaManagementByFormulaIds(String[] formulaIds);
|
||||
|
||||
/**
|
||||
* 删除配方管理信息
|
||||
*
|
||||
* @param formulaId 配方管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFormulaManagementByFormulaId(String formulaId);
|
||||
|
||||
/***
|
||||
* 删除配方管理信息
|
||||
*/
|
||||
int deleteSgFormulaManagement(SgFormulaManagement sgFormulaManagement);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgMaterial;
|
||||
|
||||
/**
|
||||
* 原料Service接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-11
|
||||
*/
|
||||
public interface ISgMaterialService
|
||||
{
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param materialId 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
SgMaterial selectSgMaterialByMaterialId(String materialId);
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 原料集合
|
||||
*/
|
||||
List<SgMaterial> selectSgMaterialList(SgMaterial sgMaterial);
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgMaterial(SgMaterial sgMaterial);
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgMaterial(SgMaterial sgMaterial);
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param materialIds 需要删除的原料主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgMaterialByMaterialIds(String[] materialIds);
|
||||
|
||||
/**
|
||||
* 删除原料信息
|
||||
*
|
||||
* @param materialId 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgMaterialByMaterialId(String materialId);
|
||||
}
|
@ -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,99 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFeedPlanMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedPlan;
|
||||
import com.zhyc.module.feed.service.ISgFeedPlanService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 饲喂计划Service业务层处理
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
public class SgFeedPlanServiceImpl implements ISgFeedPlanService
|
||||
{
|
||||
private final SgFeedPlanMapper sgFeedPlanMapper;
|
||||
|
||||
public SgFeedPlanServiceImpl(SgFeedPlanMapper sgFeedPlanMapper) {
|
||||
this.sgFeedPlanMapper = sgFeedPlanMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂计划
|
||||
*
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 饲喂计划
|
||||
*/
|
||||
@Override
|
||||
public SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate)
|
||||
{
|
||||
return sgFeedPlanMapper.selectSgFeedPlanByCreateDate(createDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂计划列表
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 饲喂计划
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
return sgFeedPlanMapper.selectSgFeedPlanList(sgFeedPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂计划
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedPlan(SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
return sgFeedPlanMapper.insertSgFeedPlan(sgFeedPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂计划
|
||||
*
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedPlan(SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
return sgFeedPlanMapper.updateSgFeedPlan(sgFeedPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂计划
|
||||
*
|
||||
* @param createDates 需要删除的饲喂计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedPlanByCreateDates(Date[] createDates)
|
||||
{
|
||||
return sgFeedPlanMapper.deleteSgFeedPlanByCreateDates(createDates);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂计划信息
|
||||
*
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedPlanByCreateDate(Date createDate)
|
||||
{
|
||||
return sgFeedPlanMapper.deleteSgFeedPlanByCreateDate(createDate);
|
||||
}
|
||||
}
|
@ -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,97 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFormulaListMapper;
|
||||
import com.zhyc.module.feed.domain.SgFormulaList;
|
||||
import com.zhyc.module.feed.service.ISgFormulaListService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 配方列表Service业务层处理
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SgFormulaListServiceImpl implements ISgFormulaListService {
|
||||
private final SgFormulaListMapper sgFormulaListMapper;
|
||||
|
||||
public SgFormulaListServiceImpl(SgFormulaListMapper sgFormulaListMapper) {
|
||||
this.sgFormulaListMapper = sgFormulaListMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配方列表
|
||||
*
|
||||
* @param code 配方列表主键
|
||||
* @return 配方列表
|
||||
*/
|
||||
@Override
|
||||
public SgFormulaList selectSgFormulaListByCode(Long code) {
|
||||
return sgFormulaListMapper.selectSgFormulaListByCode(code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配方列表列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 配方列表
|
||||
*/
|
||||
@Override
|
||||
public List<SgFormulaList> selectSgFormulaListList(SgFormulaList sgFormulaList) {
|
||||
return sgFormulaListMapper.selectSgFormulaListList(sgFormulaList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增配方列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFormulaList(SgFormulaList sgFormulaList) {
|
||||
return sgFormulaListMapper.insertSgFormulaList(sgFormulaList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配方列表
|
||||
*
|
||||
* @param sgFormulaList 配方列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFormulaList(SgFormulaList sgFormulaList) {
|
||||
return sgFormulaListMapper.updateSgFormulaList(sgFormulaList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配方列表
|
||||
*
|
||||
* @param codes 需要删除的配方列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFormulaListByCodes(Long[] codes) {
|
||||
return sgFormulaListMapper.deleteSgFormulaListByCodes(codes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配方列表信息
|
||||
*
|
||||
* @param code 配方列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFormulaListByCode(Long code) {
|
||||
return sgFormulaListMapper.deleteSgFormulaListByCode(code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteSgFormulaListByFormulaIdAndBatchId(SgFormulaList sgFormulaList) {
|
||||
return sgFormulaListMapper.deleteSgFormulaListByFormulaIdAndBatchId(sgFormulaList);
|
||||
}
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.zhyc.module.feed.domain.SgFormulaList;
|
||||
import com.zhyc.module.feed.mapper.SgFormulaListMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFormulaManagementMapper;
|
||||
import com.zhyc.module.feed.domain.SgFormulaManagement;
|
||||
import com.zhyc.module.feed.service.ISgFormulaManagementService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 配方管理Service业务层处理
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-09
|
||||
*/
|
||||
@Service
|
||||
public class SgFormulaManagementServiceImpl implements ISgFormulaManagementService {
|
||||
private final SgFormulaManagementMapper sgFormulaManagementMapper;
|
||||
private final SgFormulaListMapper sgFormulaListMapper;
|
||||
|
||||
public SgFormulaManagementServiceImpl(SgFormulaManagementMapper sgFormulaManagementMapper, SgFormulaListMapper sgFormulaListMapper) {
|
||||
this.sgFormulaManagementMapper = sgFormulaManagementMapper;
|
||||
this.sgFormulaListMapper = sgFormulaListMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配方管理
|
||||
*
|
||||
* @param formulaId 配方管理主键
|
||||
* @return 配方管理
|
||||
*/
|
||||
@Override
|
||||
public SgFormulaManagement selectSgFormulaManagementByFormulaId(String formulaId) {
|
||||
return sgFormulaManagementMapper.selectSgFormulaManagementByFormulaId(formulaId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配方管理列表
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 配方管理
|
||||
*/
|
||||
@Override
|
||||
public List<SgFormulaManagement> selectSgFormulaManagementList(SgFormulaManagement sgFormulaManagement) {
|
||||
List<SgFormulaManagement> sgFormulaManagements =
|
||||
sgFormulaManagementMapper.selectSgFormulaManagementList(sgFormulaManagement);
|
||||
|
||||
Iterator<SgFormulaManagement> iterator = sgFormulaManagements.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
SgFormulaManagement formulaManagement = iterator.next();
|
||||
// 子查询中去除重复的父项
|
||||
if (formulaManagement != null
|
||||
&& sgFormulaManagement.getQueryType() != null
|
||||
&& sgFormulaManagement.getQueryType().equals("Sub")
|
||||
&& Objects.equals(formulaManagement.getBatchId(), "0")) {
|
||||
iterator.remove(); // 安全删除
|
||||
continue; // 删除后跳过本次循环
|
||||
}
|
||||
// 绑定配方列表
|
||||
if (formulaManagement != null
|
||||
&& formulaManagement.getFormulaId() != null
|
||||
&& formulaManagement.getBatchId() != null) {
|
||||
SgFormulaList sgFormulaList = new SgFormulaList();
|
||||
sgFormulaList.setFormulaId(formulaManagement.getFormulaId());
|
||||
sgFormulaList.setBatchId(formulaManagement.getBatchId());
|
||||
List<SgFormulaList> formulaLists =
|
||||
sgFormulaListMapper.selectSgFormulaListList(sgFormulaList);
|
||||
formulaManagement.setSgFormulaList(formulaLists);
|
||||
}
|
||||
}
|
||||
|
||||
return sgFormulaManagements;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增配方管理
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFormulaManagement(SgFormulaManagement sgFormulaManagement) {
|
||||
return sgFormulaManagementMapper.insertSgFormulaManagement(sgFormulaManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改配方管理
|
||||
*
|
||||
* @param sgFormulaManagement 配方管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFormulaManagement(SgFormulaManagement sgFormulaManagement) {
|
||||
return sgFormulaManagementMapper.updateSgFormulaManagement(sgFormulaManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除配方管理
|
||||
*
|
||||
* @param formulaIds 需要删除的配方管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFormulaManagementByFormulaIds(String[] formulaIds) {
|
||||
return sgFormulaManagementMapper.deleteSgFormulaManagementByFormulaIds(formulaIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配方管理信息
|
||||
*
|
||||
* @param formulaId 配方管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFormulaManagementByFormulaId(String formulaId) {
|
||||
return sgFormulaManagementMapper.deleteSgFormulaManagementByFormulaId(formulaId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int deleteSgFormulaManagement(SgFormulaManagement sgFormulaManagement) {
|
||||
// 删除关联配方表
|
||||
SgFormulaList sgFormulaList = new SgFormulaList();
|
||||
sgFormulaList.setFormulaId(sgFormulaManagement.getFormulaId());
|
||||
sgFormulaList.setBatchId(sgFormulaManagement.getBatchId());
|
||||
sgFormulaListMapper.deleteSgFormulaListByFormulaIdAndBatchId(sgFormulaList);
|
||||
return sgFormulaManagementMapper.deleteSgFormulaManagement(sgFormulaManagement);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgMaterialMapper;
|
||||
import com.zhyc.module.feed.domain.SgMaterial;
|
||||
import com.zhyc.module.feed.service.ISgMaterialService;
|
||||
|
||||
/**
|
||||
* 原料Service业务层处理
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-11
|
||||
*/
|
||||
@Service
|
||||
public class SgMaterialServiceImpl implements ISgMaterialService
|
||||
{
|
||||
private final SgMaterialMapper sgMaterialMapper;
|
||||
|
||||
public SgMaterialServiceImpl(SgMaterialMapper sgMaterialMapper) {
|
||||
this.sgMaterialMapper = sgMaterialMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param materialId 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
@Override
|
||||
public SgMaterial selectSgMaterialByMaterialId(String materialId)
|
||||
{
|
||||
return sgMaterialMapper.selectSgMaterialByMaterialId(materialId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 原料
|
||||
*/
|
||||
@Override
|
||||
public List<SgMaterial> selectSgMaterialList(SgMaterial sgMaterial)
|
||||
{
|
||||
return sgMaterialMapper.selectSgMaterialList(sgMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgMaterial(SgMaterial sgMaterial)
|
||||
{
|
||||
return sgMaterialMapper.insertSgMaterial(sgMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgMaterial 原料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgMaterial(SgMaterial sgMaterial)
|
||||
{
|
||||
return sgMaterialMapper.updateSgMaterial(sgMaterial);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param materialIds 需要删除的原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgMaterialByMaterialIds(String[] materialIds)
|
||||
{
|
||||
return sgMaterialMapper.deleteSgMaterialByMaterialIds(materialIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原料信息
|
||||
*
|
||||
* @param materialId 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgMaterialByMaterialId(String materialId)
|
||||
{
|
||||
return sgMaterialMapper.deleteSgMaterialByMaterialId(materialId);
|
||||
}
|
||||
}
|
@ -107,13 +107,15 @@ public class WzStockInServiceImpl implements IWzStockInService {
|
||||
int successNum = 0;
|
||||
int failureNum = 0;
|
||||
int sameNum = 0;
|
||||
boolean emptyTable = true;
|
||||
StringBuilder successMsg = new StringBuilder();
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
try {
|
||||
WzStockIn earliestStockIn = wzStockInMapper.getEarliestStockIn();
|
||||
if (null != earliestStockIn) emptyTable = false;
|
||||
System.out.println(earliestStockIn);
|
||||
for (WzStockIn wzStockIn : StockInList) {
|
||||
if (earliestStockIn.getDocDate().getTime() >= wzStockIn.getDocDate().getTime()) {
|
||||
if (!emptyTable && earliestStockIn.getDocDate().getTime() >= wzStockIn.getDocDate().getTime()) {
|
||||
sameNum++;
|
||||
continue;
|
||||
}
|
||||
|
@ -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>
|
137
zhyc-module/src/main/resources/mapper/feed/SgFeedPlanMapper.xml
Normal file
137
zhyc-module/src/main/resources/mapper/feed/SgFeedPlanMapper.xml
Normal file
@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.feed.mapper.SgFeedPlanMapper">
|
||||
|
||||
<resultMap type="SgFeedPlan" id="SgFeedPlanResult">
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="formulaId" column="formula_id" />
|
||||
<result property="sheepHouseId" column="sheep_house_id" />
|
||||
<result property="sheepCount" column="sheep_count" />
|
||||
<result property="planDailySize" column="plan_daily_size" />
|
||||
<result property="planMorningSize" column="plan_morning_size" />
|
||||
<result property="planMorningTotal" column="plan_morning_total" />
|
||||
<result property="ratioMorning" column="ratio_morning" />
|
||||
<result property="actualMorningSize" column="actual_morning_size" />
|
||||
<result property="planNoonSize" column="plan_noon_size" />
|
||||
<result property="planNoonTotal" column="plan_noon_total" />
|
||||
<result property="actualNoonSize" column="actual_noon_size" />
|
||||
<result property="ratioNoon" column="ratio_noon" />
|
||||
<result property="planAfternoonSize" column="plan_afternoon_size" />
|
||||
<result property="planAfternoonTotal" column="plan_afternoon_total" />
|
||||
<result property="actualAfternoonSize" column="actual_afternoon_size" />
|
||||
<result property="ratioAfternoon" column="ratio_afternoon" />
|
||||
<result property="planFeedTotal" column="plan_feed_total" />
|
||||
<result property="zookeeper" column="zookeeper" />
|
||||
<result property="planDate" column="plan_date" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFeedPlanVo">
|
||||
select create_date, formula_id, sheep_house_id, sheep_count, plan_daily_size, plan_morning_size, plan_morning_total, ratio_morning, actual_morning_size, plan_noon_size, plan_noon_total, actual_noon_size, ratio_noon, plan_afternoon_size, plan_afternoon_total, actual_afternoon_size, ratio_afternoon, plan_feed_total, zookeeper, plan_date, remark from sg_feed_plan
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFeedPlanList" parameterType="SgFeedPlan" resultMap="SgFeedPlanResult">
|
||||
<include refid="selectSgFeedPlanVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
|
||||
<if test="sheepHouseId != null "> and sheep_house_id = #{sheepHouseId}</if>
|
||||
<if test="zookeeper != null and zookeeper != ''"> and zookeeper = #{zookeeper}</if>
|
||||
<if test="planDate != null "> and plan_date = #{planDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFeedPlanByCreateDate" parameterType="Date" resultMap="SgFeedPlanResult">
|
||||
<include refid="selectSgFeedPlanVo"/>
|
||||
where create_date = #{createDate}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFeedPlan" parameterType="SgFeedPlan">
|
||||
insert into sg_feed_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="formulaId != null and formulaId != ''">formula_id,</if>
|
||||
<if test="sheepHouseId != null">sheep_house_id,</if>
|
||||
<if test="sheepCount != null">sheep_count,</if>
|
||||
<if test="planDailySize != null">plan_daily_size,</if>
|
||||
<if test="planMorningSize != null">plan_morning_size,</if>
|
||||
<if test="planMorningTotal != null">plan_morning_total,</if>
|
||||
<if test="ratioMorning != null">ratio_morning,</if>
|
||||
<if test="actualMorningSize != null">actual_morning_size,</if>
|
||||
<if test="planNoonSize != null">plan_noon_size,</if>
|
||||
<if test="planNoonTotal != null">plan_noon_total,</if>
|
||||
<if test="actualNoonSize != null">actual_noon_size,</if>
|
||||
<if test="ratioNoon != null">ratio_noon,</if>
|
||||
<if test="planAfternoonSize != null">plan_afternoon_size,</if>
|
||||
<if test="planAfternoonTotal != null">plan_afternoon_total,</if>
|
||||
<if test="actualAfternoonSize != null">actual_afternoon_size,</if>
|
||||
<if test="ratioAfternoon != null">ratio_afternoon,</if>
|
||||
<if test="planFeedTotal != null">plan_feed_total,</if>
|
||||
<if test="zookeeper != null">zookeeper,</if>
|
||||
<if test="planDate != null">plan_date,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="formulaId != null and formulaId != ''">#{formulaId},</if>
|
||||
<if test="sheepHouseId != null">#{sheepHouseId},</if>
|
||||
<if test="sheepCount != null">#{sheepCount},</if>
|
||||
<if test="planDailySize != null">#{planDailySize},</if>
|
||||
<if test="planMorningSize != null">#{planMorningSize},</if>
|
||||
<if test="planMorningTotal != null">#{planMorningTotal},</if>
|
||||
<if test="ratioMorning != null">#{ratioMorning},</if>
|
||||
<if test="actualMorningSize != null">#{actualMorningSize},</if>
|
||||
<if test="planNoonSize != null">#{planNoonSize},</if>
|
||||
<if test="planNoonTotal != null">#{planNoonTotal},</if>
|
||||
<if test="actualNoonSize != null">#{actualNoonSize},</if>
|
||||
<if test="ratioNoon != null">#{ratioNoon},</if>
|
||||
<if test="planAfternoonSize != null">#{planAfternoonSize},</if>
|
||||
<if test="planAfternoonTotal != null">#{planAfternoonTotal},</if>
|
||||
<if test="actualAfternoonSize != null">#{actualAfternoonSize},</if>
|
||||
<if test="ratioAfternoon != null">#{ratioAfternoon},</if>
|
||||
<if test="planFeedTotal != null">#{planFeedTotal},</if>
|
||||
<if test="zookeeper != null">#{zookeeper},</if>
|
||||
<if test="planDate != null">#{planDate},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFeedPlan" parameterType="SgFeedPlan">
|
||||
update sg_feed_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formulaId != null and formulaId != ''">formula_id = #{formulaId},</if>
|
||||
<if test="sheepHouseId != null">sheep_house_id = #{sheepHouseId},</if>
|
||||
<if test="sheepCount != null">sheep_count = #{sheepCount},</if>
|
||||
<if test="planDailySize != null">plan_daily_size = #{planDailySize},</if>
|
||||
<if test="planMorningSize != null">plan_morning_size = #{planMorningSize},</if>
|
||||
<if test="planMorningTotal != null">plan_morning_total = #{planMorningTotal},</if>
|
||||
<if test="ratioMorning != null">ratio_morning = #{ratioMorning},</if>
|
||||
<if test="actualMorningSize != null">actual_morning_size = #{actualMorningSize},</if>
|
||||
<if test="planNoonSize != null">plan_noon_size = #{planNoonSize},</if>
|
||||
<if test="planNoonTotal != null">plan_noon_total = #{planNoonTotal},</if>
|
||||
<if test="actualNoonSize != null">actual_noon_size = #{actualNoonSize},</if>
|
||||
<if test="ratioNoon != null">ratio_noon = #{ratioNoon},</if>
|
||||
<if test="planAfternoonSize != null">plan_afternoon_size = #{planAfternoonSize},</if>
|
||||
<if test="planAfternoonTotal != null">plan_afternoon_total = #{planAfternoonTotal},</if>
|
||||
<if test="actualAfternoonSize != null">actual_afternoon_size = #{actualAfternoonSize},</if>
|
||||
<if test="ratioAfternoon != null">ratio_afternoon = #{ratioAfternoon},</if>
|
||||
<if test="planFeedTotal != null">plan_feed_total = #{planFeedTotal},</if>
|
||||
<if test="zookeeper != null">zookeeper = #{zookeeper},</if>
|
||||
<if test="planDate != null">plan_date = #{planDate},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where create_date = #{createDate}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFeedPlanByCreateDate" parameterType="Date">
|
||||
delete from sg_feed_plan where create_date = #{createDate}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFeedPlanByCreateDates" parameterType="String">
|
||||
delete from sg_feed_plan where create_date in
|
||||
<foreach item="createDate" collection="array" open="(" separator="," close=")">
|
||||
#{createDate}
|
||||
</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>
|
@ -0,0 +1,87 @@
|
||||
<?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.SgFormulaListMapper">
|
||||
|
||||
<resultMap type="SgFormulaList" id="SgFormulaListResult">
|
||||
<result property="code" column="code" />
|
||||
<result property="formulaId" column="formula_id" />
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="ratio" column="ratio" />
|
||||
<result property="isGranular" column="is_granular" />
|
||||
<result property="isSupplement" column="is_supplement" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFormulaListVo">
|
||||
select code, formula_id, material_id, material_name, ratio, is_granular, is_supplement from sg_formula_list
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFormulaListList" parameterType="SgFormulaList" resultMap="SgFormulaListResult">
|
||||
<include refid="selectSgFormulaListVo"/>
|
||||
<where>
|
||||
<if test="materialId != null and materialId != ''">material_id = #{materialId}</if>
|
||||
<if test="formulaId != null and formulaId != ''">and formula_id = #{formulaId}</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFormulaListByCode" parameterType="Long" resultMap="SgFormulaListResult">
|
||||
<include refid="selectSgFormulaListVo"/>
|
||||
where code = #{code}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFormulaList" parameterType="SgFormulaList">
|
||||
insert into sg_formula_list
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">code,</if>
|
||||
<if test="formulaId != null">formula_id,</if>
|
||||
<if test="batchId != null">batch_id,</if>
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="ratio != null">ratio,</if>
|
||||
<if test="isGranular != null">is_granular,</if>
|
||||
<if test="isSupplement != null">is_supplement,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="formulaId != null">#{formulaId},</if>
|
||||
<if test="batchId != null">#{batchId},</if>
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="ratio != null">#{ratio},</if>
|
||||
<if test="isGranular != null">#{isGranular},</if>
|
||||
<if test="isSupplement != null">#{isSupplement},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFormulaList" parameterType="SgFormulaList">
|
||||
update sg_formula_list
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="formulaId != null">formula_id = #{formulaId},</if>
|
||||
<if test="materialId != null">material_id = #{materialId},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="ratio != null">ratio = #{ratio},</if>
|
||||
<if test="isGranular != null">is_granular = #{isGranular},</if>
|
||||
<if test="isSupplement != null">is_supplement = #{isSupplement},</if>
|
||||
</trim>
|
||||
where code = #{code}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFormulaListByCode" parameterType="Long">
|
||||
delete from sg_formula_list where code = #{code}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFormulaListByCodes" parameterType="String">
|
||||
delete from sg_formula_list where code in
|
||||
<foreach item="code" collection="array" open="(" separator="," close=")">
|
||||
#{code}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFormulaListByFormulaIdAndBatchId" parameterType="SgFormulaList">
|
||||
DELETE FROM sg_formula_list WHERE formula_id = #{formulaId} AND batch_id = #{batchId}
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,82 @@
|
||||
<?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.SgFormulaManagementMapper">
|
||||
|
||||
<resultMap type="SgFormulaManagement" id="SgFormulaManagementResult">
|
||||
<result property="formulaId" column="formula_id" />
|
||||
<result property="feedStage" column="feed_stage" />
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="useStartDate" column="use_start_date" />
|
||||
<result property="useEndDate" column="use_end_date" />
|
||||
<result property="useState" column="use_state" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgFormulaManagementVo">
|
||||
select formula_id, feed_stage, batch_id, use_start_date, use_end_date, use_state, remark from sg_formula_management
|
||||
</sql>
|
||||
|
||||
<select id="selectSgFormulaManagementList" parameterType="SgFormulaManagement" resultMap="SgFormulaManagementResult">
|
||||
<include refid="selectSgFormulaManagementVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
|
||||
<if test="feedStage != null and feedStage != ''"> and feed_stage = #{feedStage}</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgFormulaManagementByFormulaId" parameterType="String" resultMap="SgFormulaManagementResult">
|
||||
<include refid="selectSgFormulaManagementVo"/>
|
||||
where formula_id = #{formulaId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgFormulaManagement" parameterType="SgFormulaManagement">
|
||||
insert into sg_formula_management
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="formulaId != null and formulaId != ''">formula_id,</if>
|
||||
<if test="feedStage != null and feedStage != ''">feed_stage,</if>
|
||||
<if test="batchId != null">batch_id,</if>
|
||||
<if test="useStartDate != null">use_start_date,</if>
|
||||
<if test="useEndDate != null">use_end_date,</if>
|
||||
<if test="useState != null">use_state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="formulaId != null and formulaId != ''">#{formulaId},</if>
|
||||
<if test="feedStage != null and feedStage != ''">#{feedStage},</if>
|
||||
<if test="batchId != null">#{batchId},</if>
|
||||
<if test="useStartDate != null">#{useStartDate},</if>
|
||||
<if test="useEndDate != null">#{useEndDate},</if>
|
||||
<if test="useState != null">#{useState},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgFormulaManagement" parameterType="SgFormulaManagement">
|
||||
update sg_formula_management
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="feedStage != null and feedStage != ''">feed_stage = #{feedStage},</if>
|
||||
<if test="useStartDate != null">use_start_date = #{useStartDate},</if>
|
||||
<if test="useEndDate != null">use_end_date = #{useEndDate},</if>
|
||||
<if test="useState != null">use_state = #{useState},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where formula_id = #{formulaId} AND batch_id = #{batchId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgFormulaManagementByFormulaId" parameterType="String">
|
||||
delete from sg_formula_management where formula_id = #{formulaId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgFormulaManagementByFormulaIds" parameterType="String">
|
||||
delete from sg_formula_management where formula_id in
|
||||
<foreach item="formulaId" collection="array" open="(" separator="," close=")">
|
||||
#{formulaId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteSgFormulaManagement" parameterType="SgFormulaManagement">
|
||||
delete from sg_formula_management where formula_id = #{formulaId} and batch_id = #{batchId}
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,64 @@
|
||||
<?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.SgMaterialMapper">
|
||||
|
||||
<resultMap type="SgMaterial" id="SgMaterialResult">
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="isGranular" column="is_granular" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSgMaterialVo">
|
||||
select material_id, material_name, is_granular from sg_material
|
||||
</sql>
|
||||
|
||||
<select id="selectSgMaterialList" parameterType="SgMaterial" resultMap="SgMaterialResult">
|
||||
<include refid="selectSgMaterialVo"/>
|
||||
<where>
|
||||
<if test="materialId != null and materialId != ''"> and material_id = #{materialId}</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="isGranular != null "> and is_granular = #{isGranular}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSgMaterialByMaterialId" parameterType="String" resultMap="SgMaterialResult">
|
||||
<include refid="selectSgMaterialVo"/>
|
||||
where material_id = #{materialId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSgMaterial" parameterType="SgMaterial">
|
||||
insert into sg_material
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialName != null and materialName != ''">material_name,</if>
|
||||
<if test="isGranular != null">is_granular,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialName != null and materialName != ''">#{materialName},</if>
|
||||
<if test="isGranular != null">#{isGranular},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgMaterial" parameterType="SgMaterial">
|
||||
update sg_material
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialName != null and materialName != ''">material_name = #{materialName},</if>
|
||||
<if test="isGranular != null">is_granular = #{isGranular},</if>
|
||||
</trim>
|
||||
where material_id = #{materialId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSgMaterialByMaterialId" parameterType="String">
|
||||
delete from sg_material where material_id = #{materialId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgMaterialByMaterialIds" parameterType="String">
|
||||
delete from sg_material where material_id in
|
||||
<foreach item="materialId" collection="array" open="(" separator="," close=")">
|
||||
#{materialId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user