Compare commits

..

No commits in common. "2fe36ba97d9901db571e829003823c36cb0586fa" and "e7b5a97e0dbfa780a5d73405fccee421e1aa6123" have entirely different histories.

6 changed files with 0 additions and 714 deletions

View File

@ -1,104 +0,0 @@
package com.zhyc.module.dairyProducts.yogurtTest.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.yogurtTest.domain.NpYogurtInsp;
import com.zhyc.module.dairyProducts.yogurtTest.service.INpYogurtInspService;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 酸奶生产成品检疫记录Controller
*
* @author ruoyi
* @date 2025-07-17
*/
@RestController
@RequestMapping("/yogurtTest/yogurtTest")
public class NpYogurtInspController extends BaseController
{
@Autowired
private INpYogurtInspService npYogurtInspService;
/**
* 查询酸奶生产成品检疫记录列表
*/
@PreAuthorize("@ss.hasPermi('yogurtTest:yogurtTest:list')")
@GetMapping("/list")
public TableDataInfo list(NpYogurtInsp npYogurtInsp)
{
startPage();
List<NpYogurtInsp> list = npYogurtInspService.selectNpYogurtInspList(npYogurtInsp);
return getDataTable(list);
}
/**
* 导出酸奶生产成品检疫记录列表
*/
@PreAuthorize("@ss.hasPermi('yogurtTest:yogurtTest:export')")
@Log(title = "酸奶生产,成品检疫记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, NpYogurtInsp npYogurtInsp)
{
List<NpYogurtInsp> list = npYogurtInspService.selectNpYogurtInspList(npYogurtInsp);
ExcelUtil<NpYogurtInsp> util = new ExcelUtil<NpYogurtInsp>(NpYogurtInsp.class);
util.exportExcel(response, list, "酸奶生产,成品检疫记录数据");
}
/**
* 获取酸奶生产成品检疫记录详细信息
*/
@PreAuthorize("@ss.hasPermi('yogurtTest:yogurtTest:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(npYogurtInspService.selectNpYogurtInspById(id));
}
/**
* 新增酸奶生产成品检疫记录
*/
@PreAuthorize("@ss.hasPermi('yogurtTest:yogurtTest:add')")
@Log(title = "酸奶生产,成品检疫记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody NpYogurtInsp npYogurtInsp)
{
return toAjax(npYogurtInspService.insertNpYogurtInsp(npYogurtInsp));
}
/**
* 修改酸奶生产成品检疫记录
*/
@PreAuthorize("@ss.hasPermi('yogurtTest:yogurtTest:edit')")
@Log(title = "酸奶生产,成品检疫记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody NpYogurtInsp npYogurtInsp)
{
return toAjax(npYogurtInspService.updateNpYogurtInsp(npYogurtInsp));
}
/**
* 删除酸奶生产成品检疫记录
*/
@PreAuthorize("@ss.hasPermi('yogurtTest:yogurtTest:remove')")
@Log(title = "酸奶生产,成品检疫记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(npYogurtInspService.deleteNpYogurtInspByIds(ids));
}
}

View File

@ -1,268 +0,0 @@
package com.zhyc.module.dairyProducts.yogurtTest.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_yogurt_insp
*
* @author ruoyi
* @date 2025-07-17
*/
public class NpYogurtInsp 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/g_1 */
@Excel(name = "菌落总数", readConverterExp = "C=FU/g")
private Double bacterialColony1;
/** 菌落总数CFU/g_2 */
@Excel(name = "菌落总数", readConverterExp = "C=FU/g")
private Double bacterialClony2;
/** 菌落总数CFU/g_3 */
@Excel(name = "菌落总数", readConverterExp = "C=FU/g")
private Double bacterialClony3;
/** 菌落总数CFU/g_4 */
@Excel(name = "菌落总数", readConverterExp = "C=FU/g")
private Double bacterialClony4;
/** 菌落总数CFU/g_5 */
@Excel(name = "菌落总数", readConverterExp = "C=FU/g")
private Double bacterialClony5;
/** 酵母菌(CFU/g) */
@Excel(name = "酵母菌(CFU/g)")
private Double yeast;
/** 霉菌CFU/g */
@Excel(name = "霉菌", readConverterExp = "C=FU/g")
private Double mould;
/** 乳酸菌数CFU/g */
@Excel(name = "乳酸菌数", readConverterExp = "C=FU/g")
private Double lacto;
/** 备注 */
@Excel(name = "备注")
private String comment;
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 setBacterialClony2(Double bacterialClony2)
{
this.bacterialClony2 = bacterialClony2;
}
public Double getBacterialClony2()
{
return bacterialClony2;
}
public void setBacterialClony3(Double bacterialClony3)
{
this.bacterialClony3 = bacterialClony3;
}
public Double getBacterialClony3()
{
return bacterialClony3;
}
public void setBacterialClony4(Double bacterialClony4)
{
this.bacterialClony4 = bacterialClony4;
}
public Double getBacterialClony4()
{
return bacterialClony4;
}
public void setBacterialClony5(Double bacterialClony5)
{
this.bacterialClony5 = bacterialClony5;
}
public Double getBacterialClony5()
{
return bacterialClony5;
}
public void setYeast(Double yeast)
{
this.yeast = yeast;
}
public Double getYeast()
{
return yeast;
}
public void setMould(Double mould)
{
this.mould = mould;
}
public Double getMould()
{
return mould;
}
public void setLacto(Double lacto)
{
this.lacto = lacto;
}
public Double getLacto()
{
return lacto;
}
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("source", getSource())
.append("datetime", getDatetime())
.append("fat", getFat())
.append("protein", getProtein())
.append("nonFat", getNonFat())
.append("acidity", getAcidity())
.append("bacterialColony1", getBacterialColony1())
.append("bacterialClony2", getBacterialClony2())
.append("bacterialClony3", getBacterialClony3())
.append("bacterialClony4", getBacterialClony4())
.append("bacterialClony5", getBacterialClony5())
.append("yeast", getYeast())
.append("mould", getMould())
.append("lacto", getLacto())
.append("comment", getComment())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -1,61 +0,0 @@
package com.zhyc.module.dairyProducts.yogurtTest.mapper;
import java.util.List;
import com.zhyc.module.dairyProducts.yogurtTest.domain.NpYogurtInsp;
/**
* 酸奶生产成品检疫记录Mapper接口
*
* @author ruoyi
* @date 2025-07-17
*/
public interface NpYogurtInspMapper
{
/**
* 查询酸奶生产成品检疫记录
*
* @param id 酸奶生产成品检疫记录主键
* @return 酸奶生产成品检疫记录
*/
public NpYogurtInsp selectNpYogurtInspById(Long id);
/**
* 查询酸奶生产成品检疫记录列表
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 酸奶生产成品检疫记录集合
*/
public List<NpYogurtInsp> selectNpYogurtInspList(NpYogurtInsp npYogurtInsp);
/**
* 新增酸奶生产成品检疫记录
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 结果
*/
public int insertNpYogurtInsp(NpYogurtInsp npYogurtInsp);
/**
* 修改酸奶生产成品检疫记录
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 结果
*/
public int updateNpYogurtInsp(NpYogurtInsp npYogurtInsp);
/**
* 删除酸奶生产成品检疫记录
*
* @param id 酸奶生产成品检疫记录主键
* @return 结果
*/
public int deleteNpYogurtInspById(Long id);
/**
* 批量删除酸奶生产成品检疫记录
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteNpYogurtInspByIds(Long[] ids);
}

View File

@ -1,61 +0,0 @@
package com.zhyc.module.dairyProducts.yogurtTest.service;
import java.util.List;
import com.zhyc.module.dairyProducts.yogurtTest.domain.NpYogurtInsp;
/**
* 酸奶生产成品检疫记录Service接口
*
* @author ruoyi
* @date 2025-07-17
*/
public interface INpYogurtInspService
{
/**
* 查询酸奶生产成品检疫记录
*
* @param id 酸奶生产成品检疫记录主键
* @return 酸奶生产成品检疫记录
*/
public NpYogurtInsp selectNpYogurtInspById(Long id);
/**
* 查询酸奶生产成品检疫记录列表
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 酸奶生产成品检疫记录集合
*/
public List<NpYogurtInsp> selectNpYogurtInspList(NpYogurtInsp npYogurtInsp);
/**
* 新增酸奶生产成品检疫记录
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 结果
*/
public int insertNpYogurtInsp(NpYogurtInsp npYogurtInsp);
/**
* 修改酸奶生产成品检疫记录
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 结果
*/
public int updateNpYogurtInsp(NpYogurtInsp npYogurtInsp);
/**
* 批量删除酸奶生产成品检疫记录
*
* @param ids 需要删除的酸奶生产成品检疫记录主键集合
* @return 结果
*/
public int deleteNpYogurtInspByIds(Long[] ids);
/**
* 删除酸奶生产成品检疫记录信息
*
* @param id 酸奶生产成品检疫记录主键
* @return 结果
*/
public int deleteNpYogurtInspById(Long id);
}

View File

@ -1,95 +0,0 @@
package com.zhyc.module.dairyProducts.yogurtTest.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.yogurtTest.mapper.NpYogurtInspMapper;
import com.zhyc.module.dairyProducts.yogurtTest.domain.NpYogurtInsp;
import com.zhyc.module.dairyProducts.yogurtTest.service.INpYogurtInspService;
/**
* 酸奶生产成品检疫记录Service业务层处理
*
* @author ruoyi
* @date 2025-07-17
*/
@Service
public class NpYogurtInspServiceImpl implements INpYogurtInspService
{
@Autowired
private NpYogurtInspMapper npYogurtInspMapper;
/**
* 查询酸奶生产成品检疫记录
*
* @param id 酸奶生产成品检疫记录主键
* @return 酸奶生产成品检疫记录
*/
@Override
public NpYogurtInsp selectNpYogurtInspById(Long id)
{
return npYogurtInspMapper.selectNpYogurtInspById(id);
}
/**
* 查询酸奶生产成品检疫记录列表
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 酸奶生产成品检疫记录
*/
@Override
public List<NpYogurtInsp> selectNpYogurtInspList(NpYogurtInsp npYogurtInsp)
{
return npYogurtInspMapper.selectNpYogurtInspList(npYogurtInsp);
}
/**
* 新增酸奶生产成品检疫记录
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 结果
*/
@Override
public int insertNpYogurtInsp(NpYogurtInsp npYogurtInsp)
{
npYogurtInsp.setCreateTime(DateUtils.getNowDate());
return npYogurtInspMapper.insertNpYogurtInsp(npYogurtInsp);
}
/**
* 修改酸奶生产成品检疫记录
*
* @param npYogurtInsp 酸奶生产成品检疫记录
* @return 结果
*/
@Override
public int updateNpYogurtInsp(NpYogurtInsp npYogurtInsp)
{
return npYogurtInspMapper.updateNpYogurtInsp(npYogurtInsp);
}
/**
* 批量删除酸奶生产成品检疫记录
*
* @param ids 需要删除的酸奶生产成品检疫记录主键
* @return 结果
*/
@Override
public int deleteNpYogurtInspByIds(Long[] ids)
{
return npYogurtInspMapper.deleteNpYogurtInspByIds(ids);
}
/**
* 删除酸奶生产成品检疫记录信息
*
* @param id 酸奶生产成品检疫记录主键
* @return 结果
*/
@Override
public int deleteNpYogurtInspById(Long id)
{
return npYogurtInspMapper.deleteNpYogurtInspById(id);
}
}

View File

@ -1,125 +0,0 @@
<?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.yogurtTest.mapper.NpYogurtInspMapper">
<resultMap type="NpYogurtInsp" id="NpYogurtInspResult">
<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="bacterialClony2" column="bacterial_clony_2" />
<result property="bacterialClony3" column="bacterial_clony_3" />
<result property="bacterialClony4" column="bacterial_clony_4" />
<result property="bacterialClony5" column="bacterial_clony_5" />
<result property="yeast" column="yeast" />
<result property="mould" column="mould" />
<result property="lacto" column="lacto" />
<result property="comment" column="comment" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectNpYogurtInspVo">
select id, source, datetime, fat, protein, non_fat, acidity, bacterial_colony_1, bacterial_clony_2, bacterial_clony_3, bacterial_clony_4, bacterial_clony_5, yeast, mould, lacto, comment, create_by, create_time from np_yogurt_insp
</sql>
<select id="selectNpYogurtInspList" parameterType="NpYogurtInsp" resultMap="NpYogurtInspResult">
<include refid="selectNpYogurtInspVo"/>
<where>
<if test="source != null and source != ''">
and source like concat('%', #{source}, '%')
</if>
<if test="datetime != null ">
and datetime = #{datetime}
</if>
</where>
</select>
<select id="selectNpYogurtInspById" parameterType="Long" resultMap="NpYogurtInspResult">
<include refid="selectNpYogurtInspVo"/>
where id = #{id}
</select>
<insert id="insertNpYogurtInsp" parameterType="NpYogurtInsp" useGeneratedKeys="true" keyProperty="id">
insert into np_yogurt_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="bacterialClony2 != null">bacterial_clony_2,</if>
<if test="bacterialClony3 != null">bacterial_clony_3,</if>
<if test="bacterialClony4 != null">bacterial_clony_4,</if>
<if test="bacterialClony5 != null">bacterial_clony_5,</if>
<if test="yeast != null">yeast,</if>
<if test="mould != null">mould,</if>
<if test="lacto != null">lacto,</if>
<if test="comment != null">comment,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="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="bacterialClony2 != null">#{bacterialClony2},</if>
<if test="bacterialClony3 != null">#{bacterialClony3},</if>
<if test="bacterialClony4 != null">#{bacterialClony4},</if>
<if test="bacterialClony5 != null">#{bacterialClony5},</if>
<if test="yeast != null">#{yeast},</if>
<if test="mould != null">#{mould},</if>
<if test="lacto != null">#{lacto},</if>
<if test="comment != null">#{comment},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateNpYogurtInsp" parameterType="NpYogurtInsp">
update np_yogurt_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="bacterialClony2 != null">bacterial_clony_2 = #{bacterialClony2},</if>
<if test="bacterialClony3 != null">bacterial_clony_3 = #{bacterialClony3},</if>
<if test="bacterialClony4 != null">bacterial_clony_4 = #{bacterialClony4},</if>
<if test="bacterialClony5 != null">bacterial_clony_5 = #{bacterialClony5},</if>
<if test="yeast != null">yeast = #{yeast},</if>
<if test="mould != null">mould = #{mould},</if>
<if test="lacto != null">lacto = #{lacto},</if>
<if test="comment != null">comment = #{comment},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNpYogurtInspById" parameterType="Long">
delete from np_yogurt_insp where id = #{id}
</delete>
<delete id="deleteNpYogurtInspByIds" parameterType="String">
delete from np_yogurt_insp where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>