Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
b9e37fb14a
@ -20,6 +20,8 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.38</version> <!-- 使用最新版本 -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.base.variety.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.base.variety.domain.BasSheepVariety;
|
||||
import com.zhyc.module.base.variety.service.IBasSheepVarietyService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 羊只品种Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/variety")
|
||||
public class BasSheepVarietyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasSheepVarietyService basSheepVarietyService;
|
||||
|
||||
/**
|
||||
* 查询羊只品种列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:variety:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasSheepVariety basSheepVariety)
|
||||
{
|
||||
startPage();
|
||||
List<BasSheepVariety> list = basSheepVarietyService.selectBasSheepVarietyList(basSheepVariety);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出羊只品种列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:variety:export')")
|
||||
@Log(title = "羊只品种", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasSheepVariety basSheepVariety)
|
||||
{
|
||||
List<BasSheepVariety> list = basSheepVarietyService.selectBasSheepVarietyList(basSheepVariety);
|
||||
ExcelUtil<BasSheepVariety> util = new ExcelUtil<BasSheepVariety>(BasSheepVariety.class);
|
||||
util.exportExcel(response, list, "羊只品种数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取羊只品种详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:variety:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(basSheepVarietyService.selectBasSheepVarietyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊只品种
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:variety:add')")
|
||||
@Log(title = "羊只品种", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasSheepVariety basSheepVariety)
|
||||
{
|
||||
return toAjax(basSheepVarietyService.insertBasSheepVariety(basSheepVariety));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊只品种
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:variety:edit')")
|
||||
@Log(title = "羊只品种", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasSheepVariety basSheepVariety)
|
||||
{
|
||||
return toAjax(basSheepVarietyService.updateBasSheepVariety(basSheepVariety));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊只品种
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:variety:remove')")
|
||||
@Log(title = "羊只品种", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(basSheepVarietyService.deleteBasSheepVarietyByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhyc.module.base.variety.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;
|
||||
|
||||
/**
|
||||
* 羊只品种对象 bas_sheep_variety
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class BasSheepVariety extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String variety;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("variety", getVariety())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.base.variety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.base.variety.domain.BasSheepVariety;
|
||||
|
||||
/**
|
||||
* 羊只品种Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface BasSheepVarietyMapper
|
||||
{
|
||||
/**
|
||||
* 查询羊只品种
|
||||
*
|
||||
* @param id 羊只品种主键
|
||||
* @return 羊只品种
|
||||
*/
|
||||
public BasSheepVariety selectBasSheepVarietyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊只品种列表
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 羊只品种集合
|
||||
*/
|
||||
public List<BasSheepVariety> selectBasSheepVarietyList(BasSheepVariety basSheepVariety);
|
||||
|
||||
/**
|
||||
* 新增羊只品种
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasSheepVariety(BasSheepVariety basSheepVariety);
|
||||
|
||||
/**
|
||||
* 修改羊只品种
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasSheepVariety(BasSheepVariety basSheepVariety);
|
||||
|
||||
/**
|
||||
* 删除羊只品种
|
||||
*
|
||||
* @param id 羊只品种主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepVarietyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除羊只品种
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepVarietyByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.base.variety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.base.variety.domain.BasSheepVariety;
|
||||
|
||||
/**
|
||||
* 羊只品种Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IBasSheepVarietyService
|
||||
{
|
||||
/**
|
||||
* 查询羊只品种
|
||||
*
|
||||
* @param id 羊只品种主键
|
||||
* @return 羊只品种
|
||||
*/
|
||||
public BasSheepVariety selectBasSheepVarietyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羊只品种列表
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 羊只品种集合
|
||||
*/
|
||||
public List<BasSheepVariety> selectBasSheepVarietyList(BasSheepVariety basSheepVariety);
|
||||
|
||||
/**
|
||||
* 新增羊只品种
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasSheepVariety(BasSheepVariety basSheepVariety);
|
||||
|
||||
/**
|
||||
* 修改羊只品种
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasSheepVariety(BasSheepVariety basSheepVariety);
|
||||
|
||||
/**
|
||||
* 批量删除羊只品种
|
||||
*
|
||||
* @param ids 需要删除的羊只品种主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepVarietyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除羊只品种信息
|
||||
*
|
||||
* @param id 羊只品种主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepVarietyById(Long id);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.base.variety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.base.variety.mapper.BasSheepVarietyMapper;
|
||||
import com.zhyc.module.base.variety.domain.BasSheepVariety;
|
||||
import com.zhyc.module.base.variety.service.IBasSheepVarietyService;
|
||||
|
||||
/**
|
||||
* 羊只品种Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class BasSheepVarietyServiceImpl implements IBasSheepVarietyService
|
||||
{
|
||||
@Autowired
|
||||
private BasSheepVarietyMapper basSheepVarietyMapper;
|
||||
|
||||
/**
|
||||
* 查询羊只品种
|
||||
*
|
||||
* @param id 羊只品种主键
|
||||
* @return 羊只品种
|
||||
*/
|
||||
@Override
|
||||
public BasSheepVariety selectBasSheepVarietyById(Long id)
|
||||
{
|
||||
return basSheepVarietyMapper.selectBasSheepVarietyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询羊只品种列表
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 羊只品种
|
||||
*/
|
||||
@Override
|
||||
public List<BasSheepVariety> selectBasSheepVarietyList(BasSheepVariety basSheepVariety)
|
||||
{
|
||||
return basSheepVarietyMapper.selectBasSheepVarietyList(basSheepVariety);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增羊只品种
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasSheepVariety(BasSheepVariety basSheepVariety)
|
||||
{
|
||||
return basSheepVarietyMapper.insertBasSheepVariety(basSheepVariety);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改羊只品种
|
||||
*
|
||||
* @param basSheepVariety 羊只品种
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasSheepVariety(BasSheepVariety basSheepVariety)
|
||||
{
|
||||
return basSheepVarietyMapper.updateBasSheepVariety(basSheepVariety);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除羊只品种
|
||||
*
|
||||
* @param ids 需要删除的羊只品种主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasSheepVarietyByIds(Long[] ids)
|
||||
{
|
||||
return basSheepVarietyMapper.deleteBasSheepVarietyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除羊只品种信息
|
||||
*
|
||||
* @param id 羊只品种主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasSheepVarietyById(Long id)
|
||||
{
|
||||
return basSheepVarietyMapper.deleteBasSheepVarietyById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import com.zhyc.module.biosafety.service.IDewormService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 驱虫Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/deworm")
|
||||
public class DewormController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDewormService dewormService;
|
||||
|
||||
/**
|
||||
* 查询驱虫列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Deworm deworm)
|
||||
{
|
||||
startPage();
|
||||
List<Deworm> list = dewormService.selectDewormList(deworm);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出驱虫列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:export')")
|
||||
@Log(title = "驱虫", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Deworm deworm)
|
||||
{
|
||||
List<Deworm> list = dewormService.selectDewormList(deworm);
|
||||
ExcelUtil<Deworm> util = new ExcelUtil<Deworm>(Deworm.class);
|
||||
util.exportExcel(response, list, "驱虫数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取驱虫详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(dewormService.selectDewormById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增驱虫
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:add')")
|
||||
@Log(title = "驱虫", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Deworm deworm)
|
||||
{
|
||||
return toAjax(dewormService.insertDeworm(deworm));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改驱虫
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:edit')")
|
||||
@Log(title = "驱虫", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Deworm deworm)
|
||||
{
|
||||
return toAjax(dewormService.updateDeworm(deworm));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除驱虫
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:remove')")
|
||||
@Log(title = "驱虫", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(dewormService.deleteDewormByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.domain.Diagnosis;
|
||||
import com.zhyc.module.biosafety.service.IDiagnosisService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 诊疗结果Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/diagnosis/diagnosis")
|
||||
public class DiagnosisController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDiagnosisService diagnosisService;
|
||||
|
||||
/**
|
||||
* 查询诊疗结果列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Diagnosis diagnosis)
|
||||
{
|
||||
startPage();
|
||||
List<Diagnosis> list = diagnosisService.selectDiagnosisList(diagnosis);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出诊疗结果列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:export')")
|
||||
@Log(title = "诊疗结果", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Diagnosis diagnosis)
|
||||
{
|
||||
List<Diagnosis> list = diagnosisService.selectDiagnosisList(diagnosis);
|
||||
ExcelUtil<Diagnosis> util = new ExcelUtil<Diagnosis>(Diagnosis.class);
|
||||
util.exportExcel(response, list, "诊疗结果数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取诊疗结果详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(diagnosisService.selectDiagnosisById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增诊疗结果
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:add')")
|
||||
@Log(title = "诊疗结果", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Diagnosis diagnosis)
|
||||
{
|
||||
return toAjax(diagnosisService.insertDiagnosis(diagnosis));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改诊疗结果
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:edit')")
|
||||
@Log(title = "诊疗结果", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Diagnosis diagnosis)
|
||||
{
|
||||
return toAjax(diagnosisService.updateDiagnosis(diagnosis));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除诊疗结果
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('diagnosis:diagnosis:remove')")
|
||||
@Log(title = "诊疗结果", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(diagnosisService.deleteDiagnosisByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.service.IDisinfectService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.domain.Disinfect;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 消毒记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/disinfect")
|
||||
public class DisinfectController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDisinfectService disinfectService;
|
||||
|
||||
/**
|
||||
* 查询消毒记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Disinfect disinfect)
|
||||
{
|
||||
startPage();
|
||||
List<Disinfect> list = disinfectService.selectDisinfectList(disinfect);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出消毒记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:export')")
|
||||
@Log(title = "消毒记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Disinfect disinfect)
|
||||
{
|
||||
List<Disinfect> list = disinfectService.selectDisinfectList(disinfect);
|
||||
ExcelUtil<Disinfect> util = new ExcelUtil<Disinfect>(Disinfect.class);
|
||||
util.exportExcel(response, list, "消毒记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消毒记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(disinfectService.selectDisinfectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消毒记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:add')")
|
||||
@Log(title = "消毒记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Disinfect disinfect)
|
||||
{
|
||||
return toAjax(disinfectService.insertDisinfect(disinfect));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消毒记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:edit')")
|
||||
@Log(title = "消毒记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Disinfect disinfect)
|
||||
{
|
||||
return toAjax(disinfectService.updateDisinfect(disinfect));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消毒记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:disinfect:remove')")
|
||||
@Log(title = "消毒记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(disinfectService.deleteDisinfectByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.service.IHealthService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 保健Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/health")
|
||||
public class HealthController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHealthService healthService;
|
||||
|
||||
/**
|
||||
* 查询保健列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Health health)
|
||||
{
|
||||
startPage();
|
||||
List<Health> list = healthService.selectHealthList(health);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出保健列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:export')")
|
||||
@Log(title = "保健", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Health health)
|
||||
{
|
||||
List<Health> list = healthService.selectHealthList(health);
|
||||
ExcelUtil<Health> util = new ExcelUtil<Health>(Health.class);
|
||||
util.exportExcel(response, list, "保健数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保健详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(healthService.selectHealthById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保健
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:add')")
|
||||
@Log(title = "保健", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Health health)
|
||||
{
|
||||
return toAjax(healthService.insertHealth(health));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保健
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:edit')")
|
||||
@Log(title = "保健", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Health health)
|
||||
{
|
||||
return toAjax(healthService.updateHealth(health));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保健
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:remove')")
|
||||
@Log(title = "保健", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(healthService.deleteHealthByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.service.IImmunityService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.domain.Immunity;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 免疫Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/immunity")
|
||||
public class ImmunityController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IImmunityService immunityService;
|
||||
|
||||
/**
|
||||
* 查询免疫列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Immunity immunity)
|
||||
{
|
||||
startPage();
|
||||
List<Immunity> list = immunityService.selectImmunityList(immunity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出免疫列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:export')")
|
||||
@Log(title = "免疫", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Immunity immunity)
|
||||
{
|
||||
List<Immunity> list = immunityService.selectImmunityList(immunity);
|
||||
ExcelUtil<Immunity> util = new ExcelUtil<Immunity>(Immunity.class);
|
||||
util.exportExcel(response, list, "免疫数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取免疫详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(immunityService.selectImmunityById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增免疫
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:add')")
|
||||
@Log(title = "免疫", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Immunity immunity)
|
||||
{
|
||||
return toAjax(immunityService.insertImmunity(immunity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改免疫
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:edit')")
|
||||
@Log(title = "免疫", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Immunity immunity)
|
||||
{
|
||||
return toAjax(immunityService.updateImmunity(immunity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除免疫
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:remove')")
|
||||
@Log(title = "免疫", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(immunityService.deleteImmunityByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineItems;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.service.IQuarantineItemsService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检疫项目Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/items")
|
||||
public class QuarantineItemsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IQuarantineItemsService quarantineItemsService;
|
||||
|
||||
/**
|
||||
* 查询检疫项目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:items:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QuarantineItems quarantineItems)
|
||||
{
|
||||
startPage();
|
||||
List<QuarantineItems> list = quarantineItemsService.selectQuarantineItemsList(quarantineItems);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检疫项目列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:items:export')")
|
||||
@Log(title = "检疫项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QuarantineItems quarantineItems)
|
||||
{
|
||||
List<QuarantineItems> list = quarantineItemsService.selectQuarantineItemsList(quarantineItems);
|
||||
ExcelUtil<QuarantineItems> util = new ExcelUtil<QuarantineItems>(QuarantineItems.class);
|
||||
util.exportExcel(response, list, "检疫项目数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检疫项目详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:items:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(quarantineItemsService.selectQuarantineItemsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检疫项目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:items:add')")
|
||||
@Log(title = "检疫项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QuarantineItems quarantineItems)
|
||||
{
|
||||
return toAjax(quarantineItemsService.insertQuarantineItems(quarantineItems));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检疫项目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:items:edit')")
|
||||
@Log(title = "检疫项目", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QuarantineItems quarantineItems)
|
||||
{
|
||||
return toAjax(quarantineItemsService.updateQuarantineItems(quarantineItems));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检疫项目
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:items:remove')")
|
||||
@Log(title = "检疫项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(quarantineItemsService.deleteQuarantineItemsByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineReport;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.service.IQuarantineReportService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检疫记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bisosafety/quarantine")
|
||||
public class QuarantineReportController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IQuarantineReportService quarantineReportService;
|
||||
|
||||
/**
|
||||
* 查询检疫记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bisosafety:quarantine:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QuarantineReport quarantineReport)
|
||||
{
|
||||
startPage();
|
||||
List<QuarantineReport> list = quarantineReportService.selectQuarantineReportList(quarantineReport);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检疫记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bisosafety:quarantine:export')")
|
||||
@Log(title = "检疫记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QuarantineReport quarantineReport)
|
||||
{
|
||||
List<QuarantineReport> list = quarantineReportService.selectQuarantineReportList(quarantineReport);
|
||||
ExcelUtil<QuarantineReport> util = new ExcelUtil<QuarantineReport>(QuarantineReport.class);
|
||||
util.exportExcel(response, list, "检疫记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检疫记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bisosafety:quarantine:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(quarantineReportService.selectQuarantineReportById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检疫记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bisosafety:quarantine:add')")
|
||||
@Log(title = "检疫记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QuarantineReport quarantineReport)
|
||||
{
|
||||
return toAjax(quarantineReportService.insertQuarantineReport(quarantineReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检疫记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bisosafety:quarantine:edit')")
|
||||
@Log(title = "检疫记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QuarantineReport quarantineReport)
|
||||
{
|
||||
return toAjax(quarantineReportService.updateQuarantineReport(quarantineReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检疫记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bisosafety:quarantine:remove')")
|
||||
@Log(title = "检疫记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(quarantineReportService.deleteQuarantineReportByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineSample;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.biosafety.service.IQuarantineSampleService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 样品类型Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biosafety/sample")
|
||||
public class QuarantineSampleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IQuarantineSampleService quarantineSampleService;
|
||||
|
||||
/**
|
||||
* 查询样品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:sample:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QuarantineSample quarantineSample)
|
||||
{
|
||||
startPage();
|
||||
List<QuarantineSample> list = quarantineSampleService.selectQuarantineSampleList(quarantineSample);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出样品类型列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:sample:export')")
|
||||
@Log(title = "样品类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QuarantineSample quarantineSample)
|
||||
{
|
||||
List<QuarantineSample> list = quarantineSampleService.selectQuarantineSampleList(quarantineSample);
|
||||
ExcelUtil<QuarantineSample> util = new ExcelUtil<QuarantineSample>(QuarantineSample.class);
|
||||
util.exportExcel(response, list, "样品类型数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取样品类型详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:sample:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(quarantineSampleService.selectQuarantineSampleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增样品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:sample:add')")
|
||||
@Log(title = "样品类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QuarantineSample quarantineSample)
|
||||
{
|
||||
return toAjax(quarantineSampleService.insertQuarantineSample(quarantineSample));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改样品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:sample:edit')")
|
||||
@Log(title = "样品类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QuarantineSample quarantineSample)
|
||||
{
|
||||
return toAjax(quarantineSampleService.updateQuarantineSample(quarantineSample));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除样品类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:sample:remove')")
|
||||
@Log(title = "样品类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(quarantineSampleService.deleteQuarantineSampleByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import com.zhyc.module.biosafety.service.ITreatmentService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 治疗记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/treatment/treatment")
|
||||
public class TreatmentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITreatmentService treatmentService;
|
||||
|
||||
/**
|
||||
* 查询治疗记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Treatment treatment)
|
||||
{
|
||||
startPage();
|
||||
List<Treatment> list = treatmentService.selectTreatmentList(treatment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出治疗记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:export')")
|
||||
@Log(title = "治疗记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Treatment treatment)
|
||||
{
|
||||
List<Treatment> list = treatmentService.selectTreatmentList(treatment);
|
||||
ExcelUtil<Treatment> util = new ExcelUtil<Treatment>(Treatment.class);
|
||||
util.exportExcel(response, list, "治疗记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取治疗记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(treatmentService.selectTreatmentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增治疗记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:add')")
|
||||
@Log(title = "治疗记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Treatment treatment)
|
||||
{
|
||||
return toAjax(treatmentService.insertTreatment(treatment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改治疗记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:edit')")
|
||||
@Log(title = "治疗记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Treatment treatment)
|
||||
{
|
||||
return toAjax(treatmentService.updateTreatment(treatment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除治疗记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:remove')")
|
||||
@Log(title = "治疗记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(treatmentService.deleteTreatmentByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,194 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 驱虫对象 sw_deworm
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class Deworm extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private Long sheepId;
|
||||
|
||||
/** 药品使用记录 */
|
||||
@Excel(name = "药品使用记录")
|
||||
private Long usageId;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String variety;
|
||||
|
||||
/** 羊只类别 */
|
||||
@Excel(name = "羊只类别")
|
||||
private String sheepType;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Long monthAge;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 驱虫日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "驱虫日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technical;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(Long sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Long getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setUsageId(Long usageId)
|
||||
{
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
||||
public Long getUsageId()
|
||||
{
|
||||
return usageId;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
public void setSheepType(String sheepType)
|
||||
{
|
||||
this.sheepType = sheepType;
|
||||
}
|
||||
|
||||
public String getSheepType()
|
||||
{
|
||||
return sheepType;
|
||||
}
|
||||
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setMonthAge(Long monthAge)
|
||||
{
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public Long getMonthAge()
|
||||
{
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setTechnical(String technical)
|
||||
{
|
||||
this.technical = technical;
|
||||
}
|
||||
|
||||
public String getTechnical()
|
||||
{
|
||||
return technical;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("usageId", getUsageId())
|
||||
.append("variety", getVariety())
|
||||
.append("sheepType", getSheepType())
|
||||
.append("gender", getGender())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("parity", getParity())
|
||||
.append("datetime", getDatetime())
|
||||
.append("technical", getTechnical())
|
||||
.append("comment", getComment())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,239 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 诊疗结果对象 sw_diagnosis
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class Diagnosis extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 治疗记录id */
|
||||
@Excel(name = "治疗记录id")
|
||||
private Long treatId;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private Long sheepId;
|
||||
|
||||
/** 时间日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "时间日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 羊只类别 */
|
||||
@Excel(name = "羊只类别")
|
||||
private String sheepType;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private String parity;
|
||||
|
||||
/** 疾病类型 */
|
||||
@Excel(name = "疾病类型")
|
||||
private Long diseasePid;
|
||||
|
||||
/** 子疾病 */
|
||||
@Excel(name = "子疾病")
|
||||
private Long diseaseId;
|
||||
|
||||
/** 诊疗结果 */
|
||||
@Excel(name = "诊疗结果")
|
||||
private Long result;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date begindate;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date enddate;
|
||||
|
||||
/** 治疗天数 */
|
||||
@Excel(name = "治疗天数")
|
||||
private Long treatDay;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
private Long sheepfoldId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setTreatId(Long treatId)
|
||||
{
|
||||
this.treatId = treatId;
|
||||
}
|
||||
|
||||
public Long getTreatId()
|
||||
{
|
||||
return treatId;
|
||||
}
|
||||
|
||||
public void setSheepId(Long sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Long getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setSheepType(String sheepType)
|
||||
{
|
||||
this.sheepType = sheepType;
|
||||
}
|
||||
|
||||
public String getSheepType()
|
||||
{
|
||||
return sheepType;
|
||||
}
|
||||
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setParity(String parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public String getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setDiseasePid(Long diseasePid)
|
||||
{
|
||||
this.diseasePid = diseasePid;
|
||||
}
|
||||
|
||||
public Long getDiseasePid()
|
||||
{
|
||||
return diseasePid;
|
||||
}
|
||||
|
||||
public void setDiseaseId(Long diseaseId)
|
||||
{
|
||||
this.diseaseId = diseaseId;
|
||||
}
|
||||
|
||||
public Long getDiseaseId()
|
||||
{
|
||||
return diseaseId;
|
||||
}
|
||||
|
||||
public void setResult(Long result)
|
||||
{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public Long getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setBegindate(Date begindate)
|
||||
{
|
||||
this.begindate = begindate;
|
||||
}
|
||||
|
||||
public Date getBegindate()
|
||||
{
|
||||
return begindate;
|
||||
}
|
||||
|
||||
public void setEnddate(Date enddate)
|
||||
{
|
||||
this.enddate = enddate;
|
||||
}
|
||||
|
||||
public Date getEnddate()
|
||||
{
|
||||
return enddate;
|
||||
}
|
||||
|
||||
public void setTreatDay(Long treatDay)
|
||||
{
|
||||
this.treatDay = treatDay;
|
||||
}
|
||||
|
||||
public Long getTreatDay()
|
||||
{
|
||||
return treatDay;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("treatId", getTreatId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("datetime", getDatetime())
|
||||
.append("sheepType", getSheepType())
|
||||
.append("gender", getGender())
|
||||
.append("parity", getParity())
|
||||
.append("diseasePid", getDiseasePid())
|
||||
.append("diseaseId", getDiseaseId())
|
||||
.append("result", getResult())
|
||||
.append("begindate", getBegindate())
|
||||
.append("enddate", getEnddate())
|
||||
.append("treatDay", getTreatDay())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,149 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 消毒记录对象 sw_disinfect
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class Disinfect extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
private Long sheepfoldId;
|
||||
|
||||
/** 消毒日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "消毒日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/** 消毒方式 */
|
||||
@Excel(name = "消毒方式")
|
||||
private String way;
|
||||
|
||||
/** 药品使用记录id */
|
||||
@Excel(name = "药品使用记录id")
|
||||
private Long usageId;
|
||||
|
||||
/** 比例 */
|
||||
@Excel(name = "比例")
|
||||
private String ratio;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician)
|
||||
{
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician()
|
||||
{
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setWay(String way)
|
||||
{
|
||||
this.way = way;
|
||||
}
|
||||
|
||||
public String getWay()
|
||||
{
|
||||
return way;
|
||||
}
|
||||
|
||||
public void setUsageId(Long usageId)
|
||||
{
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
||||
public Long getUsageId()
|
||||
{
|
||||
return usageId;
|
||||
}
|
||||
|
||||
public void setRatio(String ratio)
|
||||
{
|
||||
this.ratio = ratio;
|
||||
}
|
||||
|
||||
public String getRatio()
|
||||
{
|
||||
return ratio;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("datetime", getDatetime())
|
||||
.append("technician", getTechnician())
|
||||
.append("way", getWay())
|
||||
.append("usageId", getUsageId())
|
||||
.append("ratio", getRatio())
|
||||
.append("comment", getComment())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,209 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 保健对象 sw_health
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class Health extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 保健日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "保健日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private Long sheepId;
|
||||
|
||||
/** 用药记录 */
|
||||
@Excel(name = "用药记录")
|
||||
private Long usageId;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String variety;
|
||||
|
||||
/** 羊只类别 */
|
||||
@Excel(name = "羊只类别")
|
||||
private String sheepType;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private String monthAge;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
private Long sheepfoldId;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technical;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setSheepId(Long sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Long getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setUsageId(Long usageId)
|
||||
{
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
||||
public Long getUsageId()
|
||||
{
|
||||
return usageId;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
public void setSheepType(String sheepType)
|
||||
{
|
||||
this.sheepType = sheepType;
|
||||
}
|
||||
|
||||
public String getSheepType()
|
||||
{
|
||||
return sheepType;
|
||||
}
|
||||
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setMonthAge(String monthAge)
|
||||
{
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public String getMonthAge()
|
||||
{
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setTechnical(String technical)
|
||||
{
|
||||
this.technical = technical;
|
||||
}
|
||||
|
||||
public String getTechnical()
|
||||
{
|
||||
return technical;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("datetime", getDatetime())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("usageId", getUsageId())
|
||||
.append("variety", getVariety())
|
||||
.append("sheepType", getSheepType())
|
||||
.append("gender", getGender())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("parity", getParity())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("technical", getTechnical())
|
||||
.append("comment", getComment())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,209 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 免疫对象 sw_immunity
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class Immunity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private Long sheepId;
|
||||
|
||||
/** 使用记录 */
|
||||
@Excel(name = "使用记录")
|
||||
private Long usageId;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String variety;
|
||||
|
||||
/** 羊只类型 */
|
||||
@Excel(name = "羊只类型")
|
||||
private Long sheepType;
|
||||
|
||||
/** 羊只性别 */
|
||||
@Excel(name = "羊只性别")
|
||||
private String gender;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Long monthAge;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 羊舍id */
|
||||
@Excel(name = "羊舍id")
|
||||
private Long sheepfoldId;
|
||||
|
||||
/** 免疫日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "免疫日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technical;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(Long sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Long getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setUsageId(Long usageId)
|
||||
{
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
||||
public Long getUsageId()
|
||||
{
|
||||
return usageId;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
public void setSheepType(Long sheepType)
|
||||
{
|
||||
this.sheepType = sheepType;
|
||||
}
|
||||
|
||||
public Long getSheepType()
|
||||
{
|
||||
return sheepType;
|
||||
}
|
||||
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setMonthAge(Long monthAge)
|
||||
{
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public Long getMonthAge()
|
||||
{
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setTechnical(String technical)
|
||||
{
|
||||
this.technical = technical;
|
||||
}
|
||||
|
||||
public String getTechnical()
|
||||
{
|
||||
return technical;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("usageId", getUsageId())
|
||||
.append("variety", getVariety())
|
||||
.append("sheepType", getSheepType())
|
||||
.append("gender", getGender())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("parity", getParity())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("datetime", getDatetime())
|
||||
.append("technical", getTechnical())
|
||||
.append("comment", getComment())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhyc.module.biosafety.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;
|
||||
|
||||
/**
|
||||
* 检疫项目对象 sw_quarantine_items
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public class QuarantineItems extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
import org.apache.ibatis.type.Alias;
|
||||
|
||||
/**
|
||||
* 检疫记录对象 sw_quarantine_report
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Data
|
||||
@Alias("QuarantineReport")
|
||||
public class QuarantineReport extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 羊只 */
|
||||
private Long sheepId;
|
||||
|
||||
@Excel(name = "羊只耳号")
|
||||
private String sheepNo;
|
||||
@Excel(name = "羊只类别")
|
||||
private String sheepType;
|
||||
@Excel(name = "羊只性别")
|
||||
private String gender;
|
||||
@Excel(name = "月龄")
|
||||
private Integer monthAge;
|
||||
@Excel(name = "胎次")
|
||||
private Integer parity;
|
||||
@Excel(name = "繁育状态")
|
||||
private String breed;
|
||||
|
||||
|
||||
/** 检疫日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "检疫日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 检疫项目 */
|
||||
|
||||
private Long quarItem;
|
||||
|
||||
/** 检疫项目 */
|
||||
@Excel(name = "检疫项目")
|
||||
private String itemName;
|
||||
|
||||
|
||||
/** 样品类型 */
|
||||
private Long sampleType;
|
||||
|
||||
/** 样品 */
|
||||
@Excel(name = "样品类型")
|
||||
private String sample;
|
||||
|
||||
|
||||
/** 采样员 */
|
||||
@Excel(name = "采样员")
|
||||
private String sampler;
|
||||
|
||||
/** 检疫员 */
|
||||
@Excel(name = "检疫员")
|
||||
private String quarOfficer;
|
||||
|
||||
/** 检疫结果 */
|
||||
@Excel(name = "检疫结果")
|
||||
private Long result;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.zhyc.module.biosafety.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;
|
||||
|
||||
/**
|
||||
* 样品类型对象 sw_quarantine_sample
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public class QuarantineSample extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 样品类型 */
|
||||
@Excel(name = "样品类型")
|
||||
private String name;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,283 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 治疗记录对象 sw_treatment
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public class Treatment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 诊疗记录id */
|
||||
private Long diagId;
|
||||
|
||||
/** 羊只耳号 */
|
||||
@Excel(name = "羊只耳号")
|
||||
private Long sheepId;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String variety;
|
||||
|
||||
/** 羊只类别 */
|
||||
@Excel(name = "羊只类别")
|
||||
private String sheepType;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Long monthAge;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 繁殖状态 */
|
||||
@Excel(name = "繁殖状态")
|
||||
private String breed;
|
||||
|
||||
/** 泌乳天数 */
|
||||
@Excel(name = "泌乳天数")
|
||||
private Long lactDay;
|
||||
|
||||
/** 怀孕天数 */
|
||||
@Excel(name = "怀孕天数")
|
||||
private Long gestDay;
|
||||
|
||||
/** 治疗日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "治疗日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 疾病类型 */
|
||||
@Excel(name = "疾病类型")
|
||||
private Long diseaseId;
|
||||
|
||||
/** 父疾病 */
|
||||
@Excel(name = "父疾病")
|
||||
private String diseasePid;
|
||||
|
||||
/** 兽医 */
|
||||
@Excel(name = "兽医")
|
||||
private String veterinary;
|
||||
|
||||
/** 药品使用记录id */
|
||||
@Excel(name = "药品使用记录id")
|
||||
private Long usageId;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDiagId(Long diagId)
|
||||
{
|
||||
this.diagId = diagId;
|
||||
}
|
||||
|
||||
public Long getDiagId()
|
||||
{
|
||||
return diagId;
|
||||
}
|
||||
|
||||
public void setSheepId(Long sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Long getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
public void setSheepType(String sheepType)
|
||||
{
|
||||
this.sheepType = sheepType;
|
||||
}
|
||||
|
||||
public String getSheepType()
|
||||
{
|
||||
return sheepType;
|
||||
}
|
||||
|
||||
public void setMonthAge(Long monthAge)
|
||||
{
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public Long getMonthAge()
|
||||
{
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setGender(String gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setBreed(String breed)
|
||||
{
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
public String getBreed()
|
||||
{
|
||||
return breed;
|
||||
}
|
||||
|
||||
public void setLactDay(Long lactDay)
|
||||
{
|
||||
this.lactDay = lactDay;
|
||||
}
|
||||
|
||||
public Long getLactDay()
|
||||
{
|
||||
return lactDay;
|
||||
}
|
||||
|
||||
public void setGestDay(Long gestDay)
|
||||
{
|
||||
this.gestDay = gestDay;
|
||||
}
|
||||
|
||||
public Long getGestDay()
|
||||
{
|
||||
return gestDay;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setDiseaseId(Long diseaseId)
|
||||
{
|
||||
this.diseaseId = diseaseId;
|
||||
}
|
||||
|
||||
public Long getDiseaseId()
|
||||
{
|
||||
return diseaseId;
|
||||
}
|
||||
|
||||
public void setDiseasePid(String diseasePid)
|
||||
{
|
||||
this.diseasePid = diseasePid;
|
||||
}
|
||||
|
||||
public String getDiseasePid()
|
||||
{
|
||||
return diseasePid;
|
||||
}
|
||||
|
||||
public void setVeterinary(String veterinary)
|
||||
{
|
||||
this.veterinary = veterinary;
|
||||
}
|
||||
|
||||
public String getVeterinary()
|
||||
{
|
||||
return veterinary;
|
||||
}
|
||||
|
||||
public void setUsageId(Long usageId)
|
||||
{
|
||||
this.usageId = usageId;
|
||||
}
|
||||
|
||||
public Long getUsageId()
|
||||
{
|
||||
return usageId;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("diagId", getDiagId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("variety", getVariety())
|
||||
.append("sheepType", getSheepType())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("gender", getGender())
|
||||
.append("parity", getParity())
|
||||
.append("breed", getBreed())
|
||||
.append("lactDay", getLactDay())
|
||||
.append("gestDay", getGestDay())
|
||||
.append("datetime", getDatetime())
|
||||
.append("diseaseId", getDiseaseId())
|
||||
.append("diseasePid", getDiseasePid())
|
||||
.append("veterinary", getVeterinary())
|
||||
.append("usageId", getUsageId())
|
||||
.append("comment", getComment())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
|
||||
/**
|
||||
* 驱虫Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface DewormMapper
|
||||
{
|
||||
/**
|
||||
* 查询驱虫
|
||||
*
|
||||
* @param id 驱虫主键
|
||||
* @return 驱虫
|
||||
*/
|
||||
public Deworm selectDewormById(Long id);
|
||||
|
||||
/**
|
||||
* 查询驱虫列表
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 驱虫集合
|
||||
*/
|
||||
public List<Deworm> selectDewormList(Deworm deworm);
|
||||
|
||||
/**
|
||||
* 新增驱虫
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeworm(Deworm deworm);
|
||||
|
||||
/**
|
||||
* 修改驱虫
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeworm(Deworm deworm);
|
||||
|
||||
/**
|
||||
* 删除驱虫
|
||||
*
|
||||
* @param id 驱虫主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDewormById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除驱虫
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDewormByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Diagnosis;
|
||||
|
||||
/**
|
||||
* 诊疗结果Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface DiagnosisMapper
|
||||
{
|
||||
/**
|
||||
* 查询诊疗结果
|
||||
*
|
||||
* @param id 诊疗结果主键
|
||||
* @return 诊疗结果
|
||||
*/
|
||||
public Diagnosis selectDiagnosisById(Long id);
|
||||
|
||||
/**
|
||||
* 查询诊疗结果列表
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 诊疗结果集合
|
||||
*/
|
||||
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis);
|
||||
|
||||
/**
|
||||
* 新增诊疗结果
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDiagnosis(Diagnosis diagnosis);
|
||||
|
||||
/**
|
||||
* 修改诊疗结果
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDiagnosis(Diagnosis diagnosis);
|
||||
|
||||
/**
|
||||
* 删除诊疗结果
|
||||
*
|
||||
* @param id 诊疗结果主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiagnosisById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除诊疗结果
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiagnosisByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Disinfect;
|
||||
|
||||
/**
|
||||
* 消毒记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface DisinfectMapper
|
||||
{
|
||||
/**
|
||||
* 查询消毒记录
|
||||
*
|
||||
* @param id 消毒记录主键
|
||||
* @return 消毒记录
|
||||
*/
|
||||
public Disinfect selectDisinfectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询消毒记录列表
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 消毒记录集合
|
||||
*/
|
||||
public List<Disinfect> selectDisinfectList(Disinfect disinfect);
|
||||
|
||||
/**
|
||||
* 新增消毒记录
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDisinfect(Disinfect disinfect);
|
||||
|
||||
/**
|
||||
* 修改消毒记录
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDisinfect(Disinfect disinfect);
|
||||
|
||||
/**
|
||||
* 删除消毒记录
|
||||
*
|
||||
* @param id 消毒记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDisinfectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除消毒记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDisinfectByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
|
||||
/**
|
||||
* 保健Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface HealthMapper
|
||||
{
|
||||
/**
|
||||
* 查询保健
|
||||
*
|
||||
* @param id 保健主键
|
||||
* @return 保健
|
||||
*/
|
||||
public Health selectHealthById(Long id);
|
||||
|
||||
/**
|
||||
* 查询保健列表
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 保健集合
|
||||
*/
|
||||
public List<Health> selectHealthList(Health health);
|
||||
|
||||
/**
|
||||
* 新增保健
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealth(Health health);
|
||||
|
||||
/**
|
||||
* 修改保健
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealth(Health health);
|
||||
|
||||
/**
|
||||
* 删除保健
|
||||
*
|
||||
* @param id 保健主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除保健
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Immunity;
|
||||
|
||||
/**
|
||||
* 免疫Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface ImmunityMapper
|
||||
{
|
||||
/**
|
||||
* 查询免疫
|
||||
*
|
||||
* @param id 免疫主键
|
||||
* @return 免疫
|
||||
*/
|
||||
public Immunity selectImmunityById(Long id);
|
||||
|
||||
/**
|
||||
* 查询免疫列表
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 免疫集合
|
||||
*/
|
||||
public List<Immunity> selectImmunityList(Immunity immunity);
|
||||
|
||||
/**
|
||||
* 新增免疫
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertImmunity(Immunity immunity);
|
||||
|
||||
/**
|
||||
* 修改免疫
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateImmunity(Immunity immunity);
|
||||
|
||||
/**
|
||||
* 删除免疫
|
||||
*
|
||||
* @param id 免疫主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteImmunityById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除免疫
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteImmunityByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineItems;
|
||||
|
||||
/**
|
||||
* 检疫项目Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QuarantineItemsMapper
|
||||
{
|
||||
/**
|
||||
* 查询检疫项目
|
||||
*
|
||||
* @param id 检疫项目主键
|
||||
* @return 检疫项目
|
||||
*/
|
||||
public QuarantineItems selectQuarantineItemsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询检疫项目列表
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 检疫项目集合
|
||||
*/
|
||||
public List<QuarantineItems> selectQuarantineItemsList(QuarantineItems quarantineItems);
|
||||
|
||||
/**
|
||||
* 新增检疫项目
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineItems(QuarantineItems quarantineItems);
|
||||
|
||||
/**
|
||||
* 修改检疫项目
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQuarantineItems(QuarantineItems quarantineItems);
|
||||
|
||||
/**
|
||||
* 删除检疫项目
|
||||
*
|
||||
* @param id 检疫项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineItemsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除检疫项目
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineItemsByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineReport;
|
||||
|
||||
/**
|
||||
* 检疫记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QuarantineReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询检疫记录
|
||||
*
|
||||
* @param id 检疫记录主键
|
||||
* @return 检疫记录
|
||||
*/
|
||||
public QuarantineReport selectQuarantineReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询检疫记录列表
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 检疫记录集合
|
||||
*/
|
||||
public List<QuarantineReport> selectQuarantineReportList(QuarantineReport quarantineReport);
|
||||
|
||||
/**
|
||||
* 新增检疫记录
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineReport(QuarantineReport quarantineReport);
|
||||
|
||||
/**
|
||||
* 修改检疫记录
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQuarantineReport(QuarantineReport quarantineReport);
|
||||
|
||||
/**
|
||||
* 删除检疫记录
|
||||
*
|
||||
* @param id 检疫记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除检疫记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineReportByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineSample;
|
||||
|
||||
/**
|
||||
* 样品类型Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface QuarantineSampleMapper
|
||||
{
|
||||
/**
|
||||
* 查询样品类型
|
||||
*
|
||||
* @param id 样品类型主键
|
||||
* @return 样品类型
|
||||
*/
|
||||
public QuarantineSample selectQuarantineSampleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询样品类型列表
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 样品类型集合
|
||||
*/
|
||||
public List<QuarantineSample> selectQuarantineSampleList(QuarantineSample quarantineSample);
|
||||
|
||||
/**
|
||||
* 新增样品类型
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineSample(QuarantineSample quarantineSample);
|
||||
|
||||
/**
|
||||
* 修改样品类型
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQuarantineSample(QuarantineSample quarantineSample);
|
||||
|
||||
/**
|
||||
* 删除样品类型
|
||||
*
|
||||
* @param id 样品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineSampleById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除样品类型
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineSampleByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
|
||||
/**
|
||||
* 治疗记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface TreatmentMapper
|
||||
{
|
||||
/**
|
||||
* 查询治疗记录
|
||||
*
|
||||
* @param id 治疗记录主键
|
||||
* @return 治疗记录
|
||||
*/
|
||||
public Treatment selectTreatmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询治疗记录列表
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 治疗记录集合
|
||||
*/
|
||||
public List<Treatment> selectTreatmentList(Treatment treatment);
|
||||
|
||||
/**
|
||||
* 新增治疗记录
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTreatment(Treatment treatment);
|
||||
|
||||
/**
|
||||
* 修改治疗记录
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTreatment(Treatment treatment);
|
||||
|
||||
/**
|
||||
* 删除治疗记录
|
||||
*
|
||||
* @param id 治疗记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTreatmentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除治疗记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTreatmentByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
|
||||
/**
|
||||
* 驱虫Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IDewormService
|
||||
{
|
||||
/**
|
||||
* 查询驱虫
|
||||
*
|
||||
* @param id 驱虫主键
|
||||
* @return 驱虫
|
||||
*/
|
||||
public Deworm selectDewormById(Long id);
|
||||
|
||||
/**
|
||||
* 查询驱虫列表
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 驱虫集合
|
||||
*/
|
||||
public List<Deworm> selectDewormList(Deworm deworm);
|
||||
|
||||
/**
|
||||
* 新增驱虫
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDeworm(Deworm deworm);
|
||||
|
||||
/**
|
||||
* 修改驱虫
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDeworm(Deworm deworm);
|
||||
|
||||
/**
|
||||
* 批量删除驱虫
|
||||
*
|
||||
* @param ids 需要删除的驱虫主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDewormByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除驱虫信息
|
||||
*
|
||||
* @param id 驱虫主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDewormById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Diagnosis;
|
||||
|
||||
/**
|
||||
* 诊疗结果Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IDiagnosisService
|
||||
{
|
||||
/**
|
||||
* 查询诊疗结果
|
||||
*
|
||||
* @param id 诊疗结果主键
|
||||
* @return 诊疗结果
|
||||
*/
|
||||
public Diagnosis selectDiagnosisById(Long id);
|
||||
|
||||
/**
|
||||
* 查询诊疗结果列表
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 诊疗结果集合
|
||||
*/
|
||||
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis);
|
||||
|
||||
/**
|
||||
* 新增诊疗结果
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDiagnosis(Diagnosis diagnosis);
|
||||
|
||||
/**
|
||||
* 修改诊疗结果
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDiagnosis(Diagnosis diagnosis);
|
||||
|
||||
/**
|
||||
* 批量删除诊疗结果
|
||||
*
|
||||
* @param ids 需要删除的诊疗结果主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiagnosisByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除诊疗结果信息
|
||||
*
|
||||
* @param id 诊疗结果主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiagnosisById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Disinfect;
|
||||
|
||||
/**
|
||||
* 消毒记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IDisinfectService
|
||||
{
|
||||
/**
|
||||
* 查询消毒记录
|
||||
*
|
||||
* @param id 消毒记录主键
|
||||
* @return 消毒记录
|
||||
*/
|
||||
public Disinfect selectDisinfectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询消毒记录列表
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 消毒记录集合
|
||||
*/
|
||||
public List<Disinfect> selectDisinfectList(Disinfect disinfect);
|
||||
|
||||
/**
|
||||
* 新增消毒记录
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDisinfect(Disinfect disinfect);
|
||||
|
||||
/**
|
||||
* 修改消毒记录
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDisinfect(Disinfect disinfect);
|
||||
|
||||
/**
|
||||
* 批量删除消毒记录
|
||||
*
|
||||
* @param ids 需要删除的消毒记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDisinfectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除消毒记录信息
|
||||
*
|
||||
* @param id 消毒记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDisinfectById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
|
||||
/**
|
||||
* 保健Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IHealthService
|
||||
{
|
||||
/**
|
||||
* 查询保健
|
||||
*
|
||||
* @param id 保健主键
|
||||
* @return 保健
|
||||
*/
|
||||
public Health selectHealthById(Long id);
|
||||
|
||||
/**
|
||||
* 查询保健列表
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 保健集合
|
||||
*/
|
||||
public List<Health> selectHealthList(Health health);
|
||||
|
||||
/**
|
||||
* 新增保健
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHealth(Health health);
|
||||
|
||||
/**
|
||||
* 修改保健
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHealth(Health health);
|
||||
|
||||
/**
|
||||
* 批量删除保健
|
||||
*
|
||||
* @param ids 需要删除的保健主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除保健信息
|
||||
*
|
||||
* @param id 保健主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.biosafety.domain.Immunity;
|
||||
|
||||
/**
|
||||
* 免疫Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IImmunityService
|
||||
{
|
||||
/**
|
||||
* 查询免疫
|
||||
*
|
||||
* @param id 免疫主键
|
||||
* @return 免疫
|
||||
*/
|
||||
public Immunity selectImmunityById(Long id);
|
||||
|
||||
/**
|
||||
* 查询免疫列表
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 免疫集合
|
||||
*/
|
||||
public List<Immunity> selectImmunityList(Immunity immunity);
|
||||
|
||||
/**
|
||||
* 新增免疫
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertImmunity(Immunity immunity);
|
||||
|
||||
/**
|
||||
* 修改免疫
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateImmunity(Immunity immunity);
|
||||
|
||||
/**
|
||||
* 批量删除免疫
|
||||
*
|
||||
* @param ids 需要删除的免疫主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteImmunityByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除免疫信息
|
||||
*
|
||||
* @param id 免疫主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteImmunityById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineItems;
|
||||
|
||||
/**
|
||||
* 检疫项目Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQuarantineItemsService
|
||||
{
|
||||
/**
|
||||
* 查询检疫项目
|
||||
*
|
||||
* @param id 检疫项目主键
|
||||
* @return 检疫项目
|
||||
*/
|
||||
public QuarantineItems selectQuarantineItemsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询检疫项目列表
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 检疫项目集合
|
||||
*/
|
||||
public List<QuarantineItems> selectQuarantineItemsList(QuarantineItems quarantineItems);
|
||||
|
||||
/**
|
||||
* 新增检疫项目
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineItems(QuarantineItems quarantineItems);
|
||||
|
||||
/**
|
||||
* 修改检疫项目
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQuarantineItems(QuarantineItems quarantineItems);
|
||||
|
||||
/**
|
||||
* 批量删除检疫项目
|
||||
*
|
||||
* @param ids 需要删除的检疫项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineItemsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除检疫项目信息
|
||||
*
|
||||
* @param id 检疫项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineItemsById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineReport;
|
||||
|
||||
/**
|
||||
* 检疫记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQuarantineReportService
|
||||
{
|
||||
/**
|
||||
* 查询检疫记录
|
||||
*
|
||||
* @param id 检疫记录主键
|
||||
* @return 检疫记录
|
||||
*/
|
||||
public QuarantineReport selectQuarantineReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询检疫记录列表
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 检疫记录集合
|
||||
*/
|
||||
public List<QuarantineReport> selectQuarantineReportList(QuarantineReport quarantineReport);
|
||||
|
||||
/**
|
||||
* 新增检疫记录
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineReport(QuarantineReport quarantineReport);
|
||||
|
||||
/**
|
||||
* 修改检疫记录
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQuarantineReport(QuarantineReport quarantineReport);
|
||||
|
||||
/**
|
||||
* 批量删除检疫记录
|
||||
*
|
||||
* @param ids 需要删除的检疫记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineReportByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除检疫记录信息
|
||||
*
|
||||
* @param id 检疫记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineReportById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineSample;
|
||||
|
||||
/**
|
||||
* 样品类型Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IQuarantineSampleService
|
||||
{
|
||||
/**
|
||||
* 查询样品类型
|
||||
*
|
||||
* @param id 样品类型主键
|
||||
* @return 样品类型
|
||||
*/
|
||||
public QuarantineSample selectQuarantineSampleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询样品类型列表
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 样品类型集合
|
||||
*/
|
||||
public List<QuarantineSample> selectQuarantineSampleList(QuarantineSample quarantineSample);
|
||||
|
||||
/**
|
||||
* 新增样品类型
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineSample(QuarantineSample quarantineSample);
|
||||
|
||||
/**
|
||||
* 修改样品类型
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQuarantineSample(QuarantineSample quarantineSample);
|
||||
|
||||
/**
|
||||
* 批量删除样品类型
|
||||
*
|
||||
* @param ids 需要删除的样品类型主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineSampleByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除样品类型信息
|
||||
*
|
||||
* @param id 样品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineSampleById(Long id);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.zhyc.module.biosafety.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
|
||||
/**
|
||||
* 治疗记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface ITreatmentService
|
||||
{
|
||||
/**
|
||||
* 查询治疗记录
|
||||
*
|
||||
* @param id 治疗记录主键
|
||||
* @return 治疗记录
|
||||
*/
|
||||
public Treatment selectTreatmentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询治疗记录列表
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 治疗记录集合
|
||||
*/
|
||||
public List<Treatment> selectTreatmentList(Treatment treatment);
|
||||
|
||||
/**
|
||||
* 新增治疗记录
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTreatment(Treatment treatment);
|
||||
|
||||
/**
|
||||
* 修改治疗记录
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTreatment(Treatment treatment);
|
||||
|
||||
/**
|
||||
* 批量删除治疗记录
|
||||
*
|
||||
* @param ids 需要删除的治疗记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTreatmentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除治疗记录信息
|
||||
*
|
||||
* @param id 治疗记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTreatmentById(Long id);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.DewormMapper;
|
||||
import com.zhyc.module.biosafety.service.IDewormService;
|
||||
|
||||
/**
|
||||
* 驱虫Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class DewormServiceImpl implements IDewormService
|
||||
{
|
||||
@Autowired
|
||||
private DewormMapper dewormMapper;
|
||||
|
||||
/**
|
||||
* 查询驱虫
|
||||
*
|
||||
* @param id 驱虫主键
|
||||
* @return 驱虫
|
||||
*/
|
||||
@Override
|
||||
public Deworm selectDewormById(Long id)
|
||||
{
|
||||
return dewormMapper.selectDewormById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询驱虫列表
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 驱虫
|
||||
*/
|
||||
@Override
|
||||
public List<Deworm> selectDewormList(Deworm deworm)
|
||||
{
|
||||
return dewormMapper.selectDewormList(deworm);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增驱虫
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDeworm(Deworm deworm)
|
||||
{
|
||||
deworm.setCreateTime(DateUtils.getNowDate());
|
||||
return dewormMapper.insertDeworm(deworm);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改驱虫
|
||||
*
|
||||
* @param deworm 驱虫
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDeworm(Deworm deworm)
|
||||
{
|
||||
deworm.setUpdateTime(DateUtils.getNowDate());
|
||||
return dewormMapper.updateDeworm(deworm);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除驱虫
|
||||
*
|
||||
* @param ids 需要删除的驱虫主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDewormByIds(Long[] ids)
|
||||
{
|
||||
return dewormMapper.deleteDewormByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除驱虫信息
|
||||
*
|
||||
* @param id 驱虫主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDewormById(Long id)
|
||||
{
|
||||
return dewormMapper.deleteDewormById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.biosafety.mapper.DiagnosisMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.domain.Diagnosis;
|
||||
import com.zhyc.module.biosafety.service.IDiagnosisService;
|
||||
|
||||
/**
|
||||
* 诊疗结果Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class DiagnosisServiceImpl implements IDiagnosisService
|
||||
{
|
||||
@Autowired
|
||||
private DiagnosisMapper diagnosisMapper;
|
||||
|
||||
/**
|
||||
* 查询诊疗结果
|
||||
*
|
||||
* @param id 诊疗结果主键
|
||||
* @return 诊疗结果
|
||||
*/
|
||||
@Override
|
||||
public Diagnosis selectDiagnosisById(Long id)
|
||||
{
|
||||
return diagnosisMapper.selectDiagnosisById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗结果列表
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 诊疗结果
|
||||
*/
|
||||
@Override
|
||||
public List<Diagnosis> selectDiagnosisList(Diagnosis diagnosis)
|
||||
{
|
||||
return diagnosisMapper.selectDiagnosisList(diagnosis);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增诊疗结果
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDiagnosis(Diagnosis diagnosis)
|
||||
{
|
||||
diagnosis.setCreateTime(DateUtils.getNowDate());
|
||||
return diagnosisMapper.insertDiagnosis(diagnosis);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改诊疗结果
|
||||
*
|
||||
* @param diagnosis 诊疗结果
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDiagnosis(Diagnosis diagnosis)
|
||||
{
|
||||
return diagnosisMapper.updateDiagnosis(diagnosis);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除诊疗结果
|
||||
*
|
||||
* @param ids 需要删除的诊疗结果主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDiagnosisByIds(Long[] ids)
|
||||
{
|
||||
return diagnosisMapper.deleteDiagnosisByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除诊疗结果信息
|
||||
*
|
||||
* @param id 诊疗结果主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDiagnosisById(Long id)
|
||||
{
|
||||
return diagnosisMapper.deleteDiagnosisById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.DisinfectMapper;
|
||||
import com.zhyc.module.biosafety.domain.Disinfect;
|
||||
import com.zhyc.module.biosafety.service.IDisinfectService;
|
||||
|
||||
/**
|
||||
* 消毒记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class DisinfectServiceImpl implements IDisinfectService
|
||||
{
|
||||
@Autowired
|
||||
private DisinfectMapper disinfectMapper;
|
||||
|
||||
/**
|
||||
* 查询消毒记录
|
||||
*
|
||||
* @param id 消毒记录主键
|
||||
* @return 消毒记录
|
||||
*/
|
||||
@Override
|
||||
public Disinfect selectDisinfectById(Long id)
|
||||
{
|
||||
return disinfectMapper.selectDisinfectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询消毒记录列表
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 消毒记录
|
||||
*/
|
||||
@Override
|
||||
public List<Disinfect> selectDisinfectList(Disinfect disinfect)
|
||||
{
|
||||
return disinfectMapper.selectDisinfectList(disinfect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消毒记录
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDisinfect(Disinfect disinfect)
|
||||
{
|
||||
disinfect.setCreateTime(DateUtils.getNowDate());
|
||||
return disinfectMapper.insertDisinfect(disinfect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消毒记录
|
||||
*
|
||||
* @param disinfect 消毒记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDisinfect(Disinfect disinfect)
|
||||
{
|
||||
disinfect.setUpdateTime(DateUtils.getNowDate());
|
||||
return disinfectMapper.updateDisinfect(disinfect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除消毒记录
|
||||
*
|
||||
* @param ids 需要删除的消毒记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDisinfectByIds(Long[] ids)
|
||||
{
|
||||
return disinfectMapper.deleteDisinfectByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消毒记录信息
|
||||
*
|
||||
* @param id 消毒记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDisinfectById(Long id)
|
||||
{
|
||||
return disinfectMapper.deleteDisinfectById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.HealthMapper;
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.module.biosafety.service.IHealthService;
|
||||
|
||||
/**
|
||||
* 保健Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class HealthServiceImpl implements IHealthService
|
||||
{
|
||||
@Autowired
|
||||
private HealthMapper healthMapper;
|
||||
|
||||
/**
|
||||
* 查询保健
|
||||
*
|
||||
* @param id 保健主键
|
||||
* @return 保健
|
||||
*/
|
||||
@Override
|
||||
public Health selectHealthById(Long id)
|
||||
{
|
||||
return healthMapper.selectHealthById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询保健列表
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 保健
|
||||
*/
|
||||
@Override
|
||||
public List<Health> selectHealthList(Health health)
|
||||
{
|
||||
return healthMapper.selectHealthList(health);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保健
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHealth(Health health)
|
||||
{
|
||||
health.setCreateTime(DateUtils.getNowDate());
|
||||
return healthMapper.insertHealth(health);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保健
|
||||
*
|
||||
* @param health 保健
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHealth(Health health)
|
||||
{
|
||||
health.setUpdateTime(DateUtils.getNowDate());
|
||||
return healthMapper.updateHealth(health);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除保健
|
||||
*
|
||||
* @param ids 需要删除的保健主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthByIds(Long[] ids)
|
||||
{
|
||||
return healthMapper.deleteHealthByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保健信息
|
||||
*
|
||||
* @param id 保健主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHealthById(Long id)
|
||||
{
|
||||
return healthMapper.deleteHealthById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.ImmunityMapper;
|
||||
import com.zhyc.module.biosafety.domain.Immunity;
|
||||
import com.zhyc.module.biosafety.service.IImmunityService;
|
||||
|
||||
/**
|
||||
* 免疫Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class ImmunityServiceImpl implements IImmunityService
|
||||
{
|
||||
@Autowired
|
||||
private ImmunityMapper immunityMapper;
|
||||
|
||||
/**
|
||||
* 查询免疫
|
||||
*
|
||||
* @param id 免疫主键
|
||||
* @return 免疫
|
||||
*/
|
||||
@Override
|
||||
public Immunity selectImmunityById(Long id)
|
||||
{
|
||||
return immunityMapper.selectImmunityById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询免疫列表
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 免疫
|
||||
*/
|
||||
@Override
|
||||
public List<Immunity> selectImmunityList(Immunity immunity)
|
||||
{
|
||||
return immunityMapper.selectImmunityList(immunity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增免疫
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertImmunity(Immunity immunity)
|
||||
{
|
||||
immunity.setCreateTime(DateUtils.getNowDate());
|
||||
return immunityMapper.insertImmunity(immunity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改免疫
|
||||
*
|
||||
* @param immunity 免疫
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateImmunity(Immunity immunity)
|
||||
{
|
||||
immunity.setUpdateTime(DateUtils.getNowDate());
|
||||
return immunityMapper.updateImmunity(immunity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除免疫
|
||||
*
|
||||
* @param ids 需要删除的免疫主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteImmunityByIds(Long[] ids)
|
||||
{
|
||||
return immunityMapper.deleteImmunityByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除免疫信息
|
||||
*
|
||||
* @param id 免疫主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteImmunityById(Long id)
|
||||
{
|
||||
return immunityMapper.deleteImmunityById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.QuarantineItems;
|
||||
import com.zhyc.module.biosafety.mapper.QuarantineItemsMapper;
|
||||
import com.zhyc.module.biosafety.service.IQuarantineItemsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 检疫项目Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Service
|
||||
public class QuarantineItemsServiceImpl implements IQuarantineItemsService
|
||||
{
|
||||
@Autowired
|
||||
private QuarantineItemsMapper quarantineItemsMapper;
|
||||
|
||||
/**
|
||||
* 查询检疫项目
|
||||
*
|
||||
* @param id 检疫项目主键
|
||||
* @return 检疫项目
|
||||
*/
|
||||
@Override
|
||||
public QuarantineItems selectQuarantineItemsById(Long id)
|
||||
{
|
||||
return quarantineItemsMapper.selectQuarantineItemsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检疫项目列表
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 检疫项目
|
||||
*/
|
||||
@Override
|
||||
public List<QuarantineItems> selectQuarantineItemsList(QuarantineItems quarantineItems)
|
||||
{
|
||||
return quarantineItemsMapper.selectQuarantineItemsList(quarantineItems);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检疫项目
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertQuarantineItems(QuarantineItems quarantineItems)
|
||||
{
|
||||
return quarantineItemsMapper.insertQuarantineItems(quarantineItems);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检疫项目
|
||||
*
|
||||
* @param quarantineItems 检疫项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateQuarantineItems(QuarantineItems quarantineItems)
|
||||
{
|
||||
return quarantineItemsMapper.updateQuarantineItems(quarantineItems);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检疫项目
|
||||
*
|
||||
* @param ids 需要删除的检疫项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQuarantineItemsByIds(Long[] ids)
|
||||
{
|
||||
return quarantineItemsMapper.deleteQuarantineItemsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检疫项目信息
|
||||
*
|
||||
* @param id 检疫项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQuarantineItemsById(Long id)
|
||||
{
|
||||
return quarantineItemsMapper.deleteQuarantineItemsById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.QuarantineReportMapper;
|
||||
import com.zhyc.module.biosafety.domain.QuarantineReport;
|
||||
import com.zhyc.module.biosafety.service.IQuarantineReportService;
|
||||
|
||||
/**
|
||||
* 检疫记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Service
|
||||
public class QuarantineReportServiceImpl implements IQuarantineReportService
|
||||
{
|
||||
@Autowired
|
||||
private QuarantineReportMapper quarantineReportMapper;
|
||||
|
||||
/**
|
||||
* 查询检疫记录
|
||||
*
|
||||
* @param id 检疫记录主键
|
||||
* @return 检疫记录
|
||||
*/
|
||||
@Override
|
||||
public QuarantineReport selectQuarantineReportById(Long id)
|
||||
{
|
||||
return quarantineReportMapper.selectQuarantineReportById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检疫记录列表
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 检疫记录
|
||||
*/
|
||||
@Override
|
||||
public List<QuarantineReport> selectQuarantineReportList(QuarantineReport quarantineReport)
|
||||
{
|
||||
return quarantineReportMapper.selectQuarantineReportList(quarantineReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检疫记录
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertQuarantineReport(QuarantineReport quarantineReport)
|
||||
{
|
||||
quarantineReport.setCreateTime(DateUtils.getNowDate());
|
||||
return quarantineReportMapper.insertQuarantineReport(quarantineReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检疫记录
|
||||
*
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateQuarantineReport(QuarantineReport quarantineReport)
|
||||
{
|
||||
quarantineReport.setUpdateTime(DateUtils.getNowDate());
|
||||
return quarantineReportMapper.updateQuarantineReport(quarantineReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检疫记录
|
||||
*
|
||||
* @param ids 需要删除的检疫记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQuarantineReportByIds(Long[] ids)
|
||||
{
|
||||
return quarantineReportMapper.deleteQuarantineReportByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检疫记录信息
|
||||
*
|
||||
* @param id 检疫记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQuarantineReportById(Long id)
|
||||
{
|
||||
return quarantineReportMapper.deleteQuarantineReportById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.QuarantineSampleMapper;
|
||||
import com.zhyc.module.biosafety.domain.QuarantineSample;
|
||||
import com.zhyc.module.biosafety.service.IQuarantineSampleService;
|
||||
|
||||
/**
|
||||
* 样品类型Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Service
|
||||
public class QuarantineSampleServiceImpl implements IQuarantineSampleService
|
||||
{
|
||||
@Autowired
|
||||
private QuarantineSampleMapper quarantineSampleMapper;
|
||||
|
||||
/**
|
||||
* 查询样品类型
|
||||
*
|
||||
* @param id 样品类型主键
|
||||
* @return 样品类型
|
||||
*/
|
||||
@Override
|
||||
public QuarantineSample selectQuarantineSampleById(Long id)
|
||||
{
|
||||
return quarantineSampleMapper.selectQuarantineSampleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询样品类型列表
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 样品类型
|
||||
*/
|
||||
@Override
|
||||
public List<QuarantineSample> selectQuarantineSampleList(QuarantineSample quarantineSample)
|
||||
{
|
||||
return quarantineSampleMapper.selectQuarantineSampleList(quarantineSample);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增样品类型
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertQuarantineSample(QuarantineSample quarantineSample)
|
||||
{
|
||||
return quarantineSampleMapper.insertQuarantineSample(quarantineSample);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改样品类型
|
||||
*
|
||||
* @param quarantineSample 样品类型
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateQuarantineSample(QuarantineSample quarantineSample)
|
||||
{
|
||||
return quarantineSampleMapper.updateQuarantineSample(quarantineSample);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除样品类型
|
||||
*
|
||||
* @param ids 需要删除的样品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQuarantineSampleByIds(Long[] ids)
|
||||
{
|
||||
return quarantineSampleMapper.deleteQuarantineSampleByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除样品类型信息
|
||||
*
|
||||
* @param id 样品类型主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQuarantineSampleById(Long id)
|
||||
{
|
||||
return quarantineSampleMapper.deleteQuarantineSampleById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.TreatmentMapper;
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import com.zhyc.module.biosafety.service.ITreatmentService;
|
||||
|
||||
/**
|
||||
* 治疗记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class TreatmentServiceImpl implements ITreatmentService
|
||||
{
|
||||
@Autowired
|
||||
private TreatmentMapper treatmentMapper;
|
||||
|
||||
/**
|
||||
* 查询治疗记录
|
||||
*
|
||||
* @param id 治疗记录主键
|
||||
* @return 治疗记录
|
||||
*/
|
||||
@Override
|
||||
public Treatment selectTreatmentById(Long id)
|
||||
{
|
||||
return treatmentMapper.selectTreatmentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询治疗记录列表
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 治疗记录
|
||||
*/
|
||||
@Override
|
||||
public List<Treatment> selectTreatmentList(Treatment treatment)
|
||||
{
|
||||
return treatmentMapper.selectTreatmentList(treatment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增治疗记录
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTreatment(Treatment treatment)
|
||||
{
|
||||
treatment.setCreateTime(DateUtils.getNowDate());
|
||||
return treatmentMapper.insertTreatment(treatment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改治疗记录
|
||||
*
|
||||
* @param treatment 治疗记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTreatment(Treatment treatment)
|
||||
{
|
||||
treatment.setUpdateTime(DateUtils.getNowDate());
|
||||
return treatmentMapper.updateTreatment(treatment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除治疗记录
|
||||
*
|
||||
* @param ids 需要删除的治疗记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTreatmentByIds(Long[] ids)
|
||||
{
|
||||
return treatmentMapper.deleteTreatmentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除治疗记录信息
|
||||
*
|
||||
* @param id 治疗记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTreatmentById(Long id)
|
||||
{
|
||||
return treatmentMapper.deleteTreatmentById(id);
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.zhyc.module.dryMatterCorrection.controller;
|
||||
package com.zhyc.module.dairyProducts.dryMatterCorrection.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -16,11 +16,17 @@ 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.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
import com.zhyc.module.dryMatterCorrection.service.IXzDryMatterCorrectionService;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.service.IXzDryMatterCorrectionService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 干物质校正Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dryMatterCorrection/dryMatterCorrection")
|
||||
public class XzDryMatterCorrectionController extends BaseController
|
||||
@ -28,33 +34,34 @@ public class XzDryMatterCorrectionController extends BaseController
|
||||
@Autowired
|
||||
private IXzDryMatterCorrectionService xzDryMatterCorrectionService;
|
||||
|
||||
/**
|
||||
* 查询干物质校正列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dryMatterCorrection:dryMatterCorrection:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(XzDryMatterCorrection xzDryMatterCorrection)
|
||||
{
|
||||
// 只保留年月查询条件,清空其他查询条件
|
||||
XzDryMatterCorrection query = new XzDryMatterCorrection();
|
||||
query.setDatetime(xzDryMatterCorrection.getDatetime());
|
||||
|
||||
startPage();
|
||||
List<XzDryMatterCorrection> list = xzDryMatterCorrectionService.selectXzDryMatterCorrectionList(query);
|
||||
List<XzDryMatterCorrection> list = xzDryMatterCorrectionService.selectXzDryMatterCorrectionList(xzDryMatterCorrection);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出干物质校正列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dryMatterCorrection:dryMatterCorrection:export')")
|
||||
@Log(title = "干物质校正", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XzDryMatterCorrection xzDryMatterCorrection)
|
||||
{
|
||||
// 只保留年月查询条件,清空其他查询条件
|
||||
XzDryMatterCorrection query = new XzDryMatterCorrection();
|
||||
query.setDatetime(xzDryMatterCorrection.getDatetime());
|
||||
|
||||
List<XzDryMatterCorrection> list = xzDryMatterCorrectionService.selectXzDryMatterCorrectionList(query);
|
||||
List<XzDryMatterCorrection> list = xzDryMatterCorrectionService.selectXzDryMatterCorrectionList(xzDryMatterCorrection);
|
||||
ExcelUtil<XzDryMatterCorrection> util = new ExcelUtil<XzDryMatterCorrection>(XzDryMatterCorrection.class);
|
||||
util.exportExcel(response, list, "干物质校正数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取干物质校正详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dryMatterCorrection:dryMatterCorrection:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
@ -62,6 +69,9 @@ public class XzDryMatterCorrectionController extends BaseController
|
||||
return success(xzDryMatterCorrectionService.selectXzDryMatterCorrectionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增干物质校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dryMatterCorrection:dryMatterCorrection:add')")
|
||||
@Log(title = "干物质校正", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ -70,6 +80,9 @@ public class XzDryMatterCorrectionController extends BaseController
|
||||
return toAjax(xzDryMatterCorrectionService.insertXzDryMatterCorrection(xzDryMatterCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改干物质校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dryMatterCorrection:dryMatterCorrection:edit')")
|
||||
@Log(title = "干物质校正", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@ -78,11 +91,14 @@ public class XzDryMatterCorrectionController extends BaseController
|
||||
return toAjax(xzDryMatterCorrectionService.updateXzDryMatterCorrection(xzDryMatterCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除干物质校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('dryMatterCorrection:dryMatterCorrection:remove')")
|
||||
@Log(title = "干物质校正", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(xzDryMatterCorrectionService.deleteXzDryMatterCorrectionByIds(ids));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.zhyc.module.dairyProducts.dryMatterCorrection.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;
|
||||
|
||||
public class XzDryMatterCorrection extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM")
|
||||
@Excel(name = "年月", width = 30, dateFormat = "yyyy-MM")
|
||||
private Date datetime;
|
||||
|
||||
@Excel(name = "厂区")
|
||||
private String factory;
|
||||
|
||||
@Excel(name = "干物质含量")
|
||||
private Double content;
|
||||
|
||||
@Excel(name = "干物质标准")
|
||||
private Double standard;
|
||||
|
||||
@Excel(name = "干物质系数")
|
||||
private Double coefficient;
|
||||
|
||||
// getters and setters...
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public Date getDatetime() { return datetime; }
|
||||
public void setDatetime(Date datetime) { this.datetime = datetime; }
|
||||
public String getFactory() { return factory; }
|
||||
public void setFactory(String factory) { this.factory = factory; }
|
||||
public Double getContent() { return content; }
|
||||
public void setContent(Double content) { this.content = content; }
|
||||
public Double getStandard() { return standard; }
|
||||
public void setStandard(Double standard) { this.standard = standard; }
|
||||
public Double getCoefficient() { return coefficient; }
|
||||
public void setCoefficient(Double coefficient) { this.coefficient = coefficient; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", id)
|
||||
.append("datetime", datetime)
|
||||
.append("factory", factory)
|
||||
.append("content", content)
|
||||
.append("standard", standard)
|
||||
.append("coefficient", coefficient)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,13 @@
|
||||
package com.zhyc.module.dryMatterCorrection.mapper;
|
||||
package com.zhyc.module.dairyProducts.dryMatterCorrection.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
|
||||
/**
|
||||
* 干物质校正Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public interface XzDryMatterCorrectionMapper
|
||||
{
|
||||
@ -1,19 +1,19 @@
|
||||
package com.zhyc.module.dryMatterCorrection.service;
|
||||
package com.zhyc.module.dairyProducts.dryMatterCorrection.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
|
||||
/**
|
||||
* 干物质校正Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public interface IXzDryMatterCorrectionService
|
||||
public interface IXzDryMatterCorrectionService
|
||||
{
|
||||
/**
|
||||
* 查询干物质校正
|
||||
*
|
||||
*
|
||||
* @param id 干物质校正主键
|
||||
* @return 干物质校正
|
||||
*/
|
||||
@ -21,7 +21,7 @@ public interface IXzDryMatterCorrectionService
|
||||
|
||||
/**
|
||||
* 查询干物质校正列表
|
||||
*
|
||||
*
|
||||
* @param xzDryMatterCorrection 干物质校正
|
||||
* @return 干物质校正集合
|
||||
*/
|
||||
@ -29,7 +29,7 @@ public interface IXzDryMatterCorrectionService
|
||||
|
||||
/**
|
||||
* 新增干物质校正
|
||||
*
|
||||
*
|
||||
* @param xzDryMatterCorrection 干物质校正
|
||||
* @return 结果
|
||||
*/
|
||||
@ -37,7 +37,7 @@ public interface IXzDryMatterCorrectionService
|
||||
|
||||
/**
|
||||
* 修改干物质校正
|
||||
*
|
||||
*
|
||||
* @param xzDryMatterCorrection 干物质校正
|
||||
* @return 结果
|
||||
*/
|
||||
@ -45,7 +45,7 @@ public interface IXzDryMatterCorrectionService
|
||||
|
||||
/**
|
||||
* 批量删除干物质校正
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的干物质校正主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@ -53,7 +53,7 @@ public interface IXzDryMatterCorrectionService
|
||||
|
||||
/**
|
||||
* 删除干物质校正信息
|
||||
*
|
||||
*
|
||||
* @param id 干物质校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.dairyProducts.dryMatterCorrection.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.mapper.XzDryMatterCorrectionMapper;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
import com.zhyc.module.dairyProducts.dryMatterCorrection.service.IXzDryMatterCorrectionService;
|
||||
|
||||
/**
|
||||
* 干物质校正Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@Service
|
||||
public class XzDryMatterCorrectionServiceImpl implements IXzDryMatterCorrectionService
|
||||
{
|
||||
@Autowired
|
||||
private XzDryMatterCorrectionMapper xzDryMatterCorrectionMapper;
|
||||
|
||||
/**
|
||||
* 查询干物质校正
|
||||
*
|
||||
* @param id 干物质校正主键
|
||||
* @return 干物质校正
|
||||
*/
|
||||
@Override
|
||||
public XzDryMatterCorrection selectXzDryMatterCorrectionById(Long id)
|
||||
{
|
||||
return xzDryMatterCorrectionMapper.selectXzDryMatterCorrectionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询干物质校正列表
|
||||
*
|
||||
* @param xzDryMatterCorrection 干物质校正
|
||||
* @return 干物质校正
|
||||
*/
|
||||
@Override
|
||||
public List<XzDryMatterCorrection> selectXzDryMatterCorrectionList(XzDryMatterCorrection xzDryMatterCorrection)
|
||||
{
|
||||
return xzDryMatterCorrectionMapper.selectXzDryMatterCorrectionList(xzDryMatterCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增干物质校正
|
||||
*
|
||||
* @param xzDryMatterCorrection 干物质校正
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertXzDryMatterCorrection(XzDryMatterCorrection xzDryMatterCorrection)
|
||||
{
|
||||
return xzDryMatterCorrectionMapper.insertXzDryMatterCorrection(xzDryMatterCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改干物质校正
|
||||
*
|
||||
* @param xzDryMatterCorrection 干物质校正
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateXzDryMatterCorrection(XzDryMatterCorrection xzDryMatterCorrection)
|
||||
{
|
||||
return xzDryMatterCorrectionMapper.updateXzDryMatterCorrection(xzDryMatterCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除干物质校正
|
||||
*
|
||||
* @param ids 需要删除的干物质校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteXzDryMatterCorrectionByIds(Long[] ids)
|
||||
{
|
||||
return xzDryMatterCorrectionMapper.deleteXzDryMatterCorrectionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除干物质校正信息
|
||||
*
|
||||
* @param id 干物质校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteXzDryMatterCorrectionById(Long id)
|
||||
{
|
||||
return xzDryMatterCorrectionMapper.deleteXzDryMatterCorrectionById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.dairyProducts.parityCorrection.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.domain.XzParityCorrection;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.service.IXzParityCorrectionService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 胎次校正Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/parityCorrection/parityCorrection")
|
||||
public class XzParityCorrectionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IXzParityCorrectionService xzParityCorrectionService;
|
||||
|
||||
/**
|
||||
* 查询胎次校正列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('parityCorrection:parityCorrection:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
startPage();
|
||||
List<XzParityCorrection> list = xzParityCorrectionService.selectXzParityCorrectionList(xzParityCorrection);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出胎次校正列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('parityCorrection:parityCorrection:export')")
|
||||
@Log(title = "胎次校正", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
List<XzParityCorrection> list = xzParityCorrectionService.selectXzParityCorrectionList(xzParityCorrection);
|
||||
ExcelUtil<XzParityCorrection> util = new ExcelUtil<XzParityCorrection>(XzParityCorrection.class);
|
||||
util.exportExcel(response, list, "胎次校正数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取胎次校正详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('parityCorrection:parityCorrection:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(xzParityCorrectionService.selectXzParityCorrectionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增胎次校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('parityCorrection:parityCorrection:add')")
|
||||
@Log(title = "胎次校正", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
return toAjax(xzParityCorrectionService.insertXzParityCorrection(xzParityCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改胎次校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('parityCorrection:parityCorrection:edit')")
|
||||
@Log(title = "胎次校正", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
return toAjax(xzParityCorrectionService.updateXzParityCorrection(xzParityCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除胎次校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('parityCorrection:parityCorrection:remove')")
|
||||
@Log(title = "胎次校正", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(xzParityCorrectionService.deleteXzParityCorrectionByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.zhyc.module.dairyProducts.parityCorrection.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;
|
||||
|
||||
/**
|
||||
* 胎次校正对象 xz_parity_correction
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public class XzParityCorrection extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Integer parity;
|
||||
|
||||
/** 系数 */
|
||||
@Excel(name = "系数")
|
||||
private Double coef;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setParity(Integer parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Integer getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setCoef(Double coef)
|
||||
{
|
||||
this.coef = coef;
|
||||
}
|
||||
|
||||
public Double getCoef()
|
||||
{
|
||||
return coef;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parity", getParity())
|
||||
.append("coef", getCoef())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.dairyProducts.parityCorrection.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.domain.XzParityCorrection;
|
||||
|
||||
/**
|
||||
* 胎次校正Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface XzParityCorrectionMapper
|
||||
{
|
||||
/**
|
||||
* 查询胎次校正
|
||||
*
|
||||
* @param id 胎次校正主键
|
||||
* @return 胎次校正
|
||||
*/
|
||||
public XzParityCorrection selectXzParityCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询胎次校正列表
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 胎次校正集合
|
||||
*/
|
||||
public List<XzParityCorrection> selectXzParityCorrectionList(XzParityCorrection xzParityCorrection);
|
||||
|
||||
/**
|
||||
* 新增胎次校正
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertXzParityCorrection(XzParityCorrection xzParityCorrection);
|
||||
|
||||
/**
|
||||
* 修改胎次校正
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXzParityCorrection(XzParityCorrection xzParityCorrection);
|
||||
|
||||
/**
|
||||
* 删除胎次校正
|
||||
*
|
||||
* @param id 胎次校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzParityCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除胎次校正
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzParityCorrectionByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.dairyProducts.parityCorrection.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.domain.XzParityCorrection;
|
||||
|
||||
/**
|
||||
* 胎次校正Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IXzParityCorrectionService
|
||||
{
|
||||
/**
|
||||
* 查询胎次校正
|
||||
*
|
||||
* @param id 胎次校正主键
|
||||
* @return 胎次校正
|
||||
*/
|
||||
public XzParityCorrection selectXzParityCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询胎次校正列表
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 胎次校正集合
|
||||
*/
|
||||
public List<XzParityCorrection> selectXzParityCorrectionList(XzParityCorrection xzParityCorrection);
|
||||
|
||||
/**
|
||||
* 新增胎次校正
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertXzParityCorrection(XzParityCorrection xzParityCorrection);
|
||||
|
||||
/**
|
||||
* 修改胎次校正
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXzParityCorrection(XzParityCorrection xzParityCorrection);
|
||||
|
||||
/**
|
||||
* 批量删除胎次校正
|
||||
*
|
||||
* @param ids 需要删除的胎次校正主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzParityCorrectionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除胎次校正信息
|
||||
*
|
||||
* @param id 胎次校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzParityCorrectionById(Long id);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.dairyProducts.parityCorrection.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.mapper.XzParityCorrectionMapper;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.domain.XzParityCorrection;
|
||||
import com.zhyc.module.dairyProducts.parityCorrection.service.IXzParityCorrectionService;
|
||||
|
||||
/**
|
||||
* 胎次校正Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Service
|
||||
public class XzParityCorrectionServiceImpl implements IXzParityCorrectionService
|
||||
{
|
||||
@Autowired
|
||||
private XzParityCorrectionMapper xzParityCorrectionMapper;
|
||||
|
||||
/**
|
||||
* 查询胎次校正
|
||||
*
|
||||
* @param id 胎次校正主键
|
||||
* @return 胎次校正
|
||||
*/
|
||||
@Override
|
||||
public XzParityCorrection selectXzParityCorrectionById(Long id)
|
||||
{
|
||||
return xzParityCorrectionMapper.selectXzParityCorrectionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询胎次校正列表
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 胎次校正
|
||||
*/
|
||||
@Override
|
||||
public List<XzParityCorrection> selectXzParityCorrectionList(XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
return xzParityCorrectionMapper.selectXzParityCorrectionList(xzParityCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增胎次校正
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertXzParityCorrection(XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
return xzParityCorrectionMapper.insertXzParityCorrection(xzParityCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改胎次校正
|
||||
*
|
||||
* @param xzParityCorrection 胎次校正
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateXzParityCorrection(XzParityCorrection xzParityCorrection)
|
||||
{
|
||||
return xzParityCorrectionMapper.updateXzParityCorrection(xzParityCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除胎次校正
|
||||
*
|
||||
* @param ids 需要删除的胎次校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteXzParityCorrectionByIds(Long[] ids)
|
||||
{
|
||||
return xzParityCorrectionMapper.deleteXzParityCorrectionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除胎次校正信息
|
||||
*
|
||||
* @param id 胎次校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteXzParityCorrectionById(Long id)
|
||||
{
|
||||
return xzParityCorrectionMapper.deleteXzParityCorrectionById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.zhyc.module.dairyProducts.weightCorrection.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.domain.XzWegihCorrection;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.service.IXzWegihCorrectionService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 称重校正Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/weightCorrection/weightCorrection")
|
||||
public class XzWegihCorrectionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IXzWegihCorrectionService xzWegihCorrectionService;
|
||||
|
||||
/**
|
||||
* 查询称重校正列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('weightCorrection:weightCorrection:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
startPage();
|
||||
List<XzWegihCorrection> list = xzWegihCorrectionService.selectXzWegihCorrectionList(xzWegihCorrection);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出称重校正列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('weightCorrection:weightCorrection:export')")
|
||||
@Log(title = "称重校正", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
List<XzWegihCorrection> list = xzWegihCorrectionService.selectXzWegihCorrectionList(xzWegihCorrection);
|
||||
ExcelUtil<XzWegihCorrection> util = new ExcelUtil<XzWegihCorrection>(XzWegihCorrection.class);
|
||||
util.exportExcel(response, list, "称重校正数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取称重校正详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('weightCorrection:weightCorrection:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(xzWegihCorrectionService.selectXzWegihCorrectionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增称重校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('weightCorrection:weightCorrection:add')")
|
||||
@Log(title = "称重校正", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
return toAjax(xzWegihCorrectionService.insertXzWegihCorrection(xzWegihCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改称重校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('weightCorrection:weightCorrection:edit')")
|
||||
@Log(title = "称重校正", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
return toAjax(xzWegihCorrectionService.updateXzWegihCorrection(xzWegihCorrection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除称重校正
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('weightCorrection:weightCorrection:remove')")
|
||||
@Log(title = "称重校正", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(xzWegihCorrectionService.deleteXzWegihCorrectionByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.zhyc.module.dairyProducts.weightCorrection.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;
|
||||
|
||||
/**
|
||||
* 称重校正对象 xz_wegih_correction
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public class XzWegihCorrection extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 厂区 */
|
||||
@Excel(name = "厂区")
|
||||
private String factory;
|
||||
|
||||
/** 实际奶量 */
|
||||
@Excel(name = "实际奶量")
|
||||
private Double actual;
|
||||
|
||||
/** 系统奶量 */
|
||||
@Excel(name = "系统奶量")
|
||||
private Double systemMilk; // 修改字段名
|
||||
|
||||
/** 称重系数(计算字段) */
|
||||
@Excel(name = "称重系数")
|
||||
private Double coefficient;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime)
|
||||
{
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime()
|
||||
{
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setFactory(String factory)
|
||||
{
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
public String getFactory()
|
||||
{
|
||||
return factory;
|
||||
}
|
||||
|
||||
public void setActual(Double actual)
|
||||
{
|
||||
this.actual = actual;
|
||||
}
|
||||
|
||||
public Double getActual()
|
||||
{
|
||||
return actual;
|
||||
}
|
||||
|
||||
public void setSystemMilk(Double systemMilk)
|
||||
{
|
||||
this.systemMilk = systemMilk;
|
||||
}
|
||||
|
||||
public Double getSystemMilk()
|
||||
{
|
||||
return systemMilk;
|
||||
}
|
||||
|
||||
public Double getCoefficient() {
|
||||
return coefficient;
|
||||
}
|
||||
|
||||
public void setCoefficient(Double coefficient) {
|
||||
this.coefficient = coefficient;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("datetime", getDatetime())
|
||||
.append("factory", getFactory())
|
||||
.append("actual", getActual())
|
||||
.append("systemMilk", getSystemMilk())
|
||||
.append("coefficient", getCoefficient())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.dairyProducts.weightCorrection.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.domain.XzWegihCorrection;
|
||||
|
||||
/**
|
||||
* 称重校正Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public interface XzWegihCorrectionMapper
|
||||
{
|
||||
/**
|
||||
* 查询称重校正
|
||||
*
|
||||
* @param id 称重校正主键
|
||||
* @return 称重校正
|
||||
*/
|
||||
public XzWegihCorrection selectXzWegihCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询称重校正列表
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 称重校正集合
|
||||
*/
|
||||
public List<XzWegihCorrection> selectXzWegihCorrectionList(XzWegihCorrection xzWegihCorrection);
|
||||
|
||||
/**
|
||||
* 新增称重校正
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertXzWegihCorrection(XzWegihCorrection xzWegihCorrection);
|
||||
|
||||
/**
|
||||
* 修改称重校正
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXzWegihCorrection(XzWegihCorrection xzWegihCorrection);
|
||||
|
||||
/**
|
||||
* 删除称重校正
|
||||
*
|
||||
* @param id 称重校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzWegihCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除称重校正
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzWegihCorrectionByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.zhyc.module.dairyProducts.weightCorrection.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.domain.XzWegihCorrection;
|
||||
|
||||
/**
|
||||
* 称重校正Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
public interface IXzWegihCorrectionService
|
||||
{
|
||||
/**
|
||||
* 查询称重校正
|
||||
*
|
||||
* @param id 称重校正主键
|
||||
* @return 称重校正
|
||||
*/
|
||||
public XzWegihCorrection selectXzWegihCorrectionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询称重校正列表
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 称重校正集合
|
||||
*/
|
||||
public List<XzWegihCorrection> selectXzWegihCorrectionList(XzWegihCorrection xzWegihCorrection);
|
||||
|
||||
/**
|
||||
* 新增称重校正
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertXzWegihCorrection(XzWegihCorrection xzWegihCorrection);
|
||||
|
||||
/**
|
||||
* 修改称重校正
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateXzWegihCorrection(XzWegihCorrection xzWegihCorrection);
|
||||
|
||||
/**
|
||||
* 批量删除称重校正
|
||||
*
|
||||
* @param ids 需要删除的称重校正主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzWegihCorrectionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除称重校正信息
|
||||
*
|
||||
* @param id 称重校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteXzWegihCorrectionById(Long id);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.zhyc.module.dairyProducts.weightCorrection.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.mapper.XzWegihCorrectionMapper;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.domain.XzWegihCorrection;
|
||||
import com.zhyc.module.dairyProducts.weightCorrection.service.IXzWegihCorrectionService;
|
||||
|
||||
/**
|
||||
* 称重校正Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-12
|
||||
*/
|
||||
@Service
|
||||
public class XzWegihCorrectionServiceImpl implements IXzWegihCorrectionService
|
||||
{
|
||||
@Autowired
|
||||
private XzWegihCorrectionMapper xzWegihCorrectionMapper;
|
||||
|
||||
/**
|
||||
* 查询称重校正
|
||||
*
|
||||
* @param id 称重校正主键
|
||||
* @return 称重校正
|
||||
*/
|
||||
@Override
|
||||
public XzWegihCorrection selectXzWegihCorrectionById(Long id)
|
||||
{
|
||||
return xzWegihCorrectionMapper.selectXzWegihCorrectionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询称重校正列表
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 称重校正
|
||||
*/
|
||||
@Override
|
||||
public List<XzWegihCorrection> selectXzWegihCorrectionList(XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
return xzWegihCorrectionMapper.selectXzWegihCorrectionList(xzWegihCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增称重校正
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertXzWegihCorrection(XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
return xzWegihCorrectionMapper.insertXzWegihCorrection(xzWegihCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改称重校正
|
||||
*
|
||||
* @param xzWegihCorrection 称重校正
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateXzWegihCorrection(XzWegihCorrection xzWegihCorrection)
|
||||
{
|
||||
return xzWegihCorrectionMapper.updateXzWegihCorrection(xzWegihCorrection);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除称重校正
|
||||
*
|
||||
* @param ids 需要删除的称重校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteXzWegihCorrectionByIds(Long[] ids)
|
||||
{
|
||||
return xzWegihCorrectionMapper.deleteXzWegihCorrectionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除称重校正信息
|
||||
*
|
||||
* @param id 称重校正主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteXzWegihCorrectionById(Long id)
|
||||
{
|
||||
return xzWegihCorrectionMapper.deleteXzWegihCorrectionById(id);
|
||||
}
|
||||
}
|
||||
@ -1,100 +0,0 @@
|
||||
package com.zhyc.module.dryMatterCorrection.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;
|
||||
|
||||
/**
|
||||
* 干物质校正对象 xz_dry_matter_correction
|
||||
*/
|
||||
public class XzDryMatterCorrection extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 年月 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "年月", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 厂区 */
|
||||
@Excel(name = "厂区")
|
||||
private String factory;
|
||||
|
||||
/** 干物质含量 */
|
||||
@Excel(name = "干物质含量")
|
||||
private String content;
|
||||
|
||||
/** 干物质标准 */
|
||||
@Excel(name = "干物质标准")
|
||||
private String standard;
|
||||
|
||||
/** 干物质系数 */
|
||||
@Excel(name = "干物质系数") // 移除了numFormat
|
||||
private Double coefficient;
|
||||
|
||||
// Getter和Setter
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getDatetime() {
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime) {
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public String getFactory() {
|
||||
return factory;
|
||||
}
|
||||
|
||||
public void setFactory(String factory) {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getStandard() {
|
||||
return standard;
|
||||
}
|
||||
|
||||
public void setStandard(String standard) {
|
||||
this.standard = standard;
|
||||
}
|
||||
|
||||
public Double getCoefficient() {
|
||||
return coefficient;
|
||||
}
|
||||
|
||||
public void setCoefficient(Double coefficient) {
|
||||
this.coefficient = coefficient;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", id)
|
||||
.append("datetime", datetime)
|
||||
.append("factory", factory)
|
||||
.append("content", content)
|
||||
.append("standard", standard)
|
||||
.append("coefficient", coefficient)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,74 +0,0 @@
|
||||
package com.zhyc.module.dryMatterCorrection.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.dryMatterCorrection.mapper.XzDryMatterCorrectionMapper;
|
||||
import com.zhyc.module.dryMatterCorrection.domain.XzDryMatterCorrection;
|
||||
import com.zhyc.module.dryMatterCorrection.service.IXzDryMatterCorrectionService;
|
||||
|
||||
@Service
|
||||
public class XzDryMatterCorrectionServiceImpl implements IXzDryMatterCorrectionService {
|
||||
|
||||
@Autowired
|
||||
private XzDryMatterCorrectionMapper xzDryMatterCorrectionMapper;
|
||||
|
||||
@Override
|
||||
public XzDryMatterCorrection selectXzDryMatterCorrectionById(Long id) {
|
||||
return xzDryMatterCorrectionMapper.selectXzDryMatterCorrectionById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XzDryMatterCorrection> selectXzDryMatterCorrectionList(XzDryMatterCorrection xzDryMatterCorrection) {
|
||||
return xzDryMatterCorrectionMapper.selectXzDryMatterCorrectionList(xzDryMatterCorrection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertXzDryMatterCorrection(XzDryMatterCorrection xzDryMatterCorrection) {
|
||||
calculateCoefficient(xzDryMatterCorrection);
|
||||
return xzDryMatterCorrectionMapper.insertXzDryMatterCorrection(xzDryMatterCorrection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateXzDryMatterCorrection(XzDryMatterCorrection xzDryMatterCorrection) {
|
||||
calculateCoefficient(xzDryMatterCorrection);
|
||||
return xzDryMatterCorrectionMapper.updateXzDryMatterCorrection(xzDryMatterCorrection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteXzDryMatterCorrectionByIds(Long[] ids) {
|
||||
return xzDryMatterCorrectionMapper.deleteXzDryMatterCorrectionByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteXzDryMatterCorrectionById(Long id) {
|
||||
return xzDryMatterCorrectionMapper.deleteXzDryMatterCorrectionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算干物质系数(含格式控制)
|
||||
*/
|
||||
private void calculateCoefficient(XzDryMatterCorrection xzDryMatterCorrection) {
|
||||
if (xzDryMatterCorrection.getContent() != null &&
|
||||
xzDryMatterCorrection.getStandard() != null) {
|
||||
try {
|
||||
double content = Double.parseDouble(xzDryMatterCorrection.getContent());
|
||||
double standard = Double.parseDouble(xzDryMatterCorrection.getStandard());
|
||||
|
||||
if (standard != 0) {
|
||||
double coefficient = content / standard;
|
||||
// 手动控制4位小数(替代numFormat功能)
|
||||
xzDryMatterCorrection.setCoefficient(
|
||||
Double.parseDouble(String.format("%.4f", coefficient))
|
||||
);
|
||||
} else {
|
||||
xzDryMatterCorrection.setCoefficient(null);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
xzDryMatterCorrection.setCoefficient(null);
|
||||
}
|
||||
} else {
|
||||
xzDryMatterCorrection.setCoefficient(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.zhyc.module.fileManagement.controller;
|
||||
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
import com.zhyc.module.fileManagement.service.IBasSheepGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组管理Controller
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/group_management/group_management")
|
||||
public class BasSheepGroupController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasSheepGroupService basSheepGroupService;
|
||||
|
||||
/**
|
||||
* 查询分组管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('group_management:group_management:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(BasSheepGroup basSheepGroup)
|
||||
{
|
||||
List<BasSheepGroup> list = basSheepGroupService.selectBasSheepGroupList(basSheepGroup);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出分组管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('group_management:group_management:export')")
|
||||
@Log(title = "分组管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasSheepGroup basSheepGroup)
|
||||
{
|
||||
List<BasSheepGroup> list = basSheepGroupService.selectBasSheepGroupList(basSheepGroup);
|
||||
ExcelUtil<BasSheepGroup> util = new ExcelUtil<BasSheepGroup>(BasSheepGroup.class);
|
||||
util.exportExcel(response, list, "分组管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分组管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('group_management:group_management:query')")
|
||||
@GetMapping(value = "/{groupId}")
|
||||
public AjaxResult getInfo(@PathVariable("groupId") Long groupId)
|
||||
{
|
||||
return success(basSheepGroupService.selectBasSheepGroupByGroupId(groupId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分组管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('group_management:group_management:add')")
|
||||
@Log(title = "分组管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasSheepGroup basSheepGroup)
|
||||
{
|
||||
return toAjax(basSheepGroupService.insertBasSheepGroup(basSheepGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分组管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('group_management:group_management:edit')")
|
||||
@Log(title = "分组管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasSheepGroup basSheepGroup)
|
||||
{
|
||||
return toAjax(basSheepGroupService.updateBasSheepGroup(basSheepGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分组管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('group_management:group_management:remove')")
|
||||
@Log(title = "分组管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{groupIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] groupIds)
|
||||
{
|
||||
return toAjax(basSheepGroupService.deleteBasSheepGroupByGroupIds(groupIds));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,25 +1,19 @@
|
||||
package com.zhyc.module.sheepfold_management.controller;
|
||||
package com.zhyc.module.fileManagement.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
import com.zhyc.module.fileManagement.service.IDaSheepfoldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 羊舍管理Controller
|
||||
@ -101,4 +95,16 @@ public class DaSheepfoldController extends BaseController
|
||||
{
|
||||
return toAjax(daSheepfoldService.deleteDaSheepfoldByIds(ids));
|
||||
}
|
||||
/**
|
||||
* 检查羊舍编号是否已存在
|
||||
*/
|
||||
@GetMapping("/checkSheepfoldNoExist")
|
||||
public AjaxResult checkSheepfoldNoExist(
|
||||
@RequestParam Long ranchId,
|
||||
@RequestParam Long sheepfoldTypeId,
|
||||
@RequestParam String sheepfoldNo
|
||||
) {
|
||||
boolean exist = daSheepfoldService.checkSheepfoldNoExist(ranchId, sheepfoldTypeId, sheepfoldNo);
|
||||
return AjaxResult.success(exist);
|
||||
}
|
||||
}
|
||||
@ -1,25 +1,19 @@
|
||||
package com.zhyc.module.sheep_file.controller;
|
||||
package com.zhyc.module.fileManagement.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
import com.zhyc.module.sheep_file.service.ISheepFileService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
import com.zhyc.module.fileManagement.service.ISheepFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 羊只档案Controller
|
||||
@ -0,0 +1,113 @@
|
||||
package com.zhyc.module.fileManagement.domain;
|
||||
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.TreeEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 分组管理对象 bas_sheep_group
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public class BasSheepGroup extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分组ID */
|
||||
@Excel(name = "分组ID")
|
||||
private Long groupId;
|
||||
|
||||
/** 分组名称 */
|
||||
@Excel(name = "分组名称")
|
||||
private String groupName;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "祖级列表")
|
||||
private String ancestors;
|
||||
|
||||
/** 祖级列表名称 */
|
||||
@Excel(name = "祖级列表名称")
|
||||
private String ancestorNames;
|
||||
|
||||
public void setAncestorNames(String ancestorNames) {
|
||||
this.ancestorNames = ancestorNames;
|
||||
}
|
||||
|
||||
public String getAncestorNames() {
|
||||
return ancestorNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAncestors() {
|
||||
return ancestors;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAncestors(String ancestors) {
|
||||
this.ancestors = ancestors;
|
||||
}
|
||||
|
||||
/** 是否为叶子节点 */
|
||||
private Boolean isLeaf;
|
||||
|
||||
// ... getter 和 setter
|
||||
public Boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setIsLeaf(Boolean isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId)
|
||||
{
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public Long getGroupId()
|
||||
{
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupName(String groupName)
|
||||
{
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getGroupName()
|
||||
{
|
||||
return groupName;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("groupId", getGroupId())
|
||||
.append("parentId", getParentId())
|
||||
.append("groupName", getGroupName())
|
||||
.append("ancestors", getAncestors())
|
||||
.append("ancestorNames", getAncestorNames()) // 新增这一行
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,9 @@
|
||||
package com.zhyc.module.sheepfold_management.domain;
|
||||
package com.zhyc.module.fileManagement.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;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 羊舍管理对象 da_sheepfold
|
||||
@ -1,11 +1,12 @@
|
||||
package com.zhyc.module.sheep_file.domain;
|
||||
package com.zhyc.module.fileManagement.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;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 羊只档案对象 sheep_file
|
||||
@ -0,0 +1,63 @@
|
||||
package com.zhyc.module.fileManagement.mapper;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组管理Mapper接口
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface BasSheepGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询分组管理
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 分组管理
|
||||
*/
|
||||
public BasSheepGroup selectBasSheepGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 查询分组管理列表
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 分组管理集合
|
||||
*/
|
||||
public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup);
|
||||
|
||||
/**
|
||||
* 新增分组管理
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasSheepGroup(BasSheepGroup basSheepGroup);
|
||||
|
||||
/**
|
||||
* 修改分组管理
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasSheepGroup(BasSheepGroup basSheepGroup);
|
||||
|
||||
/**
|
||||
* 删除分组管理
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 批量删除分组管理
|
||||
*
|
||||
* @param groupIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepGroupByGroupIds(Long[] groupIds);
|
||||
|
||||
}
|
||||
@ -1,7 +1,8 @@
|
||||
package com.zhyc.module.sheepfold_management.mapper;
|
||||
package com.zhyc.module.fileManagement.mapper;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
|
||||
/**
|
||||
* 羊舍管理Mapper接口
|
||||
@ -58,5 +59,7 @@ public interface DaSheepfoldMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldByIds(Long[] ids);
|
||||
|
||||
public int selectCount(DaSheepfold daSheepfold);
|
||||
|
||||
}
|
||||
@ -1,7 +1,8 @@
|
||||
package com.zhyc.module.sheep_file.mapper;
|
||||
package com.zhyc.module.fileManagement.mapper;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
|
||||
/**
|
||||
* 羊只档案Mapper接口
|
||||
@ -0,0 +1,64 @@
|
||||
package com.zhyc.module.fileManagement.service;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组管理Service接口
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
public interface IBasSheepGroupService
|
||||
{
|
||||
/**
|
||||
* 查询分组管理
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 分组管理
|
||||
*/
|
||||
public BasSheepGroup selectBasSheepGroupByGroupId(Long groupId);
|
||||
|
||||
/**
|
||||
* 查询分组管理列表
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 分组管理集合
|
||||
*/
|
||||
public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup);
|
||||
|
||||
/**
|
||||
* 新增分组管理
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasSheepGroup(BasSheepGroup basSheepGroup);
|
||||
|
||||
/**
|
||||
* 修改分组管理
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasSheepGroup(BasSheepGroup basSheepGroup);
|
||||
|
||||
/**
|
||||
* 批量删除分组管理
|
||||
*
|
||||
* @param groupIds 需要删除的分组管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepGroupByGroupIds(Long[] groupIds);
|
||||
|
||||
/**
|
||||
* 删除分组管理信息
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasSheepGroupByGroupId(Long groupId);
|
||||
|
||||
|
||||
}
|
||||
@ -1,7 +1,8 @@
|
||||
package com.zhyc.module.sheepfold_management.service;
|
||||
package com.zhyc.module.fileManagement.service;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
|
||||
/**
|
||||
* 羊舍管理Service接口
|
||||
@ -58,4 +59,14 @@ public interface IDaSheepfoldService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDaSheepfoldById(Long id);
|
||||
|
||||
/**
|
||||
* 检查羊舍编号是否已存在
|
||||
*
|
||||
* @param ranchId 羊舍所属牧场ID
|
||||
* @param sheepfoldTypeId 羊舍类型ID
|
||||
* @param sheepfoldNo 羊舍编号
|
||||
* @return 是否已存在
|
||||
*/
|
||||
boolean checkSheepfoldNoExist(Long ranchId, Long sheepfoldTypeId, String sheepfoldNo);
|
||||
}
|
||||
@ -1,7 +1,8 @@
|
||||
package com.zhyc.module.sheep_file.service;
|
||||
package com.zhyc.module.fileManagement.service;
|
||||
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
|
||||
/**
|
||||
* 羊只档案Service接口
|
||||
@ -0,0 +1,111 @@
|
||||
package com.zhyc.module.fileManagement.service.impl;
|
||||
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.fileManagement.domain.BasSheepGroup;
|
||||
import com.zhyc.module.fileManagement.mapper.BasSheepGroupMapper;
|
||||
import com.zhyc.module.fileManagement.service.IBasSheepGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组管理Service业务层处理
|
||||
*
|
||||
* @author wyt
|
||||
* @date 2025-07-14
|
||||
*/
|
||||
@Service
|
||||
public class BasSheepGroupServiceImpl implements IBasSheepGroupService
|
||||
{
|
||||
@Autowired
|
||||
private BasSheepGroupMapper basSheepGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询分组管理
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 分组管理
|
||||
*/
|
||||
@Override
|
||||
public BasSheepGroup selectBasSheepGroupByGroupId(Long groupId)
|
||||
{
|
||||
return basSheepGroupMapper.selectBasSheepGroupByGroupId(groupId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分组管理列表
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 分组管理
|
||||
*/
|
||||
// @Override
|
||||
// public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup)
|
||||
// {
|
||||
// return basSheepGroupMapper.selectBasSheepGroupList(basSheepGroup);
|
||||
// }
|
||||
@Override
|
||||
public List<BasSheepGroup> selectBasSheepGroupList(BasSheepGroup basSheepGroup) {
|
||||
List<BasSheepGroup> groups = basSheepGroupMapper.selectBasSheepGroupList(basSheepGroup);
|
||||
|
||||
// 处理祖先名称显示格式
|
||||
groups.forEach(group -> {
|
||||
if (group.getAncestorNames() != null) {
|
||||
String formattedNames = group.getAncestorNames().replace(",", " / ");
|
||||
group.setAncestorNames(formattedNames);
|
||||
}
|
||||
});
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分组管理
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasSheepGroup(BasSheepGroup basSheepGroup)
|
||||
{
|
||||
basSheepGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return basSheepGroupMapper.insertBasSheepGroup(basSheepGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分组管理
|
||||
*
|
||||
* @param basSheepGroup 分组管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasSheepGroup(BasSheepGroup basSheepGroup)
|
||||
{
|
||||
basSheepGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return basSheepGroupMapper.updateBasSheepGroup(basSheepGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除分组管理
|
||||
*
|
||||
* @param groupIds 需要删除的分组管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasSheepGroupByGroupIds(Long[] groupIds)
|
||||
{
|
||||
return basSheepGroupMapper.deleteBasSheepGroupByGroupIds(groupIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分组管理信息
|
||||
*
|
||||
* @param groupId 分组管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasSheepGroupByGroupId(Long groupId)
|
||||
{
|
||||
return basSheepGroupMapper.deleteBasSheepGroupByGroupId(groupId);
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,12 @@
|
||||
package com.zhyc.module.sheepfold_management.service.impl;
|
||||
package com.zhyc.module.fileManagement.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.fileManagement.domain.DaSheepfold;
|
||||
import com.zhyc.module.fileManagement.mapper.DaSheepfoldMapper;
|
||||
import com.zhyc.module.fileManagement.service.IDaSheepfoldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheepfold_management.mapper.DaSheepfoldMapper;
|
||||
import com.zhyc.module.sheepfold_management.domain.DaSheepfold;
|
||||
import com.zhyc.module.sheepfold_management.service.IDaSheepfoldService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 羊舍管理Service业务层处理
|
||||
@ -90,4 +91,14 @@ public class DaSheepfoldServiceImpl implements IDaSheepfoldService
|
||||
{
|
||||
return daSheepfoldMapper.deleteDaSheepfoldById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkSheepfoldNoExist(Long ranchId, Long sheepfoldTypeId, String sheepfoldNo) {
|
||||
DaSheepfold query = new DaSheepfold();
|
||||
query.setRanchId(ranchId);
|
||||
query.setSheepfoldTypeId(sheepfoldTypeId);
|
||||
query.setSheepfoldNo(sheepfoldNo);
|
||||
return daSheepfoldMapper.selectCount(query) > 0;
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,13 @@
|
||||
package com.zhyc.module.sheep_file.service.impl;
|
||||
package com.zhyc.module.fileManagement.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.fileManagement.domain.SheepFile;
|
||||
import com.zhyc.module.fileManagement.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.fileManagement.service.ISheepFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.sheep_file.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.sheep_file.domain.SheepFile;
|
||||
import com.zhyc.module.sheep_file.service.ISheepFileService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 羊只档案Service业务层处理
|
||||
@ -0,0 +1,146 @@
|
||||
package com.zhyc.module.produce.breed.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.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
import com.zhyc.module.produce.breed.service.IScLambingRecordService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 产羔记录Controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/breed/lambing_records")
|
||||
public class ScLambingRecordController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IScLambingRecordService scLambingRecordService;
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScLambingRecord scLambingRecord) {
|
||||
startPage();
|
||||
List<ScLambingRecord> list = scLambingRecordService.selectScLambingRecordList(scLambingRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产羔记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:export')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScLambingRecord scLambingRecord) {
|
||||
List<ScLambingRecord> list = scLambingRecordService.selectScLambingRecordList(scLambingRecord);
|
||||
ExcelUtil<ScLambingRecord> util = new ExcelUtil<ScLambingRecord>(ScLambingRecord.class);
|
||||
util.exportExcel(response, list, "产羔记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产羔记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(scLambingRecordService.selectScLambingRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产羔记录(包含羔羊详情)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:add')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScLambingRecord scLambingRecord) {
|
||||
try {
|
||||
// 设置创建人
|
||||
scLambingRecord.setCreateBy(getUsername());
|
||||
|
||||
// 如果没有设置创建时间,使用当前时间
|
||||
if (scLambingRecord.getCreateTime() == null) {
|
||||
scLambingRecord.setCreateTime(new java.util.Date());
|
||||
}
|
||||
|
||||
int result = scLambingRecordService.insertScLambingRecord(scLambingRecord);
|
||||
|
||||
if (result > 0) {
|
||||
String message = "新增产羔记录成功";
|
||||
if (scLambingRecord.getLambDetails() != null && !scLambingRecord.getLambDetails().isEmpty()) {
|
||||
message += ",同时录入了 " + scLambingRecord.getLambDetails().size() + " 只羔羊详情";
|
||||
}
|
||||
return success(message);
|
||||
} else {
|
||||
return error("新增产羔记录失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("新增产羔记录异常", e);
|
||||
return error("新增产羔记录失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:edit')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScLambingRecord scLambingRecord) {
|
||||
try {
|
||||
scLambingRecord.setUpdateBy(getUsername());
|
||||
scLambingRecord.setUpdateTime(new java.util.Date());
|
||||
return toAjax(scLambingRecordService.updateScLambingRecord(scLambingRecord));
|
||||
} catch (Exception e) {
|
||||
logger.error("修改产羔记录异常", e);
|
||||
return error("修改产羔记录失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产羔记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:remove')")
|
||||
@Log(title = "产羔记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
try {
|
||||
return toAjax(scLambingRecordService.deleteScLambingRecordByIds(ids));
|
||||
} catch (Exception e) {
|
||||
logger.error("删除产羔记录异常", e);
|
||||
return error("删除产羔记录失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询羔羊详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:query')")
|
||||
@GetMapping("/lamb_detail/{lambingRecordId}")
|
||||
public AjaxResult getLambDetail(@PathVariable("lambingRecordId") Long lambingRecordId) {
|
||||
try {
|
||||
List<ScLambDetail> lambDetails = scLambingRecordService.selectLambDetailByLambingRecordId(lambingRecordId);
|
||||
return success(lambDetails);
|
||||
} catch (Exception e) {
|
||||
logger.error("查询羔羊详情异常", e);
|
||||
return error("查询羔羊详情失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,242 @@
|
||||
package com.zhyc.module.produce.breed.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 羔羊详情对象 sc_lamb_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class ScLambDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 产羔记录ID */
|
||||
@Excel(name = "产羔记录ID")
|
||||
private Long lambingRecordId;
|
||||
|
||||
/** 羔羊耳号 */
|
||||
@Excel(name = "羔羊耳号")
|
||||
private String lambEarNumber;
|
||||
|
||||
/** 羔羊品种ID */
|
||||
@Excel(name = "羔羊品种ID")
|
||||
private Integer lambBreed; // 改为Integer类型,存储品种ID
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private Integer gender;
|
||||
|
||||
/** 出生重量 */
|
||||
@Excel(name = "出生重量")
|
||||
private BigDecimal birthWeight;
|
||||
|
||||
/** 是否留养 */
|
||||
@Excel(name = "是否留养")
|
||||
private Boolean isRetained;
|
||||
|
||||
/** 家系 */
|
||||
@Excel(name = "家系")
|
||||
private String lineage;
|
||||
|
||||
/** 生日 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
|
||||
private List<ScLambDetail> lambDetails;
|
||||
|
||||
/** 母羊ID */
|
||||
private Long motherId;
|
||||
|
||||
/** 父羊ID */
|
||||
private Long fatherId;
|
||||
|
||||
/** 牧场ID */
|
||||
private Integer ranchId;
|
||||
|
||||
/** 羊舍ID */
|
||||
private Integer sheepfoldId;
|
||||
|
||||
/** 胎次 */
|
||||
private Integer parity;
|
||||
|
||||
// getter和setter方法
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setLambingRecordId(Long lambingRecordId)
|
||||
{
|
||||
this.lambingRecordId = lambingRecordId;
|
||||
}
|
||||
|
||||
public Long getLambingRecordId()
|
||||
{
|
||||
return lambingRecordId;
|
||||
}
|
||||
|
||||
public void setLambEarNumber(String lambEarNumber)
|
||||
{
|
||||
this.lambEarNumber = lambEarNumber;
|
||||
}
|
||||
|
||||
public String getLambEarNumber()
|
||||
{
|
||||
return lambEarNumber;
|
||||
}
|
||||
|
||||
public void setLambBreed(Integer lambBreed) // 改为Integer类型
|
||||
{
|
||||
this.lambBreed = lambBreed;
|
||||
}
|
||||
|
||||
public Integer getLambBreed() // 改为Integer类型
|
||||
{
|
||||
return lambBreed;
|
||||
}
|
||||
|
||||
public void setGender(Integer gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Integer getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setBirthWeight(BigDecimal birthWeight)
|
||||
{
|
||||
this.birthWeight = birthWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getBirthWeight()
|
||||
{
|
||||
return birthWeight;
|
||||
}
|
||||
|
||||
public void setIsRetained(Boolean isRetained)
|
||||
{
|
||||
this.isRetained = isRetained;
|
||||
}
|
||||
|
||||
public Boolean getIsRetained()
|
||||
{
|
||||
return isRetained;
|
||||
}
|
||||
|
||||
public void setLineage(String lineage)
|
||||
{
|
||||
this.lineage = lineage;
|
||||
}
|
||||
|
||||
public String getLineage()
|
||||
{
|
||||
return lineage;
|
||||
}
|
||||
|
||||
public void setBirthday(Date birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Date getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public List<ScLambDetail> getLambDetails()
|
||||
{
|
||||
return lambDetails;
|
||||
}
|
||||
|
||||
public void setLambDetails(List<ScLambDetail> lambDetails)
|
||||
{
|
||||
this.lambDetails = lambDetails;
|
||||
}
|
||||
|
||||
public Long getMotherId()
|
||||
{
|
||||
return motherId;
|
||||
}
|
||||
|
||||
public void setMotherId(Long motherId)
|
||||
{
|
||||
this.motherId = motherId;
|
||||
}
|
||||
|
||||
public Long getFatherId()
|
||||
{
|
||||
return fatherId;
|
||||
}
|
||||
|
||||
public void setFatherId(Long fatherId)
|
||||
{
|
||||
this.fatherId = fatherId;
|
||||
}
|
||||
|
||||
public Integer getRanchId()
|
||||
{
|
||||
return ranchId;
|
||||
}
|
||||
|
||||
public void setRanchId(Integer ranchId)
|
||||
{
|
||||
this.ranchId = ranchId;
|
||||
}
|
||||
|
||||
public Integer getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Integer sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Integer getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setParity(Integer parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("lambingRecordId", getLambingRecordId())
|
||||
.append("lambEarNumber", getLambEarNumber())
|
||||
.append("lambBreed", getLambBreed())
|
||||
.append("gender", getGender())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("isRetained", getIsRetained())
|
||||
.append("lineage", getLineage())
|
||||
.append("birthday", getBirthday())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,401 @@
|
||||
package com.zhyc.module.produce.breed.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产羔记录对象 sc_lambing_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public class ScLambingRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 羊只id */
|
||||
@Excel(name = "羊只id")
|
||||
private String sheepId;
|
||||
|
||||
/** 胎次 */
|
||||
@Excel(name = "胎次")
|
||||
private Long parity;
|
||||
|
||||
/** 产羔数量 */
|
||||
@Excel(name = "产羔数量")
|
||||
private Long lambsBorn;
|
||||
|
||||
/** 活羔数量 */
|
||||
@Excel(name = "活羔数量")
|
||||
private Long survival;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/** 产羔评分 */
|
||||
@Excel(name = "产羔评分")
|
||||
private Long score;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 创建日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createTime; // 改为 createTime
|
||||
|
||||
// ========== 关联查询字段(简化版) ==========
|
||||
|
||||
/** 母羊耳号 */
|
||||
@Excel(name = "母羊耳号")
|
||||
private String femaleEarNumber;
|
||||
|
||||
/** 母羊品种 */
|
||||
@Excel(name = "母羊品种")
|
||||
private String femaleBreed;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Integer monthAge;
|
||||
|
||||
/** 当前羊舍 */
|
||||
@Excel(name = "当前羊舍")
|
||||
private String currentShed;
|
||||
|
||||
/** 所在牧场 */
|
||||
@Excel(name = "所在牧场")
|
||||
private String farm;
|
||||
|
||||
/** 配种日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "配种日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date breedingDate;
|
||||
|
||||
/** 公羊耳号 */
|
||||
@Excel(name = "公羊耳号")
|
||||
private String maleEarNumber;
|
||||
|
||||
/** 公羊品种 */
|
||||
@Excel(name = "公羊品种")
|
||||
private String maleBreed;
|
||||
|
||||
/** 产羔时怀孕天数 */
|
||||
@Excel(name = "产羔时怀孕天数")
|
||||
private Integer pregnancyDays;
|
||||
|
||||
/** 折损数(计算字段) */
|
||||
@Excel(name = "折损数")
|
||||
private Integer loss;
|
||||
|
||||
/** 公羔数量(从羊只信息表统计) */
|
||||
@Excel(name = "公羔数量")
|
||||
private Integer maleCount;
|
||||
|
||||
/** 母羔数量(从羊只信息表统计) */
|
||||
@Excel(name = "母羔数量")
|
||||
private Integer femaleCount;
|
||||
|
||||
/** 留养公羔数量 */
|
||||
@Excel(name = "留养公羔数量")
|
||||
private Integer retainedMaleCount;
|
||||
|
||||
/** 留养母羔数量 */
|
||||
@Excel(name = "留养母羔数量")
|
||||
private Integer retainedFemaleCount;
|
||||
|
||||
/** 未留养公羔数量 */
|
||||
@Excel(name = "未留养公羔数量")
|
||||
private Integer unretainedMaleCount;
|
||||
|
||||
/** 未留养母羔数量 */
|
||||
@Excel(name = "未留养母羔数量")
|
||||
private Integer unretainedFemaleCount;
|
||||
|
||||
/** 羔羊信息列表(从羊只信息表查询) */
|
||||
private List<SheepLambInfo> lambInfoList;
|
||||
|
||||
private List<ScLambDetail> lambDetails;
|
||||
|
||||
// ========== 原有getter和setter方法 ==========
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(String sheepId)
|
||||
{
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public String getSheepId()
|
||||
{
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setLambsBorn(Long lambsBorn)
|
||||
{
|
||||
this.lambsBorn = lambsBorn;
|
||||
}
|
||||
|
||||
public Long getLambsBorn()
|
||||
{
|
||||
return lambsBorn;
|
||||
}
|
||||
|
||||
public void setSurvival(Long survival)
|
||||
{
|
||||
this.survival = survival;
|
||||
}
|
||||
|
||||
public Long getSurvival()
|
||||
{
|
||||
return survival;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician)
|
||||
{
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician()
|
||||
{
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
|
||||
// ========== 简化版关联字段的getter和setter方法 ==========
|
||||
|
||||
public String getFemaleEarNumber() {
|
||||
return femaleEarNumber;
|
||||
}
|
||||
|
||||
public void setFemaleEarNumber(String femaleEarNumber) {
|
||||
this.femaleEarNumber = femaleEarNumber;
|
||||
}
|
||||
|
||||
public String getFemaleBreed() {
|
||||
return femaleBreed;
|
||||
}
|
||||
|
||||
public void setFemaleBreed(String femaleBreed) {
|
||||
this.femaleBreed = femaleBreed;
|
||||
}
|
||||
|
||||
public Integer getMonthAge() {
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setMonthAge(Integer monthAge) {
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public String getCurrentShed() {
|
||||
return currentShed;
|
||||
}
|
||||
|
||||
public void setCurrentShed(String currentShed) {
|
||||
this.currentShed = currentShed;
|
||||
}
|
||||
|
||||
public String getFarm() {
|
||||
return farm;
|
||||
}
|
||||
|
||||
public void setFarm(String farm) {
|
||||
this.farm = farm;
|
||||
}
|
||||
|
||||
public Date getBreedingDate() {
|
||||
return breedingDate;
|
||||
}
|
||||
|
||||
public void setBreedingDate(Date breedingDate) {
|
||||
this.breedingDate = breedingDate;
|
||||
}
|
||||
|
||||
public String getMaleEarNumber() {
|
||||
return maleEarNumber;
|
||||
}
|
||||
|
||||
public void setMaleEarNumber(String maleEarNumber) {
|
||||
this.maleEarNumber = maleEarNumber;
|
||||
}
|
||||
|
||||
public String getMaleBreed() {
|
||||
return maleBreed;
|
||||
}
|
||||
|
||||
public void setMaleBreed(String maleBreed) {
|
||||
this.maleBreed = maleBreed;
|
||||
}
|
||||
|
||||
|
||||
public Integer getPregnancyDays() {
|
||||
return pregnancyDays;
|
||||
}
|
||||
|
||||
public void setPregnancyDays(Integer pregnancyDays) {
|
||||
this.pregnancyDays = pregnancyDays;
|
||||
}
|
||||
|
||||
public Integer getLoss() {
|
||||
return loss;
|
||||
}
|
||||
|
||||
public void setLoss(Integer loss) {
|
||||
this.loss = loss;
|
||||
}
|
||||
|
||||
public Integer getMaleCount() {
|
||||
return maleCount;
|
||||
}
|
||||
|
||||
public void setMaleCount(Integer maleCount) {
|
||||
this.maleCount = maleCount;
|
||||
}
|
||||
|
||||
public Integer getFemaleCount() {
|
||||
return femaleCount;
|
||||
}
|
||||
|
||||
public void setFemaleCount(Integer femaleCount) {
|
||||
this.femaleCount = femaleCount;
|
||||
}
|
||||
|
||||
public Integer getRetainedMaleCount() {
|
||||
return retainedMaleCount;
|
||||
}
|
||||
|
||||
public void setRetainedMaleCount(Integer retainedMaleCount) {
|
||||
this.retainedMaleCount = retainedMaleCount;
|
||||
}
|
||||
|
||||
public Integer getRetainedFemaleCount() {
|
||||
return retainedFemaleCount;
|
||||
}
|
||||
|
||||
public void setRetainedFemaleCount(Integer retainedFemaleCount) {
|
||||
this.retainedFemaleCount = retainedFemaleCount;
|
||||
}
|
||||
|
||||
public Integer getUnretainedMaleCount() {
|
||||
return unretainedMaleCount;
|
||||
}
|
||||
|
||||
public void setUnretainedMaleCount(Integer unretainedMaleCount) {
|
||||
this.unretainedMaleCount = unretainedMaleCount;
|
||||
}
|
||||
|
||||
public Integer getUnretainedFemaleCount() {
|
||||
return unretainedFemaleCount;
|
||||
}
|
||||
|
||||
public void setUnretainedFemaleCount(Integer unretainedFemaleCount) {
|
||||
this.unretainedFemaleCount = unretainedFemaleCount;
|
||||
}
|
||||
|
||||
public List<SheepLambInfo> getLambInfoList() {
|
||||
return lambInfoList;
|
||||
}
|
||||
|
||||
public void setLambInfoList(List<SheepLambInfo> lambInfoList) {
|
||||
this.lambInfoList = lambInfoList;
|
||||
}
|
||||
|
||||
public List<ScLambDetail> getLambDetails() {
|
||||
return lambDetails;
|
||||
}
|
||||
|
||||
public void setLambDetails(List<ScLambDetail> lambDetails) {
|
||||
this.lambDetails = lambDetails;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("parity", getParity())
|
||||
.append("lambsBorn", getLambsBorn())
|
||||
.append("survival", getSurvival())
|
||||
.append("technician", getTechnician())
|
||||
.append("score", getScore())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime()) // 改为 createTime
|
||||
.append("femaleEarNumber", getFemaleEarNumber())
|
||||
.append("femaleBreed", getFemaleBreed())
|
||||
.append("farm", getFarm())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 羊只羔羊信息对象(用于产羔详情显示)
|
||||
*/
|
||||
class SheepLambInfo {
|
||||
private String lambEarNumber; // 羔羊耳号
|
||||
private String lambBreed; // 羔羊品种
|
||||
private Integer gender; // 性别
|
||||
private Double birthWeight; // 出生重量
|
||||
private Boolean isRetained; // 是否留养
|
||||
private String lineage; // 家系
|
||||
private Date birthday; // 生日
|
||||
|
||||
// getter和setter方法...
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.zhyc.module.produce.breed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 羔羊详情Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface ScLambDetailMapper {
|
||||
|
||||
/**
|
||||
* 查询羔羊详情列表
|
||||
*/
|
||||
public List<ScLambDetail> selectScLambDetailList(ScLambDetail scLambDetail);
|
||||
|
||||
/**
|
||||
* 新增羔羊详情
|
||||
*/
|
||||
public int insertScLambDetail(ScLambDetail scLambDetail);
|
||||
public int insertBasSheep(ScLambDetail scLambDetail);
|
||||
/**
|
||||
* 批量新增羔羊详情
|
||||
*/
|
||||
public int insertScLambDetailBatch(@Param("list") List<ScLambDetail> scLambDetailList);
|
||||
public int insertBasSheepBatch(@Param("list") List<ScLambDetail> scLambDetailList);
|
||||
/**
|
||||
* 修改羔羊详情
|
||||
*/
|
||||
public int updateScLambDetail(ScLambDetail scLambDetail);
|
||||
|
||||
/**
|
||||
* 删除羔羊详情
|
||||
*/
|
||||
public int deleteScLambDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除羔羊详情
|
||||
*/
|
||||
public int deleteScLambDetailByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据产羔记录ID删除羔羊详情
|
||||
*/
|
||||
public int deleteScLambDetailByLambingRecordId(Long lambingRecordId);
|
||||
|
||||
/**
|
||||
* 查询羔羊详情
|
||||
*/
|
||||
public ScLambDetail selectScLambDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 根据产羔记录ID查询羔羊详情列表
|
||||
*/
|
||||
public List<ScLambDetail> selectScLambDetailByLambingRecordId(Long lambingRecordId);
|
||||
|
||||
/**
|
||||
* 检查羔羊耳号是否已存在
|
||||
*/
|
||||
public int checkLambEarNumberExists(@Param("lambEarNumber") String lambEarNumber, @Param("excludeId") Long excludeId);
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.zhyc.module.produce.breed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
|
||||
/**
|
||||
* 产羔记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface ScLambingRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询产羔记录
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表(包含关联信息)
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 产羔记录集合
|
||||
*/
|
||||
public List<ScLambingRecord> selectScLambingRecordList(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 查询产羔记录详细信息(包含关联信息)
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 新增产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*
|
||||
* @param scLambingRecord 产羔记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 删除产羔记录
|
||||
*
|
||||
* @param id 产羔记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除产羔记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScLambingRecordByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.zhyc.module.produce.breed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
|
||||
/**
|
||||
* 产羔记录Service接口
|
||||
*/
|
||||
public interface IScLambingRecordService {
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表
|
||||
*/
|
||||
public List<ScLambingRecord> selectScLambingRecordList(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 新增产羔记录(包含羔羊详情)
|
||||
*/
|
||||
public int insertScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*/
|
||||
public int updateScLambingRecord(ScLambingRecord scLambingRecord);
|
||||
|
||||
/**
|
||||
* 批量删除产羔记录
|
||||
*/
|
||||
public int deleteScLambingRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除产羔记录信息
|
||||
*/
|
||||
public int deleteScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产羔记录
|
||||
*/
|
||||
public ScLambingRecord selectScLambingRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询羔羊详情
|
||||
*/
|
||||
public List<ScLambDetail> selectLambDetailByLambingRecordId(Long lambingRecordId);
|
||||
}
|
||||
@ -0,0 +1,192 @@
|
||||
package com.zhyc.module.produce.breed.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.zhyc.module.produce.breed.mapper.ScLambingRecordMapper;
|
||||
import com.zhyc.module.produce.breed.mapper.ScLambDetailMapper;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambingRecord;
|
||||
import com.zhyc.module.produce.breed.domain.ScLambDetail;
|
||||
import com.zhyc.module.produce.breed.service.IScLambingRecordService;
|
||||
|
||||
/**
|
||||
* 产羔记录Service业务层处理
|
||||
*/
|
||||
@Service
|
||||
public class ScLambingRecordServiceImpl implements IScLambingRecordService {
|
||||
|
||||
@Autowired
|
||||
private ScLambingRecordMapper scLambingRecordMapper;
|
||||
|
||||
@Autowired
|
||||
private ScLambDetailMapper scLambDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询产羔记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<ScLambingRecord> selectScLambingRecordList(ScLambingRecord scLambingRecord) {
|
||||
return scLambingRecordMapper.selectScLambingRecordList(scLambingRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产羔记录(包含羔羊详情)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertScLambingRecord(ScLambingRecord scLambingRecord) {
|
||||
// 1. 插入产羔记录
|
||||
int result = scLambingRecordMapper.insertScLambingRecord(scLambingRecord);
|
||||
|
||||
// 2. 如果有羔羊详情,则批量插入羔羊详情
|
||||
if (scLambingRecord.getLambDetails() != null && !scLambingRecord.getLambDetails().isEmpty()) {
|
||||
insertLambDetails(scLambingRecord);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量插入羔羊详情
|
||||
*/
|
||||
private void insertLambDetails(ScLambingRecord scLambingRecord) {
|
||||
// 遍历羔羊详情列表,逐个插入
|
||||
for (ScLambDetail lambDetail : scLambingRecord.getLambDetails()) {
|
||||
// 设置产羔记录ID
|
||||
lambDetail.setLambingRecordId(scLambingRecord.getId());
|
||||
|
||||
// 设置创建信息
|
||||
lambDetail.setCreateBy(scLambingRecord.getCreateBy());
|
||||
lambDetail.setCreateTime(scLambingRecord.getCreateTime());
|
||||
|
||||
// 数据验证和转换
|
||||
validateAndConvertLambDetail(lambDetail);
|
||||
|
||||
// 插入羔羊详情
|
||||
scLambDetailMapper.insertScLambDetail(lambDetail);
|
||||
scLambDetailMapper.insertBasSheep(lambDetail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证和转换羔羊详情
|
||||
*/
|
||||
/**
|
||||
* 验证和转换羔羊详情
|
||||
*/
|
||||
private void validateAndConvertLambDetail(ScLambDetail lambDetail) {
|
||||
// 验证必填字段
|
||||
if (lambDetail.getLambEarNumber() == null || lambDetail.getLambEarNumber().trim().isEmpty()) {
|
||||
throw new RuntimeException("羔羊耳号不能为空");
|
||||
}
|
||||
|
||||
if (lambDetail.getGender() == null) { // 改为检查Integer类型
|
||||
throw new RuntimeException("羔羊性别不能为空");
|
||||
}
|
||||
|
||||
// 验证性别值的有效性(假设0=母羊,1=公羊)
|
||||
if (lambDetail.getGender() < 0 || lambDetail.getGender() > 1) {
|
||||
throw new RuntimeException("羔羊性别值无效,请使用0(母羊)或1(公羊)");
|
||||
}
|
||||
|
||||
// 检查耳号是否已存在
|
||||
int count = scLambDetailMapper.checkLambEarNumberExists(lambDetail.getLambEarNumber().trim(), null);
|
||||
if (count > 0) {
|
||||
throw new RuntimeException("羔羊耳号 [" + lambDetail.getLambEarNumber() + "] 已存在,请使用其他耳号");
|
||||
}
|
||||
|
||||
// 设置默认值
|
||||
if (lambDetail.getIsRetained() == null) {
|
||||
lambDetail.setIsRetained(false);
|
||||
}
|
||||
|
||||
if (lambDetail.getBirthday() == null) {
|
||||
lambDetail.setBirthday(new java.util.Date());
|
||||
}
|
||||
|
||||
// 处理体重(前端可能传来的是number类型)
|
||||
if (lambDetail.getBirthWeight() == null) {
|
||||
lambDetail.setBirthWeight(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
// 验证品种ID
|
||||
if (lambDetail.getLambBreed() == null) {
|
||||
throw new RuntimeException("羔羊品种不能为空");
|
||||
}
|
||||
|
||||
// 去除空格
|
||||
lambDetail.setLambEarNumber(lambDetail.getLambEarNumber().trim());
|
||||
if (lambDetail.getLineage() != null) {
|
||||
lambDetail.setLineage(lambDetail.getLineage().trim());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产羔记录
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateScLambingRecord(ScLambingRecord scLambingRecord) {
|
||||
// 更新产羔记录
|
||||
int result = scLambingRecordMapper.updateScLambingRecord(scLambingRecord);
|
||||
|
||||
// 如果包含羔羊详情,先删除原有的,再插入新的
|
||||
if (scLambingRecord.getLambDetails() != null) {
|
||||
// 删除原有羔羊详情
|
||||
scLambDetailMapper.deleteScLambDetailByLambingRecordId(scLambingRecord.getId());
|
||||
|
||||
// 插入新的羔羊详情
|
||||
if (!scLambingRecord.getLambDetails().isEmpty()) {
|
||||
insertLambDetails(scLambingRecord);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除产羔记录
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteScLambingRecordByIds(Long[] ids) {
|
||||
// 先删除关联的羔羊详情
|
||||
for (Long id : ids) {
|
||||
scLambDetailMapper.deleteScLambDetailByLambingRecordId(id);
|
||||
}
|
||||
// 再删除产羔记录
|
||||
return scLambingRecordMapper.deleteScLambingRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产羔记录信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteScLambingRecordById(Long id) {
|
||||
// 先删除关联的羔羊详情
|
||||
scLambDetailMapper.deleteScLambDetailByLambingRecordId(id);
|
||||
// 再删除产羔记录
|
||||
return scLambingRecordMapper.deleteScLambingRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产羔记录
|
||||
*/
|
||||
@Override
|
||||
public ScLambingRecord selectScLambingRecordById(Long id) {
|
||||
return scLambingRecordMapper.selectScLambingRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询羔羊详情
|
||||
*/
|
||||
@Override
|
||||
public List<ScLambDetail> selectLambDetailByLambingRecordId(Long lambingRecordId) {
|
||||
return scLambDetailMapper.selectScLambDetailByLambingRecordId(lambingRecordId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,161 @@
|
||||
package com.zhyc.module.produce.wean.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.produce.wean.domain.ScWeanRecord;
|
||||
import com.zhyc.module.produce.wean.service.IScWeanRecordService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 断奶记录Controller
|
||||
*
|
||||
* @author zhyc
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Weaning/weaning_record")
|
||||
public class ScWeanRecordController extends BaseController {
|
||||
@Autowired
|
||||
private IScWeanRecordService scWeanRecordService;
|
||||
|
||||
/**
|
||||
* 查询断奶记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScWeanRecord scWeanRecord) {
|
||||
startPage();
|
||||
List<ScWeanRecord> list = scWeanRecordService.selectScWeanRecordList(scWeanRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出断奶记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:export')")
|
||||
@Log(title = "断奶记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScWeanRecord scWeanRecord) {
|
||||
List<ScWeanRecord> list = scWeanRecordService.selectScWeanRecordList(scWeanRecord);
|
||||
ExcelUtil<ScWeanRecord> util = new ExcelUtil<ScWeanRecord>(ScWeanRecord.class);
|
||||
util.exportExcel(response, list, "断奶记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取断奶记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(scWeanRecordService.selectScWeanRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据耳号查询羊只ID
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:query')")
|
||||
@GetMapping(value = "/sheepId/{earNumber}")
|
||||
public AjaxResult getSheepIdByEarNumber(@PathVariable("earNumber") String earNumber) {
|
||||
Long sheepId = scWeanRecordService.selectSheepIdByEarNumber(earNumber);
|
||||
if (sheepId != null) {
|
||||
return success(sheepId);
|
||||
} else {
|
||||
return error("未找到对应的羊只信息");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增断奶记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:add')")
|
||||
@Log(title = "断奶记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScWeanRecord scWeanRecord) {
|
||||
// 验证耳号是否存在
|
||||
if (scWeanRecord.getEarNumber() != null) {
|
||||
Long sheepId = scWeanRecordService.selectSheepIdByEarNumber(scWeanRecord.getEarNumber());
|
||||
if (sheepId == null) {
|
||||
return error("耳号不存在,请检查后重新输入");
|
||||
}
|
||||
scWeanRecord.setSheepId(sheepId);
|
||||
}
|
||||
|
||||
// 验证必要字段
|
||||
if (scWeanRecord.getSheepId() == null) {
|
||||
return error("羊只信息不能为空");
|
||||
}
|
||||
if (scWeanRecord.getDatetime() == null) {
|
||||
return error("断奶日期不能为空");
|
||||
}
|
||||
if (scWeanRecord.getWeight() == null) {
|
||||
return error("断奶重量不能为空");
|
||||
}
|
||||
if (scWeanRecord.getStatus() == null) {
|
||||
return error("是否留养不能为空");
|
||||
}
|
||||
|
||||
scWeanRecord.setCreateBy(getUsername());
|
||||
return toAjax(scWeanRecordService.insertScWeanRecord(scWeanRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改断奶记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:edit')")
|
||||
@Log(title = "断奶记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScWeanRecord scWeanRecord) {
|
||||
// 验证耳号是否存在
|
||||
if (scWeanRecord.getEarNumber() != null) {
|
||||
Long sheepId = scWeanRecordService.selectSheepIdByEarNumber(scWeanRecord.getEarNumber());
|
||||
if (sheepId == null) {
|
||||
return error("耳号不存在,请检查后重新输入");
|
||||
}
|
||||
scWeanRecord.setSheepId(sheepId);
|
||||
}
|
||||
|
||||
// 验证必要字段
|
||||
if (scWeanRecord.getId() == null) {
|
||||
return error("记录ID不能为空");
|
||||
}
|
||||
if (scWeanRecord.getSheepId() == null) {
|
||||
return error("羊只信息不能为空");
|
||||
}
|
||||
if (scWeanRecord.getDatetime() == null) {
|
||||
return error("断奶日期不能为空");
|
||||
}
|
||||
if (scWeanRecord.getWeight() == null) {
|
||||
return error("断奶重量不能为空");
|
||||
}
|
||||
if (scWeanRecord.getStatus() == null) {
|
||||
return error("是否留养不能为空");
|
||||
}
|
||||
|
||||
return toAjax(scWeanRecordService.updateScWeanRecord(scWeanRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除断奶记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Weaning:weaning_record:remove')")
|
||||
@Log(title = "断奶记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(scWeanRecordService.deleteScWeanRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,262 @@
|
||||
package com.zhyc.module.produce.wean.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 断奶记录对象 sc_wean_record
|
||||
*
|
||||
* @author zhyc
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public class ScWeanRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 羊只ID */
|
||||
@Excel(name = "羊只ID")
|
||||
private Long sheepId;
|
||||
|
||||
/** 断奶日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "断奶日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date datetime;
|
||||
|
||||
/** 断奶重量 */
|
||||
@Excel(name = "断奶重量")
|
||||
private BigDecimal weight;
|
||||
|
||||
/** 是否留养 */
|
||||
@Excel(name = "是否留养")
|
||||
private String status;
|
||||
|
||||
/** 技术员 */
|
||||
@Excel(name = "技术员")
|
||||
private String technician;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
/** 电子耳号 */
|
||||
@Excel(name = "电子耳号")
|
||||
private String electronicTags;
|
||||
|
||||
// 关联查询字段
|
||||
/** 耳号 */
|
||||
@Excel(name = "耳号")
|
||||
private String earNumber;
|
||||
|
||||
/** 品种 */
|
||||
@Excel(name = "品种")
|
||||
private String breed;
|
||||
|
||||
/** 事件类型 */
|
||||
@Excel(name = "事件类型")
|
||||
private String eventType;
|
||||
|
||||
/** 性别 */
|
||||
@Excel(name = "性别")
|
||||
private String gender;
|
||||
|
||||
/** 父号 */
|
||||
@Excel(name = "父号")
|
||||
private String fatherNumber;
|
||||
|
||||
/** 母号 */
|
||||
@Excel(name = "母号")
|
||||
private String motherNumber;
|
||||
|
||||
/** 月龄 */
|
||||
@Excel(name = "月龄")
|
||||
private Integer monthAge;
|
||||
|
||||
/** 出生重量 */
|
||||
@Excel(name = "出生重量")
|
||||
private BigDecimal birthWeight;
|
||||
|
||||
/** 羊舍 */
|
||||
@Excel(name = "羊舍")
|
||||
private String sheepPen;
|
||||
|
||||
/** 繁育状态 */
|
||||
@Excel(name = "繁育状态")
|
||||
private String breedingStatus;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSheepId(Long sheepId) {
|
||||
this.sheepId = sheepId;
|
||||
}
|
||||
|
||||
public Long getSheepId() {
|
||||
return sheepId;
|
||||
}
|
||||
|
||||
public void setDatetime(Date datetime) {
|
||||
this.datetime = datetime;
|
||||
}
|
||||
|
||||
public Date getDatetime() {
|
||||
return datetime;
|
||||
}
|
||||
|
||||
public void setWeight(BigDecimal weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public BigDecimal getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setTechnician(String technician) {
|
||||
this.technician = technician;
|
||||
}
|
||||
|
||||
public String getTechnician() {
|
||||
return technician;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setElectronicTags(String electronicTags) {
|
||||
this.electronicTags = electronicTags;
|
||||
}
|
||||
|
||||
public String getElectronicTags() {
|
||||
return electronicTags;
|
||||
}
|
||||
|
||||
public void setEarNumber(String earNumber) {
|
||||
this.earNumber = earNumber;
|
||||
}
|
||||
|
||||
public String getEarNumber() {
|
||||
return earNumber;
|
||||
}
|
||||
|
||||
public void setBreed(String breed) {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
public String getBreed() {
|
||||
return breed;
|
||||
}
|
||||
|
||||
public void setEventType(String eventType) {
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
public String getEventType() {
|
||||
return eventType;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setFatherNumber(String fatherNumber) {
|
||||
this.fatherNumber = fatherNumber;
|
||||
}
|
||||
|
||||
public String getFatherNumber() {
|
||||
return fatherNumber;
|
||||
}
|
||||
|
||||
public void setMotherNumber(String motherNumber) {
|
||||
this.motherNumber = motherNumber;
|
||||
}
|
||||
|
||||
public String getMotherNumber() {
|
||||
return motherNumber;
|
||||
}
|
||||
|
||||
public void setMonthAge(Integer monthAge) {
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public Integer getMonthAge() {
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setBirthWeight(BigDecimal birthWeight) {
|
||||
this.birthWeight = birthWeight;
|
||||
}
|
||||
|
||||
public BigDecimal getBirthWeight() {
|
||||
return birthWeight;
|
||||
}
|
||||
|
||||
public void setSheepPen(String sheepPen) {
|
||||
this.sheepPen = sheepPen;
|
||||
}
|
||||
|
||||
public String getSheepPen() {
|
||||
return sheepPen;
|
||||
}
|
||||
|
||||
public void setBreedingStatus(String breedingStatus) {
|
||||
this.breedingStatus = breedingStatus;
|
||||
}
|
||||
|
||||
public String getBreedingStatus() {
|
||||
return breedingStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sheepId", getSheepId())
|
||||
.append("datetime", getDatetime())
|
||||
.append("weight", getWeight())
|
||||
.append("status", getStatus())
|
||||
.append("technician", getTechnician())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("electronicTags", getElectronicTags())
|
||||
.append("earNumber", getEarNumber())
|
||||
.append("breed", getBreed())
|
||||
.append("eventType", getEventType())
|
||||
.append("gender", getGender())
|
||||
.append("fatherNumber", getFatherNumber())
|
||||
.append("motherNumber", getMotherNumber())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("sheepPen", getSheepPen())
|
||||
.append("breedingStatus", getBreedingStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.zhyc.module.produce.wean.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.wean.domain.ScWeanRecord;
|
||||
|
||||
/**
|
||||
* 断奶记录Mapper接口
|
||||
*
|
||||
* @author zhyc
|
||||
* @date 2024-01-01
|
||||
*/
|
||||
public interface ScWeanRecordMapper {
|
||||
/**
|
||||
* 查询断奶记录
|
||||
*
|
||||
* @param id 断奶记录主键
|
||||
* @return 断奶记录
|
||||
*/
|
||||
public ScWeanRecord selectScWeanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询断奶记录列表
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 断奶记录集合
|
||||
*/
|
||||
public List<ScWeanRecord> selectScWeanRecordList(ScWeanRecord scWeanRecord);
|
||||
|
||||
/**
|
||||
* 新增断奶记录
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScWeanRecord(ScWeanRecord scWeanRecord);
|
||||
|
||||
/**
|
||||
* 修改断奶记录
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScWeanRecord(ScWeanRecord scWeanRecord);
|
||||
|
||||
/**
|
||||
* 删除断奶记录
|
||||
*
|
||||
* @param id 断奶记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScWeanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除断奶记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScWeanRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据耳号查询羊只ID
|
||||
*
|
||||
* @param earNumber 耳号
|
||||
* @return 羊只ID
|
||||
*/
|
||||
public Long selectSheepIdByEarNumber(String earNumber);
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.zhyc.module.produce.wean.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.produce.wean.domain.ScWeanRecord;
|
||||
|
||||
/**
|
||||
* 断奶记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
public interface IScWeanRecordService {
|
||||
/**
|
||||
* 查询断奶记录
|
||||
*
|
||||
* @param id 断奶记录主键
|
||||
* @return 断奶记录
|
||||
*/
|
||||
public ScWeanRecord selectScWeanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询断奶记录列表
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 断奶记录集合
|
||||
*/
|
||||
public List<ScWeanRecord> selectScWeanRecordList(ScWeanRecord scWeanRecord);
|
||||
|
||||
/**
|
||||
* 新增断奶记录
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertScWeanRecord(ScWeanRecord scWeanRecord);
|
||||
|
||||
/**
|
||||
* 修改断奶记录
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateScWeanRecord(ScWeanRecord scWeanRecord);
|
||||
|
||||
/**
|
||||
* 批量删除断奶记录
|
||||
*
|
||||
* @param ids 需要删除的断奶记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScWeanRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除断奶记录信息
|
||||
*
|
||||
* @param id 断奶记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteScWeanRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 根据耳号查询羊只ID
|
||||
*
|
||||
* @param earNumber 耳号
|
||||
* @return 羊只ID
|
||||
*/
|
||||
public Long selectSheepIdByEarNumber(String earNumber);
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.zhyc.module.produce.wean.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.produce.wean.mapper.ScWeanRecordMapper;
|
||||
import com.zhyc.module.produce.wean.domain.ScWeanRecord;
|
||||
import com.zhyc.module.produce.wean.service.IScWeanRecordService;
|
||||
|
||||
/**
|
||||
* 断奶记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@Service
|
||||
public class ScWeanRecordServiceImpl implements IScWeanRecordService {
|
||||
@Autowired
|
||||
private ScWeanRecordMapper scWeanRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询断奶记录
|
||||
*
|
||||
* @param id 断奶记录主键
|
||||
* @return 断奶记录
|
||||
*/
|
||||
@Override
|
||||
public ScWeanRecord selectScWeanRecordById(Long id) {
|
||||
return scWeanRecordMapper.selectScWeanRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询断奶记录列表
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 断奶记录
|
||||
*/
|
||||
@Override
|
||||
public List<ScWeanRecord> selectScWeanRecordList(ScWeanRecord scWeanRecord) {
|
||||
return scWeanRecordMapper.selectScWeanRecordList(scWeanRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增断奶记录
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertScWeanRecord(ScWeanRecord scWeanRecord) {
|
||||
// 如果前端传递的是耳号,需要先获取羊只ID
|
||||
if (scWeanRecord.getEarNumber() != null && scWeanRecord.getSheepId() == null) {
|
||||
Long sheepId = scWeanRecordMapper.selectSheepIdByEarNumber(scWeanRecord.getEarNumber());
|
||||
if (sheepId != null) {
|
||||
scWeanRecord.setSheepId(sheepId);
|
||||
}
|
||||
}
|
||||
scWeanRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return scWeanRecordMapper.insertScWeanRecord(scWeanRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改断奶记录
|
||||
*
|
||||
* @param scWeanRecord 断奶记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateScWeanRecord(ScWeanRecord scWeanRecord) {
|
||||
// 如果前端传递的是耳号,需要先获取羊只ID
|
||||
if (scWeanRecord.getEarNumber() != null && scWeanRecord.getSheepId() == null) {
|
||||
Long sheepId = scWeanRecordMapper.selectSheepIdByEarNumber(scWeanRecord.getEarNumber());
|
||||
if (sheepId != null) {
|
||||
scWeanRecord.setSheepId(sheepId);
|
||||
}
|
||||
}
|
||||
return scWeanRecordMapper.updateScWeanRecord(scWeanRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除断奶记录
|
||||
*
|
||||
* @param ids 需要删除的断奶记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScWeanRecordByIds(Long[] ids) {
|
||||
return scWeanRecordMapper.deleteScWeanRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除断奶记录信息
|
||||
*
|
||||
* @param id 断奶记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteScWeanRecordById(Long id) {
|
||||
return scWeanRecordMapper.deleteScWeanRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据耳号查询羊只ID
|
||||
*
|
||||
* @param earNumber 耳号
|
||||
* @return 羊只ID
|
||||
*/
|
||||
@Override
|
||||
public Long selectSheepIdByEarNumber(String earNumber) {
|
||||
return scWeanRecordMapper.selectSheepIdByEarNumber(earNumber);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.produce.wean.mapper.ScWeanRecordMapper">
|
||||
|
||||
<resultMap type="ScWeanRecord" id="ScWeanRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="status" column="status" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="electronicTags" column="electronic_tags" />
|
||||
<!-- 关联查询的字段 -->
|
||||
<result property="earNumber" column="bs_manage_tags" />
|
||||
<result property="breed" column="variety" />
|
||||
<result property="eventType" column="event_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="fatherNumber" column="father_manage_tags" />
|
||||
<result property="motherNumber" column="mother_manage_tags" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="birthWeight" column="birth_weight" />
|
||||
<result property="sheepPen" column="sheepfold_name" />
|
||||
<result property="breedingStatus" column="breed" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 带关联查询的基础SQL -->
|
||||
<sql id="selectScWeanRecordVo">
|
||||
select
|
||||
wr.id, wr.sheep_id, wr.datetime, wr.weight, wr.status, wr.technician,
|
||||
wr.comment, wr.create_by, wr.create_time, wr.electronic_tags,
|
||||
sf.bs_manage_tags, sf.variety, sf.gender, sf.father_manage_tags, sf.mother_manage_tags,
|
||||
sf.birth_weight, sf.sheepfold_name, sf.breed, sf.month_age,
|
||||
'断奶' as event_type
|
||||
from sc_wean_record wr
|
||||
left join sheep_file sf on wr.sheep_id = sf.id
|
||||
</sql>
|
||||
|
||||
<!-- 查询断奶记录列表 -->
|
||||
<select id="selectScWeanRecordList" parameterType="ScWeanRecord" resultMap="ScWeanRecordResult">
|
||||
<include refid="selectScWeanRecordVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and wr.sheep_id = #{sheepId}</if>
|
||||
<if test="earNumber != null and earNumber != ''"> and sf.bs_manage_tags like concat('%', #{earNumber}, '%')</if>
|
||||
<if test="datetime != null "> and wr.datetime = #{datetime}</if>
|
||||
<if test="weight != null "> and wr.weight = #{weight}</if>
|
||||
<if test="status != null "> and wr.status = #{status}</if>
|
||||
<if test="technician != null and technician != ''"> and wr.technician like concat('%', #{technician}, '%')</if>
|
||||
<if test="comment != null and comment != ''"> and wr.comment like concat('%', #{comment}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and wr.create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and wr.create_time = #{createTime}</if>
|
||||
<if test="electronicTags != null and electronicTags != ''"> and wr.electronic_tags like concat('%', #{electronicTags}, '%')</if>
|
||||
<if test="breed != null and breed != ''"> and sf.variety like concat('%', #{breed}, '%')</if>
|
||||
<if test="gender != null and gender != ''"> and sf.gender = #{gender}</if>
|
||||
<if test="fatherNumber != null and fatherNumber != ''"> and sf.father_manage_tags like concat('%', #{fatherNumber}, '%')</if>
|
||||
<if test="motherNumber != null and motherNumber != ''"> and sf.mother_manage_tags like concat('%', #{motherNumber}, '%')</if>
|
||||
<if test="sheepPen != null and sheepPen != ''"> and sf.sheepfold_name like concat('%', #{sheepPen}, '%')</if>
|
||||
<if test="breedingStatus != null and breedingStatus != ''"> and sf.breed = #{breedingStatus}</if>
|
||||
</where>
|
||||
order by wr.create_time desc
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询断奶记录 -->
|
||||
<select id="selectScWeanRecordById" parameterType="Long" resultMap="ScWeanRecordResult">
|
||||
<include refid="selectScWeanRecordVo"/>
|
||||
where wr.id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 根据耳号查询羊只ID -->
|
||||
<select id="selectSheepIdByEarNumber" parameterType="String" resultType="Long">
|
||||
select id from sheep_file where bs_manage_tags = #{earNumber}
|
||||
</select>
|
||||
|
||||
<!-- 插入断奶记录 -->
|
||||
<insert id="insertScWeanRecord" parameterType="ScWeanRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_wean_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="weight != null">weight,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="electronicTags != null">electronic_tags,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="weight != null">#{weight},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="electronicTags != null">#{electronicTags},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 更新断奶记录 -->
|
||||
<update id="updateScWeanRecord" parameterType="ScWeanRecord">
|
||||
update sc_wean_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="weight != null">weight = #{weight},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="technician != null">technician = #{technician},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="electronicTags != null">electronic_tags = #{electronicTags},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 删除断奶记录 -->
|
||||
<delete id="deleteScWeanRecordById" parameterType="Long">
|
||||
delete from sc_wean_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 批量删除断奶记录 -->
|
||||
<delete id="deleteScWeanRecordByIds" parameterType="String">
|
||||
delete from sc_wean_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
110
zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml
Normal file
110
zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml
Normal file
@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.biosafety.mapper.DewormMapper">
|
||||
|
||||
<resultMap type="Deworm" id="DewormResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="technical" column="technical" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDewormVo">
|
||||
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_deworm
|
||||
</sql>
|
||||
|
||||
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
|
||||
<include refid="selectDewormVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">
|
||||
<include refid="selectDewormVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeworm" parameterType="Deworm" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_deworm
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="technical != null">technical,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="technical != null">#{technical},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeworm" parameterType="Deworm">
|
||||
update sw_deworm
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="technical != null">technical = #{technical},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDewormById" parameterType="Long">
|
||||
delete from sw_deworm where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDewormByIds" parameterType="String">
|
||||
delete from sw_deworm where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.biosafety.mapper.DiagnosisMapper">
|
||||
|
||||
<resultMap type="Diagnosis" id="DiagnosisResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="treatId" column="treat_id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="diseasePid" column="disease_pid" />
|
||||
<result property="diseaseId" column="disease_id" />
|
||||
<result property="result" column="result" />
|
||||
<result property="begindate" column="begindate" />
|
||||
<result property="enddate" column="enddate" />
|
||||
<result property="treatDay" column="treat_day" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDiagnosisVo">
|
||||
select id, treat_id, sheep_id, datetime, sheep_type, gender, parity, disease_pid, disease_id, result, begindate, enddate, treat_day, sheepfold_id, create_by, create_time from sw_diagnosis
|
||||
</sql>
|
||||
|
||||
<select id="selectDiagnosisList" parameterType="Diagnosis" resultMap="DiagnosisResult">
|
||||
<include refid="selectDiagnosisVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="diseasePid != null "> and disease_pid = #{diseasePid}</if>
|
||||
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
|
||||
<if test="result != null "> and result = #{result}</if>
|
||||
<if test="treatDay != null "> and treat_day = #{treatDay}</if>
|
||||
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDiagnosisById" parameterType="Long" resultMap="DiagnosisResult">
|
||||
<include refid="selectDiagnosisVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDiagnosis" parameterType="Diagnosis" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_diagnosis
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="treatId != null">treat_id,</if>
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="diseasePid != null">disease_pid,</if>
|
||||
<if test="diseaseId != null">disease_id,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="begindate != null">begindate,</if>
|
||||
<if test="enddate != null">enddate,</if>
|
||||
<if test="treatDay != null">treat_day,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="treatId != null">#{treatId},</if>
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="diseasePid != null">#{diseasePid},</if>
|
||||
<if test="diseaseId != null">#{diseaseId},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="begindate != null">#{begindate},</if>
|
||||
<if test="enddate != null">#{enddate},</if>
|
||||
<if test="treatDay != null">#{treatDay},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDiagnosis" parameterType="Diagnosis">
|
||||
update sw_diagnosis
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="treatId != null">treat_id = #{treatId},</if>
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="diseasePid != null">disease_pid = #{diseasePid},</if>
|
||||
<if test="diseaseId != null">disease_id = #{diseaseId},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="begindate != null">begindate = #{begindate},</if>
|
||||
<if test="enddate != null">enddate = #{enddate},</if>
|
||||
<if test="treatDay != null">treat_day = #{treatDay},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDiagnosisById" parameterType="Long">
|
||||
delete from sw_diagnosis where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDiagnosisByIds" parameterType="String">
|
||||
delete from sw_diagnosis where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.biosafety.mapper.DisinfectMapper">
|
||||
|
||||
<resultMap type="Disinfect" id="DisinfectResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="way" column="way" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="ratio" column="ratio" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDisinfectVo">
|
||||
select id, sheepfold_id, datetime, technician, way, usage_id, ratio, comment, update_by, update_time, create_by, create_time from sw_disinfect
|
||||
</sql>
|
||||
|
||||
<select id="selectDisinfectList" parameterType="Disinfect" resultMap="DisinfectResult">
|
||||
<include refid="selectDisinfectVo"/>
|
||||
<where>
|
||||
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="technician != null and technician != ''"> and technician = #{technician}</if>
|
||||
<if test="way != null and way != ''"> and way = #{way}</if>
|
||||
<if test="usageId != null "> and usage_id = #{usageId}</if>
|
||||
<if test="ratio != null and ratio != ''"> and ratio = #{ratio}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDisinfectById" parameterType="Long" resultMap="DisinfectResult">
|
||||
<include refid="selectDisinfectVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDisinfect" parameterType="Disinfect" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_disinfect
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="way != null">way,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="ratio != null">ratio,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="way != null">#{way},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="ratio != null">#{ratio},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDisinfect" parameterType="Disinfect">
|
||||
update sw_disinfect
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="technician != null">technician = #{technician},</if>
|
||||
<if test="way != null">way = #{way},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="ratio != null">ratio = #{ratio},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDisinfectById" parameterType="Long">
|
||||
delete from sw_disinfect where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDisinfectByIds" parameterType="String">
|
||||
delete from sw_disinfect where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
113
zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml
Normal file
113
zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml
Normal file
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.biosafety.mapper.HealthMapper">
|
||||
|
||||
<resultMap type="Health" id="HealthResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="technical" column="technical" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHealthVo">
|
||||
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, technical, comment, update_by, update_time, create_by, create_time from sw_health
|
||||
</sql>
|
||||
|
||||
<select id="selectHealthList" parameterType="Health" resultMap="HealthResult">
|
||||
<include refid="selectHealthVo"/>
|
||||
<where>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHealthById" parameterType="Long" resultMap="HealthResult">
|
||||
<include refid="selectHealthVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHealth" parameterType="Health" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_health
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="technical != null">technical,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="technical != null">#{technical},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealth" parameterType="Health">
|
||||
update sw_health
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="technical != null">technical = #{technical},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHealthById" parameterType="Long">
|
||||
delete from sw_health where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHealthByIds" parameterType="String">
|
||||
delete from sw_health where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user