Compare commits
No commits in common. "465246929949f0d751f54c817631931757579a8c" and "637e658587b5f16432756edb080a7e87f0dbea1e" have entirely different histories.
4652469299
...
637e658587
@ -28,7 +28,7 @@ public class SwPrescription extends BaseEntity
|
|||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 类型(免疫/保健/驱虫/消毒/疾病治疗) */
|
/** 类型(免疫/保健/驱虫/消毒/疾病治疗) */
|
||||||
@Excel(name = "类型", readConverterExp = "免疫/保健/驱虫/消毒/疾病治疗")
|
@Excel(name = "类型", readConverterExp = "免=疫/保健/驱虫/消毒/疾病治疗")
|
||||||
private Integer persType;
|
private Integer persType;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
package com.zhyc.module.biosafety.domain;
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.zhyc.common.annotation.Excel;
|
import com.zhyc.common.annotation.Excel;
|
||||||
@ -17,7 +13,6 @@ import com.zhyc.common.core.domain.BaseEntity;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-07-15
|
* @date 2025-07-15
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
public class Treatment extends BaseEntity
|
public class Treatment extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -85,11 +80,204 @@ public class Treatment extends BaseEntity
|
|||||||
@Excel(name = "药品使用记录id")
|
@Excel(name = "药品使用记录id")
|
||||||
private Long usageId;
|
private Long usageId;
|
||||||
|
|
||||||
// 药品使用
|
|
||||||
private List<SwMedicineUsageDetails> usageDetails;
|
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@Excel(name = "备注")
|
@Excel(name = "备注")
|
||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiagId(Long diagId)
|
||||||
|
{
|
||||||
|
this.diagId = diagId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDiagId()
|
||||||
|
{
|
||||||
|
return diagId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSheepId(Long sheepId)
|
||||||
|
{
|
||||||
|
this.sheepId = sheepId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSheepId()
|
||||||
|
{
|
||||||
|
return sheepId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVariety(String variety)
|
||||||
|
{
|
||||||
|
this.variety = variety;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVariety()
|
||||||
|
{
|
||||||
|
return variety;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSheepType(String sheepType)
|
||||||
|
{
|
||||||
|
this.sheepType = sheepType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSheepType()
|
||||||
|
{
|
||||||
|
return sheepType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthAge(Long monthAge)
|
||||||
|
{
|
||||||
|
this.monthAge = monthAge;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMonthAge()
|
||||||
|
{
|
||||||
|
return monthAge;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGender(String gender)
|
||||||
|
{
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGender()
|
||||||
|
{
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParity(Long parity)
|
||||||
|
{
|
||||||
|
this.parity = parity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getParity()
|
||||||
|
{
|
||||||
|
return parity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBreed(String breed)
|
||||||
|
{
|
||||||
|
this.breed = breed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBreed()
|
||||||
|
{
|
||||||
|
return breed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLactDay(Long lactDay)
|
||||||
|
{
|
||||||
|
this.lactDay = lactDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLactDay()
|
||||||
|
{
|
||||||
|
return lactDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGestDay(Long gestDay)
|
||||||
|
{
|
||||||
|
this.gestDay = gestDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGestDay()
|
||||||
|
{
|
||||||
|
return gestDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDatetime(Date datetime)
|
||||||
|
{
|
||||||
|
this.datetime = datetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDatetime()
|
||||||
|
{
|
||||||
|
return datetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiseaseId(Long diseaseId)
|
||||||
|
{
|
||||||
|
this.diseaseId = diseaseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDiseaseId()
|
||||||
|
{
|
||||||
|
return diseaseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiseasePid(String diseasePid)
|
||||||
|
{
|
||||||
|
this.diseasePid = diseasePid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiseasePid()
|
||||||
|
{
|
||||||
|
return diseasePid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVeterinary(String veterinary)
|
||||||
|
{
|
||||||
|
this.veterinary = veterinary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVeterinary()
|
||||||
|
{
|
||||||
|
return veterinary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsageId(Long usageId)
|
||||||
|
{
|
||||||
|
this.usageId = usageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUsageId()
|
||||||
|
{
|
||||||
|
return usageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("diagId", getDiagId())
|
||||||
|
.append("sheepId", getSheepId())
|
||||||
|
.append("variety", getVariety())
|
||||||
|
.append("sheepType", getSheepType())
|
||||||
|
.append("monthAge", getMonthAge())
|
||||||
|
.append("gender", getGender())
|
||||||
|
.append("parity", getParity())
|
||||||
|
.append("breed", getBreed())
|
||||||
|
.append("lactDay", getLactDay())
|
||||||
|
.append("gestDay", getGestDay())
|
||||||
|
.append("datetime", getDatetime())
|
||||||
|
.append("diseaseId", getDiseaseId())
|
||||||
|
.append("diseasePid", getDiseasePid())
|
||||||
|
.append("veterinary", getVeterinary())
|
||||||
|
.append("usageId", getUsageId())
|
||||||
|
.append("comment", getComment())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,11 @@ package com.zhyc.module.biosafety.service.impl;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.zhyc.common.utils.DateUtils;
|
import com.zhyc.common.utils.DateUtils;
|
||||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
|
||||||
import com.zhyc.module.biosafety.domain.SwPrescription;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.zhyc.module.biosafety.mapper.TreatmentMapper;
|
import com.zhyc.module.biosafety.mapper.TreatmentMapper;
|
||||||
import com.zhyc.module.biosafety.domain.Treatment;
|
import com.zhyc.module.biosafety.domain.Treatment;
|
||||||
import com.zhyc.module.biosafety.service.ITreatmentService;
|
import com.zhyc.module.biosafety.service.ITreatmentService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 治疗记录Service业务层处理
|
* 治疗记录Service业务层处理
|
||||||
@ -22,8 +19,6 @@ public class TreatmentServiceImpl implements ITreatmentService
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private TreatmentMapper treatmentMapper;
|
private TreatmentMapper treatmentMapper;
|
||||||
@Autowired
|
|
||||||
private SwMedicineUsageServiceImpl medicineUsageService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询治疗记录
|
* 查询治疗记录
|
||||||
@ -56,15 +51,8 @@ public class TreatmentServiceImpl implements ITreatmentService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
|
||||||
public int insertTreatment(Treatment treatment)
|
public int insertTreatment(Treatment treatment)
|
||||||
{
|
{
|
||||||
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
|
||||||
medicineUsage.setName("羊只治疗");
|
|
||||||
medicineUsage.setUseType("4");
|
|
||||||
// 药品使用记录
|
|
||||||
medicineUsage.setSwMedicineUsageDetailsList(treatment.getUsageDetails());
|
|
||||||
medicineUsageService.insertSwMedicineUsage(medicineUsage);
|
|
||||||
treatment.setCreateTime(DateUtils.getNowDate());
|
treatment.setCreateTime(DateUtils.getNowDate());
|
||||||
return treatmentMapper.insertTreatment(treatment);
|
return treatmentMapper.insertTreatment(treatment);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user