|
@@ -24,9 +24,14 @@ public class HealthImmuneRecordServiceImpl extends ServiceImpl<HealthImmuneRecor
|
|
public PageUtils queryPage(Map<String, Object> params) {
|
|
public PageUtils queryPage(Map<String, Object> params) {
|
|
//根据牧场查询
|
|
//根据牧场查询
|
|
String farmId = (String) params.get("farmId");
|
|
String farmId = (String) params.get("farmId");
|
|
|
|
+ String eartag = (String)params.get("eartag");
|
|
|
|
|
|
QueryWrapper<HealthImmuneRecordEntity> wrapper = new QueryWrapper<HealthImmuneRecordEntity>();
|
|
QueryWrapper<HealthImmuneRecordEntity> wrapper = new QueryWrapper<HealthImmuneRecordEntity>();
|
|
wrapper.eq(StringUtils.isNotBlank(farmId),"farm_id",farmId);
|
|
wrapper.eq(StringUtils.isNotBlank(farmId),"farm_id",farmId);
|
|
|
|
+ if (StringUtils.isNotBlank(eartag)){
|
|
|
|
+ wrapper.like("pig_id",eartag);
|
|
|
|
+ }
|
|
|
|
+
|
|
IPage<HealthImmuneRecordEntity> page = this.page(
|
|
IPage<HealthImmuneRecordEntity> page = this.page(
|
|
new Query<HealthImmuneRecordEntity>().getPage(params),
|
|
new Query<HealthImmuneRecordEntity>().getPage(params),
|
|
wrapper
|
|
wrapper
|
|
@@ -36,12 +41,12 @@ public class HealthImmuneRecordServiceImpl extends ServiceImpl<HealthImmuneRecor
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void saveAll(String[] eartags, String vaccine, Integer farmId, String manName, Integer manId) {
|
|
|
|
|
|
+ public void saveAll(String[] eartags, String vaccineName, Integer farmId, String manName, Integer manId) {
|
|
HealthImmuneRecordEntity healthImmuneRecordEntity = new HealthImmuneRecordEntity();
|
|
HealthImmuneRecordEntity healthImmuneRecordEntity = new HealthImmuneRecordEntity();
|
|
healthImmuneRecordEntity.setFarmId(farmId);
|
|
healthImmuneRecordEntity.setFarmId(farmId);
|
|
healthImmuneRecordEntity.setManId(manId);
|
|
healthImmuneRecordEntity.setManId(manId);
|
|
healthImmuneRecordEntity.setManName(manName);
|
|
healthImmuneRecordEntity.setManName(manName);
|
|
- healthImmuneRecordEntity.setVaccineName(vaccine);
|
|
|
|
|
|
+ healthImmuneRecordEntity.setVaccineName(vaccineName);
|
|
for (String eartag : eartags) {
|
|
for (String eartag : eartags) {
|
|
healthImmuneRecordEntity.setPigId(eartag);
|
|
healthImmuneRecordEntity.setPigId(eartag);
|
|
save(healthImmuneRecordEntity);
|
|
save(healthImmuneRecordEntity);
|