|
@@ -7,10 +7,15 @@ import cn.iocoder.yudao.module.pms.controller.admin.qhse.safe.vo.QhseSafeDayPage
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.qhse.safe.vo.QhseSafeDaySaveReqVO;
|
|
import cn.iocoder.yudao.module.pms.controller.admin.qhse.safe.vo.QhseSafeDaySaveReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.safe.QhseSafeDayDO;
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.safe.QhseSafeDayDO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.mysql.qhse.safe.QhseSafeDayMapper;
|
|
import cn.iocoder.yudao.module.pms.dal.mysql.qhse.safe.QhseSafeDayMapper;
|
|
|
|
|
+import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
|
|
|
+import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
|
|
|
|
@@ -25,6 +30,8 @@ public class QhseSafeDayServiceImpl implements QhseSafeDayService {
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
private QhseSafeDayMapper qhseSafeDayMapper;
|
|
private QhseSafeDayMapper qhseSafeDayMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DeptApi deptApi;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Long createQhseSafeDay(QhseSafeDaySaveReqVO createReqVO) {
|
|
public Long createQhseSafeDay(QhseSafeDaySaveReqVO createReqVO) {
|
|
@@ -69,4 +76,12 @@ public class QhseSafeDayServiceImpl implements QhseSafeDayService {
|
|
|
return qhseSafeDayMapper.selectPage(pageReqVO);
|
|
return qhseSafeDayMapper.selectPage(pageReqVO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<QhseSafeDayDO> getDayByDept(Long deptId) {
|
|
|
|
|
+ List<Long> collect = deptApi.getChildDeptList(deptId).stream().map(DeptRespDTO::getId).collect(Collectors.toList());
|
|
|
|
|
+ QhseSafeDayPageReqVO qhseSafeDayPageReqVO = new QhseSafeDayPageReqVO();
|
|
|
|
|
+ List<QhseSafeDayDO> qhseSafeDayDOS = qhseSafeDayMapper.selectListByDept(qhseSafeDayPageReqVO, collect);
|
|
|
|
|
+ return qhseSafeDayDOS;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|