质安管理
This commit is contained in:
@ -8,6 +8,7 @@ import org.dromara.bigscreen.domain.vo.DpznglAqyVo;
|
||||
import org.dromara.bigscreen.domain.vo.DpznglVo;
|
||||
import org.dromara.bigscreen.enums.DpEnum;
|
||||
import org.dromara.bigscreen.service.DpzaglService;
|
||||
import org.dromara.common.core.service.UserService;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.domain.GeoPoint;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -25,6 +26,7 @@ import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQuer
|
||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||
import org.dromara.safety.domain.HseSafetyInspection;
|
||||
import org.dromara.safety.domain.HseTeamMeeting;
|
||||
import org.dromara.safety.domain.dto.safetyinspection.HseSafetyInspectionQueryReq;
|
||||
import org.dromara.safety.domain.dto.teammeeting.HseTeamMeetingQueryReq;
|
||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||
@ -36,6 +38,7 @@ import org.dromara.system.domain.SysUserRole;
|
||||
import org.dromara.system.mapper.SysRoleMapper;
|
||||
import org.dromara.system.mapper.SysUserRoleMapper;
|
||||
import org.dromara.system.service.ISysRoleService;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -65,6 +68,8 @@ public class DpzaglServiceImpl implements DpzaglService {
|
||||
|
||||
private final SysRoleMapper sysRoleMapper;
|
||||
|
||||
private final UserService userService;
|
||||
|
||||
|
||||
private final SysUserRoleMapper sysUserRoleMapper;
|
||||
|
||||
@ -145,7 +150,7 @@ public class DpzaglServiceImpl implements DpzaglService {
|
||||
//判断是否在岗
|
||||
for (DpznglAqyVo dpznglAqyVo : dpznglAqyVos) {
|
||||
dpznglAqyVo.setSfzg(DpEnum.RYZT_LG.getTypeValue());
|
||||
|
||||
dpznglAqyVo.setUserName(userService.selectNicknameByIds(dpznglAqyVo.getUserId().toString()));
|
||||
for (BusProjectPunchrange busProjectPunchrange : busProjectPunchranges) {
|
||||
List<String> coordinates = List.of(busProjectPunchrange.getPunchRange());
|
||||
List<GeoPoint> matchingRange = JSTUtil.findMatchingRange(dpznglAqyVo.getLocLatitude().toString(), dpznglAqyVo.getLocLongitude().toString(), coordinates);
|
||||
@ -163,8 +168,10 @@ public class DpzaglServiceImpl implements DpzaglService {
|
||||
|
||||
// 站班会
|
||||
HseTeamMeetingQueryReq hseTeamMeetingQueryReq = new HseTeamMeetingQueryReq();
|
||||
List<HseTeamMeetingVo> hseTeamMeetingVos = teamMeetingService.queryList(hseTeamMeetingQueryReq);
|
||||
dpznglVo.setZbhList(hseTeamMeetingVos);
|
||||
// List<HseTeamMeetingVo> hseTeamMeetingVos = teamMeetingService.queryList(hseTeamMeetingQueryReq);
|
||||
List<HseTeamMeeting> hseTeamMeetings = teamMeetingService.getBaseMapper().selectList(new LambdaQueryWrapper<HseTeamMeeting>().ge(HseTeamMeeting::getProjectId, bo.getProjectId()));
|
||||
dpznglVo.setZbhList(MapstructUtils.convert(hseTeamMeetings, HseTeamMeetingVo.class));
|
||||
dpznglVo.getZbhList().forEach(hseTeamMeetingVo -> {hseTeamMeetingVo.setCreateByName(userService.selectNicknameByIds(hseTeamMeetingVo.getCreateBy().toString()));});
|
||||
return dpznglVo;
|
||||
}
|
||||
|
||||
@ -186,12 +193,14 @@ public class DpzaglServiceImpl implements DpzaglService {
|
||||
if (list != null && list.size() > 0){
|
||||
dpznglVo.setAqZS(Long.valueOf(list.size()));
|
||||
dpznglVo.setAqList(MapstructUtils.convert(list, HseSafetyInspectionVo.class));
|
||||
dpznglVo.getAqList().forEach(zl ->{zl.setCreatorName(userService.selectNicknameByIds(zl.getCreateBy().toString()));});
|
||||
dpznglVo.setZxjcAq(list.stream().filter(zl -> DpEnum.ZLGLLX_ZXGL.getTypeValue().equals(zl.getCheckType())).count());
|
||||
dpznglVo.setDqjcAq(list.stream().filter(zl -> DpEnum.ZLGLLX_DQJC.getTypeValue().equals(zl.getCheckType())).count());
|
||||
dpznglVo.setRcxjAq(list.stream().filter(zl -> DpEnum.ZLGLLX_RCXJ.getTypeValue().equals(zl.getCheckType())).count());
|
||||
dpznglVo.setAqZgsl(list.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getStatus())).count());
|
||||
}
|
||||
if (aqZgList.getRows() != null && aqZgList.getRows().size() > 0){
|
||||
aqZgList.getRows().forEach(zl ->{zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));});
|
||||
dpznglVo.setAqZgList(aqZgList.getRows());
|
||||
}
|
||||
|
||||
@ -218,12 +227,14 @@ public class DpzaglServiceImpl implements DpzaglService {
|
||||
if (zsZl != null && zsZl.size() > 0){
|
||||
dpznglVo.setZlZS(Long.valueOf(zsZl.size()));
|
||||
dpznglVo.setZlList(MapstructUtils.convert(zsZl, QltQualityInspectionVo.class));
|
||||
dpznglVo.getZlList().forEach(zl ->{zl.setCreateByName(userService.selectNicknameByIds(zl.getCreateBy().toString()));});
|
||||
dpznglVo.setZxjcZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_ZXGL.getTypeValue().equals(zl.getInspectionType())).count());
|
||||
dpznglVo.setDqjcZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_DQJC.getTypeValue().equals(zl.getInspectionType())).count());
|
||||
dpznglVo.setRcxjZl(zsZl.stream().filter(zl -> DpEnum.ZLGLLX_RCXJ.getTypeValue().equals(zl.getInspectionType())).count());
|
||||
dpznglVo.setZlZgsl(zsZl.stream().filter(zl -> DpEnum.ZLGDZT_ZG.getTypeValue().equals(zl.getInspectionStatus())).count());
|
||||
}
|
||||
if (zlZgLists.getRows() != null && zlZgLists.getRows().size() > 0){
|
||||
zlZgLists.getRows().forEach(zl ->{zl.setCorrectorName(userService.selectNicknameByIds(zl.getCorrectorId().toString()));});
|
||||
dpznglVo.setZlZgList(zlZgLists.getRows());
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ import org.dromara.bigscreen.service.ProgressBigScreenService;
|
||||
import org.dromara.cailiaoshebei.domain.vo.BusPurchaseDocVo;
|
||||
import org.dromara.cailiaoshebei.service.IBusMrpBaseService;
|
||||
import org.dromara.cailiaoshebei.service.IBusPurchaseDocService;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.materials.domain.vo.materials.MatMaterialsUseDetailVo;
|
||||
import org.dromara.materials.service.IMatMaterialsService;
|
||||
@ -22,10 +23,10 @@ import org.dromara.project.service.impl.BusAttendanceServiceImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@ -318,9 +319,27 @@ public class BigScreenWebSocketServer {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询大屏质保管理
|
||||
*/
|
||||
private void saveDateDpzagl(DpzaglService dpzaglService, Map<String, List<String>> params, Long projectId, List<Map<String, String>> maps) {
|
||||
DpznglBo dpznglBo = new DpznglBo();
|
||||
dpznglBo.setProjectId(projectId);
|
||||
|
||||
List<String> startDate = params.get("startDate");
|
||||
List<String> endDate = params.get("endDate");
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.CHINA);
|
||||
|
||||
|
||||
if (startDate != null && startDate.size() > 0){
|
||||
String first = startDate.getFirst();
|
||||
dpznglBo.setStartDate(LocalDate.parse(first, formatter));
|
||||
}
|
||||
if (endDate != null && endDate.size() > 0){
|
||||
String first = endDate.getFirst();
|
||||
dpznglBo.setEndDate(LocalDate.parse(first, formatter));
|
||||
}
|
||||
|
||||
// 查询大屏-质安管理-安全员分布情况
|
||||
|
||||
List<DpznglAqyVo> dpznglAqyVos = dpzaglService.listByAqy(dpznglBo);
|
||||
|
||||
Reference in New Issue
Block a user