生物安全羊只耳号查询
This commit is contained in:
@@ -47,6 +47,16 @@ public class DewormController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:deworm:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
Deworm deworm = new Deworm();
|
||||
deworm.setSheepNo(sheepNo);
|
||||
List<String> list = dewormService.selectSheepNoList(deworm);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出驱虫列表
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.zhyc.module.biosafety.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -114,4 +116,15 @@ public class DiagnosisController extends BaseController
|
||||
{
|
||||
return toAjax(diagnosisService.deleteDiagnosisByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:diagnosis:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
Diagnosis diagnosis = new Diagnosis();
|
||||
diagnosis.setSheepNo(sheepNo);
|
||||
List<String> list = diagnosisService.selectSheepNoList(diagnosis);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import com.zhyc.module.biosafety.service.IHealthService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -105,4 +106,15 @@ public class HealthController extends BaseController
|
||||
{
|
||||
return toAjax(healthService.deleteHealthByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:health:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
Health health = new Health();
|
||||
health.setSheepNo(sheepNo);
|
||||
List<String> list = healthService.selectSheepNoList(health);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.module.biosafety.service.IImmunityService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -104,4 +105,15 @@ public class ImmunityController extends BaseController
|
||||
{
|
||||
return toAjax(immunityService.deleteImmunityByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:immunity:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
Immunity immunity = new Immunity();
|
||||
immunity.setSheepNo(sheepNo);
|
||||
List<String> list = immunityService.selectSheepNoList(immunity);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.module.biosafety.domain.QuarantineReport;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -104,4 +105,15 @@ public class QuarantineReportController extends BaseController
|
||||
{
|
||||
return toAjax(quarantineReportService.deleteQuarantineReportByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:quarantine:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
QuarantineReport report = new QuarantineReport();
|
||||
report.setSheepNo(sheepNo);
|
||||
List<String> list = quarantineReportService.selectSheepNoList(report);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineUsageService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -110,4 +111,14 @@ public class SwMedicineUsageController extends BaseController
|
||||
{
|
||||
return toAjax(swMedicineUsageService.deleteSwMedicineUsageByIds(ids));
|
||||
}
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:usageInfo:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
SwMedicineUsage usage = new SwMedicineUsage();
|
||||
usage.setSheepNo(sheepNo);
|
||||
List<String> list = swMedicineUsageService.selectSheepNoList(usage);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhyc.module.biosafety.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhyc.module.biosafety.domain.Health;
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import com.zhyc.module.biosafety.service.ITreatmentService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -104,4 +105,15 @@ public class TreatmentController extends BaseController
|
||||
{
|
||||
return toAjax(treatmentService.deleteTreatmentByIds(ids));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('biosafety:treatment:list')")
|
||||
@GetMapping("/searchEarNumbers")
|
||||
public AjaxResult getSheepNoList(String sheepNo)
|
||||
{
|
||||
Treatment treatment = new Treatment();
|
||||
treatment.setSheepNo(sheepNo);
|
||||
List<String> list = treatmentService.selectSheepNoList(treatment);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,4 +61,6 @@ public interface DewormMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDewormByIds(Long[] ids);
|
||||
|
||||
List<String> selectSheepNoList(Deworm deworm);
|
||||
}
|
||||
|
||||
@@ -60,4 +60,6 @@ public interface DiagnosisMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDiagnosisByIds(Long[] ids);
|
||||
|
||||
List<String> selectSheepNoList(Diagnosis diagnosis);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface HealthMapper
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询保健
|
||||
*
|
||||
@@ -60,4 +63,6 @@ public interface HealthMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthByIds(Long[] ids);
|
||||
|
||||
List<String> selectSheepNoList(Health health);
|
||||
}
|
||||
|
||||
@@ -60,4 +60,6 @@ public interface ImmunityMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteImmunityByIds(Long[] ids);
|
||||
|
||||
List<String> selectSheepNoList(Immunity immunity);
|
||||
}
|
||||
|
||||
@@ -61,4 +61,6 @@ public interface QuarantineReportMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineReportByIds(Long[] ids);
|
||||
|
||||
List<String> selectSheepNoList(QuarantineReport report);
|
||||
}
|
||||
|
||||
@@ -89,4 +89,6 @@ public interface SwMedicineUsageMapper
|
||||
public int deleteSwMedicineUsageDetailsByMediUsage(Integer id);
|
||||
|
||||
List<SwMedicineUsageDetails> selectSwMedicineUsageDetailsById(Integer id);
|
||||
|
||||
List<String> selectSheepNoList(SwMedicineUsage usage);
|
||||
}
|
||||
|
||||
@@ -66,4 +66,6 @@ public interface TreatmentMapper
|
||||
|
||||
|
||||
List<Treatment> selectTreatmentStatus(Long sheepId);
|
||||
|
||||
List<String> selectSheepNoList(Treatment treatment);
|
||||
}
|
||||
|
||||
@@ -59,4 +59,6 @@ public interface IDewormService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDewormById(Long id);
|
||||
|
||||
List<String> selectSheepNoList(Deworm deworm);
|
||||
}
|
||||
|
||||
@@ -61,4 +61,6 @@ public interface IDiagnosisService
|
||||
public int deleteDiagnosisById(Long id);
|
||||
|
||||
int insertDiagnosisList(Diagnosis diagnosis);
|
||||
|
||||
List<String> selectSheepNoList(Diagnosis diagnosis);
|
||||
}
|
||||
|
||||
@@ -58,4 +58,6 @@ public interface IHealthService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHealthById(Long id);
|
||||
|
||||
List<String> selectSheepNoList(Health health);
|
||||
}
|
||||
|
||||
@@ -58,4 +58,6 @@ public interface IImmunityService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteImmunityById(Long id);
|
||||
|
||||
List<String> selectSheepNoList(Immunity immunity);
|
||||
}
|
||||
|
||||
@@ -59,4 +59,6 @@ public interface IQuarantineReportService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQuarantineReportById(Long id);
|
||||
|
||||
List<String> selectSheepNoList(QuarantineReport report);
|
||||
}
|
||||
|
||||
@@ -61,4 +61,6 @@ public interface ISwMedicineUsageService
|
||||
public int deleteSwMedicineUsageById(Integer id);
|
||||
|
||||
List<SwMedicineUsageDetails> selectSwMedicineUsageDetailsById(Integer id);
|
||||
|
||||
List<String> selectSheepNoList(SwMedicineUsage usage);
|
||||
}
|
||||
|
||||
@@ -60,4 +60,6 @@ public interface ITreatmentService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTreatmentById(Long id);
|
||||
|
||||
List<String> selectSheepNoList(Treatment treatment);
|
||||
}
|
||||
|
||||
@@ -172,4 +172,10 @@ public class DewormServiceImpl implements IDewormService
|
||||
{
|
||||
return dewormMapper.deleteDewormById(id);
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(Deworm deworm) {
|
||||
return dewormMapper.selectSheepNoList(deworm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.zhyc.module.base.domain.BasSheep;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.BasSheepMapper;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.biosafety.domain.Deworm;
|
||||
import com.zhyc.module.biosafety.domain.Treatment;
|
||||
import com.zhyc.module.biosafety.mapper.DiagnosisMapper;
|
||||
import com.zhyc.module.biosafety.mapper.TreatmentMapper;
|
||||
@@ -220,4 +221,10 @@ public class DiagnosisServiceImpl implements IDiagnosisService
|
||||
return diagnosisMapper.deleteDiagnosisById(id);
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(Diagnosis diagnosis) {
|
||||
return diagnosisMapper.selectSheepNoList(diagnosis);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ 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;
|
||||
@@ -165,4 +166,11 @@ public class HealthServiceImpl implements IHealthService
|
||||
{
|
||||
return healthMapper.deleteHealthById(id);
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(Health health) {
|
||||
return healthMapper.selectSheepNoList(health);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ 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;
|
||||
@@ -170,4 +171,10 @@ public class ImmunityServiceImpl implements IImmunityService
|
||||
{
|
||||
return immunityMapper.deleteImmunityById(id);
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(Immunity immunity) {
|
||||
return immunityMapper.selectSheepNoList(immunity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ 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.service.impl.SheepFileServiceImpl;
|
||||
import com.zhyc.module.biosafety.domain.Immunity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.zhyc.module.biosafety.mapper.QuarantineReportMapper;
|
||||
@@ -136,4 +137,10 @@ public class QuarantineReportServiceImpl implements IQuarantineReportService
|
||||
{
|
||||
return quarantineReportMapper.deleteQuarantineReportById(id);
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(QuarantineReport report) {
|
||||
return quarantineReportMapper.selectSheepNoList(report);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.zhyc.common.annotation.DataScope;
|
||||
import com.zhyc.common.utils.DateUtils;
|
||||
import com.zhyc.common.utils.SecurityUtils;
|
||||
import com.zhyc.module.biosafety.domain.Immunity;
|
||||
import com.zhyc.module.biosafety.service.ISwMedicineUsageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -152,4 +153,10 @@ public class SwMedicineUsageServiceImpl implements ISwMedicineUsageService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(SwMedicineUsage usage) {
|
||||
return swMedicineUsageMapper.selectSheepNoList(usage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,12 @@ import com.zhyc.common.utils.bean.BeanUtils;
|
||||
import com.zhyc.module.Exception.BusinessException;
|
||||
import com.zhyc.module.base.domain.SheepFile;
|
||||
import com.zhyc.module.base.mapper.SheepFileMapper;
|
||||
import com.zhyc.module.biosafety.domain.Diagnosis;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsage;
|
||||
import com.zhyc.module.biosafety.domain.SwMedicineUsageDetails;
|
||||
import com.zhyc.module.biosafety.domain.*;
|
||||
import com.zhyc.module.biosafety.mapper.DiagnosisMapper;
|
||||
import com.zhyc.module.biosafety.mapper.SwMedicineUsageMapper;
|
||||
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;
|
||||
|
||||
@@ -243,6 +240,12 @@ public class TreatmentServiceImpl implements ITreatmentService
|
||||
return treatmentMapper.deleteTreatmentById(id);
|
||||
}
|
||||
|
||||
@DataScope(deptAlias = "s", userAlias = "s")
|
||||
@Override
|
||||
public List<String> selectSheepNoList(Treatment treatment) {
|
||||
return treatmentMapper.selectSheepNoList(treatment);
|
||||
}
|
||||
|
||||
public void updateTreatmentStatus(Long sheepId) {
|
||||
List<Treatment> treatments=treatmentMapper.selectTreatmentStatus(sheepId);
|
||||
Diagnosis diagnosis = new Diagnosis();
|
||||
|
||||
@@ -82,6 +82,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectDewormVo"/>
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="Deworm">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_deworm s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertDeworm" parameterType="java.util.List">
|
||||
insert into sw_deworm
|
||||
|
||||
@@ -91,6 +91,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectDiagnosisVo"/>
|
||||
where sd.id = #{id}
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="Diagnosis">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_diagnosis s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertDiagnosis" parameterType="Diagnosis" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_diagnosis
|
||||
|
||||
@@ -85,6 +85,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectHealthVo"/>
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="Health">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_health s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertHealth" parameterType="Health" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_health
|
||||
|
||||
@@ -83,6 +83,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectImmunityVo"/>
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="Immunity">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_immunity s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertImmunity" parameterType="Immunity" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_immunity
|
||||
|
||||
@@ -102,6 +102,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where sqr.id = #{id}
|
||||
ORDER BY datetime DESC
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="QuarantineReport">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_quarantine_report s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertQuarantineReport" parameterType="java.util.List">
|
||||
INSERT INTO sw_quarantine_report
|
||||
|
||||
@@ -156,6 +156,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
smud.medi_usage = #{id}
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="SwMedicineUsage">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_medicine_usage s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertSwMedicineUsage" parameterType="SwMedicineUsage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_medicine_usage
|
||||
|
||||
@@ -105,6 +105,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectTreatmentStatus" resultMap="TreatmentResult">
|
||||
select * from sw_treatment where sheep_id = #{sheepId} and status in (0, 1)
|
||||
</select>
|
||||
<select id="selectSheepNoList" resultType="java.lang.String" parameterType="Treatment">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM sw_treatment s
|
||||
LEFT JOIN bas_sheep bs ON s.sheep_id = bs.id
|
||||
<where>
|
||||
bs.manage_tags IS NOT NULL AND bs.manage_tags != ''
|
||||
<if test="sheepNo!=null and sheepNo!= ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{sheepNo}, '%')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
ORDER BY bs.manage_tags ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertTreatment" parameterType="Treatment" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_treatment
|
||||
|
||||
Reference in New Issue
Block a user