鲜奶检验记录
This commit is contained in:
parent
2fe36ba97d
commit
62a84bc971
@ -0,0 +1,104 @@
|
|||||||
|
package com.zhyc.module.dairyProducts.freshMilkTest.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.freshMilkTest.domain.NpFreshMilkInsp;
|
||||||
|
import com.zhyc.module.dairyProducts.freshMilkTest.service.INpFreshMilkInspService;
|
||||||
|
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||||
|
import com.zhyc.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鲜奶生产,成品检验记录Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/freshMilkTest/freshMilkTest")
|
||||||
|
public class NpFreshMilkInspController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private INpFreshMilkInspService npFreshMilkInspService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('freshMilkTest:freshMilkTest:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<NpFreshMilkInsp> list = npFreshMilkInspService.selectNpFreshMilkInspList(npFreshMilkInsp);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出鲜奶生产,成品检验记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('freshMilkTest:freshMilkTest:export')")
|
||||||
|
@Log(title = "鲜奶生产,成品检验记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
List<NpFreshMilkInsp> list = npFreshMilkInspService.selectNpFreshMilkInspList(npFreshMilkInsp);
|
||||||
|
ExcelUtil<NpFreshMilkInsp> util = new ExcelUtil<NpFreshMilkInsp>(NpFreshMilkInsp.class);
|
||||||
|
util.exportExcel(response, list, "鲜奶生产,成品检验记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取鲜奶生产,成品检验记录详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('freshMilkTest:freshMilkTest:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(npFreshMilkInspService.selectNpFreshMilkInspById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('freshMilkTest:freshMilkTest:add')")
|
||||||
|
@Log(title = "鲜奶生产,成品检验记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
return toAjax(npFreshMilkInspService.insertNpFreshMilkInsp(npFreshMilkInsp));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('freshMilkTest:freshMilkTest:edit')")
|
||||||
|
@Log(title = "鲜奶生产,成品检验记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
return toAjax(npFreshMilkInspService.updateNpFreshMilkInsp(npFreshMilkInsp));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('freshMilkTest:freshMilkTest:remove')")
|
||||||
|
@Log(title = "鲜奶生产,成品检验记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(npFreshMilkInspService.deleteNpFreshMilkInspByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,267 @@
|
|||||||
|
package com.zhyc.module.dairyProducts.freshMilkTest.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鲜奶生产,成品检验记录对象 np_fresh_milk_insp
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-18
|
||||||
|
*/
|
||||||
|
public class NpFreshMilkInsp extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 来源 */
|
||||||
|
@Excel(name = "来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
/** 检测日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date datetime;
|
||||||
|
|
||||||
|
/** 脂肪g/100g */
|
||||||
|
@Excel(name = "脂肪g/100g")
|
||||||
|
private Double fat;
|
||||||
|
|
||||||
|
/** 蛋白质g/100g */
|
||||||
|
@Excel(name = "蛋白质g/100g")
|
||||||
|
private Double protein;
|
||||||
|
|
||||||
|
/** 非脂g/100g */
|
||||||
|
@Excel(name = "非脂g/100g")
|
||||||
|
private Double nonFat;
|
||||||
|
|
||||||
|
/** 酸度oT */
|
||||||
|
@Excel(name = "酸度oT")
|
||||||
|
private Double acidity;
|
||||||
|
|
||||||
|
/** 菌落总数CFU/ml_1 */
|
||||||
|
@Excel(name = "菌落总数CFU/ml_1")
|
||||||
|
private Double bacterialColony1;
|
||||||
|
|
||||||
|
/** 菌落总数CFU/ml_2 */
|
||||||
|
@Excel(name = "菌落总数CFU/ml_2")
|
||||||
|
private Double bacterialColony2;
|
||||||
|
|
||||||
|
/** 菌落总数CFU/ml_3 */
|
||||||
|
@Excel(name = "菌落总数CFU/ml_3")
|
||||||
|
private Double bacterialColony3;
|
||||||
|
|
||||||
|
/** 菌落总数CFU/ml_4 */
|
||||||
|
@Excel(name = "菌落总数CFU/ml_4")
|
||||||
|
private Double bacterialColony4;
|
||||||
|
|
||||||
|
/** 菌落总数CFU/ml_5 */
|
||||||
|
@Excel(name = "菌落总数CFU/ml_5")
|
||||||
|
private Double bacterialColony5;
|
||||||
|
|
||||||
|
/** 大肠菌群CFU/ml */
|
||||||
|
@Excel(name = "大肠菌群CFU/ml")
|
||||||
|
private Double coli;
|
||||||
|
|
||||||
|
/** 乳铁蛋白(mg/L) */
|
||||||
|
@Excel(name = "乳铁蛋白", readConverterExp = "m=g/L")
|
||||||
|
private Double lactoferrin;
|
||||||
|
|
||||||
|
/** 免疫球蛋白(mg/l) */
|
||||||
|
@Excel(name = "免疫球蛋白", readConverterExp = "m=g/l")
|
||||||
|
private Double ig;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String commnet;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String source)
|
||||||
|
{
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSource()
|
||||||
|
{
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatetime(Date datetime)
|
||||||
|
{
|
||||||
|
this.datetime = datetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDatetime()
|
||||||
|
{
|
||||||
|
return datetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFat(Double fat)
|
||||||
|
{
|
||||||
|
this.fat = fat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getFat()
|
||||||
|
{
|
||||||
|
return fat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProtein(Double protein)
|
||||||
|
{
|
||||||
|
this.protein = protein;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getProtein()
|
||||||
|
{
|
||||||
|
return protein;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNonFat(Double nonFat)
|
||||||
|
{
|
||||||
|
this.nonFat = nonFat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getNonFat()
|
||||||
|
{
|
||||||
|
return nonFat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAcidity(Double acidity)
|
||||||
|
{
|
||||||
|
this.acidity = acidity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getAcidity()
|
||||||
|
{
|
||||||
|
return acidity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBacterialColony1(Double bacterialColony1)
|
||||||
|
{
|
||||||
|
this.bacterialColony1 = bacterialColony1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getBacterialColony1()
|
||||||
|
{
|
||||||
|
return bacterialColony1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBacterialColony2(Double bacterialColony2)
|
||||||
|
{
|
||||||
|
this.bacterialColony2 = bacterialColony2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getBacterialColony2()
|
||||||
|
{
|
||||||
|
return bacterialColony2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBacterialColony3(Double bacterialColony3)
|
||||||
|
{
|
||||||
|
this.bacterialColony3 = bacterialColony3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getBacterialColony3()
|
||||||
|
{
|
||||||
|
return bacterialColony3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBacterialColony4(Double bacterialColony4)
|
||||||
|
{
|
||||||
|
this.bacterialColony4 = bacterialColony4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getBacterialColony4()
|
||||||
|
{
|
||||||
|
return bacterialColony4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBacterialColony5(Double bacterialColony5)
|
||||||
|
{
|
||||||
|
this.bacterialColony5 = bacterialColony5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getBacterialColony5()
|
||||||
|
{
|
||||||
|
return bacterialColony5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColi(Double coli)
|
||||||
|
{
|
||||||
|
this.coli = coli;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getColi()
|
||||||
|
{
|
||||||
|
return coli;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLactoferrin(Double lactoferrin)
|
||||||
|
{
|
||||||
|
this.lactoferrin = lactoferrin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getLactoferrin()
|
||||||
|
{
|
||||||
|
return lactoferrin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIg(Double ig)
|
||||||
|
{
|
||||||
|
this.ig = ig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getIg()
|
||||||
|
{
|
||||||
|
return ig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommnet(String commnet)
|
||||||
|
{
|
||||||
|
this.commnet = commnet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommnet()
|
||||||
|
{
|
||||||
|
return commnet;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("source", getSource())
|
||||||
|
.append("datetime", getDatetime())
|
||||||
|
.append("fat", getFat())
|
||||||
|
.append("protein", getProtein())
|
||||||
|
.append("nonFat", getNonFat())
|
||||||
|
.append("acidity", getAcidity())
|
||||||
|
.append("bacterialColony1", getBacterialColony1())
|
||||||
|
.append("bacterialColony2", getBacterialColony2())
|
||||||
|
.append("bacterialColony3", getBacterialColony3())
|
||||||
|
.append("bacterialColony4", getBacterialColony4())
|
||||||
|
.append("bacterialColony5", getBacterialColony5())
|
||||||
|
.append("coli", getColi())
|
||||||
|
.append("lactoferrin", getLactoferrin())
|
||||||
|
.append("ig", getIg())
|
||||||
|
.append("commnet", getCommnet())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.zhyc.module.dairyProducts.freshMilkTest.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.dairyProducts.freshMilkTest.domain.NpFreshMilkInsp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鲜奶生产,成品检验记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-18
|
||||||
|
*/
|
||||||
|
public interface NpFreshMilkInspMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param id 鲜奶生产,成品检验记录主键
|
||||||
|
* @return 鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
public NpFreshMilkInsp selectNpFreshMilkInspById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录列表
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 鲜奶生产,成品检验记录集合
|
||||||
|
*/
|
||||||
|
public List<NpFreshMilkInsp> selectNpFreshMilkInspList(NpFreshMilkInsp npFreshMilkInsp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNpFreshMilkInsp(NpFreshMilkInsp npFreshMilkInsp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNpFreshMilkInsp(NpFreshMilkInsp npFreshMilkInsp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param id 鲜奶生产,成品检验记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNpFreshMilkInspById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNpFreshMilkInspByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.zhyc.module.dairyProducts.freshMilkTest.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.zhyc.module.dairyProducts.freshMilkTest.domain.NpFreshMilkInsp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鲜奶生产,成品检验记录Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-18
|
||||||
|
*/
|
||||||
|
public interface INpFreshMilkInspService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param id 鲜奶生产,成品检验记录主键
|
||||||
|
* @return 鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
public NpFreshMilkInsp selectNpFreshMilkInspById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录列表
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 鲜奶生产,成品检验记录集合
|
||||||
|
*/
|
||||||
|
public List<NpFreshMilkInsp> selectNpFreshMilkInspList(NpFreshMilkInsp npFreshMilkInsp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNpFreshMilkInsp(NpFreshMilkInsp npFreshMilkInsp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNpFreshMilkInsp(NpFreshMilkInsp npFreshMilkInsp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的鲜奶生产,成品检验记录主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNpFreshMilkInspByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除鲜奶生产,成品检验记录信息
|
||||||
|
*
|
||||||
|
* @param id 鲜奶生产,成品检验记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNpFreshMilkInspById(Long id);
|
||||||
|
}
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.zhyc.module.dairyProducts.freshMilkTest.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.dairyProducts.freshMilkTest.mapper.NpFreshMilkInspMapper;
|
||||||
|
import com.zhyc.module.dairyProducts.freshMilkTest.domain.NpFreshMilkInsp;
|
||||||
|
import com.zhyc.module.dairyProducts.freshMilkTest.service.INpFreshMilkInspService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鲜奶生产,成品检验记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-07-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NpFreshMilkInspServiceImpl implements INpFreshMilkInspService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private NpFreshMilkInspMapper npFreshMilkInspMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param id 鲜奶生产,成品检验记录主键
|
||||||
|
* @return 鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NpFreshMilkInsp selectNpFreshMilkInspById(Long id)
|
||||||
|
{
|
||||||
|
return npFreshMilkInspMapper.selectNpFreshMilkInspById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询鲜奶生产,成品检验记录列表
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 鲜奶生产,成品检验记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<NpFreshMilkInsp> selectNpFreshMilkInspList(NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
return npFreshMilkInspMapper.selectNpFreshMilkInspList(npFreshMilkInsp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertNpFreshMilkInsp(NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
npFreshMilkInsp.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return npFreshMilkInspMapper.insertNpFreshMilkInsp(npFreshMilkInsp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param npFreshMilkInsp 鲜奶生产,成品检验记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateNpFreshMilkInsp(NpFreshMilkInsp npFreshMilkInsp)
|
||||||
|
{
|
||||||
|
return npFreshMilkInspMapper.updateNpFreshMilkInsp(npFreshMilkInsp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除鲜奶生产,成品检验记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的鲜奶生产,成品检验记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNpFreshMilkInspByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return npFreshMilkInspMapper.deleteNpFreshMilkInspByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除鲜奶生产,成品检验记录信息
|
||||||
|
*
|
||||||
|
* @param id 鲜奶生产,成品检验记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNpFreshMilkInspById(Long id)
|
||||||
|
{
|
||||||
|
return npFreshMilkInspMapper.deleteNpFreshMilkInspById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -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.dairyProducts.freshMilkTest.mapper.NpFreshMilkInspMapper">
|
||||||
|
|
||||||
|
<resultMap type="NpFreshMilkInsp" id="NpFreshMilkInspResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="source" column="source" />
|
||||||
|
<result property="datetime" column="datetime" />
|
||||||
|
<result property="fat" column="fat" />
|
||||||
|
<result property="protein" column="protein" />
|
||||||
|
<result property="nonFat" column="non_fat" />
|
||||||
|
<result property="acidity" column="acidity" />
|
||||||
|
<result property="bacterialColony1" column="bacterial_colony_1" />
|
||||||
|
<result property="bacterialColony2" column="bacterial_colony_2" />
|
||||||
|
<result property="bacterialColony3" column="bacterial_colony_3" />
|
||||||
|
<result property="bacterialColony4" column="bacterial_colony_4" />
|
||||||
|
<result property="bacterialColony5" column="bacterial_colony_5" />
|
||||||
|
<result property="coli" column="coli" />
|
||||||
|
<result property="lactoferrin" column="lactoferrin" />
|
||||||
|
<result property="ig" column="ig" />
|
||||||
|
<result property="commnet" column="commnet" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectNpFreshMilkInspVo">
|
||||||
|
select id, source, datetime, fat, protein, non_fat, acidity, bacterial_colony_1, bacterial_colony_2, bacterial_colony_3, bacterial_colony_4, bacterial_colony_5, coli, lactoferrin, ig, commnet, create_by, create_time from np_fresh_milk_insp
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectNpFreshMilkInspList" parameterType="NpFreshMilkInsp" resultMap="NpFreshMilkInspResult">
|
||||||
|
<include refid="selectNpFreshMilkInspVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||||
|
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||||
|
<if test="fat != null "> and fat = #{fat}</if>
|
||||||
|
<if test="protein != null "> and protein = #{protein}</if>
|
||||||
|
<if test="nonFat != null "> and non_fat = #{nonFat}</if>
|
||||||
|
<if test="acidity != null "> and acidity = #{acidity}</if>
|
||||||
|
<if test="bacterialColony1 != null "> and bacterial_colony_1 = #{bacterialColony1}</if>
|
||||||
|
<if test="bacterialColony2 != null "> and bacterial_colony_2 = #{bacterialColony2}</if>
|
||||||
|
<if test="bacterialColony3 != null "> and bacterial_colony_3 = #{bacterialColony3}</if>
|
||||||
|
<if test="bacterialColony4 != null "> and bacterial_colony_4 = #{bacterialColony4}</if>
|
||||||
|
<if test="bacterialColony5 != null "> and bacterial_colony_5 = #{bacterialColony5}</if>
|
||||||
|
<if test="coli != null "> and coli = #{coli}</if>
|
||||||
|
<if test="lactoferrin != null "> and lactoferrin = #{lactoferrin}</if>
|
||||||
|
<if test="ig != null "> and ig = #{ig}</if>
|
||||||
|
<if test="commnet != null and commnet != ''"> and commnet = #{commnet}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNpFreshMilkInspById" parameterType="Long" resultMap="NpFreshMilkInspResult">
|
||||||
|
<include refid="selectNpFreshMilkInspVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertNpFreshMilkInsp" parameterType="NpFreshMilkInsp" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into np_fresh_milk_insp
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="source != null">source,</if>
|
||||||
|
<if test="datetime != null">datetime,</if>
|
||||||
|
<if test="fat != null">fat,</if>
|
||||||
|
<if test="protein != null">protein,</if>
|
||||||
|
<if test="nonFat != null">non_fat,</if>
|
||||||
|
<if test="acidity != null">acidity,</if>
|
||||||
|
<if test="bacterialColony1 != null">bacterial_colony_1,</if>
|
||||||
|
<if test="bacterialColony2 != null">bacterial_colony_2,</if>
|
||||||
|
<if test="bacterialColony3 != null">bacterial_colony_3,</if>
|
||||||
|
<if test="bacterialColony4 != null">bacterial_colony_4,</if>
|
||||||
|
<if test="bacterialColony5 != null">bacterial_colony_5,</if>
|
||||||
|
<if test="coli != null">coli,</if>
|
||||||
|
<if test="lactoferrin != null">lactoferrin,</if>
|
||||||
|
<if test="ig != null">ig,</if>
|
||||||
|
<if test="commnet != null">commnet,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="source != null">#{source},</if>
|
||||||
|
<if test="datetime != null">#{datetime},</if>
|
||||||
|
<if test="fat != null">#{fat},</if>
|
||||||
|
<if test="protein != null">#{protein},</if>
|
||||||
|
<if test="nonFat != null">#{nonFat},</if>
|
||||||
|
<if test="acidity != null">#{acidity},</if>
|
||||||
|
<if test="bacterialColony1 != null">#{bacterialColony1},</if>
|
||||||
|
<if test="bacterialColony2 != null">#{bacterialColony2},</if>
|
||||||
|
<if test="bacterialColony3 != null">#{bacterialColony3},</if>
|
||||||
|
<if test="bacterialColony4 != null">#{bacterialColony4},</if>
|
||||||
|
<if test="bacterialColony5 != null">#{bacterialColony5},</if>
|
||||||
|
<if test="coli != null">#{coli},</if>
|
||||||
|
<if test="lactoferrin != null">#{lactoferrin},</if>
|
||||||
|
<if test="ig != null">#{ig},</if>
|
||||||
|
<if test="commnet != null">#{commnet},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateNpFreshMilkInsp" parameterType="NpFreshMilkInsp">
|
||||||
|
update np_fresh_milk_insp
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="source != null">source = #{source},</if>
|
||||||
|
<if test="datetime != null">datetime = #{datetime},</if>
|
||||||
|
<if test="fat != null">fat = #{fat},</if>
|
||||||
|
<if test="protein != null">protein = #{protein},</if>
|
||||||
|
<if test="nonFat != null">non_fat = #{nonFat},</if>
|
||||||
|
<if test="acidity != null">acidity = #{acidity},</if>
|
||||||
|
<if test="bacterialColony1 != null">bacterial_colony_1 = #{bacterialColony1},</if>
|
||||||
|
<if test="bacterialColony2 != null">bacterial_colony_2 = #{bacterialColony2},</if>
|
||||||
|
<if test="bacterialColony3 != null">bacterial_colony_3 = #{bacterialColony3},</if>
|
||||||
|
<if test="bacterialColony4 != null">bacterial_colony_4 = #{bacterialColony4},</if>
|
||||||
|
<if test="bacterialColony5 != null">bacterial_colony_5 = #{bacterialColony5},</if>
|
||||||
|
<if test="coli != null">coli = #{coli},</if>
|
||||||
|
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
|
||||||
|
<if test="ig != null">ig = #{ig},</if>
|
||||||
|
<if test="commnet != null">commnet = #{commnet},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteNpFreshMilkInspById" parameterType="Long">
|
||||||
|
delete from np_fresh_milk_insp where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteNpFreshMilkInspByIds" parameterType="String">
|
||||||
|
delete from np_fresh_milk_insp where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user