Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
e1dab09512
@ -6,6 +6,7 @@ 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.DaSheepfold;
|
||||
import com.zhyc.module.base.service.IDaSheepfoldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -39,6 +40,17 @@ public class DaSheepfoldController extends BaseController
|
||||
List<DaSheepfold> list = daSheepfoldService.selectDaSheepfoldList(daSheepfold);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/*
|
||||
* 根据羊舍ids查询羊只id
|
||||
* */
|
||||
|
||||
@GetMapping("/getSheepById")
|
||||
public AjaxResult getSheepfold(@RequestParam String id) {
|
||||
List<BasSheep> list = daSheepfoldService.sheepListById(id);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出羊舍管理列表
|
||||
|
@ -3,6 +3,7 @@ package com.zhyc.module.base.domain;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
import com.zhyc.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
@ -14,6 +15,7 @@ import java.util.Date;
|
||||
* @author wyt
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@Data
|
||||
public class SheepFile extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -263,673 +265,5 @@ public class SheepFile extends BaseEntity
|
||||
/** 是否删除 */
|
||||
private Long isDelete;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBsManageTags(String bsManageTags)
|
||||
{
|
||||
this.bsManageTags = bsManageTags;
|
||||
}
|
||||
|
||||
public String getBsManageTags()
|
||||
{
|
||||
return bsManageTags;
|
||||
}
|
||||
|
||||
public void setRanchId(Long ranchId)
|
||||
{
|
||||
this.ranchId = ranchId;
|
||||
}
|
||||
|
||||
public Long getRanchId()
|
||||
{
|
||||
return ranchId;
|
||||
}
|
||||
|
||||
public void setDrRanch(String drRanch)
|
||||
{
|
||||
this.drRanch = drRanch;
|
||||
}
|
||||
|
||||
public String getDrRanch()
|
||||
{
|
||||
return drRanch;
|
||||
}
|
||||
|
||||
public void setSheepfoldId(Long sheepfoldId)
|
||||
{
|
||||
this.sheepfoldId = sheepfoldId;
|
||||
}
|
||||
|
||||
public Long getSheepfoldId()
|
||||
{
|
||||
return sheepfoldId;
|
||||
}
|
||||
|
||||
public void setSheepfoldName(String sheepfoldName)
|
||||
{
|
||||
this.sheepfoldName = sheepfoldName;
|
||||
}
|
||||
|
||||
public String getSheepfoldName()
|
||||
{
|
||||
return sheepfoldName;
|
||||
}
|
||||
|
||||
public void setElectronicTags(String electronicTags)
|
||||
{
|
||||
this.electronicTags = electronicTags;
|
||||
}
|
||||
|
||||
public String getElectronicTags()
|
||||
{
|
||||
return electronicTags;
|
||||
}
|
||||
|
||||
public void setVarietyId(Long varietyId)
|
||||
{
|
||||
this.varietyId = varietyId;
|
||||
}
|
||||
|
||||
public Long getVarietyId()
|
||||
{
|
||||
return varietyId;
|
||||
}
|
||||
|
||||
public void setVariety(String variety)
|
||||
{
|
||||
this.variety = variety;
|
||||
}
|
||||
|
||||
public String getVariety()
|
||||
{
|
||||
return variety;
|
||||
}
|
||||
|
||||
public void setFamily(String family)
|
||||
{
|
||||
this.family = family;
|
||||
}
|
||||
|
||||
public String getFamily()
|
||||
{
|
||||
return family;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setGender(Long gender)
|
||||
{
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public Long getGender()
|
||||
{
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setBirthday(Date birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public Date getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setDayAge(Long dayAge)
|
||||
{
|
||||
this.dayAge = dayAge;
|
||||
}
|
||||
|
||||
public Long getDayAge()
|
||||
{
|
||||
return dayAge;
|
||||
}
|
||||
|
||||
public void setMonthAge(Long monthAge)
|
||||
{
|
||||
this.monthAge = monthAge;
|
||||
}
|
||||
|
||||
public Long getMonthAge()
|
||||
{
|
||||
return monthAge;
|
||||
}
|
||||
|
||||
public void setParity(Long parity)
|
||||
{
|
||||
this.parity = parity;
|
||||
}
|
||||
|
||||
public Long getParity()
|
||||
{
|
||||
return parity;
|
||||
}
|
||||
|
||||
public void setBirthWeight(Long birthWeight)
|
||||
{
|
||||
this.birthWeight = birthWeight;
|
||||
}
|
||||
|
||||
public Long getBirthWeight()
|
||||
{
|
||||
return birthWeight;
|
||||
}
|
||||
|
||||
public void setWeaningDate(Date weaningDate)
|
||||
{
|
||||
this.weaningDate = weaningDate;
|
||||
}
|
||||
|
||||
public Date getWeaningDate()
|
||||
{
|
||||
return weaningDate;
|
||||
}
|
||||
|
||||
public void setStatusId(Long statusId)
|
||||
{
|
||||
this.statusId = statusId;
|
||||
}
|
||||
|
||||
public Long getStatusId()
|
||||
{
|
||||
return statusId;
|
||||
}
|
||||
|
||||
public void setWeaningWeight(Long weaningWeight)
|
||||
{
|
||||
this.weaningWeight = weaningWeight;
|
||||
}
|
||||
|
||||
public Long getWeaningWeight()
|
||||
{
|
||||
return weaningWeight;
|
||||
}
|
||||
|
||||
public void setCurrentWeight(Long currentWeight)
|
||||
{
|
||||
this.currentWeight = currentWeight;
|
||||
}
|
||||
|
||||
public Long getCurrentWeight()
|
||||
{
|
||||
return currentWeight;
|
||||
}
|
||||
|
||||
public void setBreedStatusId(Long breedStatusId)
|
||||
{
|
||||
this.breedStatusId = breedStatusId;
|
||||
}
|
||||
|
||||
public Long getBreedStatusId()
|
||||
{
|
||||
return breedStatusId;
|
||||
}
|
||||
|
||||
public void setBreed(String breed)
|
||||
{
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
public String getBreed()
|
||||
{
|
||||
return breed;
|
||||
}
|
||||
|
||||
public void setBsFatherId(Long bsFatherId)
|
||||
{
|
||||
this.bsFatherId = bsFatherId;
|
||||
}
|
||||
|
||||
public Long getBsFatherId()
|
||||
{
|
||||
return bsFatherId;
|
||||
}
|
||||
|
||||
public void setFatherManageTags(String fatherManageTags)
|
||||
{
|
||||
this.fatherManageTags = fatherManageTags;
|
||||
}
|
||||
|
||||
public String getFatherManageTags()
|
||||
{
|
||||
return fatherManageTags;
|
||||
}
|
||||
|
||||
public void setBsMotherId(Long bsMotherId)
|
||||
{
|
||||
this.bsMotherId = bsMotherId;
|
||||
}
|
||||
|
||||
public Long getBsMotherId()
|
||||
{
|
||||
return bsMotherId;
|
||||
}
|
||||
|
||||
public void setMotherManageTags(String motherManageTags)
|
||||
{
|
||||
this.motherManageTags = motherManageTags;
|
||||
}
|
||||
|
||||
public String getMotherManageTags()
|
||||
{
|
||||
return motherManageTags;
|
||||
}
|
||||
|
||||
public void setReceptorId(Long receptorId)
|
||||
{
|
||||
this.receptorId = receptorId;
|
||||
}
|
||||
|
||||
public Long getReceptorId()
|
||||
{
|
||||
return receptorId;
|
||||
}
|
||||
|
||||
public void setReceptorManageTags(String receptorManageTags)
|
||||
{
|
||||
this.receptorManageTags = receptorManageTags;
|
||||
}
|
||||
|
||||
public String getReceptorManageTags()
|
||||
{
|
||||
return receptorManageTags;
|
||||
}
|
||||
|
||||
public void setFatherFatherId(Long fatherFatherId)
|
||||
{
|
||||
this.fatherFatherId = fatherFatherId;
|
||||
}
|
||||
|
||||
public Long getFatherFatherId()
|
||||
{
|
||||
return fatherFatherId;
|
||||
}
|
||||
|
||||
public void setGrandfatherManageTags(String grandfatherManageTags)
|
||||
{
|
||||
this.grandfatherManageTags = grandfatherManageTags;
|
||||
}
|
||||
|
||||
public String getGrandfatherManageTags()
|
||||
{
|
||||
return grandfatherManageTags;
|
||||
}
|
||||
|
||||
public void setFatherMotherId(Long fatherMotherId)
|
||||
{
|
||||
this.fatherMotherId = fatherMotherId;
|
||||
}
|
||||
|
||||
public Long getFatherMotherId()
|
||||
{
|
||||
return fatherMotherId;
|
||||
}
|
||||
|
||||
public void setGrandmotherManageTags(String grandmotherManageTags)
|
||||
{
|
||||
this.grandmotherManageTags = grandmotherManageTags;
|
||||
}
|
||||
|
||||
public String getGrandmotherManageTags()
|
||||
{
|
||||
return grandmotherManageTags;
|
||||
}
|
||||
|
||||
public void setFatherId(Long fatherId)
|
||||
{
|
||||
this.fatherId = fatherId;
|
||||
}
|
||||
|
||||
public Long getFatherId()
|
||||
{
|
||||
return fatherId;
|
||||
}
|
||||
|
||||
public void setMaternalGrandfatherManageTags(String maternalGrandfatherManageTags)
|
||||
{
|
||||
this.maternalGrandfatherManageTags = maternalGrandfatherManageTags;
|
||||
}
|
||||
|
||||
public String getMaternalGrandfatherManageTags()
|
||||
{
|
||||
return maternalGrandfatherManageTags;
|
||||
}
|
||||
|
||||
public void setMotherId(Long motherId)
|
||||
{
|
||||
this.motherId = motherId;
|
||||
}
|
||||
|
||||
public Long getMotherId()
|
||||
{
|
||||
return motherId;
|
||||
}
|
||||
|
||||
public void setMaternalGrandmotherManageTags(String maternalGrandmotherManageTags)
|
||||
{
|
||||
this.maternalGrandmotherManageTags = maternalGrandmotherManageTags;
|
||||
}
|
||||
|
||||
public String getMaternalGrandmotherManageTags()
|
||||
{
|
||||
return maternalGrandmotherManageTags;
|
||||
}
|
||||
|
||||
public void setMatingDate(Date matingDate)
|
||||
{
|
||||
this.matingDate = matingDate;
|
||||
}
|
||||
|
||||
public Date getMatingDate()
|
||||
{
|
||||
return matingDate;
|
||||
}
|
||||
|
||||
public void setMatingTypeId(Long matingTypeId)
|
||||
{
|
||||
this.matingTypeId = matingTypeId;
|
||||
}
|
||||
|
||||
public Long getMatingTypeId()
|
||||
{
|
||||
return matingTypeId;
|
||||
}
|
||||
|
||||
public void setPregDate(Date pregDate)
|
||||
{
|
||||
this.pregDate = pregDate;
|
||||
}
|
||||
|
||||
public Date getPregDate()
|
||||
{
|
||||
return pregDate;
|
||||
}
|
||||
|
||||
public void setLambingDate(Date lambingDate)
|
||||
{
|
||||
this.lambingDate = lambingDate;
|
||||
}
|
||||
|
||||
public Date getLambingDate()
|
||||
{
|
||||
return lambingDate;
|
||||
}
|
||||
|
||||
public void setLambingDay(Long lambingDay)
|
||||
{
|
||||
this.lambingDay = lambingDay;
|
||||
}
|
||||
|
||||
public Long getLambingDay()
|
||||
{
|
||||
return lambingDay;
|
||||
}
|
||||
|
||||
public void setMatingDay(Long matingDay)
|
||||
{
|
||||
this.matingDay = matingDay;
|
||||
}
|
||||
|
||||
public Long getMatingDay()
|
||||
{
|
||||
return matingDay;
|
||||
}
|
||||
|
||||
public void setGestationDay(Long gestationDay)
|
||||
{
|
||||
this.gestationDay = gestationDay;
|
||||
}
|
||||
|
||||
public Long getGestationDay()
|
||||
{
|
||||
return gestationDay;
|
||||
}
|
||||
|
||||
public void setExpectedDate(Date expectedDate)
|
||||
{
|
||||
this.expectedDate = expectedDate;
|
||||
}
|
||||
|
||||
public Date getExpectedDate()
|
||||
{
|
||||
return expectedDate;
|
||||
}
|
||||
|
||||
public void setPostLambingDay(Long postLambingDay)
|
||||
{
|
||||
this.postLambingDay = postLambingDay;
|
||||
}
|
||||
|
||||
public Long getPostLambingDay()
|
||||
{
|
||||
return postLambingDay;
|
||||
}
|
||||
|
||||
public void setLactationDay(Long lactationDay)
|
||||
{
|
||||
this.lactationDay = lactationDay;
|
||||
}
|
||||
|
||||
public Long getLactationDay()
|
||||
{
|
||||
return lactationDay;
|
||||
}
|
||||
|
||||
public void setAnestrousDay(Long anestrousDay)
|
||||
{
|
||||
this.anestrousDay = anestrousDay;
|
||||
}
|
||||
|
||||
public Long getAnestrousDay()
|
||||
{
|
||||
return anestrousDay;
|
||||
}
|
||||
|
||||
public void setMatingCounts(Long matingCounts)
|
||||
{
|
||||
this.matingCounts = matingCounts;
|
||||
}
|
||||
|
||||
public Long getMatingCounts()
|
||||
{
|
||||
return matingCounts;
|
||||
}
|
||||
|
||||
public void setMatingTotal(Long matingTotal)
|
||||
{
|
||||
this.matingTotal = matingTotal;
|
||||
}
|
||||
|
||||
public Long getMatingTotal()
|
||||
{
|
||||
return matingTotal;
|
||||
}
|
||||
|
||||
public void setMiscarriageCounts(Long miscarriageCounts)
|
||||
{
|
||||
this.miscarriageCounts = miscarriageCounts;
|
||||
}
|
||||
|
||||
public Long getMiscarriageCounts()
|
||||
{
|
||||
return miscarriageCounts;
|
||||
}
|
||||
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setControlled(Long controlled)
|
||||
{
|
||||
this.controlled = controlled;
|
||||
}
|
||||
|
||||
public Long getControlled()
|
||||
{
|
||||
return controlled;
|
||||
}
|
||||
|
||||
public void setBody(Long body)
|
||||
{
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public Long getBody()
|
||||
{
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBreast(Long breast)
|
||||
{
|
||||
this.breast = breast;
|
||||
}
|
||||
|
||||
public Long getBreast()
|
||||
{
|
||||
return breast;
|
||||
}
|
||||
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSourceDate(Date sourceDate)
|
||||
{
|
||||
this.sourceDate = sourceDate;
|
||||
}
|
||||
|
||||
public Date getSourceDate()
|
||||
{
|
||||
return sourceDate;
|
||||
}
|
||||
|
||||
public void setSourceRanchId(Long sourceRanchId)
|
||||
{
|
||||
this.sourceRanchId = sourceRanchId;
|
||||
}
|
||||
|
||||
public Long getSourceRanchId()
|
||||
{
|
||||
return sourceRanchId;
|
||||
}
|
||||
|
||||
public void setSourceRanch(String sourceRanch)
|
||||
{
|
||||
this.sourceRanch = sourceRanch;
|
||||
}
|
||||
|
||||
public String getSourceRanch()
|
||||
{
|
||||
return sourceRanch;
|
||||
}
|
||||
|
||||
public void setIsDelete(Long isDelete)
|
||||
{
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public Long getIsDelete()
|
||||
{
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("bsManageTags", getBsManageTags())
|
||||
.append("ranchId", getRanchId())
|
||||
.append("drRanch", getDrRanch())
|
||||
.append("sheepfoldId", getSheepfoldId())
|
||||
.append("sheepfoldName", getSheepfoldName())
|
||||
.append("electronicTags", getElectronicTags())
|
||||
.append("varietyId", getVarietyId())
|
||||
.append("variety", getVariety())
|
||||
.append("family", getFamily())
|
||||
.append("name", getName())
|
||||
.append("gender", getGender())
|
||||
.append("birthday", getBirthday())
|
||||
.append("dayAge", getDayAge())
|
||||
.append("monthAge", getMonthAge())
|
||||
.append("parity", getParity())
|
||||
.append("birthWeight", getBirthWeight())
|
||||
.append("weaningDate", getWeaningDate())
|
||||
.append("statusId", getStatusId())
|
||||
.append("weaningWeight", getWeaningWeight())
|
||||
.append("currentWeight", getCurrentWeight())
|
||||
.append("breedStatusId", getBreedStatusId())
|
||||
.append("breed", getBreed())
|
||||
.append("bsFatherId", getBsFatherId())
|
||||
.append("fatherManageTags", getFatherManageTags())
|
||||
.append("bsMotherId", getBsMotherId())
|
||||
.append("motherManageTags", getMotherManageTags())
|
||||
.append("receptorId", getReceptorId())
|
||||
.append("receptorManageTags", getReceptorManageTags())
|
||||
.append("fatherFatherId", getFatherFatherId())
|
||||
.append("grandfatherManageTags", getGrandfatherManageTags())
|
||||
.append("fatherMotherId", getFatherMotherId())
|
||||
.append("grandmotherManageTags", getGrandmotherManageTags())
|
||||
.append("fatherId", getFatherId())
|
||||
.append("maternalGrandfatherManageTags", getMaternalGrandfatherManageTags())
|
||||
.append("motherId", getMotherId())
|
||||
.append("maternalGrandmotherManageTags", getMaternalGrandmotherManageTags())
|
||||
.append("matingDate", getMatingDate())
|
||||
.append("matingTypeId", getMatingTypeId())
|
||||
.append("pregDate", getPregDate())
|
||||
.append("lambingDate", getLambingDate())
|
||||
.append("lambingDay", getLambingDay())
|
||||
.append("matingDay", getMatingDay())
|
||||
.append("gestationDay", getGestationDay())
|
||||
.append("expectedDate", getExpectedDate())
|
||||
.append("postLambingDay", getPostLambingDay())
|
||||
.append("lactationDay", getLactationDay())
|
||||
.append("anestrousDay", getAnestrousDay())
|
||||
.append("matingCounts", getMatingCounts())
|
||||
.append("matingTotal", getMatingTotal())
|
||||
.append("miscarriageCounts", getMiscarriageCounts())
|
||||
.append("comment", getComment())
|
||||
.append("controlled", getControlled())
|
||||
.append("body", getBody())
|
||||
.append("breast", getBreast())
|
||||
.append("source", getSource())
|
||||
.append("sourceDate", getSourceDate())
|
||||
.append("sourceRanchId", getSourceRanchId())
|
||||
.append("sourceRanch", getSourceRanch())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("isDelete", getIsDelete())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,5 @@ public interface BasSheepMapper
|
||||
BasSheep selectBasSheepByManageTags(String manageTags);
|
||||
|
||||
|
||||
List<BasSheep> selectBasSheepBySheepfold(String id);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.zhyc.module.base.service;
|
||||
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.domain.DaSheepfold;
|
||||
|
||||
import java.util.List;
|
||||
@ -69,4 +70,7 @@ public interface IDaSheepfoldService
|
||||
* @return 是否已存在
|
||||
*/
|
||||
boolean checkSheepfoldNoExist(Long ranchId, Long sheepfoldTypeId, String sheepfoldNo);
|
||||
|
||||
// 根据羊舍id获取该羊舍的羊
|
||||
List<BasSheep> sheepListById(String id);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.zhyc.module.base.service.impl;
|
||||
|
||||
import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.domain.DaSheepfold;
|
||||
import com.zhyc.module.base.mapper.BasSheepMapper;
|
||||
import com.zhyc.module.base.mapper.DaSheepfoldMapper;
|
||||
import com.zhyc.module.base.service.IDaSheepfoldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -19,6 +21,8 @@ public class DaSheepfoldServiceImpl implements IDaSheepfoldService
|
||||
{
|
||||
@Autowired
|
||||
private DaSheepfoldMapper daSheepfoldMapper;
|
||||
@Autowired
|
||||
private BasSheepMapper basSheepMapper;
|
||||
|
||||
/**
|
||||
* 查询羊舍管理
|
||||
@ -101,4 +105,10 @@ public class DaSheepfoldServiceImpl implements IDaSheepfoldService
|
||||
query.setSheepfoldNo(sheepfoldNo);
|
||||
return daSheepfoldMapper.selectCount(query) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasSheep> sheepListById(String id) {
|
||||
List<BasSheep> basSheep = basSheepMapper.selectBasSheepBySheepfold(id);
|
||||
return basSheep;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ public class QuarantineReport extends BaseEntity
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
|
||||
// 羊只耳号
|
||||
private String[] ids;
|
||||
|
||||
/** 羊只 */
|
||||
private Long sheepId;
|
||||
|
||||
@ -34,9 +38,9 @@ public class QuarantineReport extends BaseEntity
|
||||
@Excel(name = "羊只性别")
|
||||
private String gender;
|
||||
@Excel(name = "月龄")
|
||||
private Integer monthAge;
|
||||
private Long monthAge;
|
||||
@Excel(name = "胎次")
|
||||
private Integer parity;
|
||||
private Long parity;
|
||||
@Excel(name = "繁育状态")
|
||||
private String breed;
|
||||
|
||||
@ -73,11 +77,15 @@ public class QuarantineReport extends BaseEntity
|
||||
|
||||
/** 检疫结果 */
|
||||
@Excel(name = "检疫结果")
|
||||
private Long result;
|
||||
private String result;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private Long status;
|
||||
private Integer status;
|
||||
|
||||
/** 备注*/
|
||||
@Excel(name = "备注")
|
||||
private String comment;
|
||||
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public interface QuarantineReportMapper
|
||||
* @param quarantineReport 检疫记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQuarantineReport(QuarantineReport quarantineReport);
|
||||
public int insertQuarantineReport(List<QuarantineReport> quarantineReport);
|
||||
|
||||
/**
|
||||
* 修改检疫记录
|
||||
|
@ -1,7 +1,12 @@
|
||||
package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.QuarantineReportMapper;
|
||||
@ -19,6 +24,8 @@ public class QuarantineReportServiceImpl implements IQuarantineReportService
|
||||
{
|
||||
@Autowired
|
||||
private QuarantineReportMapper quarantineReportMapper;
|
||||
@Autowired
|
||||
private SheepFileServiceImpl sheepFileService;
|
||||
|
||||
/**
|
||||
* 查询检疫记录
|
||||
@ -54,7 +61,28 @@ public class QuarantineReportServiceImpl implements IQuarantineReportService
|
||||
public int insertQuarantineReport(QuarantineReport quarantineReport)
|
||||
{
|
||||
quarantineReport.setCreateTime(DateUtils.getNowDate());
|
||||
return quarantineReportMapper.insertQuarantineReport(quarantineReport);
|
||||
if (quarantineReport.getResult()==null){
|
||||
quarantineReport.setStatus(0);
|
||||
}else {
|
||||
quarantineReport.setStatus(1);
|
||||
}
|
||||
List<QuarantineReport> list = new ArrayList<QuarantineReport>();
|
||||
for (String sheepId : quarantineReport.getIds()) {
|
||||
SheepFile sheepFile = sheepFileService.selectSheepFileById(Long.parseLong(sheepId));
|
||||
QuarantineReport quarantine= new QuarantineReport();
|
||||
BeanUtils.copyProperties(quarantineReport, quarantine);
|
||||
quarantine.setSheepId(sheepFile.getId());
|
||||
quarantine.setSheepNo(sheepFile.getElectronicTags());
|
||||
quarantine.setSheepType(sheepFile.getName());
|
||||
|
||||
// 性别前端处理
|
||||
quarantine.setGender(String.valueOf(sheepFile.getGender()));
|
||||
quarantine.setMonthAge(sheepFile.getMonthAge());
|
||||
quarantine.setParity(sheepFile.getParity());
|
||||
quarantine.setBreed(sheepFile.getBreed());
|
||||
list.add(quarantine);
|
||||
}
|
||||
return quarantineReportMapper.insertQuarantineReport(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,12 +104,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE s.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepByManageTags" parameterType="string" resultType="com.zhyc.module.base.domain.BasSheep">
|
||||
SELECT id, sheepfold_id AS sheepfoldId, variety_id AS varietyId
|
||||
FROM bas_sheep
|
||||
WHERE LOWER(TRIM(manage_tags)) = LOWER(TRIM(#{manageTags}))
|
||||
AND is_delete = 0
|
||||
LIMIT 1
|
||||
<select id="selectBasSheepByManageTags" parameterType="BasSheep" resultMap="BasSheepResult">
|
||||
<include refid="selectBasSheepVo"/>
|
||||
<where>
|
||||
manage_tags = #{manageTags}
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepBySheepfold" parameterType="BasSheep" resultMap="BasSheepResult">
|
||||
<include refid="selectBasSheepVo"/>
|
||||
<where>
|
||||
sheepfold_id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSheep" parameterType="BasSheep" useGeneratedKeys="true" keyProperty="id">
|
||||
|
@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="quarOfficer" column="quar_officer" />
|
||||
<result property="result" column="result" />
|
||||
<result property="status" column="status" />
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
@ -56,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectQuarantineReportById" parameterType="Long" resultMap="QuarantineReportResult">
|
||||
select sqr.id, sheep_type,sheep_id, datetime, quar_item, sample_type, sampler, quar_officer, result, status,
|
||||
sqr.update_by, sqr.update_time, sqr.create_by, sqr.create_time,
|
||||
sqr.comment
|
||||
,sqr.update_by, sqr.update_time, sqr.create_by, sqr.create_time,
|
||||
sqi.name as item_name,
|
||||
sqs.name as sample,
|
||||
sf.bs_manage_tags sheep_no
|
||||
@ -67,36 +69,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where sqr.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQuarantineReport" parameterType="QuarantineReport" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_quarantine_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="quarItem != null">quar_item,</if>
|
||||
<if test="sampleType != null">sample_type,</if>
|
||||
<if test="sampler != null">sampler,</if>
|
||||
<if test="quarOfficer != null">quar_officer,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="quarItem != null">#{quarItem},</if>
|
||||
<if test="sampleType != null">#{sampleType},</if>
|
||||
<if test="sampler != null">#{sampler},</if>
|
||||
<if test="quarOfficer != null">#{quarOfficer},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
<insert id="insertQuarantineReport" parameterType="java.util.List">
|
||||
INSERT INTO sw_quarantine_report
|
||||
(
|
||||
sheep_id,
|
||||
sheep_type,
|
||||
month_age,
|
||||
parity,
|
||||
breed,
|
||||
gender,
|
||||
datetime,
|
||||
quar_item,
|
||||
sample_type,
|
||||
sampler,
|
||||
quar_officer,
|
||||
result,
|
||||
status,
|
||||
update_by,
|
||||
update_time,
|
||||
create_by,
|
||||
create_time
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.sheepId},
|
||||
#{item.sheepType},
|
||||
#{item.monthAge},
|
||||
#{item.parity},
|
||||
#{item.breed},
|
||||
#{item.gender},
|
||||
#{item.datetime},
|
||||
#{item.quarItem},
|
||||
#{item.sampleType},
|
||||
#{item.sampler},
|
||||
#{item.quarOfficer},
|
||||
#{item.result},
|
||||
#{item.status},
|
||||
#{item.updateBy},
|
||||
#{item.updateTime},
|
||||
#{item.createBy},
|
||||
#{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateQuarantineReport" parameterType="QuarantineReport">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.dairyProducts.mapper.NpFreshMilkInspMapper">
|
||||
|
||||
<resultMap type="NpFreshMilkInsp" id="NpFreshMilkInspResult">
|
||||
@ -26,37 +26,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNpFreshMilkInspVo">
|
||||
select id, source, datetime, fat, protein, non_fat, acidity, bacterial_colony_1, bacterial_colony_2, bacterial_colony_3, bacterial_colony_4, bacterial_colony_5, coli, lactoferrin, ig, commnet, create_by, create_time from np_fresh_milk_insp
|
||||
SELECT
|
||||
id, source, datetime, fat, protein, non_fat, acidity,
|
||||
bacterial_colony_1, bacterial_colony_2, bacterial_colony_3,
|
||||
bacterial_colony_4, bacterial_colony_5, coli, lactoferrin,
|
||||
ig, commnet, create_by, create_time
|
||||
FROM np_fresh_milk_insp
|
||||
</sql>
|
||||
|
||||
<!-- 查询列表(已修改为只按来源和日期查询) -->
|
||||
<select id="selectNpFreshMilkInspList" parameterType="NpFreshMilkInsp" resultMap="NpFreshMilkInspResult">
|
||||
<include refid="selectNpFreshMilkInspVo"/>
|
||||
<where>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="fat != null "> and fat = #{fat}</if>
|
||||
<if test="protein != null "> and protein = #{protein}</if>
|
||||
<if test="nonFat != null "> and non_fat = #{nonFat}</if>
|
||||
<if test="acidity != null "> and acidity = #{acidity}</if>
|
||||
<if test="bacterialColony1 != null "> and bacterial_colony_1 = #{bacterialColony1}</if>
|
||||
<if test="bacterialColony2 != null "> and bacterial_colony_2 = #{bacterialColony2}</if>
|
||||
<if test="bacterialColony3 != null "> and bacterial_colony_3 = #{bacterialColony3}</if>
|
||||
<if test="bacterialColony4 != null "> and bacterial_colony_4 = #{bacterialColony4}</if>
|
||||
<if test="bacterialColony5 != null "> and bacterial_colony_5 = #{bacterialColony5}</if>
|
||||
<if test="coli != null "> and coli = #{coli}</if>
|
||||
<if test="lactoferrin != null "> and lactoferrin = #{lactoferrin}</if>
|
||||
<if test="ig != null "> and ig = #{ig}</if>
|
||||
<if test="commnet != null and commnet != ''"> and commnet = #{commnet}</if>
|
||||
<if test="source != null and source != ''">
|
||||
AND source LIKE CONCAT('%', #{source}, '%')
|
||||
</if>
|
||||
<if test="datetime != null">
|
||||
AND datetime = #{datetime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据ID查询 -->
|
||||
<select id="selectNpFreshMilkInspById" parameterType="Long" resultMap="NpFreshMilkInspResult">
|
||||
<include refid="selectNpFreshMilkInspVo"/>
|
||||
where id = #{id}
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 新增 -->
|
||||
<insert id="insertNpFreshMilkInsp" parameterType="NpFreshMilkInsp" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into np_fresh_milk_insp
|
||||
INSERT INTO np_fresh_milk_insp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="source != null">source,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
@ -97,8 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="updateNpFreshMilkInsp" parameterType="NpFreshMilkInsp">
|
||||
update np_fresh_milk_insp
|
||||
UPDATE np_fresh_milk_insp
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
@ -115,18 +115,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
|
||||
<if test="ig != null">ig = #{ig},</if>
|
||||
<if test="commnet != null">commnet = #{commnet},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 单个删除 -->
|
||||
<delete id="deleteNpFreshMilkInspById" parameterType="Long">
|
||||
delete from np_fresh_milk_insp where id = #{id}
|
||||
DELETE FROM np_fresh_milk_insp WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteNpFreshMilkInspByIds" parameterType="String">
|
||||
delete from np_fresh_milk_insp where id in
|
||||
DELETE FROM np_fresh_milk_insp WHERE id IN
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -26,7 +26,11 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNpYogurtInspVo">
|
||||
select id, source, datetime, fat, protein, non_fat, acidity, bacterial_colony_1, bacterial_clony_2, bacterial_clony_3, bacterial_clony_4, bacterial_clony_5, yeast, mould, lacto, comment, create_by, create_time from np_yogurt_insp
|
||||
select id, source, datetime, fat, protein, non_fat,
|
||||
acidity, bacterial_colony_1, bacterial_clony_2,
|
||||
bacterial_clony_3, bacterial_clony_4, bacterial_clony_5,
|
||||
yeast, mould, lacto, comment, create_by, create_time
|
||||
from np_yogurt_insp
|
||||
</sql>
|
||||
|
||||
<select id="selectNpYogurtInspList" parameterType="NpYogurtInsp" resultMap="NpYogurtInspResult">
|
||||
|
Loading…
x
Reference in New Issue
Block a user