|
|
@@ -14,13 +14,16 @@ import cn.iocoder.yudao.module.pms.dal.mysql.qhse.jsa.QhseJsaMapper;
|
|
|
import cn.iocoder.yudao.module.pms.service.qhse.ChineseLetterUtil;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
|
+import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.Objects;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
import static cn.hutool.extra.pinyin.PinyinUtil.isChinese;
|
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
@@ -43,6 +46,8 @@ public class QhseJsaServiceImpl implements QhseJsaService {
|
|
|
private DeptUtil deptUtil;
|
|
|
@Autowired
|
|
|
private IotRhDailyReportMapper iotRhDailyReportMapper;
|
|
|
+ @Autowired
|
|
|
+ private DeptService deptService;
|
|
|
|
|
|
@Override
|
|
|
public Long createQhseJsa(QhseJsaSaveReqVO createReqVO) {
|
|
|
@@ -138,7 +143,12 @@ public class QhseJsaServiceImpl implements QhseJsaService {
|
|
|
|
|
|
@Override
|
|
|
public PageResult<QhseJsaDO> getQhseJsaPage(QhseJsaPageReqVO pageReqVO) {
|
|
|
- return qhseJsaMapper.selectPage(pageReqVO);
|
|
|
+ Set<Long> ids = new HashSet<>();
|
|
|
+ if (Objects.nonNull(pageReqVO.getDeptId())) {
|
|
|
+ ids = deptService.getChildDeptIdListFromCache(pageReqVO.getDeptId());
|
|
|
+ ids.add(pageReqVO.getDeptId());
|
|
|
+ }
|
|
|
+ return qhseJsaMapper.selectPage(pageReqVO, ids);
|
|
|
}
|
|
|
|
|
|
}
|