|
@@ -9,6 +9,7 @@ import com.huimv.management.entity.UnitEntity;
|
|
import com.huimv.management.entity.UnitEntity;
|
|
import com.huimv.management.entity.UnitEntity;
|
|
import com.huimv.management.entity.vo.DrinkingWaterVo;
|
|
import com.huimv.management.entity.vo.DrinkingWaterVo;
|
|
import com.huimv.management.entity.vo.PigBaseVo;
|
|
import com.huimv.management.entity.vo.PigBaseVo;
|
|
|
|
+import com.huimv.management.entity.vo.UnitVo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -40,29 +41,29 @@ public class UnitServiceImpl extends ServiceImpl<UnitDao, UnitEntity> implements
|
|
String formFarmId = (String) params.get("formFarmId");
|
|
String formFarmId = (String) params.get("formFarmId");
|
|
System.out.println(formFarmId);
|
|
System.out.println(formFarmId);
|
|
if (StringUtils.isNotBlank(formFarmId)) {
|
|
if (StringUtils.isNotBlank(formFarmId)) {
|
|
- queryWrapper.eq("farm_id", Integer.parseInt(formFarmId));
|
|
|
|
|
|
+ queryWrapper.eq("unit.farm_id", Integer.parseInt(formFarmId));
|
|
}
|
|
}
|
|
|
|
|
|
//单元编号
|
|
//单元编号
|
|
String keywords = (String) params.get("keyword");
|
|
String keywords = (String) params.get("keyword");
|
|
if (StringUtils.isNotBlank(keywords)) {
|
|
if (StringUtils.isNotBlank(keywords)) {
|
|
|
|
|
|
- queryWrapper.like("number", keywords);
|
|
|
|
|
|
+ queryWrapper.like("unit.number", keywords);
|
|
}
|
|
}
|
|
|
|
|
|
//栏期编号
|
|
//栏期编号
|
|
String periodId = (String) params.get("periodId");
|
|
String periodId = (String) params.get("periodId");
|
|
if (StringUtils.isNotBlank(periodId)) {
|
|
if (StringUtils.isNotBlank(periodId)) {
|
|
- queryWrapper.eq("current_period_id", periodId);
|
|
|
|
|
|
+ queryWrapper.eq("unit.current_period_id", periodId);
|
|
}
|
|
}
|
|
|
|
|
|
//猪舍编号
|
|
//猪舍编号
|
|
String pigstyId = (String) params.get("pigstyId");
|
|
String pigstyId = (String) params.get("pigstyId");
|
|
if (StringUtils.isNotBlank(pigstyId)) {
|
|
if (StringUtils.isNotBlank(pigstyId)) {
|
|
- queryWrapper.eq("pigsty_id", pigstyId);
|
|
|
|
|
|
+ queryWrapper.eq("unit.pigsty_id", pigstyId);
|
|
}
|
|
}
|
|
queryWrapper.apply("unit.deleted = 0 AND pigsty.deleted = 0 AND period.deleted = 0");
|
|
queryWrapper.apply("unit.deleted = 0 AND pigsty.deleted = 0 AND period.deleted = 0");
|
|
- IPage<PigBaseVo> page = unitDao.list(new Query<>().getPage(params),queryWrapper);
|
|
|
|
|
|
+ IPage<UnitVo> page = unitDao.list(new Query<>().getPage(params),queryWrapper);
|
|
|
|
|
|
|
|
|
|
return new PageUtils(page);
|
|
return new PageUtils(page);
|