Compare commits
2 Commits
637e658587
...
4652469299
Author | SHA1 | Date | |
---|---|---|---|
4652469299 | |||
8391d68a6d |
@ -97,7 +97,7 @@ public class TreatmentController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('treatment:treatment:remove')")
|
||||
@Log(title = "治疗记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(treatmentService.deleteTreatmentByIds(ids));
|
||||
|
@ -28,7 +28,7 @@ public class SwPrescription extends BaseEntity
|
||||
private String name;
|
||||
|
||||
/** 类型(免疫/保健/驱虫/消毒/疾病治疗) */
|
||||
@Excel(name = "类型", readConverterExp = "免=疫/保健/驱虫/消毒/疾病治疗")
|
||||
@Excel(name = "类型", readConverterExp = "免疫/保健/驱虫/消毒/疾病治疗")
|
||||
private Integer persType;
|
||||
|
||||
/** 备注 */
|
||||
|
@ -1,7 +1,11 @@
|
||||
package com.zhyc.module.biosafety.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.zhyc.common.annotation.Excel;
|
||||
@ -13,6 +17,7 @@ import com.zhyc.common.core.domain.BaseEntity;
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Data
|
||||
public class Treatment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -80,204 +85,11 @@ public class Treatment extends BaseEntity
|
||||
@Excel(name = "药品使用记录id")
|
||||
private Long usageId;
|
||||
|
||||
// 药品使用
|
||||
private List<SwMedicineUsageDetails> usageDetails;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
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,11 +2,14 @@ package com.zhyc.module.biosafety.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
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.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.TreatmentMapper;
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import com.zhyc.module.biosafety.service.ITreatmentService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 治疗记录Service业务层处理
|
||||
@ -19,6 +22,8 @@ public class TreatmentServiceImpl implements ITreatmentService
|
||||
{
|
||||
@Autowired
|
||||
private TreatmentMapper treatmentMapper;
|
||||
@Autowired
|
||||
private SwMedicineUsageServiceImpl medicineUsageService;
|
||||
|
||||
/**
|
||||
* 查询治疗记录
|
||||
@ -51,8 +56,15 @@ public class TreatmentServiceImpl implements ITreatmentService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
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());
|
||||
return treatmentMapper.insertTreatment(treatment);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user