|
@@ -6,16 +6,21 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.bizmatics.common.core.bean.CommonPage;
|
|
|
+import com.bizmatics.common.core.exception.BusinessException;
|
|
|
import com.bizmatics.common.mvc.base.AbstractCrudService;
|
|
|
import com.bizmatics.mhfire.model.JcjZzclxx;
|
|
|
import com.bizmatics.mhfire.model.XfzWxz;
|
|
|
+import com.bizmatics.mhfire.model.ZskTeam;
|
|
|
import com.bizmatics.mhfire.persistence.mapper.XfzWxzMapper;
|
|
|
import com.bizmatics.mhfire.service.JcjZzclxxService;
|
|
|
import com.bizmatics.mhfire.service.XfzWxzService;
|
|
|
+import com.bizmatics.mhfire.service.ZskTeamService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Optional;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -31,6 +36,8 @@ public class XfzWxzServiceImpl extends AbstractCrudService<XfzWxzMapper, XfzWxz>
|
|
|
|
|
|
@Autowired
|
|
|
private JcjZzclxxService jcjZzclxxService;
|
|
|
+ @Autowired
|
|
|
+ private ZskTeamService zskTeamService;
|
|
|
@Override
|
|
|
public CommonPage<XfzWxz> page(Integer current, Integer size) {
|
|
|
IPage<XfzWxz> page = new Page<>(current, size);
|
|
@@ -40,9 +47,12 @@ public class XfzWxzServiceImpl extends AbstractCrudService<XfzWxzMapper, XfzWxz>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<JcjZzclxx> getOne(String id) {
|
|
|
+ public List<JcjZzclxx> getOne(String zdId, Date startTime,Date endTime) {
|
|
|
+ ZskTeam zskTeam = zskTeamService.getById(zdId);
|
|
|
+ Optional.ofNullable(zskTeam).orElseThrow(() -> new BusinessException("中队数据为空"));
|
|
|
LambdaQueryWrapper<JcjZzclxx> queryWrapper = Wrappers.lambdaQuery();
|
|
|
- queryWrapper.eq(JcjZzclxx::getJgxxXfjgId,id);
|
|
|
+ queryWrapper.eq(JcjZzclxx::getJgxxXfjgId,zskTeam.getXfjgId());
|
|
|
+ queryWrapper.between(JcjZzclxx::getTssj,startTime,endTime);
|
|
|
return jcjZzclxxService.list(queryWrapper);
|
|
|
}
|
|
|
}
|