Compare commits
2 Commits
9671eeabc3
...
9c75dc550c
Author | SHA1 | Date | |
---|---|---|---|
9c75dc550c | |||
b1946c6bcf |
@ -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,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 Long 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,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.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,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,56 @@
|
||||
<?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.QuarantineItemsMapper">
|
||||
|
||||
<resultMap type="QuarantineItems" id="QuarantineItemsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQuarantineItemsVo">
|
||||
select id, name from sw_quarantine_items
|
||||
</sql>
|
||||
|
||||
<select id="selectQuarantineItemsList" parameterType="QuarantineItems" resultMap="QuarantineItemsResult">
|
||||
<include refid="selectQuarantineItemsVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQuarantineItemsById" parameterType="Long" resultMap="QuarantineItemsResult">
|
||||
<include refid="selectQuarantineItemsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQuarantineItems" parameterType="QuarantineItems" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_quarantine_items
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQuarantineItems" parameterType="QuarantineItems">
|
||||
update sw_quarantine_items
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQuarantineItemsById" parameterType="Long">
|
||||
delete from sw_quarantine_items where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQuarantineItemsByIds" parameterType="String">
|
||||
delete from sw_quarantine_items where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,131 @@
|
||||
<?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.QuarantineReportMapper">
|
||||
|
||||
<resultMap type="QuarantineReport" id="QuarantineReportResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="sheepNo" column="sheep_no"/>
|
||||
<result property="sheepType" column="sheep_type"/>
|
||||
<result property="gender" column="gender"/>
|
||||
<result property="monthAge" column="month_age"/>
|
||||
<result property="parity" column="parity"/>
|
||||
<result property="breed" column="breed"/>
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="quarItem" column="quar_item" />
|
||||
<result property="itemName" column="item_name"/>
|
||||
<result property="sample" column="sample" />
|
||||
<result property="sampleType" column="sample_type" />
|
||||
<result property="sampler" column="sampler" />
|
||||
<result property="quarOfficer" column="quar_officer" />
|
||||
<result property="result" column="result" />
|
||||
<result property="status" column="status" />
|
||||
<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="selectQuarantineReportVo">
|
||||
select sqr.id, sheep_type,sheep_id, datetime, quar_item, sample_type, sampler, quar_officer, result, status,
|
||||
sqr.update_by, sqr.update_time, sqr.create_by, sqr.create_time,
|
||||
sqi.name as item_name,
|
||||
sqs.name as sample,
|
||||
sf.bs_manage_tags sheep_no,sf.gender,sf.parity,sf.breed,sf.month_age
|
||||
from sw_quarantine_report sqr
|
||||
left join sw_quarantine_items sqi on sqr.quar_item = sqi.id
|
||||
left join sw_quarantine_sample sqs on sqr.sample_type = sqs.id
|
||||
left join sheep_file sf on sqr.sheep_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectQuarantineReportList" parameterType="QuarantineReport" resultMap="QuarantineReportResult">
|
||||
<include refid="selectQuarantineReportVo"/>
|
||||
<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="quarItem != null "> and quar_item = #{quarItem}</if>
|
||||
<if test="sampleType != null "> and sample_type = #{sampleType}</if>
|
||||
<if test="sampler != null and sampler != ''"> and sampler = #{sampler}</if>
|
||||
<if test="quarOfficer != null and quarOfficer != ''"> and quar_officer = #{quarOfficer}</if>
|
||||
<if test="result != null "> and result = #{result}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQuarantineReportById" parameterType="Long" resultMap="QuarantineReportResult">
|
||||
select sqr.id, sheep_type,sheep_id, datetime, quar_item, sample_type, sampler, quar_officer, result, status,
|
||||
sqr.update_by, sqr.update_time, sqr.create_by, sqr.create_time,
|
||||
sqi.name as item_name,
|
||||
sqs.name as sample,
|
||||
sf.bs_manage_tags sheep_no
|
||||
from sw_quarantine_report sqr
|
||||
left join sw_quarantine_items sqi on sqr.quar_item = sqi.id
|
||||
left join sw_quarantine_sample sqs on sqr.sample_type = sqs.id
|
||||
left join sheep_file sf on sqr.sheep_id = sf.id
|
||||
where sqr.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQuarantineReport" parameterType="QuarantineReport" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_quarantine_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="quarItem != null">quar_item,</if>
|
||||
<if test="sampleType != null">sample_type,</if>
|
||||
<if test="sampler != null">sampler,</if>
|
||||
<if test="quarOfficer != null">quar_officer,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="status != null">status,</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="datetime != null">#{datetime},</if>
|
||||
<if test="quarItem != null">#{quarItem},</if>
|
||||
<if test="sampleType != null">#{sampleType},</if>
|
||||
<if test="sampler != null">#{sampler},</if>
|
||||
<if test="quarOfficer != null">#{quarOfficer},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="status != null">#{status},</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="updateQuarantineReport" parameterType="QuarantineReport">
|
||||
update sw_quarantine_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="quarItem != null">quar_item = #{quarItem},</if>
|
||||
<if test="sampleType != null">sample_type = #{sampleType},</if>
|
||||
<if test="sampler != null">sampler = #{sampler},</if>
|
||||
<if test="quarOfficer != null">quar_officer = #{quarOfficer},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="status != null">status = #{status},</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="deleteQuarantineReportById" parameterType="Long">
|
||||
delete from sw_quarantine_report where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQuarantineReportByIds" parameterType="String">
|
||||
delete from sw_quarantine_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,56 @@
|
||||
<?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.QuarantineSampleMapper">
|
||||
|
||||
<resultMap type="QuarantineSample" id="QuarantineSampleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQuarantineSampleVo">
|
||||
select id, name from sw_quarantine_sample
|
||||
</sql>
|
||||
|
||||
<select id="selectQuarantineSampleList" parameterType="QuarantineSample" resultMap="QuarantineSampleResult">
|
||||
<include refid="selectQuarantineSampleVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQuarantineSampleById" parameterType="Long" resultMap="QuarantineSampleResult">
|
||||
<include refid="selectQuarantineSampleVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQuarantineSample" parameterType="QuarantineSample" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_quarantine_sample
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQuarantineSample" parameterType="QuarantineSample">
|
||||
update sw_quarantine_sample
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQuarantineSampleById" parameterType="Long">
|
||||
delete from sw_quarantine_sample where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQuarantineSampleByIds" parameterType="String">
|
||||
delete from sw_quarantine_sample where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user