|
@@ -418,11 +418,11 @@ public class BaseDuckInfoServiceImpl extends ServiceImpl<BaseDuckInfoMapper, Bas
|
|
|
}
|
|
|
printEntrty.setBaseDuckInfo(baseDuckInfo);
|
|
|
printEntrty.setFeeding(def.format(count));
|
|
|
- Date endDate = new SimpleDateFormat("yyyy-MM-dd").parse(endTime);
|
|
|
- Date startDate = new SimpleDateFormat("yyyy-MM-dd").parse(startTime);
|
|
|
+ Date endDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime+" 23:59:59");
|
|
|
+ Date startDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime + " 00:00:00");
|
|
|
System.out.println("开始时间:" + startDate);
|
|
|
System.out.println("结束时间:" + endDate);
|
|
|
- System.out.println("满足日龄日期:" + dateTime);
|
|
|
+ System.out.println("满足日龄日期:" + resultDate);
|
|
|
if (ObjectUtil.isNotEmpty(resultDate)){
|
|
|
if (resultDate.after(endDate)){
|
|
|
System.out.println("满足日龄在结束日期之后");
|
|
@@ -430,13 +430,17 @@ public class BaseDuckInfoServiceImpl extends ServiceImpl<BaseDuckInfoMapper, Bas
|
|
|
printEntrty.setEgging("0");
|
|
|
printEntrty.setAvgWeiht("0");
|
|
|
}else {
|
|
|
+ QueryWrapper<EnvRegularCallEgg> queryWrapper1 = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("duck_num",baseDuckInfo.getDuckNum());
|
|
|
EggVo eggVo = new EggVo();
|
|
|
if (resultDate.before(startDate)){
|
|
|
+ queryWrapper1.between("call_date",startDate,endDate);
|
|
|
System.out.println("满足日龄在开始日期之前");
|
|
|
- eggVo = eggMapper.print(baseDuckInfo.getDuckNum(),startDate,endDate);
|
|
|
+ eggVo = eggMapper.print(queryWrapper1);
|
|
|
}else {
|
|
|
+ queryWrapper1.between("call_date",resultDate,endDate);
|
|
|
System.out.println("满足日龄在开始日期之后");
|
|
|
- eggVo = eggMapper.print(baseDuckInfo.getDuckNum(),resultDate,endDate);
|
|
|
+ eggVo = eggMapper.print(queryWrapper1);
|
|
|
}
|
|
|
printEntrty.setEggNum(eggVo.getTotalEgg());
|
|
|
printEntrty.setEgging(eggVo.getTotalWeight());
|