Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
f9e215458d
@ -3,7 +3,6 @@ package com.zhyc;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
|
@ -66,6 +66,21 @@ public class SecurityUtils
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
**/
|
||||
public static String getNickName()
|
||||
{
|
||||
try
|
||||
{
|
||||
return getLoginUser().getUser().getNickName();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new ServiceException("获取用户昵称异常", HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户
|
||||
**/
|
||||
|
@ -4,7 +4,6 @@ import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.slf4j.Logger;
|
||||
@ -12,7 +11,6 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.script.RedisScript;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.zhyc.common.annotation.RateLimiter;
|
||||
import com.zhyc.common.enums.LimitType;
|
||||
import com.zhyc.common.exception.ServiceException;
|
||||
|
@ -1,9 +1,6 @@
|
||||
package com.zhyc.framework.config;
|
||||
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
||||
|
@ -8,7 +8,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.domain.BasSheepVariety;
|
||||
import com.zhyc.module.base.mapper.BasSheepMapper;
|
||||
import com.zhyc.module.base.service.IBasSheepService;
|
||||
import com.zhyc.module.base.service.IBasSheepVarietyService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
@ -1,12 +1,8 @@
|
||||
package com.zhyc.module.base.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.service.IBasSheepService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -6,7 +6,6 @@ import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.service.ISheepFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.zhyc.common.core.domain.TreeEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 分组管理对象 bas_sheep_group
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.base.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,9 +3,6 @@ package com.zhyc.module.base.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.base.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,9 +3,6 @@ package com.zhyc.module.base.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,6 @@ import com.zhyc.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 羊舍管理对象 da_sheepfold
|
||||
|
@ -6,8 +6,6 @@ import com.zhyc.common.core.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -2,7 +2,6 @@ package com.zhyc.module.base.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.domain.BasSheepType;
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@ package com.zhyc.module.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.base.mapper.BasSheepTypeMapper;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.zhyc.module.base.service.impl;
|
||||
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.base.service.ISheepFileService;
|
||||
|
@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.module.biosafety.service.IHealthService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -97,7 +98,7 @@ public class HealthController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:remove')")
|
||||
@Log(title = "保健", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(healthService.deleteHealthByIds(ids));
|
||||
|
@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
@ -37,8 +35,8 @@ public class Disinfect extends BaseEntity
|
||||
private Integer[] sheepfoldIds;
|
||||
|
||||
/** 消毒日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "消毒日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@Excel(name = "消毒日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date datetime;
|
||||
|
||||
/** 技术员 */
|
||||
|
@ -7,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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.TreeEntity;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -49,90 +49,4 @@ public class SwPrescription extends BaseEntity
|
||||
/** 处方详情信息 */
|
||||
private List<SwPresDetail> swPresDetailList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setNo(String no)
|
||||
{
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getNo()
|
||||
{
|
||||
return no;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setPersType(Integer persType)
|
||||
{
|
||||
this.persType = persType;
|
||||
}
|
||||
|
||||
public Integer getPersType()
|
||||
{
|
||||
return persType;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public List<SwPresDetail> getSwPresDetailList()
|
||||
{
|
||||
return swPresDetailList;
|
||||
}
|
||||
|
||||
public void setSwPresDetailList(List<SwPresDetail> swPresDetailList)
|
||||
{
|
||||
this.swPresDetailList = swPresDetailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("no", getNo())
|
||||
.append("name", getName())
|
||||
.append("persType", getPersType())
|
||||
.append("comment", getComment())
|
||||
.append("status", getStatus())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("swPresDetailList", getSwPresDetailList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.biosafety.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -8,8 +7,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.zhyc.module.biosafety.service;
|
||||
import java.util.List;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 治疗记录Service接口
|
||||
|
@ -10,7 +10,6 @@ import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -73,7 +72,7 @@ public class DewormServiceImpl implements IDewormService
|
||||
@Transactional
|
||||
public int insertDeworm(Deworm deworm)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
// 使用记录的文件
|
||||
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
||||
medicineUsage.setSwMedicineUsageDetailsList(deworm.getUsageDetails());
|
||||
@ -116,7 +115,7 @@ public class DewormServiceImpl implements IDewormService
|
||||
@Transactional
|
||||
public int updateDeworm(Deworm deworm)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
for (SwMedicineUsageDetails usageDetail : deworm.getUsageDetails()) {
|
||||
usageDetail.setMediUsage(deworm.getUsageId());
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class DiagnosisServiceImpl implements IDiagnosisService
|
||||
diagnosis.setGender(String.valueOf(sheepFile.getGender()));
|
||||
diagnosis.setMonthAge(sheepFile.getMonthAge());
|
||||
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
diagnosis.setCreateBy(username);
|
||||
diagnosis.setCreateTime(DateUtils.getNowDate());
|
||||
if (!Objects.equals(sheepFile.getSheepfoldId(), diagnosis.getSheepfoldId())){
|
||||
@ -98,7 +98,7 @@ public class DiagnosisServiceImpl implements IDiagnosisService
|
||||
BasSheep basSheep = new BasSheep();
|
||||
basSheep.setId(diagnosis.getSheepId());
|
||||
basSheep.setSheepfoldId(diagnosis.getSheepfoldId());
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
basSheep.setUpdateBy(username);
|
||||
basSheep.setUpdateTime(DateUtils.getNowDate());
|
||||
diagnosis.setUpdateBy(username);
|
||||
|
@ -5,9 +5,7 @@ import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.common.utils.bean.BeanUtils;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
@ -75,7 +73,7 @@ public class DisinfectServiceImpl implements IDisinfectService
|
||||
@Override
|
||||
public int insertDisinfect(Disinfect disinfect)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
// 使用记录的文件
|
||||
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
||||
medicineUsage.setSwMedicineUsageDetailsList(disinfect.getUsageDetails());
|
||||
@ -116,7 +114,7 @@ public class DisinfectServiceImpl implements IDisinfectService
|
||||
}
|
||||
medicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(disinfect.getUsageId());
|
||||
medicineUsageMapper.batchSwMedicineUsageDetails(disinfect.getUsageDetails());
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
disinfect.setUpdateBy(username);
|
||||
disinfect.setUpdateTime(DateUtils.getNowDate());
|
||||
return disinfectMapper.updateDisinfect(disinfect);
|
||||
|
@ -7,7 +7,6 @@ import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.common.utils.bean.BeanUtils;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
@ -74,7 +73,7 @@ public class HealthServiceImpl implements IHealthService
|
||||
@Override
|
||||
public int insertHealth(Health health)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
|
||||
// 使用记录的文件
|
||||
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
||||
@ -120,7 +119,7 @@ public class HealthServiceImpl implements IHealthService
|
||||
}
|
||||
medicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(health.getUsageId());
|
||||
medicineUsageMapper.batchSwMedicineUsageDetails(health.getUsageDetails());
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
health.setUpdateBy(username);
|
||||
health.setUpdateTime(DateUtils.getNowDate());
|
||||
return healthMapper.updateHealth(health);
|
||||
|
@ -7,7 +7,6 @@ import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.common.utils.bean.BeanUtils;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
@ -76,7 +75,7 @@ public class ImmunityServiceImpl implements IImmunityService
|
||||
@Override
|
||||
public int insertImmunity(Immunity immunity)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
|
||||
// 使用记录的文件
|
||||
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
||||
@ -129,6 +128,8 @@ public class ImmunityServiceImpl implements IImmunityService
|
||||
}
|
||||
medicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(immunity.getUsageId());
|
||||
medicineUsageMapper.batchSwMedicineUsageDetails(immunity.getUsageDetails());
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
immunity.setUpdateBy(username);
|
||||
immunity.setUpdateTime(DateUtils.getNowDate());
|
||||
return immunityMapper.updateImmunity(immunity);
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.common.utils.StringUtils;
|
||||
import com.zhyc.common.utils.bean.BeanUtils;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.service.impl.SheepFileServiceImpl;
|
||||
@ -61,7 +60,7 @@ public class QuarantineReportServiceImpl implements IQuarantineReportService
|
||||
@Override
|
||||
public int insertQuarantineReport(QuarantineReport quarantineReport)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
quarantineReport.setCreateBy(username);
|
||||
quarantineReport.setCreateTime(DateUtils.getNowDate());
|
||||
if (quarantineReport.getResult()==null){
|
||||
@ -97,7 +96,7 @@ public class QuarantineReportServiceImpl implements IQuarantineReportService
|
||||
@Override
|
||||
public int updateQuarantineReport(QuarantineReport quarantineReport)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
quarantineReport.setUpdateBy(username);
|
||||
quarantineReport.setUpdateTime(DateUtils.getNowDate());
|
||||
return quarantineReportMapper.updateQuarantineReport(quarantineReport);
|
||||
|
@ -59,7 +59,7 @@ public class SwMedicineUsageServiceImpl implements ISwMedicineUsageService
|
||||
@Override
|
||||
public int insertSwMedicineUsage(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
swMedicineUsage.setCreateBy(username);
|
||||
swMedicineUsage.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = swMedicineUsageMapper.insertSwMedicineUsage(swMedicineUsage);
|
||||
@ -77,7 +77,7 @@ public class SwMedicineUsageServiceImpl implements ISwMedicineUsageService
|
||||
@Override
|
||||
public int updateSwMedicineUsage(SwMedicineUsage swMedicineUsage)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
swMedicineUsage.setUpdateBy(username);
|
||||
swMedicineUsage.setUpdateTime(DateUtils.getNowDate());
|
||||
swMedicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(swMedicineUsage.getId());
|
||||
|
@ -59,7 +59,8 @@ public class SwPrescriptionServiceImpl implements ISwPrescriptionService
|
||||
@Override
|
||||
public int insertSwPrescription(SwPrescription swPrescription)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
// 获取创建人的用户名称
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
swPrescription.setCreateBy(username);
|
||||
swPrescription.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = swPrescriptionMapper.insertSwPrescription(swPrescription);
|
||||
@ -77,7 +78,7 @@ public class SwPrescriptionServiceImpl implements ISwPrescriptionService
|
||||
@Override
|
||||
public int updateSwPrescription(SwPrescription swPrescription)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
swPrescription.setUpdateBy(username);
|
||||
swPrescription.setUpdateTime(DateUtils.getNowDate());
|
||||
swPrescriptionMapper.deleteSwPresDetailByPersId(swPrescription.getId());
|
||||
|
@ -7,7 +7,6 @@ import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.common.utils.bean.BeanUtils;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.base.service.impl.SheepFileServiceImpl;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
@ -74,7 +73,7 @@ public class TreatmentServiceImpl implements ITreatmentService
|
||||
@Transactional
|
||||
public int insertTreatment(Treatment treatment)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
// 使用记录的文件
|
||||
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
||||
medicineUsage.setSwMedicineUsageDetailsList(treatment.getUsageDetails());
|
||||
@ -135,7 +134,7 @@ public class TreatmentServiceImpl implements ITreatmentService
|
||||
@Transactional
|
||||
public int updateTreatment(Treatment treatment)
|
||||
{
|
||||
String username = SecurityUtils.getUsername();
|
||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||
for (SwMedicineUsageDetails usageDetail : treatment.getUsageDetails()) {
|
||||
usageDetail.setMediUsage(treatment.getUsageId());
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.zhyc.module.common.controller;
|
||||
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.module.common.domain.UserPost;
|
||||
|
||||
import com.zhyc.module.common.service.UserPostService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//人员用户
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
UserPostService userPostService;
|
||||
|
||||
@GetMapping()
|
||||
public AjaxResult getUserPost(String postCode){
|
||||
List<UserPost> list = userPostService.getUserPostListByCode(postCode);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.zhyc.module.common.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserPost {
|
||||
// 用户名
|
||||
private String nickName;
|
||||
// 用户
|
||||
private String postName;
|
||||
// 岗位编码
|
||||
private String postCode;
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.zhyc.module.common.mapper;
|
||||
|
||||
import com.zhyc.module.common.domain.UserPost;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UserPostMapper {
|
||||
|
||||
List<UserPost> getUserPostListByCode(String postCode);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zhyc.module.common.service;
|
||||
|
||||
import com.zhyc.module.common.domain.UserPost;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserPostService {
|
||||
List<UserPost> getUserPostListByCode(String postCode);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.zhyc.module.common.service.impl;
|
||||
|
||||
import com.zhyc.module.common.domain.UserPost;
|
||||
import com.zhyc.module.common.mapper.UserPostMapper;
|
||||
import com.zhyc.module.common.service.UserPostService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserPostServiceImpl implements UserPostService {
|
||||
@Autowired
|
||||
UserPostMapper userPostMapper;
|
||||
@Override
|
||||
public List<UserPost> getUserPostListByCode(String postCode) {
|
||||
return userPostMapper.getUserPostListByCode(postCode);
|
||||
}
|
||||
}
|
@ -4,7 +4,6 @@ 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.domain.NpMilkInOutStore;
|
||||
import com.zhyc.module.dairyProducts.service.INpMilkInOutStoreService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
@ -2,13 +2,10 @@ package com.zhyc.module.dairyProducts.controller;
|
||||
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.module.dairyProducts.domain.Ranch;
|
||||
import com.zhyc.module.dairyProducts.service.IRanchService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/dairyProducts/ranch")
|
||||
public class RanchController extends BaseController {
|
||||
|
@ -19,7 +19,6 @@ import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.dairyProducts.domain.XzParityCorrection;
|
||||
import com.zhyc.module.dairyProducts.service.IXzParityCorrectionService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 胎次校正Controller
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -347,8 +347,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.dairyProducts.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.zhyc.module.dairyProducts.service;
|
||||
|
||||
import com.zhyc.module.dairyProducts.domain.NpMilkInOutStore;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -1,104 +0,0 @@
|
||||
package com.zhyc.module.feed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
import com.zhyc.module.feed.service.ISgFeedDetailsService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/details")
|
||||
public class SgFeedDetailsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFeedDetailsService sgFeedDetailsService;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedDetails> list = sgFeedDetailsService.selectSgFeedDetailsList(sgFeedDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂记录详情列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:export')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
List<SgFeedDetails> list = sgFeedDetailsService.selectSgFeedDetailsList(sgFeedDetails);
|
||||
ExcelUtil<SgFeedDetails> util = new ExcelUtil<SgFeedDetails>(SgFeedDetails.class);
|
||||
util.exportExcel(response, list, "饲喂记录详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂记录详情详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFeedDetailsService.selectSgFeedDetailsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:add')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return toAjax(sgFeedDetailsService.insertSgFeedDetails(sgFeedDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:edit')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return toAjax(sgFeedDetailsService.updateSgFeedDetails(sgFeedDetails));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:details:remove')")
|
||||
@Log(title = "饲喂记录详情", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFeedDetailsService.deleteSgFeedDetailsByIds(ids));
|
||||
}
|
||||
}
|
@ -1,104 +0,0 @@
|
||||
package com.zhyc.module.feed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
import com.zhyc.module.feed.service.ISgFeedInfoService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/info")
|
||||
public class SgFeedInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFeedInfoService sgFeedInfoService;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedInfo> list = sgFeedInfoService.selectSgFeedInfoList(sgFeedInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:export')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
List<SgFeedInfo> list = sgFeedInfoService.selectSgFeedInfoList(sgFeedInfo);
|
||||
ExcelUtil<SgFeedInfo> util = new ExcelUtil<SgFeedInfo>(SgFeedInfo.class);
|
||||
util.exportExcel(response, list, "饲喂记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFeedInfoService.selectSgFeedInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:add')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return toAjax(sgFeedInfoService.insertSgFeedInfo(sgFeedInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:edit')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return toAjax(sgFeedInfoService.updateSgFeedInfo(sgFeedInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:info:remove')")
|
||||
@Log(title = "饲喂记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFeedInfoService.deleteSgFeedInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -3,6 +3,8 @@ package com.zhyc.module.feed.controller;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.feed.domain.SgFeedPlan;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -16,21 +18,19 @@ import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.feed.domain.SgFeedPlan;
|
||||
import com.zhyc.module.feed.service.ISgFeedPlanService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂计划Controller
|
||||
*
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/FeedPlan")
|
||||
public class SgFeedPlanController extends BaseController
|
||||
{
|
||||
public class SgFeedPlanController extends BaseController {
|
||||
private final ISgFeedPlanService sgFeedPlanService;
|
||||
|
||||
public SgFeedPlanController(ISgFeedPlanService sgFeedPlanService) {
|
||||
@ -42,8 +42,7 @@ public class SgFeedPlanController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
public TableDataInfo list(SgFeedPlan sgFeedPlan) {
|
||||
startPage();
|
||||
List<SgFeedPlan> list = sgFeedPlanService.selectSgFeedPlanList(sgFeedPlan);
|
||||
return getDataTable(list);
|
||||
@ -55,8 +54,7 @@ public class SgFeedPlanController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:export')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
public void export(HttpServletResponse response, SgFeedPlan sgFeedPlan) {
|
||||
List<SgFeedPlan> list = sgFeedPlanService.selectSgFeedPlanList(sgFeedPlan);
|
||||
ExcelUtil<SgFeedPlan> util = new ExcelUtil<>(SgFeedPlan.class);
|
||||
util.exportExcel(response, list, "饲喂计划数据");
|
||||
@ -67,8 +65,7 @@ public class SgFeedPlanController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:query')")
|
||||
@GetMapping(value = "/{createDate}")
|
||||
public AjaxResult getInfo(@PathVariable("createDate") Date createDate)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("createDate") Date createDate) {
|
||||
return success(sgFeedPlanService.selectSgFeedPlanByCreateDate(createDate));
|
||||
}
|
||||
|
||||
@ -78,8 +75,13 @@ public class SgFeedPlanController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:add')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
public AjaxResult add(@RequestBody SgFeedPlan sgFeedPlan) {
|
||||
if (null == sgFeedPlan) {
|
||||
throw new RuntimeException("数据为空");
|
||||
}
|
||||
sgFeedPlan.setCreateDate(new Date());
|
||||
// 计算其他字段值
|
||||
setPlan(sgFeedPlan);
|
||||
return toAjax(sgFeedPlanService.insertSgFeedPlan(sgFeedPlan));
|
||||
}
|
||||
|
||||
@ -89,8 +91,9 @@ public class SgFeedPlanController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:edit')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedPlan sgFeedPlan)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody SgFeedPlan sgFeedPlan) {
|
||||
// 根据修改后的值重新计算
|
||||
setPlan(sgFeedPlan);
|
||||
return toAjax(sgFeedPlanService.updateSgFeedPlan(sgFeedPlan));
|
||||
}
|
||||
|
||||
@ -99,9 +102,25 @@ public class SgFeedPlanController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:FeedPlan:remove')")
|
||||
@Log(title = "饲喂计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{createDates}")
|
||||
public AjaxResult remove(@PathVariable Date[] createDates)
|
||||
{
|
||||
@DeleteMapping("/{createDates}")
|
||||
public AjaxResult remove(@PathVariable Date[] createDates) {
|
||||
return toAjax(sgFeedPlanService.deleteSgFeedPlanByCreateDates(createDates));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设定计划值
|
||||
* 用于添加和修改
|
||||
*/
|
||||
private SgFeedPlan setPlan(SgFeedPlan sgFeedPlan) {
|
||||
// 根据羊舍ID获取羊只数量
|
||||
int countByFoldId = sgFeedPlanService.getSheepCountByFoldId(sgFeedPlan.getSheepHouseId());
|
||||
sgFeedPlan.setSheepCount(countByFoldId);
|
||||
// 计算总计划量
|
||||
sgFeedPlan.setPlanFeedTotal(countByFoldId * sgFeedPlan.getPlanDailySize());
|
||||
// 计算早中晚计划量
|
||||
sgFeedPlan.setPlanMorningSize(sgFeedPlan.getPlanFeedTotal() * (sgFeedPlan.getRatioMorning() / 100));
|
||||
sgFeedPlan.setPlanNoonSize(sgFeedPlan.getPlanFeedTotal() * (sgFeedPlan.getRatioNoon() / 100));
|
||||
sgFeedPlan.setPlanAfternoonSize(sgFeedPlan.getPlanFeedTotal() * (sgFeedPlan.getRatioAfternoon() / 100));
|
||||
return sgFeedPlan;
|
||||
}
|
||||
}
|
||||
|
@ -1,104 +0,0 @@
|
||||
package com.zhyc.module.feed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
import com.zhyc.module.feed.service.ISgFeedRatioService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 饲喂比例Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/ratio")
|
||||
public class SgFeedRatioController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFeedRatioService sgFeedRatioService;
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
startPage();
|
||||
List<SgFeedRatio> list = sgFeedRatioService.selectSgFeedRatioList(sgFeedRatio);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出饲喂比例列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:export')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
List<SgFeedRatio> list = sgFeedRatioService.selectSgFeedRatioList(sgFeedRatio);
|
||||
ExcelUtil<SgFeedRatio> util = new ExcelUtil<SgFeedRatio>(SgFeedRatio.class);
|
||||
util.exportExcel(response, list, "饲喂比例数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取饲喂比例详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFeedRatioService.selectSgFeedRatioById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:add')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return toAjax(sgFeedRatioService.insertSgFeedRatio(sgFeedRatio));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:edit')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return toAjax(sgFeedRatioService.updateSgFeedRatio(sgFeedRatio));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂比例
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:ratio:remove')")
|
||||
@Log(title = "饲喂比例", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFeedRatioService.deleteSgFeedRatioByIds(ids));
|
||||
}
|
||||
}
|
@ -1,104 +0,0 @@
|
||||
package com.zhyc.module.feed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.zhyc.common.annotation.Log;
|
||||
import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
import com.zhyc.module.feed.service.ISgFodderService;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 原料Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feed/fodder")
|
||||
public class SgFodderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISgFodderService sgFodderService;
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SgFodder sgFodder)
|
||||
{
|
||||
startPage();
|
||||
List<SgFodder> list = sgFodderService.selectSgFodderList(sgFodder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出原料列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:export')")
|
||||
@Log(title = "原料", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SgFodder sgFodder)
|
||||
{
|
||||
List<SgFodder> list = sgFodderService.selectSgFodderList(sgFodder);
|
||||
ExcelUtil<SgFodder> util = new ExcelUtil<SgFodder>(SgFodder.class);
|
||||
util.exportExcel(response, list, "原料数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取原料详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(sgFodderService.selectSgFodderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:add')")
|
||||
@Log(title = "原料", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SgFodder sgFodder)
|
||||
{
|
||||
return toAjax(sgFodderService.insertSgFodder(sgFodder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:edit')")
|
||||
@Log(title = "原料", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SgFodder sgFodder)
|
||||
{
|
||||
return toAjax(sgFodderService.updateSgFodder(sgFodder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('feed:fodder:remove')")
|
||||
@Log(title = "原料", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sgFodderService.deleteSgFodderByIds(ids));
|
||||
}
|
||||
}
|
@ -3,7 +3,6 @@ package com.zhyc.module.feed.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
@ -1,82 +0,0 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情对象 sg_feed_details
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFeedDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 原料id */
|
||||
@Excel(name = "原料id")
|
||||
private String fodder;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long number;
|
||||
|
||||
/** 单位 */
|
||||
@Excel(name = "单位")
|
||||
private String nuit;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setFodder(String fodder)
|
||||
{
|
||||
this.fodder = fodder;
|
||||
}
|
||||
|
||||
public String getFodder()
|
||||
{
|
||||
return fodder;
|
||||
}
|
||||
|
||||
public void setNumber(Long number)
|
||||
{
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Long getNumber()
|
||||
{
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNuit(String nuit)
|
||||
{
|
||||
this.nuit = nuit;
|
||||
}
|
||||
|
||||
public String getNuit()
|
||||
{
|
||||
return nuit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("fodder", getFodder())
|
||||
.append("number", getNumber())
|
||||
.append("nuit", getNuit())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1,252 +0,0 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 饲喂记录对象 sg_feed_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFeedInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 配方编码 */
|
||||
@Excel(name = "配方编码")
|
||||
private Long formulaId;
|
||||
|
||||
/** 羊舍 */
|
||||
@Excel(name = "羊舍")
|
||||
private String sheepfoldId;
|
||||
|
||||
/** 日均计划量 */
|
||||
@Excel(name = "日均计划量")
|
||||
private Long average;
|
||||
|
||||
/** 早上计划量(通过饲喂比例算出来) */
|
||||
@Excel(name = "早上计划量(通过饲喂比例算出来)")
|
||||
private Long planMonring;
|
||||
|
||||
/** 实际添加(早) */
|
||||
@Excel(name = "实际添加", readConverterExp = "早=")
|
||||
private Long actualMonring;
|
||||
|
||||
/** 中午计划量 */
|
||||
@Excel(name = "中午计划量")
|
||||
private Long planNoon;
|
||||
|
||||
/** 实际添加(中) */
|
||||
@Excel(name = "实际添加", readConverterExp = "中=")
|
||||
private Long actualNoon;
|
||||
|
||||
/** 下午计划量 */
|
||||
@Excel(name = "下午计划量")
|
||||
private Long planEvenig;
|
||||
|
||||
/** 实际添加(下) */
|
||||
@Excel(name = "实际添加", readConverterExp = "下=")
|
||||
private Long actualEvening;
|
||||
|
||||
/** 颗粒原料 */
|
||||
@Excel(name = "颗粒原料")
|
||||
private Long particle;
|
||||
|
||||
/** 其他原料 */
|
||||
@Excel(name = "其他原料")
|
||||
private Long other;
|
||||
|
||||
/** 补饲饲料 */
|
||||
@Excel(name = "补饲饲料")
|
||||
private Long replenish;
|
||||
|
||||
/** 饲喂日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "饲喂日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date planDate;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setFormulaId(Long formulaId)
|
||||
{
|
||||
this.formulaId = formulaId;
|
||||
}
|
||||
|
||||
public Long getFormulaId()
|
||||
{
|
||||
return formulaId;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(String sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public String getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setAverage(Long average)
|
||||
{
|
||||
this.average = average;
|
||||
}
|
||||
|
||||
public Long getAverage()
|
||||
{
|
||||
return average;
|
||||
}
|
||||
|
||||
public void setPlanMonring(Long planMonring)
|
||||
{
|
||||
this.planMonring = planMonring;
|
||||
}
|
||||
|
||||
public Long getPlanMonring()
|
||||
{
|
||||
return planMonring;
|
||||
}
|
||||
|
||||
public void setActualMonring(Long actualMonring)
|
||||
{
|
||||
this.actualMonring = actualMonring;
|
||||
}
|
||||
|
||||
public Long getActualMonring()
|
||||
{
|
||||
return actualMonring;
|
||||
}
|
||||
|
||||
public void setPlanNoon(Long planNoon)
|
||||
{
|
||||
this.planNoon = planNoon;
|
||||
}
|
||||
|
||||
public Long getPlanNoon()
|
||||
{
|
||||
return planNoon;
|
||||
}
|
||||
|
||||
public void setActualNoon(Long actualNoon)
|
||||
{
|
||||
this.actualNoon = actualNoon;
|
||||
}
|
||||
|
||||
public Long getActualNoon()
|
||||
{
|
||||
return actualNoon;
|
||||
}
|
||||
|
||||
public void setPlanEvenig(Long planEvenig)
|
||||
{
|
||||
this.planEvenig = planEvenig;
|
||||
}
|
||||
|
||||
public Long getPlanEvenig()
|
||||
{
|
||||
return planEvenig;
|
||||
}
|
||||
|
||||
public void setActualEvening(Long actualEvening)
|
||||
{
|
||||
this.actualEvening = actualEvening;
|
||||
}
|
||||
|
||||
public Long getActualEvening()
|
||||
{
|
||||
return actualEvening;
|
||||
}
|
||||
|
||||
public void setParticle(Long particle)
|
||||
{
|
||||
this.particle = particle;
|
||||
}
|
||||
|
||||
public Long getParticle()
|
||||
{
|
||||
return particle;
|
||||
}
|
||||
|
||||
public void setOther(Long other)
|
||||
{
|
||||
this.other = other;
|
||||
}
|
||||
|
||||
public Long getOther()
|
||||
{
|
||||
return other;
|
||||
}
|
||||
|
||||
public void setReplenish(Long replenish)
|
||||
{
|
||||
this.replenish = replenish;
|
||||
}
|
||||
|
||||
public Long getReplenish()
|
||||
{
|
||||
return replenish;
|
||||
}
|
||||
|
||||
public void setPlanDate(Date planDate)
|
||||
{
|
||||
this.planDate = planDate;
|
||||
}
|
||||
|
||||
public Date getPlanDate()
|
||||
{
|
||||
return planDate;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("formulaId", getFormulaId())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("average", getAverage())
|
||||
.append("planMonring", getPlanMonring())
|
||||
.append("actualMonring", getActualMonring())
|
||||
.append("planNoon", getPlanNoon())
|
||||
.append("actualNoon", getActualNoon())
|
||||
.append("planEvenig", getPlanEvenig())
|
||||
.append("actualEvening", getActualEvening())
|
||||
.append("particle", getParticle())
|
||||
.append("other", getOther())
|
||||
.append("replenish", getReplenish())
|
||||
.append("planDate", getPlanDate())
|
||||
.append("comment", getComment())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -13,86 +13,88 @@ import com.zhyc.common.core.domain.BaseEntity;
|
||||
* 饲喂计划对象 sg_feed_plan
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Setter
|
||||
public class SgFeedPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 创建日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createDate;
|
||||
|
||||
/** 配方编码 */
|
||||
@Excel(name = "配方编码")
|
||||
private String formulaId;
|
||||
|
||||
/** 批号 */
|
||||
@Excel(name = "批号")
|
||||
private String batchId;
|
||||
|
||||
/** 羊舍 */
|
||||
@Excel(name = "羊舍")
|
||||
private Long sheepHouseId;
|
||||
private Integer sheepHouseId;
|
||||
|
||||
/** 羊只数量 */
|
||||
@Excel(name = "羊只数量")
|
||||
private Long sheepCount;
|
||||
private Integer sheepCount;
|
||||
|
||||
/** 日均计划量 */
|
||||
@Excel(name = "日均计划量")
|
||||
private Long planDailySize;
|
||||
|
||||
/** 计划量(早) */
|
||||
@Excel(name = "计划量(早)")
|
||||
private Long planMorningSize;
|
||||
|
||||
/** 计划总量(早) */
|
||||
@Excel(name = "计划总量(早)")
|
||||
private Long planMorningTotal;
|
||||
private Double planDailySize;
|
||||
|
||||
/** 饲喂比例(早) */
|
||||
@Excel(name = "饲喂比例(早)")
|
||||
private Long ratioMorning;
|
||||
|
||||
/** 实际量(早) */
|
||||
@Excel(name = "实际量(早)")
|
||||
private Long actualMorningSize;
|
||||
|
||||
/** 计划量(中) */
|
||||
@Excel(name = "计划量(中)")
|
||||
private Long planNoonSize;
|
||||
|
||||
/** 计划总量(中) */
|
||||
@Excel(name = "计划总量(中)")
|
||||
private Long planNoonTotal;
|
||||
|
||||
/** 实际量(中) */
|
||||
@Excel(name = "实际量(中)")
|
||||
private Long actualNoonSize;
|
||||
private Double ratioMorning;
|
||||
|
||||
/** 饲喂比例(中) */
|
||||
@Excel(name = "饲喂比例(中)")
|
||||
private Long ratioNoon;
|
||||
|
||||
/** 计划量(下) */
|
||||
@Excel(name = "计划量(下)")
|
||||
private Long planAfternoonSize;
|
||||
|
||||
/** 计划总量(下) */
|
||||
@Excel(name = "计划总量(下)")
|
||||
private Long planAfternoonTotal;
|
||||
|
||||
/** 实际量(下) */
|
||||
@Excel(name = "实际量(下)")
|
||||
private Long actualAfternoonSize;
|
||||
private Double ratioNoon;
|
||||
|
||||
/** 饲喂比例(下) */
|
||||
@Excel(name = "饲喂比例(下)")
|
||||
private Long ratioAfternoon;
|
||||
private Double ratioAfternoon;
|
||||
|
||||
/** 计划量(早) */
|
||||
@Excel(name = "计划量(早)")
|
||||
private Double planMorningSize;
|
||||
|
||||
/** 计划总量(早) */
|
||||
@Excel(name = "计划总量(早)")
|
||||
private Double planMorningTotal;
|
||||
|
||||
/** 实际量(早) */
|
||||
@Excel(name = "实际量(早)")
|
||||
private Double actualMorningSize;
|
||||
|
||||
/** 计划量(中) */
|
||||
@Excel(name = "计划量(中)")
|
||||
private Double planNoonSize;
|
||||
|
||||
/** 计划总量(中) */
|
||||
@Excel(name = "计划总量(中)")
|
||||
private Double planNoonTotal;
|
||||
|
||||
/** 实际量(中) */
|
||||
@Excel(name = "实际量(中)")
|
||||
private Double actualNoonSize;
|
||||
|
||||
/** 计划量(下) */
|
||||
@Excel(name = "计划量(下)")
|
||||
private Double planAfternoonSize;
|
||||
|
||||
/** 计划总量(下) */
|
||||
@Excel(name = "计划总量(下)")
|
||||
private Double planAfternoonTotal;
|
||||
|
||||
/** 实际量(下) */
|
||||
@Excel(name = "实际量(下)")
|
||||
private Double actualAfternoonSize;
|
||||
|
||||
/** 计划饲喂总量 */
|
||||
@Excel(name = "计划饲喂总量")
|
||||
private Long planFeedTotal;
|
||||
private Double planFeedTotal;
|
||||
|
||||
/** 饲草班人员 */
|
||||
@Excel(name = "饲草班人员")
|
||||
@ -108,21 +110,22 @@ public class SgFeedPlan extends BaseEntity
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("createDate", getCreateDate())
|
||||
.append("formulaId", getFormulaId())
|
||||
.append("batchId", getBatchId())
|
||||
.append("sheepHouseId", getSheepHouseId())
|
||||
.append("sheepCount", getSheepCount())
|
||||
.append("planDailySize", getPlanDailySize())
|
||||
.append("ratioMorning", getRatioMorning())
|
||||
.append("ratioNoon", getRatioNoon())
|
||||
.append("ratioAfternoon", getRatioAfternoon())
|
||||
.append("planMorningSize", getPlanMorningSize())
|
||||
.append("planMorningTotal", getPlanMorningTotal())
|
||||
.append("ratioMorning", getRatioMorning())
|
||||
.append("actualMorningSize", getActualMorningSize())
|
||||
.append("planNoonSize", getPlanNoonSize())
|
||||
.append("planNoonTotal", getPlanNoonTotal())
|
||||
.append("actualNoonSize", getActualNoonSize())
|
||||
.append("ratioNoon", getRatioNoon())
|
||||
.append("planAfternoonSize", getPlanAfternoonSize())
|
||||
.append("planAfternoonTotal", getPlanAfternoonTotal())
|
||||
.append("actualAfternoonSize", getActualAfternoonSize())
|
||||
.append("ratioAfternoon", getRatioAfternoon())
|
||||
.append("planFeedTotal", getPlanFeedTotal())
|
||||
.append("zookeeper", getZookeeper())
|
||||
.append("planDate", getPlanDate())
|
||||
|
@ -1,82 +0,0 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 饲喂比例对象 sg_feed_ratio
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFeedRatio extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 早晨计划比列 */
|
||||
@Excel(name = "早晨计划比列")
|
||||
private String morning;
|
||||
|
||||
/** 中午计划比例 */
|
||||
@Excel(name = "中午计划比例")
|
||||
private String noon;
|
||||
|
||||
/** 下午计划比例 */
|
||||
@Excel(name = "下午计划比例")
|
||||
private String evening;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setMorning(String morning)
|
||||
{
|
||||
this.morning = morning;
|
||||
}
|
||||
|
||||
public String getMorning()
|
||||
{
|
||||
return morning;
|
||||
}
|
||||
|
||||
public void setNoon(String noon)
|
||||
{
|
||||
this.noon = noon;
|
||||
}
|
||||
|
||||
public String getNoon()
|
||||
{
|
||||
return noon;
|
||||
}
|
||||
|
||||
public void setEvening(String evening)
|
||||
{
|
||||
this.evening = evening;
|
||||
}
|
||||
|
||||
public String getEvening()
|
||||
{
|
||||
return evening;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("morning", getMorning())
|
||||
.append("noon", getNoon())
|
||||
.append("evening", getEvening())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package com.zhyc.module.feed.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 原料对象 sg_fodder
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public class SgFodder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 0补饲饲料1配方原料2颗粒原料 */
|
||||
@Excel(name = "0补饲饲料1配方原料2颗粒原料")
|
||||
private Long fodderType;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setFodderType(Long fodderType)
|
||||
{
|
||||
this.fodderType = fodderType;
|
||||
}
|
||||
|
||||
public Long getFodderType()
|
||||
{
|
||||
return fodderType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("fodderType", getFodderType())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFeedDetailsMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
public SgFeedDetails selectSgFeedDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 饲喂记录详情集合
|
||||
*/
|
||||
public List<SgFeedDetails> selectSgFeedDetailsList(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsByIds(Long[] ids);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFeedInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
public SgFeedInfo selectSgFeedInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 饲喂记录集合
|
||||
*/
|
||||
public List<SgFeedInfo> selectSgFeedInfoList(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoByIds(Long[] ids);
|
||||
}
|
@ -9,7 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
* 饲喂计划Mapper接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Mapper
|
||||
public interface SgFeedPlanMapper
|
||||
@ -20,7 +20,7 @@ public interface SgFeedPlanMapper
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 饲喂计划
|
||||
*/
|
||||
SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate);
|
||||
public SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
/**
|
||||
* 查询饲喂计划列表
|
||||
@ -28,7 +28,7 @@ public interface SgFeedPlanMapper
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 饲喂计划集合
|
||||
*/
|
||||
List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan);
|
||||
public List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 新增饲喂计划
|
||||
@ -36,7 +36,7 @@ public interface SgFeedPlanMapper
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
public int insertSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 修改饲喂计划
|
||||
@ -44,7 +44,7 @@ public interface SgFeedPlanMapper
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
public int updateSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 删除饲喂计划
|
||||
@ -52,7 +52,7 @@ public interface SgFeedPlanMapper
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDate(Date createDate);
|
||||
public int deleteSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂计划
|
||||
@ -60,5 +60,7 @@ public interface SgFeedPlanMapper
|
||||
* @param createDates 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDates(Date[] createDates);
|
||||
public int deleteSgFeedPlanByCreateDates(Date[] createDates);
|
||||
|
||||
int selectSheepCountByFoldId(Integer foldId);
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
|
||||
/**
|
||||
* 饲喂比例Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFeedRatioMapper
|
||||
{
|
||||
/**
|
||||
* 查询饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
public SgFeedRatio selectSgFeedRatioById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 饲喂比例集合
|
||||
*/
|
||||
public List<SgFeedRatio> selectSgFeedRatioList(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 删除饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂比例
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioByIds(Long[] ids);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
|
||||
/**
|
||||
* 原料Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface SgFodderMapper
|
||||
{
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
public SgFodder selectSgFodderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 原料集合
|
||||
*/
|
||||
public List<SgFodder> selectSgFodderList(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 删除原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderByIds(Long[] ids);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFeedDetailsService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
public SgFeedDetails selectSgFeedDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 饲喂记录详情集合
|
||||
*/
|
||||
public List<SgFeedDetails> selectSgFeedDetailsList(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedDetails(SgFeedDetails sgFeedDetails);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录详情
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录详情主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情信息
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedDetailsById(Long id);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
|
||||
/**
|
||||
* 饲喂记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFeedInfoService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
public SgFeedInfo selectSgFeedInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 饲喂记录集合
|
||||
*/
|
||||
public List<SgFeedInfo> selectSgFeedInfoList(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedInfo(SgFeedInfo sgFeedInfo);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除饲喂记录信息
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedInfoById(Long id);
|
||||
}
|
@ -8,7 +8,7 @@ import com.zhyc.module.feed.domain.SgFeedPlan;
|
||||
* 饲喂计划Service接口
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
public interface ISgFeedPlanService
|
||||
{
|
||||
@ -18,7 +18,7 @@ public interface ISgFeedPlanService
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 饲喂计划
|
||||
*/
|
||||
SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate);
|
||||
public SgFeedPlan selectSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
/**
|
||||
* 查询饲喂计划列表
|
||||
@ -26,7 +26,7 @@ public interface ISgFeedPlanService
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 饲喂计划集合
|
||||
*/
|
||||
List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan);
|
||||
public List<SgFeedPlan> selectSgFeedPlanList(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 新增饲喂计划
|
||||
@ -34,7 +34,7 @@ public interface ISgFeedPlanService
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
public int insertSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 修改饲喂计划
|
||||
@ -42,7 +42,7 @@ public interface ISgFeedPlanService
|
||||
* @param sgFeedPlan 饲喂计划
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
public int updateSgFeedPlan(SgFeedPlan sgFeedPlan);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂计划
|
||||
@ -50,7 +50,7 @@ public interface ISgFeedPlanService
|
||||
* @param createDates 需要删除的饲喂计划主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDates(Date[] createDates);
|
||||
public int deleteSgFeedPlanByCreateDates(Date[] createDates);
|
||||
|
||||
/**
|
||||
* 删除饲喂计划信息
|
||||
@ -58,5 +58,7 @@ public interface ISgFeedPlanService
|
||||
* @param createDate 饲喂计划主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSgFeedPlanByCreateDate(Date createDate);
|
||||
public int deleteSgFeedPlanByCreateDate(Date createDate);
|
||||
|
||||
int getSheepCountByFoldId(Integer foldId);
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
|
||||
/**
|
||||
* 饲喂比例Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFeedRatioService
|
||||
{
|
||||
/**
|
||||
* 查询饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
public SgFeedRatio selectSgFeedRatioById(Long id);
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 饲喂比例集合
|
||||
*/
|
||||
public List<SgFeedRatio> selectSgFeedRatioList(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFeedRatio(SgFeedRatio sgFeedRatio);
|
||||
|
||||
/**
|
||||
* 批量删除饲喂比例
|
||||
*
|
||||
* @param ids 需要删除的饲喂比例主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除饲喂比例信息
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFeedRatioById(Long id);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.zhyc.module.feed.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
|
||||
/**
|
||||
* 原料Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
public interface ISgFodderService
|
||||
{
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
public SgFodder selectSgFodderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 原料集合
|
||||
*/
|
||||
public List<SgFodder> selectSgFodderList(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSgFodder(SgFodder sgFodder);
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param ids 需要删除的原料主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除原料信息
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSgFodderById(Long id);
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFeedDetailsMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedDetails;
|
||||
import com.zhyc.module.feed.service.ISgFeedDetailsService;
|
||||
|
||||
/**
|
||||
* 饲喂记录详情Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFeedDetailsServiceImpl implements ISgFeedDetailsService
|
||||
{
|
||||
@Autowired
|
||||
private SgFeedDetailsMapper sgFeedDetailsMapper;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
@Override
|
||||
public SgFeedDetails selectSgFeedDetailsById(Long id)
|
||||
{
|
||||
return sgFeedDetailsMapper.selectSgFeedDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂记录详情列表
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 饲喂记录详情
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedDetails> selectSgFeedDetailsList(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return sgFeedDetailsMapper.selectSgFeedDetailsList(sgFeedDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedDetails(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return sgFeedDetailsMapper.insertSgFeedDetails(sgFeedDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录详情
|
||||
*
|
||||
* @param sgFeedDetails 饲喂记录详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedDetails(SgFeedDetails sgFeedDetails)
|
||||
{
|
||||
return sgFeedDetailsMapper.updateSgFeedDetails(sgFeedDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录详情
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedDetailsByIds(Long[] ids)
|
||||
{
|
||||
return sgFeedDetailsMapper.deleteSgFeedDetailsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录详情信息
|
||||
*
|
||||
* @param id 饲喂记录详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedDetailsById(Long id)
|
||||
{
|
||||
return sgFeedDetailsMapper.deleteSgFeedDetailsById(id);
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFeedInfoMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedInfo;
|
||||
import com.zhyc.module.feed.service.ISgFeedInfoService;
|
||||
|
||||
/**
|
||||
* 饲喂记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFeedInfoServiceImpl implements ISgFeedInfoService
|
||||
{
|
||||
@Autowired
|
||||
private SgFeedInfoMapper sgFeedInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询饲喂记录
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
@Override
|
||||
public SgFeedInfo selectSgFeedInfoById(Long id)
|
||||
{
|
||||
return sgFeedInfoMapper.selectSgFeedInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂记录列表
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 饲喂记录
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedInfo> selectSgFeedInfoList(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return sgFeedInfoMapper.selectSgFeedInfoList(sgFeedInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedInfo(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
sgFeedInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return sgFeedInfoMapper.insertSgFeedInfo(sgFeedInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂记录
|
||||
*
|
||||
* @param sgFeedInfo 饲喂记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedInfo(SgFeedInfo sgFeedInfo)
|
||||
{
|
||||
return sgFeedInfoMapper.updateSgFeedInfo(sgFeedInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂记录
|
||||
*
|
||||
* @param ids 需要删除的饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedInfoByIds(Long[] ids)
|
||||
{
|
||||
return sgFeedInfoMapper.deleteSgFeedInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂记录信息
|
||||
*
|
||||
* @param id 饲喂记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedInfoById(Long id)
|
||||
{
|
||||
return sgFeedInfoMapper.deleteSgFeedInfoById(id);
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
* 饲喂计划Service业务层处理
|
||||
*
|
||||
* @author HashMap
|
||||
* @date 2025-08-08
|
||||
* @date 2025-08-14
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@ -96,4 +96,9 @@ public class SgFeedPlanServiceImpl implements ISgFeedPlanService
|
||||
{
|
||||
return sgFeedPlanMapper.deleteSgFeedPlanByCreateDate(createDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSheepCountByFoldId(Integer foldId) {
|
||||
return sgFeedPlanMapper.selectSheepCountByFoldId(foldId);
|
||||
}
|
||||
}
|
||||
|
@ -1,93 +0,0 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFeedRatioMapper;
|
||||
import com.zhyc.module.feed.domain.SgFeedRatio;
|
||||
import com.zhyc.module.feed.service.ISgFeedRatioService;
|
||||
|
||||
/**
|
||||
* 饲喂比例Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFeedRatioServiceImpl implements ISgFeedRatioService
|
||||
{
|
||||
@Autowired
|
||||
private SgFeedRatioMapper sgFeedRatioMapper;
|
||||
|
||||
/**
|
||||
* 查询饲喂比例
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
@Override
|
||||
public SgFeedRatio selectSgFeedRatioById(Long id)
|
||||
{
|
||||
return sgFeedRatioMapper.selectSgFeedRatioById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询饲喂比例列表
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 饲喂比例
|
||||
*/
|
||||
@Override
|
||||
public List<SgFeedRatio> selectSgFeedRatioList(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return sgFeedRatioMapper.selectSgFeedRatioList(sgFeedRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFeedRatio(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return sgFeedRatioMapper.insertSgFeedRatio(sgFeedRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改饲喂比例
|
||||
*
|
||||
* @param sgFeedRatio 饲喂比例
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFeedRatio(SgFeedRatio sgFeedRatio)
|
||||
{
|
||||
return sgFeedRatioMapper.updateSgFeedRatio(sgFeedRatio);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除饲喂比例
|
||||
*
|
||||
* @param ids 需要删除的饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedRatioByIds(Long[] ids)
|
||||
{
|
||||
return sgFeedRatioMapper.deleteSgFeedRatioByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除饲喂比例信息
|
||||
*
|
||||
* @param id 饲喂比例主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFeedRatioById(Long id)
|
||||
{
|
||||
return sgFeedRatioMapper.deleteSgFeedRatioById(id);
|
||||
}
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFodderMapper;
|
||||
import com.zhyc.module.feed.domain.SgFodder;
|
||||
import com.zhyc.module.feed.service.ISgFodderService;
|
||||
|
||||
/**
|
||||
* 原料Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-01
|
||||
*/
|
||||
@Service
|
||||
public class SgFodderServiceImpl implements ISgFodderService
|
||||
{
|
||||
@Autowired
|
||||
private SgFodderMapper sgFodderMapper;
|
||||
|
||||
/**
|
||||
* 查询原料
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 原料
|
||||
*/
|
||||
@Override
|
||||
public SgFodder selectSgFodderById(Long id)
|
||||
{
|
||||
return sgFodderMapper.selectSgFodderById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询原料列表
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 原料
|
||||
*/
|
||||
@Override
|
||||
public List<SgFodder> selectSgFodderList(SgFodder sgFodder)
|
||||
{
|
||||
return sgFodderMapper.selectSgFodderList(sgFodder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSgFodder(SgFodder sgFodder)
|
||||
{
|
||||
return sgFodderMapper.insertSgFodder(sgFodder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改原料
|
||||
*
|
||||
* @param sgFodder 原料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSgFodder(SgFodder sgFodder)
|
||||
{
|
||||
return sgFodderMapper.updateSgFodder(sgFodder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除原料
|
||||
*
|
||||
* @param ids 需要删除的原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFodderByIds(Long[] ids)
|
||||
{
|
||||
return sgFodderMapper.deleteSgFodderByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除原料信息
|
||||
*
|
||||
* @param id 原料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSgFodderById(Long id)
|
||||
{
|
||||
return sgFodderMapper.deleteSgFodderById(id);
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.zhyc.module.feed.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.feed.mapper.SgFormulaListMapper;
|
||||
|
@ -3,7 +3,6 @@ package com.zhyc.module.produce.bodyManage.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.common.utils.SecurityUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -3,11 +3,8 @@ package com.zhyc.module.produce.bodyManage.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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.springframework.data.annotation.AccessType;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
@ -6,8 +6,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -4,8 +4,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.zhyc.module.produce.breed.controller;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.produce.breed.domain.ScBreedPlanGenerate;
|
||||
import com.zhyc.module.produce.breed.service.IScBreedPlanGenerateService;
|
||||
@ -21,6 +22,7 @@ import com.zhyc.common.core.controller.BaseController;
|
||||
import com.zhyc.common.core.domain.AjaxResult;
|
||||
import com.zhyc.common.enums.BusinessType;
|
||||
import com.zhyc.common.core.page.TableDataInfo;
|
||||
import com.zhyc.common.utils.poi.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 配种计划生成Controller
|
||||
@ -78,6 +80,12 @@ public class ScBreedPlanGenerateController extends BaseController
|
||||
public AjaxResult autoGenerateBreedPlan(@RequestBody Map<String, Object> params)
|
||||
{
|
||||
try {
|
||||
// 获取计划类型
|
||||
Integer planType = params.get("planType") != null ? (Integer) params.get("planType") : 1;
|
||||
|
||||
// 计划名称由系统自动生成,不再从前端传入
|
||||
String planName = null;
|
||||
|
||||
// 安全的类型转换
|
||||
List<?> eweIdsRaw = (List<?>) params.get("eweIds");
|
||||
List<?> ramIdsRaw = (List<?>) params.get("ramIds");
|
||||
@ -110,7 +118,7 @@ public class ScBreedPlanGenerateController extends BaseController
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
ScBreedPlanGenerate planGenerate = scBreedPlanGenerateService.autoGenerateBreedPlan(eweIds, ramIds);
|
||||
ScBreedPlanGenerate planGenerate = scBreedPlanGenerateService.autoGenerateBreedPlan(planType, planName, eweIds, ramIds);
|
||||
return success(planGenerate);
|
||||
} catch (Exception e) {
|
||||
logger.error("自动生成配种计划失败", e);
|
||||
@ -151,14 +159,38 @@ public class ScBreedPlanGenerateController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批配种计划
|
||||
* 获取审批配种计划详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mating_plan:generate:approve')")
|
||||
@Log(title = "审批配种计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/approve/{id}")
|
||||
public AjaxResult approve(@PathVariable Long id)
|
||||
@GetMapping("/approve/{id}")
|
||||
public AjaxResult getApproveInfo(@PathVariable Long id)
|
||||
{
|
||||
return toAjax(scBreedPlanGenerateService.approveBreedPlan(id));
|
||||
Map<String, Object> approveDetails = scBreedPlanGenerateService.getApproveBreedPlanDetails(id);
|
||||
return success(approveDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认审批配种计划
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mating_plan:generate:approve')")
|
||||
@Log(title = "确认审批配种计划", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/approve/confirm")
|
||||
public AjaxResult confirmApprove(@RequestBody Map<String, Object> params)
|
||||
{
|
||||
try {
|
||||
Long planId = Long.valueOf(params.get("planId").toString());
|
||||
Integer status = Integer.valueOf(params.get("status").toString());
|
||||
String approveRemark = params.get("approveRemark") != null ? params.get("approveRemark").toString() : "";
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Map<String, Object>> planDetails = (List<Map<String, Object>>) params.get("planDetails");
|
||||
|
||||
int result = scBreedPlanGenerateService.confirmApproveBreedPlan(planId, planDetails, status, approveRemark);
|
||||
return toAjax(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("确认审批配种计划失败", e);
|
||||
return error("确认审批配种计划失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -172,6 +204,41 @@ public class ScBreedPlanGenerateController extends BaseController
|
||||
return success(planDetails);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配种计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mating_plan:generate:export')")
|
||||
@Log(title = "导出配种计划列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScBreedPlanGenerate scBreedPlanGenerate)
|
||||
{
|
||||
List<ScBreedPlanGenerate> list = scBreedPlanGenerateService.selectScBreedPlanGenerateList(scBreedPlanGenerate);
|
||||
ExcelUtil<ScBreedPlanGenerate> util = new ExcelUtil<ScBreedPlanGenerate>(ScBreedPlanGenerate.class);
|
||||
util.exportExcel(response, list, "配种计划生成数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配种计划详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mating_plan:generate:export')")
|
||||
@Log(title = "导出配种计划详情", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export/{id}")
|
||||
public void exportBreedPlanDetails(HttpServletResponse response, @PathVariable Long id)
|
||||
{
|
||||
try {
|
||||
scBreedPlanGenerateService.exportBreedPlanDetails(response, id);
|
||||
} catch (Exception e) {
|
||||
logger.error("导出配种计划详情失败", e);
|
||||
// 在出错时返回错误信息给前端
|
||||
try {
|
||||
response.setContentType("application/json;charset=utf-8");
|
||||
response.getWriter().write("{\"code\":500,\"msg\":\"导出失败:" + e.getMessage() + "\"}");
|
||||
} catch (Exception ex) {
|
||||
logger.error("返回错误信息失败", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配种计划生成
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.zhyc.module.produce.breed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -76,7 +77,11 @@ public class ScBreedRecordController extends BaseController
|
||||
@GetMapping(value = "/getSheepByTags/{manageTags}")
|
||||
public AjaxResult getSheepInfoByTags(@PathVariable("manageTags") String manageTags)
|
||||
{
|
||||
return success(scBreedRecordService.getSheepInfoByTags(manageTags));
|
||||
Map<String, Object> sheepInfo = scBreedRecordService.getSheepInfoByTags(manageTags);
|
||||
if (sheepInfo == null || sheepInfo.isEmpty()) {
|
||||
return error("未找到耳号为 " + manageTags + " 的羊只信息");
|
||||
}
|
||||
return success(sheepInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,7 +91,25 @@ public class ScBreedRecordController extends BaseController
|
||||
@GetMapping(value = "/getBreedPlan/{manageTags}")
|
||||
public AjaxResult getBreedPlanByEweTags(@PathVariable("manageTags") String manageTags)
|
||||
{
|
||||
return success(scBreedRecordService.getBreedPlanByEweTags(manageTags));
|
||||
Map<String, Object> breedPlan = scBreedRecordService.getBreedPlanByEweTags(manageTags);
|
||||
if (breedPlan == null || breedPlan.isEmpty()) {
|
||||
return error("未找到耳号为 " + manageTags + " 的母羊配种计划");
|
||||
}
|
||||
return success(breedPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据母羊耳号获取最新配种计划信息(优先从配种计划生成表获取)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Breeding_records:Breeding_records:query')")
|
||||
@GetMapping(value = "/getLatestBreedPlan/{manageTags}")
|
||||
public AjaxResult getLatestBreedPlanByEweTags(@PathVariable("manageTags") String manageTags)
|
||||
{
|
||||
Map<String, Object> breedPlan = scBreedRecordService.getLatestBreedPlanByEweTags(manageTags);
|
||||
if (breedPlan == null || breedPlan.isEmpty()) {
|
||||
return error("未找到耳号为 " + manageTags + " 的母羊配种计划");
|
||||
}
|
||||
return success(breedPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,24 +120,43 @@ public class ScBreedRecordController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScBreedRecord scBreedRecord)
|
||||
{
|
||||
// 如果传入的是耳号,需要转换为羊只ID
|
||||
// 处理母羊耳号转换
|
||||
if (scBreedRecord.getEweManageTags() != null && !scBreedRecord.getEweManageTags().isEmpty()) {
|
||||
Long eweId = scBreedRecordService.getSheepIdByTags(scBreedRecord.getEweManageTags());
|
||||
if (eweId == null) {
|
||||
return error("未找到母羊耳号对应的羊只信息");
|
||||
return error("未找到母羊耳号 " + scBreedRecord.getEweManageTags() + " 对应的羊只信息");
|
||||
}
|
||||
scBreedRecord.setEweId(eweId.toString());
|
||||
scBreedRecord.setSheepId(eweId); // 设置羊只ID为母羊ID
|
||||
}
|
||||
|
||||
// 处理公羊耳号转换
|
||||
if (scBreedRecord.getRamManageTags() != null && !scBreedRecord.getRamManageTags().isEmpty()) {
|
||||
Long ramId = scBreedRecordService.getRamIdByTags(scBreedRecord.getRamManageTags());
|
||||
if (ramId == null) {
|
||||
return error("未找到公羊耳号对应的羊只信息");
|
||||
return error("未找到公羊耳号 " + scBreedRecord.getRamManageTags() + " 对应的羊只信息");
|
||||
}
|
||||
scBreedRecord.setRamId(ramId.toString());
|
||||
}
|
||||
|
||||
return toAjax(scBreedRecordService.insertScBreedRecord(scBreedRecord));
|
||||
// 验证配种方式
|
||||
if (scBreedRecord.getBreedType() == null) {
|
||||
return error("配种方式不能为空");
|
||||
}
|
||||
if (scBreedRecord.getBreedType() != 1 && scBreedRecord.getBreedType() != 2) {
|
||||
return error("配种方式只能是:1-同期发情 或 2-本交");
|
||||
}
|
||||
|
||||
// 验证技术员
|
||||
if (scBreedRecord.getTechnician() == null || scBreedRecord.getTechnician().trim().isEmpty()) {
|
||||
return error("技术员不能为空");
|
||||
}
|
||||
|
||||
int result = scBreedRecordService.insertScBreedRecord(scBreedRecord);
|
||||
if (result > 0) {
|
||||
return success("配种记录新增成功");
|
||||
}
|
||||
return error("配种记录新增失败");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -125,23 +167,32 @@ public class ScBreedRecordController extends BaseController
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScBreedRecord scBreedRecord)
|
||||
{
|
||||
// 如果传入的是耳号,需要转换为羊只ID
|
||||
// 处理母羊耳号转换
|
||||
if (scBreedRecord.getEweManageTags() != null && !scBreedRecord.getEweManageTags().isEmpty()) {
|
||||
Long eweId = scBreedRecordService.getSheepIdByTags(scBreedRecord.getEweManageTags());
|
||||
if (eweId == null) {
|
||||
return error("未找到母羊耳号对应的羊只信息");
|
||||
return error("未找到母羊耳号 " + scBreedRecord.getEweManageTags() + " 对应的羊只信息");
|
||||
}
|
||||
scBreedRecord.setEweId(eweId.toString());
|
||||
scBreedRecord.setSheepId(eweId); // 设置羊只ID为母羊ID
|
||||
}
|
||||
|
||||
// 处理公羊耳号转换
|
||||
if (scBreedRecord.getRamManageTags() != null && !scBreedRecord.getRamManageTags().isEmpty()) {
|
||||
Long ramId = scBreedRecordService.getRamIdByTags(scBreedRecord.getRamManageTags());
|
||||
if (ramId == null) {
|
||||
return error("未找到公羊耳号对应的羊只信息");
|
||||
return error("未找到公羊耳号 " + scBreedRecord.getRamManageTags() + " 对应的羊只信息");
|
||||
}
|
||||
scBreedRecord.setRamId(ramId.toString());
|
||||
}
|
||||
|
||||
// 验证配种方式
|
||||
if (scBreedRecord.getBreedType() != null) {
|
||||
if (scBreedRecord.getBreedType() != 1 && scBreedRecord.getBreedType() != 2) {
|
||||
return error("配种方式只能是:1-同期发情 或 2-本交");
|
||||
}
|
||||
}
|
||||
|
||||
return toAjax(scBreedRecordService.updateScBreedRecord(scBreedRecord));
|
||||
}
|
||||
|
||||
@ -155,4 +206,37 @@ public class ScBreedRecordController extends BaseController
|
||||
{
|
||||
return toAjax(scBreedRecordService.deleteScBreedRecordByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步孕检结果到配种记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Breeding_records:Breeding_records:edit')")
|
||||
@Log(title = "同步孕检结果", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/syncPregnancyResult")
|
||||
public AjaxResult syncPregnancyResult(@RequestBody Map<String, Object> params)
|
||||
{
|
||||
Long pregnancyRecordId = Long.valueOf(params.get("pregnancyRecordId").toString());
|
||||
Long sheepId = Long.valueOf(params.get("sheepId").toString());
|
||||
String pregnancyCheckDate = params.get("pregnancyCheckDate").toString();
|
||||
|
||||
int result = scBreedRecordService.syncPregnancyResult(pregnancyRecordId, sheepId, pregnancyCheckDate);
|
||||
if (result > 0) {
|
||||
return success("孕检结果同步成功");
|
||||
} else {
|
||||
return error("孕检结果同步失败,可能未找到对应的配种记录");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据羊只ID和时间范围查询配种记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('Breeding_records:Breeding_records:query')")
|
||||
@GetMapping("/getByTimeRange/{sheepId}/{startDate}/{endDate}")
|
||||
public AjaxResult getBreedRecordsByTimeRange(@PathVariable("sheepId") Long sheepId,
|
||||
@PathVariable("startDate") String startDate,
|
||||
@PathVariable("endDate") String endDate)
|
||||
{
|
||||
List<ScBreedRecord> records = scBreedRecordService.getBreedRecordsByTimeRange(sheepId, startDate, endDate);
|
||||
return success(records);
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.zhyc.module.produce.breed.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -43,6 +44,25 @@ public class ScLambingRecordController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据母羊耳号查询最新配种记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('breed:lambing_records:query')")
|
||||
@GetMapping("/breeding_info/{earNumber}")
|
||||
public AjaxResult getBreedingInfo(@PathVariable("earNumber") String earNumber) {
|
||||
try {
|
||||
Map<String, Object> breedingInfo = scLambingRecordService.getLatestBreedingByEarNumber(earNumber);
|
||||
if (breedingInfo != null && !breedingInfo.isEmpty()) {
|
||||
return success(breedingInfo);
|
||||
} else {
|
||||
return error("未找到该母羊的配种记录,请检查耳号是否正确");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询配种信息异常", e);
|
||||
return error("查询配种信息失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产羔记录列表
|
||||
*/
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.produce.breed.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -3,8 +3,6 @@ package com.zhyc.module.produce.breed.domain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -1,15 +1,11 @@
|
||||
package com.zhyc.module.produce.breed.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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 java.util.Date;
|
||||
|
||||
/**
|
||||
* 配种记录对象 sc_breed_record
|
||||
@ -47,6 +43,10 @@ public class ScBreedRecord extends BaseEntity
|
||||
@Excel(name = "耗精量")
|
||||
private String breedDrugs;
|
||||
|
||||
/** 配种方式 1-同期发情 2-本交 */
|
||||
@Excel(name = "配种方式", readConverterExp = "1=同期发情,2=本交")
|
||||
private Integer breedType;
|
||||
|
||||
// ============ 显示字段 ============
|
||||
|
||||
/** 母羊耳号 */
|
||||
@ -93,7 +93,7 @@ public class ScBreedRecord extends BaseEntity
|
||||
@Excel(name = "所在牧场")
|
||||
private String ranchName;
|
||||
|
||||
/** 配种方式 */
|
||||
/** 配种方式显示 */
|
||||
@Excel(name = "配种方式")
|
||||
private String matingType;
|
||||
|
||||
@ -112,5 +112,43 @@ public class ScBreedRecord extends BaseEntity
|
||||
/** 牧场ID */
|
||||
private Long ranchId;
|
||||
|
||||
/** 配种计划ID */
|
||||
private Long planId;
|
||||
|
||||
// ============ 新增孕检相关字段 ============
|
||||
|
||||
/** 孕检日期 */
|
||||
@Excel(name = "孕检日期")
|
||||
private Date pregnancyCheckDate;
|
||||
|
||||
/** 孕检结果 */
|
||||
@Excel(name = "孕检结果")
|
||||
private String pregnancyResult;
|
||||
|
||||
/** 孕检方式 */
|
||||
@Excel(name = "孕检方式")
|
||||
private String pregnancyWay;
|
||||
|
||||
/** 胎数 */
|
||||
@Excel(name = "胎数")
|
||||
private Integer fetusCount;
|
||||
|
||||
/** 孕检技术员 */
|
||||
@Excel(name = "孕检技术员")
|
||||
private String pregnancyTechnician;
|
||||
|
||||
/** 孕检备注 */
|
||||
@Excel(name = "孕检备注")
|
||||
private String pregnancyRemark;
|
||||
|
||||
/** 孕检记录ID */
|
||||
private Long pregnancyRecordId;
|
||||
|
||||
/** 配种到孕检间隔天数 */
|
||||
@Excel(name = "配种到孕检间隔(天)")
|
||||
private Integer daysToPregnancyCheck;
|
||||
|
||||
/** 是否已孕检 */
|
||||
@Excel(name = "是否已孕检", readConverterExp = "0=否,1=是")
|
||||
private Integer isPregnancyChecked;
|
||||
}
|
@ -5,8 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
@ -8,8 +8,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
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;
|
||||
|
||||
|
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