驱虫
This commit is contained in:
parent
a934780e6f
commit
896d12b9b1
@ -78,6 +78,7 @@ public class DewormController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody Deworm deworm)
|
public AjaxResult add(@RequestBody Deworm deworm)
|
||||||
{
|
{
|
||||||
|
System.out.println(deworm);
|
||||||
return toAjax(dewormService.insertDeworm(deworm));
|
return toAjax(dewormService.insertDeworm(deworm));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ public class DewormController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:remove')")
|
@PreAuthorize("@ss.hasPermi('biosafety:deworm:remove')")
|
||||||
@Log(title = "驱虫", businessType = BusinessType.DELETE)
|
@Log(title = "驱虫", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
return toAjax(dewormService.deleteDewormByIds(ids));
|
return toAjax(dewormService.deleteDewormByIds(ids));
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package com.zhyc.module.biosafety.domain;
|
package com.zhyc.module.biosafety.domain;
|
||||||
|
|
||||||
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;
|
||||||
@ -13,6 +16,7 @@ import com.zhyc.common.core.domain.BaseEntity;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-07-15
|
* @date 2025-07-15
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class Deworm extends BaseEntity
|
public class Deworm extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -20,34 +24,37 @@ public class Deworm extends BaseEntity
|
|||||||
/** $column.columnComment */
|
/** $column.columnComment */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 羊只id */
|
|
||||||
@Excel(name = "羊只id")
|
|
||||||
private Long sheepId;
|
private Long sheepId;
|
||||||
|
|
||||||
/** 药品使用记录 */
|
private Integer[] sheepIds;
|
||||||
@Excel(name = "药品使用记录")
|
|
||||||
private Long usageId;
|
|
||||||
|
|
||||||
/** 品种 */
|
/** 羊只id */
|
||||||
|
@Excel(name = "羊只耳号")
|
||||||
|
private String sheepNo;
|
||||||
@Excel(name = "品种")
|
@Excel(name = "品种")
|
||||||
private String variety;
|
private String variety;
|
||||||
|
|
||||||
/** 羊只类别 */
|
|
||||||
@Excel(name = "羊只类别")
|
@Excel(name = "羊只类别")
|
||||||
private String sheepType;
|
private String sheepType;
|
||||||
|
@Excel(name = "羊只性别")
|
||||||
/** 性别 */
|
|
||||||
@Excel(name = "性别")
|
|
||||||
private String gender;
|
private String gender;
|
||||||
|
|
||||||
/** 月龄 */
|
|
||||||
@Excel(name = "月龄")
|
@Excel(name = "月龄")
|
||||||
private Long monthAge;
|
private Long monthAge;
|
||||||
|
@Excel(name = "繁殖状态")
|
||||||
|
private String breed;
|
||||||
/** 胎次 */
|
/** 胎次 */
|
||||||
@Excel(name = "胎次")
|
@Excel(name = "胎次")
|
||||||
private Long parity;
|
private Long parity;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 药品使用记录 */
|
||||||
|
@Excel(name = "药品使用记录")
|
||||||
|
private Integer usageId;
|
||||||
|
|
||||||
|
|
||||||
|
// 药品使用
|
||||||
|
private List<SwMedicineUsageDetails> usageDetails;
|
||||||
|
|
||||||
/** 驱虫日期 */
|
/** 驱虫日期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "驱虫日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "驱虫日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ -61,134 +68,4 @@ public class Deworm extends BaseEntity
|
|||||||
@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 setSheepId(Long sheepId)
|
|
||||||
{
|
|
||||||
this.sheepId = sheepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSheepId()
|
|
||||||
{
|
|
||||||
return sheepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsageId(Long usageId)
|
|
||||||
{
|
|
||||||
this.usageId = usageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUsageId()
|
|
||||||
{
|
|
||||||
return usageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 setGender(String gender)
|
|
||||||
{
|
|
||||||
this.gender = gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGender()
|
|
||||||
{
|
|
||||||
return gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 setDatetime(Date datetime)
|
|
||||||
{
|
|
||||||
this.datetime = datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDatetime()
|
|
||||||
{
|
|
||||||
return datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTechnical(String technical)
|
|
||||||
{
|
|
||||||
this.technical = technical;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTechnical()
|
|
||||||
{
|
|
||||||
return technical;
|
|
||||||
}
|
|
||||||
|
|
||||||
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("sheepId", getSheepId())
|
|
||||||
.append("usageId", getUsageId())
|
|
||||||
.append("variety", getVariety())
|
|
||||||
.append("sheepType", getSheepType())
|
|
||||||
.append("gender", getGender())
|
|
||||||
.append("monthAge", getMonthAge())
|
|
||||||
.append("parity", getParity())
|
|
||||||
.append("datetime", getDatetime())
|
|
||||||
.append("technical", getTechnical())
|
|
||||||
.append("comment", getComment())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.domain;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
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;
|
||||||
@ -13,6 +14,7 @@ import com.zhyc.common.core.domain.BaseEntity;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-07-15
|
* @date 2025-07-15
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class Health extends BaseEntity
|
public class Health extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -54,8 +56,8 @@ public class Health extends BaseEntity
|
|||||||
private Long parity;
|
private Long parity;
|
||||||
|
|
||||||
/** 羊舍id */
|
/** 羊舍id */
|
||||||
@Excel(name = "羊舍id")
|
@Excel(name = "繁殖状态")
|
||||||
private Long sheepfoldId;
|
private String breed;
|
||||||
|
|
||||||
/** 技术员 */
|
/** 技术员 */
|
||||||
@Excel(name = "技术员")
|
@Excel(name = "技术员")
|
||||||
@ -65,145 +67,4 @@ public class Health extends BaseEntity
|
|||||||
@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 setDatetime(Date datetime)
|
|
||||||
{
|
|
||||||
this.datetime = datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDatetime()
|
|
||||||
{
|
|
||||||
return datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSheepId(Long sheepId)
|
|
||||||
{
|
|
||||||
this.sheepId = sheepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSheepId()
|
|
||||||
{
|
|
||||||
return sheepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsageId(Long usageId)
|
|
||||||
{
|
|
||||||
this.usageId = usageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUsageId()
|
|
||||||
{
|
|
||||||
return usageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 setGender(String gender)
|
|
||||||
{
|
|
||||||
this.gender = gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGender()
|
|
||||||
{
|
|
||||||
return gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMonthAge(String monthAge)
|
|
||||||
{
|
|
||||||
this.monthAge = monthAge;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMonthAge()
|
|
||||||
{
|
|
||||||
return monthAge;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParity(Long parity)
|
|
||||||
{
|
|
||||||
this.parity = parity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getParity()
|
|
||||||
{
|
|
||||||
return parity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSheepfoldId(Long sheepfoldId)
|
|
||||||
{
|
|
||||||
this.sheepfoldId = sheepfoldId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSheepfoldId()
|
|
||||||
{
|
|
||||||
return sheepfoldId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTechnical(String technical)
|
|
||||||
{
|
|
||||||
this.technical = technical;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTechnical()
|
|
||||||
{
|
|
||||||
return technical;
|
|
||||||
}
|
|
||||||
|
|
||||||
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("datetime", getDatetime())
|
|
||||||
.append("sheepId", getSheepId())
|
|
||||||
.append("usageId", getUsageId())
|
|
||||||
.append("variety", getVariety())
|
|
||||||
.append("sheepType", getSheepType())
|
|
||||||
.append("gender", getGender())
|
|
||||||
.append("monthAge", getMonthAge())
|
|
||||||
.append("parity", getParity())
|
|
||||||
.append("sheepfoldId", getSheepfoldId())
|
|
||||||
.append("technical", getTechnical())
|
|
||||||
.append("comment", getComment())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.zhyc.module.biosafety.domain;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
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;
|
||||||
@ -13,6 +14,7 @@ import com.zhyc.common.core.domain.BaseEntity;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-07-15
|
* @date 2025-07-15
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
public class Immunity extends BaseEntity
|
public class Immunity extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -49,8 +51,8 @@ public class Immunity extends BaseEntity
|
|||||||
private Long parity;
|
private Long parity;
|
||||||
|
|
||||||
/** 羊舍id */
|
/** 羊舍id */
|
||||||
@Excel(name = "羊舍id")
|
@Excel(name = "繁殖状态")
|
||||||
private Long sheepfoldId;
|
private String breed;
|
||||||
|
|
||||||
/** 免疫日期 */
|
/** 免疫日期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@ -65,145 +67,4 @@ public class Immunity extends BaseEntity
|
|||||||
@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 setSheepId(Long sheepId)
|
|
||||||
{
|
|
||||||
this.sheepId = sheepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSheepId()
|
|
||||||
{
|
|
||||||
return sheepId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsageId(Long usageId)
|
|
||||||
{
|
|
||||||
this.usageId = usageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUsageId()
|
|
||||||
{
|
|
||||||
return usageId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVariety(String variety)
|
|
||||||
{
|
|
||||||
this.variety = variety;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getVariety()
|
|
||||||
{
|
|
||||||
return variety;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSheepType(Long sheepType)
|
|
||||||
{
|
|
||||||
this.sheepType = sheepType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSheepType()
|
|
||||||
{
|
|
||||||
return sheepType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGender(String gender)
|
|
||||||
{
|
|
||||||
this.gender = gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGender()
|
|
||||||
{
|
|
||||||
return gender;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 setSheepfoldId(Long sheepfoldId)
|
|
||||||
{
|
|
||||||
this.sheepfoldId = sheepfoldId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getSheepfoldId()
|
|
||||||
{
|
|
||||||
return sheepfoldId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDatetime(Date datetime)
|
|
||||||
{
|
|
||||||
this.datetime = datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getDatetime()
|
|
||||||
{
|
|
||||||
return datetime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTechnical(String technical)
|
|
||||||
{
|
|
||||||
this.technical = technical;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTechnical()
|
|
||||||
{
|
|
||||||
return technical;
|
|
||||||
}
|
|
||||||
|
|
||||||
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("sheepId", getSheepId())
|
|
||||||
.append("usageId", getUsageId())
|
|
||||||
.append("variety", getVariety())
|
|
||||||
.append("sheepType", getSheepType())
|
|
||||||
.append("gender", getGender())
|
|
||||||
.append("monthAge", getMonthAge())
|
|
||||||
.append("parity", getParity())
|
|
||||||
.append("sheepfoldId", getSheepfoldId())
|
|
||||||
.append("datetime", getDatetime())
|
|
||||||
.append("technical", getTechnical())
|
|
||||||
.append("comment", getComment())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ public class SwUnit extends BaseEntity
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 编号 */
|
/** 编号 */
|
||||||
private String id;
|
private Integer id;
|
||||||
|
|
||||||
/** 单位 */
|
/** 单位 */
|
||||||
@Excel(name = "单位")
|
@Excel(name = "单位")
|
||||||
|
@ -18,7 +18,7 @@ public class SwUsage extends BaseEntity
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 编号 */
|
/** 编号 */
|
||||||
private String id;
|
private Integer id;
|
||||||
|
|
||||||
/** 使用方法 */
|
/** 使用方法 */
|
||||||
@Excel(name = "使用方法")
|
@Excel(name = "使用方法")
|
||||||
|
@ -36,7 +36,7 @@ public interface DewormMapper
|
|||||||
* @param deworm 驱虫
|
* @param deworm 驱虫
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertDeworm(Deworm deworm);
|
public int insertDeworm(List<Deworm> deworm);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改驱虫
|
* 修改驱虫
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
package com.zhyc.module.biosafety.service.impl;
|
package com.zhyc.module.biosafety.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.zhyc.common.utils.DateUtils;
|
import com.zhyc.common.utils.DateUtils;
|
||||||
|
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.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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.zhyc.module.biosafety.mapper.DewormMapper;
|
import com.zhyc.module.biosafety.mapper.DewormMapper;
|
||||||
import com.zhyc.module.biosafety.service.IDewormService;
|
import com.zhyc.module.biosafety.service.IDewormService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 驱虫Service业务层处理
|
* 驱虫Service业务层处理
|
||||||
@ -19,6 +28,12 @@ public class DewormServiceImpl implements IDewormService
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private DewormMapper dewormMapper;
|
private DewormMapper dewormMapper;
|
||||||
|
@Autowired
|
||||||
|
private SwMedicineUsageServiceImpl medicineUsageService;
|
||||||
|
@Autowired
|
||||||
|
private SwMedicineUsageMapper medicineUsageMapper;
|
||||||
|
@Autowired
|
||||||
|
private SheepFileMapper sheepFileMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询驱虫
|
* 查询驱虫
|
||||||
@ -29,7 +44,10 @@ public class DewormServiceImpl implements IDewormService
|
|||||||
@Override
|
@Override
|
||||||
public Deworm selectDewormById(Long id)
|
public Deworm selectDewormById(Long id)
|
||||||
{
|
{
|
||||||
return dewormMapper.selectDewormById(id);
|
Deworm deworm = dewormMapper.selectDewormById(id);
|
||||||
|
SwMedicineUsage swMedicineUsage = medicineUsageMapper.selectSwMedicineUsageById(deworm.getUsageId());
|
||||||
|
deworm.setUsageDetails(swMedicineUsage.getSwMedicineUsageDetailsList());
|
||||||
|
return deworm;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,10 +69,43 @@ public class DewormServiceImpl implements IDewormService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public int insertDeworm(Deworm deworm)
|
public int insertDeworm(Deworm deworm)
|
||||||
{
|
{
|
||||||
deworm.setCreateTime(DateUtils.getNowDate());
|
|
||||||
return dewormMapper.insertDeworm(deworm);
|
// 使用记录的文件
|
||||||
|
SwMedicineUsage medicineUsage = new SwMedicineUsage();
|
||||||
|
medicineUsage.setSwMedicineUsageDetailsList(deworm.getUsageDetails());
|
||||||
|
medicineUsage.setName("羊只驱虫");
|
||||||
|
medicineUsage.setUseType("1");
|
||||||
|
|
||||||
|
|
||||||
|
List<Deworm> deworms = new ArrayList<>();
|
||||||
|
deworm.setCreateTime(DateUtils.getNowDate());
|
||||||
|
for (Integer sheepId : deworm.getSheepIds()) {
|
||||||
|
SheepFile sheepFile = sheepFileMapper.selectSheepFileById(Long.valueOf(sheepId));
|
||||||
|
|
||||||
|
System.out.println(sheepFile);
|
||||||
|
|
||||||
|
Deworm dew = new Deworm();
|
||||||
|
BeanUtils.copyProperties(deworm, dew);
|
||||||
|
dew.setSheepId(Long.valueOf(sheepId));
|
||||||
|
dew.setVariety(sheepFile.getVariety());
|
||||||
|
dew.setSheepType(sheepFile.getName());
|
||||||
|
dew.setMonthAge(sheepFile.getMonthAge());
|
||||||
|
dew.setGender(String.valueOf(sheepFile.getGender()));
|
||||||
|
dew.setBreed(sheepFile.getBreed());
|
||||||
|
dew.setParity(sheepFile.getParity());
|
||||||
|
// 获取药品使用记录的id
|
||||||
|
Integer usageId = medicineUsageService.insertSwMedicineUsage(medicineUsage);
|
||||||
|
|
||||||
|
dew.setUsageId(usageId);
|
||||||
|
deworms.add(dew);
|
||||||
|
}
|
||||||
|
// 药品使用记录
|
||||||
|
medicineUsage.setSwMedicineUsageDetailsList(deworm.getUsageDetails());
|
||||||
|
|
||||||
|
return dewormMapper.insertDeworm(deworms);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,6 +117,12 @@ public class DewormServiceImpl implements IDewormService
|
|||||||
@Override
|
@Override
|
||||||
public int updateDeworm(Deworm deworm)
|
public int updateDeworm(Deworm deworm)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
for (SwMedicineUsageDetails usageDetail : deworm.getUsageDetails()) {
|
||||||
|
usageDetail.setMediUsage(deworm.getUsageId());
|
||||||
|
}
|
||||||
|
medicineUsageMapper.deleteSwMedicineUsageDetailsByMediUsage(deworm.getUsageId());
|
||||||
|
medicineUsageMapper.batchSwMedicineUsageDetails(deworm.getUsageDetails());
|
||||||
deworm.setUpdateTime(DateUtils.getNowDate());
|
deworm.setUpdateTime(DateUtils.getNowDate());
|
||||||
return dewormMapper.updateDeworm(deworm);
|
return dewormMapper.updateDeworm(deworm);
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,7 @@ public class TreatmentServiceImpl implements ITreatmentService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public int updateTreatment(Treatment treatment)
|
public int updateTreatment(Treatment treatment)
|
||||||
{
|
{
|
||||||
for (SwMedicineUsageDetails usageDetail : treatment.getUsageDetails()) {
|
for (SwMedicineUsageDetails usageDetail : treatment.getUsageDetails()) {
|
||||||
|
@ -7,12 +7,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<resultMap type="Deworm" id="DewormResult">
|
<resultMap type="Deworm" id="DewormResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="sheepId" column="sheep_id" />
|
<result property="sheepId" column="sheep_id" />
|
||||||
|
<result property="sheepNo" column="sheep_no"/>
|
||||||
<result property="usageId" column="usage_id" />
|
<result property="usageId" column="usage_id" />
|
||||||
<result property="variety" column="variety" />
|
<result property="variety" column="variety" />
|
||||||
<result property="sheepType" column="sheep_type" />
|
<result property="sheepType" column="sheep_type" />
|
||||||
<result property="gender" column="gender" />
|
<result property="gender" column="gender" />
|
||||||
<result property="monthAge" column="month_age" />
|
<result property="monthAge" column="month_age" />
|
||||||
<result property="parity" column="parity" />
|
<result property="parity" column="parity" />
|
||||||
|
<result property="breed" column="breed"/>
|
||||||
<result property="datetime" column="datetime" />
|
<result property="datetime" column="datetime" />
|
||||||
<result property="technical" column="technical" />
|
<result property="technical" column="technical" />
|
||||||
<result property="comment" column="comment" />
|
<result property="comment" column="comment" />
|
||||||
@ -23,7 +25,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDewormVo">
|
<sql id="selectDewormVo">
|
||||||
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_deworm
|
select s.id, sheep_id, usage_id, variety, sheep_type, s.gender, month_age, s.parity,breed, datetime, technical, s.comment, s.update_by, s.update_time, s.create_by, s.create_time,
|
||||||
|
bs.manage_tags sheep_no
|
||||||
|
from sw_deworm s
|
||||||
|
left join bas_sheep bs on s.sheep_id = bs.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
|
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
|
||||||
@ -37,43 +42,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">
|
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">
|
||||||
<include refid="selectDewormVo"/>
|
<include refid="selectDewormVo"/>
|
||||||
where id = #{id}
|
where s.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDeworm" parameterType="Deworm" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertDeworm" parameterType="java.util.List">
|
||||||
insert into sw_deworm
|
insert into sw_deworm
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
(sheep_id, usage_id, variety, sheep_type, gender, month_age,
|
||||||
<if test="sheepId != null">sheep_id,</if>
|
parity, breed,datetime, technical, comment,
|
||||||
<if test="usageId != null">usage_id,</if>
|
update_by, update_time, create_by, create_time)
|
||||||
<if test="variety != null">variety,</if>
|
values
|
||||||
<if test="sheepType != null">sheep_type,</if>
|
<foreach collection="list" item="d" separator=",">
|
||||||
<if test="gender != null">gender,</if>
|
(#{d.sheepId}, #{d.usageId}, #{d.variety}, #{d.sheepType},
|
||||||
<if test="monthAge != null">month_age,</if>
|
#{d.gender}, #{d.monthAge}, #{d.parity},#{d.breed}, #{d.datetime},
|
||||||
<if test="parity != null">parity,</if>
|
#{d.technical}, #{d.comment},
|
||||||
<if test="datetime != null">datetime,</if>
|
#{d.updateBy}, #{d.updateTime}, #{d.createBy}, #{d.createTime})
|
||||||
<if test="technical != null">technical,</if>
|
</foreach>
|
||||||
<if test="comment != null">comment,</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="usageId != null">#{usageId},</if>
|
|
||||||
<if test="variety != null">#{variety},</if>
|
|
||||||
<if test="sheepType != null">#{sheepType},</if>
|
|
||||||
<if test="gender != null">#{gender},</if>
|
|
||||||
<if test="monthAge != null">#{monthAge},</if>
|
|
||||||
<if test="parity != null">#{parity},</if>
|
|
||||||
<if test="datetime != null">#{datetime},</if>
|
|
||||||
<if test="technical != null">#{technical},</if>
|
|
||||||
<if test="comment != null">#{comment},</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>
|
</insert>
|
||||||
|
|
||||||
<update id="updateDeworm" parameterType="Deworm">
|
<update id="updateDeworm" parameterType="Deworm">
|
||||||
|
@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="gender" column="gender" />
|
<result property="gender" column="gender" />
|
||||||
<result property="monthAge" column="month_age" />
|
<result property="monthAge" column="month_age" />
|
||||||
<result property="parity" column="parity" />
|
<result property="parity" column="parity" />
|
||||||
<result property="sheepfoldId" column="sheepfold_id" />
|
<result property="breed" column="breed" />
|
||||||
<result property="technical" column="technical" />
|
<result property="technical" column="technical" />
|
||||||
<result property="comment" column="comment" />
|
<result property="comment" column="comment" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectHealthVo">
|
<sql id="selectHealthVo">
|
||||||
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, technical, comment, update_by, update_time, create_by, create_time from sw_health
|
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, breed, technical, comment, update_by, update_time, create_by, create_time from sw_health
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectHealthList" parameterType="Health" resultMap="HealthResult">
|
<select id="selectHealthList" parameterType="Health" resultMap="HealthResult">
|
||||||
@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gender != null">gender,</if>
|
<if test="gender != null">gender,</if>
|
||||||
<if test="monthAge != null">month_age,</if>
|
<if test="monthAge != null">month_age,</if>
|
||||||
<if test="parity != null">parity,</if>
|
<if test="parity != null">parity,</if>
|
||||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
<if test="breed != null">breed,</if>
|
||||||
<if test="technical != null">technical,</if>
|
<if test="technical != null">technical,</if>
|
||||||
<if test="comment != null">comment,</if>
|
<if test="comment != null">comment,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gender != null">#{gender},</if>
|
<if test="gender != null">#{gender},</if>
|
||||||
<if test="monthAge != null">#{monthAge},</if>
|
<if test="monthAge != null">#{monthAge},</if>
|
||||||
<if test="parity != null">#{parity},</if>
|
<if test="parity != null">#{parity},</if>
|
||||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
<if test="breed != null">#{breed},</if>
|
||||||
<if test="technical != null">#{technical},</if>
|
<if test="technical != null">#{technical},</if>
|
||||||
<if test="comment != null">#{comment},</if>
|
<if test="comment != null">#{comment},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gender != null">gender = #{gender},</if>
|
<if test="gender != null">gender = #{gender},</if>
|
||||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||||
<if test="parity != null">parity = #{parity},</if>
|
<if test="parity != null">parity = #{parity},</if>
|
||||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
<if test="breed != null">breed = #{breed},</if>
|
||||||
<if test="technical != null">technical = #{technical},</if>
|
<if test="technical != null">technical = #{technical},</if>
|
||||||
<if test="comment != null">comment = #{comment},</if>
|
<if test="comment != null">comment = #{comment},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="gender" column="gender" />
|
<result property="gender" column="gender" />
|
||||||
<result property="monthAge" column="month_age" />
|
<result property="monthAge" column="month_age" />
|
||||||
<result property="parity" column="parity" />
|
<result property="parity" column="parity" />
|
||||||
<result property="sheepfoldId" column="sheepfold_id" />
|
<result property="breed" column="breed" />
|
||||||
<result property="datetime" column="datetime" />
|
<result property="datetime" column="datetime" />
|
||||||
<result property="technical" column="technical" />
|
<result property="technical" column="technical" />
|
||||||
<result property="comment" column="comment" />
|
<result property="comment" column="comment" />
|
||||||
@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectImmunityVo">
|
<sql id="selectImmunityVo">
|
||||||
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity
|
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, breed, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectImmunityList" parameterType="Immunity" resultMap="ImmunityResult">
|
<select id="selectImmunityList" parameterType="Immunity" resultMap="ImmunityResult">
|
||||||
@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gender != null">gender,</if>
|
<if test="gender != null">gender,</if>
|
||||||
<if test="monthAge != null">month_age,</if>
|
<if test="monthAge != null">month_age,</if>
|
||||||
<if test="parity != null">parity,</if>
|
<if test="parity != null">parity,</if>
|
||||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
<if test="breed != null">breed,</if>
|
||||||
<if test="datetime != null">datetime,</if>
|
<if test="datetime != null">datetime,</if>
|
||||||
<if test="technical != null">technical,</if>
|
<if test="technical != null">technical,</if>
|
||||||
<if test="comment != null">comment,</if>
|
<if test="comment != null">comment,</if>
|
||||||
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gender != null">#{gender},</if>
|
<if test="gender != null">#{gender},</if>
|
||||||
<if test="monthAge != null">#{monthAge},</if>
|
<if test="monthAge != null">#{monthAge},</if>
|
||||||
<if test="parity != null">#{parity},</if>
|
<if test="parity != null">#{parity},</if>
|
||||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
<if test="breed != null">#{breed},</if>
|
||||||
<if test="datetime != null">#{datetime},</if>
|
<if test="datetime != null">#{datetime},</if>
|
||||||
<if test="technical != null">#{technical},</if>
|
<if test="technical != null">#{technical},</if>
|
||||||
<if test="comment != null">#{comment},</if>
|
<if test="comment != null">#{comment},</if>
|
||||||
@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="gender != null">gender = #{gender},</if>
|
<if test="gender != null">gender = #{gender},</if>
|
||||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||||
<if test="parity != null">parity = #{parity},</if>
|
<if test="parity != null">parity = #{parity},</if>
|
||||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
<if test="breed != null">breed = #{breed},</if>
|
||||||
<if test="datetime != null">datetime = #{datetime},</if>
|
<if test="datetime != null">datetime = #{datetime},</if>
|
||||||
<if test="technical != null">technical = #{technical},</if>
|
<if test="technical != null">technical = #{technical},</if>
|
||||||
<if test="comment != null">comment = #{comment},</if>
|
<if test="comment != null">comment = #{comment},</if>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user